/** * Outputs the settings form for the Recent Posts widget. * * @param array $instance Current settings. */ public function form($instance) { $show_thumb = isset($instance['show_thumb']) ? (bool) $instance['show_thumb'] : true; parent::form($instance); ?> <p><input class="checkbox" type="checkbox"<?php checked($show_thumb); ?> id="<?php echo $this->get_field_id('show_thumb'); ?> " name="<?php echo $this->get_field_name('show_thumb'); ?> " /> <label for="<?php echo $this->get_field_id('show_thumb'); ?> "><?php _e('Display post thumbnail?', 'basicbootstrap'); ?> </label></p> <?php }
public function __construct() { parent::__construct(); }
function is_preview() { return version_compare($GLOBALS['wp_version'], '3.9', '<') ? false : parent::is_preview(); }
public function __construct() { $params = ['classname' => 'widget_recent_entries', 'description' => __("Your site’s most recent Posts.", THEME_TEXT_DOMAIN), 'name' => __('Recent Widget', THEME_TEXT_DOMAIN)]; parent::__construct('recent-posts', __('Recent Posts'), $params); }