'caeliora_promo_widget', 'description' => esc_html__('Display a promo box with an image and link', 'caeliora') ); /* Widget control settings. */ $control_ops = array( 'width' => 250, 'height' => 350, 'id_base' => 'caeliora_promo_widget' ); /* Create the widget. */ parent::__construct( 'caeliora_promo_widget', esc_html__('Caeliora: Promo Box', 'caeliora'), $widget_ops, $control_ops ); } /** * How to display the widget on the screen. */ function widget( $args, $instance ) { extract( $args ); /* Our variables from the widget settings. */ $title = apply_filters('widget_title', $instance['title'] ); $image_url = $instance['image_url']; $heading = $instance['heading']; $image_link = $instance['image_link']; $height = $instance['height']; $margin = $instance['margin']; $newtab = $instance['newtab']; if($margin) { $args['before_widget'] = str_replace('
px
px
/>