'float_widget_recent_entries', 'description' => __( 'Your site’s most incoming Posts.' ), 'customize_selective_refresh' => true, ); parent::__construct( 'float-recent-posts', __( 'Float Incoming Posts' ), $widget_ops ); $this->alt_option_name = 'float_widget_recent_entries'; } public function widget( $args, $instance ) { if ( ! isset( $args['widget_id'] ) ) { $args['widget_id'] = $this->id; } $title = ( ! empty( $instance['title'] ) ) ? $instance['title'] : __( 'Incoming Posts' ); /** This filter is documented in wp-includes/widgets/class-wp-widget-pages.php */ $title = apply_filters( 'widget_title', $title, $instance, $this->id_base ); $number = ( ! empty( $instance['number'] ) ) ? absint( $instance['number'] ) : 5; if ( ! $number ) { $number = 5; } $show_date = isset( $instance['show_date'] ) ? $instance['show_date'] : false; $r = new WP_Query( apply_filters( 'widget_posts_args', array( 'posts_per_page' => $number, 'no_found_rows' => true, 'post_status' => 'future', 'ignore_sticky_posts' => true, ), $instance ) ); if ( ! $r->have_posts() ) { return; } ?>
posts as $recent_post ) : ?> ID ); $title = ( ! empty( $post_title ) ) ? $post_title : __( '(no title)' ); ?>
ID )) : ?>
ID)): ?>

ID), 20, '...' ); ?>

ID), 20, '...' ); ?>

Coming soon

id="get_field_id( 'show_date' ); ?>" name="get_field_name( 'show_date' ); ?>" />