Tour page (boards 2 and 3):
- Replace the blurred 'Welcome to {city}' hero with a breadcrumb and a photo
gallery (1 large + 2, 'All N photos' opens the lightbox); the H1 title,
rating with review count and facts follow; booking card stays sticky
- Phones/tablets: swipeable photos, name before price, 2x2 facts, and a
fixed bottom bar with price + Check availability (vc-tour.css)
Board 1:
- Hide Viator internal tags ('Agent Low Quality Product'...) from the tour
category, listing filter and activities section (VC_Tags, tested)
- Listings: run the query filter late and set posts_per_archive_page so
pages show 12 tours as the count says
- Footer columns without a menu show default links (quick links, structure
cities, contact/about/faq) instead of empty headings
Plugin 1.9.5, theme 1.0.13.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
76 lines
1.9 KiB
PHP
76 lines
1.9 KiB
PHP
<?php
|
|
defined( 'ABSPATH' ) || exit;
|
|
|
|
final class VC_Plugin {
|
|
private static $instance = null;
|
|
|
|
public static function instance() {
|
|
if ( null === self::$instance ) {
|
|
self::$instance = new self();
|
|
}
|
|
return self::$instance;
|
|
}
|
|
|
|
private function __construct() {}
|
|
|
|
public function init() {
|
|
$this->load_files();
|
|
|
|
VC_CPT::init();
|
|
VC_Taxonomies::init();
|
|
VC_Settings::init();
|
|
VC_Structure_Admin::init();
|
|
VC_Routing::init();
|
|
VC_Menu::init();
|
|
VC_Cron::init();
|
|
VC_Display::init();
|
|
VC_Sections::init();
|
|
}
|
|
|
|
private function load_files() {
|
|
$files = array(
|
|
'includes/helpers.php',
|
|
'includes/class-vc-logger.php',
|
|
'includes/class-vc-cpt.php',
|
|
'includes/class-vc-taxonomies.php',
|
|
'includes/class-vc-structure.php',
|
|
'includes/class-vc-tags.php',
|
|
'includes/class-vc-api.php',
|
|
'includes/class-vc-importer.php',
|
|
'includes/class-vc-cron.php',
|
|
'includes/class-vc-settings.php',
|
|
'includes/class-vc-structure-admin.php',
|
|
'includes/class-vc-routing.php',
|
|
'includes/class-vc-menu.php',
|
|
'includes/class-vc-display.php',
|
|
'includes/class-vc-sections.php',
|
|
);
|
|
|
|
foreach ( $files as $file ) {
|
|
require_once VC_PLUGIN_DIR . $file;
|
|
}
|
|
}
|
|
|
|
public static function activate() {
|
|
require_once VC_PLUGIN_DIR . 'includes/helpers.php';
|
|
require_once VC_PLUGIN_DIR . 'includes/class-vc-cpt.php';
|
|
require_once VC_PLUGIN_DIR . 'includes/class-vc-taxonomies.php';
|
|
require_once VC_PLUGIN_DIR . 'includes/class-vc-cron.php';
|
|
|
|
VC_CPT::register();
|
|
VC_Taxonomies::register();
|
|
VC_Cron::maybe_schedule();
|
|
flush_rewrite_rules();
|
|
// Structure routes are added on init, which has not run for this
|
|
// request; flush again on the next one so they are included.
|
|
update_option( 'vc_flush_rewrite', 1 );
|
|
}
|
|
|
|
public static function deactivate() {
|
|
require_once VC_PLUGIN_DIR . 'includes/class-vc-cron.php';
|
|
VC_Cron::unschedule();
|
|
delete_transient( 'vc_sync_lock' );
|
|
flush_rewrite_rules();
|
|
}
|
|
}
|