get_prefixed_hook( 'controllers/starts' ), [ &$this ] ); $this->start_controls_section( 'section_template', array( 'label' => __( 'Template', 'absolute-addons' ), ) ); $list_group = apply_filters( $this->get_prefixed_hook( 'styles' ), [ 'one' => esc_html__( 'Style One', 'absolute-addons' ), 'two' => esc_html__( 'Style Two', 'absolute-addons' ), 'three-pro' => esc_html__( 'Style Three Pro', 'absolute-addons' ), 'four-pro' => esc_html__( 'Style Four Pro', 'absolute-addons' ), 'five-pro' => esc_html__( 'Style Five Pro', 'absolute-addons' ), 'six-pro' => esc_html__( 'Style Six Pro', 'absolute-addons' ), 'seven-pro' => esc_html__( 'Style Seven Pro', 'absolute-addons' ), 'eight-pro' => esc_html__( 'Style Eight Pro', 'absolute-addons' ), 'nine-pro' => esc_html__( 'Style Nine Pro', 'absolute-addons' ), 'ten' => esc_html__( 'Style Ten', 'absolute-addons' ), 'eleven-pro' => esc_html__( 'Style Eleven Pro', 'absolute-addons' ), 'twelve' => esc_html__( 'Style Twelve', 'absolute-addons' ), 'thirteen' => esc_html__( 'Style Thirteen', 'absolute-addons' ), 'fourteen' => esc_html__( 'Style Fourteen', 'absolute-addons' ), ] ); $pro_styles = [ 'three-pro', 'four-pro', 'five-pro', 'six-pro', 'seven-pro', 'eight-pro', 'nine-pro', 'eleven-pro', ]; $this->add_control( 'absolute_list_group', array( 'label' => esc_html__( 'List Group Style', 'absolute-addons' ), 'label_block' => true, 'type' => Absp_Control_Styles::TYPE, 'options' => $list_group, 'default' => 'one', ) ); $this->init_pro_alert( $pro_styles ); $this->end_controls_section(); $this->start_controls_section( 'section_content', array( 'label' => __( 'Content', 'absolute-addons' ), 'condition' => [ 'absolute_list_group' => [ 'one', 'three', 'four', 'six', 'eight', 'ten', 'thirteen' ], ], ) ); $repeater = new Repeater(); $repeater->add_control( 'title_link_select', [ 'label' => esc_html__( 'Title Select', 'absolute-addons' ), 'type' => Controls_Manager::SELECT, 'options' => [ 'yes' => esc_html__( 'With Link Title', 'absolute-addons' ), 'none' => esc_html__( 'Without Title', 'absolute-addons' ), ], 'default' => 'yes', ] ); $repeater->add_control( 'list_group_title', [ 'label' => esc_html__( 'Title', 'absolute-addons' ), 'type' => Controls_Manager::TEXT, 'label_block' => true, 'default' => esc_html__( 'Stackworks Solution', 'absolute-addons' ), ] ); $repeater->add_control( 'link_url', [ 'label' => esc_html__( 'Link', 'absolute-addons' ), 'type' => Controls_Manager::URL, 'placeholder' => esc_html__( 'https://your-link.com', 'absolute-addons' ), 'show_external' => true, 'default' => [ 'url' => '', 'is_external' => true, 'nofollow' => true, ], 'condition' => [ 'title_link_select' => [ 'yes' ], ], ] ); $repeater->add_control( 'list_group_icon', [ 'label' => esc_html__( 'Icon', 'absolute-addons' ), 'type' => Controls_Manager::ICONS, 'fa4compatibility' => 'absolute-addons', 'default' => [ 'value' => 'fas fa-angle-right', 'library' => 'solid', ], ] ); $this->add_control( 'list_group_repeater', [ 'label' => esc_html__( 'List Group', 'absolute-addons' ), 'type' => Controls_Manager::REPEATER, 'show_label' => true, 'fields' => $repeater->get_controls(), 'default' => [ [ 'list_group_title' => esc_html__( 'Stackworks Solution', 'absolute-addons' ) ], [ 'list_group_title' => esc_html__( 'Social Media Covering', 'absolute-addons' ) ], [ 'list_group_title' => esc_html__( 'Communication Design', 'absolute-addons' ) ], [ 'list_group_title' => esc_html__( 'Human Resources', 'absolute-addons' ) ], ], 'title_field' => '{{{ list_group_title }}}', 'condition' => [ 'absolute_list_group' => [ 'one', 'three', 'four', 'six', 'eight', 'ten', 'thirteen' ], ], ] ); $this->end_controls_section(); $this->render_controller( 'two' ); $this->render_controller( 'five' ); $this->render_controller( 'eleven' ); $this->render_controller( 'fourteen' ); $this->render_controller( 'template-list-group-style' ); /** * Fires after controllers are registered. * * @param Absoluteaddons_Style_list_group $this Current instance of WP_Network_Query (passed by reference). * * @since 1.0.0 * */ do_action_ref_array( $this->get_prefixed_hook( 'controllers/ends' ), [ &$this ] ); } protected function render() { $settings = $this->get_settings_for_display(); $style = $settings['absolute_list_group']; if ( in_array( $style, [ 'one', 'three', 'four', 'six', 'eight', 'ten', 'thirteen' ] ) ) { $repeater = 'list_group_repeater'; } elseif ( in_array( $style, [ 'two', 'seven', 'twelve' ] ) ) { $repeater = 'list_group_repeater_two'; } elseif ( in_array( $style, [ 'five', 'nine' ] ) ) { $repeater = 'list_group_repeater_five'; } else { $repeater = 'list_group_repeater_' . $style; } ?>
    $list ) { ?>
  • render_template( [ 'list' => $list, 'index' => $index, ] ); ?>
add_link_attributes( 'button', $settings['link_url'] ); } ?> print_render_attribute_string( 'button' ); ?>>

get_button( $list ); ?>

'true' ] ); ?>
'true' ] ); ?>