PluginProbe
Uji Countdown / trunk
Uji Countdown vtrunk
3.0 trunk 1.0 1.0.1 1.0.2 1.0.3 1.0.4 1.0.5 1.0.6 1.0.6.1 1.0.7 1.0.8 1.0.9 1.1 1.2 1.3 1.3.1 1.3.2 1.3.3 2.0.1 2.0.2 2.0.3 2.0.4 2.0.5 2.0.6 All 36 releases
uji-countdown / views / admin.php

admin.php in Uji Countdown trunk, at views/admin.php

84 lines 3.5 KB
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
1 <?php
2 /**
3 * Represents the view for the administration dashboard.
4 *
5 * This includes the header, options, and other information that should provide
6 * The User Interface to the end user.
7 */
8 if ( ! defined( 'ABSPATH' ) ) {
9 exit;
10 }
11 ?>
12 <div class="wrap ujic-modern-admin">
13
14 <?php if ( floatval( get_bloginfo( 'version' ) ) <= 3.9 ) screen_icon(); ?>
15 <div class="ujic-admin-topbar">
16 <span class="ujic-admin-logo">07</span>
17 <div>
18 <h1 class="ujic-admin-title"><?php echo esc_html( get_admin_page_title() ); ?></h1>
19 <span class="ujic-admin-version"><?php echo esc_html( 'v' . ujic_plugin_version() ); ?> &middot; <?php echo esc_html( __( 'Style Builder', 'ujicountdown' ) ); ?></span>
20 </div>
21 </div>
22
23 <?php
24 $active_tab = isset( $_GET['tab'] ) ? sanitize_key( wp_unslash( $_GET['tab'] ) ) : 'tab_ujic_list';
25 $referer = isset( $_GET['_wp_http_referer'] ) ? sanitize_text_field( wp_unslash( $_GET['_wp_http_referer'] ) ) : '';
26 ! empty( $referer ) && false !== strpos( $referer, 'tab_ujic_news' ) ? $active_tab = 'tab_ujic_news' : null;
27
28 $add_tab = __( 'Add New Style', 'uji-countdown' );
29
30 if ( isset( $_GET['tab'] ) )
31 {
32 $active_tab = sanitize_key( wp_unslash( $_GET['tab'] ) );
33 $add_tab = ( 'tab_ujic_new' == $active_tab && isset( $_GET['edit'] ) ) ? __( 'Edit style', 'uji-countdown' ) : $add_tab;
34 }
35
36 $tab_view = '<h2 class="nav-tab-wrapper ujic-modern-tabs">';
37 $tab_view.= '<a href="?page=ujicountdown&amp;tab=tab_ujic_list" class="nav-tab '.($active_tab == 'tab_ujic_list' ? 'nav-tab-active' : '').'"><i class="dashicons dashicons-menu ujic-mico"></i>'. __( 'Timer Styles', 'uji-countdown' ).'</a>';
38 $tab_view.= '<a href="?page=ujicountdown&amp;tab=tab_ujic_new" class="nav-tab '.($active_tab == 'tab_ujic_new' ? 'nav-tab-active' : '').'"><i class="dashicons dashicons-clock ujic-mico"></i>'. esc_html( $add_tab ).'</a>';
39
40 echo $tab_view;
41
42 do_action( 'admin_custom_tab' );
43
44 ?>
45 <a href="?page=ujicountdown&tab=tab_ujic_shortcode" class="nav-tab <?php echo ( isset($active_tab) && $active_tab == 'tab_ujic_shortcode' ? 'nav-tab-active' : '' ) ?>"><i class="dashicons dashicons-shortcode ujic-mico"></i><?php _e( 'Shortcode', 'uji-countdown' ); ?></a>
46 <a href="?page=ujicountdown&tab=tab_ujic_set" class="nav-tab <?php echo ( isset($active_tab_set) && $active_tab_set == 'tab_ujic_set' ? 'nav-tab-active' : '' ) ?>"><i class="dashicons dashicons-admin-tools ujic-mico"></i><?php _e( 'Settings', 'uji-countdown' ); ?></a>
47 </h2>
48
49 <?php if ( ! ujic_is_pro_active() ) : ?>
50 <a class="ujic-pro-banner" href="https://wpmanage.com/plugins/ujicountdown/" target="_blank" rel="noopener noreferrer">
51 <img src="<?php echo esc_url( UJICOUNTDOWN_URL . 'assets/ujic-banner.png' ); ?>" alt="<?php esc_attr_e( 'Upgrade to Uji Countdown Pro', 'ujicountdown' ); ?>">
52 </a>
53 <?php endif; ?>
54
55 <?php
56
57
58 $ujicount = new Uji_Countdown();
59
60
61 if ( $active_tab == 'tab_ujic_list' ) {
62 $ujicount->admin_tablelist();
63 }
64
65 if ( $active_tab == 'tab_ujic_new' ) {
66 $ujicount->admin_countdown();
67 }
68
69 if ( $active_tab == 'tab_ujic_shortcode' ) {
70 $ujicount->admin_shortcode();
71 }
72
73
74 //Add custom tab
75 do_action( 'admin_custom_tab_funct' );
76
77
78 if ( $active_tab == 'tab_ujic_set' ) {
79 $ujicount->admin_timerset();
80 }
81 ?>
82
83 </div>
84