Press This: the file for the WP_Press_This class should not produce side effects. Similar to what we did in r38355 for WP_Site_Icon, drop the instances of global instantiation for $wp_press_this via loading the file. The variable can be set inline when necessary. In most of those places, if the global is already set, the file does not load and stomp it currently.

See #37699.

Built from https://develop.svn.wordpress.org/trunk@38397


git-svn-id: http://core.svn.wordpress.org/trunk@38338 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
Scott Taylor
2016-08-27 06:07:29 +00:00
parent e6ed174135
commit 85d63f2af5
5 changed files with 5 additions and 7 deletions

View File

@@ -1516,9 +1516,3 @@ class WP_Press_This {
die();
}
}
/**
*
* @global WP_Press_This $wp_press_this
*/
$GLOBALS['wp_press_this'] = new WP_Press_This;