erictansh
Forum Replies Created
-
I think the problem lies with the filter. The filter is not working properly. I cannot filter the unoptimized images, and need to click through thousands of images to find them.
Forum: Plugins
In reply to: [Redis Object Cache] Redis Object Cache 2.1.4 errorYes changing to WP_REDIS_PLUGIN_DIR fix the fatal error
Forum: Plugins
In reply to: [Site Reviews] assigned_terms with multiple slugs is not workingTried but still didn’t work
Note: there are more than 1 slug.
add_filter('site-reviews/create/review-values', function ($values) { // Find the treatment categories of the posted review $terms = get_the_terms( $values['post_id'], 'treatment_cat' ); $assigned_terms = wp_list_pluck($terms, 'slug'); // Assign the terms to the review $values['assigned_terms'] = $assigned_terms; return $values; });
Forum: Plugins
In reply to: [Site Reviews] assigned_terms with multiple slugs is not workingGreat
Does $values[‘assigned_terms’] accept slugs? I tried yesterday and didn’t work.
That’s why I need to convert to $term->id instead.
Forum: Plugins
In reply to: [Site Reviews] assigned_terms with multiple slugs is not workingThanks for the quick fix!
Just tested it and is working!
Just one suggestion – any possibility of using the CPT’s taxonomy to filter the reviews instead of using site-review-category.
Currently I have to write a hook to sync up the CPT’s terms and Site Reviews’ terms. This workaround will only works if the both categories’ slug matched exactly.
It would be great if we can use the CPT’s taxonomy so to save the trouble having to match and sync both categories.
add_filter('site-reviews/create/review-values', function ($values) { // Find the treatment categories of the posted review $terms = get_the_terms( $values['post_id'], 'treatment_cat' ); $slugs = wp_list_pluck($terms, 'slug'); // Match the treatment categories to that of the review categories using the slug foreach ($slugs as $slug) { $term = get_term_by( 'slug', $slug , 'site-review-category' ); $assigned_terms[] = $term->term_id; } // Assign the terms to the review $values['assigned_terms'] = $assigned_terms; return $values; });
Forum: Plugins
In reply to: [Connector GravityForms and MailerLite] GroupList column displayed as NoneOne more thing – you forget to add the “break” in the recent patch
Forum: Plugins
In reply to: [Connector GravityForms and MailerLite] GroupList column displayed as NoneForum: Plugins
In reply to: [Connector GravityForms and MailerLite] GroupList column displayed as NoneSpotted a minor bug
‘tooltip’ => sprintf(‘
<h6>%s</h6>%s’,
esc_html__( ‘Group List’, ‘connector-gravityforms-mailerlite’ ),
esc_html__( ‘Select the Mailer Lite list you would like to add your contacts to.’, ‘connector-gravityforms-mailerlite’ )
),- This reply was modified 5 years ago by erictansh.
Forum: Plugins
In reply to: [Connector GravityForms and MailerLite] GroupList column displayed as Nonewithout the break, it will loop through the entire array. And if the last item of the array is not the matching group list, it will replace the $group_name with “None”.
Forum: Plugins
In reply to: [Gravity Forms HTML5 Validation] Incompatible with Gravity Forms StripeForum: Plugins
In reply to: [Gravity Forms HTML5 Validation] Incompatible with Gravity Forms StripeForum: Plugins
In reply to: [Gravity Forms HTML5 Validation] Incompatible with Gravity Forms StripeForum: Plugins
In reply to: [Gravity Forms HTML5 Validation] Incompatible with Gravity Forms StripeForum: Plugins
In reply to: [Gravity Forms HTML5 Validation] Broken in Gravity Forms version 2Updated for Gravity Forms version 2.0.7
Forum: Plugins
In reply to: [Autoptimize] Load autoptimize CSS after bootstrapThanks Frank – work like a charm. Will be checking out your critical css addon soon ??