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

How to make WordPress Plugin run on single specific Admin Page

You should use the load-edit.php action hook, and check for your post type (untested): add_action( ‘load-edit.php’, static function () { $screen = get_current_screen(); if ( empty( $screen->post_type ) || ‘myposttype’ !== $screen->post_type ) { return; } new the_function(); } ); You could also use the current_screen hook, but load-edit.php seems more correct.

Create a custom taxonomy’s term form

WordPress does not provide a hook or any API/function which allows us to move that form, or prevent it from being generated and added to the HTML source. But if you just wanted to visually hide that form, then it can easily be done using CSS, e.g. body.wp-admin.edit-tags-php #col-left { /* Hide the default form … Read more

Learnpress FATAL ERROR

As with any plugin error, it’s often helpful to delete the plugin files. You can do this on most hosts with FTP or the host’s file manager. Once you’ve deleted them, you can immediately re-download a fresh copy of the plugin version you want to use – you can try the latest version again or … Read more

REST API – filters not working inside plugin class

This is a problem: public function __contruct() it should be __construct, the S is missing, meaning there is no constructor and the add_filter calls never happen The function that registers the routes also never runs because the add_action call is commented out: //add_action( ‘rest_api_init’, array( $this, ‘extend_default_routes’ ) ); This means the constructor never runs, … Read more