diff --git a/class/class-mainwp-child-pagespeed.php b/class/class-mainwp-child-pagespeed.php index 31901d5..ca434ea 100644 --- a/class/class-mainwp-child-pagespeed.php +++ b/class/class-mainwp-child-pagespeed.php @@ -1,26 +1,23 @@ init_cron(); } public function init_cron() { add_action( 'mainwp_child_pagespeed_cron_check', array( 'MainWP_Child_Pagespeed', 'pagespeed_cron_check' ) ); - if ( false === ( $sched = wp_next_scheduled( 'mainwp_child_pagespeed_cron_check' ) ) ) { + $sched = wp_next_scheduled( 'mainwp_child_pagespeed_cron_check' ); + if ( false === $sched ) { wp_schedule_event( time(), 'daily', 'mainwp_child_pagespeed_cron_check' ); } } @@ -127,17 +126,17 @@ class MainWP_Child_Pagespeed { public function hide_menu() { global $submenu; - if ( isset($submenu['tools.php']) ) { + if ( isset( $submenu['tools.php'] ) ) { foreach ( $submenu['tools.php'] as $key => $menu ) { - if ( $menu[2] == 'google-pagespeed-insights' ) { - unset($submenu['tools.php'][ $key ]); + if ( 'google-pagespeed-insights' == $menu[2] ) { + unset( $submenu['tools.php'][ $key ] ); break; } } } } - function update_footer( $text ) { + public function update_footer( $text ) { ?>