PluginProbe
Counter Box – Add Countdowns, Timers & Dynamic Counters to WordPress / 2.0
Counter Box – Add Countdowns, Timers & Dynamic Counters to WordPress v2.0
2.0.14 trunk 1.0 1.2 1.2.1 1.2.2 1.2.3 1.2.4 2.0 2.0.1 2.0.10 2.0.11 2.0.12 2.0.13 2.0.2 2.0.3 2.0.4 2.0.5 2.0.6 2.0.7 2.0.8 2.0.9
counter-box / admin / settings / sidebar.php

sidebar.php in Counter Box – Add Countdowns, Timers & Dynamic Counters to WordPress 2.0, at admin/settings/sidebar.php

101 lines 3.8 KB
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
1 <?php
2
3 use CounterBox\Admin\DBManager;
4 use CounterBox\Admin\Link;
5 use CounterBox\Admin\Settings;
6 use CounterBox\WOWP_Plugin;
7
8 defined( 'ABSPATH' ) || exit;
9
10 $link = $options['link'] ?? '';
11 $tag = $options['tag'] ?? '';
12 $status = ! empty( $options['status'] ) ? 'true' : 'false';
13 $test = ! empty( $options['mode'] ) ? 'true' : 'false';
14
15 $shortcode = '';
16 if ( ! empty( $options['id'] ) ) {
17 $shortcode = '[' . WOWP_Plugin::SHORTCODE . ' id="' . absint( $options['id'] ) . '"]';
18 }
19 ?>
20
21 <div class="wpie-sidebar">
22
23 <h2 class="wpie-title"><?php esc_html_e( 'Publish', 'counter-box' ); ?></h2>
24 <div class="wpie-fields__box">
25
26 <div class="wpie-field">
27 <div class="wpie-field__title"><?php esc_html_e( 'Status', 'counter-box' ); ?></div>
28 <label class="wpie-field__label">
29 <input type="checkbox" name="status" value="true" <?php checked( "true", $status ); ?>>
30 <span class=""><?php esc_html_e( 'Deactivate', 'counter-box' ); ?></span>
31 </label>
32 </div>
33
34 <div class="wpie-field">
35 <div class="wpie-field__title"><?php esc_html_e( 'Test mode', 'counter-box' ); ?></div>
36 <label class="wpie-field__label">
37 <input type="checkbox" name="mode" value="true" <?php checked( "true", $test ); ?>>
38 <span class=""><?php esc_html_e( 'Activate', 'counter-box' ); ?></span>
39 </label>
40 </div>
41
42 <div class="wpie-field">
43 <label class="wpie-field__label has-icon">
44 <span class="dashicons dashicons-tag"></span>
45 <input list="wpie-tags" type="text" name="tag" id="tag"
46 value="<?php echo esc_attr( $tag ); ?>">
47 <datalist id="wpie-tags">
48 <?php DBManager::display_tags(); ?>
49 </datalist>
50 </label>
51 </div>
52
53 <div class="wpie-field">
54 <label class="wpie-field__label has-icon">
55 <?php if ( ! empty( $link ) ): ?>
56 <a href="<?php echo esc_url( $link ); ?>" target="_blank">
57 <span class="dashicons dashicons-admin-links"></span>
58 </a>
59 <?php else: ?>
60 <span class="dashicons dashicons-admin-links"></span>
61 <?php endif; ?>
62 <input type="url" name="param[link]" id="link" value="<?php echo esc_url( $link ); ?>">
63 </label>
64 </div>
65
66 <?php if ( ! empty( $shortcode ) ) : ?>
67 <div class="wpie-field">
68 <label class="wpie-field__label has-icon">
69 <span class="dashicons dashicons-shortcode"></span>
70 <input type="text" id="shortcode" value="<?php echo esc_attr( $shortcode ); ?>" readonly>
71 </label>
72 </div>
73 <?php endif; ?>
74
75 </div>
76
77 <div class="wpie-actions__box">
78
79 <div class="wpie-action__link">
80 <?php if ( ! empty( $options['id'] ) ): ?>
81 <a class="wpie-link-delete"
82 href="<?php echo esc_url( Link::remove( $options['id'] ) ); ?>">
83 <?php esc_html_e( 'Delete', 'counter-box' ); ?>
84 </a>
85 <?php endif; ?>
86 </div>
87
88 <div class="wpie-action__btn">
89 <?php if ( ! empty( $options['id'] ) ): ?>
90 <a href="<?php echo esc_url( Link::duplicate( $options['id'] ) ); ?>"
91 class="button"><?php esc_html_e( 'Duplicate', 'counter-box' ); ?></a>
92 <?php endif; ?>
93 <?php submit_button( null, 'primary', 'submit_settings', false ); ?>
94 </div>
95 </div>
96
97 </div>
98
99 <?php
100 require_once plugin_dir_path( __FILE__ ) . 'pro-plugin.php';
101