Commit b2418ec 1 parent 411b29e commit b2418ec Copy full SHA for b2418ec
File tree 1 file changed +10
-3
lines changed
1 file changed +10
-3
lines changed Original file line number Diff line number Diff line change @@ -36,8 +36,8 @@ class VP_Option
36
36
public function __construct (array $ configs )
37
37
{
38
38
39
- // extract and set default value
40
- extract ( $ test = array_merge (array (
39
+ // merge configs with default value
40
+ $ configs = array_merge (array (
41
41
'is_dev_mode ' => false ,
42
42
'use_auto_group_naming ' => true ,
43
43
'use_util_menu ' => true ,
@@ -47,7 +47,14 @@ public function __construct(array $configs)
47
47
'page_title ' => __ ( 'Vafpress Options ' , 'vp_textdomain ' ),
48
48
'menu_label ' => __ ( 'Vafpress Options ' , 'vp_textdomain ' ),
49
49
'priority ' => 10 ,
50
- ), $ configs ));
50
+ ), $ configs );
51
+
52
+ // options config filter
53
+ $ configs = apply_filters ('vp_option_configuration_array ' , $ configs , $ configs ['option_key ' ]);
54
+ $ configs = apply_filters ('vp_option_configuration_array- ' . $ configs ['option_key ' ], $ configs );
55
+
56
+ // extract the configs
57
+ extract ($ configs );
51
58
52
59
// check and set required configs
53
60
if (isset ($ option_key )) $ this ->set_option_key ($ option_key );
You can’t perform that action at this time.
0 commit comments