add_box( [ 'id' => 'cafesio_post_settings', 'post_type' => 'post', 'title' => esc_html__('Cafesio Post Settings', 'cafesio'), ] ); /** * control for text input */ $this->add_control( [ 'box_id' => 'cafesio_post_settings', 'type' => 'url', 'name' => 'format_video_url', 'value' => '', 'desc' => esc_html__('Enter your video URL', 'cafesio'), 'label' => esc_html__( 'Video URL', 'cafesio' ), ] ); $this->add_control([ 'box_id' => 'cafesio_post_settings', 'name' => 'cafesio_ad_single_post_overwrite', 'type' => 'switcher', 'default' => 'no', 'label' => esc_html__('Overwrite Single Post Ads', 'cafesio'), 'left-choice' => [ 'no' => esc_html__('No', 'cafesio'), ], 'right-choice' => [ 'yes' => esc_html__('Yes', 'cafesio'), ], ]); $this->add_control([ 'box_id' => 'cafesio_post_settings', 'name' => 'cafesio_ad_single_banner_img_overwrite', 'type' => 'upload', 'label' => esc_html__('Single Post Ads', 'cafesio'), 'conditions' => [ [ 'control_name' => 'cafesio_ad_single_post_overwrite', 'operator' => '==', 'value' => 'yes', ], ], ]); $this->add_control([ 'box_id' => 'cafesio_post_settings', 'name' => 'cafesio_ad_single_url_overwrite', 'type' => 'text', 'label' => esc_html__('Single Post Ads URL', 'cafesio'), 'conditions' => [ [ 'control_name' => 'cafesio_ad_single_post_overwrite', 'operator' => '==', 'value' => 'yes', ], ], ]); } }