perf/fix: externalize images to WP media; normalize Astra leaks; full-width
Plugin (1.8.2): - remove all bundled raster images (~9.3MB) from assets/img; hero + single hero figure now come from the WP Media Library (Settings), shortcode args ([viator_hero image_id]), or the vc_testimonials filter — rendered responsive - vc_hero_image_source() prefers an attachment ID (srcset); listing/hero use it - settings: store hero_image_id + single_hero_figure_id (media pickers) - enqueue at priority 20 + depend on astra-theme-css so our CSS wins ties - stronger Astra overrides (!important): kill page-builder article top padding (gap above hero), force full-bleed containers, guard horizontal scroll - normalize theme leaks inside .vc-app: no link underline, no list bullets (with prose exceptions for the tour Overview); gradient hero fallback Theme: normalize .hoho link/list leaks; rebuild installable ZIP. Also: move optimized originals to /removed-images/; ship viator-collector.zip. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01J4hNL1PSHxXbu94SCenpKj
This commit is contained in:
@@ -75,10 +75,7 @@ $vc_page_url = function ( $n ) use ( $vc_action, $vc_base_args ) {
|
||||
return empty( $args ) ? $vc_action : add_query_arg( $args, $vc_action );
|
||||
};
|
||||
|
||||
$vc_hero_img = vc_hero_image_url();
|
||||
if ( ! $vc_hero_img ) {
|
||||
$vc_hero_img = vc_asset_url( 'img/hero2.png' );
|
||||
}
|
||||
$vc_hero_img = vc_hero_image_source();
|
||||
?>
|
||||
<section class="hero hero--archive">
|
||||
<div class="hero__media">
|
||||
|
||||
@@ -47,7 +47,12 @@ while ( have_posts() ) :
|
||||
<p class="hero-tour__kicker"><?php echo esc_html__( 'Welcome to', 'viator-collector' ); ?></p>
|
||||
<div class="hero-tour__stage">
|
||||
<h1 class="hero-tour__word"><?php echo esc_html( $big_word ); ?></h1>
|
||||
<img class="hero-tour__figure" src="<?php echo esc_url( vc_asset_url( 'img/tower.png' ) ); ?>" alt="" loading="eager">
|
||||
<?php
|
||||
$vc_figure_id = (int) vc_get_option( 'single_hero_figure_id', 0 );
|
||||
if ( $vc_figure_id ) {
|
||||
echo wp_get_attachment_image( $vc_figure_id, 'medium_large', false, array( 'class' => 'hero-tour__figure', 'loading' => 'eager', 'alt' => '' ) ); // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped
|
||||
}
|
||||
?>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
Reference in New Issue
Block a user