diff -r c7c34916027a -r 177826044cd9 wp/wp-admin/includes/class-wp-internal-pointers.php --- a/wp/wp-admin/includes/class-wp-internal-pointers.php Mon Oct 14 18:06:33 2019 +0200 +++ b/wp/wp-admin/includes/class-wp-internal-pointers.php Mon Oct 14 18:28:13 2019 +0200 @@ -24,8 +24,6 @@ * 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 ) { @@ -43,12 +41,13 @@ * ) */ $registered_pointers = array( - 'index.php' => 'wp496_privacy', + //None currently. ); // Check if screen related pointer is registered - if ( empty( $registered_pointers[ $hook_suffix ] ) ) + if ( empty( $registered_pointers[ $hook_suffix ] ) ) { return; + } $pointers = (array) $registered_pointers[ $hook_suffix ]; @@ -66,11 +65,7 @@ * ) */ $caps_required = array( - 'wp496_privacy' => array( - 'manage_privacy_options', - 'export_others_personal_data', - 'erase_others_personal_data', - ), + // None currently. ); // Get dismissed pointers @@ -80,8 +75,9 @@ foreach ( array_diff( $pointers, $dismissed ) as $pointer ) { if ( isset( $caps_required[ $pointer ] ) ) { foreach ( $caps_required[ $pointer ] as $cap ) { - if ( ! current_user_can( $cap ) ) + if ( ! current_user_can( $cap ) ) { continue 2; + } } } @@ -90,8 +86,9 @@ $got_pointers = true; } - if ( ! $got_pointers ) + if ( ! $got_pointers ) { return; + } // Add pointers script and style to queue wp_enqueue_style( 'wp-pointer' ); @@ -103,15 +100,14 @@ * * @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). */ private static function print_js( $pointer_id, $selector, $args ) { - if ( empty( $pointer_id ) || empty( $selector ) || empty( $args ) || empty( $args['content'] ) ) + if ( empty( $pointer_id ) || empty( $selector ) || empty( $args ) || empty( $args['content'] ) ) { return; + } ?>