array( 'name' => esc_html__( 'Feature: Image', 'mega' ), 'description' => esc_html__( 'Feature: Image', 'mega' )) )); } public function settings( $form ) { $form->add_control( 'Mega_Control_Number', array( 'label' => esc_html__( 'Image Width (%)', 'mega' ), 'value' => 100, 'name' => 'width' )); $form->add_control( 'Mega_Control_Number', array( 'label' => esc_html__( 'Image Max Height (px)', 'mega' ), 'value' => 130, 'name' => 'max_height' )); $form->add_control( 'Mega_Control_Text', array( 'label' => esc_html__( 'Image URL', 'mega' ), 'name' => 'image_url' )); $form->add_control( 'Mega_Control_onOff', array( 'label' => esc_html__( 'Show In Mobile?', 'mega' ), 'value' => 1, 'name' => 'show_in_mobile' )); $form->add_sub_control( 'Mega_Control_Text', array( 'control' => 'show_in_mobile', 'control_value' => 'true', 'label' => esc_html__( 'Mobile Image URL', 'mega' ), 'name' => 'mobile_image_url', 'desc' => esc_html__( 'Mobile image is especially useful when your image isnt in high resolution, here you can change that and use an HD image for example, mobile devices treat images differently due to different dpi, width of images will always be 100%.', 'mega' ))); $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' ))); $form->add_control( 'Mega_Control_Text', array( 'label' => esc_html__( 'Placeholder bg color', 'mega' ), 'name' => 'ph_color' )); } public function enqueue() { } public function callback() { extract( $this->mega['settings'] ); if ( mega_is_mobile() && !$show_in_mobile ) return; echo $this->before(); echo '