From 7c1662cba0b620b7c513de8ed6cf0e85b1aa5cea Mon Sep 17 00:00:00 2001 From: Jonathan Desrosiers Date: Thu, 3 Oct 2019 20:38:08 +0000 Subject: [PATCH] Docs: Fix code example for removing internal pointers. Props daleharrison, swissspidy, garrett-eclipse, luciano-croce, jrf, desrosj. Fixes #45529. git-svn-id: https://develop.svn.wordpress.org/trunk@46381 602fd350-edb4-49c9-b593-d223f7449a82 --- src/wp-admin/includes/class-wp-internal-pointers.php | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/src/wp-admin/includes/class-wp-internal-pointers.php b/src/wp-admin/includes/class-wp-internal-pointers.php index 36bd3338ab..f025af8425 100644 --- a/src/wp-admin/includes/class-wp-internal-pointers.php +++ b/src/wp-admin/includes/class-wp-internal-pointers.php @@ -22,7 +22,14 @@ final class WP_Internal_Pointers { * 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. */