diff --git a/wp-admin/js/set-post-thumbnail.js b/wp-admin/js/set-post-thumbnail.js index fb17351a25..68abbcc830 100644 --- a/wp-admin/js/set-post-thumbnail.js +++ b/wp-admin/js/set-post-thumbnail.js @@ -9,8 +9,7 @@ function WPSetAsThumbnail( id, nonce ) { action: 'set-post-thumbnail', post_id: post_id, thumbnail_id: id, _ajax_nonce: nonce, cookie: encodeURIComponent( document.cookie ) }, function(str){ var win = window.dialogArguments || opener || parent || top; - setThumbnail = 'setThumbnail_' + post_type; - $link.text( setPostThumbnailL10n[ setThumbnail ] ); + $link.text( setPostThumbnailL10n.setThumbnail ); if ( str == '0' ) { alert( setPostThumbnailL10n.error ); } else { diff --git a/wp-admin/js/set-post-thumbnail.min.js b/wp-admin/js/set-post-thumbnail.min.js index a0cb8737a5..dcea06a69e 100644 --- a/wp-admin/js/set-post-thumbnail.min.js +++ b/wp-admin/js/set-post-thumbnail.min.js @@ -1 +1 @@ -function WPSetAsThumbnail(a,b){var c=jQuery("a#wp-post-thumbnail-"+a);c.text(setPostThumbnailL10n.saving),jQuery.post(ajaxurl,{action:"set-post-thumbnail",post_id:post_id,thumbnail_id:a,_ajax_nonce:b,cookie:encodeURIComponent(document.cookie)},function(b){var d=window.dialogArguments||opener||parent||top;setThumbnail="setThumbnail_"+post_type,c.text(setPostThumbnailL10n[setThumbnail]),"0"==b?alert(setPostThumbnailL10n.error):(jQuery("a.wp-post-thumbnail").show(),c.text(setPostThumbnailL10n.done),c.fadeOut(2e3),d.WPSetThumbnailID(a),d.WPSetThumbnailHTML(b))})} \ No newline at end of file +function WPSetAsThumbnail(a,b){var c=jQuery("a#wp-post-thumbnail-"+a);c.text(setPostThumbnailL10n.saving),jQuery.post(ajaxurl,{action:"set-post-thumbnail",post_id:post_id,thumbnail_id:a,_ajax_nonce:b,cookie:encodeURIComponent(document.cookie)},function(b){var d=window.dialogArguments||opener||parent||top;c.text(setPostThumbnailL10n.setThumbnail),"0"==b?alert(setPostThumbnailL10n.error):(jQuery("a.wp-post-thumbnail").show(),c.text(setPostThumbnailL10n.done),c.fadeOut(2e3),d.WPSetThumbnailID(a),d.WPSetThumbnailHTML(b))})} \ No newline at end of file diff --git a/wp-includes/script-loader.php b/wp-includes/script-loader.php index 991e78e13e..6cd361b5d3 100644 --- a/wp-includes/script-loader.php +++ b/wp-includes/script-loader.php @@ -570,20 +570,13 @@ function wp_default_scripts( &$scripts ) { 'error' => __( 'Could not load the preview image. Please reload the page and try again.' ) )); - $setPostThumbnailL10n = array( - 'setThumbnail' => __( 'Use as featured image' ), // Back compat + $scripts->add( 'set-post-thumbnail', "/wp-admin/js/set-post-thumbnail$suffix.js", array( 'jquery' ), false, 1 ); + did_action( 'init' ) && $scripts->localize( 'set-post-thumbnail', 'setPostThumbnailL10n', array( + 'setThumbnail' => __( 'Use as featured image' ), 'saving' => __( 'Saving...' ), 'error' => __( 'Could not set that as the thumbnail image. Try a different attachment.' ), 'done' => __( 'Done' ) - ); - - foreach ( get_post_types( null, 'objects' ) as $post_type_object ) { - if ( isset( $post_type_object->labels->use_featured_image ) ) { - $setPostThumbnailL10n[ "setThumbnail_{$post_type_object->name}" ] = $post_type_object->labels->use_featured_image; - } - } - $scripts->add( 'set-post-thumbnail', "/wp-admin/js/set-post-thumbnail$suffix.js", array( 'jquery' ), false, 1 ); - did_action( 'init' ) && $scripts->localize( 'set-post-thumbnail', 'setPostThumbnailL10n', $setPostThumbnailL10n ); + ) ); // Navigation Menus $scripts->add( 'nav-menu', "/wp-admin/js/nav-menu$suffix.js", array( 'jquery-ui-sortable', 'jquery-ui-draggable', 'jquery-ui-droppable', 'wp-lists', 'postbox' ) ); diff --git a/wp-includes/version.php b/wp-includes/version.php index 7ba573ea60..d64a27b995 100644 --- a/wp-includes/version.php +++ b/wp-includes/version.php @@ -4,7 +4,7 @@ * * @global string $wp_version */ -$wp_version = '4.3-alpha-32675'; +$wp_version = '4.3-alpha-32676'; /** * Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.