cvmh
Forum Replies Created
-
Forum: Plugins
In reply to: [Loco Translate] Sync issueHere it is :
Uncaught TypeError: can't access property "length", d is undefined p https://www.xxxxxxx.com/wp-content/plugins/loco-translate/pub/js/min/admin.js?ver=2.5.2:12 jQuery 7 p https://www.xxxxxxx.com/wp-content/plugins/loco-translate/pub/js/min/admin.js?ver=2.5.2:13 post https://www.xxxxxxx.com/wp-content/plugins/loco-translate/pub/js/min/admin.js?ver=2.5.2:16 O https://www.xxxxxxx.com/wp-content/plugins/loco-translate/pub/js/min/editor.js?ver=2.5.2:1 sync https://www.xxxxxxx.com/wp-content/plugins/loco-translate/pub/js/min/editor.js?ver=2.5.2:1 jQuery 2 dispatch handle admin.js:12:456 p https://www.xxxxxxx.com/wp-content/plugins/loco-translate/pub/js/min/admin.js?ver=2.5.2:12 jQuery 7 p https://www.xxxxxxx.com/wp-content/plugins/loco-translate/pub/js/min/admin.js?ver=2.5.2:13 post https://www.xxxxxxx.com/wp-content/plugins/loco-translate/pub/js/min/admin.js?ver=2.5.2:16 O https://www.xxxxxxx.com/wp-content/plugins/loco-translate/pub/js/min/editor.js?ver=2.5.2:1 sync https://www.xxxxxxx.com/wp-content/plugins/loco-translate/pub/js/min/editor.js?ver=2.5.2:1 jQuery 2
Forum: Plugins
In reply to: [Loco Translate] Sync issueSame issue with the dev version. Same js error
Forum: Plugins
In reply to: [Loco Translate] Sync issueYes same issue
I installed a transient management plugin, deleted transients and filters reappear.
It seems to be a transient issue…Forum: Plugins
In reply to: [WooCommerce] Can’t see products variations in adminI had an error in a filter. Sorry for the post
Forum: Fixing WordPress
In reply to: WP 4.4 Permalink on private child pages (save_post)Add this to your functions.php:
/** * Change permalink for private subpages */ add_filter( 'the_permalink', 'private_subpages_permalink' ); function private_subpages_permalink( $permalink ) { if ( get_post_status() === 'private' and $parent_id = wp_get_post_parent_id( get_the_ID() ) ) : if ( $parent_id ) : $new_permalink = substr( get_the_permalink( $parent_id ), 0, -1 ); // substr removes last slash return str_replace( site_url(), $new_permalink, $permalink ); endif; endif; return $permalink; }
Note that this snippet uses the “the_permalink” filter, so it means that the link to the page is called with the “the_permalink()” function
Otherwise there was a shorter way to add private parents:
/** * Add private pages to parent dropdown. */ add_filter( 'page_attributes_dropdown_pages_args', 'dropdown_pages_args_add_parents' ); add_filter( 'quick_edit_dropdown_pages_args', 'dropdown_pages_args_add_parents' ); function dropdown_pages_args_add_parents( $dropdown_args, $post ) { $dropdown_args['post_status'] = array( 'publish', 'private' ); return $dropdown_args; }
Forum: Plugins
In reply to: [Contact Form 7] Issue with wpcf7_before_send_mailMany thanks tristanslater !
It works perfectly.Forum: Plugins
In reply to: [Contact Form 7] Issue with wpcf7_before_send_mailThanks for the link prolab.
For me collect data is not the problem. The proble is to updated the email. An idea ?add_action( 'wpcf7_before_send_mail', 'wishlist_email' ); function wishlist_email( &$cf7 ) { $submission = WPCF7_Submission::get_instance(); $data =& $submission->get_posted_data(); $tmp = '<table><tr><td>Ref1</td><td>Ref2</td><td>qty</td></tr>'; if(!empty($data[wishlist])): foreach($data['wishlist'] as $key=>$item): $tmp.= '<tr><td>'.$data['wishlist_fournisseur'][$key].'</td><td>'.$data['wishlist'][$key].'</td><td>'.$data['quantity'][$key].'</td></tr>'; endforeach; endif; $tmp.= '</table>'; $cf7->mail['body'].= $tmp; }
Forum: Plugins
In reply to: [Contact Form 7] Issue with wpcf7_before_send_mailWith this code, the hook is not called, I can’t see it in my browser dev tool (I only see the json for the succes message) :
function wpcf7_modify_this(&$wpcf7_data) { $wpcf7_data->mail['body'].= "======================================================"; } add_action("wpcf7_before_send_mail", "wpcf7_modify_this");
Forum: Plugins
In reply to: [Contact Form 7] Issue with wpcf7_before_send_mailSame issue, WP 3.9.2 CF7 3.9.3.