PluginProbe ʕ •ᴥ•ʔ
Timeline Blocks / 2.0.1
Timeline Blocks v2.0.1
2.0.1 2.0.0 trunk
timeline-blocks / src / tb-helper / class-tb-admin.php
timeline-blocks / src / tb-helper Last commit date
class-tb-admin.php 1 week ago class-tb-block-helper.php 1 week ago class-tb-config.php 1 week ago class-tb-core-plugin.php 1 week ago class-tb-helper.php 1 week ago class-tb-init-blocks.php 1 week ago class-tb-loader.php 1 week ago
class-tb-admin.php
60 lines
1 <?php
2 if ( ! defined( 'ABSPATH' ) ) {
3 exit; // Exit if accessed directly
4 }
5
6 /**
7 * TB Admin.
8 *
9 * @package TB
10 */
11 if (!class_exists('TB_Admin')) {
12
13 /**
14 * Class TB_Admin.
15 */
16 final class TB_Admin {
17
18 /**
19 * Calls on initialization
20 *
21 * @since 0.0.1
22 */
23 public static function init() {
24
25 // Activation hook.
26 }
27
28 /**
29 * Filters and Returns a list of allowed tags and attributes for a given context.
30 *
31 * @param Array $allowedposttags Array of allowed tags.
32 * @param String $context Context type (explicit).
33 * @since 1.8.0
34 * @return Array
35 */
36 public static function add_data_attributes($allowedposttags, $context) {
37 $allowedposttags['a']['data-repeat-notice-after'] = true;
38
39 return $allowedposttags;
40 }
41
42 /**
43 * Enqueues the needed CSS/JS for the builder's admin settings page.
44 *
45 * @since 1.0.0
46 */
47 public static function styles_scripts() {
48 $localize = array(
49 'ajax_url' => admin_url( 'admin-ajax.php' ),
50 'ajax_nonce' => wp_create_nonce( 'tb-block-nonce' ),
51 );
52
53 wp_localize_script( 'tb-admin-settings', 'tb', apply_filters( 'timeline_blocks_js_localize', $localize ) );
54 }
55
56 }
57
58 TB_Admin::init();
59 }
60