• Resolved peter8nss

    (@peter8nss)


    Following on from https://ww.wp.xz.cn/support/topic/options-slowing-page-load/, I looked at where the dynamic-menu option was being loaded or rather where get_option( $this->getCSSSlug() ) is called.

    It looks like the calls in:

    • MobileMenuCSS::__construct
    • MobileMenuCSS::enqueueCSS

    Are unneccessary as, in each case, the resulting variable is never used.

    ps: in MobileMenuCSS::__construct the call to $this->getCSSFilePath() is also unnecessary, as the resulting variable is never used either.

Viewing 2 replies - 1 through 2 (of 2 total)
  • Thread Starter peter8nss

    (@peter8nss)

    In fact, I’m not sure the dynamic-menu option is needed at all. It only seems to be used to hold the CSS if the write fails in generateSaveCSS. And is only read in printCSS (if setting css==’generate’). But if that is the case, enqueueCSS will already have the CSS needed.

    Plugin Author Rui Guerreiro

    (@takanakui)

    Hi @peter8nss,

    You are right, it seems I forget those 2 lines when I changed that file.

    Will fix it for the next version update.

    Thanks

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

The topic ‘Reading dynamic-menu option’ is closed to new replies.