| @@ -51,9 +51,9 @@ | ||
| 51 | 51 | if (function_exists('\register_block_type')) { |
| 52 | 52 | \register_block_type( |
| 53 | 53 | 'fluent-community/page-layout', |
| 54 | 54 | array( |
| 55 | - 'api_version' => 3, | |
| 55 | + 'api_version' => '3', // WP core uses int but stub declares string | |
| 56 | 56 | 'editor_script' => 'custom-layout-block-editor', |
| 57 | 57 | 'editor_style' => 'custom-layout-block-editor-style', |
| 58 | 58 | 'style' => 'fluent_community_global', |
| 59 | 59 | 'render_callback' => [$this, 'render'], |
| @@ -142,22 +142,9 @@ | ||
| 142 | 142 | return $classes; |
| 143 | 143 | }); |
| 144 | 144 | } else if (Helper::hasColorScheme()) { |
| 145 | 145 | add_action('wp_head', function () { |
| 146 | - ?> | |
| 147 | - <script> | |
| 148 | - (function () { | |
| 149 | - var globalStates = localStorage.getItem('fcom_global_storage'); | |
| 150 | - if (globalStates) { | |
| 151 | - globalStates = JSON.parse(globalStates); | |
| 152 | - if (globalStates && globalStates.fcom_color_mode == 'dark') { | |
| 153 | - document.documentElement.classList.add('dark'); | |
| 154 | - document.documentElement.setAttribute('data-color-mode', 'dark'); | |
| 155 | - } | |
| 156 | - } | |
| 157 | - })(); | |
| 158 | - </script> | |
| 159 | - <?php | |
| 146 | + Helper::renderColorSchemePrePaintScript(); | |
| 160 | 147 | }); |
| 161 | 148 | } |
| 162 | 149 | |
| 163 | 150 | ob_start(); |
| @@ -171,9 +158,9 @@ | ||
| 171 | 158 | <?php endif; ?> |
| 172 | 159 | <div class="fhr_content"> |
| 173 | 160 | <div class="fhr_home"> |
| 174 | 161 | <div class="feed_layout"> |
| 175 | - <div class="spaces"> | |
| 162 | + <div class="spaces fcom_space_list"> | |
| 176 | 163 | <div id="fluent_community_sidebar_menu" class="space_contents"> |
| 177 | 164 | <?php do_action('fluent_community/portal_sidebar', $contenx); ?> |
| 178 | 165 | </div> |
| 179 | 166 | </div> |
| @@ -211,9 +198,9 @@ | ||
| 211 | 198 | <?php endif; ?> |
| 212 | 199 | <div class="fhr_content"> |
| 213 | 200 | <div class="fhr_home"> |
| 214 | 201 | <div class="feed_layout"> |
| 215 | - <div class="spaces"> | |
| 202 | + <div class="spaces fcom_space_list"> | |
| 216 | 203 | <div id="fluent_community_sidebar_menu" class="space_contents"> |
| 217 | 204 | <!-- start--> |
| 218 | 205 | <?php do_action('fluent_community/portal_sidebar', 'headless'); ?> |
| 219 | 206 | <!-- end--> |