wordna
Forum Replies Created
-
Forum: Plugins
In reply to: [LiteSpeed Cache] PHP Warning Cannot modify header informationI see the same issue.
I am indeed able to login and connect the plugin. I haven’t noticed any functionality issues, but I also haven’t run a bunch of tests. I do note, however that this HTTP API Call with a 400 Bad Request error is slowing down my site.
I don’t understand why this plugin is benig called at all on /wp-admin/index.php?
Forum: Plugins
In reply to: [User Switching] Block Switching to Other Admins@bencoates , The following code works with your suggested filter:
add_filter( 'switch_to_url', 'my_switch_to_url', 9, 2 ); function my_switch_to_url($url, $user) { //your conditions here if (!user_can( $user->ID, 'promote_users' )){ return $url; } else { return false; } }
Could you make the necessary pull request via GitHub to add your suggested filter to the switch_to_url function: https://github.com/johnbillion/user-switching
I am not sure how to do that.
Forum: Plugins
In reply to: [User Switching] Block Switching to Other Admins@johnbillion , Following up again.
Forum: Plugins
In reply to: [User Switching] Block Switching to Other AdminsHi @johnbillion , Any progress on this?
Forum: Plugins
In reply to: [User Switching] Block Switching to Other AdminsI believe editing the plugin PHP as follows acheives the desired goal, but I would much prefer this be included in the official plugin code or at least using a hook so that this tweak remains even after the plugin updates in the future:
/**
* Returns the switch to or switch back URL for a given user.
*
* @param WP_User $user The user to be switched to.
* @return string|false The required URL, or false if there’s no old user or the user doesn’t have the required capability.
*/
public static function maybe_switch_url( WP_User $user ) {
$old_user = self::get_old_user();if ( $old_user && ( $old_user->ID === $user->ID ) ) {
return self::switch_back_url( $old_user );
} elseif ( ( current_user_can( ‘switch_to_user’, $user->ID ) ) && !user_can( $user->ID, ‘promote_users’ ) ) {
return self::switch_to_url( $user );
} else {
return false;
}
}Forum: Plugins
In reply to: [User Switching] Block Switching to Other AdminsHi @johnbillion,
Yes, my site uses custom roles which is why some users with the edit_users capacity don’t have the promote_users capacity. My understanding is that such users can edit most aspects of the website’s users but can not change user roles. If I have selected that they can not change user roles, then they should not be able to change to a user that can.
I read through the FAQs and managed to tweak the plugin code slightly to prevent the “Switch To” link from being generated if the target user can promote_users, but I would much prefer if this was either built-in or if I could at least implement this using a hook.
Forum: Plugins
In reply to: [User Switching] Block Switching to Other AdminsI think the best implementation would be to block users who do not have the promote_users permission from switching to a user that has the promote_users permission.
Forum: Plugins
In reply to: [Wordpress 2-step verification] Preventing Website Scrolling@as247 I don’t see any JS errors in the console. What is the next troubleshooting step?
Forum: Plugins
In reply to: [Countdown Timer - Widget Countdown] media_buttons_context is deprecatedAm I posting in the wrong spot?
Forum: Plugins
In reply to: [Countdown Timer - Widget Countdown] media_buttons_context is deprecatedYes, I realize that I can turn the notifications off, but I think the code should still be updated.
That is an odd requirement. If it is a requirement, I think that should be stated very near that Settings > Link Checker > General email field.
I have removed the email from Settings > Link Checker > General and hopefully that resolves the PHP issue and that non-admin users are receiving the Broken Link notification emails.
The email address at Settings > Link Checker > General was (until recently) not associated with any WordPress User account but was identical to Settings > General > Administration Email Address. I recently created a WordPress User account with that email address, but it has a “Subscriber” role. Perhaps one of those situations wasn’t anticipated by the plugin’s coding
It looks like some non-Administrator Users have started receiving the email notifications when Broken Links are detected…
Forum: Plugins
In reply to: [Broken Link Checker] Not Finding a Known Broken LinkAny updates? I really like your plugin, but not checking relative path URLs is a major limitation.
Yes, we are using Members (https://www.ads-software.com/plugins/members/)
Before disabling any plugins, I clicked “Re-check all pages” but the error wasn’t generated in my debug.log file. It seems like it is generated whenever I receive a “Broken Links Detected” email…Does that make any sense?
I’m not sure what else I can do in addition to the provided stack trace?