add_filter // reuse argument
-
Hi,
I’m a newbie in the world of hooks & WordPress & Php …
I’m trying to reuse a Argument ($shape_data) I’ve previoulsy get from the Filter: save_my_shape.add_filter('save_my_shape', 'save_me', 10, 2); function save_me ( $shapes_html, $shapes_data ) { return $shapes_html;
I’m not sure how to reuse $shapes_data wherever than save_me().
I’ve tried to add another function my_get_shapes_datas() into save_me() but it doesn’t work:
add_filter('save_my_shape', 'save_me', 10, 2); function save_me ( $shapes_html, $shapes_data ) { function my_get_shapes_datas($shapes_data){ $result = $shapes_data; return $result; } return $shapes_html;
I think this is a commun need but I’ve no idea how to do it.
Could you help?
thanks
Viewing 5 replies - 1 through 5 (of 5 total)
Viewing 5 replies - 1 through 5 (of 5 total)
- The topic ‘add_filter // reuse argument’ is closed to new replies.