WordPress.org

Make WordPress Core

Ticket #18693: show_wp_pointer.18693.diff

File show_wp_pointer.18693.diff, 945 bytes (added by scribu, 3 years ago)
  • wp-admin/includes/template.php

    diff --git wp-admin/includes/template.php wp-admin/includes/template.php
    index d2e5ca2..dedd36e 100644
    function wp_pointer_enqueue( $hook_suffix ) { 
    16541654 
    16551655        $dismissed = explode( ',', (string) get_user_meta( get_current_user_id(), 'dismissed_wp_pointers', true ) ); 
    16561656 
    1657         if ( ! in_array( 'wp330-admin-bar', $dismissed ) && apply_filters( 'show_wp_pointer_admin_bar', true ) ) { 
    1658                 $enqueue = true; 
    1659                 add_action( 'admin_print_footer_scripts', '_wp_pointer_print_admin_bar' ); 
    1660         } 
     1657        $pointer_id = 'wp330-admin-bar'; 
    16611658 
    1662         if ( $enqueue ) { 
     1659        if ( apply_filters( 'show_wp_pointer', !in_array( $pointer_id, $dismissed ), $pointer_id ) ) { 
    16631660                wp_enqueue_style( 'wp-pointer' ); 
    16641661                wp_enqueue_script( 'wp-pointer' ); 
     1662                add_action( 'admin_print_footer_scripts', '_wp_pointer_print_admin_bar' ); 
    16651663        } 
    16661664} 
    16671665add_action( 'admin_enqueue_scripts', 'wp_pointer_enqueue' );