<!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>[54865] trunk/tests/phpunit: Tests: Correct references to `set_up()` and `tear_down()` in various DocBlocks.</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/54865">54865</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/54865","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>2022-11-22 21:25:27 +0000 (Tue, 22 Nov 2022)</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'>Tests: Correct references to `set_up()` and `tear_down()` in various DocBlocks.
The `setUp()` and `tearDown()` methods were renamed to `set_up()` and `tear_down()`, respectively, as part of implementing the `void` return type solution for PHPUnit 8.0.
Follow-up to <a href="https://core.trac.wordpress.org/changeset/29120">[29120]</a>, <a href="https://core.trac.wordpress.org/changeset/29251">[29251]</a>, <a href="https://core.trac.wordpress.org/changeset/30277">[30277]</a>, <a href="https://core.trac.wordpress.org/changeset/32173">[32173]</a>, <a href="https://core.trac.wordpress.org/changeset/32806">[32806]</a>, <a href="https://core.trac.wordpress.org/changeset/38829">[38829]</a>, <a href="https://core.trac.wordpress.org/changeset/42379">[42379]</a>, <a href="https://core.trac.wordpress.org/changeset/50450">[50450]</a>, <a href="https://core.trac.wordpress.org/changeset/51276">[51276]</a>, <a href="https://core.trac.wordpress.org/changeset/51568">[51568]</a>.
See <a href="https://core.trac.wordpress.org/ticket/56793">#56793</a>.</pre>
<h3>Modified Paths</h3>
<ul>
<li><a href="#trunktestsphpunitincludesabstracttestcasephp">trunk/tests/phpunit/includes/abstract-testcase.php</a></li>
<li><a href="#trunktestsphpunitincludestestcasecanonicalphp">trunk/tests/phpunit/includes/testcase-canonical.php</a></li>
<li><a href="#trunktestsphpunittestscustomizecustomcsssettingphp">trunk/tests/phpunit/tests/customize/custom-css-setting.php</a></li>
<li><a href="#trunktestsphpunittestscustomizenavmenuitemsettingphp">trunk/tests/phpunit/tests/customize/nav-menu-item-setting.php</a></li>
<li><a href="#trunktestsphpunittestscustomizenavmenusettingphp">trunk/tests/phpunit/tests/customize/nav-menu-setting.php</a></li>
<li><a href="#trunktestsphpunittestscustomizenavmenusphp">trunk/tests/phpunit/tests/customize/nav-menus.php</a></li>
<li><a href="#trunktestsphpunittestsdbdbDeltaphp">trunk/tests/phpunit/tests/db/dbDelta.php</a></li>
<li><a href="#trunktestsphpunittestsquerypostStatusphp">trunk/tests/phpunit/tests/query/postStatus.php</a></li>
<li><a href="#trunktestsphpunittestsusercapabilitiesphp">trunk/tests/phpunit/tests/user/capabilities.php</a></li>
</ul>
</div>
<div id="patch">
<h3>Diff</h3>
<a id="trunktestsphpunitincludesabstracttestcasephp"></a>
<div class="modfile"><h4 style="background-color: #eee; color: inherit; margin: 1em 0; padding: 1.3em; font-size: 115%">Modified: trunk/tests/phpunit/includes/abstract-testcase.php</h4>
<pre class="diff"><span>
<span class="info" style="display: block; padding: 0 10px; color: #888">--- trunk/tests/phpunit/includes/abstract-testcase.php 2022-11-22 20:17:08 UTC (rev 54864)
+++ trunk/tests/phpunit/includes/abstract-testcase.php 2022-11-22 21:25:27 UTC (rev 54865)
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -322,7 +322,7 @@
</span><span class="cx" style="display: block; padding: 0 10px"> * Saves the action and filter-related globals so they can be restored later.
</span><span class="cx" style="display: block; padding: 0 10px"> *
</span><span class="cx" style="display: block; padding: 0 10px"> * Stores $wp_actions, $wp_current_filter, and $wp_filter on a class variable
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- * so they can be restored on tearDown() using _restore_hooks().
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ * so they can be restored on tear_down() using _restore_hooks().
</ins><span class="cx" style="display: block; padding: 0 10px"> *
</span><span class="cx" style="display: block; padding: 0 10px"> * @global array $wp_actions
</span><span class="cx" style="display: block; padding: 0 10px"> * @global array $wp_current_filter
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -340,7 +340,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"> /**
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- * Restores the hook-related globals to their state at setUp()
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ * Restores the hook-related globals to their state at set_up()
</ins><span class="cx" style="display: block; padding: 0 10px"> * so that future tests aren't affected by hooks set during this last test.
</span><span class="cx" style="display: block; padding: 0 10px"> *
</span><span class="cx" style="display: block; padding: 0 10px"> * @global array $wp_actions
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -1365,11 +1365,12 @@
</span><span class="cx" style="display: block; padding: 0 10px"> /**
</span><span class="cx" style="display: block; padding: 0 10px"> * Deletes files added to the `uploads` directory during tests.
</span><span class="cx" style="display: block; padding: 0 10px"> *
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- * This method works in tandem with the `setUp()` and `rmdir()` methods:
- * - `setUp()` scans the `uploads` directory before every test, and stores its contents inside of the
- * `$ignore_files` property.
- * - `rmdir()` and its helper methods only delete files that are not listed in the `$ignore_files` property. If
- * called during `tearDown()` in tests, this will only delete files added during the previously run test.
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ * This method works in tandem with the `set_up()` and `rmdir()` methods:
+ * - `set_up()` scans the `uploads` directory before every test, and stores
+ * its contents inside of the `$ignore_files` property.
+ * - `rmdir()` and its helper methods only delete files that are not listed
+ * in the `$ignore_files` property. If called during `tear_down()` in tests,
+ * this will only delete files added during the previously run test.
</ins><span class="cx" style="display: block; padding: 0 10px"> */
</span><span class="cx" style="display: block; padding: 0 10px"> public function remove_added_uploads() {
</span><span class="cx" style="display: block; padding: 0 10px"> $uploads = wp_upload_dir();
</span></span></pre></div>
<a id="trunktestsphpunitincludestestcasecanonicalphp"></a>
<div class="modfile"><h4 style="background-color: #eee; color: inherit; margin: 1em 0; padding: 1.3em; font-size: 115%">Modified: trunk/tests/phpunit/includes/testcase-canonical.php</h4>
<pre class="diff"><span>
<span class="info" style="display: block; padding: 0 10px; color: #888">--- trunk/tests/phpunit/includes/testcase-canonical.php 2022-11-22 20:17:08 UTC (rev 54864)
+++ trunk/tests/phpunit/includes/testcase-canonical.php 2022-11-22 21:25:27 UTC (rev 54865)
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -37,7 +37,7 @@
</span><span class="cx" style="display: block; padding: 0 10px"> /**
</span><span class="cx" style="display: block; padding: 0 10px"> * Generate fixtures to be shared between canonical tests.
</span><span class="cx" style="display: block; padding: 0 10px"> *
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- * Abstracted here because it's invoked by setUpBeforeClass() in more than one class.
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ * Abstracted here because it's invoked by wpSetUpBeforeClass() in more than one class.
</ins><span class="cx" style="display: block; padding: 0 10px"> *
</span><span class="cx" style="display: block; padding: 0 10px"> * @since 4.1.0
</span><span class="cx" style="display: block; padding: 0 10px"> */
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -46,7 +46,7 @@
</span><span class="cx" style="display: block; padding: 0 10px"> self::$author_id = $factory->user->create( array( 'user_login' => 'canonical-author' ) );
</span><span class="cx" style="display: block; padding: 0 10px">
</span><span class="cx" style="display: block; padding: 0 10px"> /*
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- * Also set in self::setUp(), but we must configure here to make sure that
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ * Also set in self::set_up(), but we must configure here to make sure that
</ins><span class="cx" style="display: block; padding: 0 10px"> * post authorship is properly attributed for fixtures.
</span><span class="cx" style="display: block; padding: 0 10px"> */
</span><span class="cx" style="display: block; padding: 0 10px"> wp_set_current_user( self::$author_id );
</span></span></pre></div>
<a id="trunktestsphpunittestscustomizecustomcsssettingphp"></a>
<div class="modfile"><h4 style="background-color: #eee; color: inherit; margin: 1em 0; padding: 1.3em; font-size: 115%">Modified: trunk/tests/phpunit/tests/customize/custom-css-setting.php</h4>
<pre class="diff"><span>
<span class="info" style="display: block; padding: 0 10px; color: #888">--- trunk/tests/phpunit/tests/customize/custom-css-setting.php 2022-11-22 20:17:08 UTC (rev 54864)
+++ trunk/tests/phpunit/tests/customize/custom-css-setting.php 2022-11-22 21:25:27 UTC (rev 54865)
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -25,7 +25,7 @@
</span><span class="cx" style="display: block; padding: 0 10px"> /**
</span><span class="cx" style="display: block; padding: 0 10px"> * Set up the test case.
</span><span class="cx" style="display: block; padding: 0 10px"> *
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- * @see WP_UnitTestCase::setup()
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ * @see WP_UnitTestCase_Base::set_up()
</ins><span class="cx" style="display: block; padding: 0 10px"> */
</span><span class="cx" style="display: block; padding: 0 10px"> public function set_up() {
</span><span class="cx" style="display: block; padding: 0 10px"> parent::set_up();
</span></span></pre></div>
<a id="trunktestsphpunittestscustomizenavmenuitemsettingphp"></a>
<div class="modfile"><h4 style="background-color: #eee; color: inherit; margin: 1em 0; padding: 1.3em; font-size: 115%">Modified: trunk/tests/phpunit/tests/customize/nav-menu-item-setting.php</h4>
<pre class="diff"><span>
<span class="info" style="display: block; padding: 0 10px; color: #888">--- trunk/tests/phpunit/tests/customize/nav-menu-item-setting.php 2022-11-22 20:17:08 UTC (rev 54864)
+++ trunk/tests/phpunit/tests/customize/nav-menu-item-setting.php 2022-11-22 21:25:27 UTC (rev 54865)
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -16,7 +16,7 @@
</span><span class="cx" style="display: block; padding: 0 10px"> /**
</span><span class="cx" style="display: block; padding: 0 10px"> * Set up a test case.
</span><span class="cx" style="display: block; padding: 0 10px"> *
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- * @see WP_UnitTestCase::setup()
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ * @see WP_UnitTestCase_Base::set_up()
</ins><span class="cx" style="display: block; padding: 0 10px"> */
</span><span class="cx" style="display: block; padding: 0 10px"> public function set_up() {
</span><span class="cx" style="display: block; padding: 0 10px"> parent::set_up();
</span></span></pre></div>
<a id="trunktestsphpunittestscustomizenavmenusettingphp"></a>
<div class="modfile"><h4 style="background-color: #eee; color: inherit; margin: 1em 0; padding: 1.3em; font-size: 115%">Modified: trunk/tests/phpunit/tests/customize/nav-menu-setting.php</h4>
<pre class="diff"><span>
<span class="info" style="display: block; padding: 0 10px; color: #888">--- trunk/tests/phpunit/tests/customize/nav-menu-setting.php 2022-11-22 20:17:08 UTC (rev 54864)
+++ trunk/tests/phpunit/tests/customize/nav-menu-setting.php 2022-11-22 21:25:27 UTC (rev 54865)
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -17,7 +17,7 @@
</span><span class="cx" style="display: block; padding: 0 10px"> /**
</span><span class="cx" style="display: block; padding: 0 10px"> * Set up a test case.
</span><span class="cx" style="display: block; padding: 0 10px"> *
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- * @see WP_UnitTestCase::setup()
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ * @see WP_UnitTestCase_Base::set_up()
</ins><span class="cx" style="display: block; padding: 0 10px"> */
</span><span class="cx" style="display: block; padding: 0 10px"> public function set_up() {
</span><span class="cx" style="display: block; padding: 0 10px"> parent::set_up();
</span></span></pre></div>
<a id="trunktestsphpunittestscustomizenavmenusphp"></a>
<div class="modfile"><h4 style="background-color: #eee; color: inherit; margin: 1em 0; padding: 1.3em; font-size: 115%">Modified: trunk/tests/phpunit/tests/customize/nav-menus.php</h4>
<pre class="diff"><span>
<span class="info" style="display: block; padding: 0 10px; color: #888">--- trunk/tests/phpunit/tests/customize/nav-menus.php 2022-11-22 20:17:08 UTC (rev 54864)
+++ trunk/tests/phpunit/tests/customize/nav-menus.php 2022-11-22 21:25:27 UTC (rev 54865)
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -17,7 +17,7 @@
</span><span class="cx" style="display: block; padding: 0 10px"> /**
</span><span class="cx" style="display: block; padding: 0 10px"> * Set up a test case.
</span><span class="cx" style="display: block; padding: 0 10px"> *
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- * @see WP_UnitTestCase::setup()
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ * @see WP_UnitTestCase_Base::set_up()
</ins><span class="cx" style="display: block; padding: 0 10px"> */
</span><span class="cx" style="display: block; padding: 0 10px"> public function set_up() {
</span><span class="cx" style="display: block; padding: 0 10px"> parent::set_up();
</span></span></pre></div>
<a id="trunktestsphpunittestsdbdbDeltaphp"></a>
<div class="modfile"><h4 style="background-color: #eee; color: inherit; margin: 1em 0; padding: 1.3em; font-size: 115%">Modified: trunk/tests/phpunit/tests/db/dbDelta.php</h4>
<pre class="diff"><span>
<span class="info" style="display: block; padding: 0 10px; color: #888">--- trunk/tests/phpunit/tests/db/dbDelta.php 2022-11-22 20:17:08 UTC (rev 54864)
+++ trunk/tests/phpunit/tests/db/dbDelta.php 2022-11-22 21:25:27 UTC (rev 54865)
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -99,7 +99,7 @@
</span><span class="cx" style="display: block; padding: 0 10px">
</span><span class="cx" style="display: block; padding: 0 10px"> parent::tear_down();
</span><span class="cx" style="display: block; padding: 0 10px">
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- // This has to be called after the parent `tearDown()` method.
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ // This has to be called after the parent `tear_down()` method.
</ins><span class="cx" style="display: block; padding: 0 10px"> $wpdb->query( "DROP TABLE IF EXISTS {$wpdb->prefix}dbdelta_test" );
</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="trunktestsphpunittestsquerypostStatusphp"></a>
<div class="modfile"><h4 style="background-color: #eee; color: inherit; margin: 1em 0; padding: 1.3em; font-size: 115%">Modified: trunk/tests/phpunit/tests/query/postStatus.php</h4>
<pre class="diff"><span>
<span class="info" style="display: block; padding: 0 10px; color: #888">--- trunk/tests/phpunit/tests/query/postStatus.php 2022-11-22 20:17:08 UTC (rev 54864)
+++ trunk/tests/phpunit/tests/query/postStatus.php 2022-11-22 21:25:27 UTC (rev 54865)
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -87,7 +87,7 @@
</span><span class="cx" style="display: block; padding: 0 10px"> * Register custom post types and statuses used in multiple tests.
</span><span class="cx" style="display: block; padding: 0 10px"> *
</span><span class="cx" style="display: block; padding: 0 10px"> * CPTs and CPSs are reset between each test run so need to be registered
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- * in both the wpSetUpBeforeClass() and setUp() methods.
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ * in both the wpSetUpBeforeClass() and set_up() methods.
</ins><span class="cx" style="display: block; padding: 0 10px"> */
</span><span class="cx" style="display: block; padding: 0 10px"> public static function register_custom_post_objects() {
</span><span class="cx" style="display: block; padding: 0 10px"> register_post_type(
</span></span></pre></div>
<a id="trunktestsphpunittestsusercapabilitiesphp"></a>
<div class="modfile"><h4 style="background-color: #eee; color: inherit; margin: 1em 0; padding: 1.3em; font-size: 115%">Modified: trunk/tests/phpunit/tests/user/capabilities.php</h4>
<pre class="diff"><span>
<span class="info" style="display: block; padding: 0 10px; color: #888">--- trunk/tests/phpunit/tests/user/capabilities.php 2022-11-22 20:17:08 UTC (rev 54864)
+++ trunk/tests/phpunit/tests/user/capabilities.php 2022-11-22 21:25:27 UTC (rev 54865)
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -1707,7 +1707,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"> public function nullify_current_user() {
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- // Prevents fatal errors in ::tearDown()'s and other uses of restore_current_blog().
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ // Prevents fatal errors in ::tear_down()'s and other uses of restore_current_blog().
</ins><span class="cx" style="display: block; padding: 0 10px"> $function_stack = wp_debug_backtrace_summary( null, 0, false );
</span><span class="cx" style="display: block; padding: 0 10px"> if ( in_array( 'restore_current_blog', $function_stack, true ) ) {
</span><span class="cx" style="display: block; padding: 0 10px"> return;
</span></span></pre>
</div>
</div>
</body>
</html>