wcv_product_title

Description

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

Parameters (1) (array)

Sample

array( 
  'post_id'       => $post_id, 
  'id'        => 'post_title', 
  'label'       => __( 'Product Name', 'wcvendors-pro' ),
  'value'       => $product_title, 
  'custom_attributes' => array( 
    'data-rules' => 'required|max_length[100]', 
    'data-error' => __( 'Product name is required or is too long.', 'wcvendors-pro' ), 
    'data-label' => __( 'Product Name', 'wcvendors-pro' ),
  )
)

 

Usage Examples

To run the filter, copy this sample

$array_val = apply_filters( 'wcv_product_title', array( $attributes ) ) ;
  if ( ! empty( $array_val ) ) {

    // what has been modified...

}

To make a callback function, copy this sample

// the filter wcv_product_title callback
function filter_wcv_product_title( array( $attributes ) ) {
  // do your thing here :-) ... 

  return $array_val; 
}
add_filter( 'wcv_product_title', 'filter_wcv_product_title', 10, 1 );

To remove the filter, copy this sample

 //remove the filter
remove_filter( 'wcv_product_title', 'filter_wcv_product_title', 10, 1 );

Defined

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

  • wcvendors-pro/public/forms/class-wcvendors-pro-product-form.php line 267
    WCVendors_Pro_Form_Helper::input( apply_filters( 'wcv_product_title', array(

filters

Updated on January 9, 2017

Was this article helpful?