Mxlaxe
Forum Replies Created
-
Okay that makes sense, thank you for the explanation. I’ll play with CSV feature and see what I can do !
Thanks!
Hi @amin7,
Thank you for your reply, that was helpful in understanding how BetterDocs work.
One more question, since my current docs are basically posts of type “docs” that behave like pages (they can have parent pages), would a database replace to whichever post type BetterDocs is do the trick or is it more complicated than that under the hood ?
Thanks!
Forum: Plugins
In reply to: [Plugin Check (PCP)] Any way to skip a folder ?Ok, I just figured it out myself by checking the source code.
For anyone interested here’s the snippet:
add_filter ('wp_plugin_check_ignore_directories', function ($directories) {
$directories[] = 'my_directory';
return $directories;
});It’s a shame there’s no documentation though. It would be nice to have at least a list of all hooks available with a short description.
- This reply was modified 5 months, 3 weeks ago by Mxlaxe.
Hi, thank you so much for the detailed explanation !
This looks like it could do 🙂 I will try this out.
However I need to make sure this can work without providing a specific widget ID but seems like I’m on right track !
Forum: Plugins
In reply to: [Joli Table Of Contents] Active headerThank you!
Forum: Plugins
In reply to: [Site Reviews] [site_reviews] shortcode not working after updateYes !
It is working now, I also followed your link and made a couple minor changes and it’s fine!
Thank you so much for your help!
Forum: Plugins
In reply to: [Site Reviews] [site_reviews] shortcode not working after updateOkay I got some updates,
My website is using several hooks provided by the plugin and it seems that they cause the problem because the shortcode works if I comment it all out but then I lose all my custom modifs.
In the v3, I added some custom field in the review form and I got to something working with these filters (2 of them were deprecated and I changed the filters to their new name)
Can you spot something wrong in the below code ? (was working in v3)
* @return array
*/
add_filter( 'site-reviews/review-form/order', function( $order ) {
// The $order array contains the field keys returned below.
// Simply add any custom field keys that you have added and change them to the desired order.
return [
'rating',
'title',
'website', // this is a custom field key
'content',
'name',
'email',
'terms',
];
}); /**
* Modifies the submission form field rules
* Paste this in your active theme's functions.php file.
* @return array
*/
add_filter( 'site-reviews/validation/rules', function( $rules ) {
$rules['website'] = 'required';
return $rules;
}); /**
* Displays custom fields in the Review's "Details" metabox
* Paste this in your active theme's functions.php file.
* @return array
*/
add_filter( 'site-reviews/metabox/details', function( $metabox, $review ) {
foreach( $review->custom as $key => $value ) {
$metabox[$key] = $value;
}
return $metabox;
}, 10, 2 ); /**
* Renders the custom review fields
* Paste this in your active theme's functions.php file.
* In order to display the rendered custom fields, you will need to use a custom "review.php" template
* as shown in the plugin FAQ ("How do I change the order of the review fields?")
* and you will need to add your custom keys to it, for example: {{ name_of_your_custom_key }}
* @return array
*/
add_filter('site-reviews/review/build/after', function( $renderedFields, $review ) {
foreach ($review->custom as $key => $value) {
if (substr($value, 0, 1) === '@' && filter_var(substr($value, 1), FILTER_VALIDATE_URL)) {
$rel = "";
$url = substr($value, 1);
} else {
$rel = ' rel="nofollow"';
$url = $value;
}
if ($value) {
$renderedFields[$key] = '<div class="glsr-custom-' . $key . '"><a target="_blank" href="' . $url . '" title="' . $url . '"' . $rel . '>' . get_host($url) . '</a></div>';
} else {
$renderedFields[$key] = '';
}
return $renderedFields;
}
return;
}, 10, 2);I am also using a custom site-reviews/review.php template like so:
<?php defined( 'WPINC' ) || die; ?> <div class="glsr-review"> Â Â {{ title }} Â Â {{ rating }} Â Â {{ date }} Â Â {{ assigned_to }} Â Â {{ content }} Â Â {{ avatar }} Â Â {{ author }} Â Â {{ website }} Â Â {{ response }} </div>Forum: Plugins
In reply to: [Site Reviews] [site_reviews] shortcode not working after updateYes, I ran the migration, optimized everything I could from the tools section but nothing worked so far. I’m not sure what to do next, but I will try something else.
Forum: Plugins
In reply to: [Gutenberg] Find out if a post was saved/updated from the gutenberg editor ?Hi @zoonini,
Thank you for your reply, I was unaware of this function and that could indeed work in my case !
Have a nice one !
Forum: Fixing WordPress
In reply to: How to add a custom button within the “Featured image” box ?@jdembowski I’m confused why you moved my topic to “Fixing WordPress”. I’ve got nothing to fix related to “For any problems encountered after setting up WordPress.”.
I am trying to develop a gutenberg functionnality from scratch with Reactjs (as explained above) but I don’t know exactly where to start.
Any help ?
Thanks
Hi,
Thanks for the reply. This unfortunately solves only half the problem, because I need a custom message for another language as my website is multilingual and as far as I know there is no way to have global restricted messages per language.
Please consider adding a filter on the final output of the restricted message, whether it’s global or custom.
Cheers!
Forum: Themes and Templates
In reply to: [Neve] Add a custom sidebar ?Thank you @plantprogrammer, will look into that!
@mateithemeisle It would be great however to have the option (from the theme’s options) to choose which sidebar to display for a specific post type or archive.
Forum: Themes and Templates
In reply to: [Neve] Add a custom sidebar ?Thank you,
Actually I’m already using a child theme, however this does not explain how to setup a custom sidebar on an archive page.
Any thoughts on this ?
Thanks!
Thank you! it seems like PHP 8 will give many plugins a hard time. Maybe it’s still too early to adopt it.
Hi,
Any update on the fix?
I get the same FATAL ERROR with PHP 8:
PHP Fatal error: Unparenthesizeda ? b : c ? d : eis not supported. Use either(a ? b : c) ? d : eora ? b : (c ? d : e)in /home/***/public_html/wp-content/plugins/wp-socializer/core/templates/floating-sharebar.php on line 180Thanks!