Ticket #38017: 38017.2.diff
File 38017.2.diff, 7.2 KB (added by , 8 years ago) |
---|
-
src/wp-includes/widgets/class-wp-widget-archives.php
67 67 * @see wp_get_archives() 68 68 * 69 69 * @param array $args An array of Archives widget drop-down arguments. 70 * @param array $instance Settings for the current Archives widget instance. 70 71 */ 71 72 $dropdown_args = apply_filters( 'widget_archives_dropdown_args', array( 72 73 'type' => 'monthly', 73 74 'format' => 'option', 74 75 'show_post_count' => $c 75 ) );76 ), $instance ); 76 77 77 78 switch ( $dropdown_args['type'] ) { 78 79 case 'yearly': … … 104 105 * Filters the arguments for the Archives widget. 105 106 * 106 107 * @since 2.8.0 108 * @since 4.7.0 Added `$instance` argument. 107 109 * 108 110 * @see wp_get_archives() 109 111 * 110 * @param array $args An array of Archives option arguments. 112 * @param array $args An array of Archives option arguments. 113 * @param array $instance Array of settings for the current widget. 111 114 */ 112 115 wp_get_archives( apply_filters( 'widget_archives_args', array( 113 116 'type' => 'monthly', 114 117 'show_post_count' => $c 115 ) ) );118 ), $instance ) ); 116 119 ?> 117 120 </ul> 118 121 <?php -
src/wp-includes/widgets/class-wp-widget-categories.php
79 79 * @see wp_dropdown_categories() 80 80 * 81 81 * @param array $cat_args An array of Categories widget drop-down arguments. 82 * @param array $instance Array of settings for the current widget. 82 83 */ 83 wp_dropdown_categories( apply_filters( 'widget_categories_dropdown_args', $cat_args ) );84 wp_dropdown_categories( apply_filters( 'widget_categories_dropdown_args', $cat_args, $instance ) ); 84 85 ?> 85 86 86 87 <script type='text/javascript'> … … 108 109 * Filters the arguments for the Categories widget. 109 110 * 110 111 * @since 2.8.0 112 * @since 4.7.0 Added `$instance` argument. 111 113 * 112 114 * @param array $cat_args An array of Categories widget options. 115 * @param array $instance Array of settings for the current widget. 113 116 */ 114 wp_list_categories( apply_filters( 'widget_categories_args', $cat_args ) );117 wp_list_categories( apply_filters( 'widget_categories_args', $cat_args, $instance ) ); 115 118 ?> 116 119 </ul> 117 120 <?php -
src/wp-includes/widgets/class-wp-widget-meta.php
62 62 * Filters the "Powered by WordPress" text in the Meta widget. 63 63 * 64 64 * @since 3.6.0 65 * @since 4.7.0 Added `$instance` argument. 65 66 * 66 67 * @param string $title_text Default title text for the WordPress.org link. 68 * @param array $instance Array of settings for the current widget. 67 69 */ 68 70 echo apply_filters( 'widget_meta_poweredby', sprintf( '<li><a href="%s" title="%s">%s</a></li>', 69 71 esc_url( __( 'https://wordpress.org/' ) ), 70 72 esc_attr__( 'Powered by WordPress, state-of-the-art semantic personal publishing platform.' ), 71 73 _x( 'WordPress.org', 'meta widget link text' ) 72 ) );74 ), $instance ); 73 75 74 76 wp_meta(); 75 77 ?> -
src/wp-includes/widgets/class-wp-widget-pages.php
64 64 * Filters the arguments for the Pages widget. 65 65 * 66 66 * @since 2.8.0 67 * @since 4.7.0 Added `$instance` argument. 67 68 * 68 69 * @see wp_list_pages() 69 70 * 70 * @param array $args An array of arguments to retrieve the pages list. 71 * @param array $args An array of arguments to retrieve the pages list. 72 * @param array $instance Array of settings for the current widget. 71 73 */ 72 74 $out = wp_list_pages( apply_filters( 'widget_pages_args', array( 73 75 'title_li' => '', … … 74 76 'echo' => 0, 75 77 'sort_column' => $sortby, 76 78 'exclude' => $exclude 77 ) ) );79 ), $instance ) ); 78 80 79 81 if ( ! empty( $out ) ) { 80 82 echo $args['before_widget']; -
src/wp-includes/widgets/class-wp-widget-recent-comments.php
88 88 * Filters the arguments for the Recent Comments widget. 89 89 * 90 90 * @since 3.4.0 91 * @since 4.7.0 Added `$instance` argument. 91 92 * 92 93 * @see WP_Comment_Query::query() for information on accepted arguments. 93 94 * 94 95 * @param array $comment_args An array of arguments used to retrieve the recent comments. 96 * @param array $instance Array of settings for the current widget. 95 97 */ 96 98 $comments = get_comments( apply_filters( 'widget_comments_args', array( 97 99 'number' => $number, 98 100 'status' => 'approve', 99 101 'post_status' => 'publish' 100 ) ) );102 ), $instance ) ); 101 103 102 104 $output .= $args['before_widget']; 103 105 if ( $title ) { -
src/wp-includes/widgets/class-wp-widget-recent-posts.php
61 61 * Filters the arguments for the Recent Posts widget. 62 62 * 63 63 * @since 3.4.0 64 * @since 4.7.0 Added `$instance` argument. 64 65 * 65 66 * @see WP_Query::get_posts() 66 67 * 67 * @param array $args An array of arguments used to retrieve the recent posts. 68 * @param array $args An array of arguments used to retrieve the recent posts. 69 * @param array $instance Array of settings for the current widget. 68 70 */ 69 71 $r = new WP_Query( apply_filters( 'widget_posts_args', array( 70 72 'posts_per_page' => $number, … … 71 73 'no_found_rows' => true, 72 74 'post_status' => 'publish', 73 75 'ignore_sticky_posts' => true 74 ) ) );76 ), $instance ) ); 75 77 76 78 if ($r->have_posts()) : 77 79 ?> -
src/wp-includes/widgets/class-wp-widget-tag-cloud.php
58 58 * 59 59 * @since 2.8.0 60 60 * @since 3.0.0 Added taxonomy drop-down. 61 * @since 4.7.0 Added `$instance` argument. 61 62 * 62 63 * @see wp_tag_cloud() 63 64 * 64 65 * @param array $current_taxonomy The taxonomy to use in the tag cloud. Default 'tags'. 66 * @param array $instance Array of settings for the current widget. 65 67 */ 66 68 $tag_cloud = wp_tag_cloud( apply_filters( 'widget_tag_cloud_args', array( 67 69 'taxonomy' => $current_taxonomy, 68 70 'echo' => false 69 ) ) );71 ), $instance ) ); 70 72 71 73 if ( empty( $tag_cloud ) ) { 72 74 return;