function form($instance)
    {
        parent::form($instance);
        $well = isset($instance['well']) ? $instance['well'] : false;
        ?>
        <p>
            <label for="<?php 
        echo $this->get_field_id('well');
        ?>
"><?php 
        echo __('Has Container', 'notebook');
        ?>
</label>
            <input type="checkbox" id="<?php 
        echo $this->get_field_id('well');
        ?>
" name="<?php 
        echo $this->get_field_name('well');
        ?>
" <?php 
        checked($well);
        ?>
 />
        </p>
        <?php 
    }
Пример #2
0
 function widget($args, $instance)
 {
     global $current_user;
     if (am4PluginsManager::get("widgets")->isWidgetAvailable($this, $instance)) {
         return parent::widget($args, $instance);
     }
 }
 function MLM_Nav_Menu_Widget()
 {
     $widget_ops = array('description' => __('Use this widget to add one of your custom menus as a widget.'));
     parent::WP_Widget('nav_menu', __('Custom Menu'), $widget_ops);
 }