[Resolved] Defaults Hooks

Home Forums Support [Resolved] Defaults Hooks

Home Forums Support Defaults Hooks

Viewing 6 posts - 1 through 6 (of 6 total)
  • Author
    Posts
  • #19479
    Krzysztof

    It’s possible to add defaults hooks (in GeneratePress Hooks) just like it’s in ex. Generate Colors? (I mean add_filter(‘generate_color_option_defaults’,’…’); )

    #19605
    Tom
    Lead Developer
    Lead Developer

    Hi there,

    I’m not sure what you mean?

    Wherever there is a hook or a filter you can definitely use it – just be careful πŸ™‚

    #19645
    Krzysztof

    I mean that what is in GeneratePress Hooks: Before Header, After Header, After Right Sidebar Content etc. So it’s possible to add filter for example to “generate_after_header”? This will be work: add_filter(‘generate_after_header’,’my_super_hiper_funcion’); ? πŸ˜€

    #19899
    Tom
    Lead Developer
    Lead Developer

    You wouldn’t add a filter, but you would add an action:

    add_action('generate_after_header','my_super_hiper_function');

    This will “hook” the function into the “generate_after_header” hook.

    This is basically what the GP Hooks addon does for you πŸ™‚

    Let me know if that makes sense.

    #19903
    Krzysztof

    Yep, it’s work. Thanks a lot!

    Btw. GeneratePress is awsome! Nice job πŸ™‚

    #20129
    Tom
    Lead Developer
    Lead Developer

    Thanks! πŸ™‚

Viewing 6 posts - 1 through 6 (of 6 total)
  • You must be logged in to reply to this topic.