Group images in media library

Attachments itself same as posts… so you can think on giving tham meta_values or adding taxonomies to tham. as for me i always used first method… this is a simple example of how this functioonality works… add_filter(“attachment_fields_to_edit”, “afields_to_edit”, 10, 2); add_filter(“attachment_fields_to_save”, “afields_to_save”, 10, 2); function afields_to_save($post, $attachment){ $parentPost = get_post($post[‘post_parent’]); /************************************************************* // Roles *************************************************************/ if … Read more

Storing Options in a Shortcode

If you want to alter display based on admin options, you don’t need to deal at all with the shortcode_atts ar the $attributes that are passed into your callback. The attributes passed in (and set by shortcode_atts) are meant to alter the way a shortcode works based on how an end-user uses it. Take this: … Read more

Disable all scripts and styles from NextGEN Gallery? [closed]

This takes care of NextGEN’s slideshow and CSS, as well as the Shutter script and CSS that it also enqueues by default. add_action(‘wp_print_scripts’, ‘wpse_82982_removeScripts’); add_action(‘wp_print_styles’, ‘wpse_82982_removeStyles’); function wpse_82982_removeScripts() { wp_dequeue_script(‘ngg-slideshow’); wp_dequeue_script(‘shutter’); } function wpse_82982_removeStyles() { wp_dequeue_style(‘NextGEN’); wp_dequeue_style(‘shutter’); } But: are you sure you want to do that? Maybe you can be a little selective, and … Read more

Weird lightbox phenomenon [closed]

Its just you. I tried from fast internet computer and it loads fine the first time. Then I tried from a low speed computer before the page completely loaded, and it acts the way you described. So its all about loading and fast internet connection

HTML in WooCommerce settings

The woocommerce_clean function: return trim( strip_tags( stripslashes( $var ) ) ); is pretty much going to stip out any html. You may be able to use core WordPress sanitize and escaping functions, but no guarantee how WooCommerce is going to react. Take a look at Data Validation docs on the WordPress Codex for other options. … Read more

Are these wp-content permissions safe?

As per the following from http://codex.wordpress.org/Hardening_WordPress#File_Permissions /wp-content/ User-supplied content: intended to be completely writable by all users (owner/user, group, and public). Within /wp-content/ you will find: /wp-content/themes/ Theme files. If you want to use the built-in theme editor, all files need to be group writable. If you do not want to use the built-in theme … Read more