Media Modal: move the translation strings for `insertIntoPost` and `uploadedToThisPost` to the `get_post_type_labels()` array as `insert_into_item` and `uploaded_to_this_item`.
Props flixos90. Fixes #33616. Built from https://develop.svn.wordpress.org/trunk@34472 git-svn-id: http://core.svn.wordpress.org/trunk@34436 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
parent
0c1f92e301
commit
8cc5a142e4
|
@ -3066,8 +3066,6 @@ function wp_enqueue_media( $args = array() ) {
|
|||
}
|
||||
}
|
||||
|
||||
$hier = $post && is_post_type_hierarchical( $post->post_type );
|
||||
|
||||
if ( $post ) {
|
||||
$post_type_object = get_post_type_object( $post->post_type );
|
||||
} else {
|
||||
|
@ -3106,10 +3104,10 @@ function wp_enqueue_media( $args = array() ) {
|
|||
'allMediaItems' => __( 'All media items' ),
|
||||
'allDates' => __( 'All dates' ),
|
||||
'noItemsFound' => __( 'No items found.' ),
|
||||
'insertIntoPost' => $hier ? __( 'Insert into page' ) : __( 'Insert into post' ),
|
||||
'insertIntoPost' => $post_type_object->labels->insert_into_item,
|
||||
'unattached' => __( 'Unattached' ),
|
||||
'trash' => _x( 'Trash', 'noun' ),
|
||||
'uploadedToThisPost' => $hier ? __( 'Uploaded to this page' ) : __( 'Uploaded to this post' ),
|
||||
'uploadedToThisPost' => $post_type_object->labels->uploaded_to_this_item,
|
||||
'warnDelete' => __( "You are about to permanently delete this item.\n 'Cancel' to stop, 'OK' to delete." ),
|
||||
'warnBulkDelete' => __( "You are about to permanently delete these items.\n 'Cancel' to stop, 'OK' to delete." ),
|
||||
'warnBulkTrash' => __( "You are about to trash these items.\n 'Cancel' to stop, 'OK' to delete." ),
|
||||
|
|
|
@ -1314,6 +1314,8 @@ function _post_type_meta_capabilities( $capabilities = null ) {
|
|||
* - parent_item_colon - This string isn't used on non-hierarchical types. In hierarchical
|
||||
* ones the default is 'Parent Page:'.
|
||||
* - all_items - String for the submenu. Default is All Posts/All Pages.
|
||||
* - insert_into_item - String for the media frame button. Default is Insert into post/Insert into page.
|
||||
* - uploaded_to_this_item - String for the media frame filter. Default is Uploaded to this post/Uploaded to this page.
|
||||
* - featured_image - Default is Featured Image.
|
||||
* - set_featured_image - Default is Set featured image.
|
||||
* - remove_featured_image - Default is Remove featured image.
|
||||
|
@ -1326,6 +1328,8 @@ function _post_type_meta_capabilities( $capabilities = null ) {
|
|||
* @since 3.0.0
|
||||
* @since 4.3.0 Added the `featured_image`, `set_featured_image`, `remove_featured_image`,
|
||||
* and `use_featured_image` labels.
|
||||
* @since 4.4.0 Added the `insert_into_item` and `uploaded_to_this_item` labels.
|
||||
*
|
||||
* @access private
|
||||
*
|
||||
* @param object $post_type_object Post type object.
|
||||
|
@ -1345,6 +1349,8 @@ function get_post_type_labels( $post_type_object ) {
|
|||
'not_found_in_trash' => array( __('No posts found in Trash.'), __('No pages found in Trash.') ),
|
||||
'parent_item_colon' => array( null, __('Parent Page:') ),
|
||||
'all_items' => array( __( 'All Posts' ), __( 'All Pages' ) ),
|
||||
'insert_into_item' => array( __( 'Insert into post' ), __( 'Insert into page' ) ),
|
||||
'uploaded_to_this_item' => array( __( 'Uploaded to this post' ), __( 'Uploaded to this page' ) ),
|
||||
'featured_image' => array( __( 'Featured Image' ), __( 'Featured Image' ) ),
|
||||
'set_featured_image' => array( __( 'Set featured image' ), __( 'Set featured image' ) ),
|
||||
'remove_featured_image' => array( __( 'Remove featured image' ), __( 'Remove featured image' ) ),
|
||||
|
|
|
@ -4,7 +4,7 @@
|
|||
*
|
||||
* @global string $wp_version
|
||||
*/
|
||||
$wp_version = '4.4-alpha-34471';
|
||||
$wp_version = '4.4-alpha-34472';
|
||||
|
||||
/**
|
||||
* Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.
|
||||
|
|
Loading…
Reference in New Issue