Files
hoponhopofftickets/viator-collector/viator-collector.php
amir 67c88c795b fix: Astra style conflicts, full-width, responsive hero images, header search
Plugin (viator-collector 1.8.1):
- is_vc_page() now matches any Viator shortcode, so shortcode Pages (home)
  get the full-width no-sidebar canvas
- load vc-design.css after Astra + inline overrides: strip Astra page-builder
  article padding (removes extra gap above hero), full-bleed containers,
  enforce design font inside .vc-app
- vc_hero_img_html(): render hero from the WP media library with responsive
  srcset when the image is an attachment; used in listing + [viator_hero]
  ([viator_hero image_id=".."])

Theme (astra child):
- remove the user/profile header item
- working header search (expands, submits to the tours archive ?vc_q=)
- load chrome.css after Astra + enforce design font inside .hoho
- rebuild installable ZIP

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01J4hNL1PSHxXbu94SCenpKj
2026-09-15 17:32:07 +03:30

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.1
* Author: Amir Bagheri
* License: GPL-2.0-or-later
* Text Domain: viator-collector
*/
define('VC_VERSION', '1.8.1');
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();
}
);