fix(rail-ads): revertir a anuncio 160px fijo centrado en container responsive
This commit is contained in:
@@ -362,9 +362,7 @@ final class AdsensePlacementRenderer
|
||||
|
||||
/**
|
||||
* EXCEPCION DOCUMENTADA: CSS inline requerido por Google AdSense
|
||||
* Usamos display:block con data-full-width-responsive="true" para que
|
||||
* el anuncio se adapte automaticamente al ancho del contenedor responsive.
|
||||
* La altura se controla via el selector de formato.
|
||||
* El anuncio usa tamaño fijo (160xHeight) centrado en el container responsive.
|
||||
* Ref: https://support.google.com/adsense/answer/9274516
|
||||
*/
|
||||
|
||||
@@ -372,9 +370,8 @@ final class AdsensePlacementRenderer
|
||||
if ($leftEnabled) {
|
||||
$html .= sprintf(
|
||||
'<div class="roi-rail-ad roi-rail-ad-left">
|
||||
<ins class="adsbygoogle" style="display:block;height:%dpx"
|
||||
data-ad-client="%s" data-ad-slot="%s"
|
||||
data-full-width-responsive="true"></ins>
|
||||
<ins class="adsbygoogle" style="display:inline-block;width:160px;height:%dpx"
|
||||
data-ad-client="%s" data-ad-slot="%s"></ins>
|
||||
<script type="%s"%s>(adsbygoogle = window.adsbygoogle || []).push({});</script>
|
||||
</div>',
|
||||
$height, esc_attr($publisherId), esc_attr($slotId), $scriptType, $dataAttr
|
||||
@@ -385,9 +382,8 @@ final class AdsensePlacementRenderer
|
||||
if ($rightEnabled) {
|
||||
$html .= sprintf(
|
||||
'<div class="roi-rail-ad roi-rail-ad-right">
|
||||
<ins class="adsbygoogle" style="display:block;height:%dpx"
|
||||
data-ad-client="%s" data-ad-slot="%s"
|
||||
data-full-width-responsive="true"></ins>
|
||||
<ins class="adsbygoogle" style="display:inline-block;width:160px;height:%dpx"
|
||||
data-ad-client="%s" data-ad-slot="%s"></ins>
|
||||
<script type="%s"%s>(adsbygoogle = window.adsbygoogle || []).push({});</script>
|
||||
</div>',
|
||||
$height, esc_attr($publisherId), esc_attr($slotId), $scriptType, $dataAttr
|
||||
|
||||
Reference in New Issue
Block a user