Total Complexity | 4 |
Total Lines | 22 |
Duplicated Lines | 0 % |
Changes | 1 | ||
Bugs | 0 | Features | 0 |
1 | <?php |
||
8 | class BricksSiteReview extends BricksElement |
||
9 | { |
||
10 | public function render() |
||
11 | { |
||
12 | if (empty($this->settings['post_id'])) { |
||
13 | $this->render_element_placeholder([ |
||
14 | 'title' => esc_html_x('Please select a Review.', 'admin-text', 'site-reviews'), |
||
15 | ]); |
||
16 | return; |
||
17 | } |
||
18 | if (!$this->elShortcode->hasVisibleFields($this->settings)) { |
||
19 | $this->render_element_placeholder([ |
||
20 | 'title' => esc_html_x('You have hidden all of the fields.', 'admin-text', 'site-reviews'), |
||
21 | ]); |
||
22 | return; |
||
23 | } |
||
24 | parent::render(); |
||
25 | } |
||
26 | |||
27 | public static function shortcode(): ShortcodeContract |
||
30 | } |
||
31 | } |
||
32 |