Add @static* annotations where they are missing.

Initialize all static vars that are not, most to `null`.

See #32444.


git-svn-id: https://develop.svn.wordpress.org/trunk@32650 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
Scott Taylor
2015-05-29 15:42:40 +00:00
parent cced199188
commit c8a44d437a
35 changed files with 172 additions and 52 deletions

View File

@@ -1621,7 +1621,7 @@ function wp_normalize_path( $path ) {
* @return string Writable temporary directory.
*/
function get_temp_dir() {
static $temp;
static $temp = '';
if ( defined('WP_TEMP_DIR') )
return trailingslashit(WP_TEMP_DIR);
@@ -4483,7 +4483,7 @@ function send_frame_options_header() {
* @return array Array of allowed protocols.
*/
function wp_allowed_protocols() {
static $protocols;
static $protocols = array();
if ( empty( $protocols ) ) {
$protocols = array( 'http', 'https', 'ftp', 'ftps', 'mailto', 'news', 'irc', 'gopher', 'nntp', 'feed', 'telnet', 'mms', 'rtsp', 'svn', 'tel', 'fax', 'xmpp', 'webcal' );