Bypass OptionTree filters via functions.php

There are some basic options defined inside the basic file: ot-functions-admin.php

Since I have the OptionTree plugin implemented inside the theme files, I want to be able to update it every now and then.

That means, I will lose any custom options I have defined inside the file mentioned above.

For example, I have this inside the ot-functions-admin.php :

'menu_title' => apply_filters( 'ot_theme_options_menu_title', __( 'ACT', 'option-tree' ) ),

Which changes the title of the settings menu to “ACT” instead of “Theme Options”.

I can change the text here of course, but in case of update, I will lose the changes and will have to redo them.

Is there any way I can write something like a filter inside functions.php that could help me achieve that?

add_filter( 'ot_theme_options_menu_title', 'ACT' );

I wrote the above, but unfortunately is not working.

Maybe the information below might be helpful to you:

'id'              => 'ot_theme_options',

Thank you for your time.

Read more here: Bypass OptionTree filters via functions.php

Leave a Reply

Your email address will not be published. Required fields are marked *