The archive attached an always-on _vc_featured NOT EXISTS join and a _vc_review_count join (plus SQL_CALC_FOUND_ROWS) to every request, which made /tours/ crawl/time out over a ~70k-tour catalogue. Default sort now orders by post date with no postmeta joins; price/rating sorts add a single meta_key join on demand; meta_query is only attached when a filter is active. Bump 1.8.4. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01J4hNL1PSHxXbu94SCenpKj
30 lines
847 B
PHP
30 lines
847 B
PHP
<?php
|
|
defined('ABSPATH') || exit;
|
|
|
|
/**
|
|
* Plugin Name: Viator Collector
|
|
* Description: Import Viator tours using the Viator Partner API and display them with native WordPress post types, templates, and shortcodes.
|
|
* Version: 1.8.4
|
|
* Author: Amir Bagheri
|
|
* License: GPL-2.0-or-later
|
|
* Text Domain: viator-collector
|
|
*/
|
|
|
|
define('VC_VERSION', '1.8.4');
|
|
define('VC_PLUGIN_FILE', __FILE__);
|
|
define('VC_PLUGIN_DIR', plugin_dir_path(__FILE__));
|
|
define('VC_PLUGIN_URL', plugin_dir_url(__FILE__));
|
|
define('VC_PLUGIN_BASENAME', plugin_basename(__FILE__));
|
|
|
|
require_once VC_PLUGIN_DIR . 'includes/class-vc-plugin.php';
|
|
|
|
register_activation_hook(__FILE__, array('VC_Plugin', 'activate'));
|
|
register_deactivation_hook(__FILE__, array('VC_Plugin', 'deactivate'));
|
|
|
|
add_action(
|
|
'plugins_loaded',
|
|
static function () {
|
|
VC_Plugin::instance()->init();
|
|
}
|
|
);
|