register_service( 'title_display', TitleDisplayMetaService::get_instance() ); $this->register_service( 'container_layout', ContainerLayoutMetaService::get_instance() ); $this->register_service( 'container_max_width', ContainerMaxWidthMetaService::get_instance() ); $this->register_service( 'header_transparent', HeaderTransparentMetaService::get_instance() ); $this->register_service( 'header_template', HeaderTemplateMetaService::get_instance() ); $this->register_service( 'footer_template', FooterTemplateMetaService::get_instance() ); $this->register_service( 'header_blur_background', HeaderBlurBackgroundMetaService::get_instance() ); if ( ! is_admin() ) { add_action( 'brandy_print_global_css', array( $this, 'print_global_css' ) ); } } public function register_metae() { foreach ( $this->services as $service ) { $service->register_meta(); } } private function register_service( $name, $service ) { $this->services[ $name ] = $service; } public static function map_array_to_css( $arr ) { return implode( ';', array_map( function( $value, $name ) { return "$name:$value"; }, $arr, array_keys( $arr ) ) ); } public function print_global_css() { ?>