'', 'titleTag1' => 'h2', 'layoutStyle' => 'layout-type-1', 'noticeTitle' => 'Notice', 'noticeTitleIcon' => [ 'name' => 'info-circle', 'value' => 'fa fa-info-circle' ], 'noticeListItems' => ['List items'], 'noticeListType' => 'unordered', 'noticeContent' => 'This is the notice content', 'noticeContentType' => 'list', 'noticeListIcon' => [ 'name' => 'check-circle', 'value' => 'far fa-check-circle' ], 'noticeunorderedType' => 'icon', 'edTitleIcon' => true, 'titleAlignment' => 'left' ]; } public function render(array $attributes, string $content) : string { $attributes = $this->parse_attributes($attributes); extract($attributes); if(is_array($noticeListItems) && count($noticeListItems) === 1 && isset($noticeListItems[0]['list']) && has_shortcode($noticeListItems[0]['list'], 'affiliatex-product')) { $noticeListItems = json_decode(do_shortcode($noticeListItems[0]['list']), true); } $wrapper_attributes = get_block_wrapper_attributes(array( 'class' => 'affx-notice-wrapper', 'id' => "affiliatex-notice-style-$block_id" )); $titleTag1 = AffiliateX_Helpers::validate_tag($titleTag1, 'h2'); $list = AffiliateX_Helpers::render_list( array( 'listType' => $noticeListType, 'unorderedType' => $noticeunorderedType, 'listItems' => $noticeListItems, 'iconName' => $noticeListIcon['value'], ) ); ob_start(); include $this->get_template_path(); return ob_get_clean(); } }