Make WordPress Core

Changeset 40835


Ignore:
Timestamp:
05/25/2017 02:58:21 AM (9 years ago)
Author:
westonruter
Message:

Widgets: Supply missing descriptions for instance schema fields in media widgets.

Reuse translated strings from media templates.

Amends [40640].
See #32417.

Location:
trunk/src/wp-includes/widgets
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/wp-includes/widgets/class-wp-widget-media-audio.php

    r40812 r40835  
    6565                                        'enum' => array( 'none', 'auto', 'metadata' ),
    6666                                        'default' => 'none',
     67                                        'description' => __( 'Preload' ),
    6768                                ),
    6869                                'loop' => array(
    6970                                        'type' => 'boolean',
    7071                                        'default' => false,
     72                                        'description' => __( 'Loop' ),
    7173                                ),
    7274                        )
  • trunk/src/wp-includes/widgets/class-wp-widget-media-image.php

    r40812 r40835  
    6464                                        'enum' => array_merge( get_intermediate_image_sizes(), array( 'full', 'custom' ) ),
    6565                                        'default' => 'medium',
     66                                        'description' => __( 'Size' ),
    6667                                ),
    6768                                'width' => array( // Via 'customWidth', only when size=custom; otherwise via 'width'.
     
    6970                                        'minimum' => 0,
    7071                                        'default' => 0,
     72                                        'description' => __( 'Width' ),
    7173                                ),
    7274                                'height' => array( // Via 'customHeight', only when size=custom; otherwise via 'height'.
     
    7476                                        'minimum' => 0,
    7577                                        'default' => 0,
     78                                        'description' => __( 'Height' ),
    7679                                ),
    7780
     
    8083                                        'default' => '',
    8184                                        'sanitize_callback' => 'wp_kses_post',
     85                                        'description' => __( 'Caption' ),
    8286                                        'should_preview_update' => false,
    8387                                ),
     
    8690                                        'default' => '',
    8791                                        'sanitize_callback' => 'sanitize_text_field',
     92                                        'description' => __( 'Alternative Text' ),
    8893                                ),
    8994                                'link_type' => array(
     
    9297                                        'default' => 'none',
    9398                                        'media_prop' => 'link',
     99                                        'description' => __( 'Link To' ),
    94100                                        'should_preview_update' => false,
    95101                                ),
     
    99105                                        'format' => 'uri',
    100106                                        'media_prop' => 'linkUrl',
     107                                        'description' => __( 'URL' ),
    101108                                        'should_preview_update' => false,
    102109                                ),
     
    106113                                        'sanitize_callback' => array( $this, 'sanitize_token_list' ),
    107114                                        'media_prop' => 'extraClasses',
     115                                        'description' => __( 'Image CSS Class' ),
    108116                                        'should_preview_update' => false,
    109117                                ),
     
    114122                                        'media_prop' => 'linkClassName',
    115123                                        'should_preview_update' => false,
     124                                        'description' => __( 'Link CSS Class' ),
    116125                                ),
    117126                                'link_rel' => array(
     
    120129                                        'sanitize_callback' => array( $this, 'sanitize_token_list' ),
    121130                                        'media_prop' => 'linkRel',
    122                                         'should_preview_update' => false,
    123                                 ),
    124                                 'link_target_blank' => array( // Via 'linkTargetBlank' property.
     131                                        'description' => __( 'Link Rel' ),
     132                                        'should_preview_update' => false,
     133                                ),
     134                                'link_target_blank' => array(
    125135                                        'type' => 'boolean',
    126136                                        'default' => false,
    127137                                        'media_prop' => 'linkTargetBlank',
     138                                        'description' => __( 'Open link in a new tab' ),
    128139                                        'should_preview_update' => false,
    129140                                ),
     
    133144                                        'sanitize_callback' => 'sanitize_text_field',
    134145                                        'media_prop' => 'title',
     146                                        'description' => __( 'Image Title Attribute' ),
    135147                                        'should_preview_update' => false,
    136148                                ),
  • trunk/src/wp-includes/widgets/class-wp-widget-media-video.php

    r40812 r40835  
    6666                                        'enum' => array( 'none', 'auto', 'metadata' ),
    6767                                        'default' => 'metadata',
     68                                        'description' => __( 'Preload' ),
    6869                                        'should_preview_update' => false,
    6970                                ),
     
    7172                                        'type' => 'boolean',
    7273                                        'default' => false,
     74                                        'description' => __( 'Loop' ),
    7375                                        'should_preview_update' => false,
    7476                                ),
Note: See TracChangeset for help on using the changeset viewer.