Description
apply_filters( 'wcv_pro_dashboard_urls', $this->dashboard_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_pro_dashboard_urls', $param ); ; if ( ! empty( $array_val ) ) { // what has been modified... }
To make a callback function, copy this sample
// the filter wcv_pro_dashboard_urls callback function my_filter_function( $param ) { // do your thing here :-) ... return $array_val; } add_filter( 'wcv_pro_dashboard_urls', 'my_filter_function', 10, 1 );
To remove the filter, copy this sample
//remove the filter remove_filter( 'wcv_pro_dashboard_urls', '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 309
return apply_filters( 'wcv_pro_dashboard_urls', $this->dashboard_pages );