Disable Plugin if not logged in

If you are the author/maintainer of chatbot/chatbot.php then it’s much easier to skip deactivating the plugin and put something like this at the top of the plugins PHP file: if ( ! is_user_logged_in() ) { // remove_action, etc… return; } Similarly using remove_action or remove_filter is much safer. In your case it may be as … Read more

is_singular() in mu-plugins not working

When the active_plugins option is retrieved, WordPress does not yet know what page has been requested, so this approach will not work. In order to achieve your objective, you would selectively activate the plugin (rather than selectively deactivate the plugin), but this may cause problems and destabilize your site (untested): add_filter( ‘option_active_plugins’, static function ( … Read more

Is there a canonical way for a plugin to install a mu-plugin or drop-in?

There are no canonical methods for doing this, and in many cases it’s undesirable. E.g. more than one plugin may want to override a drop in. You might also be reaching into and modifying files that are managed by the hosting company, which might either break things or trigger problems. Instead, you should disable any … Read more

Unable to access WPadmin, website down

go to the WordPress directory wp-content/plugin/ and rename the folder “force-strong-passwords” to force-strong-passwords-d If it worked then it is a plugin error remove this plugin and install its alternative plugin If you still need this plugin than contact to the plugin author

Mu-plugin causes entire site to crash [closed]

is_plugin_active isn’t available for mu-plugins to use. The codex says: NOTE: defined in wp-admin/includes/plugin.php, so this is only available from within the admin pages, and any references to this function must be hooked to admin_init or a later action. If you want to use this function from within a template or a must-use plugin, you … Read more

How to use a Must-Use plugin to hide a regular one and to hide itself?

Apparently, there’s no way to remove one plugin from the Must-Use list… But then, found a filter that does even better: show_advanced_plugins will completely hide the sight of the Must-Use plugins. After all, if you’re trying to hide something of this nature, then hide it all… It’s inside the class WP_Plugins_List_Table and takes two arguments: … Read more

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)