<!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>[39600] trunk/src: General: Use interpolation instead of concatenation for all dynamic hook names.</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/39600">39600</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/39600","name":"Review Commit"}}</script></dd>
<dt style="float: left; width: 6em; font-weight: bold">Author</dt> <dd>johnbillion</dd>
<dt style="float: left; width: 6em; font-weight: bold">Date</dt> <dd>2016-12-14 04:17:38 +0000 (Wed, 14 Dec 2016)</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'>General: Use interpolation instead of concatenation for all dynamic hook names.
This fixes the rendering of the hook names on developer.wordpress.org.
Props keesiemeijer
Fixes <a href="https://core.trac.wordpress.org/ticket/39148">#39148</a></pre>
<h3>Modified Paths</h3>
<ul>
<li><a href="#trunksrcwpadmineditcommentsphp">trunk/src/wp-admin/edit-comments.php</a></li>
<li><a href="#trunksrcwpadminincludesajaxactionsphp">trunk/src/wp-admin/includes/ajax-actions.php</a></li>
<li><a href="#trunksrcwpadminincludesclasswplisttablephp">trunk/src/wp-admin/includes/class-wp-list-table.php</a></li>
<li><a href="#trunksrcwpadminincludesclasswpscreenphp">trunk/src/wp-admin/includes/class-wp-screen.php</a></li>
<li><a href="#trunksrcwpadminincludespluginphp">trunk/src/wp-admin/includes/plugin.php</a></li>
<li><a href="#trunksrcwpadminnetworksitethemesphp">trunk/src/wp-admin/network/site-themes.php</a></li>
<li><a href="#trunksrcwpincludesauthortemplatephp">trunk/src/wp-includes/author-template.php</a></li>
<li><a href="#trunksrcwpincludesbookmarkphp">trunk/src/wp-includes/bookmark.php</a></li>
<li><a href="#trunksrcwpincludesclasswpcustomizesettingphp">trunk/src/wp-includes/class-wp-customize-setting.php</a></li>
<li><a href="#trunksrcwpincludesoptionphp">trunk/src/wp-includes/option.php</a></li>
<li><a href="#trunksrcwpincludespostphp">trunk/src/wp-includes/post.php</a></li>
<li><a href="#trunksrcwpincludesuserphp">trunk/src/wp-includes/user.php</a></li>
</ul>
</div>
<div id="patch">
<h3>Diff</h3>
<a id="trunksrcwpadmineditcommentsphp"></a>
<div class="modfile"><h4 style="background-color: #eee; color: inherit; margin: 1em 0; padding: 1.3em; font-size: 115%">Modified: trunk/src/wp-admin/edit-comments.php</h4>
<pre class="diff"><span>
<span class="info" style="display: block; padding: 0 10px; color: #888">--- trunk/src/wp-admin/edit-comments.php 2016-12-14 03:42:58 UTC (rev 39599)
+++ trunk/src/wp-admin/edit-comments.php 2016-12-14 04:17:38 UTC (rev 39600)
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -83,19 +83,23 @@
</span><span class="cx" style="display: block; padding: 0 10px"> }
</span><span class="cx" style="display: block; padding: 0 10px">
</span><span class="cx" style="display: block; padding: 0 10px"> if ( ! in_array( $doaction, array( 'approve', 'unapprove', 'spam', 'unspam', 'trash', 'delete' ), true ) ) {
</span><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ $screen = get_current_screen()->id;
+
</ins><span class="cx" style="display: block; padding: 0 10px"> /**
</span><span class="cx" style="display: block; padding: 0 10px"> * Fires when a custom bulk action should be handled.
</span><span class="cx" style="display: block; padding: 0 10px"> *
</span><span class="cx" style="display: block; padding: 0 10px"> * The redirect link should be modified with success or failure feedback
</span><span class="cx" style="display: block; padding: 0 10px"> * from the action to be used to display feedback to the user.
</span><span class="cx" style="display: block; padding: 0 10px"> *
</span><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ * The dynamic portion of the hook name, `$screen`, refers to the current screen ID.
+ *
</ins><span class="cx" style="display: block; padding: 0 10px"> * @since 4.7.0
</span><span class="cx" style="display: block; padding: 0 10px"> *
</span><span class="cx" style="display: block; padding: 0 10px"> * @param string $redirect_url The redirect URL.
</span><span class="cx" style="display: block; padding: 0 10px"> * @param string $doaction The action being taken.
</span><span class="cx" style="display: block; padding: 0 10px"> * @param array $items The items to take the action on.
</span><span class="cx" style="display: block; padding: 0 10px"> */
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- $redirect_to = apply_filters( 'handle_bulk_actions-' . get_current_screen()->id, $redirect_to, $doaction, $comment_ids );
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ $redirect_to = apply_filters( "handle_bulk_actions-{$screen}", $redirect_to, $doaction, $comment_ids );
</ins><span class="cx" style="display: block; padding: 0 10px"> }
</span><span class="cx" style="display: block; padding: 0 10px">
</span><span class="cx" style="display: block; padding: 0 10px"> wp_defer_comment_counting( false );
</span></span></pre></div>
<a id="trunksrcwpadminincludesajaxactionsphp"></a>
<div class="modfile"><h4 style="background-color: #eee; color: inherit; margin: 1em 0; padding: 1.3em; font-size: 115%">Modified: trunk/src/wp-admin/includes/ajax-actions.php</h4>
<pre class="diff"><span>
<span class="info" style="display: block; padding: 0 10px; color: #888">--- trunk/src/wp-admin/includes/ajax-actions.php 2016-12-14 03:42:58 UTC (rev 39599)
+++ trunk/src/wp-admin/includes/ajax-actions.php 2016-12-14 04:17:38 UTC (rev 39600)
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -2702,7 +2702,7 @@
</span><span class="cx" style="display: block; padding: 0 10px"> $type = $ext_type;
</span><span class="cx" style="display: block; padding: 0 10px">
</span><span class="cx" style="display: block; padding: 0 10px"> /** This filter is documented in wp-admin/includes/media.php */
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- $html = apply_filters( $type . '_send_to_editor_url', $html, $src, $link_text );
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ $html = apply_filters( "{$type}_send_to_editor_url", $html, $src, $link_text );
</ins><span class="cx" style="display: block; padding: 0 10px">
</span><span class="cx" style="display: block; padding: 0 10px"> wp_send_json_success( $html );
</span><span class="cx" style="display: block; padding: 0 10px"> }
</span></span></pre></div>
<a id="trunksrcwpadminincludesclasswplisttablephp"></a>
<div class="modfile"><h4 style="background-color: #eee; color: inherit; margin: 1em 0; padding: 1.3em; font-size: 115%">Modified: trunk/src/wp-admin/includes/class-wp-list-table.php</h4>
<pre class="diff"><span>
<span class="info" style="display: block; padding: 0 10px; color: #888">--- trunk/src/wp-admin/includes/class-wp-list-table.php 2016-12-14 03:42:58 UTC (rev 39599)
+++ trunk/src/wp-admin/includes/class-wp-list-table.php 2016-12-14 04:17:38 UTC (rev 39600)
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -732,7 +732,7 @@
</span><span class="cx" style="display: block; padding: 0 10px"> *
</span><span class="cx" style="display: block; padding: 0 10px"> * @param int $per_page Number of items to be displayed. Default 20.
</span><span class="cx" style="display: block; padding: 0 10px"> */
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- return (int) apply_filters( $option, $per_page );
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ return (int) apply_filters( "{$option}", $per_page );
</ins><span class="cx" style="display: block; padding: 0 10px"> }
</span><span class="cx" style="display: block; padding: 0 10px">
</span><span class="cx" style="display: block; padding: 0 10px"> /**
</span></span></pre></div>
<a id="trunksrcwpadminincludesclasswpscreenphp"></a>
<div class="modfile"><h4 style="background-color: #eee; color: inherit; margin: 1em 0; padding: 1.3em; font-size: 115%">Modified: trunk/src/wp-admin/includes/class-wp-screen.php</h4>
<pre class="diff"><span>
<span class="info" style="display: block; padding: 0 10px; color: #888">--- trunk/src/wp-admin/includes/class-wp-screen.php 2016-12-14 03:42:58 UTC (rev 39599)
+++ trunk/src/wp-admin/includes/class-wp-screen.php 2016-12-14 04:17:38 UTC (rev 39600)
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -1162,7 +1162,7 @@
</span><span class="cx" style="display: block; padding: 0 10px"> $per_page = apply_filters( 'edit_categories_per_page', $per_page );
</span><span class="cx" style="display: block; padding: 0 10px"> } else {
</span><span class="cx" style="display: block; padding: 0 10px"> /** This filter is documented in wp-admin/includes/class-wp-list-table.php */
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- $per_page = apply_filters( $option, $per_page );
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ $per_page = apply_filters( "{$option}", $per_page );
</ins><span class="cx" style="display: block; padding: 0 10px"> }
</span><span class="cx" style="display: block; padding: 0 10px">
</span><span class="cx" style="display: block; padding: 0 10px"> // Back compat
</span></span></pre></div>
<a id="trunksrcwpadminincludespluginphp"></a>
<div class="modfile"><h4 style="background-color: #eee; color: inherit; margin: 1em 0; padding: 1.3em; font-size: 115%">Modified: trunk/src/wp-admin/includes/plugin.php</h4>
<pre class="diff"><span>
<span class="info" style="display: block; padding: 0 10px; color: #888">--- trunk/src/wp-admin/includes/plugin.php 2016-12-14 03:42:58 UTC (rev 39599)
+++ trunk/src/wp-admin/includes/plugin.php 2016-12-14 04:17:38 UTC (rev 39600)
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -1025,7 +1025,7 @@
</span><span class="cx" style="display: block; padding: 0 10px"> wp_register_plugin_realpath( WP_PLUGIN_DIR . '/' . $file );
</span><span class="cx" style="display: block; padding: 0 10px"> include( WP_PLUGIN_DIR . '/' . $file );
</span><span class="cx" style="display: block; padding: 0 10px">
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- add_action( 'uninstall_' . $file, $callable );
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ add_action( "uninstall_{$file}", $callable );
</ins><span class="cx" style="display: block; padding: 0 10px">
</span><span class="cx" style="display: block; padding: 0 10px"> /**
</span><span class="cx" style="display: block; padding: 0 10px"> * Fires in uninstall_plugin() once the plugin has been uninstalled.
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -1035,7 +1035,7 @@
</span><span class="cx" style="display: block; padding: 0 10px"> *
</span><span class="cx" style="display: block; padding: 0 10px"> * @since 2.7.0
</span><span class="cx" style="display: block; padding: 0 10px"> */
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- do_action( 'uninstall_' . $file );
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ do_action( "uninstall_{$file}" );
</ins><span class="cx" style="display: block; padding: 0 10px"> }
</span><span class="cx" style="display: block; padding: 0 10px"> }
</span><span class="cx" style="display: block; padding: 0 10px">
</span></span></pre></div>
<a id="trunksrcwpadminnetworksitethemesphp"></a>
<div class="modfile"><h4 style="background-color: #eee; color: inherit; margin: 1em 0; padding: 1.3em; font-size: 115%">Modified: trunk/src/wp-admin/network/site-themes.php</h4>
<pre class="diff"><span>
<span class="info" style="display: block; padding: 0 10px; color: #888">--- trunk/src/wp-admin/network/site-themes.php 2016-12-14 03:42:58 UTC (rev 39599)
+++ trunk/src/wp-admin/network/site-themes.php 2016-12-14 04:17:38 UTC (rev 39600)
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -124,20 +124,24 @@
</span><span class="cx" style="display: block; padding: 0 10px"> check_admin_referer( 'bulk-themes' );
</span><span class="cx" style="display: block; padding: 0 10px"> $themes = (array) $_POST['checked'];
</span><span class="cx" style="display: block; padding: 0 10px"> $n = count( $themes );
</span><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ $screen = get_current_screen()->id;
+
</ins><span class="cx" style="display: block; padding: 0 10px"> /**
</span><span class="cx" style="display: block; padding: 0 10px"> * Fires when a custom bulk action should be handled.
</span><span class="cx" style="display: block; padding: 0 10px"> *
</span><span class="cx" style="display: block; padding: 0 10px"> * The redirect link should be modified with success or failure feedback
</span><span class="cx" style="display: block; padding: 0 10px"> * from the action to be used to display feedback to the user.
</span><span class="cx" style="display: block; padding: 0 10px"> *
</span><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ * The dynamic portion of the hook name, `$screen`, refers to the current screen ID.
+ *
</ins><span class="cx" style="display: block; padding: 0 10px"> * @since 4.7.0
</span><span class="cx" style="display: block; padding: 0 10px"> *
</span><span class="cx" style="display: block; padding: 0 10px"> * @param string $redirect_url The redirect URL.
</span><span class="cx" style="display: block; padding: 0 10px"> * @param string $action The action being taken.
</span><span class="cx" style="display: block; padding: 0 10px"> * @param array $items The items to take the action on.
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- * @param int $site_id The site id.
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ * @param int $site_id The site ID.
</ins><span class="cx" style="display: block; padding: 0 10px"> */
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- $referer = apply_filters( 'handle_network_bulk_actions-' . get_current_screen()->id, $referer, $action, $themes, $id );
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ $referer = apply_filters( "handle_network_bulk_actions-{$screen}", $referer, $action, $themes, $id );
</ins><span class="cx" style="display: block; padding: 0 10px"> } else {
</span><span class="cx" style="display: block; padding: 0 10px"> $action = 'error';
</span><span class="cx" style="display: block; padding: 0 10px"> $n = 'none';
</span></span></pre></div>
<a id="trunksrcwpincludesauthortemplatephp"></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/author-template.php</h4>
<pre class="diff"><span>
<span class="info" style="display: block; padding: 0 10px; color: #888">--- trunk/src/wp-includes/author-template.php 2016-12-14 03:42:58 UTC (rev 39599)
+++ trunk/src/wp-includes/author-template.php 2016-12-14 04:17:38 UTC (rev 39600)
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -148,7 +148,7 @@
</span><span class="cx" style="display: block; padding: 0 10px"> * @param int $user_id The user ID for the value.
</span><span class="cx" style="display: block; padding: 0 10px"> * @param int|bool $original_user_id The original user ID, as passed to the function.
</span><span class="cx" style="display: block; padding: 0 10px"> */
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- return apply_filters( 'get_the_author_' . $field, $value, $user_id, $original_user_id );
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ return apply_filters( "get_the_author_{$field}", $value, $user_id, $original_user_id );
</ins><span class="cx" style="display: block; padding: 0 10px"> }
</span><span class="cx" style="display: block; padding: 0 10px">
</span><span class="cx" style="display: block; padding: 0 10px"> /**
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -174,7 +174,7 @@
</span><span class="cx" style="display: block; padding: 0 10px"> * @param string $author_meta The value of the metadata.
</span><span class="cx" style="display: block; padding: 0 10px"> * @param int $user_id The user ID.
</span><span class="cx" style="display: block; padding: 0 10px"> */
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- echo apply_filters( 'the_author_' . $field, $author_meta, $user_id );
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ echo apply_filters( "the_author_{$field}", $author_meta, $user_id );
</ins><span class="cx" style="display: block; padding: 0 10px"> }
</span><span class="cx" style="display: block; padding: 0 10px">
</span><span class="cx" style="display: block; padding: 0 10px"> /**
</span></span></pre></div>
<a id="trunksrcwpincludesbookmarkphp"></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/bookmark.php</h4>
<pre class="diff"><span>
<span class="info" style="display: block; padding: 0 10px; color: #888">--- trunk/src/wp-includes/bookmark.php 2016-12-14 03:42:58 UTC (rev 39599)
+++ trunk/src/wp-includes/bookmark.php 2016-12-14 04:17:38 UTC (rev 39600)
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -383,7 +383,7 @@
</span><span class="cx" style="display: block; padding: 0 10px">
</span><span class="cx" style="display: block; padding: 0 10px"> if ( 'edit' == $context ) {
</span><span class="cx" style="display: block; padding: 0 10px"> /** This filter is documented in wp-includes/post.php */
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- $value = apply_filters( "edit_$field", $value, $bookmark_id );
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ $value = apply_filters( "edit_{$field}", $value, $bookmark_id );
</ins><span class="cx" style="display: block; padding: 0 10px">
</span><span class="cx" style="display: block; padding: 0 10px"> if ( 'link_notes' == $field ) {
</span><span class="cx" style="display: block; padding: 0 10px"> $value = esc_html( $value ); // textarea_escaped
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -392,10 +392,10 @@
</span><span class="cx" style="display: block; padding: 0 10px"> }
</span><span class="cx" style="display: block; padding: 0 10px"> } elseif ( 'db' == $context ) {
</span><span class="cx" style="display: block; padding: 0 10px"> /** This filter is documented in wp-includes/post.php */
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- $value = apply_filters( "pre_$field", $value );
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ $value = apply_filters( "pre_{$field}", $value );
</ins><span class="cx" style="display: block; padding: 0 10px"> } else {
</span><span class="cx" style="display: block; padding: 0 10px"> /** This filter is documented in wp-includes/post.php */
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- $value = apply_filters( $field, $value, $bookmark_id, $context );
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ $value = apply_filters( "{$field}", $value, $bookmark_id, $context );
</ins><span class="cx" style="display: block; padding: 0 10px">
</span><span class="cx" style="display: block; padding: 0 10px"> if ( 'attribute' == $context ) {
</span><span class="cx" style="display: block; padding: 0 10px"> $value = esc_attr( $value );
</span></span></pre></div>
<a id="trunksrcwpincludesclasswpcustomizesettingphp"></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/class-wp-customize-setting.php</h4>
<pre class="diff"><span>
<span class="info" style="display: block; padding: 0 10px; color: #888">--- trunk/src/wp-includes/class-wp-customize-setting.php 2016-12-14 03:42:58 UTC (rev 39599)
+++ trunk/src/wp-includes/class-wp-customize-setting.php 2016-12-14 04:17:38 UTC (rev 39600)
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -480,17 +480,19 @@
</span><span class="cx" style="display: block; padding: 0 10px"> return false;
</span><span class="cx" style="display: block; padding: 0 10px"> }
</span><span class="cx" style="display: block; padding: 0 10px">
</span><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ $id_base = $this->id_data['base'];
+
</ins><span class="cx" style="display: block; padding: 0 10px"> /**
</span><span class="cx" style="display: block; padding: 0 10px"> * Fires when the WP_Customize_Setting::save() method is called.
</span><span class="cx" style="display: block; padding: 0 10px"> *
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- * The dynamic portion of the hook name, `$this->id_data['base']` refers to
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ * The dynamic portion of the hook name, `$id_base` refers to
</ins><span class="cx" style="display: block; padding: 0 10px"> * the base slug of the setting name.
</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><span class="cx" style="display: block; padding: 0 10px"> *
</span><span class="cx" style="display: block; padding: 0 10px"> * @param WP_Customize_Setting $this WP_Customize_Setting instance.
</span><span class="cx" style="display: block; padding: 0 10px"> */
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- do_action( 'customize_save_' . $this->id_data['base'], $this );
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ do_action( "customize_save_{$id_base}", $this );
</ins><span class="cx" style="display: block; padding: 0 10px">
</span><span class="cx" style="display: block; padding: 0 10px"> $this->update( $value );
</span><span class="cx" style="display: block; padding: 0 10px"> }
</span></span></pre></div>
<a id="trunksrcwpincludesoptionphp"></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/option.php</h4>
<pre class="diff"><span>
<span class="info" style="display: block; padding: 0 10px; color: #888">--- trunk/src/wp-includes/option.php 2016-12-14 03:42:58 UTC (rev 39599)
+++ trunk/src/wp-includes/option.php 2016-12-14 04:17:38 UTC (rev 39600)
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -102,7 +102,7 @@
</span><span class="cx" style="display: block; padding: 0 10px"> wp_cache_set( 'notoptions', $notoptions, 'options' );
</span><span class="cx" style="display: block; padding: 0 10px">
</span><span class="cx" style="display: block; padding: 0 10px"> /** This filter is documented in wp-includes/option.php */
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- return apply_filters( 'default_option_' . $option, $default, $option, $passed_default );
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ return apply_filters( "default_option_{$option}", $default, $option, $passed_default );
</ins><span class="cx" style="display: block; padding: 0 10px"> }
</span><span class="cx" style="display: block; padding: 0 10px"> }
</span><span class="cx" style="display: block; padding: 0 10px"> }
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -114,7 +114,7 @@
</span><span class="cx" style="display: block; padding: 0 10px"> $value = $row->option_value;
</span><span class="cx" style="display: block; padding: 0 10px"> } else {
</span><span class="cx" style="display: block; padding: 0 10px"> /** This filter is documented in wp-includes/option.php */
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- return apply_filters( 'default_option_' . $option, $default, $option, $passed_default );
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ return apply_filters( "default_option_{$option}", $default, $option, $passed_default );
</ins><span class="cx" style="display: block; padding: 0 10px"> }
</span><span class="cx" style="display: block; padding: 0 10px"> }
</span><span class="cx" style="display: block; padding: 0 10px">
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -309,7 +309,7 @@
</span><span class="cx" style="display: block; padding: 0 10px"> }
</span><span class="cx" style="display: block; padding: 0 10px">
</span><span class="cx" style="display: block; padding: 0 10px"> /** This filter is documented in wp-includes/option.php */
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- if ( apply_filters( 'default_option_' . $option, false, $option, false ) === $old_value ) {
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ if ( apply_filters( "default_option_{$option}", false, $option, false ) === $old_value ) {
</ins><span class="cx" style="display: block; padding: 0 10px"> // Default setting for new options is 'yes'.
</span><span class="cx" style="display: block; padding: 0 10px"> if ( null === $autoload ) {
</span><span class="cx" style="display: block; padding: 0 10px"> $autoload = 'yes';
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -430,7 +430,7 @@
</span><span class="cx" style="display: block; padding: 0 10px"> $notoptions = wp_cache_get( 'notoptions', 'options' );
</span><span class="cx" style="display: block; padding: 0 10px"> if ( !is_array( $notoptions ) || !isset( $notoptions[$option] ) )
</span><span class="cx" style="display: block; padding: 0 10px"> /** This filter is documented in wp-includes/option.php */
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- if ( apply_filters( 'default_option_' . $option, false, $option, false ) !== get_option( $option ) )
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ if ( apply_filters( "default_option_{$option}", false, $option, false ) !== get_option( $option ) )
</ins><span class="cx" style="display: block; padding: 0 10px"> return false;
</span><span class="cx" style="display: block; padding: 0 10px">
</span><span class="cx" style="display: block; padding: 0 10px"> $serialized_value = maybe_serialize( $value );
</span></span></pre></div>
<a id="trunksrcwpincludespostphp"></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/post.php</h4>
<pre class="diff"><span>
<span class="info" style="display: block; padding: 0 10px; color: #888">--- trunk/src/wp-includes/post.php 2016-12-14 03:42:58 UTC (rev 39599)
+++ trunk/src/wp-includes/post.php 2016-12-14 04:17:38 UTC (rev 39600)
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -2061,7 +2061,7 @@
</span><span class="cx" style="display: block; padding: 0 10px"> * values include 'raw', 'edit', 'db', 'display',
</span><span class="cx" style="display: block; padding: 0 10px"> * 'attribute' and 'js'.
</span><span class="cx" style="display: block; padding: 0 10px"> */
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- $value = apply_filters( $field, $value, $post_id, $context );
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ $value = apply_filters( "{$field}", $value, $post_id, $context );
</ins><span class="cx" style="display: block; padding: 0 10px"> } else {
</span><span class="cx" style="display: block; padding: 0 10px"> $value = apply_filters( "post_{$field}", $value, $post_id, $context );
</span><span class="cx" style="display: block; padding: 0 10px"> }
</span></span></pre></div>
<a id="trunksrcwpincludesuserphp"></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/user.php</h4>
<pre class="diff"><span>
<span class="info" style="display: block; padding: 0 10px; color: #888">--- trunk/src/wp-includes/user.php 2016-12-14 03:42:58 UTC (rev 39599)
+++ trunk/src/wp-includes/user.php 2016-12-14 04:17:38 UTC (rev 39600)
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -1208,7 +1208,7 @@
</span><span class="cx" style="display: block; padding: 0 10px"> if ( $prefixed ) {
</span><span class="cx" style="display: block; padding: 0 10px">
</span><span class="cx" style="display: block; padding: 0 10px"> /** This filter is documented in wp-includes/post.php */
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- $value = apply_filters( $field, $value, $user_id, $context );
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ $value = apply_filters( "{$field}", $value, $user_id, $context );
</ins><span class="cx" style="display: block; padding: 0 10px"> } else {
</span><span class="cx" style="display: block; padding: 0 10px">
</span><span class="cx" style="display: block; padding: 0 10px"> /**
</span></span></pre>
</div>
</div>
</body>
</html>