| | |
| | | <?php |
| | | |
| | | function atat_render_core_site_logo(array $block, string $content):string |
| | | function aei_render_core_site_logo(array $block, string $content):string |
| | | { |
| | | $open = $close = ''; |
| | | |
| | |
| | | if (array_key_exists('className', $block['attrs'])) { |
| | | $logo = false; |
| | | if (str_contains($block['attrs']['className'], 'is-proper')) { |
| | | $logo = '<img class="logo" src="'.ATAT_URL.'/assets/tatty-soap-rose-header.webp">'; |
| | | $logo = '<img class="logo" src="'.AEI_URL.'/assets/tatty-soap-rose-header.webp">'; |
| | | } |
| | | if ($logo) { |
| | | return $open.$logo.$close; |
| | |
| | | return JVB()->blocks()->render_core_site_logo($block, $content); |
| | | } |
| | | |
| | | function atat_render_core_template_part(array $block, string $content): string |
| | | function aei_render_core_template_part(array $block, string $content): string |
| | | { |
| | | if (!array_key_exists('attrs', $block) || !array_key_exists('slug', $block['attrs']) || !in_array($block['attrs']['slug'], ['header', 'footer'])){ |
| | | return JVB()->blocks()->render_core_template_part($block, $content); |
| | | } |
| | | $content = JVB()->blocks()->render_core_template_part($block, $content); |
| | | $icon = file_get_contents(ATAT_DIR .'/assets/icons/background.svg'); |
| | | $icon = file_get_contents(AEI_DIR .'/assets/icons/background.svg'); |
| | | $search = str_contains($content, '<header>') ? '</header>' : '</footer>'; |
| | | return str_replace($search, $icon.$search, $content); |
| | | |