• Resolved Anonymous User 20348352

    (@anonymized-20348352)


    Hi,

    When disabling Slim SEO settings page through:

    add_action( 'slim_seo_init', function( $plugin ) {
        $plugin->disable( 'settings' );
    } );

    based on the documentation, it raises a PHP Fatal error:

    Fatal error: Uncaught Error: Call to a member function is_feature_active() on null in /var/www/html/wp-content/plugins/slim-seo/src/Plugin.php on line 66

    Thanks!

Viewing 3 replies - 1 through 3 (of 3 total)
  • Plugin Author Anh Tran

    (@rilwis)

    Hi @luk4 ,

    Please don’t disable the “settings” page. It’s required to check other features to see if they’re enabled. I’ve updated the docs, removing “settings” from the list to prevent this action.

    Thread Starter Anonymous User 20348352

    (@anonymized-20348352)

    Hi,

    Thanks for your reply @rilwis and the docs update.

    It might be nice to be able to hide the settings page from the admin dashboard though. For all, or some users/capabilities.

    Otherwise, reflecting which features are disabled by add_action() in the Slim SEO UI (uncheck the relevant checkboxes and disabling them) would be much welcome.

    Thanks!

    Plugin Author Anh Tran

    (@rilwis)

    Thank you for your suggestion! We still need the settings pages for some purpose. So, for now, let’s keep it.

    Thanks,
    Anh

Viewing 3 replies - 1 through 3 (of 3 total)

The topic ‘PHP Fatal error with $plugin->disable( ‘settings’ );’ is closed to new replies.