PluginProbe
Countdown Timer Block – build urgency for events and launches / 1.2.5
Countdown Timer Block – build urgency for events and launches v1.2.5
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 / includes / UpgradePage.php

UpgradePage.php in Countdown Timer Block – build urgency for events and launches 1.2.5, at includes/UpgradePage.php

30 lines 857 B
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
1 <?php
2 class CTBUpgradePage{
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 __( 'Countdown - Upgrade', 'countdown-time' ),
12 __( 'Upgrade', 'countdown-time' ),
13 'manage_options',
14 'ctb-upgrade',
15 [$this, 'upgradePage']
16 );
17 }
18
19 function upgradePage(){ ?>
20 <div id='bplUpgradePage'></div>
21 <?php }
22
23 function adminEnqueueScripts( $hook ) {
24 if( strpos( $hook, 'ctb-upgrade' ) ){
25 wp_enqueue_script( 'ctb-admin-upgrade', CTB_DIR_URL . 'build/admin-upgrade.js', [ 'react', 'react-dom' ], CTB_VERSION );
26 wp_set_script_translations( 'ctb-admin-upgrade', 'countdown-time', CTB_DIR_PATH . 'languages' );
27 }
28 }
29 }
30 new CTBUpgradePage;