bar-preview.php
1 week ago
bar-settings.php
1 week ago
customize-bar.php
1 week ago
display-rules.php
1 week ago
email-signup.php
7 months ago
help.php
1 month ago
poptin-plugin.php
7 months ago
poptin-popup.php
7 months ago
sticky-header-settings.php
1 week ago
stickymenu-dashboard.php
1 week ago
display-rules.php
270 lines
| 1 | <?php |
| 2 | /** |
| 3 | * MSB Display rules |
| 4 | * |
| 5 | * @author : Premio <contact@premio.io> |
| 6 | * @license : GPL2 |
| 7 | * */ |
| 8 | |
| 9 | if (defined('ABSPATH') === false) { |
| 10 | exit; |
| 11 | } |
| 12 | $is_pro_active = 0; |
| 13 | ?> |
| 14 | |
| 15 | <div id="mystickybar-tab-display-rules" class="mystickybar-tab-content"> |
| 16 | <h2 class="section-title"><strong><?php esc_html_e('Step 2', 'mystickymenu'); ?>:</strong> <?php esc_html_e('Display rules', 'mystickymenu'); ?></h2> |
| 17 | <div class="mystickybar-content-section"> |
| 18 | <div class="mysticky-welcomebar-setting-wrap"> |
| 19 | <div class="mysticky-welcomebar-subheader-title"> |
| 20 | <h4><?php esc_html_e('Triggers', 'mystickymenu'); ?></h4> |
| 21 | </div> |
| 22 | <div class="mysticky-welcomebar-setting-block"> |
| 23 | <div class="mysticky-welcomebar-setting-content"> |
| 24 | <label><?php esc_html_e('Entry effect', 'mystickymenu'); ?></label> |
| 25 | <div class="mysticky-welcomebar-setting-content-right"> |
| 26 | <?php $welcomebar['mysticky_welcomebar_entry_effect'] = (isset($welcomebar['mysticky_welcomebar_entry_effect']) && $welcomebar['mysticky_welcomebar_entry_effect']!= '') ? esc_attr($welcomebar['mysticky_welcomebar_entry_effect']) : 'slide-in'; ?> |
| 27 | <select id="myStickymenu-entry-effect" name="mysticky_option_welcomebar[mysticky_welcomebar_entry_effect]" > |
| 28 | <option value="none" <?php selected( @$welcomebar['mysticky_welcomebar_entry_effect'], 'none' ); ?>><?php esc_html_e( 'No effect', 'mystickymenu' );?></option> |
| 29 | <option value="slide-in" <?php selected( @$welcomebar['mysticky_welcomebar_entry_effect'], 'slide-in' ); ?>><?php esc_html_e( 'Slide in', 'mystickymenu' );?></option> |
| 30 | <option value="fade" <?php selected( @$welcomebar['mysticky_welcomebar_entry_effect'], 'fade' ); ?>><?php esc_html_e( 'Fade', 'mystickymenu' );?></option> |
| 31 | </select> |
| 32 | </div> |
| 33 | </div> |
| 34 | <div class="mysticky-welcomebar-setting-content"> |
| 35 | <label><?php esc_html_e('Devices', 'mystickymenu'); ?></label> |
| 36 | <div class="mysticky-welcomebar-setting-content-right"> |
| 37 | <div class="flex-1"> |
| 38 | <label> |
| 39 | <input name="mysticky_option_welcomebar[mysticky_welcomebar_device_desktop]" value= "desktop" type="checkbox" checked disabled /> |
| 40 | <?php esc_html_e( 'Desktop', 'mystickymenu' );?> |
| 41 | </label> |
| 42 | <label> |
| 43 | <input name="mysticky_option_welcomebar[mysticky_welcomebar_device_mobile]" value= "mobile" type="checkbox" checked disabled /> |
| 44 | <?php esc_html_e( 'Mobile', 'mystickymenu' );?> |
| 45 | </label> |
| 46 | </div> |
| 47 | <span class="myStickymenu-upgrade"><a class="sticky-header-upgrade-now" href="<?php echo esc_url($upgarde_url); ?>" target="_blank"><?php esc_html_e( 'Upgrade Now', 'mystickymenu' );?></a></span> |
| 48 | </div> |
| 49 | </div> |
| 50 | |
| 51 | <div class="mysticky-welcomebar-setting-content align-top"> |
| 52 | <label><?php esc_html_e('Trigger', 'mystickymenu'); ?> |
| 53 | <span class="mysticky-custom-fields-tooltip"><a href="#" class="mysticky-tooltip mysticky-new-custom-btn"><i class="dashicons dashicons-editor-help"></i></a><p style="z-index: 99999;"><?php esc_html_e('Choose when you\'d like the bar to appear on your site', 'mystickymenu'); ?></p></span> |
| 54 | </label> |
| 55 | <div class="mysticky-welcomebar-setting-content-right trigger-wrap gap-x-px flex-inline"> |
| 56 | <div class="mysticky-welcomebar-setting-action flex-1"> |
| 57 | <select class="mysticky-welcomebar-trigger"> |
| 58 | <option value="after_a_few_seconds" <?php selected( @$welcomebar['mysticky_welcomebar_trigger'], 'after_a_few_seconds' ); ?>><?php esc_html_e( 'After a few seconds', 'mystickymenu' );?></option> |
| 59 | <option value="after_scroll" <?php selected( @$welcomebar['mysticky_welcomebar_trigger'], 'after_scroll' ); ?>><?php esc_html_e( 'After Scroll', 'mystickymenu' );?></option> |
| 60 | </select> |
| 61 | </div> |
| 62 | <div class="mysticky-welcomebar-setting-action mysticky-welcomebar-triggersec"> |
| 63 | <div class="px-wrap"> |
| 64 | <input type="number" class="" min="0" step="1" id="mysticky_welcomebar_triggersec" name="mysticky_option_welcomebar[mysticky_welcomebar_triggersec]" value="0" disabled /> |
| 65 | <span class="input-px"><?php echo ( isset($welcomebar['mysticky_welcomebar_trigger']) && $welcomebar['mysticky_welcomebar_trigger'] == 'after_scroll' ) ? '%' : 'Sec'; ?></span> |
| 66 | </div> |
| 67 | </div> |
| 68 | <span class="myStickymenu-upgrade"><a class="sticky-header-upgrade-now" href="<?php echo esc_url($upgarde_url); ?>" target="_blank"><?php esc_html_e( 'Upgrade Now', 'mystickymenu' );?></a></span> |
| 69 | </div> |
| 70 | </div> |
| 71 | </div> |
| 72 | |
| 73 | <div class="mysticky-welcomebar-subheader-title"> |
| 74 | <h4><?php esc_html_e('Targeting', 'mystickymenu'); ?></h4> |
| 75 | </div> |
| 76 | <div class="mysticky-welcomebar-setting-block"> |
| 77 | <div class="mysticky-welcomebar-setting-content align-top"> |
| 78 | <label><?php _e('Date Scheduling', 'mystickymenu'); ?> |
| 79 | <span class="mysticky-custom-fields-tooltip"><a href="#" class="mysticky-tooltip mysticky-new-custom-btn"><i class="dashicons dashicons-editor-help"></i></a><p style="z-index: 99999;"><?php esc_html_e('Set the date and time for when you want the widget to start showing and the time you would like it to stop showing. You can add up to 12 combinations of "on and off" triggers. This feature may be useful when you have an upcoming limited-time offer.',"mystickymenu");?></p></span> |
| 80 | </label> |
| 81 | <div class="mysticky-welcomebar-setting-content-right"> |
| 82 | <span style="width: 100%;display: block;"> |
| 83 | <a href="#" class="create-rule" id="add-date-schedule-option"><?php esc_html_e( "Add Rule", "mystickymenu" );?></a> |
| 84 | </span> |
| 85 | </div> |
| 86 | </div> |
| 87 | <div class="mysticky-welcomebar-date-schedule-options flex flex-col gap-3 w-full pb-4 relative group" id="mysticky-welcomebar-date-schedule-options" style="display:none;"> |
| 88 | <div class="welcomebar-date-schedule-time-zone"> |
| 89 | <label for="date_schedule_timezone" class="text-sm! mt-0!"><?php esc_html_e( 'Timezone', 'mystickymenu');?></label> |
| 90 | <select class="gmt-data welcomebar-gmt-timezone gmt-timezone" id="date_schedule_timezone"> |
| 91 | <option value=""><?php esc_html_e( 'Select a city or country', 'mystickymenu');?></option> |
| 92 | </select> |
| 93 | </div> |
| 94 | |
| 95 | <div class="welcomebar-date-schedule-boxes welcomebar-date-schedules flex flex-col gap-3"> |
| 96 | <?php $k = 0; ?> |
| 97 | <div class="welcomebar-date-schedule-box setting-content-relative bg-white rounded-lg p-4 border-1 border-[#DCE2E2] flex flex-col items-center sm:flex-row gap-4"> |
| 98 | <div class="date-time-box flex flex-col w-full sm:w-auto sm:items-center sm:flex-row gap-4"> |
| 99 | <div class="date-select-option"> |
| 100 | <label> |
| 101 | <?php esc_html_e( 'Start date ', 'mystickymenu');?> |
| 102 | <span class="mysticky-custom-fields-tooltip"> |
| 103 | <a href="#" class="mysticky-tooltip mysticky-new-custom-btn" aria-label="<?php esc_html_e('Need help', 'mystickymenu'); ?>"> |
| 104 | <i class="dashicons dashicons-editor-help"></i> |
| 105 | </a> |
| 106 | <p style="z-index: 99999;"><?php esc_html_e('Schedule a date from which the widget will be displayed (the starting date is included)',"mystickymenu");?></p></span> |
| 107 | </label> |
| 108 | <input autocomplete="off" type="text" name="mysticky_option_welcomebar[date_schedule][0][start_date]" class="welcomebar-datepicker welcomebar-start-datepicker" id="date_schedule_0_start_date" data-end-date-id="date_schedule_0_end_date"> |
| 109 | </div> |
| 110 | <div class="time-select-option"> |
| 111 | <label><?php esc_html_e( 'Start time ', 'mystickymenu');?></label> |
| 112 | <input autocomplete="off" type="text" name="mysticky_option_welcomebar[date_schedule][0][start_time]" class="welcomebar-timepicker" id="date_schedule_0_start_time"> |
| 113 | </div> |
| 114 | </div> |
| 115 | <div class="date-time-box flex flex-col w-full sm:w-auto sm:items-center sm:flex-row gap-4"> |
| 116 | <div class="date-select-option"> |
| 117 | <label> |
| 118 | <?php esc_html_e( 'End date ', 'mystickymenu');?> |
| 119 | <span class="mysticky-custom-fields-tooltip"><a href="#" class="mysticky-tooltip mysticky-new-custom-btn" aria-label="<?php esc_html_e('Need help', 'mystickymenu'); ?>"><i class="dashicons dashicons-editor-help"></i></a><p style="z-index: 99999;"><?php esc_html_e('Schedule a date from which the widget will stop being displayed (the end date is included)',"mystickymenu");?></p></span> |
| 120 | </label> |
| 121 | <input autocomplete="off" type="text" name="mysticky_option_welcomebar[date_schedule][0][end_date]" class="welcomebar-datepicker welcomebar-end-datepicker" id="date_schedule_0_end_date" data-start-date-id="date_schedule_0_start_date"> |
| 122 | </div> |
| 123 | <div class="time-select-option"> |
| 124 | <label><?php esc_html_e( 'End time ', 'mystickymenu');?></label> |
| 125 | <input autocomplete="off" type="text" name="mysticky_option_welcomebar[date_schedule][0][end_time]" class="welcomebar-timepicker" id="date_schedule_0_end_time"> |
| 126 | </div> |
| 127 | <div class="mysticky-welcomebar-url-buttons"> |
| 128 | <a class="mysticky-welcomebar-remove-date-schedule mt-0 sm:mt-5" href="#">x</a> |
| 129 | </div> |
| 130 | </div> |
| 131 | </div> |
| 132 | </div> |
| 133 | |
| 134 | <div class="hidden! group-hover:flex! w-full h-full absolute left-0 top-0 items-center backdrop-blur-[1px] justify-center"> |
| 135 | <a class="sticky-header-activate-key upgrade-to-pro" href="<?php echo esc_url($upgarde_url); ?>" target="_blank"><?php _e( 'Upgrade Now', 'mystickymenu' );?></a> |
| 136 | </div> |
| 137 | |
| 138 | <div class="welcomebar-date-schedule-box-html" style="display: none"> |
| 139 | <div class="welcomebar-date-schedule-box setting-content-relative bg-white rounded-lg p-4 border-1 border-[#DCE2E2] flex flex-col items-center sm:flex-row gap-4"> |
| 140 | <div class="date-time-box flex flex-col w-full sm:w-auto sm:items-center sm:flex-row gap-4"> |
| 141 | <div class="date-select-option"> |
| 142 | <label> |
| 143 | <?php esc_html_e( 'Start date ', 'mystickymenu');?> |
| 144 | <span class="mysticky-custom-fields-tooltip"><a href="#" class="mysticky-tooltip mysticky-new-custom-btn" aria-label="<?php esc_html_e('Need help', 'mystickymenu'); ?>"><i class="dashicons dashicons-editor-help"></i></a><p style="z-index: 99999;"><?php esc_html_e('Schedule a date from which the widget will be displayed (the starting date is included)',"mystickymenu");?></p></span> |
| 145 | </label> |
| 146 | <input autocomplete="off" type="text" name="mysticky_option_welcomebar[date_schedule][__count__][start_date]" value="" class="welcomebar-datepicker welcomebar-start-datepicker" id="date_schedule___count___start_date" data-end-date-id="date_schedule___count___end_date" <?php echo !$is_pro_active?"disabled":"" ?>> |
| 147 | </div> |
| 148 | <div class="time-select-option"> |
| 149 | <label><?php esc_html_e( 'Start time ', 'mystickymenu');?></label> |
| 150 | <input autocomplete="off" type="text" name="mysticky_option_welcomebar[date_schedule][__count__][start_time]" value="" class="welcomebar-timepicker" id="date_schedule___count___start_time" <?php echo !$is_pro_active?"disabled":"" ?>> |
| 151 | </div> |
| 152 | </div> |
| 153 | <div class="date-time-box flex flex-col w-full sm:w-auto sm:items-center sm:flex-row gap-4"> |
| 154 | <div class="date-select-option"> |
| 155 | <label> |
| 156 | <?php esc_html_e( 'End date ', 'mystickymenu');?> |
| 157 | <span class="mysticky-custom-fields-tooltip"><a href="#" class="mysticky-tooltip mysticky-new-custom-btn" aria-label="<?php esc_html_e('Need help', 'mystickymenu'); ?>"><i class="dashicons dashicons-editor-help"></i></a><p style="z-index: 99999;"><?php esc_html_e('Schedule a date from which the widget will stop being displayed (the end date is included)',"mystickymenu");?></p></span> |
| 158 | </label> |
| 159 | <input autocomplete="off" type="text" name="mysticky_option_welcomebar[date_schedule][__count__][end_date]" value="" class="welcomebar-datepicker welcomebar-end-datepicker" id="date_schedule___count___end_date" data-start-date-id="date_schedule___count___start_date" <?php echo !$is_pro_active?"disabled":"" ?>> |
| 160 | </div> |
| 161 | <div class="time-select-option"> |
| 162 | <label><?php esc_html_e( 'End time ', 'mystickymenu');?></label> |
| 163 | <input autocomplete="off" type="text" name="mysticky_option_welcomebar[date_schedule][__count__][end_time]" value="" class="welcomebar-timepicker" id="date_schedule___count___end_time" <?php echo !$is_pro_active?"disabled":"" ?>> |
| 164 | </div> |
| 165 | <div class="mysticky-welcomebar-url-buttons"> |
| 166 | <a class="mysticky-welcomebar-remove-date-schedule mt-0 sm:mt-5" href="#">x</a> |
| 167 | </div> |
| 168 | </div> |
| 169 | <span class="myStickymenu-upgrade"> |
| 170 | <a class="sticky-header-activate-key" href="<?php echo esc_url($upgarde_url); ?>" target="_blank"><?php _e( 'Upgrade Now', 'mystickymenu' );?></a> |
| 171 | </span> |
| 172 | </div> |
| 173 | </div> |
| 174 | </div> |
| 175 | <div class="mysticky-welcomebar-setting-content show-on-apper"> |
| 176 | <label><?php esc_html_e('Page targeting', 'mystickymenu'); ?> |
| 177 | <span class="mysticky-custom-fields-tooltip"><a href="#" class="mysticky-tooltip mysticky-new-custom-btn"><i class="dashicons dashicons-editor-help"></i></a><p style="z-index: 99999;"> |
| 178 | <?php esc_html_e(" Add page targeting to ensure the bar only appears or doesn't appear for the selected pages only","mystickymenu");?></p></span> |
| 179 | </label> |
| 180 | <div class="mysticky-welcomebar-setting-content-right"> |
| 181 | <a href="#" class="create-rule" id="create-rule"><?php esc_html_e( "Add Rule", "mystickymenu" );?></a> |
| 182 | </div> |
| 183 | <div class="mysticky-welcomebar-page-options-html" style="display: none"> |
| 184 | <div class="mysticky-welcomebar-page-option w-full flex rounded-lg p-4 border-1 mb-4! border-[#DCE2E2] bg-white"> |
| 185 | <div class="url-content w-full flex flex-col sm:flex-row gap-3"> |
| 186 | <div class="flex flex-col w-full sm:w-auto sm:flex-1 sm:items-center sm:flex-row gap-3"> |
| 187 | <div class="w-full sm:w-auto sm:flex-1 mysticky-welcomebar-url-select"> |
| 188 | <select id="url_shown_on___count___option" <?php echo !$is_pro_active?"disabled":"" ?>> |
| 189 | <option value="show_on"><?php esc_html_e("Show on", "mystickymenu" );?></option> |
| 190 | <option value="not_show_on"><?php esc_html_e("Don't show on", "mystickymenu" );?></option> |
| 191 | </select> |
| 192 | </div> |
| 193 | <div class="w-full sm:w-auto sm:flex-1 mysticky-welcomebar-url-option"> |
| 194 | <select class="mysticky-welcomebar-url-options" id="url_rules___count___option" <?php echo !$is_pro_active?"disabled":"" ?>> |
| 195 | <option selected="selected" disabled value=""><?php esc_html_e("Select Rule", "mystickymenu" );?></option> |
| 196 | </select> |
| 197 | </div> |
| 198 | </div> |
| 199 | <div class="mysticky-welcomebar-url-boxes flex w-full sm:w-auto sm:flex-1 flex-col items-center sm:flex-row gap-1"> |
| 200 | <div class="mysticky-welcomebar-url-box url-box w-full sm:w-auto sm:flex-1"> |
| 201 | <span class='mysticky-welcomebar-url url-title active'><?php echo esc_url(site_url( '/')); ?></span> |
| 202 | </div> |
| 203 | <div class="mysticky-welcomebar-url-values url-values w-full sm:w-auto sm:flex-1"> |
| 204 | <div class="url-setting-option url-default active"> |
| 205 | <input type="text" value="" class="url-inputs" name="mysticky_option_welcomebar[page_settings][__count__][value]" id="url_rules___count___value" disabled /> |
| 206 | </div> |
| 207 | </div> |
| 208 | </div> |
| 209 | <div class="mysticky-welcomebar-url-buttons"> |
| 210 | <a class="mysticky-welcomebar-remove-rule" href="#">x</a> |
| 211 | </div> |
| 212 | </div> |
| 213 | <div class="myStickymenu-upgrade"> |
| 214 | <a class="sticky-header-activate-key" href="<?php echo esc_url($upgarde_url); ?>" target="_blank"><?php esc_html_e( 'Upgrade Now', 'mystickymenu' );?></a> |
| 215 | </div> |
| 216 | </div> |
| 217 | </div> |
| 218 | </div> |
| 219 | <div class="mysticky-welcomebar-page-options mysticky-welcomebar-setting-content-right mx-w-100" id="mysticky-welcomebar-page-options" style="display:none"></div> |
| 220 | <div class="mysticky-welcomebar-setting-content show-on-apper"> |
| 221 | <label><?php _e('User targeting', 'mystickymenu'); ?> |
| 222 | <span class="mysticky-custom-fields-tooltip"><a href="#" class="mysticky-tooltip mysticky-new-custom-btn"><i class="dashicons dashicons-editor-help"></i></a><p style="z-index: 99999;"><?php esc_html_e("Add a rule if you want to show the welcome bar for logged in or logged out users of your WordPress website selectively","mystickymenu");?></p></span> |
| 223 | </label> |
| 224 | <div class="mysticky-welcomebar-setting-content-right"> |
| 225 | <div class=" mystickymenu-country-inputs"> |
| 226 | <select> |
| 227 | <option value="" ><?php esc_html_e( 'Show for all users', 'mystickymenu' );?></option> |
| 228 | <option value="logged-in" <?php selected($welcomebar['user_target'], 'logged-in')?>><?php esc_html_e( 'Show just for logged-in users', 'mystickymenu' );?></option> |
| 229 | <option value="logged-out" <?php selected($welcomebar['user_target'], 'logged-out')?>><?php esc_html_e( 'Show just for logged-out users', 'mystickymenu' );?></option> |
| 230 | </select> |
| 231 | <span class="upgrade-mystickymenu myStickymenu-upgrade"> |
| 232 | <a href="<?php echo esc_url($upgarde_url); ?>" target="_blank"> |
| 233 | <i class="fas fa-lock"></i><?php _e('UPGRADE NOW', 'mystickymenu'); ?> |
| 234 | </a> |
| 235 | </span> |
| 236 | </div> |
| 237 | |
| 238 | </div> |
| 239 | </div> |
| 240 | <div class="mysticky-welcomebar-setting-content"> |
| 241 | <label><?php esc_html_e('Country targeting', 'mystickymenu'); ?> |
| 242 | <span class="mysticky-custom-fields-tooltip"><a href="#" class="mysticky-tooltip mysticky-new-custom-btn"><i class="dashicons dashicons-editor-help"></i></a><p style="z-index: 99999;"> |
| 243 | <?php esc_html_e("Add country targeting to ensure the bar only appears for the selected countries only","mystickymenu");?></p></span> |
| 244 | </label> |
| 245 | <div class="mysticky-welcomebar-setting-content-right"> |
| 246 | <div class=" mystickymenu-country-inputs"> |
| 247 | |
| 248 | <button type="button" class="mystickymenu-country-button"><?php esc_html_e("All countries", 'mystickymenu'); ?></button> |
| 249 | <div class="mystickymenu-country-list-box"> |
| 250 | |
| 251 | <select name="general-settings[countries_list][]" placeholder="Select Country" class="myStickyelements-country-list"> |
| 252 | <option value=""><?php esc_html_e("All countries", 'mystickymenu'); ?></option> |
| 253 | </select> |
| 254 | </div> |
| 255 | <span class="upgrade-mystickymenu myStickymenu-upgrade"> |
| 256 | <a href="<?php echo esc_url($upgarde_url); ?>" target="_blank"> |
| 257 | <i class="fas fa-lock"></i><?php esc_html_e('UPGRADE NOW', 'mystickymenu'); ?> |
| 258 | </a> |
| 259 | </span> |
| 260 | </div> |
| 261 | </div> |
| 262 | </div> |
| 263 | |
| 264 | </div> |
| 265 | |
| 266 | </div><!-- mysticky-welcomebar-setting-wrap --> |
| 267 | |
| 268 | </div><!-- mystickybar-content-section --> |
| 269 | |
| 270 | </div> |