--- a/wp/wp-admin/includes/class-wp-internal-pointers.php Tue Oct 22 16:11:46 2019 +0200
+++ b/wp/wp-admin/includes/class-wp-internal-pointers.php Tue Dec 15 13:49:49 2020 +0100
@@ -22,7 +22,14 @@
* remove_action( 'admin_enqueue_scripts', array( 'WP_Internal_Pointers', 'enqueue_scripts' ) );
*
* 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' ) );
+ *
+ * function yourprefix_remove_pointers() {
+ * remove_action(
+ * 'admin_print_footer_scripts',
+ * array( 'WP_Internal_Pointers', 'pointer_wp390_widgets' )
+ * );
+ * }
+ * add_action( 'admin_enqueue_scripts', 'yourprefix_remove_pointers', 11 );
*
* @param string $hook_suffix The current admin page.
*/
@@ -41,10 +48,10 @@
* )
*/
$registered_pointers = array(
- //None currently.
+ // None currently.
);
- // Check if screen related pointer is registered
+ // Check if screen related pointer is registered.
if ( empty( $registered_pointers[ $hook_suffix ] ) ) {
return;
}
@@ -68,7 +75,7 @@
// None currently.
);
- // Get dismissed pointers
+ // Get dismissed pointers.
$dismissed = explode( ',', (string) get_user_meta( get_current_user_id(), 'dismissed_wp_pointers', true ) );
$got_pointers = false;
@@ -81,7 +88,7 @@
}
}
- // Bind pointer print function
+ // Bind pointer print function.
add_action( 'admin_print_footer_scripts', array( 'WP_Internal_Pointers', 'pointer_' . $pointer ) );
$got_pointers = true;
}
@@ -90,7 +97,7 @@
return;
}
- // Add pointers script and style to queue
+ // Add pointers script and style to queue.
wp_enqueue_style( 'wp-pointer' );
wp_enqueue_script( 'wp-pointer' );
}