feat: page banners use the page's Featured Image when set
- Theme design pages (About, Contact, FAQ, blog list) use the page's Featured Image (Posts page for the blog) and fall back to the design photo; no teal tint over a custom image - Plugin hero (homepage [viator_hero], [viator_listing] pages) prefers the hosting page's Featured Image over the Settings hero image - Theme 1.0.12, plugin 1.9.4 Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
@@ -141,13 +141,21 @@ function vc_hero_image_url() {
|
||||
/**
|
||||
* Hero image *source* for the current view: an attachment ID when available
|
||||
* (so it can be rendered responsively), otherwise a URL. Resolution order:
|
||||
* 1. On a term archive, that term's own image.
|
||||
* 2. The "Hero image" chosen in Settings (attachment ID preferred).
|
||||
* 3. Nothing.
|
||||
* 1. On a page (e.g. the homepage hosting [viator_hero]), its Featured Image.
|
||||
* 2. On a term archive, that term's own image.
|
||||
* 3. The "Hero image" chosen in Settings (attachment ID preferred).
|
||||
* 4. Nothing.
|
||||
*
|
||||
* @return int|string Attachment ID, image URL, or '' .
|
||||
*/
|
||||
function vc_hero_image_source() {
|
||||
if ( is_singular() && ! is_singular( 'viator_tour' ) ) {
|
||||
$thumb = (int) get_post_thumbnail_id( get_queried_object_id() );
|
||||
if ( $thumb ) {
|
||||
return apply_filters( 'vc_hero_image_source', $thumb );
|
||||
}
|
||||
}
|
||||
|
||||
if ( is_tax( array( 'viator_destination', 'viator_tag', 'viator_category' ) ) ) {
|
||||
$term = get_queried_object();
|
||||
if ( $term && ! is_wp_error( $term ) ) {
|
||||
|
||||
@@ -4,13 +4,13 @@ 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.9.3
|
||||
* Version: 1.9.4
|
||||
* Author: Amir Bagheri
|
||||
* License: GPL-2.0-or-later
|
||||
* Text Domain: viator-collector
|
||||
*/
|
||||
|
||||
define('VC_VERSION', '1.9.3');
|
||||
define('VC_VERSION', '1.9.4');
|
||||
define('VC_PLUGIN_FILE', __FILE__);
|
||||
define('VC_PLUGIN_DIR', plugin_dir_path(__FILE__));
|
||||
define('VC_PLUGIN_URL', plugin_dir_url(__FILE__));
|
||||
|
||||
Reference in New Issue
Block a user