Customizing gallery shortcode in 3.5

Make sure that the javascript loaded by your load-scripts.php is waiting for the document to finish loading before attaching all of the listeners. When you created a separate function the code ran only a tiny bit earlier, but it was probably early enough for the elements to finish loading and the listeners to properly attach.

Stray closing paragraph tag when using shortcodes

This is frustrating issue as I can’t depend on the content editors to be savvy enough with WordPress / HTML to understand how the text they input will be parsed… –EDIT– Having thought of this a bit more I have reconsidered my earlier answer. HTML5+ comes with the Tidy extension, if you are able to … Read more

Shortcode putting html such as

This behavior is most likely intended, and can be disabled. However it might break other features too. There are a couple of workarounds, that you can try. Break the Image URL and File Name You can pass the arguments to your shortcode in the following way: [theimg path=”https://s.w.org/about/images/logos/” filename=”wordpress-logo-simplified-rgb.png” ] This will prevent the editor … Read more

Autogenerate wordpress shortcodes using array?

Auto-generate shortcodes from an array: You can try the following Shortcode Automat: /** * Setup the Shortcode Automat * */ function shortcode_automat_setup() { $settings = array( “get_address” => “mg_admin_address”, “get_phone” => “mg_admin_phone”, “get_fax” => “mg_admin_fax”, “get_email” => “mg_admin_email”, “get_hrs_mon” => “mg_work_hrs_mon_frd”, “get_hrs_sat” => “mg_work_hrs_sat” ); $sc = new ShortCodeAutomat( $settings ); $sc->generate(); } add_action( ‘wp_loaded’, … Read more