Changeset 756875
- Timestamp:
- 08/15/2013 09:35:30 PM (13 years ago)
- Location:
- wp-video-posts/trunk
- Files:
-
- 3 edited
-
classes/wpvp-core-class.php (modified) (2 diffs)
-
readme.txt (modified) (2 diffs)
-
wpvp.php (modified) (4 diffs)
Legend:
- Unmodified
- Added
- Removed
-
wp-video-posts/trunk/classes/wpvp-core-class.php
r738862 r756875 218 218 $capture_image = $this->options['capture_image']; 219 219 $ffmpeg_path = $this->options['ffmpeg_path']; 220 $dimensions = ($width!=''&&$height!='') ? '-s '.$width.'x'.$height : '';220 $dimensions = ($width!=''&&$height!='') ? '-s '.$width.'x'.$height : ''; 221 221 $capture_image = $capture_image ? $capture_image : 5; 222 222 $extra = '-vframes 1 '.$dimensions.' -ss '.$capture_image.' -f image2'; … … 233 233 $height = $this->options['video_height']; 234 234 $ffmpeg_path = $this->options['ffmpeg_path']; 235 $dimensions = ($width!=''&&$height!='') ? ' -s'.$width.'x'.$height : ''; 236 $extr = $dimensions."-ar 44100 -b 384k -ac 2 "; 235 $dimensions = ($width!=''&&$height!='') ? ' -s '.$width.'x'.$height : ''; 236 //typo fix 237 $extra = $dimensions."-ar 44100 -b 384k -ac 2 "; 237 238 if ($encodeFormat=='mp4') { 238 239 $extra .= "-acodec libfaac -vcodec libx264 -vpre normal -refs 1 -coder 1 -level 31 -threads 8 -partitions parti4x4+parti8x8+partp4x4+partp8x8+partb8x8 -flags +mv4 -trellis 1 -cmp 256 -me_range 16 -sc_threshold 40 -i_qfactor 0.71 -bf 0 -g 250"; -
wp-video-posts/trunk/readme.txt
r738862 r756875 5 5 Requires at least: 3.2.1 6 6 Tested up to: 3.5.1 7 Stable tag: 2.0. 17 Stable tag: 2.0.2 8 8 9 9 Upload videos to create custom video posts. With FFMPEG installed, it encodes … … 127 127 128 128 == Changelog == 129 = 2.0.2 = 130 - Fixed bug with dimensions for thumb video typo not having a space after the flag therefore the thumb was not generated nor saved. 131 - Added flash rewrite rule on plugin activation/deactivation to update teh permalink structure on custom post creation so that you don't have to resave your permalink settings to allow the links to the video posts to work. 132 129 133 = 2.0.1 = 130 134 - Fixed bug with dimensions for thumb and video due to a type in the variable named being used. -
wp-video-posts/trunk/wpvp.php
r738862 r756875 4 4 Plugin URI: http://cmstactics.com 5 5 Description: WP Video Posts creates a custom post for uploaded videos. You can upload videos of different formats (FLV, F4V, MP4, AVI, MOV, 3GP and WMV) and the plugin will convert it to MP4 and play it using Flowplayer. 6 Version: 2.0. 16 Version: 2.0.2 7 7 Author: Alex Rayan, cmstactics 8 8 Author URI: http://cmstactics.com … … 135 135 } 136 136 /* 137 **register custom post type: videos on init action hook 138 *@access private 139 */ 140 public function wpvp_register_videos_post_type(){ 141 $labels = array( 142 'name' => _x('Videos', 'post type general name'), 143 'singular_name' => _x('Video Item', 'post type singular name'), 144 'add_new' => _x('Add New Video', 'video item'), 145 'add_new_item' => __('Add New Video Item'), 146 'edit_item' => __('Edit Video Item'), 147 'new_item' => __('New Video Item'), 148 'view_item' => __('View Video Item'), 149 'search_items' => __('Search Video'), 150 'not_found' => __('Nothing found'), 151 'not_found_in_trash' => __('Nothing found in Trash'), 152 'parent_item_colon' => '' 153 ); 154 $args = array( 155 'labels' => $labels, 156 'public' => true, 157 'publicly_queryable' => true, 158 'show_ui' => true, 159 'query_var' => true, 160 'menu_icon' => plugins_url('/images/', __FILE__) . 'videos_menu_icon.png', 161 //'rewrite' => true, 162 'rewrite' => array('slug'=>'videos'), 163 'capability_type' => 'post', 164 'hierarchical' => false, 165 'menu_position' => null, 166 'supports' => array('title','editor','thumbnail','comments','author','custom-fields'), 167 'taxonomies'=>array('post_tag') 168 ); 169 register_post_type( 'videos' , $args ); 170 register_taxonomy_for_object_type('category','videos'); 171 } 137 **register custom post type: videos on init action hook 138 *@access static 139 */ 140 static function wpvp_register_videos_post_type(){ 141 $labels = array( 142 'name' => _x('Videos', 'post type general name'), 143 'singular_name' => _x('Video Item', 'post type singular name'), 144 'add_new' => _x('Add New Video', 'video item'), 145 'add_new_item' => __('Add New Video Item'), 146 'edit_item' => __('Edit Video Item'), 147 'new_item' => __('New Video Item'), 148 'view_item' => __('View Video Item'), 149 'search_items' => __('Search Video'), 150 'not_found' => __('Nothing found'), 151 'not_found_in_trash' => __('Nothing found in Trash'), 152 'parent_item_colon' => '' 153 ); 154 $args = array( 155 'labels' => $labels, 156 'public' => true, 157 'publicly_queryable' => true, 158 'show_ui' => true, 159 'query_var' => true, 160 'menu_icon' => plugins_url('/images/', __FILE__) . 'videos_menu_icon.png', 161 'rewrite' => array('slug'=>'videos'), 162 'capability_type' => 'post', 163 'hierarchical' => false, 164 'menu_position' => null, 165 'supports' => array('title','editor','thumbnail','comments','author','custom-fields'), 166 'taxonomies'=>array('post_tag') 167 ); 168 register_post_type( 'videos' , $args ); 169 register_taxonomy_for_object_type('category','videos'); 170 } 171 /** 172 *Flush rewrite rules on plugin reactivation 173 *@access static 174 **/ 175 static function wpvp_create_video_post_flush_rewrite_rules(){ 176 self::wpvp_register_videos_post_type(); 177 self::wpvp_flush_rewrite_rules(); 178 } 179 /** 180 *Flush rewrite rules 181 *@access static 182 **/ 183 static function wpvp_flush_rewrite_rules(){ 184 flush_rewrite_rules(); 185 } 172 186 /* 173 187 *Enqueue scripts on wp_enqueue_scripts action hook … … 177 191 wp_enqueue_script('wpvp_flowplayer',plugins_url('/js/', __FILE__).'flowplayer-3.2.10.min.js',array('jquery'),NULL); 178 192 wp_enqueue_script( 'wpvp_front_end_js',plugins_url('/js/', __FILE__).'wpvp-front-end.js',array('jquery'),NULL ); 179 wp_enqueue_script( 'wpvp_flowplayer_js',plugins_url('/js/',__FILE__).'wpvp_flowplayer.js',array('jquery','wpvp_flowplayer'),NULL);180 $swf_loc = plugins_url('/js/', __FILE__).'flowplayer-3.2.11.swf';181 $vars_to_pass = array('swf'=>$swf_loc);182 wp_localize_script('wpvp_flowplayer_js','object_name',$vars_to_pass);193 wp_enqueue_script( 'wpvp_flowplayer_js',plugins_url('/js/',__FILE__).'wpvp_flowplayer.js',array('jquery','wpvp_flowplayer'),NULL); 194 $swf_loc = plugins_url('/js/', __FILE__).'flowplayer-3.2.11.swf'; 195 $vars_to_pass = array('swf'=>$swf_loc); 196 wp_localize_script('wpvp_flowplayer_js','object_name',$vars_to_pass); 183 197 wp_enqueue_style('wpvp_widget',plugins_url('/css/', __FILE__).'style.css'); 184 198 } … … 390 404 391 405 add_action('plugins_loaded',array('WPVPMediaEncoder','init')); 406 register_activation_hook( __FILE__, array('WPVPMediaEncoder', 'wpvp_create_video_post_flush_rewrite_rules' ) ); 407 register_deactivation_hook( __FILE__, array('WPVPMediaEncoder', 'wpvp_flush_rewrite_rules' ) ); 392 408 ?>
Note: See TracChangeset
for help on using the changeset viewer.