tezalsec
Forum Replies Created
-
Forum: Plugins
In reply to: [The Events Calendar] Flooding of PHP notices in error logHi Abz,
PHP Version is 7.4.16
Wordpress 5.9.3 (latest)
TEC is version 5.14.2.1Debug log is enabled for dev purposes, but disabling that does not solve anything ?? Hope you find the issues. They weren’t there a year ago, so they must be caused by one of the latest versions.
Thanks, Cheers.
- This reply was modified 2 years, 10 months ago by tezalsec.
Matter is solved. It should be the same, but in my case the email address was blocked due to a hard bounce, which I could unblock myself in the SIB account under email settings.
Same here. Piling up in log files.
Hi Joshua,
thank you for your solution. The Jquery works perfectly ??
the add_filter code does not work, it disables the function, but does not remove your “disabled” message there.
Great that your developers are gonna look at it. It would help if the h2 and table elements would at least have a unique class so people can hide it with simple css.
Cheers.
Forum: Plugins
In reply to: [New User Approve] Merge tag variables not being replacedHi, thank you for your response, and your alternative solution, I really appreciate it. However, I stand by my point that it does not work correctly.
Your example refers to your default message, not your overriding message. I get that it works on your default message, as your code suggests that it does. Look however at the order of the handling of functions in your new-user-approve.php file, around line 670.
First the default message is set, then the tags are replaced. So that means it works fine for your default message, as your test suggests. To test this issue, your test should have been done not on the default, but on the overriding filter that follows the translation function.
See your code below:
$message = nua_default_approve_user_message(); $message = nua_do_email_tags( $message, array( 'context' => 'approve_user', 'user' => $user, 'user_login' => $user_login, 'user_email' => $user_email, ) ); $message = apply_filters( 'new_user_approve_approve_user_message', $message, $user );
In the last line the overriding filter ‘new_user_approve_approve_user_message’ is applied, but AFTER the tag replacement function, so the tags do not get translated.
Simply shifting the order of the code would solve this, like I tested:
$message = nua_default_approve_user_message(); $message = apply_filters( 'new_user_approve_approve_user_message', $message, $user ); $message = nua_do_email_tags( $message, array( 'context' => 'approve_user', 'user' => $user, 'user_login' => $user_login, 'user_email' => $user_email, ) );
In this order both the default and the overriding filter tags get replaced.
I had already solved it for myself by repeating the nua_do_email_tags() function within my filter function, that worked, but it is not clean and no option for non-programmers, and it does not address the base issue.
I hope you will take a look at it again.
Thanks.
Forum: Plugins
In reply to: [New User Approve] Merge tag variables not being replacedAfter some research, it looks like you made it impossible to use apply_filters for editing messages containing smart tags, as you translate the smart tags before the filter, instead of after.
Is this a deliberate choice? If you would just apply your nua_do_email_tags() function AFTER the filter instead of before, the smart tags would get translated.
In your function ‘approve_user’ for instance, all you would have to do, is place the following code below instead of above the filter ‘new_user_approve_approve_user_message’ :
$message = nua_do_email_tags( $message, array( 'context' => 'approve_user', 'user' => $user, 'user_login' => $user_login, 'user_email' => $user_email, ) );
This is like 5 seconds of work..
Thanks.
PS. I got that I missed adding the $message parameter in the example code in the above post, but that was not causing this issue.
- This reply was modified 2 years, 12 months ago by tezalsec.
Forum: Plugins
In reply to: [New User Approve] Validation of custom fields in registration ignoredHi, I just solved the issue, although I still consider this a bug.
The solution was mentioned here: https://www.ads-software.com/support/topic/registration_errors-filter-problem/ , 8 years ago!
The issue is that your plugin code creates the user before the ‘registration_errors’ filter is fired, deviating from WordPress default. The solution is to use the ‘register_post’ filter instead (note: which has a different parameter order).
Ideally you would rebuild it so your user creation code would fire later and adhere to wordpress standards, but this code apparently has been like this for more than 8 years.
Maybe what you could do at least, is add some documentation somewhere, maybe in your plugin readme.txt, like:
Validation
If you use custom validations in your registration form, use the filter ‘register_post’ filter instead of the ‘registration_errors’ filter .
Relevant docs:
https://developer.www.ads-software.com/reference/hooks/registration_errors/
https://developer.www.ads-software.com/reference/hooks/register_post/That would save people hours of research headache.
Thanks.
Forum: Plugins
In reply to: [New User Approve] Add website url column to admin pending users tableForum: Plugins
In reply to: [New User Approve] Add website url column to admin pending users tableHi, that’s too bad.
No intention to add this as well, as a default column or an add_filter, I read between the lines correctly? I checked your code, it would only require a few lines of code in “includes/admin-approve.php”.
I’d rather not, but I’ll just have to hack the plugin myself then, and do less updating it.
Hope you will change your mind some day. Thank you for your plugin.
Cheers.
Forum: Plugins
In reply to: [The SEO Framework – Fast, Automated, Effortless.] Hide TSF metaboxOk, I added it, thanks!
Maybe it’s an idea to create an extra THE_SEO_FRAMEWORK_HEADLESS_BACKEND constant for this purpose, so people won’t make the mistake not checking the is_admin() condition.
Cheers.
Forum: Plugins
In reply to: [The SEO Framework – Fast, Automated, Effortless.] Hide TSF metaboxWorks like a charm, thanks a lot! ??
Forum: Plugins
In reply to: [Contact Form 7] Recaptcha securing all forms on all pages?Never mind, I compared the html of your form and of other forms on other pages, and although the box is visible, the recaptcha isnt embedded into the other forms.
So other forms are not protected by your recaptcha, and need a separate solution.
PS. I added a if(!is_user_logged_in()) { .. } around the existing if in the function.
Never realized WP itself uses the s parameter as well in the admin area.
Did not want to wait for the user id function, so went ahead and created below function. Maybe it helps someone ??
/* * Prepopulate datatable search field when landing on user email admin page */ function prepopulate_search_user_field() { if( isset( $_GET['page'] ) && ($_GET['page'] == 'send-users-email-users') ): if( isset( $_GET['uid'] ) || isset( $_GET['subject'] ) ): ?> <script type="text/javascript"> (function($){ $('input[name="subject"]').val("<?php echo $_GET['subject']; ?>"); // https://datatables.net/reference/api/draw() var table = $('#sue-user-email-tbl').DataTable(); table.search( <?php echo $_GET['uid']; ?> ).draw(); })(jQuery); </script> <?php endif; endif; } add_action( 'shutdown', 'prepopulate_search_user_field' );
- This reply was modified 3 years ago by tezalsec.
I did a new test, and now it is working ?? So never mind. Thank you.