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

@@ -605,17 +605,19 @@ function list_meta( $meta ) {
*
* @since 2.5.0
*
* @staticvar string $update_nonce
*
* @param array $entry
* @param int $count
* @return string
*/
function _list_meta_row( $entry, &$count ) {
static $update_nonce = false;
static $update_nonce = '';
if ( is_protected_meta( $entry['meta_key'], 'post' ) )
return '';
if ( !$update_nonce )
if ( ! $update_nonce )
$update_nonce = wp_create_nonce( 'add-meta' );
$r = '';
@@ -1991,6 +1993,8 @@ final class WP_Internal_Pointers {
* Individual pointers (e.g. wp390_widgets) can be disabled using the following:
* remove_action( 'admin_print_footer_scripts', array( 'WP_Internal_Pointers', 'pointer_wp390_widgets' ) );
*
* @static
*
* @param string $hook_suffix The current admin page.
*/
public static function enqueue_scripts( $hook_suffix ) {
@@ -2047,6 +2051,8 @@ final class WP_Internal_Pointers {
*
* @since 3.3.0
*
* @static
*
* @param string $pointer_id The pointer ID.
* @param string $selector The HTML elements, on which the pointer should be attached.
* @param array $args Arguments to be passed to the pointer JS (see wp-pointer.js).
@@ -2094,6 +2100,9 @@ final class WP_Internal_Pointers {
public static function pointer_wp350_media() {}
public static function pointer_wp360_revisions() {}
/**
* @static
*/
public static function pointer_wp360_locks() {
if ( ! is_multi_author() ) {
return;
@@ -2108,6 +2117,9 @@ final class WP_Internal_Pointers {
) );
}
/**
* @static
*/
public static function pointer_wp390_widgets() {
if ( ! current_theme_supports( 'widgets' ) ) {
return;
@@ -2165,6 +2177,8 @@ final class WP_Internal_Pointers {
*
* @since 3.3.0
*
* @static
*
* @param int $user_id User ID.
*/
public static function dismiss_pointers_for_new_users( $user_id ) {