PluginProbe
Button Generator – Easily Create Custom Buttons with Icons and Analytics / 3.0
Button Generator – Easily Create Custom Buttons with Icons and Analytics v3.0
trunk 1.1.1 2.0 2.1 2.2 2.3.2 2.3.3 2.3.4 2.3.5 2.3.6 2.3.7 2.3.8 2.3.9 3.0 3.0.1 3.0.2 3.0.3 3.1 3.1.1 3.1.2 3.1.3 3.2 3.2.1 3.2.2 3.2.3 All 28 releases
button-generation / admin / settings / sidebar.php

sidebar.php in Button Generator – Easily Create Custom Buttons with Icons and Analytics 3.0, at admin/settings/sidebar.php

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