Changeset 950682
- Timestamp:
- 07/17/2014 10:14:23 PM (12 years ago)
- Location:
- video-thumbnails
- Files:
-
- 2 added
- 6 deleted
- 4 edited
- 35 copied
- 2 moved
-
assets/screenshot-1.gif (moved) (moved from video-thumbnails/trunk/screenshot-1.gif)
-
assets/screenshot-2.gif (moved) (moved from video-thumbnails/trunk/screenshot-2.gif)
-
tags/2.10 (copied) (copied from video-thumbnails/trunk)
-
tags/2.10/css/settings.css (added)
-
tags/2.10/js/settings.js (copied) (copied from video-thumbnails/trunk/js/settings.js) (6 diffs)
-
tags/2.10/languages (copied) (copied from video-thumbnails/trunk/languages)
-
tags/2.10/languages/video-thumbnails-de_DE.mo (copied) (copied from video-thumbnails/trunk/languages/video-thumbnails-de_DE.mo)
-
tags/2.10/languages/video-thumbnails-de_DE.po (copied) (copied from video-thumbnails/trunk/languages/video-thumbnails-de_DE.po)
-
tags/2.10/php/class-video-thumbnails-settings.php (copied) (copied from video-thumbnails/trunk/php/class-video-thumbnails-settings.php) (7 diffs)
-
tags/2.10/php/extensions/automatic-youtube-video-posts.php (copied) (copied from video-thumbnails/trunk/php/extensions/automatic-youtube-video-posts.php)
-
tags/2.10/php/extensions/class-ayvp-thumbnails.php (deleted)
-
tags/2.10/php/extensions/class-simple-video-embedder-thumbnails.php (deleted)
-
tags/2.10/php/extensions/class-video-thumbnails-extension.php (deleted)
-
tags/2.10/php/extensions/extensions.php (copied) (copied from video-thumbnails/trunk/php/extensions/extensions.php)
-
tags/2.10/php/extensions/simple-video-embedder.php (copied) (copied from video-thumbnails/trunk/php/extensions/simple-video-embedder.php)
-
tags/2.10/php/extensions/wp-robot.php (copied) (copied from video-thumbnails/trunk/php/extensions/wp-robot.php)
-
tags/2.10/php/providers/class-blip-thumbnails.php (copied) (copied from video-thumbnails/trunk/php/providers/class-blip-thumbnails.php)
-
tags/2.10/php/providers/class-collegehumor-thumbnails.php (copied) (copied from video-thumbnails/trunk/php/providers/class-collegehumor-thumbnails.php)
-
tags/2.10/php/providers/class-dailymotion-thumbnails.php (copied) (copied from video-thumbnails/trunk/php/providers/class-dailymotion-thumbnails.php)
-
tags/2.10/php/providers/class-facebook-thumbnails.php (copied) (copied from video-thumbnails/trunk/php/providers/class-facebook-thumbnails.php)
-
tags/2.10/php/providers/class-funnyordie-thumbnails.php (copied) (copied from video-thumbnails/trunk/php/providers/class-funnyordie-thumbnails.php)
-
tags/2.10/php/providers/class-googledrive-thumbnails.php (copied) (copied from video-thumbnails/trunk/php/providers/class-googledrive-thumbnails.php)
-
tags/2.10/php/providers/class-justintv-thumbnails.php (copied) (copied from video-thumbnails/trunk/php/providers/class-justintv-thumbnails.php)
-
tags/2.10/php/providers/class-kaltura-thumbnails.php (copied) (copied from video-thumbnails/trunk/php/providers/class-kaltura-thumbnails.php)
-
tags/2.10/php/providers/class-metacafe-thumbnails.php (copied) (copied from video-thumbnails/trunk/php/providers/class-metacafe-thumbnails.php)
-
tags/2.10/php/providers/class-mpora-thumbnails.php (copied) (copied from video-thumbnails/trunk/php/providers/class-mpora-thumbnails.php)
-
tags/2.10/php/providers/class-rutube-thumbnails.php (copied) (copied from video-thumbnails/trunk/php/providers/class-rutube-thumbnails.php)
-
tags/2.10/php/providers/class-sapo-thumbnails.php (copied) (copied from video-thumbnails/trunk/php/providers/class-sapo-thumbnails.php)
-
tags/2.10/php/providers/class-ted-thumbnails.php (copied) (copied from video-thumbnails/trunk/php/providers/class-ted-thumbnails.php)
-
tags/2.10/php/providers/class-tudou-thumbnails.php (copied) (copied from video-thumbnails/trunk/php/providers/class-tudou-thumbnails.php)
-
tags/2.10/php/providers/class-twitch-thumbnails.php (copied) (copied from video-thumbnails/trunk/php/providers/class-twitch-thumbnails.php)
-
tags/2.10/php/providers/class-video-thumbnails-provider.php (copied) (copied from video-thumbnails/trunk/php/providers/class-video-thumbnails-provider.php)
-
tags/2.10/php/providers/class-video-thumbnails-providers.php (deleted)
-
tags/2.10/php/providers/class-vimeo-thumbnails.php (copied) (copied from video-thumbnails/trunk/php/providers/class-vimeo-thumbnails.php)
-
tags/2.10/php/providers/class-vine-thumbnails.php (copied) (copied from video-thumbnails/trunk/php/providers/class-vine-thumbnails.php)
-
tags/2.10/php/providers/class-vk-thumbnails.php (copied) (copied from video-thumbnails/trunk/php/providers/class-vk-thumbnails.php)
-
tags/2.10/php/providers/class-wistia-thumbnails.php (copied) (copied from video-thumbnails/trunk/php/providers/class-wistia-thumbnails.php)
-
tags/2.10/php/providers/class-youku-thumbnails.php (copied) (copied from video-thumbnails/trunk/php/providers/class-youku-thumbnails.php)
-
tags/2.10/php/providers/class-youtube-thumbnails.php (copied) (copied from video-thumbnails/trunk/php/providers/class-youtube-thumbnails.php)
-
tags/2.10/php/providers/providers.php (copied) (copied from video-thumbnails/trunk/php/providers/providers.php)
-
tags/2.10/readme.txt (copied) (copied from video-thumbnails/trunk/readme.txt) (2 diffs)
-
tags/2.10/screenshot-1.gif (deleted)
-
tags/2.10/screenshot-2.gif (deleted)
-
tags/2.10/video-thumbnails.php (copied) (copied from video-thumbnails/trunk/video-thumbnails.php) (2 diffs)
-
trunk/css/settings.css (added)
-
trunk/js/settings.js (modified) (6 diffs)
-
trunk/php/class-video-thumbnails-settings.php (modified) (7 diffs)
-
trunk/readme.txt (modified) (2 diffs)
-
trunk/video-thumbnails.php (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
video-thumbnails/tags/2.10/js/settings.js
r922717 r950682 1 // Custom field detection2 1 jQuery(function ($) { 3 2 3 /** 4 * Custom field detection 5 */ 4 6 $('#vt_detect_custom_field').on('click',function(e) { 5 7 e.preventDefault(); … … 24 26 }); 25 27 28 /** 29 * Debugging tests 30 */ 31 $('a.toggle-video-thumbnails-test-content').on('click',function(e) { 32 e.preventDefault(); 33 $(this).closest('.video-thumbnails-test').toggleClass('closed'); 34 }); 35 36 function enable_video_thumbnails_tests() { 37 $('.video-thumbnails-test-button').attr('disabled',false); 38 } 39 40 function disable_video_thumbnails_tests() { 41 $('.video-thumbnails-test-button').attr('disabled',true); 42 } 43 44 /* Provider testing */ 45 46 function test_single_provider(provider_slug) { 47 disable_video_thumbnails_tests(); 48 $('#'+provider_slug+'-provider-test').addClass('test-working'); 49 $('#'+provider_slug+'-provider-test .retest-video-provider').val(video_thumbnails_settings_language.working); 50 var data = { 51 action: 'video_thumbnail_provider_test', 52 provider_slug: provider_slug 53 }; 54 $.ajax({ 55 type: "POST", 56 url: ajaxurl, 57 data: data, 58 success: function(response){ 59 $('#'+provider_slug+'-provider-test .test-results').html(response); 60 $('#'+provider_slug+'-provider-test .retest-video-provider').val(video_thumbnails_settings_language.retest); 61 $('#'+provider_slug+'-provider-test').removeClass('test-working'); 62 done_testing_single_provider(); 63 }, 64 error: function(XMLHttpRequest, textStatus, errorThrown) { 65 $('#'+provider_slug+'-provider-test .test-results').html('<p>' + video_thumbnails_settings_language.ajax_error + ' ' + XMLHttpRequest.status + ' ' + XMLHttpRequest.statusText + '</p>'); 66 $('#'+provider_slug+'-provider-test .retest-video-provider').val(video_thumbnails_settings_language.retest); 67 $('#'+provider_slug+'-provider-test').removeClass('test-working'); 68 done_testing_single_provider(); 69 } 70 }); 71 } 72 73 var provider_index = 0; 74 var testing_all_providers = false; 75 76 function done_testing_single_provider() { 77 // If we aren't testing providers, don't do anything 78 if (testing_all_providers==false) { 79 enable_video_thumbnails_tests(); 80 } 81 provider_index = provider_index + 1; 82 if (provider_index>=video_thumbnails_provider_slugs.provider_slugs.length) { 83 testing_all_providers = false; 84 enable_video_thumbnails_tests(); 85 return; 86 } else { 87 test_single_provider(video_thumbnails_provider_slugs.provider_slugs[provider_index]); 88 } 89 } 90 91 $('#test-all-video-thumbnail-providers').on('click',function(e) { 92 e.preventDefault(); 93 $('#provider-test-results').removeClass('hidden'); 94 $(this).parent().remove(); 95 testing_all_providers = true; 96 test_single_provider(video_thumbnails_provider_slugs.provider_slugs[provider_index]); 97 }); 98 99 $('.retest-video-provider').on('click',function(e) { 100 e.preventDefault(); 101 test_single_provider( $(this).data('provider-slug') ); 102 }); 103 104 /* Markup detection testing */ 105 $('#test-markup-detection').on('click',function(e) { 106 disable_video_thumbnails_tests(); 107 e.preventDefault(); 108 var data = { 109 action: 'video_thumbnail_markup_detection_test', 110 markup: $('#markup-input').val() 111 }; 112 document.getElementById( 'markup-test-result' ).innerHTML = '<p>' + video_thumbnails_settings_language.working + '</p>'; 113 $.ajax({ 114 type: "POST", 115 url: ajaxurl, 116 data: data, 117 success: function(response){ 118 document.getElementById( 'markup-test-result' ).innerHTML = response; 119 enable_video_thumbnails_tests(); 120 }, 121 error: function(XMLHttpRequest, textStatus, errorThrown) { 122 document.getElementById( 'markup-test-result' ).innerHTML = '<p>' + video_thumbnails_settings_language.ajax_error + ' ' + XMLHttpRequest.status + ' ' + XMLHttpRequest.statusText + '</p>'; 123 enable_video_thumbnails_tests(); 124 } 125 }); 126 }); 127 128 /* Media download testing */ 26 129 $('#test-video-thumbnail-saving-media').on('click',function(e) { 130 disable_video_thumbnails_tests(); 27 131 $('#media-test-result').html( '<p>' + video_thumbnails_settings_language.working + '</p>' ); 28 132 e.preventDefault(); … … 36 140 success: function(response){ 37 141 $('#media-test-result').html(response); 142 enable_video_thumbnails_tests(); 38 143 }, 39 144 error: function(XMLHttpRequest, textStatus, errorThrown) { 40 145 $('#media-test-result').html('<p>' + video_thumbnails_settings_language.ajax_error + ' ' + XMLHttpRequest.status + ' ' + XMLHttpRequest.statusText + '</p>'); 146 enable_video_thumbnails_tests(); 41 147 } 42 148 }); … … 44 150 45 151 $('#delete-video-thumbnail-test-images').on('click',function(e) { 152 disable_video_thumbnails_tests(); 46 153 $('#media-test-result').html( '<p>' + video_thumbnails_settings_language.working + '</p>' ); 47 154 e.preventDefault(); … … 55 162 success: function(response){ 56 163 $('#media-test-result').html(response); 164 enable_video_thumbnails_tests(); 57 165 }, 58 166 error: function(XMLHttpRequest, textStatus, errorThrown) { 59 167 $('#media-test-result').html('<p>' + video_thumbnails_settings_language.ajax_error + ' ' + XMLHttpRequest.status + ' ' + XMLHttpRequest.statusText + '</p>'); 168 enable_video_thumbnails_tests(); 60 169 } 61 170 }); … … 64 173 }); 65 174 66 // Test actions 67 function test_video_thumbnail( test_type ) { 68 var data = { 69 action: 'video_thumbnail_' + test_type + '_test' 70 }; 71 document.getElementById( test_type + '-test' ).innerHTML = video_thumbnails_settings_language.working; 72 jQuery.ajax({ 73 type: "POST", 74 url: ajaxurl, 75 data: data, 76 success: function(response){ 77 document.getElementById( test_type + '-test' ).innerHTML = response; 78 }, 79 error: function(XMLHttpRequest, textStatus, errorThrown) { 80 document.getElementById( test_type + '-test' ).innerHTML = '<p>' + video_thumbnails_settings_language.ajax_error + ' ' + XMLHttpRequest.status + ' ' + XMLHttpRequest.statusText + '</p>'; 81 } 82 }); 83 }; 84 85 function test_video_thumbnail_markup_detection() { 86 var data = { 87 action: 'video_thumbnail_markup_detection_test', 88 markup: jQuery('#markup-input').val() 89 }; 90 document.getElementById( 'markup-test-result' ).innerHTML = '<p>' + video_thumbnails_settings_language.working + '</p>'; 91 jQuery.ajax({ 92 type: "POST", 93 url: ajaxurl, 94 data: data, 95 success: function(response){ 96 document.getElementById( 'markup-test-result' ).innerHTML = response; 97 }, 98 error: function(XMLHttpRequest, textStatus, errorThrown) { 99 document.getElementById( 'markup-test-result' ).innerHTML = '<p>' + video_thumbnails_settings_language.ajax_error + ' ' + XMLHttpRequest.status + ' ' + XMLHttpRequest.statusText + '</p>'; 100 } 101 }); 102 } 103 104 // Clear all video thumbnails 175 /** 176 * Clear all video thumbnails 177 */ 105 178 function clear_all_video_thumbnails( nonce ) { 106 179 var confimation_result = confirm(video_thumbnails_settings_language.clear_all_confirmation); -
video-thumbnails/tags/2.10/php/class-video-thumbnails-settings.php
r922717 r950682 47 47 add_action( 'wp_ajax_video_thumbnail_delete_test_images', array( &$this, 'delete_test_images_callback' ) ); // Delete test images 48 48 add_action( 'wp_ajax_video_thumbnail_markup_detection_test', array( &$this, 'markup_detection_test_callback' ) ); // Markup input test 49 // Settings page actions 50 if ( isset ( $_GET['page'] ) && ( $_GET['page'] == 'video_thumbnails' ) ) { 51 // Admin scripts 52 add_action( 'admin_enqueue_scripts', array( &$this, 'admin_scripts' ) ); 53 } 49 // Admin scripts 50 add_action( 'admin_enqueue_scripts', array( &$this, 'admin_scripts' ) ); 54 51 // Add "Go Pro" call to action to settings footer 55 52 add_action( 'video_thumbnails/settings_footer', array( 'Video_Thumbnails_Settings', 'settings_footer' ) ); … … 136 133 } 137 134 138 function admin_scripts() { 139 wp_enqueue_script( 'video_thumbnails_settings', plugins_url( 'js/settings.js' , VIDEO_THUMBNAILS_PATH . '/video-thumbnails.php' ), array( 'jquery' ), VIDEO_THUMBNAILS_VERSION ); 140 wp_localize_script( 'video_thumbnails_settings', 'video_thumbnails_settings_language', array( 141 'detection_failed' => __( 'We were unable to find a video in the custom fields of your most recently updated post.', 'video-thumbnails' ), 142 'working' => __( 'Working...', 'video-thumbnails' ), 143 'ajax_error' => __( 'AJAX Error:', 'video-thumbnails' ), 144 'clear_all_confirmation' => __( 'Are you sure you want to clear all video thumbnails? This cannot be undone.', 'video-thumbnails' ), 145 ) ); 135 function admin_scripts( $hook ) { 136 if ( 'settings_page_video_thumbnails' == $hook ) { 137 wp_enqueue_style( 'video-thumbnails-settings-css', plugins_url( '/css/settings.css', VIDEO_THUMBNAILS_PATH . '/video-thumbnails.php' ), false, VIDEO_THUMBNAILS_VERSION ); 138 wp_enqueue_script( 'video_thumbnails_settings', plugins_url( 'js/settings.js' , VIDEO_THUMBNAILS_PATH . '/video-thumbnails.php' ), array( 'jquery' ), VIDEO_THUMBNAILS_VERSION ); 139 wp_localize_script( 'video_thumbnails_settings', 'video_thumbnails_settings_language', array( 140 'detection_failed' => __( 'We were unable to find a video in the custom fields of your most recently updated post.', 'video-thumbnails' ), 141 'working' => __( 'Working...', 'video-thumbnails' ), 142 'retest' => __( 'Retest', 'video-thumbnails' ), 143 'ajax_error' => __( 'AJAX Error:', 'video-thumbnails' ), 144 'clear_all_confirmation' => __( 'Are you sure you want to clear all video thumbnails? This cannot be undone.', 'video-thumbnails' ), 145 ) ); 146 global $video_thumbnails; 147 $provider_slugs = array(); 148 foreach ( $video_thumbnails->providers as $provider ) { 149 $provider_slugs[] = $provider->service_slug; 150 } 151 wp_localize_script( 'video_thumbnails_settings', 'video_thumbnails_provider_slugs', array( 152 'provider_slugs' => $provider_slugs 153 ) ); 154 } 146 155 } 147 156 … … 223 232 </thead> 224 233 <tbody> 225 <?php 226 $passed = 0; 227 $failed = 0; 228 foreach ( $video_thumbnails->providers as $provider ) { 234 <?php 235 $provider = $video_thumbnails->providers[$_POST['provider_slug']]; 229 236 foreach ( $provider->get_test_cases() as $test_case ) { 230 237 echo '<tr>'; 231 echo '<td><strong>' . $ provider->service_name . '</strong> - ' . $test_case['name'] . '</td>';238 echo '<td><strong>' . $test_case['name'] . '</strong></td>'; 232 239 $markup = apply_filters( 'the_content', $test_case['markup'] ); 233 240 $result = $video_thumbnails->get_first_thumbnail_url( $markup ); … … 252 259 if ( $matched ) { 253 260 echo '<td style="color:green;">✔ ' . __( 'Passed', 'video-thumbnails' ) . '</td>'; 254 $passed++;255 261 } else { 256 262 echo '<td style="color:red;">✗ ' . __( 'Failed', 'video-thumbnails' ) . '</td>'; 257 $failed++;258 263 } 259 264 echo '<td>'; … … 267 272 } 268 273 echo '</tr>'; 269 } 270 } ?> 274 } ?> 271 275 <tbody> 272 <tfoot>273 <tr>274 <th></th>275 <th><span style="color:green;">✔ <?php echo $passed; ?></span> / <span style="color:red;">✗ <?php echo $failed; ?></span></th>276 <th></th>277 </tr>278 </tfoot>279 276 </table> 280 277 <?php die(); … … 497 494 } 498 495 496 global $video_thumbnails; 497 499 498 ?><div class="wrap"> 500 499 … … 569 568 <p><?php _e( 'Use these tests to help diagnose any problems. Please include results when requesting support.', 'video-thumbnails' ); ?></p> 570 569 571 <h3><?php _e( 'Test Video Providers', 'video-thumbnails' ); ?></h3> 572 573 <p><?php _e( 'This test automatically searches a sample for every type of video supported and compares it to the expected value. Sometimes tests may fail due to API rate limits.', 'video-thumbnails' ); ?></p> 574 575 <div id="provider-test"> 576 <p><input type="submit" class="button-primary" onclick="test_video_thumbnail('provider');" value="<?php esc_attr_e( 'Test Video Providers', 'video-thumbnails' ); ?>" /></p> 570 <div class="video-thumbnails-test closed"> 571 572 <a href="#" class="toggle-video-thumbnails-test-content show-hide-test-link"><span class="show"><?php _e( 'Show', 'video-thumbnails' ); ?></span> <span class="hide"><?php _e( 'Hide', 'video-thumbnails' ); ?></span></a> 573 574 <a href="#" class="toggle-video-thumbnails-test-content title-test-link"><h3 class="test-title"><?php _e( 'Test Video Providers', 'video-thumbnails' ); ?></h3></a> 575 576 <div class="video-thumbnails-test-content"> 577 578 <p><?php _e( 'This test automatically searches a sample for every type of video supported and compares it to the expected value. Sometimes tests may fail due to API rate limits.', 'video-thumbnails' ); ?></p> 579 580 <p><input type="submit" class="button-primary video-thumbnails-test-button" id="test-all-video-thumbnail-providers" value="<?php esc_attr_e( 'Test Video Providers', 'video-thumbnails' ); ?>" /></p> 581 582 <div id="provider-test-results" class="hidden"> 583 <?php 584 foreach ( $video_thumbnails->providers as $provider ) { 585 echo '<div id="' . $provider->service_slug . '-provider-test" class="single-provider-test-results">'; 586 echo '<h3>' . $provider->service_name . ' <input type="submit" data-provider-slug="' . $provider->service_slug . '" class="button-primary retest-video-provider video-thumbnails-test-button" value="' . esc_attr__( 'Waiting...', 'video-thumbnails' ) . '" /></h3>'; 587 echo '<div class="test-results"></div>'; 588 echo '</div>'; 589 } 590 ?> 591 </div> 592 593 </div><!-- /.video-thumbnails-test-content --> 594 577 595 </div> 578 579 <h3><?php _e( 'Test Markup for Video', 'video-thumbnails' ); ?></h3> 580 581 <p><?php _e( 'Copy and paste an embed code below to see if a video is detected.', 'video-thumbnails' ); ?></p> 582 583 <textarea id="markup-input" cols="50" rows="5"></textarea> 584 585 <p><input type="submit" class="button-primary" onclick="test_video_thumbnail_markup_detection();" value="<?php esc_attr_e( 'Scan For Thumbnail', 'video-thumbnails' ); ?>" /></p> 586 587 <div id="markup-test-result"></div> 588 589 <h3><?php _e( 'Test Saving to Media Library', 'video-thumbnails' ); ?></h3> 590 591 <p><?php _e( 'This test checks for issues with the process of saving a remote thumbnail to your local media library.', 'video-thumbnails' ); ?></p> 592 593 <p><?php _e( 'Also be sure to test that you can manually upload an image to your site. If you\'re unable to upload images, you may need to <a href="http://codex.wordpress.org/Changing_File_Permissions">change file permissions</a>.', 'video-thumbnails' ); ?></p> 594 595 <p> 596 <input type="submit" id="test-video-thumbnail-saving-media" class="button-primary" value="<?php esc_attr_e( 'Download Test Image', 'video-thumbnails' ); ?>" /> 597 <input type="submit" id="delete-video-thumbnail-test-images" class="button" value="<?php esc_attr_e( 'Delete Test Images', 'video-thumbnails' ); ?>" /> 598 </p> 599 600 <div id="media-test-result"></div> 601 602 <h3><?php _e( 'Installation Information', 'video-thumbnails' ); ?></h3> 603 <table class="widefat"> 604 <thead> 605 <tr> 606 <th></th> 607 <th></th> 608 <th></th> 609 </tr> 610 </thead> 611 <tbody> 612 <tr> 613 <td><strong><?php _e( 'WordPress Version', 'video-thumbnails' ); ?></strong></td> 614 <td><?php echo get_bloginfo( 'version' ); ?></td> 615 <td></td> 616 </tr> 617 <tr> 618 <td><strong><?php _e( 'Video Thumbnails Version', 'video-thumbnails' ); ?></strong></td> 619 <td><?php echo VIDEO_THUMBNAILS_VERSION; ?></td> 620 <td></td> 621 </tr> 622 <tr> 623 <td><strong><?php _e( 'Video Thumbnails Settings Version', 'video-thumbnails' ); ?></strong></td> 624 <td><?php echo $this->options['version']; ?></td> 625 <td></td> 626 </tr> 627 <tr> 628 <td><strong><?php _e( 'PHP Version', 'video-thumbnails' ); ?></strong></td> 629 <td><?php echo PHP_VERSION; ?></td> 630 <td></td> 631 </tr> 632 <tr> 633 <td><strong><?php _e( 'Post Thumbnails', 'video-thumbnails' ); ?></strong></td> 634 <td><?php if ( current_theme_supports( 'post-thumbnails' ) ) : ?><span style="color:green">✔</span> <?php _e( 'Your theme supports post thumbnails.', 'video-thumbnails' ); ?><?php else: ?><span style="color:red">✖</span> <?php _e( 'Your theme does not support post thumbnails, you\'ll need to make modifications or switch to a different theme. <a href="http://codex.wordpress.org/Post_Thumbnails">More info</a>', 'video-thumbnails' ); ?><?php endif; ?></td> 635 <td></td> 636 </tr> 637 <tr> 638 <td><strong><?php _e( 'Video Providers', 'video-thumbnails' ); ?></strong></td> 639 <td> 640 <?php global $video_thumbnails; ?> 641 <?php $provider_names = array(); foreach ( $video_thumbnails->providers as $provider ) { $provider_names[] = $provider->service_name; }; ?> 642 <strong><?php echo count( $video_thumbnails->providers ); ?></strong>: <?php echo implode( ', ', $provider_names ); ?> 643 </td> 644 <td></td> 645 </tr> 646 </tbody> 647 <tfoot> 648 <tr> 649 <th></th> 650 <th></th> 651 <th></th> 652 </tr> 653 </tfoot> 654 </table> 596 <div class="video-thumbnails-test closed"> 597 598 <a href="#" class="toggle-video-thumbnails-test-content show-hide-test-link"><span class="show"><?php _e( 'Show', 'video-thumbnails' ); ?></span> <span class="hide"><?php _e( 'Hide', 'video-thumbnails' ); ?></span></a> 599 600 <a href="#" class="toggle-video-thumbnails-test-content title-test-link"><h3 class="test-title"><?php _e( 'Test Markup for Video', 'video-thumbnails' ); ?></h3></a> 601 602 <div class="video-thumbnails-test-content"> 603 604 <p><?php _e( 'Copy and paste an embed code below to see if a video is detected.', 'video-thumbnails' ); ?></p> 605 606 <textarea id="markup-input" cols="50" rows="5"></textarea> 607 608 <p><input type="submit" id="test-markup-detection" class="button-primary video-thumbnails-test-button" value="<?php esc_attr_e( 'Scan For Thumbnail', 'video-thumbnails' ); ?>" /></p> 609 610 <div id="markup-test-result"></div> 611 612 </div><!-- /.video-thumbnails-test-content --> 613 614 </div> 615 <div class="video-thumbnails-test closed"> 616 617 <a href="#" class="toggle-video-thumbnails-test-content show-hide-test-link"><span class="show"><?php _e( 'Show', 'video-thumbnails' ); ?></span> <span class="hide"><?php _e( 'Hide', 'video-thumbnails' ); ?></span></a> 618 619 <a href="#" class="toggle-video-thumbnails-test-content title-test-link"><h3 class="test-title"><?php _e( 'Test Saving to Media Library', 'video-thumbnails' ); ?></h3></a> 620 621 <div class="video-thumbnails-test-content"> 622 623 <p><?php _e( 'This test checks for issues with the process of saving a remote thumbnail to your local media library.', 'video-thumbnails' ); ?></p> 624 625 <p><?php _e( 'Also be sure to test that you can manually upload an image to your site. If you\'re unable to upload images, you may need to <a href="http://codex.wordpress.org/Changing_File_Permissions">change file permissions</a>.', 'video-thumbnails' ); ?></p> 626 627 <p> 628 <input type="submit" id="test-video-thumbnail-saving-media" class="button-primary video-thumbnails-test-button" value="<?php esc_attr_e( 'Download Test Image', 'video-thumbnails' ); ?>" /> 629 <input type="submit" id="delete-video-thumbnail-test-images" class="button video-thumbnails-test-button" value="<?php esc_attr_e( 'Delete Test Images', 'video-thumbnails' ); ?>" /> 630 </p> 631 632 <div id="media-test-result"></div> 633 634 </div><!-- /.video-thumbnails-test-content --> 635 636 </div> 637 <div class="video-thumbnails-test closed"> 638 639 <a href="#" class="toggle-video-thumbnails-test-content show-hide-test-link"><span class="show"><?php _e( 'Show', 'video-thumbnails' ); ?></span> <span class="hide"><?php _e( 'Hide', 'video-thumbnails' ); ?></span></a> 640 641 <a href="#" class="toggle-video-thumbnails-test-content title-test-link"><h3 class="test-title"><?php _e( 'Installation Information', 'video-thumbnails' ); ?></h3></a> 642 643 <div class="video-thumbnails-test-content"> 644 645 <table class="widefat"> 646 <thead> 647 <tr> 648 <th></th> 649 <th></th> 650 <th></th> 651 </tr> 652 </thead> 653 <tbody> 654 <tr> 655 <td><strong><?php _e( 'WordPress Version', 'video-thumbnails' ); ?></strong></td> 656 <td><?php echo get_bloginfo( 'version' ); ?></td> 657 <td></td> 658 </tr> 659 <tr> 660 <td><strong><?php _e( 'Video Thumbnails Version', 'video-thumbnails' ); ?></strong></td> 661 <td><?php echo VIDEO_THUMBNAILS_VERSION; ?></td> 662 <td></td> 663 </tr> 664 <tr> 665 <td><strong><?php _e( 'Video Thumbnails Settings Version', 'video-thumbnails' ); ?></strong></td> 666 <td><?php echo $this->options['version']; ?></td> 667 <td></td> 668 </tr> 669 <tr> 670 <td><strong><?php _e( 'PHP Version', 'video-thumbnails' ); ?></strong></td> 671 <td><?php echo PHP_VERSION; ?></td> 672 <td></td> 673 </tr> 674 <tr> 675 <td><strong><?php _e( 'Post Thumbnails', 'video-thumbnails' ); ?></strong></td> 676 <td><?php if ( current_theme_supports( 'post-thumbnails' ) ) : ?><span style="color:green">✔</span> <?php _e( 'Your theme supports post thumbnails.', 'video-thumbnails' ); ?><?php else: ?><span style="color:red">✖</span> <?php _e( 'Your theme does not support post thumbnails, you\'ll need to make modifications or switch to a different theme. <a href="http://codex.wordpress.org/Post_Thumbnails">More info</a>', 'video-thumbnails' ); ?><?php endif; ?></td> 677 <td></td> 678 </tr> 679 <tr> 680 <td><strong><?php _e( 'Video Providers', 'video-thumbnails' ); ?></strong></td> 681 <td> 682 <?php global $video_thumbnails; ?> 683 <?php $provider_names = array(); foreach ( $video_thumbnails->providers as $provider ) { $provider_names[] = $provider->service_name; }; ?> 684 <strong><?php echo count( $video_thumbnails->providers ); ?></strong>: <?php echo implode( ', ', $provider_names ); ?> 685 </td> 686 <td></td> 687 </tr> 688 </tbody> 689 <tfoot> 690 <tr> 691 <th></th> 692 <th></th> 693 <th></th> 694 </tr> 695 </tfoot> 696 </table> 697 698 </div><!-- /.video-thumbnails-test-content --> 699 700 </div> 655 701 656 702 <?php -
video-thumbnails/tags/2.10/readme.txt
r931306 r950682 5 5 Requires at least: 3.2 6 6 Tested up to: 3.9 7 Stable tag: 2. 9.17 Stable tag: 2.10 8 8 9 9 Video Thumbnails simplifies the process of automatically displaying video thumbnails in your WordPress template. … … 132 132 133 133 == Changelog == 134 135 = 2.10 = 136 * Improved debugging page 134 137 135 138 = 2.9.1 = -
video-thumbnails/tags/2.10/video-thumbnails.php
r931306 r950682 6 6 Author: Sutherland Boswell 7 7 Author URI: http://sutherlandboswell.com 8 Version: 2. 9.18 Version: 2.10 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. 9.1' );33 define( 'VIDEO_THUMBNAILS_VERSION', '2.10' ); 34 34 35 35 // Providers -
video-thumbnails/trunk/js/settings.js
r922717 r950682 1 // Custom field detection2 1 jQuery(function ($) { 3 2 3 /** 4 * Custom field detection 5 */ 4 6 $('#vt_detect_custom_field').on('click',function(e) { 5 7 e.preventDefault(); … … 24 26 }); 25 27 28 /** 29 * Debugging tests 30 */ 31 $('a.toggle-video-thumbnails-test-content').on('click',function(e) { 32 e.preventDefault(); 33 $(this).closest('.video-thumbnails-test').toggleClass('closed'); 34 }); 35 36 function enable_video_thumbnails_tests() { 37 $('.video-thumbnails-test-button').attr('disabled',false); 38 } 39 40 function disable_video_thumbnails_tests() { 41 $('.video-thumbnails-test-button').attr('disabled',true); 42 } 43 44 /* Provider testing */ 45 46 function test_single_provider(provider_slug) { 47 disable_video_thumbnails_tests(); 48 $('#'+provider_slug+'-provider-test').addClass('test-working'); 49 $('#'+provider_slug+'-provider-test .retest-video-provider').val(video_thumbnails_settings_language.working); 50 var data = { 51 action: 'video_thumbnail_provider_test', 52 provider_slug: provider_slug 53 }; 54 $.ajax({ 55 type: "POST", 56 url: ajaxurl, 57 data: data, 58 success: function(response){ 59 $('#'+provider_slug+'-provider-test .test-results').html(response); 60 $('#'+provider_slug+'-provider-test .retest-video-provider').val(video_thumbnails_settings_language.retest); 61 $('#'+provider_slug+'-provider-test').removeClass('test-working'); 62 done_testing_single_provider(); 63 }, 64 error: function(XMLHttpRequest, textStatus, errorThrown) { 65 $('#'+provider_slug+'-provider-test .test-results').html('<p>' + video_thumbnails_settings_language.ajax_error + ' ' + XMLHttpRequest.status + ' ' + XMLHttpRequest.statusText + '</p>'); 66 $('#'+provider_slug+'-provider-test .retest-video-provider').val(video_thumbnails_settings_language.retest); 67 $('#'+provider_slug+'-provider-test').removeClass('test-working'); 68 done_testing_single_provider(); 69 } 70 }); 71 } 72 73 var provider_index = 0; 74 var testing_all_providers = false; 75 76 function done_testing_single_provider() { 77 // If we aren't testing providers, don't do anything 78 if (testing_all_providers==false) { 79 enable_video_thumbnails_tests(); 80 } 81 provider_index = provider_index + 1; 82 if (provider_index>=video_thumbnails_provider_slugs.provider_slugs.length) { 83 testing_all_providers = false; 84 enable_video_thumbnails_tests(); 85 return; 86 } else { 87 test_single_provider(video_thumbnails_provider_slugs.provider_slugs[provider_index]); 88 } 89 } 90 91 $('#test-all-video-thumbnail-providers').on('click',function(e) { 92 e.preventDefault(); 93 $('#provider-test-results').removeClass('hidden'); 94 $(this).parent().remove(); 95 testing_all_providers = true; 96 test_single_provider(video_thumbnails_provider_slugs.provider_slugs[provider_index]); 97 }); 98 99 $('.retest-video-provider').on('click',function(e) { 100 e.preventDefault(); 101 test_single_provider( $(this).data('provider-slug') ); 102 }); 103 104 /* Markup detection testing */ 105 $('#test-markup-detection').on('click',function(e) { 106 disable_video_thumbnails_tests(); 107 e.preventDefault(); 108 var data = { 109 action: 'video_thumbnail_markup_detection_test', 110 markup: $('#markup-input').val() 111 }; 112 document.getElementById( 'markup-test-result' ).innerHTML = '<p>' + video_thumbnails_settings_language.working + '</p>'; 113 $.ajax({ 114 type: "POST", 115 url: ajaxurl, 116 data: data, 117 success: function(response){ 118 document.getElementById( 'markup-test-result' ).innerHTML = response; 119 enable_video_thumbnails_tests(); 120 }, 121 error: function(XMLHttpRequest, textStatus, errorThrown) { 122 document.getElementById( 'markup-test-result' ).innerHTML = '<p>' + video_thumbnails_settings_language.ajax_error + ' ' + XMLHttpRequest.status + ' ' + XMLHttpRequest.statusText + '</p>'; 123 enable_video_thumbnails_tests(); 124 } 125 }); 126 }); 127 128 /* Media download testing */ 26 129 $('#test-video-thumbnail-saving-media').on('click',function(e) { 130 disable_video_thumbnails_tests(); 27 131 $('#media-test-result').html( '<p>' + video_thumbnails_settings_language.working + '</p>' ); 28 132 e.preventDefault(); … … 36 140 success: function(response){ 37 141 $('#media-test-result').html(response); 142 enable_video_thumbnails_tests(); 38 143 }, 39 144 error: function(XMLHttpRequest, textStatus, errorThrown) { 40 145 $('#media-test-result').html('<p>' + video_thumbnails_settings_language.ajax_error + ' ' + XMLHttpRequest.status + ' ' + XMLHttpRequest.statusText + '</p>'); 146 enable_video_thumbnails_tests(); 41 147 } 42 148 }); … … 44 150 45 151 $('#delete-video-thumbnail-test-images').on('click',function(e) { 152 disable_video_thumbnails_tests(); 46 153 $('#media-test-result').html( '<p>' + video_thumbnails_settings_language.working + '</p>' ); 47 154 e.preventDefault(); … … 55 162 success: function(response){ 56 163 $('#media-test-result').html(response); 164 enable_video_thumbnails_tests(); 57 165 }, 58 166 error: function(XMLHttpRequest, textStatus, errorThrown) { 59 167 $('#media-test-result').html('<p>' + video_thumbnails_settings_language.ajax_error + ' ' + XMLHttpRequest.status + ' ' + XMLHttpRequest.statusText + '</p>'); 168 enable_video_thumbnails_tests(); 60 169 } 61 170 }); … … 64 173 }); 65 174 66 // Test actions 67 function test_video_thumbnail( test_type ) { 68 var data = { 69 action: 'video_thumbnail_' + test_type + '_test' 70 }; 71 document.getElementById( test_type + '-test' ).innerHTML = video_thumbnails_settings_language.working; 72 jQuery.ajax({ 73 type: "POST", 74 url: ajaxurl, 75 data: data, 76 success: function(response){ 77 document.getElementById( test_type + '-test' ).innerHTML = response; 78 }, 79 error: function(XMLHttpRequest, textStatus, errorThrown) { 80 document.getElementById( test_type + '-test' ).innerHTML = '<p>' + video_thumbnails_settings_language.ajax_error + ' ' + XMLHttpRequest.status + ' ' + XMLHttpRequest.statusText + '</p>'; 81 } 82 }); 83 }; 84 85 function test_video_thumbnail_markup_detection() { 86 var data = { 87 action: 'video_thumbnail_markup_detection_test', 88 markup: jQuery('#markup-input').val() 89 }; 90 document.getElementById( 'markup-test-result' ).innerHTML = '<p>' + video_thumbnails_settings_language.working + '</p>'; 91 jQuery.ajax({ 92 type: "POST", 93 url: ajaxurl, 94 data: data, 95 success: function(response){ 96 document.getElementById( 'markup-test-result' ).innerHTML = response; 97 }, 98 error: function(XMLHttpRequest, textStatus, errorThrown) { 99 document.getElementById( 'markup-test-result' ).innerHTML = '<p>' + video_thumbnails_settings_language.ajax_error + ' ' + XMLHttpRequest.status + ' ' + XMLHttpRequest.statusText + '</p>'; 100 } 101 }); 102 } 103 104 // Clear all video thumbnails 175 /** 176 * Clear all video thumbnails 177 */ 105 178 function clear_all_video_thumbnails( nonce ) { 106 179 var confimation_result = confirm(video_thumbnails_settings_language.clear_all_confirmation); -
video-thumbnails/trunk/php/class-video-thumbnails-settings.php
r922717 r950682 47 47 add_action( 'wp_ajax_video_thumbnail_delete_test_images', array( &$this, 'delete_test_images_callback' ) ); // Delete test images 48 48 add_action( 'wp_ajax_video_thumbnail_markup_detection_test', array( &$this, 'markup_detection_test_callback' ) ); // Markup input test 49 // Settings page actions 50 if ( isset ( $_GET['page'] ) && ( $_GET['page'] == 'video_thumbnails' ) ) { 51 // Admin scripts 52 add_action( 'admin_enqueue_scripts', array( &$this, 'admin_scripts' ) ); 53 } 49 // Admin scripts 50 add_action( 'admin_enqueue_scripts', array( &$this, 'admin_scripts' ) ); 54 51 // Add "Go Pro" call to action to settings footer 55 52 add_action( 'video_thumbnails/settings_footer', array( 'Video_Thumbnails_Settings', 'settings_footer' ) ); … … 136 133 } 137 134 138 function admin_scripts() { 139 wp_enqueue_script( 'video_thumbnails_settings', plugins_url( 'js/settings.js' , VIDEO_THUMBNAILS_PATH . '/video-thumbnails.php' ), array( 'jquery' ), VIDEO_THUMBNAILS_VERSION ); 140 wp_localize_script( 'video_thumbnails_settings', 'video_thumbnails_settings_language', array( 141 'detection_failed' => __( 'We were unable to find a video in the custom fields of your most recently updated post.', 'video-thumbnails' ), 142 'working' => __( 'Working...', 'video-thumbnails' ), 143 'ajax_error' => __( 'AJAX Error:', 'video-thumbnails' ), 144 'clear_all_confirmation' => __( 'Are you sure you want to clear all video thumbnails? This cannot be undone.', 'video-thumbnails' ), 145 ) ); 135 function admin_scripts( $hook ) { 136 if ( 'settings_page_video_thumbnails' == $hook ) { 137 wp_enqueue_style( 'video-thumbnails-settings-css', plugins_url( '/css/settings.css', VIDEO_THUMBNAILS_PATH . '/video-thumbnails.php' ), false, VIDEO_THUMBNAILS_VERSION ); 138 wp_enqueue_script( 'video_thumbnails_settings', plugins_url( 'js/settings.js' , VIDEO_THUMBNAILS_PATH . '/video-thumbnails.php' ), array( 'jquery' ), VIDEO_THUMBNAILS_VERSION ); 139 wp_localize_script( 'video_thumbnails_settings', 'video_thumbnails_settings_language', array( 140 'detection_failed' => __( 'We were unable to find a video in the custom fields of your most recently updated post.', 'video-thumbnails' ), 141 'working' => __( 'Working...', 'video-thumbnails' ), 142 'retest' => __( 'Retest', 'video-thumbnails' ), 143 'ajax_error' => __( 'AJAX Error:', 'video-thumbnails' ), 144 'clear_all_confirmation' => __( 'Are you sure you want to clear all video thumbnails? This cannot be undone.', 'video-thumbnails' ), 145 ) ); 146 global $video_thumbnails; 147 $provider_slugs = array(); 148 foreach ( $video_thumbnails->providers as $provider ) { 149 $provider_slugs[] = $provider->service_slug; 150 } 151 wp_localize_script( 'video_thumbnails_settings', 'video_thumbnails_provider_slugs', array( 152 'provider_slugs' => $provider_slugs 153 ) ); 154 } 146 155 } 147 156 … … 223 232 </thead> 224 233 <tbody> 225 <?php 226 $passed = 0; 227 $failed = 0; 228 foreach ( $video_thumbnails->providers as $provider ) { 234 <?php 235 $provider = $video_thumbnails->providers[$_POST['provider_slug']]; 229 236 foreach ( $provider->get_test_cases() as $test_case ) { 230 237 echo '<tr>'; 231 echo '<td><strong>' . $ provider->service_name . '</strong> - ' . $test_case['name'] . '</td>';238 echo '<td><strong>' . $test_case['name'] . '</strong></td>'; 232 239 $markup = apply_filters( 'the_content', $test_case['markup'] ); 233 240 $result = $video_thumbnails->get_first_thumbnail_url( $markup ); … … 252 259 if ( $matched ) { 253 260 echo '<td style="color:green;">✔ ' . __( 'Passed', 'video-thumbnails' ) . '</td>'; 254 $passed++;255 261 } else { 256 262 echo '<td style="color:red;">✗ ' . __( 'Failed', 'video-thumbnails' ) . '</td>'; 257 $failed++;258 263 } 259 264 echo '<td>'; … … 267 272 } 268 273 echo '</tr>'; 269 } 270 } ?> 274 } ?> 271 275 <tbody> 272 <tfoot>273 <tr>274 <th></th>275 <th><span style="color:green;">✔ <?php echo $passed; ?></span> / <span style="color:red;">✗ <?php echo $failed; ?></span></th>276 <th></th>277 </tr>278 </tfoot>279 276 </table> 280 277 <?php die(); … … 497 494 } 498 495 496 global $video_thumbnails; 497 499 498 ?><div class="wrap"> 500 499 … … 569 568 <p><?php _e( 'Use these tests to help diagnose any problems. Please include results when requesting support.', 'video-thumbnails' ); ?></p> 570 569 571 <h3><?php _e( 'Test Video Providers', 'video-thumbnails' ); ?></h3> 572 573 <p><?php _e( 'This test automatically searches a sample for every type of video supported and compares it to the expected value. Sometimes tests may fail due to API rate limits.', 'video-thumbnails' ); ?></p> 574 575 <div id="provider-test"> 576 <p><input type="submit" class="button-primary" onclick="test_video_thumbnail('provider');" value="<?php esc_attr_e( 'Test Video Providers', 'video-thumbnails' ); ?>" /></p> 570 <div class="video-thumbnails-test closed"> 571 572 <a href="#" class="toggle-video-thumbnails-test-content show-hide-test-link"><span class="show"><?php _e( 'Show', 'video-thumbnails' ); ?></span> <span class="hide"><?php _e( 'Hide', 'video-thumbnails' ); ?></span></a> 573 574 <a href="#" class="toggle-video-thumbnails-test-content title-test-link"><h3 class="test-title"><?php _e( 'Test Video Providers', 'video-thumbnails' ); ?></h3></a> 575 576 <div class="video-thumbnails-test-content"> 577 578 <p><?php _e( 'This test automatically searches a sample for every type of video supported and compares it to the expected value. Sometimes tests may fail due to API rate limits.', 'video-thumbnails' ); ?></p> 579 580 <p><input type="submit" class="button-primary video-thumbnails-test-button" id="test-all-video-thumbnail-providers" value="<?php esc_attr_e( 'Test Video Providers', 'video-thumbnails' ); ?>" /></p> 581 582 <div id="provider-test-results" class="hidden"> 583 <?php 584 foreach ( $video_thumbnails->providers as $provider ) { 585 echo '<div id="' . $provider->service_slug . '-provider-test" class="single-provider-test-results">'; 586 echo '<h3>' . $provider->service_name . ' <input type="submit" data-provider-slug="' . $provider->service_slug . '" class="button-primary retest-video-provider video-thumbnails-test-button" value="' . esc_attr__( 'Waiting...', 'video-thumbnails' ) . '" /></h3>'; 587 echo '<div class="test-results"></div>'; 588 echo '</div>'; 589 } 590 ?> 591 </div> 592 593 </div><!-- /.video-thumbnails-test-content --> 594 577 595 </div> 578 579 <h3><?php _e( 'Test Markup for Video', 'video-thumbnails' ); ?></h3> 580 581 <p><?php _e( 'Copy and paste an embed code below to see if a video is detected.', 'video-thumbnails' ); ?></p> 582 583 <textarea id="markup-input" cols="50" rows="5"></textarea> 584 585 <p><input type="submit" class="button-primary" onclick="test_video_thumbnail_markup_detection();" value="<?php esc_attr_e( 'Scan For Thumbnail', 'video-thumbnails' ); ?>" /></p> 586 587 <div id="markup-test-result"></div> 588 589 <h3><?php _e( 'Test Saving to Media Library', 'video-thumbnails' ); ?></h3> 590 591 <p><?php _e( 'This test checks for issues with the process of saving a remote thumbnail to your local media library.', 'video-thumbnails' ); ?></p> 592 593 <p><?php _e( 'Also be sure to test that you can manually upload an image to your site. If you\'re unable to upload images, you may need to <a href="http://codex.wordpress.org/Changing_File_Permissions">change file permissions</a>.', 'video-thumbnails' ); ?></p> 594 595 <p> 596 <input type="submit" id="test-video-thumbnail-saving-media" class="button-primary" value="<?php esc_attr_e( 'Download Test Image', 'video-thumbnails' ); ?>" /> 597 <input type="submit" id="delete-video-thumbnail-test-images" class="button" value="<?php esc_attr_e( 'Delete Test Images', 'video-thumbnails' ); ?>" /> 598 </p> 599 600 <div id="media-test-result"></div> 601 602 <h3><?php _e( 'Installation Information', 'video-thumbnails' ); ?></h3> 603 <table class="widefat"> 604 <thead> 605 <tr> 606 <th></th> 607 <th></th> 608 <th></th> 609 </tr> 610 </thead> 611 <tbody> 612 <tr> 613 <td><strong><?php _e( 'WordPress Version', 'video-thumbnails' ); ?></strong></td> 614 <td><?php echo get_bloginfo( 'version' ); ?></td> 615 <td></td> 616 </tr> 617 <tr> 618 <td><strong><?php _e( 'Video Thumbnails Version', 'video-thumbnails' ); ?></strong></td> 619 <td><?php echo VIDEO_THUMBNAILS_VERSION; ?></td> 620 <td></td> 621 </tr> 622 <tr> 623 <td><strong><?php _e( 'Video Thumbnails Settings Version', 'video-thumbnails' ); ?></strong></td> 624 <td><?php echo $this->options['version']; ?></td> 625 <td></td> 626 </tr> 627 <tr> 628 <td><strong><?php _e( 'PHP Version', 'video-thumbnails' ); ?></strong></td> 629 <td><?php echo PHP_VERSION; ?></td> 630 <td></td> 631 </tr> 632 <tr> 633 <td><strong><?php _e( 'Post Thumbnails', 'video-thumbnails' ); ?></strong></td> 634 <td><?php if ( current_theme_supports( 'post-thumbnails' ) ) : ?><span style="color:green">✔</span> <?php _e( 'Your theme supports post thumbnails.', 'video-thumbnails' ); ?><?php else: ?><span style="color:red">✖</span> <?php _e( 'Your theme does not support post thumbnails, you\'ll need to make modifications or switch to a different theme. <a href="http://codex.wordpress.org/Post_Thumbnails">More info</a>', 'video-thumbnails' ); ?><?php endif; ?></td> 635 <td></td> 636 </tr> 637 <tr> 638 <td><strong><?php _e( 'Video Providers', 'video-thumbnails' ); ?></strong></td> 639 <td> 640 <?php global $video_thumbnails; ?> 641 <?php $provider_names = array(); foreach ( $video_thumbnails->providers as $provider ) { $provider_names[] = $provider->service_name; }; ?> 642 <strong><?php echo count( $video_thumbnails->providers ); ?></strong>: <?php echo implode( ', ', $provider_names ); ?> 643 </td> 644 <td></td> 645 </tr> 646 </tbody> 647 <tfoot> 648 <tr> 649 <th></th> 650 <th></th> 651 <th></th> 652 </tr> 653 </tfoot> 654 </table> 596 <div class="video-thumbnails-test closed"> 597 598 <a href="#" class="toggle-video-thumbnails-test-content show-hide-test-link"><span class="show"><?php _e( 'Show', 'video-thumbnails' ); ?></span> <span class="hide"><?php _e( 'Hide', 'video-thumbnails' ); ?></span></a> 599 600 <a href="#" class="toggle-video-thumbnails-test-content title-test-link"><h3 class="test-title"><?php _e( 'Test Markup for Video', 'video-thumbnails' ); ?></h3></a> 601 602 <div class="video-thumbnails-test-content"> 603 604 <p><?php _e( 'Copy and paste an embed code below to see if a video is detected.', 'video-thumbnails' ); ?></p> 605 606 <textarea id="markup-input" cols="50" rows="5"></textarea> 607 608 <p><input type="submit" id="test-markup-detection" class="button-primary video-thumbnails-test-button" value="<?php esc_attr_e( 'Scan For Thumbnail', 'video-thumbnails' ); ?>" /></p> 609 610 <div id="markup-test-result"></div> 611 612 </div><!-- /.video-thumbnails-test-content --> 613 614 </div> 615 <div class="video-thumbnails-test closed"> 616 617 <a href="#" class="toggle-video-thumbnails-test-content show-hide-test-link"><span class="show"><?php _e( 'Show', 'video-thumbnails' ); ?></span> <span class="hide"><?php _e( 'Hide', 'video-thumbnails' ); ?></span></a> 618 619 <a href="#" class="toggle-video-thumbnails-test-content title-test-link"><h3 class="test-title"><?php _e( 'Test Saving to Media Library', 'video-thumbnails' ); ?></h3></a> 620 621 <div class="video-thumbnails-test-content"> 622 623 <p><?php _e( 'This test checks for issues with the process of saving a remote thumbnail to your local media library.', 'video-thumbnails' ); ?></p> 624 625 <p><?php _e( 'Also be sure to test that you can manually upload an image to your site. If you\'re unable to upload images, you may need to <a href="http://codex.wordpress.org/Changing_File_Permissions">change file permissions</a>.', 'video-thumbnails' ); ?></p> 626 627 <p> 628 <input type="submit" id="test-video-thumbnail-saving-media" class="button-primary video-thumbnails-test-button" value="<?php esc_attr_e( 'Download Test Image', 'video-thumbnails' ); ?>" /> 629 <input type="submit" id="delete-video-thumbnail-test-images" class="button video-thumbnails-test-button" value="<?php esc_attr_e( 'Delete Test Images', 'video-thumbnails' ); ?>" /> 630 </p> 631 632 <div id="media-test-result"></div> 633 634 </div><!-- /.video-thumbnails-test-content --> 635 636 </div> 637 <div class="video-thumbnails-test closed"> 638 639 <a href="#" class="toggle-video-thumbnails-test-content show-hide-test-link"><span class="show"><?php _e( 'Show', 'video-thumbnails' ); ?></span> <span class="hide"><?php _e( 'Hide', 'video-thumbnails' ); ?></span></a> 640 641 <a href="#" class="toggle-video-thumbnails-test-content title-test-link"><h3 class="test-title"><?php _e( 'Installation Information', 'video-thumbnails' ); ?></h3></a> 642 643 <div class="video-thumbnails-test-content"> 644 645 <table class="widefat"> 646 <thead> 647 <tr> 648 <th></th> 649 <th></th> 650 <th></th> 651 </tr> 652 </thead> 653 <tbody> 654 <tr> 655 <td><strong><?php _e( 'WordPress Version', 'video-thumbnails' ); ?></strong></td> 656 <td><?php echo get_bloginfo( 'version' ); ?></td> 657 <td></td> 658 </tr> 659 <tr> 660 <td><strong><?php _e( 'Video Thumbnails Version', 'video-thumbnails' ); ?></strong></td> 661 <td><?php echo VIDEO_THUMBNAILS_VERSION; ?></td> 662 <td></td> 663 </tr> 664 <tr> 665 <td><strong><?php _e( 'Video Thumbnails Settings Version', 'video-thumbnails' ); ?></strong></td> 666 <td><?php echo $this->options['version']; ?></td> 667 <td></td> 668 </tr> 669 <tr> 670 <td><strong><?php _e( 'PHP Version', 'video-thumbnails' ); ?></strong></td> 671 <td><?php echo PHP_VERSION; ?></td> 672 <td></td> 673 </tr> 674 <tr> 675 <td><strong><?php _e( 'Post Thumbnails', 'video-thumbnails' ); ?></strong></td> 676 <td><?php if ( current_theme_supports( 'post-thumbnails' ) ) : ?><span style="color:green">✔</span> <?php _e( 'Your theme supports post thumbnails.', 'video-thumbnails' ); ?><?php else: ?><span style="color:red">✖</span> <?php _e( 'Your theme does not support post thumbnails, you\'ll need to make modifications or switch to a different theme. <a href="http://codex.wordpress.org/Post_Thumbnails">More info</a>', 'video-thumbnails' ); ?><?php endif; ?></td> 677 <td></td> 678 </tr> 679 <tr> 680 <td><strong><?php _e( 'Video Providers', 'video-thumbnails' ); ?></strong></td> 681 <td> 682 <?php global $video_thumbnails; ?> 683 <?php $provider_names = array(); foreach ( $video_thumbnails->providers as $provider ) { $provider_names[] = $provider->service_name; }; ?> 684 <strong><?php echo count( $video_thumbnails->providers ); ?></strong>: <?php echo implode( ', ', $provider_names ); ?> 685 </td> 686 <td></td> 687 </tr> 688 </tbody> 689 <tfoot> 690 <tr> 691 <th></th> 692 <th></th> 693 <th></th> 694 </tr> 695 </tfoot> 696 </table> 697 698 </div><!-- /.video-thumbnails-test-content --> 699 700 </div> 655 701 656 702 <?php -
video-thumbnails/trunk/readme.txt
r931306 r950682 5 5 Requires at least: 3.2 6 6 Tested up to: 3.9 7 Stable tag: 2. 9.17 Stable tag: 2.10 8 8 9 9 Video Thumbnails simplifies the process of automatically displaying video thumbnails in your WordPress template. … … 132 132 133 133 == Changelog == 134 135 = 2.10 = 136 * Improved debugging page 134 137 135 138 = 2.9.1 = -
video-thumbnails/trunk/video-thumbnails.php
r931306 r950682 6 6 Author: Sutherland Boswell 7 7 Author URI: http://sutherlandboswell.com 8 Version: 2. 9.18 Version: 2.10 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. 9.1' );33 define( 'VIDEO_THUMBNAILS_VERSION', '2.10' ); 34 34 35 35 // Providers
Note: See TracChangeset
for help on using the changeset viewer.