function maybe_add_pointers() {
    // Get default pointers that we want to create
    $default_keys = $this->initial_pointers();

    // Get pointers dismissed by user
    $dismissed = explode( ',', get_user_meta( get_current_user_id(), 'dismissed_wp_pointers', true ) );

    // Check that our pointers haven't been dismissed already
    $diff = array_diff_key( $default_keys, array_combine( $dismissed, $dismissed ) );

    // If we have some pointers to show, save them and start enqueuing assets to display them
    if ( !empty( $diff ) ) {
	$this->pointers = $diff;
	add_action( 'admin_enqueue_scripts', array( $this, 'admin_enqueue_assets' ) );

	foreach ( $diff as $pointer ) {
	  if ( isset( $pointer[ 'phpcode' ] ) ) {
	    add_action( 'admin_notices', $pointer[ 'phpcode' ] );
	  }
	}
    }
    $this->pointers[ 'l10n' ] = array( 'next' => __( 'Next' ) );
  }
function maybe_add_pointers() {
    // Get default pointers that we want to create
    $default_keys = $this->initial_pointers();

    // Get pointers dismissed by user
    $dismissed = explode( ',', get_user_meta( get_current_user_id(), 'dismissed_wp_pointers', true ) );

    // Check that our pointers haven't been dismissed already
    $diff = array_diff_key( $default_keys, array_combine( $dismissed, $dismissed ) );

    // If we have some pointers to show, save them and start enqueuing assets to display them
    if ( !empty( $diff ) ) {
	$this->pointers = $diff;
	add_action( 'admin_enqueue_scripts', array( $this, 'admin_enqueue_assets' ) );

	foreach ( $diff as $pointer ) {
	  if ( isset( $pointer[ 'phpcode' ] ) ) {
	    add_action( 'admin_notices', $pointer[ 'phpcode' ] );
	  }
	}
    }
    $this->pointers[ 'l10n' ] = array( 'next' => __( 'Next' ) );
  }
function maybe_add_pointers ( ) { // Get default pointers that we want to create $ default_keys = $ this -> initial_pointers ( ) ; // Get pointers dismissed by user $ dismissed = explode ( ',' , get_user_meta ( get_current_user_id ( ) , 'dismissed_wp_pointers' , true ) ) ; // Check that our pointers haven't been dismissed already $ diff = array_diff_key ( $ default_keys , array_combine ( $ dismissed , $ dismissed ) ) ; // If we have some pointers to show, save them and start enqueuing assets to display them if ( ! empty ( $ diff ) ) { $ this -> pointers = $ diff ; add_action ( 'admin_enqueue_scripts' , array ( $ this , 'admin_enqueue_assets' ) ) ; foreach ( $ diff as $ pointer ) { if ( isset ( $ pointer [ 'phpcode' ] ) ) { add_action ( 'admin_notices' , $ pointer [ 'phpcode' ] ) ; } } } $ this -> pointers [ 'l10n' ] = array ( 'next' => __ ( 'Next' ) ) ; }
Check that pointers haven't been dismissed already. If there are pointers to show, enqueue assets.

@since 1.0.0
Check that pointers haven t been dismissed already . If there are pointers to show enqueue assets .