wcv_product_table_row_actions_duplicate

Description

apply_filters( 'wcv_product_table_row_actions_duplicate', array( $attributes ) )

Parameters (1) ( array )

Sample

array( 
  'edit'    => 
      apply_filters( 'wcv_product_table_row_actions_edit', array(  
        'label'   => __( 'Edit',  'wcvendors-pro' ), 
        'class'   => '', 
        'url'     => WCVendors_Pro_Dashboard::get_dashboard_page_url( 'product/edit/' . $product->id ), 
      ) ), 
  'duplicate'   => 
      apply_filters( 'wcv_product_table_row_actions_duplicate', array(  
        'label'   => __( 'Duplicate',   'wcvendors-pro' ), 
        'class'   => '', 
        'url'     => WCVendors_Pro_Dashboard::get_dashboard_page_url( 'product/duplicate/' . $product->id ), 
      ) ), 
  'delete'    => 
      apply_filters( 'wcv_product_table_row_actions_delete', array( 
        'label'   => __( 'Delete', 'wcvendors-pro' ), 
        'class'   => 'confirm_delete', 
        'custom'  => array( 'data-confirm_text' => __( 'Delete product?', 'wcvendors-pro')  ), 
        'url'     => WCVendors_Pro_Dashboard::get_dashboard_page_url( 'product/delete/' . $product->id ), 
      ) ), 
  'view'  => 
      apply_filters( 'wcv_product_table_row_actions_view', array( 
        'label'   => __( 'View',  'wcvendors-pro' ), 
        'class'   => '', 
        'url'     => get_permalink( $product->id ), 
        'target'  => '_blank' 
     ) ),    
)

 

Usage Examples

To run the filter, copy this sample

$array_val = apply_filters( 'wcv_product_table_row_actions_duplicate', array( $vars ));
  if ( ! empty( $array_val ) ) {

    // what has been modified...

}

To make a callback function, copy this sample

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

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

To remove the filter, copy this sample

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

Defined

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

  • wcvendors-pro/public/class-wcvendors-pro-product-controller.php line 1623
    apply_filters( 'wcv_product_table_row_actions_duplicate', array(

filters

Updated on January 9, 2017

Was this article helpful?