array( 'name' => esc_html__( 'Feature: Custom', 'mega' ), 'description' => esc_html__( 'Feature: Custom', 'mega' )), 'class_base' => 'ys-box-custom' )); } public function settings( $form ) { parent::settings( $form ); $form->add_sub_control( 'Mega_Control_Text', array( 'control' => 'gfx_type', 'control_value' => 'image', 'label' => esc_html__( 'Image URL', 'mega' ), 'name' => 'image_url' )); $form->add_control( 'Mega_Control_Text', array( 'label' => esc_html__( 'Title', 'mega' ), 'name' => 'title' )); $form->add_control( 'Mega_Control_Text', array( 'label' => esc_html__( 'Link', 'mega' ), 'value' => '#', 'name' => 'link' )); $form->add_control( 'Mega_Control_WP_Editor', array( 'label' => esc_html__( 'Content', 'mega' ), 'name' => 'text' )); $form->add_control( 'Mega_Control_onOff', array( 'label' => esc_html__( 'Show Button', 'mega' ), 'value' => 0, 'name' => 'show_button' )); $form->add_sub_control( 'Mega_Control_onOff', array( 'control' => 'show_button', 'control_value' => 'true', 'label' => esc_html__( 'Show button as text', 'mega' ), 'value' => 0, 'name' => 'button_as_text' )); $form->add_sub_control( 'Mega_Control_Text', array( 'control' => 'show_button', 'control_value' => 'true', 'label' => esc_html__( 'Button Label', 'mega' ), 'value' => esc_html__( 'Continue reading', 'mega' ), 'name' => 'button_label' )); $form->add_control( 'Mega_Control_Text', array( 'label' => esc_html__( 'Image Title/Alt Tag', 'mega' ), 'name' => 'image_title', 'desc' => esc_html__( 'Here you can define the title and alt tag for your image, it has little effect on the visual representation but is a good practice for a proper W3C validation.', 'mega' ))); } public function callback() { extract( $this->mega['settings'] ); echo $this->before(); if ( $gfx_position !== 'bottom' ) echo $this->getGFX(); $style = $gfx && ( $gfx_position === 'left' OR $gfx_position === 'right' ) ? 'width: calc(100% - ' . $gfx_width . '%);' : ''; $this->autoTagTitle( $link, $title ); if ( isset( $title_desc ) && !empty( $title_desc ) && $title_desc_pos === 'top' ) $content .= '