| @@ -1,40 +1,40 @@ | ||
| 1 | 1 | <?php |
| 2 | 2 | namespace Barn2\Plugin\Posts_Table_Search_Sort; |
| 3 | 3 | |
| 4 | -use Barn2\PTS_Lib\Registerable, | |
| 5 | - Barn2\PTS_Lib\Service; | |
| 4 | +use Barn2\Plugin\Posts_Table_Search_Sort\Dependencies\Lib\Registerable; | |
| 5 | +use Barn2\Plugin\Posts_Table_Search_Sort\Dependencies\Lib\Service\Standard_Service; | |
| 6 | 6 | |
| 7 | 7 | /** |
| 8 | 8 | * This class handles the posts table shortcode registration. |
| 9 | 9 | * |
| 10 | 10 | * @package Barn2\posts-table-search-sort |
| 11 | - * @author Barn2 Plugins <support@barn2.co.uk> | |
| 11 | + * @author Barn2 Plugins <support@barn2.com> | |
| 12 | 12 | * @license GPL-3.0 |
| 13 | 13 | * @copyright Barn2 Media Ltd |
| 14 | 14 | */ |
| 15 | -class Table_Shortcode implements Registerable, Service { | |
| 15 | +class Table_Shortcode implements Registerable, Standard_Service { | |
| 16 | 16 | |
| 17 | - const SHORTCODE = 'posts_table'; | |
| 17 | + const SHORTCODE = 'posts_table'; | |
| 18 | 18 | |
| 19 | - public function register() { | |
| 20 | - add_shortcode( self::SHORTCODE, array( $this, 'do_shortcode' ) ); | |
| 21 | - add_shortcode( 'posts_data_table', array( $this, 'do_shortcode' ) ); // back compat: support old shortcode | |
| 22 | - } | |
| 19 | + public function register() { | |
| 20 | + add_shortcode( self::SHORTCODE, [ $this, 'do_shortcode' ] ); | |
| 21 | + add_shortcode( 'posts_data_table', [ $this, 'do_shortcode' ] ); // back compat: support old shortcode | |
| 22 | + } | |
| 23 | 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 function do_shortcode( $atts, $content = '' ) { | |
| 32 | - // Parse attributes | |
| 33 | - $atts = shortcode_atts( Simple_Posts_Table::get_defaults(), $atts, self::SHORTCODE ); | |
| 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 function do_shortcode( $atts, $content = '' ) { | |
| 32 | + // Parse attributes | |
| 33 | + $atts = shortcode_atts( Simple_Posts_Table::get_defaults(), $atts, self::SHORTCODE ); | |
| 34 | 34 | |
| 35 | - // Create table and return output | |
| 36 | - $table = new Simple_Posts_Table(); | |
| 37 | - return $table->get_table( $atts ); | |
| 38 | - } | |
| 35 | + // Create table and return output | |
| 36 | + $table = new Simple_Posts_Table(); | |
| 37 | + return $table->get_table( $atts ); | |
| 38 | + } | |
| 39 | 39 | |
| 40 | 40 | } |