PluginProbe
Filter Everything — WordPress & WooCommerce Filters / trunk
Filter Everything — WordPress & WooCommerce Filters vtrunk
1.9.6 1.9.5 1.9.4 1.9.3 1.9.2.2 1.9.2.1 trunk 1.2.1 1.2.3 1.2.4 1.2.5 1.3.0 1.3.1 1.3.2 1.4.1 1.4.4 1.4.5 1.4.8 1.4.9 1.5.0 1.5.1 1.6.0 1.6.1 1.6.2 1.6.3 All 51 releases
filter-everything / views / admin / auto-create-filter.php

auto-create-filter.php in Filter Everything — WordPress & WooCommerce Filters trunk, at views/admin/auto-create-filter.php

56 lines 2.2 KB
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
1 <?php
2 if (!defined('ABSPATH')) {
3 exit;
4 }
5 $create_auto_url = wp_nonce_url(
6 admin_url('admin-post.php?action=wpc_create_auto_filter_set'),
7 $nonce_action,'_flrt_nonce'
8 );
9 $is_registered = true;
10 $disabled_class = "";
11 if(function_exists('flrt_get_license_status')){
12 $is_registered = flrt_get_license_status();
13 }
14 if(!$is_registered){
15 $create_auto_url = "";
16 $disabled_class = " disabled";
17 }
18 if ($has_filter_set) { ?>
19 <div id="wpc-create-auto-filter-div">
20 <a id="wpc-create-auto-filter-set" class="button wpc-create-auto-filter<?php echo $disabled_class; ?>" <?php echo ($is_registered) ? "href='" . esc_url($create_auto_url) . "'" : ''; ?>>
21 <?php echo esc_html__('Create Filters Automatically', 'filter-everything')?>
22 </a>
23 </div>
24 <?php }
25
26 if (!$has_filter_set) {
27 $create_manual_url = admin_url('post-new.php?post_type=' . FLRT_FILTERS_SET_POST_TYPE); ?>
28 <style type="text/css">.wp-list-table, .subsubsub {
29 display: none !important;
30 }
31 </style>
32 <div class="flrt-create-auto-filter-set">
33 <div class="wpc-auto-filter-buttons">
34 <a <?php echo ($is_registered) ? "href='" . esc_url($create_auto_url) . "'" : ''; ?> class="button button-primary wpc-create-auto-filter<?php echo esc_attr($disabled_class); ?>"><?php esc_html_e('Create Filters Automatically', 'filter-everything') ?>
35 </a>
36 <a href="<?php echo esc_url($create_manual_url) ?>" class="button"><?php esc_html_e('Create Filters Manually', 'filter-everything') ?></a>
37 </div>
38 <div class="description wpc-text-center">
39 <p><?php
40 printf(
41 esc_html__('%sCreate Filters Automatically%s — instantly generate filters from your site’s categories and fields. You can always edit them later.', 'filter-everything'),
42 '<strong>',
43 '</strong>'
44 );
45 ?></p>
46 <p><?php
47 printf(
48 esc_html__('%sCreate Filters Manually%s — full control — add filters exactly as you want.', 'filter-everything'),
49 '<strong>',
50 '</strong>'
51 );
52 ?></p>
53 </div>
54 </div>
55 <?php }
56