/**
     * 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 
    }
Exemplo n.º 2
0
 public function __construct()
 {
     parent::__construct();
 }
Exemplo n.º 3
0
 function is_preview()
 {
     return version_compare($GLOBALS['wp_version'], '3.9', '<') ? false : parent::is_preview();
 }
Exemplo n.º 4
0
 public function __construct()
 {
     $params = ['classname' => 'widget_recent_entries', 'description' => __("Your site&#8217;s most recent Posts.", THEME_TEXT_DOMAIN), 'name' => __('Recent Widget', THEME_TEXT_DOMAIN)];
     parent::__construct('recent-posts', __('Recent Posts'), $params);
 }