this->id_options_defaults

Description

apply_filters( $this->id . '_options_defaults', array( $attributes ) )

Parameters ( 1 ) ( array )

Sample

array(
  'name'        => '',
  'desc'        => '',
  'placeholder' => '',
  'class'       => '',
  'tip'         => '',
  'id'          => '',
  'css'         => '',
  'type'        => 'text',
  'std'         => '',
  'select2'     => false,
  'multiple'    => false,
  'options'     => array(),
  'restrict'    => array(),
  'settings'    => array()
)

 

Usage Examples

To run the filter, copy this sample

$array_val = apply_filters( $this->id . '_options_defaults', array( $attributes );
  if ( ! empty( $array_val ) ) {

    // what has been modified...

}

To make a callback function, copy this sample

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

  return $array_val;
}
add_filter( 'this->id_options_defaults' , 'my_filter_function', 10, 1 );

To remove the filter, copy this sample

 //remove the filter
remove_filter( 'this->id_options_defaults', 'my_filter_function', 10, 1 );

Defined

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

  • wc-vendors/classes/admin/settings/classes/sf-class-settings.php line 606
    $defaults = apply_filters( $this->id . '_options_defaults', array(

filters

Updated on January 14, 2017

Was this article helpful?