Filters example
-
I’ve already seen this page about your filters and actions but there aren’t any examples. Could you give me any directions on how to use this filter (scpt_plugin_{$this->type}_meta_save_{$field}) for example?
I’m trying to use like this:
$superCustomCPT = new Super_Custom_Post_Type('mycustomcpt'); $superProductCPT = new Super_Custom_Post_Type('product'); $superProductCPT->add_meta_box(array( 'id' => 'attribute_groups', 'title' => 'My title', 'fields' => array( 'prod_attribute_groups' => array( 'type' => 'checkbox', 'label' => false, 'data' => 'mycustomcpt', 'multiple' => 'multiple' ) ) )); function test($test){ _log('asdasd'); _log(print_r($test,true)); } add_filter('scpt_plugin_product_meta_save_attribute_groups','test');
But this error is showing up: Undefined index: ‘attribute_groups’
Viewing 1 replies (of 1 total)
Viewing 1 replies (of 1 total)
- The topic ‘Filters example’ is closed to new replies.