wcv_dashboard_pages_nav

Description

apply_filters( 'wcv_dashboard_pages_nav', $pages )

Parameters (1) (array)

Sample

$this->dashboard_pages[ 'product' ] = array( 
  'slug'      => 'product', 
  'label'     => __('Products', 'wcvendors-pro' ), 
  'actions'   => array( 
    'edit'    => __(' Edit', 'wcvendors-pro' ), 
    'duplicate' => __(' Duplicate', 'wcvendors-pro' ), 
    'delete'  => __(' Delete', 'wcvendors-pro' )
  )
);

if ( $disable_duplicate ) unset( $this->dashboard_pages[ 'product' ][ 'actions' ][ 'duplicate' ] ); 

$this->dashboard_pages[ 'order' ] = array( 
  'slug'      => 'order', 
  'label'     => __('Orders', 'wcvendors-pro' ), 
  'actions'   => array()
);

$this->dashboard_pages[ 'settings' ] = array( 
  'slug'      => 'settings', 
  'label'     => __('Settings', 'wcvendors-pro' ), 
  'actions'   => array( )
);

$this->dashboard_pages[ 'rating' ] = array( 
  'slug'      => 'rating', 
  'label'     => __('Ratings', 'wcvendors-pro' ), 
  'actions'   => array()
);

if ('yes' == get_option( 'woocommerce_enable_coupons' ) ) { 

  $this->dashboard_pages[ 'shop_coupon' ] = array( 
    'slug'      => 'shop_coupon', 
    'label'     => __('Coupons', 'wcvendors-pro' ), 
    'actions'   => array( 
      'edit'    => __('Edit', 'wcvendors-pro' ), 
      'delete'  => __('Delete', 'wcvendors-pro' )
    )
  );
}

Usage Examples

To run the filter, copy this sample

$array_val = apply_filters( 'wcv_dashboard_pages_nav', $param );
  if ( ! empty( $array_val ) ) {

    // what has been modified...

}

To make a callback function, copy this sample

// the filter wcv_dashboard_pages_nav callback
function my_filter_function( $param ) {
  // do your thing here :-) ... 

  return $array_val;
}
add_filter( 'wcv_dashboard_pages_nav', 'my_filter_function', 10, 1 );

To remove the filter, copy this sample

//remove the filter
remove_filter( 'wcv_dashboard_pages_nav', 'my_filter_function', 10, 1 );

Defined

This filter is defined in the following source file(s)

  • wcvendors-pro/public/class-wcvendors-pro-dashboard.php line 557
    $pages     = apply_filters( 'wcv_dashboard_pages_nav', $pages );

filters

Updated on January 9, 2017

Was this article helpful?