Title: [Plugin: OptionTree] Hooks
Last modified: August 19, 2016

---

# [Plugin: OptionTree] Hooks

 *  Resolved [Flaunt Books](https://wordpress.org/support/users/skooks/)
 * (@skooks)
 * [15 years, 1 month ago](https://wordpress.org/support/topic/plugin-optiontree-hooks/)
 * Brilliant Plugin!
 * I think adding some simple hooks into the AJAX save function and a few other 
   places would allow developers to tie in more advanced functions into the plugin.
 * For Example:
    We have a plugin that prints out a CSS file to the theme folder(
   parent or child). Providing a hook in the option_tree_array_save() function on
   line 440.
 * do_action(‘option_tree_save’);
 * Then in other plugins we could add functions such as
    function my_custom_print_css(){//
   Do something… }
 * And simply add a call to the hook with add_action:
    add_action(‘option_tree_save’,’
   my_custom_print_css’,5);
 * I think adding some simple hooks would add an unlimited variety of uses for the
   plugin and allow us developers to extend the processes within the save, load,
   export functions.
 * Thanks for the great plugin!
 * [http://wordpress.org/extend/plugins/option-tree/](http://wordpress.org/extend/plugins/option-tree/)

Viewing 2 replies - 1 through 2 (of 2 total)

 *  Plugin Author [Derek Herman](https://wordpress.org/support/users/valendesigns/)
 * (@valendesigns)
 * [15 years ago](https://wordpress.org/support/topic/plugin-optiontree-hooks/#post-2024246)
 * Added to 1.1.7
 *  [Syamil MJ](https://wordpress.org/support/users/sy4mil/)
 * (@sy4mil)
 * [14 years, 9 months ago](https://wordpress.org/support/topic/plugin-optiontree-hooks/#post-2024263)
 * I’m trying to replace Option Tree’s default style with a custom stylesheet, but
   this doesn’t seem to work.
 *     ```
       function option_tree_custom_stylesheet() {
           wp_deregister_style('option-tree-style');
           wp_enqueue_style( 'option-tree-custom-style', get_template_directory_uri().'/css/optionTree.css');
       }
       add_action('option_tree_admin_header','option_tree_custom_stylesheet');
       ```
   
 * Written inside functions.php
 * Any help?

Viewing 2 replies - 1 through 2 (of 2 total)

The topic ‘[Plugin: OptionTree] Hooks’ is closed to new replies.

 * ![](https://s.w.org/plugins/geopattern-icon/option-tree_363534.svg)
 * [OptionTree](https://wordpress.org/plugins/option-tree/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/option-tree/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/option-tree/)
 * [Active Topics](https://wordpress.org/support/plugin/option-tree/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/option-tree/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/option-tree/reviews/)

 * 2 replies
 * 3 participants
 * Last reply from: [Syamil MJ](https://wordpress.org/support/users/sy4mil/)
 * Last activity: [14 years, 9 months ago](https://wordpress.org/support/topic/plugin-optiontree-hooks/#post-2024263)
 * Status: resolved