PluginProbe
Flex Posts – Responsive Posts Block / 1.12.0
Flex Posts – Responsive Posts Block v1.12.0
2.1.0 trunk 1.12.0 2.0.0
flex-posts / includes / class-flex-posts-list.php

class-flex-posts-list.php in Flex Posts – Responsive Posts Block 1.12.0, at includes/class-flex-posts-list.php

48 lines 803 B
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
1 <?php
2 /**
3 * Flex Posts List Widget
4 *
5 * @package Flex Posts
6 */
7
8 if ( ! defined( 'ABSPATH' ) ) {
9 exit;
10 }
11
12 /**
13 * Flex Posts List widget class
14 */
15 class Flex_Posts_List extends Flex_Posts_Widget {
16
17 /**
18 * Set base ID, name & options
19 */
20 public function __construct() {
21 parent::__construct(
22 'flex-posts-list',
23 esc_html__( 'Flex Posts', 'flex-posts' ),
24 array(
25 'description' => esc_html__( 'Displays posts list.', 'flex-posts' ),
26 )
27 );
28
29 $this->enqueue();
30 }
31
32 /**
33 * Get form fields
34 */
35 public function get_fields() {
36 return apply_filters( 'flex_posts_list_fields', parent::get_fields() );
37 }
38
39 /**
40 * Front-end display of widget.
41 *
42 * @param array $instance Saved values from database.
43 */
44 public function front( $instance ) {
45 flex_posts_display( $instance );
46 }
47 }
48