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

@@ -19,6 +19,10 @@
*/
class WP_oEmbed {
public $providers = array();
/**
* @static
* @var array
*/
public static $early_providers = array();
private $compat_methods = array( '_fetch_with_format', '_parse_json', '_parse_xml', '_parse_body' );
@@ -611,15 +615,15 @@ class WP_oEmbed {
* @since 2.9.0
* @access private
*
* @see WP_oEmbed
* @staticvar WP_oEmbed $wp_oembed
*
* @return WP_oEmbed object.
*/
function _wp_oembed_get_object() {
static $wp_oembed;
static $wp_oembed = null;
if ( is_null($wp_oembed) )
if ( is_null( $wp_oembed ) ) {
$wp_oembed = new WP_oEmbed();
}
return $wp_oembed;
}