<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN"
"http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head><meta http-equiv="content-type" content="text/html; charset=utf-8" />
<title>[41685] trunk/src/wp-includes/widgets: Widgets: Pass `$instance` to widget argument filters:</title>
</head>
<body>
<style type="text/css"><!--
#msg dl.meta { border: 1px #006 solid; background: #369; padding: 6px; color: #fff; }
#msg dl.meta dt { float: left; width: 6em; font-weight: bold; }
#msg dt:after { content:':';}
#msg dl, #msg dt, #msg ul, #msg li, #header, #footer, #logmsg { font-family: verdana,arial,helvetica,sans-serif; font-size: 10pt; }
#msg dl a { font-weight: bold}
#msg dl a:link { color:#fc3; }
#msg dl a:active { color:#ff0; }
#msg dl a:visited { color:#cc6; }
h3 { font-family: verdana,arial,helvetica,sans-serif; font-size: 10pt; font-weight: bold; }
#msg pre { overflow: auto; background: #ffc; border: 1px #fa0 solid; padding: 6px; }
#logmsg { background: #ffc; border: 1px #fa0 solid; padding: 1em 1em 0 1em; }
#logmsg p, #logmsg pre, #logmsg blockquote { margin: 0 0 1em 0; }
#logmsg p, #logmsg li, #logmsg dt, #logmsg dd { line-height: 14pt; }
#logmsg h1, #logmsg h2, #logmsg h3, #logmsg h4, #logmsg h5, #logmsg h6 { margin: .5em 0; }
#logmsg h1:first-child, #logmsg h2:first-child, #logmsg h3:first-child, #logmsg h4:first-child, #logmsg h5:first-child, #logmsg h6:first-child { margin-top: 0; }
#logmsg ul, #logmsg ol { padding: 0; list-style-position: inside; margin: 0 0 0 1em; }
#logmsg ul { text-indent: -1em; padding-left: 1em; }#logmsg ol { text-indent: -1.5em; padding-left: 1.5em; }
#logmsg > ul, #logmsg > ol { margin: 0 0 1em 0; }
#logmsg pre { background: #eee; padding: 1em; }
#logmsg blockquote { border: 1px solid #fa0; border-left-width: 10px; padding: 1em 1em 0 1em; background: white;}
#logmsg dl { margin: 0; }
#logmsg dt { font-weight: bold; }
#logmsg dd { margin: 0; padding: 0 0 0.5em 0; }
#logmsg dd:before { content:'\00bb';}
#logmsg table { border-spacing: 0px; border-collapse: collapse; border-top: 4px solid #fa0; border-bottom: 1px solid #fa0; background: #fff; }
#logmsg table th { text-align: left; font-weight: normal; padding: 0.2em 0.5em; border-top: 1px dotted #fa0; }
#logmsg table td { text-align: right; border-top: 1px dotted #fa0; padding: 0.2em 0.5em; }
#logmsg table thead th { text-align: center; border-bottom: 1px solid #fa0; }
#logmsg table th.Corner { text-align: left; }
#logmsg hr { border: none 0; border-top: 2px dashed #fa0; height: 1px; }
#header, #footer { color: #fff; background: #636; border: 1px #300 solid; padding: 6px; }
#patch { width: 100%; }
#patch h4 {font-family: verdana,arial,helvetica,sans-serif;font-size:10pt;padding:8px;background:#369;color:#fff;margin:0;}
#patch .propset h4, #patch .binary h4 {margin:0;}
#patch pre {padding:0;line-height:1.2em;margin:0;}
#patch .diff {width:100%;background:#eee;padding: 0 0 10px 0;overflow:auto;}
#patch .propset .diff, #patch .binary .diff {padding:10px 0;}
#patch span {display:block;padding:0 10px;}
#patch .modfile, #patch .addfile, #patch .delfile, #patch .propset, #patch .binary, #patch .copfile {border:1px solid #ccc;margin:10px 0;}
#patch ins {background:#dfd;text-decoration:none;display:block;padding:0 10px;}
#patch del {background:#fdd;text-decoration:none;display:block;padding:0 10px;}
#patch .lines, .info {color:#888;background:#fff;}
--></style>
<div id="msg">
<dl class="meta" style="font-size: 105%">
<dt style="float: left; width: 6em; font-weight: bold">Revision</dt> <dd><a style="font-weight: bold" href="https://core.trac.wordpress.org/changeset/41685">41685</a><script type="application/ld+json">{"@context":"http://schema.org","@type":"EmailMessage","description":"Review this Commit","action":{"@type":"ViewAction","url":"https://core.trac.wordpress.org/changeset/41685","name":"Review Commit"}}</script></dd>
<dt style="float: left; width: 6em; font-weight: bold">Author</dt> <dd>SergeyBiryukov</dd>
<dt style="float: left; width: 6em; font-weight: bold">Date</dt> <dd>2017-10-02 22:01:19 +0000 (Mon, 02 Oct 2017)</dd>
</dl>
<pre style='padding-left: 1em; margin: 2em 0; border-left: 2px solid #ccc; line-height: 1.25; font-size: 105%; font-family: sans-serif'>Widgets: Pass `$instance` to widget argument filters:
* `widget_archives_dropdown_args`
* `widget_archives_args`
* `widget_categories_dropdown_args`
* `widget_categories_args`
* `widget_meta_poweredby`
* `widget_pages_args`
* `widget_comments_args`
* `widget_posts_args`
* `widget_tag_cloud_args`
See <a href="https://core.trac.wordpress.org/changeset/33971">[33971]</a> for `widget_links_args` and <a href="https://core.trac.wordpress.org/changeset/34662">[34662]</a> for `widget_nav_menu_args`.
Props Takahashi_Fumiki.
Fixes <a href="https://core.trac.wordpress.org/ticket/38017">#38017</a>.</pre>
<h3>Modified Paths</h3>
<ul>
<li><a href="#trunksrcwpincludeswidgetsclasswpwidgetarchivesphp">trunk/src/wp-includes/widgets/class-wp-widget-archives.php</a></li>
<li><a href="#trunksrcwpincludeswidgetsclasswpwidgetcategoriesphp">trunk/src/wp-includes/widgets/class-wp-widget-categories.php</a></li>
<li><a href="#trunksrcwpincludeswidgetsclasswpwidgetlinksphp">trunk/src/wp-includes/widgets/class-wp-widget-links.php</a></li>
<li><a href="#trunksrcwpincludeswidgetsclasswpwidgetmetaphp">trunk/src/wp-includes/widgets/class-wp-widget-meta.php</a></li>
<li><a href="#trunksrcwpincludeswidgetsclasswpwidgetpagesphp">trunk/src/wp-includes/widgets/class-wp-widget-pages.php</a></li>
<li><a href="#trunksrcwpincludeswidgetsclasswpwidgetrecentcommentsphp">trunk/src/wp-includes/widgets/class-wp-widget-recent-comments.php</a></li>
<li><a href="#trunksrcwpincludeswidgetsclasswpwidgetrecentpostsphp">trunk/src/wp-includes/widgets/class-wp-widget-recent-posts.php</a></li>
<li><a href="#trunksrcwpincludeswidgetsclasswpwidgettagcloudphp">trunk/src/wp-includes/widgets/class-wp-widget-tag-cloud.php</a></li>
</ul>
</div>
<div id="patch">
<h3>Diff</h3>
<a id="trunksrcwpincludeswidgetsclasswpwidgetarchivesphp"></a>
<div class="modfile"><h4 style="background-color: #eee; color: inherit; margin: 1em 0; padding: 1.3em; font-size: 115%">Modified: trunk/src/wp-includes/widgets/class-wp-widget-archives.php</h4>
<pre class="diff"><span>
<span class="info" style="display: block; padding: 0 10px; color: #888">--- trunk/src/wp-includes/widgets/class-wp-widget-archives.php 2017-10-02 21:51:09 UTC (rev 41684)
+++ trunk/src/wp-includes/widgets/class-wp-widget-archives.php 2017-10-02 22:01:19 UTC (rev 41685)
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -61,16 +61,18 @@
</span><span class="cx" style="display: block; padding: 0 10px"> * Filters the arguments for the Archives widget drop-down.
</span><span class="cx" style="display: block; padding: 0 10px"> *
</span><span class="cx" style="display: block; padding: 0 10px"> * @since 2.8.0
</span><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ * @since 4.9.0 Added the `$instance` parameter.
</ins><span class="cx" style="display: block; padding: 0 10px"> *
</span><span class="cx" style="display: block; padding: 0 10px"> * @see wp_get_archives()
</span><span class="cx" style="display: block; padding: 0 10px"> *
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- * @param array $args An array of Archives widget drop-down arguments.
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ * @param array $args An array of Archives widget drop-down arguments.
+ * @param array $instance Settings for the current Archives widget instance.
</ins><span class="cx" style="display: block; padding: 0 10px"> */
</span><span class="cx" style="display: block; padding: 0 10px"> $dropdown_args = apply_filters( 'widget_archives_dropdown_args', array(
</span><span class="cx" style="display: block; padding: 0 10px"> 'type' => 'monthly',
</span><span class="cx" style="display: block; padding: 0 10px"> 'format' => 'option',
</span><span class="cx" style="display: block; padding: 0 10px"> 'show_post_count' => $c
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- ) );
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ ), $instance );
</ins><span class="cx" style="display: block; padding: 0 10px">
</span><span class="cx" style="display: block; padding: 0 10px"> switch ( $dropdown_args['type'] ) {
</span><span class="cx" style="display: block; padding: 0 10px"> case 'yearly':
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -102,15 +104,17 @@
</span><span class="cx" style="display: block; padding: 0 10px"> * Filters the arguments for the Archives widget.
</span><span class="cx" style="display: block; padding: 0 10px"> *
</span><span class="cx" style="display: block; padding: 0 10px"> * @since 2.8.0
</span><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ * @since 4.9.0 Added the `$instance` parameter.
</ins><span class="cx" style="display: block; padding: 0 10px"> *
</span><span class="cx" style="display: block; padding: 0 10px"> * @see wp_get_archives()
</span><span class="cx" style="display: block; padding: 0 10px"> *
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- * @param array $args An array of Archives option arguments.
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ * @param array $args An array of Archives option arguments.
+ * @param array $instance Array of settings for the current widget.
</ins><span class="cx" style="display: block; padding: 0 10px"> */
</span><span class="cx" style="display: block; padding: 0 10px"> wp_get_archives( apply_filters( 'widget_archives_args', array(
</span><span class="cx" style="display: block; padding: 0 10px"> 'type' => 'monthly',
</span><span class="cx" style="display: block; padding: 0 10px"> 'show_post_count' => $c
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- ) ) );
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ ), $instance ) );
</ins><span class="cx" style="display: block; padding: 0 10px"> ?>
</span><span class="cx" style="display: block; padding: 0 10px"> </ul>
</span><span class="cx" style="display: block; padding: 0 10px"> <?php
</span></span></pre></div>
<a id="trunksrcwpincludeswidgetsclasswpwidgetcategoriesphp"></a>
<div class="modfile"><h4 style="background-color: #eee; color: inherit; margin: 1em 0; padding: 1.3em; font-size: 115%">Modified: trunk/src/wp-includes/widgets/class-wp-widget-categories.php</h4>
<pre class="diff"><span>
<span class="info" style="display: block; padding: 0 10px; color: #888">--- trunk/src/wp-includes/widgets/class-wp-widget-categories.php 2017-10-02 21:51:09 UTC (rev 41684)
+++ trunk/src/wp-includes/widgets/class-wp-widget-categories.php 2017-10-02 22:01:19 UTC (rev 41685)
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -76,12 +76,14 @@
</span><span class="cx" style="display: block; padding: 0 10px"> * Filters the arguments for the Categories widget drop-down.
</span><span class="cx" style="display: block; padding: 0 10px"> *
</span><span class="cx" style="display: block; padding: 0 10px"> * @since 2.8.0
</span><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ * @since 4.9.0 Added the `$instance` parameter.
</ins><span class="cx" style="display: block; padding: 0 10px"> *
</span><span class="cx" style="display: block; padding: 0 10px"> * @see wp_dropdown_categories()
</span><span class="cx" style="display: block; padding: 0 10px"> *
</span><span class="cx" style="display: block; padding: 0 10px"> * @param array $cat_args An array of Categories widget drop-down arguments.
</span><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ * @param array $instance Array of settings for the current widget.
</ins><span class="cx" style="display: block; padding: 0 10px"> */
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- wp_dropdown_categories( apply_filters( 'widget_categories_dropdown_args', $cat_args ) );
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ wp_dropdown_categories( apply_filters( 'widget_categories_dropdown_args', $cat_args, $instance ) );
</ins><span class="cx" style="display: block; padding: 0 10px">
</span><span class="cx" style="display: block; padding: 0 10px"> echo '</form>';
</span><span class="cx" style="display: block; padding: 0 10px"> ?>
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -111,10 +113,12 @@
</span><span class="cx" style="display: block; padding: 0 10px"> * Filters the arguments for the Categories widget.
</span><span class="cx" style="display: block; padding: 0 10px"> *
</span><span class="cx" style="display: block; padding: 0 10px"> * @since 2.8.0
</span><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ * @since 4.9.0 Added the `$instance` parameter.
</ins><span class="cx" style="display: block; padding: 0 10px"> *
</span><span class="cx" style="display: block; padding: 0 10px"> * @param array $cat_args An array of Categories widget options.
</span><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ * @param array $instance Array of settings for the current widget.
</ins><span class="cx" style="display: block; padding: 0 10px"> */
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- wp_list_categories( apply_filters( 'widget_categories_args', $cat_args ) );
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ wp_list_categories( apply_filters( 'widget_categories_args', $cat_args, $instance ) );
</ins><span class="cx" style="display: block; padding: 0 10px"> ?>
</span><span class="cx" style="display: block; padding: 0 10px"> </ul>
</span><span class="cx" style="display: block; padding: 0 10px"> <?php
</span></span></pre></div>
<a id="trunksrcwpincludeswidgetsclasswpwidgetlinksphp"></a>
<div class="modfile"><h4 style="background-color: #eee; color: inherit; margin: 1em 0; padding: 1.3em; font-size: 115%">Modified: trunk/src/wp-includes/widgets/class-wp-widget-links.php</h4>
<pre class="diff"><span>
<span class="info" style="display: block; padding: 0 10px; color: #888">--- trunk/src/wp-includes/widgets/class-wp-widget-links.php 2017-10-02 21:51:09 UTC (rev 41684)
+++ trunk/src/wp-includes/widgets/class-wp-widget-links.php 2017-10-02 22:01:19 UTC (rev 41685)
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -70,7 +70,7 @@
</span><span class="cx" style="display: block; padding: 0 10px"> * Filters the arguments for the Links widget.
</span><span class="cx" style="display: block; padding: 0 10px"> *
</span><span class="cx" style="display: block; padding: 0 10px"> * @since 2.6.0
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- * @since 4.4.0 The `$instance` parameter was added.
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ * @since 4.4.0 Added the `$instance` parameter.
</ins><span class="cx" style="display: block; padding: 0 10px"> *
</span><span class="cx" style="display: block; padding: 0 10px"> * @see wp_list_bookmarks()
</span><span class="cx" style="display: block; padding: 0 10px"> *
</span></span></pre></div>
<a id="trunksrcwpincludeswidgetsclasswpwidgetmetaphp"></a>
<div class="modfile"><h4 style="background-color: #eee; color: inherit; margin: 1em 0; padding: 1.3em; font-size: 115%">Modified: trunk/src/wp-includes/widgets/class-wp-widget-meta.php</h4>
<pre class="diff"><span>
<span class="info" style="display: block; padding: 0 10px; color: #888">--- trunk/src/wp-includes/widgets/class-wp-widget-meta.php 2017-10-02 21:51:09 UTC (rev 41684)
+++ trunk/src/wp-includes/widgets/class-wp-widget-meta.php 2017-10-02 22:01:19 UTC (rev 41685)
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -60,14 +60,16 @@
</span><span class="cx" style="display: block; padding: 0 10px"> * Filters the "Powered by WordPress" text in the Meta widget.
</span><span class="cx" style="display: block; padding: 0 10px"> *
</span><span class="cx" style="display: block; padding: 0 10px"> * @since 3.6.0
</span><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ * @since 4.9.0 Added the `$instance` parameter.
</ins><span class="cx" style="display: block; padding: 0 10px"> *
</span><span class="cx" style="display: block; padding: 0 10px"> * @param string $title_text Default title text for the WordPress.org link.
</span><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ * @param array $instance Array of settings for the current widget.
</ins><span class="cx" style="display: block; padding: 0 10px"> */
</span><span class="cx" style="display: block; padding: 0 10px"> echo apply_filters( 'widget_meta_poweredby', sprintf( '<li><a href="%s" title="%s">%s</a></li>',
</span><span class="cx" style="display: block; padding: 0 10px"> esc_url( __( 'https://wordpress.org/' ) ),
</span><span class="cx" style="display: block; padding: 0 10px"> esc_attr__( 'Powered by WordPress, state-of-the-art semantic personal publishing platform.' ),
</span><span class="cx" style="display: block; padding: 0 10px"> _x( 'WordPress.org', 'meta widget link text' )
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- ) );
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ ), $instance );
</ins><span class="cx" style="display: block; padding: 0 10px">
</span><span class="cx" style="display: block; padding: 0 10px"> wp_meta();
</span><span class="cx" style="display: block; padding: 0 10px"> ?>
</span></span></pre></div>
<a id="trunksrcwpincludeswidgetsclasswpwidgetpagesphp"></a>
<div class="modfile"><h4 style="background-color: #eee; color: inherit; margin: 1em 0; padding: 1.3em; font-size: 115%">Modified: trunk/src/wp-includes/widgets/class-wp-widget-pages.php</h4>
<pre class="diff"><span>
<span class="info" style="display: block; padding: 0 10px; color: #888">--- trunk/src/wp-includes/widgets/class-wp-widget-pages.php 2017-10-02 21:51:09 UTC (rev 41684)
+++ trunk/src/wp-includes/widgets/class-wp-widget-pages.php 2017-10-02 22:01:19 UTC (rev 41685)
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -47,7 +47,7 @@
</span><span class="cx" style="display: block; padding: 0 10px"> * @since 2.6.0
</span><span class="cx" style="display: block; padding: 0 10px"> *
</span><span class="cx" style="display: block; padding: 0 10px"> * @param string $title The widget title. Default 'Pages'.
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- * @param array $instance An array of the widget's settings.
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ * @param array $instance Array of settings for the current widget.
</ins><span class="cx" style="display: block; padding: 0 10px"> * @param mixed $id_base The widget ID.
</span><span class="cx" style="display: block; padding: 0 10px"> */
</span><span class="cx" style="display: block; padding: 0 10px"> $title = apply_filters( 'widget_title', empty( $instance['title'] ) ? __( 'Pages' ) : $instance['title'], $instance, $this->id_base );
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -62,17 +62,19 @@
</span><span class="cx" style="display: block; padding: 0 10px"> * Filters the arguments for the Pages widget.
</span><span class="cx" style="display: block; padding: 0 10px"> *
</span><span class="cx" style="display: block; padding: 0 10px"> * @since 2.8.0
</span><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ * @since 4.9.0 Added the `$instance` parameter.
</ins><span class="cx" style="display: block; padding: 0 10px"> *
</span><span class="cx" style="display: block; padding: 0 10px"> * @see wp_list_pages()
</span><span class="cx" style="display: block; padding: 0 10px"> *
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- * @param array $args An array of arguments to retrieve the pages list.
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ * @param array $args An array of arguments to retrieve the pages list.
+ * @param array $instance Array of settings for the current widget.
</ins><span class="cx" style="display: block; padding: 0 10px"> */
</span><span class="cx" style="display: block; padding: 0 10px"> $out = wp_list_pages( apply_filters( 'widget_pages_args', array(
</span><span class="cx" style="display: block; padding: 0 10px"> 'title_li' => '',
</span><span class="cx" style="display: block; padding: 0 10px"> 'echo' => 0,
</span><span class="cx" style="display: block; padding: 0 10px"> 'sort_column' => $sortby,
</span><span class="cx" style="display: block; padding: 0 10px"> 'exclude' => $exclude
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- ) ) );
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ ), $instance ) );
</ins><span class="cx" style="display: block; padding: 0 10px">
</span><span class="cx" style="display: block; padding: 0 10px"> if ( ! empty( $out ) ) {
</span><span class="cx" style="display: block; padding: 0 10px"> echo $args['before_widget'];
</span></span></pre></div>
<a id="trunksrcwpincludeswidgetsclasswpwidgetrecentcommentsphp"></a>
<div class="modfile"><h4 style="background-color: #eee; color: inherit; margin: 1em 0; padding: 1.3em; font-size: 115%">Modified: trunk/src/wp-includes/widgets/class-wp-widget-recent-comments.php</h4>
<pre class="diff"><span>
<span class="info" style="display: block; padding: 0 10px; color: #888">--- trunk/src/wp-includes/widgets/class-wp-widget-recent-comments.php 2017-10-02 21:51:09 UTC (rev 41684)
+++ trunk/src/wp-includes/widgets/class-wp-widget-recent-comments.php 2017-10-02 22:01:19 UTC (rev 41685)
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -85,16 +85,18 @@
</span><span class="cx" style="display: block; padding: 0 10px"> * Filters the arguments for the Recent Comments widget.
</span><span class="cx" style="display: block; padding: 0 10px"> *
</span><span class="cx" style="display: block; padding: 0 10px"> * @since 3.4.0
</span><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ * @since 4.9.0 Added the `$instance` parameter.
</ins><span class="cx" style="display: block; padding: 0 10px"> *
</span><span class="cx" style="display: block; padding: 0 10px"> * @see WP_Comment_Query::query() for information on accepted arguments.
</span><span class="cx" style="display: block; padding: 0 10px"> *
</span><span class="cx" style="display: block; padding: 0 10px"> * @param array $comment_args An array of arguments used to retrieve the recent comments.
</span><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ * @param array $instance Array of settings for the current widget.
</ins><span class="cx" style="display: block; padding: 0 10px"> */
</span><span class="cx" style="display: block; padding: 0 10px"> $comments = get_comments( apply_filters( 'widget_comments_args', array(
</span><span class="cx" style="display: block; padding: 0 10px"> 'number' => $number,
</span><span class="cx" style="display: block; padding: 0 10px"> 'status' => 'approve',
</span><span class="cx" style="display: block; padding: 0 10px"> 'post_status' => 'publish'
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- ) ) );
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ ), $instance ) );
</ins><span class="cx" style="display: block; padding: 0 10px">
</span><span class="cx" style="display: block; padding: 0 10px"> $output .= $args['before_widget'];
</span><span class="cx" style="display: block; padding: 0 10px"> if ( $title ) {
</span></span></pre></div>
<a id="trunksrcwpincludeswidgetsclasswpwidgetrecentpostsphp"></a>
<div class="modfile"><h4 style="background-color: #eee; color: inherit; margin: 1em 0; padding: 1.3em; font-size: 115%">Modified: trunk/src/wp-includes/widgets/class-wp-widget-recent-posts.php</h4>
<pre class="diff"><span>
<span class="info" style="display: block; padding: 0 10px; color: #888">--- trunk/src/wp-includes/widgets/class-wp-widget-recent-posts.php 2017-10-02 21:51:09 UTC (rev 41684)
+++ trunk/src/wp-includes/widgets/class-wp-widget-recent-posts.php 2017-10-02 22:01:19 UTC (rev 41685)
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -59,17 +59,19 @@
</span><span class="cx" style="display: block; padding: 0 10px"> * Filters the arguments for the Recent Posts widget.
</span><span class="cx" style="display: block; padding: 0 10px"> *
</span><span class="cx" style="display: block; padding: 0 10px"> * @since 3.4.0
</span><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ * @since 4.9.0 Added the `$instance` parameter.
</ins><span class="cx" style="display: block; padding: 0 10px"> *
</span><span class="cx" style="display: block; padding: 0 10px"> * @see WP_Query::get_posts()
</span><span class="cx" style="display: block; padding: 0 10px"> *
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- * @param array $args An array of arguments used to retrieve the recent posts.
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ * @param array $args An array of arguments used to retrieve the recent posts.
+ * @param array $instance Array of settings for the current widget.
</ins><span class="cx" style="display: block; padding: 0 10px"> */
</span><span class="cx" style="display: block; padding: 0 10px"> $r = new WP_Query( apply_filters( 'widget_posts_args', array(
</span><span class="cx" style="display: block; padding: 0 10px"> 'posts_per_page' => $number,
</span><span class="cx" style="display: block; padding: 0 10px"> 'no_found_rows' => true,
</span><span class="cx" style="display: block; padding: 0 10px"> 'post_status' => 'publish',
</span><span class="cx" style="display: block; padding: 0 10px"> 'ignore_sticky_posts' => true
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- ) ) );
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ ), $instance ) );
</ins><span class="cx" style="display: block; padding: 0 10px">
</span><span class="cx" style="display: block; padding: 0 10px"> if ($r->have_posts()) :
</span><span class="cx" style="display: block; padding: 0 10px"> ?>
</span></span></pre></div>
<a id="trunksrcwpincludeswidgetsclasswpwidgettagcloudphp"></a>
<div class="modfile"><h4 style="background-color: #eee; color: inherit; margin: 1em 0; padding: 1.3em; font-size: 115%">Modified: trunk/src/wp-includes/widgets/class-wp-widget-tag-cloud.php</h4>
<pre class="diff"><span>
<span class="info" style="display: block; padding: 0 10px; color: #888">--- trunk/src/wp-includes/widgets/class-wp-widget-tag-cloud.php 2017-10-02 21:51:09 UTC (rev 41684)
+++ trunk/src/wp-includes/widgets/class-wp-widget-tag-cloud.php 2017-10-02 22:01:19 UTC (rev 41685)
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -58,16 +58,18 @@
</span><span class="cx" style="display: block; padding: 0 10px"> *
</span><span class="cx" style="display: block; padding: 0 10px"> * @since 2.8.0
</span><span class="cx" style="display: block; padding: 0 10px"> * @since 3.0.0 Added taxonomy drop-down.
</span><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ * @since 4.9.0 Added the `$instance` parameter.
</ins><span class="cx" style="display: block; padding: 0 10px"> *
</span><span class="cx" style="display: block; padding: 0 10px"> * @see wp_tag_cloud()
</span><span class="cx" style="display: block; padding: 0 10px"> *
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- * @param array $args Args used for the tag cloud widget.
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ * @param array $args Args used for the tag cloud widget.
+ * @param array $instance Array of settings for the current widget.
</ins><span class="cx" style="display: block; padding: 0 10px"> */
</span><span class="cx" style="display: block; padding: 0 10px"> $tag_cloud = wp_tag_cloud( apply_filters( 'widget_tag_cloud_args', array(
</span><span class="cx" style="display: block; padding: 0 10px"> 'taxonomy' => $current_taxonomy,
</span><span class="cx" style="display: block; padding: 0 10px"> 'echo' => false,
</span><span class="cx" style="display: block; padding: 0 10px"> 'show_count' => $show_count,
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- ) ) );
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ ), $instance ) );
</ins><span class="cx" style="display: block; padding: 0 10px">
</span><span class="cx" style="display: block; padding: 0 10px"> if ( empty( $tag_cloud ) ) {
</span><span class="cx" style="display: block; padding: 0 10px"> return;
</span></span></pre>
</div>
</div>
</body>
</html>