Make WordPress Core

Ticket #39909: 39909.6.diff

File 39909.6.diff, 9.4 KB (added by westonruter, 8 years ago)

https://github.com/xwp/wordpress-develop/pull/218

  • src/wp-includes/widgets.php

    diff --git src/wp-includes/widgets.php src/wp-includes/widgets.php
    index 1abadfb186..0bbcba9f00 100644
    function wp_widget_rss_form( $args, $inputs = null ) { 
    13521352        <input class="widefat" id="rss-url-<?php echo $esc_number; ?>" name="widget-rss[<?php echo $esc_number; ?>][url]" type="text" value="<?php echo esc_url( $args['url'] ); ?>" /></p>
    13531353<?php endif; if ( $inputs['title'] ) : ?>
    13541354        <p><label for="rss-title-<?php echo $esc_number; ?>"><?php _e( 'Give the feed a title (optional):' ); ?></label>
    1355         <input class="widefat" id="rss-title-<?php echo $esc_number; ?>" name="widget-rss[<?php echo $esc_number; ?>][title]" type="text" value="<?php echo esc_attr( $args['title'] ); ?>" /></p>
     1355        <input class="widefat" id="rss-title-<?php echo $esc_number; ?>" name="widget-rss[<?php echo $esc_number; ?>][title]" type="text" value="<?php echo esc_attr( $args['title'] ); ?>" placeholder="<?php esc_attr_e( '(Title from feed)' ) ?>" /></p>
    13561356<?php endif; if ( $inputs['items'] ) : ?>
    13571357        <p><label for="rss-items-<?php echo $esc_number; ?>"><?php _e( 'How many items would you like to display?' ); ?></label>
    13581358        <select id="rss-items-<?php echo $esc_number; ?>" name="widget-rss[<?php echo $esc_number; ?>][items]">
  • src/wp-includes/widgets/class-wp-widget-archives.php

    diff --git src/wp-includes/widgets/class-wp-widget-archives.php src/wp-includes/widgets/class-wp-widget-archives.php
    index f36b47ee8e..61ed68e0ce 100644
    class WP_Widget_Archives extends WP_Widget { 
    154154                $instance = wp_parse_args( (array) $instance, array( 'title' => '', 'count' => 0, 'dropdown' => '') );
    155155                $title = sanitize_text_field( $instance['title'] );
    156156                ?>
    157                 <p><label for="<?php echo $this->get_field_id('title'); ?>"><?php _e('Title:'); ?></label> <input class="widefat" id="<?php echo $this->get_field_id('title'); ?>" name="<?php echo $this->get_field_name('title'); ?>" type="text" value="<?php echo esc_attr($title); ?>" /></p>
     157                <p><label for="<?php echo $this->get_field_id('title'); ?>"><?php _e('Title:'); ?></label> <input class="widefat" id="<?php echo $this->get_field_id('title'); ?>" name="<?php echo $this->get_field_name('title'); ?>" placeholder="<?php esc_attr_e( 'Archives' ); ?>" type="text" value="<?php echo esc_attr($title); ?>" /></p>
    158158                <p>
    159159                        <input class="checkbox" type="checkbox"<?php checked( $instance['dropdown'] ); ?> id="<?php echo $this->get_field_id('dropdown'); ?>" name="<?php echo $this->get_field_name('dropdown'); ?>" /> <label for="<?php echo $this->get_field_id('dropdown'); ?>"><?php _e('Display as dropdown'); ?></label>
    160160                        <br/>
  • src/wp-includes/widgets/class-wp-widget-categories.php

    diff --git src/wp-includes/widgets/class-wp-widget-categories.php src/wp-includes/widgets/class-wp-widget-categories.php
    index 2e52423d12..fff0501544 100644
    class WP_Widget_Categories extends WP_Widget { 
    158158                $dropdown = isset( $instance['dropdown'] ) ? (bool) $instance['dropdown'] : false;
    159159                ?>
    160160                <p><label for="<?php echo $this->get_field_id('title'); ?>"><?php _e( 'Title:' ); ?></label>
    161                 <input class="widefat" id="<?php echo $this->get_field_id('title'); ?>" name="<?php echo $this->get_field_name('title'); ?>" type="text" value="<?php echo esc_attr( $title ); ?>" /></p>
     161                <input class="widefat" id="<?php echo $this->get_field_id('title'); ?>" name="<?php echo $this->get_field_name('title'); ?>" placeholder="<?php esc_attr_e( 'Categories' ); ?>" type="text" value="<?php echo esc_attr( $title ); ?>" /></p>
    162162
    163163                <p><input type="checkbox" class="checkbox" id="<?php echo $this->get_field_id('dropdown'); ?>" name="<?php echo $this->get_field_name('dropdown'); ?>"<?php checked( $dropdown ); ?> />
    164164                <label for="<?php echo $this->get_field_id('dropdown'); ?>"><?php _e( 'Display as dropdown' ); ?></label><br />
  • src/wp-includes/widgets/class-wp-widget-meta.php

    diff --git src/wp-includes/widgets/class-wp-widget-meta.php src/wp-includes/widgets/class-wp-widget-meta.php
    index e4a3b51ac9..0172d56c76 100644
    class WP_Widget_Meta extends WP_Widget { 
    108108                $instance = wp_parse_args( (array) $instance, array( 'title' => '' ) );
    109109                $title = sanitize_text_field( $instance['title'] );
    110110?>
    111                         <p><label for="<?php echo $this->get_field_id('title'); ?>"><?php _e('Title:'); ?></label> <input class="widefat" id="<?php echo $this->get_field_id('title'); ?>" name="<?php echo $this->get_field_name('title'); ?>" type="text" value="<?php echo esc_attr($title); ?>" /></p>
     111                        <p><label for="<?php echo $this->get_field_id('title'); ?>"><?php _e('Title:'); ?></label> <input class="widefat" id="<?php echo $this->get_field_id('title'); ?>" name="<?php echo $this->get_field_name('title'); ?>" placeholder="<?php esc_attr_e( 'Meta' ); ?>" type="text" value="<?php echo esc_attr($title); ?>" /></p>
    112112<?php
    113113        }
    114114}
  • src/wp-includes/widgets/class-wp-widget-pages.php

    diff --git src/wp-includes/widgets/class-wp-widget-pages.php src/wp-includes/widgets/class-wp-widget-pages.php
    index 9fd2afc573..f423efa9fa 100644
    class WP_Widget_Pages extends WP_Widget { 
    129129                ?>
    130130                <p>
    131131                        <label for="<?php echo esc_attr( $this->get_field_id( 'title' ) ); ?>"><?php _e( 'Title:' ); ?></label>
    132                         <input class="widefat" id="<?php echo esc_attr( $this->get_field_id('title') ); ?>" name="<?php echo esc_attr( $this->get_field_name( 'title' ) ); ?>" type="text" value="<?php echo esc_attr( $instance['title'] ); ?>" />
     132                        <input class="widefat" id="<?php echo esc_attr( $this->get_field_id('title') ); ?>" name="<?php echo esc_attr( $this->get_field_name( 'title' ) ); ?>" placeholder="<?php esc_attr_e( 'Pages' ); ?>" type="text" value="<?php echo esc_attr( $instance['title'] ); ?>" />
    133133                </p>
    134134                <p>
    135135                        <label for="<?php echo esc_attr( $this->get_field_id( 'sortby' ) ); ?>"><?php _e( 'Sort by:' ); ?></label>
  • src/wp-includes/widgets/class-wp-widget-recent-comments.php

    diff --git src/wp-includes/widgets/class-wp-widget-recent-comments.php src/wp-includes/widgets/class-wp-widget-recent-comments.php
    index fb78e88c79..c5657d25da 100644
    class WP_Widget_Recent_Comments extends WP_Widget { 
    157157                $number = isset( $instance['number'] ) ? absint( $instance['number'] ) : 5;
    158158                ?>
    159159                <p><label for="<?php echo $this->get_field_id( 'title' ); ?>"><?php _e( 'Title:' ); ?></label>
    160                 <input class="widefat" id="<?php echo $this->get_field_id( 'title' ); ?>" name="<?php echo $this->get_field_name( 'title' ); ?>" type="text" value="<?php echo esc_attr( $title ); ?>" /></p>
     160                <input class="widefat" id="<?php echo $this->get_field_id( 'title' ); ?>" name="<?php echo $this->get_field_name( 'title' ); ?>" placeholder="<?php esc_attr_e( 'Recent Comments' ); ?>" type="text" value="<?php echo esc_attr( $title ); ?>" /></p>
    161161
    162162                <p><label for="<?php echo $this->get_field_id( 'number' ); ?>"><?php _e( 'Number of comments to show:' ); ?></label>
    163163                <input class="tiny-text" id="<?php echo $this->get_field_id( 'number' ); ?>" name="<?php echo $this->get_field_name( 'number' ); ?>" type="number" step="1" min="1" value="<?php echo $number; ?>" size="3" /></p>
  • src/wp-includes/widgets/class-wp-widget-recent-posts.php

    diff --git src/wp-includes/widgets/class-wp-widget-recent-posts.php src/wp-includes/widgets/class-wp-widget-recent-posts.php
    index 9483b97e27..28cd35827a 100644
    class WP_Widget_Recent_Posts extends WP_Widget { 
    130130                $show_date = isset( $instance['show_date'] ) ? (bool) $instance['show_date'] : false;
    131131?>
    132132                <p><label for="<?php echo $this->get_field_id( 'title' ); ?>"><?php _e( 'Title:' ); ?></label>
    133                 <input class="widefat" id="<?php echo $this->get_field_id( 'title' ); ?>" name="<?php echo $this->get_field_name( 'title' ); ?>" type="text" value="<?php echo $title; ?>" /></p>
     133                <input class="widefat" id="<?php echo $this->get_field_id( 'title' ); ?>" name="<?php echo $this->get_field_name( 'title' ); ?>" placeholder="<?php esc_attr_e( 'Recent Posts' ); ?>" type="text" value="<?php echo $title; ?>" /></p>
    134134
    135135                <p><label for="<?php echo $this->get_field_id( 'number' ); ?>"><?php _e( 'Number of posts to show:' ); ?></label>
    136136                <input class="tiny-text" id="<?php echo $this->get_field_id( 'number' ); ?>" name="<?php echo $this->get_field_name( 'number' ); ?>" type="number" step="1" min="1" value="<?php echo $number; ?>" size="3" /></p>
  • src/wp-includes/widgets/class-wp-widget-tag-cloud.php

    diff --git src/wp-includes/widgets/class-wp-widget-tag-cloud.php src/wp-includes/widgets/class-wp-widget-tag-cloud.php
    index b4adabd039..a0d22df1f5 100644
    class WP_Widget_Tag_Cloud extends WP_Widget { 
    120120                $instance['title'] = ! empty( $instance['title'] ) ? esc_attr( $instance['title'] ) : '';
    121121
    122122                echo '<p><label for="' . $title_id .'">' . __( 'Title:' ) . '</label>
    123                         <input type="text" class="widefat" id="' . $title_id .'" name="' . $this->get_field_name( 'title' ) .'" value="' . $instance['title'] .'" />
     123                        <input type="text" class="widefat" id="' . $title_id .'" name="' . $this->get_field_name( 'title' ) .'" value="' . $instance['title'] .'" placeholder="' . esc_attr( __( '(Selected taxonomy name)' ) ) . '" />
    124124                </p>';
    125125
    126126                $taxonomies = get_taxonomies( array( 'show_tagcloud' => true ), 'object' );