r16n
Forum Replies Created
-
Forum: Hacks
In reply to: Why is add_menu_page() returning a translated hook name?Thinking about this some more, if your hook is breaking a 3rd party plugin, but WordPress itself doesn’t have any issues, it could be the other plugin has used a translate function inappropriately.
The same thing happens with the WooCommerce plugin which isn’t relying on the output of
add_menu_page()
to hook their CSS/JavaScript or rely on its name. I can not install every plugin available to WordPress, but I bet there are more plugins that would break because of the translated hook name.Checking for your domain should have been enough.
My plugin is used to translate any string, without messing with the translation files.
For future reference, could you please share which plugin is being broken and what menu string is causing this?
I have contacted the author of the Profile Builder plugin, which was the plugin that broke.
Forum: Hacks
In reply to: Why is add_menu_page() returning a translated hook name?Thank you for your reply. I understand this might be an issue on my side.
Are you saying that the array key is getting translated and passed through the gettext filter?
This is exactly my problem. I would have not noticed it if did not break a 3rd party plugin. I have tested this a bit more and default WordPress pages are not affected when their name is translated.
I add the filter in my class’ constructor. Changing the priority (3rd parameter) does not help either.
This is a simplified version of my plugin’s code.
class MyClass { public function __construct () { add_filter('gettext', array($this, 'overrideTranslation'), PHP_INT_MAX, 3); } public function overrideTranslation ($translated_text, $text, $domain) { if ($domain == 'my-domain' && $text = 'My Text') { return 'Not My Text Anymore'; } return $translated_text; } } new MyClass();
No problem!
Forum: Plugins
In reply to: [Join My Multisite] plugin conflict due to PLUGIN_DIR constantThe changelog says “12 February, 2014”! Come on, it’s been 2015 for one and half months now ??
Thanks for your response, Madalin.
I also found out that it is possible to sign up for the same blog twice, which causes two entries in the
signups
table. This makes it impossible to perform action on the sign-up due to the check of a single row in the code.Also I think the “Users with Unconfirmed Email Address” list should be available for the blog new accounts are registered to or the network user admin screen. Not just on the first blog, as it is now.
I hacked into
wppb_signup_user
in email.confirmation.php to get this to work.Before
$meta = serialize( $meta );
I added this:if (is_multisite()) { $meta = (array) $meta; $meta['add_to_blog'] = get_current_blog_id(); }
This fix seems to do the trick. Could you please test this and update your plugin’s code.
Or does it need
domain
? I am not sure.I’m having the same issue with my multisite installation.
The problem seems to be in the email address used to send the confirmation email. It uses the main email address of the site (network). Which is propably not the same as the one configured in the SMTP plugin.
It should use the blog’s main email address instead, in my opinion.
Source code email.confirmation.php:
$admin_email = get_site_option( 'admin_email' );if ( $admin_email == '' )
$admin_email = 'support@' . $_SERVER['SERVER_NAME'];$from_name = apply_filters ( 'wppb_signup_user_notification_email_from_field', ( get_site_option( 'site_name' ) == '' ? 'WordPress' : esc_html( get_site_option( 'site_name' ) ) ) );
$message_headers = apply_filters ( 'wppb_signup_user_notification_from', "From: \"{$from_name}\" <{$admin_email}>\n" . "Content-Type: text/plain; charset=\"" . get_option('blog_charset') . "\"\n" );
I will the filters ‘wppb_signup_user_notification_from’ and ‘wppb_signup_user_notification_email_from_field’ to quickfix this.
Thank you!
I’m looking forward to the new version. For now I’ll just disable the minimum length setting.
I have found the problem. A cookie has been set under the path of my login page, which I rewrite using my own plugin. So for example I rewrite ‘wp-login.php’ to ‘/user/login/’. The cookie was set with path ‘/user/login’. Which explains why I didn’t see in the Chrome developer tools.
So my problem might not be caused by this plugin.
For anyone who is interested this is how I solved it:
Hook into ‘clear_auth_cookie’ and unset the cookie manuallyadd_action('clear_auth_cookie', 'my_clear_auth_cookie'); function my_clear_auth_cookie () { setcookie(LOGGED_IN_COOKIE, ' ', time() - YEAR_IN_SECONDS, '/user/login', COOKIE_DOMAIN); }
Forum: Plugins
In reply to: [WP Better Emails] Saving changes to the email templateI’ve also updated my translation and it works again. Thanks!
Forum: Plugins
In reply to: [Theme My Login] english string at german blogThe correct string is:
Hint: The password should be at least seven characters long. To make it stronger, use upper and lower case letters, numbers and symbols like ! " ? $ % ^ & ).
You can easily override it by copying the default template named profile-form.php to your theme’s folder and editing line 73.
Forum: Plugins
In reply to: [WP Better Emails] Saving changes to the email templateI’m experiencing the same issue.
In Opera’s console it shows the following error:
Deprecated TinyMCE API call: <target>.onBeforeSetContent.add(..)
(wp-tinymce.php?c=1&ver=4104-20140822:20)