PluginProbe
Button Generator – Easily Create Custom Buttons with Icons and Analytics / 3.2
Button Generator – Easily Create Custom Buttons with Icons and Analytics v3.2
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 / 5.rules.php

5.rules.php in Button Generator – Easily Create Custom Buttons with Icons and Analytics 3.2, at admin/settings/5.rules.php

127 lines 4.0 KB
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
1 <?php
2 /*
3 * Page Name: Targeting & Rules
4 */
5
6 use ButtonGenerator\Admin\CreateFields;
7 use ButtonGenerator\Settings_Helper;
8
9 defined( 'ABSPATH' ) || exit;
10
11 $page_opt = include( 'options/rules.php' );
12 $field = new CreateFields( $options, $page_opt );
13
14 ?>
15
16 <div class="wpie-fieldset">
17 <div class="wpie-legend"><?php
18 esc_html_e( 'Button Type', 'button-generation' ); ?></div>
19 <div class="wpie-fields">
20 <?php
21 $field->create( 'type' ); ?><?php
22 $field->create( 'standard' ); ?><?php
23 $field->create( 'location' ); ?><?php
24 $field->create( 'location_top' ); ?><?php
25 $field->create( 'location_bottom' ); ?><?php
26 $field->create( 'location_left' ); ?><?php
27 $field->create( 'location_right' ); ?>
28 </div>
29 </div>
30
31 <?php
32 $item_order = ! empty( $options['item_order']['rules'] ) ? 1 : 0;
33 $open = ! empty( $item_order ) ? ' open' : '';
34 ?>
35 <details class="has-mt wpie-item"<?php
36 echo esc_attr( $open ); ?>>
37 <input type="hidden" name="item_order[rules]" class="wpie-item__toggle" value="<?php
38 echo absint( $item_order ); ?>">
39 <summary class="wpie-item_heading">
40 <span class="wpie-item_heading_icon"><span class="wpie-icon wpie_icon-roadmap"></span></span>
41 <span class="wpie-item_heading_label"><?php
42 esc_html_e( 'Display Rules', 'button-generation' ); ?></span>
43 <span class="wpie-item_heading_type"></span>
44 <span class="wpie-item_heading_toogle">
45 <span class="wpie-icon wpie_icon-chevron-down"></span>
46 <span class="wpie-icon wpie_icon-chevron-up "></span>
47 </span>
48 </summary>
49 <div class="wpie-item_content">
50 <div class="wpie-fieldset wpie-rules">
51 <div class="wpie-fields">
52 <?php
53 $field->create( 'show', 0 ); ?><?php
54 $field->create( 'operator', 0 ); ?><?php
55 $field->create( 'ids', 0 ); ?><?php
56 $field->create( 'page_type', 0 ); ?>
57 </div>
58
59 </div>
60 </div>
61 </details>
62
63 <?php
64 $item_order = ! empty( $options['item_order']['responsive'] ) ? 1 : 0;
65 $open = ! empty( $item_order ) ? ' open' : '';
66 ?>
67
68 <details class="has-mt wpie-item"<?php
69 echo esc_attr( $open ); ?>>
70 <input type="hidden" name="item_order[responsive]" class="wpie-item__toggle" value="<?php
71 echo absint( $item_order ); ?>">
72 <summary class="wpie-item_heading">
73 <span class="wpie-item_heading_icon"><span class="wpie-icon wpie_icon-laptop-mobile"></span></span>
74 <span class="wpie-item_heading_label"><?php
75 esc_html_e( 'Responsive Visibility', 'button-generation' ); ?></span>
76 <span class="wpie-item_heading_type"></span>
77 <span class="wpie-item_heading_toogle">
78 <span class="wpie-icon wpie_icon-chevron-down"></span>
79 <span class="wpie-icon wpie_icon-chevron-up "></span>
80 </span>
81 </summary>
82 <div class="wpie-item_content">
83 <div class="wpie-fieldset">
84 <div class="wpie-fields">
85 <?php
86 $field->create( 'mobile' ); ?><?php
87 $field->create( 'desktop' ); ?>
88 </div>
89 </div>
90
91 </div>
92 </details>
93
94 <?php
95 $item_order = ! empty( $options['item_order']['other'] ) ? 1 : 0;
96 $open = ! empty( $item_order ) ? ' open' : '';
97 ?>
98 <details class="has-mt wpie-item"<?php
99 echo esc_attr( $open ); ?>>
100 <input type="hidden" name="item_order[other]" class="wpie-item__toggle" value="<?php
101 echo absint( $item_order ); ?>">
102 <summary class="wpie-item_heading">
103 <span class="wpie-item_heading_icon"><span class="wpie-icon wpie_icon-gear"></span></span>
104 <span class="wpie-item_heading_label"><?php
105 esc_html_e( 'Other', 'button-generation' ); ?></span>
106 <span class="wpie-item_heading_type"></span>
107 <span class="wpie-item_heading_toogle">
108 <span class="wpie-icon wpie_icon-chevron-down"></span>
109 <span class="wpie-icon wpie_icon-chevron-up "></span>
110 </span>
111 </summary>
112 <div class="wpie-item_content">
113
114 <div class="wpie-fieldset">
115 <div class="wpie-fields">
116 <?php
117 $field->create( 'fontawesome' ); ?>
118 </div>
119 </div>
120 </div>
121 </details>
122
123
124
125
126
127