*/ if ( ! defined( 'ABSPATH' ) ) { exit; // If this file is called directly, abort. } /** * advertisement Widget * * Class Aarambha_Kits_Block_Widget_2 */ class Aarambha_Kits_Block_Widget_2 extends Base_WP_Widget { /** * Constructor. */ public function __construct() { $this->widget_cssclass = 'widget_block widget-aarambha-kits'; $this->widget_description = esc_html__( 'Add your 255x392 advertisement here.', 'aarambha-kits' ); $this->widget_name = esc_html__( 'Aarambha Kits: Block Advertisement', 'aarambha-kits' ); $this->settings = array( 'title' => array( 'type' => 'text', 'default' => '', 'label' => esc_html__( 'Title', 'aarambha-kits' ), ), 'image_url' => array( 'type' => 'image', 'default' => '', 'label' => esc_html__( 'Upload Image', 'aarambha-kits' ), ), 'image_link' => array( 'type' => 'url', 'default' => '#', 'label' => esc_html__( 'Image Link', 'aarambha-kits' ), ), ); parent::__construct(); } /** * Output widget. * * @see WP_Widget * * @param array $args Arguments. * @param array $instance Widget instance. */ public function widget( $args, $instance ) { $title = apply_filters( 'widget_title', isset( $instance['title'] ) ? $instance['title'] : '' ); $this->widget_start( $args ); ?>
widget_title( $title ); ?>
widget_end( $args ); } }