Changeset 1132375
- Timestamp:
- 04/10/2015 09:30:10 PM (11 years ago)
- Location:
- video-thumbnails
- Files:
-
- 7 deleted
- 3 edited
- 37 copied
-
tags/2.12.1 (copied) (copied from video-thumbnails/trunk)
-
tags/2.12.1/css/settings.css (copied) (copied from video-thumbnails/trunk/css/settings.css)
-
tags/2.12.1/js/settings.js (copied) (copied from video-thumbnails/trunk/js/settings.js)
-
tags/2.12.1/languages (copied) (copied from video-thumbnails/trunk/languages)
-
tags/2.12.1/languages/video-thumbnails-de_DE.mo (copied) (copied from video-thumbnails/trunk/languages/video-thumbnails-de_DE.mo)
-
tags/2.12.1/languages/video-thumbnails-de_DE.po (copied) (copied from video-thumbnails/trunk/languages/video-thumbnails-de_DE.po)
-
tags/2.12.1/php/class-video-thumbnails-settings.php (copied) (copied from video-thumbnails/trunk/php/class-video-thumbnails-settings.php)
-
tags/2.12.1/php/extensions/automatic-youtube-video-posts.php (copied) (copied from video-thumbnails/trunk/php/extensions/automatic-youtube-video-posts.php)
-
tags/2.12.1/php/extensions/class-ayvp-thumbnails.php (deleted)
-
tags/2.12.1/php/extensions/class-simple-video-embedder-thumbnails.php (deleted)
-
tags/2.12.1/php/extensions/class-video-thumbnails-extension.php (deleted)
-
tags/2.12.1/php/extensions/extensions.php (copied) (copied from video-thumbnails/trunk/php/extensions/extensions.php)
-
tags/2.12.1/php/extensions/simple-video-embedder.php (copied) (copied from video-thumbnails/trunk/php/extensions/simple-video-embedder.php)
-
tags/2.12.1/php/extensions/wp-robot.php (copied) (copied from video-thumbnails/trunk/php/extensions/wp-robot.php)
-
tags/2.12.1/php/providers/class-blip-thumbnails.php (copied) (copied from video-thumbnails/trunk/php/providers/class-blip-thumbnails.php)
-
tags/2.12.1/php/providers/class-collegehumor-thumbnails.php (copied) (copied from video-thumbnails/trunk/php/providers/class-collegehumor-thumbnails.php)
-
tags/2.12.1/php/providers/class-dailymotion-thumbnails.php (copied) (copied from video-thumbnails/trunk/php/providers/class-dailymotion-thumbnails.php)
-
tags/2.12.1/php/providers/class-facebook-thumbnails.php (copied) (copied from video-thumbnails/trunk/php/providers/class-facebook-thumbnails.php)
-
tags/2.12.1/php/providers/class-funnyordie-thumbnails.php (copied) (copied from video-thumbnails/trunk/php/providers/class-funnyordie-thumbnails.php)
-
tags/2.12.1/php/providers/class-googledrive-thumbnails.php (copied) (copied from video-thumbnails/trunk/php/providers/class-googledrive-thumbnails.php)
-
tags/2.12.1/php/providers/class-justintv-thumbnails.php (deleted)
-
tags/2.12.1/php/providers/class-kaltura-thumbnails.php (copied) (copied from video-thumbnails/trunk/php/providers/class-kaltura-thumbnails.php)
-
tags/2.12.1/php/providers/class-livestream-thumbnails.php (copied) (copied from video-thumbnails/trunk/php/providers/class-livestream-thumbnails.php)
-
tags/2.12.1/php/providers/class-metacafe-thumbnails.php (copied) (copied from video-thumbnails/trunk/php/providers/class-metacafe-thumbnails.php)
-
tags/2.12.1/php/providers/class-mpora-thumbnails.php (copied) (copied from video-thumbnails/trunk/php/providers/class-mpora-thumbnails.php)
-
tags/2.12.1/php/providers/class-rutube-thumbnails.php (copied) (copied from video-thumbnails/trunk/php/providers/class-rutube-thumbnails.php)
-
tags/2.12.1/php/providers/class-sapo-thumbnails.php (copied) (copied from video-thumbnails/trunk/php/providers/class-sapo-thumbnails.php)
-
tags/2.12.1/php/providers/class-ted-thumbnails.php (copied) (copied from video-thumbnails/trunk/php/providers/class-ted-thumbnails.php) (2 diffs)
-
tags/2.12.1/php/providers/class-tudou-thumbnails.php (copied) (copied from video-thumbnails/trunk/php/providers/class-tudou-thumbnails.php)
-
tags/2.12.1/php/providers/class-twitch-thumbnails.php (copied) (copied from video-thumbnails/trunk/php/providers/class-twitch-thumbnails.php)
-
tags/2.12.1/php/providers/class-video-thumbnails-provider.php (copied) (copied from video-thumbnails/trunk/php/providers/class-video-thumbnails-provider.php)
-
tags/2.12.1/php/providers/class-video-thumbnails-providers.php (deleted)
-
tags/2.12.1/php/providers/class-vimeo-thumbnails.php (copied) (copied from video-thumbnails/trunk/php/providers/class-vimeo-thumbnails.php)
-
tags/2.12.1/php/providers/class-vine-thumbnails.php (copied) (copied from video-thumbnails/trunk/php/providers/class-vine-thumbnails.php)
-
tags/2.12.1/php/providers/class-vk-thumbnails.php (copied) (copied from video-thumbnails/trunk/php/providers/class-vk-thumbnails.php)
-
tags/2.12.1/php/providers/class-wistia-thumbnails.php (copied) (copied from video-thumbnails/trunk/php/providers/class-wistia-thumbnails.php)
-
tags/2.12.1/php/providers/class-yahooscreen-thumbnails.php (copied) (copied from video-thumbnails/trunk/php/providers/class-yahooscreen-thumbnails.php)
-
tags/2.12.1/php/providers/class-youku-thumbnails.php (copied) (copied from video-thumbnails/trunk/php/providers/class-youku-thumbnails.php)
-
tags/2.12.1/php/providers/class-youtube-thumbnails.php (copied) (copied from video-thumbnails/trunk/php/providers/class-youtube-thumbnails.php)
-
tags/2.12.1/php/providers/providers.php (copied) (copied from video-thumbnails/trunk/php/providers/providers.php)
-
tags/2.12.1/readme.txt (copied) (copied from video-thumbnails/trunk/readme.txt) (2 diffs)
-
tags/2.12.1/screenshot-1.gif (deleted)
-
tags/2.12.1/screenshot-2.gif (deleted)
-
tags/2.12.1/video-thumbnails.php (copied) (copied from video-thumbnails/trunk/video-thumbnails.php) (12 diffs)
-
trunk/php/providers/class-ted-thumbnails.php (modified) (2 diffs)
-
trunk/readme.txt (modified) (2 diffs)
-
trunk/video-thumbnails.php (modified) (12 diffs)
Legend:
- Unmodified
- Added
- Removed
-
video-thumbnails/tags/2.12.1/php/providers/class-ted-thumbnails.php
r1072062 r1132375 36 36 // Regex strings 37 37 public $regexes = array( 38 '#//embed(?:\-ssl)?\.ted\.com/talks/( [A-Za-z0-9_-]+)\.html#', // iFrame SRC38 '#//embed(?:\-ssl)?\.ted\.com/talks/(?:lang/[A-Za-z_-]+/)?([A-Za-z0-9_-]+)\.html#', // iFrame SRC 39 39 ); 40 40 … … 57 57 array( 58 58 'markup' => '<iframe src="http://embed.ted.com/talks/kitra_cahana_stories_of_the_homeless_and_hidden.html" width="640" height="360" frameborder="0" scrolling="no" webkitAllowFullScreen mozallowfullscreen allowFullScreen></iframe>', 59 'expected' => 'http://images.ted.com/images/ted/341053090f8bac8c324c75be3114b673b4355e8a_480x360.jpg ',59 'expected' => 'http://images.ted.com/images/ted/341053090f8bac8c324c75be3114b673b4355e8a_480x360.jpg?lang=en', 60 60 'expected_hash' => 'f2a5f6af49e841b4f9c7b95d6ca0372a', 61 61 'name' => __( 'iFrame Embed', 'video-thumbnails' ) 62 ), 63 array( 64 'markup' => '<iframe src="https://embed-ssl.ted.com/talks/lang/fr-ca/shimpei_takahashi_play_this_game_to_come_up_with_original_ideas.html" width="640" height="360" frameborder="0" scrolling="no" allowfullscreen="allowfullscreen"></iframe>', 65 'expected' => 'http://images.ted.com/images/ted/b1f1183311cda4df9e1b65f2b363e0b806bff914_480x360.jpg?lang=en', 66 'expected_hash' => 'ff47c99c9eb95e3d6c4b986b18991f22', 67 'name' => __( 'Custom Language', 'video-thumbnails' ) 62 68 ), 63 69 ); -
video-thumbnails/tags/2.12.1/readme.txt
r1076402 r1132375 5 5 Requires at least: 3.2 6 6 Tested up to: 4.1 7 Stable tag: 2.12 7 Stable tag: 2.12.1 8 8 9 9 Video Thumbnails simplifies the process of automatically displaying video thumbnails in your WordPress template. … … 133 133 134 134 == Changelog == 135 136 = 2.12.1 = 137 * Support for TED when using foreign languages 135 138 136 139 = 2.12 = -
video-thumbnails/tags/2.12.1/video-thumbnails.php
r1076402 r1132375 6 6 Author: Sutherland Boswell 7 7 Author URI: http://sutherlandboswell.com 8 Version: 2.12 8 Version: 2.12.1 9 9 License: GPL2 10 10 Text Domain: video-thumbnails … … 31 31 define( 'VIDEO_THUMBNAILS_PATH', dirname(__FILE__) ); 32 32 define( 'VIDEO_THUMBNAILS_FIELD', '_video_thumbnail' ); 33 define( 'VIDEO_THUMBNAILS_VERSION', '2.12 ' );33 define( 'VIDEO_THUMBNAILS_VERSION', '2.12.1' ); 34 34 35 35 // Providers … … 104 104 } 105 105 106 /** 107 * Enqueues necessary admin scripts 108 * @param string $hook A hook for the current admin page 109 */ 106 110 function admin_scripts( $hook ) { 107 111 // Bulk tool page … … 128 132 } 129 133 130 // Initialize meta box on edit page 134 /** 135 * Initialize meta box on edit page 136 */ 131 137 function meta_box_init() { 132 138 if ( is_array( $this->settings->options['post_types'] ) ) { … … 137 143 } 138 144 139 // Construct the meta box 145 /** 146 * Renders the video thumbnail meta box 147 */ 140 148 function meta_box() { 141 149 global $post; … … 244 252 } 245 253 246 // The main event 254 /** 255 * Finds the video thumbnail for a post, saves/sets as featured image if enabled, saves image URL to custom field and then returns the URL 256 * @param int $post_id An optional post ID (can be left blank in a loop) 257 * @return mixed A string with an image URL if successful or null if there is no video thumbnail 258 */ 247 259 function get_video_thumbnail( $post_id = null ) { 248 260 … … 341 353 } 342 354 343 // Saves to media library 355 /** 356 * Saves a remote image to the media library 357 * @param string $image_url URL of the image to save 358 * @param int $post_id ID of the post to attach image to 359 * @return int ID of the attachment 360 */ 344 361 public static function save_to_media_library( $image_url, $post_id ) { 345 362 … … 419 436 return $attach_id; 420 437 421 } // End of save to media library function 422 423 // Post editor Ajax reset script 438 } 439 440 /** 441 * Ajax reset script for post editor 442 */ 424 443 function ajax_reset_script() { 425 444 echo '<!-- Video Thumbnails Ajax Search -->' . PHP_EOL; … … 438 457 } 439 458 440 // Ajax reset callback 459 /** 460 * Ajax callback for resetting a video thumbnail in the post editor 461 */ 441 462 function ajax_reset_callback() { 442 463 global $wpdb; // this is how you get access to the database … … 459 480 } 460 481 482 /** 483 * Ajax callback used to get all the post IDs to be scanned in bulk 484 */ 461 485 function bulk_posts_query_callback() { 462 486 // Some default args … … 477 501 } 478 502 503 /** 504 * Ajax callback used to get the video thumbnail for an individual post in the process of running the bulk tool 505 */ 479 506 function get_thumbnail_for_post_callback() { 480 507 … … 505 532 } 506 533 534 /** 535 * A function that renders the bulk scanning page 536 */ 507 537 function bulk_scanning_page() { 508 538 -
video-thumbnails/trunk/php/providers/class-ted-thumbnails.php
r1072062 r1132375 36 36 // Regex strings 37 37 public $regexes = array( 38 '#//embed(?:\-ssl)?\.ted\.com/talks/( [A-Za-z0-9_-]+)\.html#', // iFrame SRC38 '#//embed(?:\-ssl)?\.ted\.com/talks/(?:lang/[A-Za-z_-]+/)?([A-Za-z0-9_-]+)\.html#', // iFrame SRC 39 39 ); 40 40 … … 57 57 array( 58 58 'markup' => '<iframe src="http://embed.ted.com/talks/kitra_cahana_stories_of_the_homeless_and_hidden.html" width="640" height="360" frameborder="0" scrolling="no" webkitAllowFullScreen mozallowfullscreen allowFullScreen></iframe>', 59 'expected' => 'http://images.ted.com/images/ted/341053090f8bac8c324c75be3114b673b4355e8a_480x360.jpg ',59 'expected' => 'http://images.ted.com/images/ted/341053090f8bac8c324c75be3114b673b4355e8a_480x360.jpg?lang=en', 60 60 'expected_hash' => 'f2a5f6af49e841b4f9c7b95d6ca0372a', 61 61 'name' => __( 'iFrame Embed', 'video-thumbnails' ) 62 ), 63 array( 64 'markup' => '<iframe src="https://embed-ssl.ted.com/talks/lang/fr-ca/shimpei_takahashi_play_this_game_to_come_up_with_original_ideas.html" width="640" height="360" frameborder="0" scrolling="no" allowfullscreen="allowfullscreen"></iframe>', 65 'expected' => 'http://images.ted.com/images/ted/b1f1183311cda4df9e1b65f2b363e0b806bff914_480x360.jpg?lang=en', 66 'expected_hash' => 'ff47c99c9eb95e3d6c4b986b18991f22', 67 'name' => __( 'Custom Language', 'video-thumbnails' ) 62 68 ), 63 69 ); -
video-thumbnails/trunk/readme.txt
r1076402 r1132375 5 5 Requires at least: 3.2 6 6 Tested up to: 4.1 7 Stable tag: 2.12 7 Stable tag: 2.12.1 8 8 9 9 Video Thumbnails simplifies the process of automatically displaying video thumbnails in your WordPress template. … … 133 133 134 134 == Changelog == 135 136 = 2.12.1 = 137 * Support for TED when using foreign languages 135 138 136 139 = 2.12 = -
video-thumbnails/trunk/video-thumbnails.php
r1076402 r1132375 6 6 Author: Sutherland Boswell 7 7 Author URI: http://sutherlandboswell.com 8 Version: 2.12 8 Version: 2.12.1 9 9 License: GPL2 10 10 Text Domain: video-thumbnails … … 31 31 define( 'VIDEO_THUMBNAILS_PATH', dirname(__FILE__) ); 32 32 define( 'VIDEO_THUMBNAILS_FIELD', '_video_thumbnail' ); 33 define( 'VIDEO_THUMBNAILS_VERSION', '2.12 ' );33 define( 'VIDEO_THUMBNAILS_VERSION', '2.12.1' ); 34 34 35 35 // Providers … … 104 104 } 105 105 106 /** 107 * Enqueues necessary admin scripts 108 * @param string $hook A hook for the current admin page 109 */ 106 110 function admin_scripts( $hook ) { 107 111 // Bulk tool page … … 128 132 } 129 133 130 // Initialize meta box on edit page 134 /** 135 * Initialize meta box on edit page 136 */ 131 137 function meta_box_init() { 132 138 if ( is_array( $this->settings->options['post_types'] ) ) { … … 137 143 } 138 144 139 // Construct the meta box 145 /** 146 * Renders the video thumbnail meta box 147 */ 140 148 function meta_box() { 141 149 global $post; … … 244 252 } 245 253 246 // The main event 254 /** 255 * Finds the video thumbnail for a post, saves/sets as featured image if enabled, saves image URL to custom field and then returns the URL 256 * @param int $post_id An optional post ID (can be left blank in a loop) 257 * @return mixed A string with an image URL if successful or null if there is no video thumbnail 258 */ 247 259 function get_video_thumbnail( $post_id = null ) { 248 260 … … 341 353 } 342 354 343 // Saves to media library 355 /** 356 * Saves a remote image to the media library 357 * @param string $image_url URL of the image to save 358 * @param int $post_id ID of the post to attach image to 359 * @return int ID of the attachment 360 */ 344 361 public static function save_to_media_library( $image_url, $post_id ) { 345 362 … … 419 436 return $attach_id; 420 437 421 } // End of save to media library function 422 423 // Post editor Ajax reset script 438 } 439 440 /** 441 * Ajax reset script for post editor 442 */ 424 443 function ajax_reset_script() { 425 444 echo '<!-- Video Thumbnails Ajax Search -->' . PHP_EOL; … … 438 457 } 439 458 440 // Ajax reset callback 459 /** 460 * Ajax callback for resetting a video thumbnail in the post editor 461 */ 441 462 function ajax_reset_callback() { 442 463 global $wpdb; // this is how you get access to the database … … 459 480 } 460 481 482 /** 483 * Ajax callback used to get all the post IDs to be scanned in bulk 484 */ 461 485 function bulk_posts_query_callback() { 462 486 // Some default args … … 477 501 } 478 502 503 /** 504 * Ajax callback used to get the video thumbnail for an individual post in the process of running the bulk tool 505 */ 479 506 function get_thumbnail_for_post_callback() { 480 507 … … 505 532 } 506 533 534 /** 535 * A function that renders the bulk scanning page 536 */ 507 537 function bulk_scanning_page() { 508 538
Note: See TracChangeset
for help on using the changeset viewer.