• Resolved Flaunt Books

    (@skooks)


    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/

Viewing 2 replies - 1 through 2 (of 2 total)
  • Plugin Author Derek Herman

    (@valendesigns)

    Added to 1.1.7

    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.