• Resolved mathieu

    (@mathieu)


    Hi Frank,

    I am trying to disable the AO meta box in the post edit page, because while I understand the need for granularity that some people has. But, in my case, it creates more bloat/risk of error.

    I have looked up the code and tried with filter :

    add_filter('autoptimize_filter_enable_meta_ao_settings', function () {
            return false;
    });

    But it doesn’t work.

    Some trick I am missing?

    Regards,

Viewing 5 replies - 1 through 5 (of 5 total)
  • Plugin Author Optimizing Matters

    (@optimizingmatters)

    errr … on the main settings page, dead last setting is “Enable configuration per post/ page?”, turn that off and that should be it? ??

    hope this helps,
    frank

    Plugin Author Optimizing Matters

    (@optimizingmatters)

    just tested the code snippet and that seems to work for me by the way, so not sure what was happening there I’m afraid :-/

    Thread Starter mathieu

    (@mathieu)

    Well, for me, the filter removes the dead last settings from the options page but keeps the metabox.

    If I had only one website I wouldn’t care about checking the box, but I am mainly controlling AO with filter and I am trying to keep manual configuration of plugins in general to a minimum.

    • This reply was modified 3 years, 2 months ago by mathieu.
    Thread Starter mathieu

    (@mathieu)

    It’s okay, I fixed it with an update_option in a activation function I have, but the filter doesn’t seem to function properly either way.

    Anyway, thanks for your time.

    update_option("autoptimize_enable_meta_ao_settings", 0);

    • This reply was modified 3 years, 2 months ago by mathieu.
    Plugin Author Optimizing Matters

    (@optimizingmatters)

    weird the filter doesn’t work for you mathieu … a filter priority problem or a conflict of some kind somewhere? can you reproduce on a “blank” wordpress site?

Viewing 5 replies - 1 through 5 (of 5 total)
  • The topic ‘Disabling the metabox…’ is closed to new replies.