PluginProbe
Countdown Timer Block – build urgency for events and launches / 1.2.0
Countdown Timer Block – build urgency for events and launches v1.2.0
1.3.3 trunk 1.0.0 1.0.1 1.0.2 1.0.3 1.0.4 1.0.5 1.0.6 1.0.7 1.0.8 1.0.9 1.1.0 1.1.1 1.1.2 1.1.3 1.1.4 1.1.5 1.1.6 1.1.7 1.2.0 1.2.1 1.2.2 1.2.3 1.2.4 All 32 releases
countdown-time / inc / HelpPage.php

HelpPage.php in Countdown Timer Block – build urgency for events and launches 1.2.0, at inc/HelpPage.php

31 lines 909 B
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
1 <?php
2 class CTBHelpPage{
3 public function __construct(){
4 add_action( 'admin_menu', [$this, 'adminMenu'] );
5 add_action( 'admin_enqueue_scripts', [$this, 'adminEnqueueScripts'] );
6 }
7
8 function adminMenu(){
9 add_submenu_page(
10 'edit.php?post_type=ctb',
11 __( 'Help', 'countdown-time' ),
12 __( 'Help', 'countdown-time' ),
13 'manage_options',
14 'ctb-help',
15 [$this, 'helpPage']
16 );
17 }
18
19 function helpPage(){ ?>
20 <div id='bplAdminHelpPage'></div>
21 <?php }
22
23 function adminEnqueueScripts( $hook ) {
24 if( strpos( $hook, 'ctb-help' ) ){
25 wp_enqueue_style( 'ctb-admin-help', CTB_DIR_URL . 'dist/admin-help.css', [], CTB_VERSION );
26 wp_enqueue_script( 'ctb-admin-help', CTB_DIR_URL . 'dist/admin-help.js', [ 'react', 'react-dom' ], CTB_VERSION );
27 wp_set_script_translations( 'ctb-admin-help', 'countdown-time', CTB_DIR_PATH . 'languages' );
28 }
29 }
30 }
31 new CTBHelpPage;