| @@ -179,20 +179,9 @@ | ||
| 179 | 179 | <?php endif; ?> |
| 180 | 180 | </style> |
| 181 | 181 | |
| 182 | 182 | <?php if(Helper::hasColorScheme()): ?> |
| 183 | - <script> | |
| 184 | - (function () { | |
| 185 | - var globalStates = localStorage.getItem('fcom_global_storage'); | |
| 186 | - if (globalStates) { | |
| 187 | - globalStates = JSON.parse(globalStates); | |
| 188 | - if (globalStates && globalStates.fcom_color_mode == 'dark') { | |
| 189 | - document.documentElement.classList.add('dark'); | |
| 190 | - document.documentElement.setAttribute('data-color-mode', 'dark'); | |
| 191 | - } | |
| 192 | - } | |
| 193 | - })(); | |
| 194 | - </script> | |
| 183 | + <?php Helper::renderColorSchemePrePaintScript(); ?> | |
| 195 | 184 | <?php endif; ?> |
| 196 | 185 | |
| 197 | 186 | <?php |
| 198 | 187 | }); |
| @@ -314,11 +303,11 @@ | ||
| 314 | 303 | <div id="wrap" class="clr"> |
| 315 | 304 | <?php do_action('ocean_before_main'); // phpcs:ignore WordPress.NamingConventions.PrefixAllGlobals.NonPrefixedHooknameFound ?> |
| 316 | 305 | <main id="main" class="site-main clr"<?php oceanwp_schema_markup('main'); ?> role="main"> |
| 317 | 306 | <?php do_action('ocean_page_header'); // phpcs:ignore WordPress.NamingConventions.PrefixAllGlobals.NonPrefixedHooknameFound ?> |
| 318 | - <?php do_action('ocean_before_content_wrap'); ?> | |
| 307 | + <?php do_action('ocean_before_content_wrap'); // phpcs:ignore WordPress.NamingConventions.PrefixAllGlobals.NonPrefixedHooknameFound ?> | |
| 319 | 308 | <div id="content-wrap" class="container clr"> |
| 320 | - <?php do_action('ocean_before_primary'); ?> | |
| 309 | + <?php do_action('ocean_before_primary'); // phpcs:ignore WordPress.NamingConventions.PrefixAllGlobals.NonPrefixedHooknameFound ?> | |
| 321 | 310 | <div id="primary" class="content-area clr"> |
| 322 | 311 | <?php do_action('ocean_before_content'); // phpcs:ignore WordPress.NamingConventions.PrefixAllGlobals.NonPrefixedHooknameFound ?> |
| 323 | 312 | <div id="content" class="site-content clr"> |
| 324 | 313 | <?php do_action('ocean_before_content_inner'); // phpcs:ignore WordPress.NamingConventions.PrefixAllGlobals.NonPrefixedHooknameFound ?> |