',
));
}
add_action('widgets_init', 'ares_widgets_init');
add_action('optionsframework_custom_scripts', 'optionsframework_custom_scripts');
function optionsframework_custom_scripts() { ?>
__('Use this widget to display the Ares Recent Posts.', 'ares'),)
);
}
// Creating widget front-end
// This is where the action happens
public function widget($args, $instance) {
$title = apply_filters('widget_title', $instance['title']);
// before and after widget arguments are defined by themes
echo $args['before_widget'];
if (!empty($title))
echo $args['before_title'] . $title . $args['after_title'];
// This is where you run the code and display the output
// include 'inc/widget.php';
echo ares_recent_posts();
}
// Widget Backend
public function form($instance) {
if (isset($instance['title'])) {
$title = $instance['title'];
} else {
$title = __('Recent Articles', 'ares');
}
// Widget admin form
?>