Example #1
0
 function widget($args, $instance)
 {
     add_filter('widget_pages_args', array($this, 'handbook_post_type'));
     parent::widget($args, $instance);
     remove_filter('widget_pages_args', array($this, 'handbook_post_type'));
 }
Example #2
0
 public function __construct()
 {
     $params = ['classname' => 'widget_pages', 'description' => __('A list of your site’s Pages.'), 'name' => __('Page Widget', THEME_TEXT_DOMAIN)];
     parent::__construct('pages', __('Pages'), $params);
 }