File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -527,13 +527,18 @@ private function is_main_mu_site() {
527527 * @return array Site settings.
528528 */
529529 public function get_site_settings () {
530+ static $ cache = null ;
531+ if ( $ cache !== null ) {
532+ return $ cache ;
533+ }
534+
530535 $ service_data = $ this ->get ( 'service_data ' );
531536 $ whitelist = [];
532537 if ( isset ( $ service_data ['whitelist ' ] ) ) {
533538 $ whitelist = $ service_data ['whitelist ' ];
534539 }
535540
536- return [
541+ $ cache = [
537542 'quality ' => $ this ->get_quality (),
538543 'admin_bar_item ' => $ this ->get ( 'admin_bar_item ' ),
539544 'lazyload ' => $ this ->get ( 'lazyload ' ),
@@ -578,6 +583,7 @@ public function get_site_settings() {
578583 'show_badge_icon ' => $ this ->get ( 'show_badge_icon ' ),
579584 'badge_position ' => $ this ->get ( 'badge_position ' ),
580585 ];
586+ return $ cache ;
581587 }
582588
583589 /**
You can’t perform that action at this time.
0 commit comments