<!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>[49963] trunk/src/wp-includes: Docs: In various `@return` tags, list the expected type first, instead of `false`.</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 { white-space: pre-line; 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/49963">49963</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/49963","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>2021-01-15 20:06:50 +0000 (Fri, 15 Jan 2021)</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'>Docs: In various `@return` tags, list the expected type first, instead of `false`.
Follow-up to <a href="https://core.trac.wordpress.org/changeset/46696">[46696]</a>, <a href="https://core.trac.wordpress.org/changeset/47060">[47060]</a>, <a href="https://core.trac.wordpress.org/changeset/49926">[49926]</a>, <a href="https://core.trac.wordpress.org/changeset/49927">[49927]</a>, <a href="https://core.trac.wordpress.org/changeset/49929">[49929]</a>.
See <a href="https://core.trac.wordpress.org/ticket/51800">#51800</a>.</pre>
<h3>Modified Paths</h3>
<ul>
<li><a href="#trunksrcwpincludesclasswphttpencodingphp">trunk/src/wp-includes/class-wp-http-encoding.php</a></li>
<li><a href="#trunksrcwpincludescronphp">trunk/src/wp-includes/cron.php</a></li>
<li><a href="#trunksrcwpincludesl10nphp">trunk/src/wp-includes/l10n.php</a></li>
<li><a href="#trunksrcwpincludesnavmenuphp">trunk/src/wp-includes/nav-menu.php</a></li>
<li><a href="#trunksrcwpincludespostphp">trunk/src/wp-includes/post.php</a></li>
<li><a href="#trunksrcwpincludesshortcodesphp">trunk/src/wp-includes/shortcodes.php</a></li>
<li><a href="#trunksrcwpincludestaxonomyphp">trunk/src/wp-includes/taxonomy.php</a></li>
<li><a href="#trunksrcwpincludeswidgetsphp">trunk/src/wp-includes/widgets.php</a></li>
</ul>
</div>
<div id="patch">
<h3>Diff</h3>
<a id="trunksrcwpincludesclasswphttpencodingphp"></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-http-encoding.php</h4>
<pre class="diff"><span>
<span class="info" style="display: block; padding: 0 10px; color: #888">--- trunk/src/wp-includes/class-wp-http-encoding.php 2021-01-15 17:37:37 UTC (rev 49962)
+++ trunk/src/wp-includes/class-wp-http-encoding.php 2021-01-15 20:06:50 UTC (rev 49963)
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -27,7 +27,7 @@
</span><span class="cx" style="display: block; padding: 0 10px"> * @param int $level Optional. Compression level, 9 is highest. Default 9.
</span><span class="cx" style="display: block; padding: 0 10px"> * @param string $supports Optional, not used. When implemented it will choose
</span><span class="cx" style="display: block; padding: 0 10px"> * the right compression based on what the server supports.
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- * @return string|false False on failure.
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ * @return string|false Compressed string on success, false on failure.
</ins><span class="cx" style="display: block; padding: 0 10px"> */
</span><span class="cx" style="display: block; padding: 0 10px"> public static function compress( $raw, $level = 9, $supports = null ) {
</span><span class="cx" style="display: block; padding: 0 10px"> return gzdeflate( $raw, $level );
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -45,7 +45,7 @@
</span><span class="cx" style="display: block; padding: 0 10px"> *
</span><span class="cx" style="display: block; padding: 0 10px"> * @param string $compressed String to decompress.
</span><span class="cx" style="display: block; padding: 0 10px"> * @param int $length The optional length of the compressed data.
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- * @return string|false False on failure.
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ * @return string|false Decompressed string on success, false on failure.
</ins><span class="cx" style="display: block; padding: 0 10px"> */
</span><span class="cx" style="display: block; padding: 0 10px"> public static function decompress( $compressed, $length = null ) {
</span><span class="cx" style="display: block; padding: 0 10px">
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -98,7 +98,7 @@
</span><span class="cx" style="display: block; padding: 0 10px"> * @link https://www.php.net/manual/en/function.gzinflate.php#77336
</span><span class="cx" style="display: block; padding: 0 10px"> *
</span><span class="cx" style="display: block; padding: 0 10px"> * @param string $gzData String to decompress.
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- * @return string|false False on failure.
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ * @return string|false Decompressed string on success, false on failure.
</ins><span class="cx" style="display: block; padding: 0 10px"> */
</span><span class="cx" style="display: block; padding: 0 10px"> public static function compatible_gzinflate( $gzData ) {
</span><span class="cx" style="display: block; padding: 0 10px">
</span></span></pre></div>
<a id="trunksrcwpincludescronphp"></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/cron.php</h4>
<pre class="diff"><span>
<span class="info" style="display: block; padding: 0 10px; color: #888">--- trunk/src/wp-includes/cron.php 2021-01-15 17:37:37 UTC (rev 49962)
+++ trunk/src/wp-includes/cron.php 2021-01-15 20:06:50 UTC (rev 49963)
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -865,7 +865,7 @@
</span><span class="cx" style="display: block; padding: 0 10px"> *
</span><span class="cx" style="display: block; padding: 0 10px"> * @param string $hook Action hook to identify the event.
</span><span class="cx" style="display: block; padding: 0 10px"> * @param array $args Optional. Arguments passed to the event's callback function.
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- * @return string|false False, if no schedule. Schedule name on success.
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ * @return string|false Schedule name on success, false if no schedule.
</ins><span class="cx" style="display: block; padding: 0 10px"> */
</span><span class="cx" style="display: block; padding: 0 10px"> function wp_get_schedule( $hook, $args = array() ) {
</span><span class="cx" style="display: block; padding: 0 10px"> $schedule = false;
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -947,7 +947,7 @@
</span><span class="cx" style="display: block; padding: 0 10px"> * @since 2.1.0
</span><span class="cx" style="display: block; padding: 0 10px"> * @access private
</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 array|false CRON info array.
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ * @return array|false Cron info array on success, false on failure.
</ins><span class="cx" style="display: block; padding: 0 10px"> */
</span><span class="cx" style="display: block; padding: 0 10px"> function _get_cron_array() {
</span><span class="cx" style="display: block; padding: 0 10px"> $cron = get_option( 'cron' );
</span></span></pre></div>
<a id="trunksrcwpincludesl10nphp"></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/l10n.php</h4>
<pre class="diff"><span>
<span class="info" style="display: block; padding: 0 10px; color: #888">--- trunk/src/wp-includes/l10n.php 2021-01-15 17:37:37 UTC (rev 49962)
+++ trunk/src/wp-includes/l10n.php 2021-01-15 20:06:50 UTC (rev 49963)
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -998,8 +998,8 @@
</span><span class="cx" style="display: block; padding: 0 10px"> * @param string $handle Name of the script to register a translation domain to.
</span><span class="cx" style="display: block; padding: 0 10px"> * @param string $domain Optional. Text domain. Default 'default'.
</span><span class="cx" style="display: block; padding: 0 10px"> * @param string $path Optional. The full file path to the directory containing translation files.
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- * @return string|false False if the script textdomain could not be loaded, the translated strings
- * in JSON encoding otherwise.
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ * @return string|false The translated strings in JSON encoding on success,
+ * false if the script textdomain could not be loaded.
</ins><span class="cx" style="display: block; padding: 0 10px"> */
</span><span class="cx" style="display: block; padding: 0 10px"> function load_script_textdomain( $handle, $domain = 'default', $path = null ) {
</span><span class="cx" style="display: block; padding: 0 10px"> $wp_scripts = wp_scripts();
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -1129,7 +1129,8 @@
</span><span class="cx" style="display: block; padding: 0 10px"> * @param string|false $file Path to the translation file to load. False if there isn't one.
</span><span class="cx" style="display: block; padding: 0 10px"> * @param string $handle Name of the script to register a translation domain to.
</span><span class="cx" style="display: block; padding: 0 10px"> * @param string $domain The text domain.
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- * @return string|false The JSON-encoded translated strings for the given script handle and text domain. False if there are none.
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ * @return string|false The JSON-encoded translated strings for the given script handle and text domain.
+ * False if there are none.
</ins><span class="cx" style="display: block; padding: 0 10px"> */
</span><span class="cx" style="display: block; padding: 0 10px"> function load_script_translations( $file, $handle, $domain ) {
</span><span class="cx" style="display: block; padding: 0 10px"> /**
</span></span></pre></div>
<a id="trunksrcwpincludesnavmenuphp"></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/nav-menu.php</h4>
<pre class="diff"><span>
<span class="info" style="display: block; padding: 0 10px; color: #888">--- trunk/src/wp-includes/nav-menu.php 2021-01-15 17:37:37 UTC (rev 49962)
+++ trunk/src/wp-includes/nav-menu.php 2021-01-15 20:06:50 UTC (rev 49963)
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -13,7 +13,7 @@
</span><span class="cx" style="display: block; padding: 0 10px"> * @since 3.0.0
</span><span class="cx" style="display: block; padding: 0 10px"> *
</span><span class="cx" style="display: block; padding: 0 10px"> * @param int|string|WP_Term $menu Menu ID, slug, name, or object.
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- * @return WP_Term|false False if $menu param isn't supplied or term does not exist, menu object if successful.
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ * @return WP_Term|false Menu object on success, false if $menu param isn't supplied or term does not exist.
</ins><span class="cx" style="display: block; padding: 0 10px"> */
</span><span class="cx" style="display: block; padding: 0 10px"> function wp_get_nav_menu_object( $menu ) {
</span><span class="cx" style="display: block; padding: 0 10px"> $menu_obj = false;
</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 2021-01-15 17:37:37 UTC (rev 49962)
+++ trunk/src/wp-includes/post.php 2021-01-15 20:06:50 UTC (rev 49963)
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -6223,7 +6223,7 @@
</span><span class="cx" style="display: block; padding: 0 10px"> * @since 4.6.0
</span><span class="cx" style="display: block; padding: 0 10px"> *
</span><span class="cx" style="display: block; padding: 0 10px"> * @param int $post_id Optional. Attachment ID. Default is the ID of the global `$post`.
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- * @return string|false False on failure. Attachment caption on success.
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ * @return string|false Attachment caption on success, false on failure.
</ins><span class="cx" style="display: block; padding: 0 10px"> */
</span><span class="cx" style="display: block; padding: 0 10px"> function wp_get_attachment_caption( $post_id = 0 ) {
</span><span class="cx" style="display: block; padding: 0 10px"> $post_id = (int) $post_id;
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -6256,7 +6256,7 @@
</span><span class="cx" style="display: block; padding: 0 10px"> * @since 2.1.0
</span><span class="cx" style="display: block; padding: 0 10px"> *
</span><span class="cx" style="display: block; padding: 0 10px"> * @param int $post_id Optional. Attachment ID. Default 0.
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- * @return string|false False on failure. Thumbnail file path on success.
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ * @return string|false Thumbnail file path on success, false on failure.
</ins><span class="cx" style="display: block; padding: 0 10px"> */
</span><span class="cx" style="display: block; padding: 0 10px"> function wp_get_attachment_thumb_file( $post_id = 0 ) {
</span><span class="cx" style="display: block; padding: 0 10px"> $post_id = (int) $post_id;
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -6296,7 +6296,7 @@
</span><span class="cx" style="display: block; padding: 0 10px"> * @since 2.1.0
</span><span class="cx" style="display: block; padding: 0 10px"> *
</span><span class="cx" style="display: block; padding: 0 10px"> * @param int $post_id Optional. Attachment ID. Default 0.
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- * @return string|false False on failure. Thumbnail URL on success.
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ * @return string|false Thumbnail URL on success, false on failure.
</ins><span class="cx" style="display: block; padding: 0 10px"> */
</span><span class="cx" style="display: block; padding: 0 10px"> function wp_get_attachment_thumb_url( $post_id = 0 ) {
</span><span class="cx" style="display: block; padding: 0 10px"> $post_id = (int) $post_id;
</span></span></pre></div>
<a id="trunksrcwpincludesshortcodesphp"></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/shortcodes.php</h4>
<pre class="diff"><span>
<span class="info" style="display: block; padding: 0 10px; color: #888">--- trunk/src/wp-includes/shortcodes.php 2021-01-15 17:37:37 UTC (rev 49962)
+++ trunk/src/wp-includes/shortcodes.php 2021-01-15 20:06:50 UTC (rev 49963)
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -299,8 +299,8 @@
</span><span class="cx" style="display: block; padding: 0 10px"> *
</span><span class="cx" style="display: block; padding: 0 10px"> * @global array $shortcode_tags
</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 $m Regular expression match array
- * @return string|false False on failure.
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ * @param array $m Regular expression match array.
+ * @return string|false Shortcode output on success, false on failure.
</ins><span class="cx" style="display: block; padding: 0 10px"> */
</span><span class="cx" style="display: block; padding: 0 10px"> function do_shortcode_tag( $m ) {
</span><span class="cx" style="display: block; padding: 0 10px"> global $shortcode_tags;
</span></span></pre></div>
<a id="trunksrcwpincludestaxonomyphp"></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/taxonomy.php</h4>
<pre class="diff"><span>
<span class="info" style="display: block; padding: 0 10px; color: #888">--- trunk/src/wp-includes/taxonomy.php 2021-01-15 17:37:37 UTC (rev 49962)
+++ trunk/src/wp-includes/taxonomy.php 2021-01-15 20:06:50 UTC (rev 49963)
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -4724,7 +4724,7 @@
</span><span class="cx" style="display: block; padding: 0 10px"> *
</span><span class="cx" style="display: block; padding: 0 10px"> * @param int $term_id Term ID.
</span><span class="cx" style="display: block; padding: 0 10px"> * @param string $taxonomy Taxonomy name.
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- * @return int|false False on error.
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ * @return int|false Parent term ID on success, false on failure.
</ins><span class="cx" style="display: block; padding: 0 10px"> */
</span><span class="cx" style="display: block; padding: 0 10px"> function wp_get_term_taxonomy_parent_id( $term_id, $taxonomy ) {
</span><span class="cx" style="display: block; padding: 0 10px"> $term = get_term( $term_id, $taxonomy );
</span></span></pre></div>
<a id="trunksrcwpincludeswidgetsphp"></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.php</h4>
<pre class="diff"><span>
<span class="info" style="display: block; padding: 0 10px; color: #888">--- trunk/src/wp-includes/widgets.php 2021-01-15 17:37:37 UTC (rev 49962)
+++ trunk/src/wp-includes/widgets.php 2021-01-15 20:06:50 UTC (rev 49963)
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -879,11 +879,15 @@
</span><span class="cx" style="display: block; padding: 0 10px"> *
</span><span class="cx" style="display: block; padding: 0 10px"> * @global array $wp_registered_widgets
</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 callable|false $callback Optional, Widget callback to check. Default false.
- * @param int|false $widget_id Optional. Widget ID. Optional, but needed for checking. Default false.
- * @param string|false $id_base Optional. The base ID of a widget created by extending WP_Widget. Default false.
- * @param bool $skip_inactive Optional. Whether to check in 'wp_inactive_widgets'. Default true.
- * @return string|false False if widget is not active or id of sidebar in which the widget is active.
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ * @param callable|false $callback Optional. Widget callback to check. Default false.
+ * @param int|false $widget_id Optional. Widget ID. Optional, but needed for checking.
+ * Default false.
+ * @param string|false $id_base Optional. The base ID of a widget created by extending WP_Widget.
+ * Default false.
+ * @param bool $skip_inactive Optional. Whether to check in 'wp_inactive_widgets'.
+ * Default true.
+ * @return string|false ID of the sidebar in which the widget is active,
+ * false if the widget is not active.
</ins><span class="cx" style="display: block; padding: 0 10px"> */
</span><span class="cx" style="display: block; padding: 0 10px"> function is_active_widget( $callback = false, $widget_id = false, $id_base = false, $skip_inactive = true ) {
</span><span class="cx" style="display: block; padding: 0 10px"> global $wp_registered_widgets;
</span></span></pre>
</div>
</div>
</body>
</html>