inc/widgets/largo-recent-posts.php

class largo_recent_posts_widget
Largo Recent Posts
__construct()

Register widget with WordPress.

widget()

Outputs the content of the recent posts widget.

Parameters:
  • $args (array) – widget arguments.
  • $instance (array) – saved values from databse.
Global:

$post

Global:

$shown_ids $n array of post IDs already on the page, to avoid duplicating posts

Global:

$wp_query $sed to get posts on the page not in $shown_ids, to avoid duplicating posts