help-tooltip.php
743 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
<?php
/**
* Help Tooltip settings.
*/
// Exit if accessed directly.
if ( ! defined( 'ABSPATH' ) ) {
exit;
}
if ( ! class_exists( 'Stackable_Help_Tooltip' ) ) {
class Stackable_Help_Tooltip {
/**
* Constructor
*/
public function __construct() {
add_action( 'init', array( $this, 'register_settings' ) );
}
public function register_settings() {
register_setting(
'stackable_help_tooltip_disabled',
'stackable_help_tooltip_disabled',
array(
'type' => 'string',
'description' => __( 'Disable Stackable help video tooltips', STACKABLE_I18N ),
'sanitize_callback' => 'sanitize_text_field',
'show_in_rest' => true,
'default' => '',
)
);
}
}
new Stackable_Help_Tooltip();
}