fix(vignette): Tamaños 16:9 para video + sin botón cerrar

- Agregados tamaños video: 1280x720, 960x540, 854x480, 800x450, 640x360, 560x315
- Eliminado botón de cerrar (usuario cierra haciendo clic fuera)
- Default cambiado a 960x540 (qHD)

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
FrankZamora
2025-11-28 21:29:41 -06:00
parent 13beaf7b06
commit 8aba07fdbf
2 changed files with 16 additions and 20 deletions

View File

@@ -644,14 +644,15 @@ final class AdsensePlacementFormBuilder
(string)$size,
[
'auto' => 'Auto (recomendado)',
'responsive' => 'Responsive (fluid)',
'1280x720' => '1280x720 (HD 720p)',
'960x540' => '960x540 (qHD)',
'854x480' => '854x480 (480p)',
'800x450' => '800x450 (16:9)',
'640x360' => '640x360 (360p)',
'560x315' => '560x315 (YouTube)',
'300x250' => '300x250 (Rectangle)',
'336x280' => '336x280 (Large Rectangle)',
'728x90' => '728x90 (Leaderboard)',
'970x250' => '970x250 (Billboard)',
'970x90' => '970x90 (Large Leaderboard)',
'468x60' => '468x60 (Banner)',
'320x100' => '320x100 (Large Mobile)',
'responsive' => 'Responsive (fluid)',
]
);
$html .= ' </div>';

View File

@@ -902,21 +902,15 @@ final class AdsensePlacementRenderer
$adFormat = '';
}
$closeDelayClass = $closeDelay > 0 ? ' delayed' : '';
// Sin boton de cerrar - el usuario cierra haciendo clic fuera del modal
$html .= sprintf(
'<div id="roi-vignette-overlay" class="roi-vignette-overlay">
<div class="roi-vignette-modal">
<button class="roi-vignette-close%s" data-action="close-vignette" title="Cerrar" data-delay="%d">
<i class="bi bi-x"></i>
</button>
<ins class="adsbygoogle" style="%s"
data-ad-client="%s" data-ad-slot="%s"%s></ins>
<script type="%s"%s>(adsbygoogle = window.adsbygoogle || []).push({});</script>
</div>
</div>',
$closeDelayClass,
$closeDelay,
$adStyle,
esc_attr($publisherId),
esc_attr($slotId),
@@ -947,15 +941,16 @@ final class AdsensePlacementRenderer
private function parseVignetteSize(string $size): array
{
return match($size) {
'300x250' => [300, 250],
'1280x720' => [1280, 720],
'960x540' => [960, 540],
'854x480' => [854, 480],
'800x450' => [800, 450],
'640x360' => [640, 360],
'560x315' => [560, 315],
'336x280' => [336, 280],
'728x90' => [728, 90],
'970x250' => [970, 250],
'970x90' => [970, 90],
'468x60' => [468, 60],
'320x100' => [320, 100],
'300x250' => [300, 250],
'auto', 'responsive' => [0, 0], // Tamaños dinamicos
default => [300, 250],
default => [960, 540], // Default a tamaño video qHD
};
}
}