PluginProbe
Posts Table with Search & Sort / 1.1.3
Posts Table with Search & Sort v1.1.3
1.4.13 trunk 1.0 1.0.1 1.0.2 1.0.3 1.0.4 1.0.5 1.0.6 1.1 1.1.1 1.1.2 1.1.3 1.1.4 1.1.5 1.2 1.3 1.3.1 1.3.1-v2 1.3.2 1.3.3 1.3.4 1.3.5 1.3.6 1.3.7 All 40 releases
posts-data-table / includes / class-posts-data-table-shortcode.php

class-posts-data-table-shortcode.php in Posts Table with Search & Sort 1.1.3, at includes/class-posts-data-table-shortcode.php

40 lines 1.1 KB
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
1 <?php
2 // Prevent direct file access
3 if ( ! defined( 'ABSPATH' ) ) {
4 exit;
5 }
6
7 /**
8 * This class handles the posts table shortcode registration.
9 *
10 * @package Posts_Table_Search_And_Sort
11 * @author Barn2 Media <info@barn2.co.uk>
12 * @license GPL-3.0
13 * @link https://barn2.co.uk
14 * @copyright 2016-2018 Barn2 Media Ltd
15 */
16 class Posts_Data_Table_Shortcode {
17
18 const SHORTCODE = 'posts_data_table';
19
20 public static function register_shortcode() {
21 add_shortcode( self::SHORTCODE, array( __CLASS__, 'do_shortcode' ) );
22 }
23
24 /**
25 * Handles our posts data table shortcode.
26 *
27 * @param array $atts The shortcode attributes specified by the user.
28 * @param string $content The content between the open and close shortcode tags (not used)
29 * @return string The shortcode output
30 */
31 public static function do_shortcode( $atts, $content = '' ) {
32 // Parse attributes
33 $atts = shortcode_atts( Posts_Data_Table_Simple::$default_args, $atts, self::SHORTCODE );
34
35 // Create table and return output
36 $table = new Posts_Data_Table_Simple();
37 return $table->get_table( $atts );
38 }
39
40 }