| 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 |
|