[SmartCrawl Pro] Annoying message on admin dashboard

I keep getting a very annoying message from smart crawl in 1 of the sites on this network:
This site discourages search engines from indexing the pages, which will affect your SEO efforts. You can fix this here

I dismiss the message but it comes back on the next page reload. I need to DISABLE that message completely.
This particular site is not for public and we don't want any pages indexed.
We also don't want to get that damn message all the time.

Would you please let me know where I can disable it? using a filter or action is fine if I have to, I just can't find a setting on the plugin for that.

I have a 2nd question: I noticed I'm forced to enable or disable this plugin network wide.
I need to disable this plugin completely on a give site.
Is there a way to disable it on a per site basis? Or perhaps you guys could consider allowing us to enable it on a per site basis as usual?

Thanks!

  • Nithin

    Hi Leni Neto,

    Would you please let me know where I can disable it? using a filter or action is fine if I have to, I just can't find a setting on the plugin for that.

    I could notice the same issue as you have stated, I'm afraid, there isn't any out of the box setting in the plugin side to correct this behaviour, it should have closed once the message was dismissed. I'm bringing into the developers attention to see whether this is set as intentional, or not, and if possible to correct this behaviour down the plugin release.

    I could notice that it's using admin_notices hook to add the message, I tried couple of methods to unhook using action, but I'm afraid the message still appears. I'm checking with the developer to see what would be the correct code to make this work using remove_action, will keep you posted once I get an update regarding this.

    Is there a way to disable it on a per site basis? Or perhaps you guys could consider allowing us to enable it on a per site basis as usual?

    At the moment, the plugin can only be enabled Network Wide, with the options to enable the plugin modules either Network Wide, or for all subsites individually, as shown below:

    If Sitewide Mode (Network Level Changes Only) is only enabled, then SmartCrawl seting could only be controlled via the network dashboard, would that help?

    We are looking into to the possibilities of considering the options for enabling the plugin per site, however at the moment, I'm afraid, what's mentioned above would be the default workflow.

    Regards,
    Nithin

  • Nithin

    HI Leni Neto,

    I got an update regarding the 1st query raised, this is the intended behaviour at the moment in the plugin side, so that the members doesn't forget to switch back to enable Search Engine crawling in their WordPress dashboard.

    I do understand the message is irrelevant in your use case, however the following code should help with removing the message:

    <?php
    add_action( 'admin_notices', function(){
        global $wp_filter;
        $tag = 'admin_notices';
        $hook = 'blog_not_public_notice';
    
        foreach ( $wp_filter[$tag]->callbacks as $key => $callback_array ) {
    
            foreach ( $callback_array as $c_key => $callback ) {
                if ( substr_compare( $c_key, $hook, strlen( $c_key )-strlen( $hook ), strlen( $hook ) ) === 0 ) {
                    unset( $wp_filter[$tag]->callbacks[$key][$c_key] );
                }
            }
        }
    }, 0 );

    You can apply the above code as a mu-plugins, please check this article on how to implement as a mu-plugins:
    https://premium.wpmudev.org/manuals/wpmu-manual-2/using-mu-plugins/

    Kind Regards,
    Nithin

  • Nithin

    Hi Leni Neto,

    I still think we should be able to disable the plugin completely, on a per-site basis.
    Its adding an unnecessary delay in our site and unless I can work around it, I will just have to ditch the plugin completely.

    I do understand you, we have already brought this use case to our developers attention, and have tasked it for our developers as an improvement to the plugin. At the moment, we don't have any further information, on when such feature would be made available in the plugin side, but it's something which our developers are aware of, and are looking to improve further down the plugins road map.

    Regards,
    Nithin

  • Leni Neto

    Hi Nithin,

    just to give you some feedback, your code implementation worked and I was able to get rid of the nagging message on a per-site basis using a plugin (not an mu-plugin as that would be for the entire network).

    I still thing you guys need to implement the feature to let use switch the plugin off on a per site basis, but for the time being, disable ALL modules on plugin settings got rid of the scoring of every page and post so the page/post list is loading faster.

    Enough for now I would say, but it definitely needs improvement.

    Cheers!

Thank NAME, for their help.

Let NAME know exactly why they deserved these points.

Gift a custom amount of points.