PluginProbe
Posts Table with Search & Sort / 1.3.7
Posts Table with Search & Sort v1.3.7
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 / lib / Admin / Settings_Scripts.php

Settings_Scripts.php in Posts Table with Search & Sort 1.3.7, at lib/Admin/Settings_Scripts.php

44 lines 901 B
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
1 <?php
2 namespace Barn2\PTS_Lib\Admin;
3
4 use Barn2\PTS_Lib\Registerable,
5 Barn2\PTS_Lib\Plugin\Plugin;
6
7 /**
8 * Registers the tooltip assets
9 *
10 * @package Barn2\barn2-lib
11 * @author Barn2 Plugins <support@barn2.com>
12 * @license GPL-3.0
13 * @copyright Barn2 Media Ltd
14 * @version 1.0
15 */
16 class Settings_Scripts implements Registerable {
17
18 /**
19 * @var Plugin The plugin object.
20 */
21 private $plugin;
22
23 public function __construct( Plugin $plugin ) {
24 $this->plugin = $plugin;
25 }
26
27 public function register() {
28 add_action( 'admin_enqueue_scripts', [ $this, 'load_scripts' ], 5 );
29 }
30
31 public function load_scripts() {
32 if ( ! wp_script_is( 'barn2-tiptip', 'registered' ) ) {
33 wp_register_script(
34 'barn2-tiptip',
35 plugins_url( 'lib/assets/js/jquery-tiptip/jquery.tipTip.min.js', $this->plugin->get_file() ),
36 [ 'jquery' ],
37 $this->plugin->get_version(),
38 true
39 );
40 }
41 }
42
43 }
44