PluginProbe
Uji Countdown / 2.2
Uji Countdown v2.2
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
← All changes | views/admin.php +29 -40 trunk2.2 View file →
@@ -1,62 +1,51 @@
1 1 <?php
2 -/**
3 - * Represents the view for the administration dashboard.
2 +/**
3 + * Represents the view for the administration dashboard.
4 4 *
5 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>
6 + * The User Interface to the end user.
7 + */
8 +?>
9 +<div class="wrap">
22 10
11 + <?php if ( floatval( get_bloginfo( 'version' ) ) <= 3.9 ) screen_icon(); ?>
12 + <h2<?php if ( floatval( get_bloginfo( 'version' ) ) >= 3.9 ) {
13 + echo ' class="ujc-admin-tit"';
14 + } ?>><?php echo esc_html( get_admin_page_title() ); ?></h2>
15 +
23 16 <?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;
17 + $active_tab = isset( $_GET['tab'] ) ? $_GET['tab'] : 'tab_ujic_list';
18 + !empty($_GET['_wp_http_referer']) && false !== strpos($_GET['_wp_http_referer'], 'tab_ujic_news') ? $active_tab = 'tab_ujic_news' : null;
27 19
28 20 $add_tab = __( 'Add New Style', 'uji-countdown' );
29 21
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;
22 + if ( isset( $_GET['tab'] ) )
23 + {
24 + $active_tab = $_GET['tab'];
25 + $add_tab = ( 'tab_ujic_new' == $_GET['tab'] && isset( $_GET['edit'] ) ) ? __( 'Edit style', 'uji-countdown' ) : $add_tab;
34 26 }
35 27
36 - $tab_view = '<h2 class="nav-tab-wrapper ujic-modern-tabs">';
28 + $tab_view = '<h2 class="nav-tab-wrapper">';
37 29 $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>';
30 + $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>'.$add_tab.'</a>';
39 31
40 32 echo $tab_view;
41 33
42 34 do_action( 'admin_custom_tab' );
43 -
35 +
36 +
44 37 ?>
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
38 + <a href="?page=ujicountdown&tab=tab_ujic_shortcode" class="nav-tab <?php echo $active_tab == 'tab_ujic_shortcode' ? 'nav-tab-active' : ''; ?>"><i class="dashicons dashicons-shortcode ujic-mico"></i><?php _e( 'Shortcode', 'uji-countdown' ); ?></a>
39 + <a href="?page=ujicountdown&tab=tab_ujic_set" class="nav-tab <?php echo $active_tab == 'tab_ujic_set' ? 'nav-tab-active' : ''; ?>"><i class="dashicons dashicons-admin-tools ujic-mico"></i><?php _e( 'Settings', 'uji-countdown' ); ?></a>
40 + <a href="http://www.wpmanage.com/uji-countdown" target="_blank" class="nav-tab nav-tab-pro"><i class="dashicons dashicons-plus ujic-mico"></i><?php _e( 'Add-ons', 'uji-countdown' ); ?></a>
41 + </h2>
56 42
43 + <?php
57 44
45 +
58 46 $ujicount = new Uji_Countdown();
47 +
59 48
60 49
61 50 if ( $active_tab == 'tab_ujic_list' ) {
62 51 $ujicount->admin_tablelist();
@@ -79,5 +68,5 @@
79 68 $ujicount->admin_timerset();
80 69 }
81 70 ?>
82 71
83 -</div>
72 +</div>