WordPress.org

Make WordPress Core

Changeset 34472


Ignore:
Timestamp:
09/24/2015 03:21:11 AM (6 years ago)
Author:
wonderboymusic
Message:

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.

Location:
trunk/src/wp-includes
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/wp-includes/media.php

    r34470 r34472  
    30673067    }
    30683068
    3069     $hier = $post && is_post_type_hierarchical( $post->post_type );
    3070 
    30713069    if ( $post ) {
    30723070        $post_type_object = get_post_type_object( $post->post_type );
     
    31073105        'allDates'               => __( 'All dates' ),
    31083106        'noItemsFound'           => __( 'No items found.' ),
    3109         'insertIntoPost'         => $hier ? __( 'Insert into page' ) : __( 'Insert into post' ),
     3107        'insertIntoPost'         => $post_type_object->labels->insert_into_item,
    31103108        'unattached'             => __( 'Unattached' ),
    31113109        'trash'                  => _x( 'Trash', 'noun' ),
    3112         'uploadedToThisPost'     => $hier ? __( 'Uploaded to this page' ) : __( 'Uploaded to this post' ),
     3110        'uploadedToThisPost'     => $post_type_object->labels->uploaded_to_this_item,
    31133111        'warnDelete'             => __( "You are about to permanently delete this item.\n  'Cancel' to stop, 'OK' to delete." ),
    31143112        'warnBulkDelete'         => __( "You are about to permanently delete these items.\n  'Cancel' to stop, 'OK' to delete." ),
  • trunk/src/wp-includes/post-functions.php

    r34451 r34472  
    13151315 *                       ones the default is 'Parent Page:'.
    13161316 * - all_items - String for the submenu. Default is All Posts/All Pages.
     1317 * - insert_into_item - String for the media frame button. Default is Insert into post/Insert into page.
     1318 * - uploaded_to_this_item - String for the media frame filter. Default is Uploaded to this post/Uploaded to this page.
    13171319 * - featured_image - Default is Featured Image.
    13181320 * - set_featured_image - Default is Set featured image.
     
    13271329 * @since 4.3.0 Added the `featured_image`, `set_featured_image`, `remove_featured_image`,
    13281330 *              and `use_featured_image` labels.
     1331 * @since 4.4.0 Added the `insert_into_item` and `uploaded_to_this_item` labels.
     1332 *
    13291333 * @access private
    13301334 *
     
    13461350        'parent_item_colon' => array( null, __('Parent Page:') ),
    13471351        'all_items' => array( __( 'All Posts' ), __( 'All Pages' ) ),
     1352        'insert_into_item' => array( __( 'Insert into post' ), __( 'Insert into page' ) ),
     1353        'uploaded_to_this_item' => array( __( 'Uploaded to this post' ), __( 'Uploaded to this page' ) ),
    13481354        'featured_image' => array( __( 'Featured Image' ), __( 'Featured Image' ) ),
    13491355        'set_featured_image' => array( __( 'Set featured image' ), __( 'Set featured image' ) ),
Note: See TracChangeset for help on using the changeset viewer.