Mej de Castro
Forum Replies Created
-
Hey @mariettej,
Could you please try adding the code below to your
functions.phpfile or another suitable location, and let us know if this resolves the issue?function add_extra_hooks( $allowed_functions ) {
$allowed_functions[] = 'wp_get_post_parent_id';
return $allowed_functions;
}
add_filter( 'widgetopts_allowed_php_functions', 'add_extra_hooks' );To clarify, the functions
is_pageandget_the_ID()are already included in the allowed WordPress functions for Widget Options. You can review the full list here: List of Allowed WordPress Functions. Please note that functions are now limited.On the other hand, the
wp_get_post_parent_idfunction is not included by default, which is why we suggest adding the code above. Kindly test this out and let us know if the display logic works again.Looking forward to your response!
Hi @taka1,
We’ve received feedback from our developers regarding this issue. In the latest version of Widget Options, some of the display logic functions were removed due to vulnerability reports that might pose risks to users.
Based on the logic code you’re using, the function
in_categoryis not currently included in the list of allowed functions. To review the functions that are permitted by default, you may checkincludes/extras.phpand look forwidgetopts_get_allowed_php_functionsandwidgetopts_get_allowed_wp_functions.If you’d like to enable
in_category, you will need to extend the allowed functions list by adding a filter. Please note that adding custom functions may introduce security risks, so we recommend proceeding with caution.Here’s the code snippet you can add to your
functions.phpfile (or another suitable location in your theme/plugin):function add_extra_hooks( $allowed_functions ) {
$allowed_functions[] = 'in_category';
return $allowed_functions;
}
add_filter( 'widgetopts_allowed_php_functions', 'add_extra_hooks' );This should allow the
in_categoryfunction to work again on your site. Please feel free to modify the code based on your current setup.Thanks and let us know if this works on your end.
Kind Regards,
Mej, Widget Options TeamHi @taka1,
We’ve relayed this to our dev team to request a detailed explanation. Once we receive their feedback, we’ll keep you updated right away.
We truly appreciate your patience in the meantime!
Hi @mariettej,
We have relayed this to our dev to look for a workaround. We’ll keep you posted for updates!
Hi @michaelxxx,
Thanks for reaching out. We understand the frustration this has caused. We had to restrict the Display Logic feature to administrators only due to a security report flagged by WordFence. This might also be affecting how the conditional logics work at the moment.
Our team is currently coordinating with WordFence and exploring safe alternatives so users can continue using conditional logic.
In the meantime, rolling back to a previous version is the best workaround until we finalize a secure solution.
Kind Regards,
Mej, Widget Options TeamForum: Reviews
In reply to: [LoginWP (Formerly Peter's Login Redirect)] What a revelation!Hi @chris4element,
Thank you for your wonderful feedback! We’re delighted to know you find the plugin lightweight, handy, and a great way to enhance the look of WordPress. Your support means a lot to us!
Kind Regards,
Mej, LoginWP TeamHi @taka1,
Thanks for the screenshots. We have reviewed these issues, and the code execution functionality was flagged as potentially dangerous, so we decided to restrict the display logic feature to administrators only. This might cause the logic codes to be affected by the recent update.
If you are the website administrator and your conditional logic code is no longer working, we highly recommend updating the code or adjusting the conditions to ensure compatibility with the latest version.
Please let us know if you need further guidance. We’ll be glad to help.
Kind Regards,
Mej, Widget Options TeamHi @mariettej,
Thanks for your inputs. The code execution functionality was flagged as potentially dangerous, so we decided to restrict the display logic feature to administrators only.
If you are the website administrator and your conditional logic code is no longer working, we highly recommend updating the code or adjusting the conditions to ensure compatibility with the latest version.
Thanks and let us know if you have further questions.
Kind Regards,
Hi @mariettej,
Thank you for bringing this to our attention. Our team will carefully review the matter and coordinate with the dev team to determine the next steps. Rest assured, we’re prioritizing this and will keep you updated with any progress.
Kind Regards,
Mej, Widget Options TeamHi @taka1,
We will take our time to review this carefully and coordinate with our dev team for further action. Rest assured, we’ll keep you posted with any updates.
Hi @taka1,
Thank you for reaching out to us. Could you please let us know how the Conditional Logic does not appear on your end after updating Widget Options to version 4.1.2? Please also include which roles the Conditional Logic is not appearing for. Screenshots are highly appreciated too!
We’ll be glad to check this further once we have the details.
Kind Regards,
Mej, Widget Options TeamForum: Reviews
In reply to: [LoginWP (Formerly Peter's Login Redirect)] Muito bom!Hi @guilherme3301,
Thank you so much for your feedback! We’re glad to hear that everything worked perfectly and that the plugin helped you set up your system.
Please feel free to reach out anytime if you have any questions or concerns. We’re happy to help!
Kind Regards,
Mej, LoginWP TeamForum: Reviews
In reply to: [LoginWP (Formerly Peter's Login Redirect)] Very goodHi @onlineoffluiz,
Thank you so much for your wonderful feedback! 🌟 We’re thrilled to know that you find the plugin very helpful and that it’s working great for your needs.
Kind Regards,
Mej, LoginWP TeamHi @greynewt,
Thank you so much for the kind words! We’re thrilled to hear that the plugin has been such a helpful addition to your site and fills that important gap in widget formatting.
Your support means a lot to us, and we’ll keep working on making the plugin even better for you and the community. 🙏✨
Kind Regards,
Mej, Widget Options TeamForum: Reviews
In reply to: [LoginWP (Formerly Peter's Login Redirect)] Excellent pluginHi @akwinter84,
Thank you for your kind words! We’re glad to hear that you find it simple and effective. Your feedback means a lot to us, and we’ll keep working to make the plugin even better for you.
Kind Regards,
Mej, LoginWP Team