vickybiswas
Forum Replies Created
Viewing 4 replies - 1 through 4 (of 4 total)
-
Forum: Plugins
In reply to: [PMC Disable Comments] Recommended…Thanks 3ruce
It would be great if you rate the plugin tooForum: Alpha/Beta/RC
In reply to: 3.5-rc1 menu_order not saved to the database for attached imagesI used the following to maintain the order for new and old galleries
function pmc_gallery_menu_order_fix($id) { $regex_pattern = get_shortcode_regex(); preg_match ('/'.$regex_pattern.'/s', stripslashes($_POST['content']), $regex_matches); if ($regex_matches[2] == 'gallery') : $attribureStr = str_replace (" ", "&", trim ($regex_matches[3])); $attribureStr = str_replace ('"', '', $attribureStr); $attributes = wp_parse_args ($attribureStr); endif; $ids = explode(',', $attributes[ids]); $images = get_posts( array( 'post_parent' => $post->ID, 'numberposts' => '-1', 'post_status' => 'inherit', 'post_type' => 'attachment', 'post_mime_type' => 'image', 'orderby' => 'menu_order ID', 'order' => 'ASC' ) ); if ( empty($images) ) { // no attachments here } else { foreach ( $images as $attachment_id => $attachment ) { if (in_array($attachment->ID, $ids)) { $update_post = array(); $update_post['ID'] = $attachment->ID; $update_post['menu_order'] = array_search($attachment->ID, $ids); wp_update_post( $update_post ); }; } } } add_action('pre_post_update', 'pmc_gallery_menu_order_fix');
Forum: Fixing WordPress
In reply to: Combining External JS and CSSA note for everyone.
The most complete complete in its line is w3 total cache
does everything required under one plugin.Regards,
Vicky BiswasForum: Fixing WordPress
In reply to: Combining External JS and CSSGuys did you try out
https://www.halmatferello.com/lab/wp-css/
and
https://www.halmatferello.com/lab/wp-js/Vicky Biswas
Viewing 4 replies - 1 through 4 (of 4 total)