1 | <?php |
||
21 | class Kirki_Modules_Tooltips { |
||
22 | |||
23 | /** |
||
24 | * The object instance. |
||
25 | * |
||
26 | * @static |
||
27 | * @access private |
||
28 | * @since 3.0.0 |
||
29 | * @var object |
||
30 | */ |
||
31 | private static $instance; |
||
32 | |||
33 | /** |
||
34 | * An array containing field identifieds and their tooltips. |
||
35 | * |
||
36 | * @access private |
||
37 | * @since 3.0.0 |
||
38 | * @var array |
||
39 | */ |
||
40 | private $tooltips_content = array(); |
||
41 | |||
42 | /** |
||
43 | * The class constructor |
||
44 | * |
||
45 | * @access protected |
||
46 | * @since 3.0.0 |
||
47 | */ |
||
48 | protected function __construct() { |
||
51 | |||
52 | /** |
||
53 | * Gets an instance of this object. |
||
54 | * Prevents duplicate instances which avoid artefacts and improves performance. |
||
55 | * |
||
56 | * @static |
||
57 | * @access public |
||
58 | * @since 3.0.0 |
||
59 | * @return object |
||
60 | */ |
||
61 | public static function get_instance() { |
||
67 | |||
68 | /** |
||
69 | * Parses fields and if any tooltips are found, they are added to the |
||
70 | * object's $tooltips_content property. |
||
71 | * |
||
72 | * @access private |
||
73 | * @since 3.0.0 |
||
74 | */ |
||
75 | private function parse_fields() { |
||
88 | |||
89 | /** |
||
90 | * Allows us to add a tooltip to any control. |
||
91 | * |
||
92 | * @access public |
||
93 | * @since 4.2.0 |
||
94 | * @param string $field_id The field-ID. |
||
95 | * @param string $tooltip The tooltip content. |
||
96 | */ |
||
97 | public function add_tooltip( $field_id, $tooltip ) { |
||
105 | |||
106 | /** |
||
107 | * Enqueue scripts. |
||
108 | * |
||
109 | * @access public |
||
110 | * @since 3.0.0 |
||
111 | */ |
||
112 | public function customize_controls_print_footer_scripts() { |
||
121 | } |
||
122 |