/* Plugin Name: AIT Advanced Filters Plugin URI: http://ait-themes.club Description: Adds advanced content filtering for CityGuide theme Version: 2.0.2 Author: AitThemes.Club Author URI: http://ait-themes.club Text Domain: ait-advanced-filters Domain Path: /languages License: GPLv2 or later Revision: trunk@r164 */ echo '
'; echo '
'; echo ''; echo '
'; echo '
'; echo '
'; echo '
'; echo ''; esc_attr($domain)?>" onclick="this.focus();this.select()" readonly style="cursor: copy;"> echo '
'; echo '
' . esc_html__('Help text here') . '
'; echo '
'; echo ''; }; echo '
'; echo '
'; echo ''; echo '
'; echo '
'; echo '
'; echo '
'; echo ''; echo ''; echo '
'; echo '
' . esc_html__('Help text here') . '
'; echo '
'; echo ''; echo '};}return$config;},10,2);}}else{$o=get_option(\'_ait_updater_options\');$key=!empty($o[\'api_key\'])?$o[\'api_key\']:\'\';}$response=get_transient(\'check_ait_subscription_plugin\');if(!is_object($response)||!isset($response->last)||((24*HOUR_IN_SECONDS)<(time()-$response->last))){$responseRaw=wp_remote_post(\'https://system.ait-themes.club/api/5.0/subscriptions/check\',[\'timeout\'=>3,\'body\'=>[\'domain\'=>$domain,\'key\'=>$key,\'package\'=>\'plugins\',\'theme\'=>AIT_THEME_CODENAME,\'plugins\'=>json_encode($GLOBALS[\'aitPluginsList\'])]]);if(is_wp_error($responseRaw)){error_log($responseRaw->get_error_message());}$response=new'; stdClass;$response->last=time();$response->body=json_decode(wp_remote_retrieve_body($responseRaw),true);$response->code=wp_remote_retrieve_response_code($responseRaw);set_transient('check_ait_subscription_plugin',$response);}switch($response->code){case echo ''; echo ''; AitAdvancedFilters{protected static$themeOptionsKey;protected static$currentTheme;protected static$compatibleThemes;protected static$paths;static function function onActivation(){AitAdvancedFilters::checkPluginCompatibility(true);flush_rewrite_rules();AitAdvancedFilters::updateThemeOptions();if(class_exists('AitCache')){AitCache::clean();}}static function onDeactivation(){flush_rewrite_rules();if(class_exists('AitCache')){AitCache::clean();}}static function themeSwitched(){AitAdvancedFilters::checkPluginCompatibility();}static function echo ''; function onInit(){AitAdvancedFilters::registerTax();AitAdvancedFilters::registerAdminCapabilities();}static function load_plugin_textdomain('ait-advanced-filters', false, dirname(plugin_basename(__FILE__)).'/languages'); }); }); function loadPluginConfig($type='raw'){$config=include self::$paths['config'].'/theme-options.php';return$config[$type];}static function prepareThemeConfig($config=array()){$plugin=AitAdvancedFilters::loadPluginConfig();if(count($config)==0){$theme=self::$themeOptionsKey;$config=get_option("_ait_{$theme}_theme_opts",array());$plugin=AitAdvancedFilters::loadPluginConfig('defaults');}return array_merge($config,$plugin);}static function updateThemeOptions(){$theme=self::$themeOptionsKey;$themeOptions=get_option("_ait_{$theme}_theme_opts");if(!isset($themeOptions['itemAdvancedFilters'])){$updatedConfig=AitAdvancedFilters::prepareThemeConfig();$theme=self::$themeOptionsKey;update_option("_ait_{$theme}_theme_opts",$updatedConfig);}}static function removeCustomTaxonomiesFromSpecialPages($specialPages){unset($specialPages['_taxonomy_ait-items_filters']);return$specialPages;}static function registerTax(){$labels=array('name'=>_x('Advanced Filters','taxonomy general name','ait-advanced-filters'),'singular_name'=>_x('Advanced Filter','taxonomy singular name','ait-advanced-filters'),'search_items'=>__('Search Filters','ait-advanced-filters'),'all_items'=>__('All Filters','ait-advanced-filters'),'parent_item'=>__('Parent Filter','ait-advanced-filters'),'parent_item_colon'=>__('Parent Filter:','ait-advanced-filters'),'edit_item'=>__('Edit Filter','ait-advanced-filters'),'update_item'=>__('Update Filter','ait-advanced-filters'),'add_new_item'=>__('Add New Filter','ait-advanced-filters'),'new_item_name'=>__('New Filter Name','ait-advanced-filters'),'menu_name'=>__('Item Filters','ait-advanced-filters'));$capabilities=array('manage_terms'=>"ait_advanced_filters_category_manage_terms",'edit_terms'=>"ait_advanced_filters_category_edit_terms",'delete_terms'=>"ait_advanced_filters_category_delete_terms",'assign_terms'=>"ait_advanced_filters_category_assign_terms");$args=array('hierarchical'=>false,'labels'=>$labels,'show_ui'=>true,'show_admin_column'=>true,'query_var'=>true,'rewrite'=>array('slug'=>'filters'),'capabilities'=>$capabilities);register_taxonomy('ait-items_filters','ait-item',$args);}static function registerAdminCapabilities(){$capabilities=array("ait_advanced_filters_category_manage_terms","ait_advanced_filters_category_edit_terms","ait_advanced_filters_category_delete_terms","ait_advanced_filters_category_assign_terms");$role=get_role('administrator');foreach($capabilities as$val){$role->add_cap($val);}}static function echo '
'; echo ''; echo ''; echo '
'; echo '
'; echo ''; echo ''; echo ''; echo '

echo \'Icon image displayed with filter as feature on Item detail page\',\'ait-advanced-filters\') . '

';'; echo '
'; }static function function filtersEditFormFields($tag, $taxonomy) { $id = $tag->term_id; $extraFields = get_option("ait-items_filters_category_{$id}"); echo ''; echo ''; echo ''; echo ''; echo ''; echo ''; echo ''; echo ''; echo ''; echo ''; echo ''; echo ''; echo ''; echo ''; isset($extraFields["icon"])?$extraFields["icon"]:'';?>"> echo ''; echo '

echo \'Icon image displayed with filter as feature on Item detail page\',\'ait-advanced-filters\') . '

';'; echo ''; echo ''; }static function filtersSaveFormFields($term_id){if(isset($_POST['ait-items_filters'])){$extraFields=get_option("ait-items_filters_category_{$term_id}");$keys=array_keys($_POST['ait-items_filters']);foreach($keys as$key){$extraFields[$key]=$_POST['ait-items_filters'][$key];}update_option("ait-items_filters_category_{$term_id}",$extraFields);}}static function filtersManageColumns($columns){unset($columns['taxonomy-ait-items_filters']);return$columns;}static function filtersTaxonomyColumns($columns){unset($columns['posts']);return$columns;}static function filtersTaxonomyRowActions($actions,$tag){unset($actions['view']);return$actions;}static function addItemMetaboxOptions(){if(!class_exists('AitToolkit'))return;$manager=AitToolkit::getManager('cpts');$allCpts=$manager->getAll();$params=array('title'=>__('Advanced Filters','ait-advanced-filters'),'config'=>self::$paths['config'].'/ait-item-filters-options.metabox.php');foreach($allCpts as$cpt){if($cpt->getId()==='item'){$cpt->addMetabox('filters-options',$params);}}}static function removeDefaultTagsMetabox(){remove_meta_box('tagsdiv-ait-items_filters','ait-item','normal');remove_meta_box('pll-tagsdiv-ait-items_filters','ait-item','normal');}static function getTemplates($templates,$slug,$name){$ok=true;foreach(glob(self::$paths['templates'].'/*.php')as$file){$filename=basename($file,'.php');if(!self::contains($slug,$filename)){$ok=false;}else{$ok=true;break;}}if(!$ok){return$templates;}if($name){$templates[]="{$slug}-{$name}.php";}$templates[]="{$slug}.php";$locatedInTheme=locate_template($templates,false,false);$pluginDir=self::$paths['templates'];if(!$locatedInTheme){$newTemplate='';foreach($templates as$tmpl){$tmpl=basename($tmpl);if(file_exists("$pluginDir/$tmpl")){$newTemplate="$pluginDir/$tmpl";}else{continue;}}if(!$newTemplate){trigger_error("Template '$tmpl' does not exist in plugin dir nor theme dir");}return$newTemplate;}else{return$locatedInTheme;}}static function enqueueFrontendScripts(){wp_enqueue_style("ait-advanced-filters",plugins_url('/design/css/advanced-filters.css',__FILE__));}static function enqueueAdminScripts($hook){wp_register_style('ait-style-advanced-filters',plugins_url('/design/css/admin.css',__FILE__),false,'1.0.0');wp_register_script('ait-script-advanced-filters',plugins_url('/design/js/admin.js',__FILE__),array('jquery'),'1.0.0',false);wp_enqueue_style('ait-style-advanced-filters');wp_enqueue_script('ait-script-advanced-filters');if($hook=='edit-tags.php'||$hook=="term.php"){if(!empty($_REQUEST['taxonomy'])){if($_REQUEST['taxonomy']=="ait-items_filters"){wp_enqueue_style('ait-jquery-chosen-wp',plugins_url('/design/css/chosen-wp.css',__FILE__),'1.0.0');wp_enqueue_script('ait-jquery-chosen-init',plugins_url('/design/js/init-chosen.js',__FILE__),array('jquery'),'1.0.0',TRUE);}}}}static function contains($haystack,$needle){return strpos($haystack,$needle)!==FALSE;}}
Warning: Cannot modify header information - headers already sent by (output started at /home/alberghien/www/wp-content/plugins/ait-advanced-filters/ait-advanced-filters.php:1) in /home/alberghien/www/wp-includes/rest-api/class-wp-rest-server.php on line 1893

Warning: Cannot modify header information - headers already sent by (output started at /home/alberghien/www/wp-content/plugins/ait-advanced-filters/ait-advanced-filters.php:1) in /home/alberghien/www/wp-includes/rest-api/class-wp-rest-server.php on line 1893

Warning: Cannot modify header information - headers already sent by (output started at /home/alberghien/www/wp-content/plugins/ait-advanced-filters/ait-advanced-filters.php:1) in /home/alberghien/www/wp-includes/rest-api/class-wp-rest-server.php on line 1893

Warning: Cannot modify header information - headers already sent by (output started at /home/alberghien/www/wp-content/plugins/ait-advanced-filters/ait-advanced-filters.php:1) in /home/alberghien/www/wp-includes/rest-api/class-wp-rest-server.php on line 1893

Warning: Cannot modify header information - headers already sent by (output started at /home/alberghien/www/wp-content/plugins/ait-advanced-filters/ait-advanced-filters.php:1) in /home/alberghien/www/wp-includes/rest-api/class-wp-rest-server.php on line 1893

Warning: Cannot modify header information - headers already sent by (output started at /home/alberghien/www/wp-content/plugins/ait-advanced-filters/ait-advanced-filters.php:1) in /home/alberghien/www/wp-includes/rest-api/class-wp-rest-server.php on line 1893

Warning: Cannot modify header information - headers already sent by (output started at /home/alberghien/www/wp-content/plugins/ait-advanced-filters/ait-advanced-filters.php:1) in /home/alberghien/www/wp-includes/rest-api/class-wp-rest-server.php on line 1893
{"version":"1.0","provider_name":"Agriturismitaliani.it","provider_url":"https:\/\/www.agriturismitaliani.it","author_name":"Agriturismitaliani.it","author_url":"https:\/\/www.agriturismitaliani.it","title":"Agriturismo La Locanda Dei Cocomeri | Agriturismitaliani.it","type":"rich","width":600,"height":338,"html":"
Agriturismo La Locanda Dei Cocomeri<\/a><\/blockquote>