get_core_locations(); $overwrite_header_location = false; $overwrite_footer_location = false; foreach ( $core_locations as $location => $settings ) { if ( ! $location_manager->get_location( $location ) ) { if ( 'header' === $location ) { $overwrite_header_location = true; } elseif ( 'footer' === $location ) { $overwrite_footer_location = true; } $location_manager->register_core_location( $location, array( 'overwrite' => true, ) ); } } if ( $overwrite_header_location || $overwrite_footer_location ) { /** @var Module $theme_builder_module */ $theme_builder_module = Module::instance(); $conditions_manager = $theme_builder_module->get_conditions_manager(); $headers = $conditions_manager->get_documents_for_location( 'header' ); $footers = $conditions_manager->get_documents_for_location( 'footer' ); function wrapper_main_open_tags() { echo wp_kses_post( '