Problem with email_exists in shortcode

This is a basic version of your code above which seperates the registration logic (handled on init) from the form output done by the shortcode. It will basically work, but is missing any validation so just to show the concept. $wpse_email_exists = null; function registration_form_shortcode() { global $wpse_email_exists; $output=”<form name=”registration” action=”” . esc_url($_SERVER[‘REQUEST_URI’]) . ‘” … Read more

How disable checkbox when listbox value changes in tinymce

Looking though the existing plugins, the standard tinymce way to do this is to save the popup window in a win variable: { text: ‘Vídeos’, onclick: function() { var win = editor.windowManager.open({ //etc And then use win.find(‘#name’) to target the control, eg: {type: ‘listbox’, name: ‘video_site’, onselect: function( ) { var autoplay = win.find(‘#video_autoplay’); if … Read more

Shortcodes not working in an AJAX call

I believe the problem is you are not calling do_shortcode() in the output buffer. You don’t need to be running the loop within the output buffer since I can assume get_content_template() simply returns HTML with embedded shortcodes. Save that to a string variable, then run that through the do_shortcode() and save the echoed output to … Read more

has_shortcode for content added after the content

For this, you’ll actually want to utilize the wp_enqueue_scripts action instead of wp_head. wp_enqueue_scripts is technically the proper way to add scripts and styles to your site. This action allows us to both register scripts and styles for later use (which is what we want here) and allows us to output scripts and styles to … Read more

How I make a shortcode for this code?

You should read the Shortcode API as suggested. This should give you an overview of what is happening and how shortcodes should be used. One important thing to remember here, shortcode content should be returned, not echo’ed. Here is also a tutorial that help me a lot. Just a quick tip here, shortcodes should always … Read more

manipulate a plugins shortcode

you could remove_shortcode( ‘nggallery’ ); and then add it again: function put_script_after_nggallery_shortcode( $atts ){ global $nggShortcodes; $nggShortcodes->show_gallery($atts); //or otherwise duplicate the callback function wp_enqueue_script(‘special-ngg-sciprt’, ‘url-to-script’, null, null, true); } add_shortcode( ‘nggallery’, ‘put_script_after_nggallery_shortcode’ ); i’m not sure my show_gallery will work, but seems logical what script do you need to add? why not just wp_enqueue_script on … Read more

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)