| Total Complexity | 4 |
| Total Lines | 43 |
| Duplicated Lines | 0 % |
| Coverage | 0% |
| Changes | 0 | ||
| 1 | <?php |
||
| 8 | class BricksSiteReview extends BricksElement |
||
| 9 | { |
||
| 10 | public function designConfig(): array |
||
| 11 | { |
||
| 12 | return [ |
||
| 13 | 'style_text_align' => [ |
||
| 14 | 'exclude' => ['auto', 'justify'], |
||
| 15 | 'group' => 'design', |
||
| 16 | 'inline' => true, |
||
| 17 | 'label' => esc_html_x('Text Align', 'admin-text', 'site-reviews'), |
||
| 18 | 'rerender' => true, |
||
| 19 | 'tab' => 'style', |
||
| 20 | 'themeStyle' => true, |
||
| 21 | 'type' => 'text-align', |
||
| 22 | ], |
||
| 23 | 'style_heading' => [ |
||
| 24 | 'css' => [[ |
||
| 25 | 'property' => 'font', |
||
| 26 | 'selector' => '.glsr:not([data-theme]) h2, .glsr:not([data-theme]) h3, .glsr:not([data-theme]) h4', |
||
| 27 | ]], |
||
| 28 | 'group' => 'design', |
||
| 29 | 'label' => esc_html_x('Heading', 'admin-text', 'site-reviews'), |
||
| 30 | 'tab' => 'style', |
||
| 31 | 'themeStyle' => true, |
||
| 32 | 'type' => 'typography', |
||
| 33 | ], |
||
| 34 | ]; |
||
| 35 | } |
||
| 36 | |||
| 37 | public function render() |
||
| 38 | { |
||
| 39 | if (!$this->shortcodeInstance()->hasVisibleFields($this->settings)) { |
||
| 40 | $this->render_element_placeholder([ |
||
| 41 | 'title' => esc_html_x('You have hidden all of the fields.', 'admin-text', 'site-reviews'), |
||
| 42 | ]); |
||
| 43 | return; |
||
| 44 | } |
||
| 45 | parent::render(); |
||
| 46 | } |
||
| 47 | |||
| 48 | public static function shortcodeClass(): string |
||
| 51 | } |
||
| 52 | } |
||
| 53 |