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 / src / Settings / DefaultSettings.php

DefaultSettings.php in Filter Everything — WordPress & WooCommerce Filters trunk, at src/Settings/DefaultSettings.php

68 lines 2.3 KB
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
1 <?php
2
3 namespace FilterEverything\Filter;
4
5 if ( ! defined('ABSPATH') ) {
6 exit;
7 }
8 class DefaultSettings
9 {
10 public function __construct()
11 {
12
13 }
14
15 public function wpc_filter_experimental()
16 {
17 return array(
18 'use_loader' => 'on',
19 'use_wait_cursor' => 'on',
20 'dark_overlay' => 'on',
21 'auto_scroll' => '',
22 'styled_inputs' => '',
23 'select2_dropdowns' => '',
24 );
25 }
26 public function wpc_filter_settings()
27 {
28 $default_show_terms_in_content = [];
29 $theme_dependencies = flrt_get_theme_dependencies();
30
31 if( flrt_is_woocommerce() ){
32 $default_show_terms_in_content = ['woocommerce_no_products_found', 'woocommerce_archive_description'];
33 }
34
35 if ( isset( $theme_dependencies['chips_hook'] ) && is_array( $theme_dependencies['chips_hook'] ) ) {
36 foreach ( $theme_dependencies['chips_hook'] as $compat_chips_hook ) {
37 $default_show_terms_in_content[] = $compat_chips_hook;
38 }
39 }
40
41 $defaultOptions = array(
42 'primary_color' => '#0570e2',
43 'container_height' => '550',
44 'show_open_close_button' => '',
45 'show_terms_in_content' => $default_show_terms_in_content,
46 'widget_debug_messages' => 'on'
47 );
48
49 // PRO default options
50 if( defined('FLRT_FILTERS_PRO') && FLRT_FILTERS_PRO ){
51 $defaultOptions['mobile_filter_settings'] = 'show_bottom_widget';
52 }
53
54 // Free default options (fresh installs only — activate() seeds this array
55 // once and never touches an existing wpc_filter_settings). Filter pages are
56 // noindex in free by design, so hiding the filter links from crawlers and
57 // keeping crawlers off the filter URLs via robots.txt costs nothing in
58 // search visibility and spares new sites the crawler-trap load out of the
59 // box. Existing installs keep their behaviour until the options are
60 // enabled — the 1.9.6 admin notice points them there.
61 if( ! defined('FLRT_FILTERS_PRO') ){
62 $defaultOptions['disable_filter_links_for_bots'] = 'on';
63 $defaultOptions['robots_txt_block_filters'] = 'on';
64 }
65
66 return $defaultOptions;
67 }
68 }