Johan van der Wijk
Forum Replies Created
-
Forum: Plugins
In reply to: [Content Blocks (Custom Post Widget)] order of content blocks list in widgetEen beetje laat, maar toch nog even een reactie 🙂
You can add this code to your theme’s functions.php file to change the order to be alphabetical:
add_filter('posts_orderby', 'cpw_alphabetical_orderby', 10, 2);
function cpw_alphabetical_orderby($orderby, $query) {
// Only affect 'content_block' post_type queries in admin
if (is_admin() && $query->get('post_type') === 'content_block') {
return 'wp_posts.post_title ASC';
}
return $orderby;
}Forum: Plugins
In reply to: [Content Blocks (Custom Post Widget)] where are content blocks storedHi John,
The content blocks are stored in the wp_posts table and the post_type is content_block.
Hi Hendra, is there an update on this? Upgrading to V5 broke my custom feed, I really need to have it back in the order as it was working before.
Forum: Plugins
In reply to: [Favorites] Unable to use SVG in button markupFor future reference, the bit of code below seems to be the issue. Usually what happens is that plugin authors are approached by the WordPress Plugin Review team and threatened with the closure of their plugin if they don’t fix ‘security vulnerabilities’. Usually these are reported by third-party bounty hunters who grossly overstate these ‘vulnerabilities’. I have experienced the same and it is very frustrating since most of these issues are related to logged in users being able to do stuff in the dashboard. Anyway, my guess is that to get these guys of their back, the plugin author has added this code which seems way to restrictive:
private function sanitizeOutput($output)
{
$allowed = [
'i' => [
'class' => true,
],
'img' => [
'class' => true,
'src' => true,
],
'p' => [
'class' => true
],
'strong' => []
];
$output = wp_kses($output, $allowed);
return $output;
}Hopefully this can be fixed in a future update or other tags such as span and svg will be allowed.
Forum: Plugins
In reply to: [Favorites] Unable to use SVG in button markupI am having similar issues since 2.3.5, it seems that the additional sanitation does not allow for double quotes. As a workaround I am now using single quotes in my html markup like this:
<i class='icon-bookmark'></i>Forum: Plugins
In reply to: [Plausible Analytics] PHP Notice in my logsI am going to mark this as resolved as I don’t see the error on a server with PHP 8.2.23 so I guess it is an issue with PHP 8.4.4 which is not officially supported yet by WordPress.
Forum: Plugins
In reply to: [Plausible Analytics] PHP Notice in my logsI have installed the beta version and that did not solve it.
This is a list of the plugins installed:
- Advanced Custom Fields PRO 6.3.12
- Customize Admin 1.9.4
- Force Login 5.6.3
- Gravity Forms 2.9.4
- SMTP 1.7.0
- Plausible Analytics 2.3.0
- User Switching 1.9.1
- WP fail2ban 5.4.0.1
- WP fail2ban – Gravity Forms 2.0.0
It seems that the notice is only triggered by pageview on the WordPress dashboard and on single posts on the front end.
I am running WordPress 6.7.2 and PHP 8.4.4. The site is running on a custom WordPress theme. If you are not able to reproduce the issue I am seeing, there is probably something wrong in my theme. I will investigate further.
Hi Ruth, I have created a beta version of the plugin that works with WP Bakery Builder. Can you please install it and let me know if this works well for you? This is the download link to the beta version: https://vanderwijk.com/custom-post-widget.zip
Forum: Plugins
In reply to: [Content Blocks (Custom Post Widget)] New version broke websiteCan you please try adding suppress_content_filters=”yes” to your shortcode tag to see if that helps?
Forum: Plugins
In reply to: [Content Blocks (Custom Post Widget)] New version broke websiteCan you please share the shortcode that you are using to add the content?
Note that there was an issue with v 3.2.8 which has been resolved by 3.2.9 so please do check which version you are using. See https://ww.wp.xz.cn/support/topic/html-content-now-showing-as-text/
Forum: Plugins
In reply to: [Content Blocks (Custom Post Widget)] HTML content now showing as textAh, as I suspected you are using the suppress_content_filters option. I was a bit overzealous when adding input and output sanitization. I have released an update to the plugin that should resolve your issue. Thanks for reporting it!
Forum: Plugins
In reply to: [Content Blocks (Custom Post Widget)] HTML content now showing as textI can’t replicate the issue, could you please describe exactly where you have added the html tags and can you share the shortcode you are using?
Are you by any chance using suppress_content_filters=”yes” on the shortcode?
You can edit the content blocks from the fist screenshot you posted. If there is no visible content, switching the content editor to text view might help.
Forum: Plugins
In reply to: [Content Blocks (Custom Post Widget)] Issue With Kadence?Hi Petroc,
Styling issues are out of scope for plugin support. You can try using the browser developer tools to find out which CSS rules in your theme are causing these issues.
Hi Akamm, that is because you cannot add a content block inside another content block.