function initial_pointers() {
    global $pagenow;
    $defaults = array(
	  'class' => '',
	  'width' => 300, //only fixed value
	  'align' => 'middle',
	  'edge' => 'left',
	  'post_type' => array(),
	  'pages' => array(),
	  'icon_class' => ''
    );
    $screen = get_current_screen();
    $current_post_type = isset( $screen->post_type ) ? $screen->post_type : false;
    $search_pt = false;

    $pointers = apply_filters( $this->prefix . '-pointerplus_list', array(
		// Pointers are added through the 'initial_pointerplus' filter
		), $this->prefix );

    foreach ( $pointers as $key => $pointer ) {
	$pointers[ $key ] = wp_parse_args( $pointer, $defaults );
	$search_pt = false;
	// Clean from null ecc
	$pointers[ $key ][ 'post_type' ] = array_filter( $pointers[ $key ][ 'post_type' ] );
	if ( !empty( $pointers[ $key ][ 'post_type' ] ) ) {
	  if ( !empty( $current_post_type ) ) {
	    if ( is_array( $pointers[ $key ][ 'post_type' ] ) ) {
		// Search the post_type
		foreach ( $pointers[ $key ][ 'post_type' ] as $value ) {
		  if ( $value === $current_post_type ) {
		    $search_pt = true;
		  }
		}
		if ( $search_pt === false ) {
		  unset( $pointers[ $key ] );
		}
	    } else {
		new WP_Error( 'broke', __( 'PointerPlus Error: post_type is not an array!' ) );
	    }
	    // If not in CPT view remove all the pointers with post_type
	  } else {
	    unset( $pointers[ $key ] );
	  }
	}
	// Clean from null ecc
	if ( isset( $pointers[ $key ][ 'pages' ] ) ) {
	  if ( is_array( $pointers[ $key ][ 'pages' ] ) ) {
	    $pointers[ $key ][ 'pages' ] = array_filter( $pointers[ $key ][ 'pages' ] );
	  }
	  if ( !empty( $pointers[ $key ][ 'pages' ] ) ) {
	    if ( is_array( $pointers[ $key ][ 'pages' ] ) ) {
		// Search the page
		foreach ( $pointers[ $key ][ 'pages' ] as $value ) {
		  if ( $pagenow === $value ) {
		    $search_pt = true;
		  }
		}
		if ( $search_pt === false ) {
		  unset( $pointers[ $key ] );
		}
	    } else {
		new WP_Error( 'broke', __( 'PointerPlus Error: pages is not an array!' ) );
	    }
	  }
	}
    }

    return $pointers;
  }
function initial_pointers() {
    global $pagenow;
    $defaults = array(
	  'class' => '',
	  'width' => 300, //only fixed value
	  'align' => 'middle',
	  'edge' => 'left',
	  'post_type' => array(),
	  'pages' => array(),
	  'icon_class' => ''
    );
    $screen = get_current_screen();
    $current_post_type = isset( $screen->post_type ) ? $screen->post_type : false;
    $search_pt = false;

    $pointers = apply_filters( $this->prefix . '-pointerplus_list', array(
		// Pointers are added through the 'initial_pointerplus' filter
		), $this->prefix );

    foreach ( $pointers as $key => $pointer ) {
	$pointers[ $key ] = wp_parse_args( $pointer, $defaults );
	$search_pt = false;
	// Clean from null ecc
	$pointers[ $key ][ 'post_type' ] = array_filter( $pointers[ $key ][ 'post_type' ] );
	if ( !empty( $pointers[ $key ][ 'post_type' ] ) ) {
	  if ( !empty( $current_post_type ) ) {
	    if ( is_array( $pointers[ $key ][ 'post_type' ] ) ) {
		// Search the post_type
		foreach ( $pointers[ $key ][ 'post_type' ] as $value ) {
		  if ( $value === $current_post_type ) {
		    $search_pt = true;
		  }
		}
		if ( $search_pt === false ) {
		  unset( $pointers[ $key ] );
		}
	    } else {
		new WP_Error( 'broke', __( 'PointerPlus Error: post_type is not an array!' ) );
	    }
	    // If not in CPT view remove all the pointers with post_type
	  } else {
	    unset( $pointers[ $key ] );
	  }
	}
	// Clean from null ecc
	if ( isset( $pointers[ $key ][ 'pages' ] ) ) {
	  if ( is_array( $pointers[ $key ][ 'pages' ] ) ) {
	    $pointers[ $key ][ 'pages' ] = array_filter( $pointers[ $key ][ 'pages' ] );
	  }
	  if ( !empty( $pointers[ $key ][ 'pages' ] ) ) {
	    if ( is_array( $pointers[ $key ][ 'pages' ] ) ) {
		// Search the page
		foreach ( $pointers[ $key ][ 'pages' ] as $value ) {
		  if ( $pagenow === $value ) {
		    $search_pt = true;
		  }
		}
		if ( $search_pt === false ) {
		  unset( $pointers[ $key ] );
		}
	    } else {
		new WP_Error( 'broke', __( 'PointerPlus Error: pages is not an array!' ) );
	    }
	  }
	}
    }

    return $pointers;
  }
function initial_pointers ( ) { global $ pagenow ; $ defaults = array ( 'class' => '' , 'width' => 300 , //only fixed value 'align' => 'middle' , 'edge' => 'left' , 'post_type' => array ( ) , 'pages' => array ( ) , 'icon_class' => '' ) ; $ screen = get_current_screen ( ) ; $ current_post_type = isset ( $ screen -> post_type ) ? $ screen -> post_type : false ; $ search_pt = false ; $ pointers = apply_filters ( $ this -> prefix . '-pointerplus_list' , array ( // Pointers are added through the 'initial_pointerplus' filter ) , $ this -> prefix ) ; foreach ( $ pointers as $ key => $ pointer ) { $ pointers [ $ key ] = wp_parse_args ( $ pointer , $ defaults ) ; $ search_pt = false ; // Clean from null ecc $ pointers [ $ key ] [ 'post_type' ] = array_filter ( $ pointers [ $ key ] [ 'post_type' ] ) ; if ( ! empty ( $ pointers [ $ key ] [ 'post_type' ] ) ) { if ( ! empty ( $ current_post_type ) ) { if ( is_array ( $ pointers [ $ key ] [ 'post_type' ] ) ) { // Search the post_type foreach ( $ pointers [ $ key ] [ 'post_type' ] as $ value ) { if ( $ value === $ current_post_type ) { $ search_pt = true ; } } if ( $ search_pt === false ) { unset ( $ pointers [ $ key ] ) ; } } else { new WP_Error ( 'broke' , __ ( 'PointerPlus Error: post_type is not an array!' ) ) ; } // If not in CPT view remove all the pointers with post_type } else { unset ( $ pointers [ $ key ] ) ; } } // Clean from null ecc if ( isset ( $ pointers [ $ key ] [ 'pages' ] ) ) { if ( is_array ( $ pointers [ $ key ] [ 'pages' ] ) ) { $ pointers [ $ key ] [ 'pages' ] = array_filter ( $ pointers [ $ key ] [ 'pages' ] ) ; } if ( ! empty ( $ pointers [ $ key ] [ 'pages' ] ) ) { if ( is_array ( $ pointers [ $ key ] [ 'pages' ] ) ) { // Search the page foreach ( $ pointers [ $ key ] [ 'pages' ] as $ value ) { if ( $ pagenow === $ value ) { $ search_pt = true ; } } if ( $ search_pt === false ) { unset ( $ pointers [ $ key ] ) ; } } else { new WP_Error ( 'broke' , __ ( 'PointerPlus Error: pages is not an array!' ) ) ; } } } } return $ pointers ; }
Set pointers and its options

@since 1.0.0
Set pointers and its options