| | |
| | | } else if (method_exists($this, $method)) { |
| | | $content = $this->$method($block, $content, $parent); |
| | | return $isPrerender ? $this->maybeOutputCustomStyles().$content : $content; |
| | | } elseif (!empty($blockName) && JVB_TESTING) { |
| | | } elseif (JVB_TESTING && !empty($blockName)) { |
| | | if (!in_array($block['blockName'], $this->getIgnore($isPrerender))) { |
| | | jvbDump('No method found for '.print_r($block['blockName'], true)); |
| | | } |
| | |
| | | |
| | | public function prerender_core_columns(array $block, ?string $content, ?WP_Block $parent):?string |
| | | { |
| | | jvbDump($block, 'columns'); |
| | | // jvbDump($block, 'columns'); |
| | | $attrs = $block['attrs']??[]; |
| | | $tagName = array_key_exists('tagName', $attrs) ? $attrs['tagName'] : 'section'; |
| | | |
| | |
| | | |
| | | public function prerender_core_paragraph(array $block, ?string $content, ?WP_Block $parent):?string |
| | | { |
| | | jvbDump($block, 'paragraph'); |
| | | // jvbDump($block, 'paragraph'); |
| | | // jvbDump($parent, 'Parent'); |
| | | $inside = $this->inside($block); |
| | | return empty($inside) ? '' : sprintf( |
| | |
| | | $inner = ''; |
| | | |
| | | if (!static::$currentLoop) { |
| | | |
| | | if (JVB_TESTING) { |
| | | jvbDump('No loop stored'); |
| | | } |
| | | return $content; |
| | | } |
| | | if (static::$currentLoop->have_posts()) { |
| | |
| | | |
| | | public function prerender_core_query_title(array $block, ?string $content, ?WP_Block $parent):?string |
| | | { |
| | | jvbDump($block, 'query title'); |
| | | // jvbDump($block, 'query title'); |
| | | $attr = $block['attrs']; |
| | | $name = ''; |
| | | $showPrefix = $attr['showPrefix']??false; |
| | |
| | | //core_archives |
| | | public function render_core_archives(array $block, string $content):string |
| | | { |
| | | jvbDump($block, 'archives'); |
| | | // jvbDump($block, 'archives'); |
| | | $attrs = $block['attrs']??[]; |
| | | $isDropdown = $this->checkAttrs('displayAsDropdown', $attrs); |
| | | |
| | |
| | | } |
| | | $inside = []; |
| | | foreach($pages->posts as $page) { |
| | | jvbDump($page); |
| | | $inside[] = sprintf( |
| | | '<li><a href="%s">%s</a>', |
| | | get_the_permalink($page->ID), |
| | |
| | | $styles['color'] = $this->getColor($v['text']); |
| | | } |
| | | if (isset($v['gradient'])) { |
| | | |
| | | if (JVB_TESTING) { |
| | | jvbDump($v, 'Gradient'); |
| | | } |
| | | } |
| | | break; |
| | | |
| | | case 'layout': |
| | |
| | | if ($sk === 'minHeight') { |
| | | $styles['min-height'] = $sv; |
| | | } else { |
| | | if (JVB_TESTING) { |
| | | jvbDump('No config set for dimension '.$sk.': '.print_r($sv, true)); |
| | | } |
| | | } |
| | | } |
| | | |
| | | |
| | | break; |
| | |
| | | }, $selectors); |
| | | $fullSelector = implode(',', $fullSelector); |
| | | |
| | | |
| | | if (JVB_TESTING) { |
| | | jvbDump($state, 'state'); |
| | | jvbDump($rules, 'rules'); |
| | | } |
| | | |
| | | if (isset($rules['color']['text']) || isset($rules['text'])) { |
| | | $css['color'] = $this->getColor($rules['color']['text'] ?? $rules['text']); |