0

I am wondering if anyone knows any hooks that I could use for the Marketo Gravity form Plugin?

Basically, I need to change the campaign Feed dynamically based on a variable that will be in the URL (e.g. ).

Currently, the way the plugin works is you create a marketo campaign in Marketo and then in WP > gravity forms > Marketo you assign a form to that campaign feed and then map the fields.

All I want to do is just change the feed so it goes to its respective Marketo Campaign.

Ive tried contacting the plugin author and even a post in the support but to no avail.

Would appreciate any help.

closed as off-topic by Howdy_McGee, birgire, gmazzap, Mayeenul Islam, userabuser Mar 26 '16 at 9:54

This question appears to be off-topic. The users who voted to close gave this specific reason:

If this question can be reworded to fit the rules in the help center, please edit the question.

0

I believe specific third-party plugins are off-topic for this site, however, I'll take your question a bit more broadly as "how can I find hooks for a plugin?"

That's fortunately an easy thing to find, irrespective or not of whether you're getting support from the plugin developer: just open the plugin's PHP files in your favourite text editor, and search for the text apply_filters. Every call that you find to apply_filters is a hook that you can use.

You can do this for both plugins and Wordpress core. For example, in wp-includes/nav-menu.php I can see this call on line 689:

apply_filters( 'wp_get_nav_menu_items', $items, $menu, $args );

That means, if I want to make changes to the nav menu items - perhaps re-ordering them - I can add to my theme:

add_filter( 'wp_get_nav_menu_items', function($items){
  // do something do the $items array
  return $items;
} );

If the plugin you're looking at has no calls to apply_filters, it may be possible that the Wordpress functions it calls have their own filters you can hook into. With a bit of hunting around Wordpress' core functions, you'll find a lot of filters you can use (if you don't know what file a function is in, usually googling the function name will tell you).

Finally, if the plugin just doesn't have the filter you need, you could always add it yourself. Ideally, find the plugin's development repository (perhaps on Github), submit a pull request, and add the call to apply_filters - with a unique filter name, ideally prefixed with the plugin's name - and if your modification is accepted your code will make it into the plugin. Of course, you could just do this yourself to your own local copy of the plugin - but then you'll need to re-do it each time the plugin updates!

  • 1
    Thanks! I didn't expect a reply for awhile. Great answer! I check it out. – Django Mar 11 '16 at 0:31

Not the answer you're looking for? Browse other questions tagged or ask your own question.