0, 'title' => esc_html__('Sports News', 'ample-magazine'), 'post_number' => 10, ); return $defaults; } public function __construct() { parent::__construct( 'ample-magazine-one-post-widget', esc_html__('AT: layout 2', 'ample-magazine'), array('description' => esc_html__('One column News Post Section', 'ample-magazine')) ); } public function form($instance) { $instance = wp_parse_args((array )$instance, $this->defaults()); $catid = absint($instance['cat_id']); $title = esc_attr($instance['title']); $post_number = absint($instance['post_number']); ?>
esc_html__('From Recent Posts', 'ample-magazine'),
'orderby' => 'name',
'order' => 'asc',
'show_count' => 1,
'hide_empty' => 1,
'echo' => 1,
'selected' => $catid,
'hierarchical' => 1,
'name' => esc_attr($this->get_field_name('cat_id')),
'id' => esc_attr($this->get_field_name('cat_id')),
'class' => 'widefat',
'taxonomy' => 'category',
'hide_if_empty' => false,
);
wp_dropdown_categories($ample_con_dropown_cat);
?>