Children Shortcodes?

This is possible, but you can only nest one level down, after that the shortcode regexp parser flips out. So your example would be okay, but [item1] would not be able to contain even more nested shortcodes. To enable nesting, just go ahead and do: add_shortcode(‘data’, function($attributes, $content=””) { return do_shortcode($content); } Relevant article: http://www.sitepoint.com/wordpress-nested-shortcodes/

ouput buffering confusing me!

the_content(), output of which you are filtering, is a template tag. It’s meant to be used as part of HTML page. One page load cannot simultaneously be HTML page and PDF download. File download you are generating needs to happen before HTML template is loaded, for example on template_redirect hook and exit after so that …

Read more

How to make auto installer Plugin?

I found the solution: function rating_install(){ //Funcion que genera la instalacion del plugin global $wpdb; $table_name = $wpdb->prefix.”rating”; $create = “CRETA TABLE “.$table_name.” ( ” . “id INT( 11 ) NOT NULL AUTO_INCREMENT PRIMARY KEY, ” . “url TINYTEXT NOT NULL, ” . “descripcion TINYTEXT NOT NULL ) “; $wpdb->query($create); /*require_once(ABSPATH.”wp-admin/includes/upgrade.php”); dbDelta($create);*/ } function rating_uninstall(){ …

Read more

I can install my plugin in localhost but not in my server

Use this code register_activation_hook(__FILE__, ‘rating_install’); register_deactivation_hook(__FILE__, ‘rating_uninstall’); function rating_install(){ global $wpdb; $table_name = $wpdb->prefix.”rating”; $create = “CRETA TABLE “.$table_name.” ( ” . “id INT( 11 ) NOT NULL AUTO_INCREMENT PRIMARY KEY, ” . “url TINYTEXT NOT NULL, ” . “descripcion TINYTEXT NOT NULL ) “; $wpdb->query($create); } function rating_uninstall(){ global $wpdb; $table_name = $wpdb->prefix.”rating”; $drop …

Read more

Script work on non logged in user but not work for logged in user?

i finally know why this code not work. as menstioned by Jorn Lund in the comment that jQuery(document).ready() will fail when script loaded async ( i still dont know is my code load async) but with in mind i change from jQuery(document).ready() to self execution function (function($){ alert(“hello”); })(jQuery); and the code work very well …

Read more