Gravity Forms plugin: How to use “gform_editor_js” action hook? [closed]

You can either place the code snippet in the theme functions.php file or in a custom functionality plugin: http://justintadlock.com/archives/2011/02/02/creating-a-custom-functions-plugin-for-end-users Edit: To enqueue custom scripts on the edit page you should use admin_enqueue_scripts e.g. add_action( ‘admin_enqueue_scripts’, ‘my_jquery_function’ ); function my_jquery_function() { if ( rgget( ‘page’ ) != ‘gf_edit_forms’ ) return; wp_enqueue_script(‘mytest1’, get_stylesheet_directory_uri() . ‘/assets/javascripts/mytest1.js’); wp_enqueue_script(‘mytest2’, get_stylesheet_directory_uri() … Read more

Unable to override pluggable function wp_mail

I think this line: namespace MailDemo; is the reason for you problems. You define your custom wp_mail() function within this namespace, so it looks like you’re trying to override the function: \MailDemo\wp_mail() but not the pluggable function: \wp_mail() Try to remove the namespace setup and see what happens. Another way around this would be to … Read more

How can I implement an Add to Collection function on my Image Gallery to be downloaded later?

I would skip cookies and use the awesome script store.js Just kick out a data-lightbox attribute on the “Add to Lightbox” link with the image ID and (assuming you’re using jQuery) it’s this simple: $( document.body ).on( “click”, “a[data-lightbox]”, function ( ev ) { ev.preventDefault(); var id = $( this ).data( “lightbox” ), list = … Read more

add_menu_page does not seem to work in a class

From add_menu_page in Codex: Note: If you’re running into the “You do not have sufficient permissions to access this page” error, then you’ve hooked too early. The hook you should use is admin_menu. admin_init is too early to hook add_menu_page, use admin_menu.