Debug: Add minimal logging to verify filter execution
This commit is contained in:
@@ -32,10 +32,15 @@ final class YoutubeFacadeContentFilter
|
|||||||
*/
|
*/
|
||||||
public function filter(string $content): string
|
public function filter(string $content): string
|
||||||
{
|
{
|
||||||
|
// Temporary debug
|
||||||
|
file_put_contents('/tmp/yt-debug.log', date('H:i:s') . " filter called\n", FILE_APPEND);
|
||||||
|
|
||||||
// Check if content has YouTube embeds at all (quick check)
|
// Check if content has YouTube embeds at all (quick check)
|
||||||
if (strpos($content, 'youtube.com/embed/') === false && strpos($content, 'youtube-nocookie.com/embed/') === false) {
|
if (strpos($content, 'youtube.com/embed/') === false && strpos($content, 'youtube-nocookie.com/embed/') === false) {
|
||||||
|
file_put_contents('/tmp/yt-debug.log', date('H:i:s') . " no youtube found\n", FILE_APPEND);
|
||||||
return $content;
|
return $content;
|
||||||
}
|
}
|
||||||
|
file_put_contents('/tmp/yt-debug.log', date('H:i:s') . " youtube FOUND\n", FILE_APPEND);
|
||||||
|
|
||||||
// Pattern to match YouTube iframes
|
// Pattern to match YouTube iframes
|
||||||
// Handles: youtube.com/embed/ and youtube-nocookie.com/embed/
|
// Handles: youtube.com/embed/ and youtube-nocookie.com/embed/
|
||||||
|
|||||||
301
Schemas/adsense-placement.json
Normal file
301
Schemas/adsense-placement.json
Normal file
@@ -0,0 +1,301 @@
|
|||||||
|
{
|
||||||
|
"component_name": "adsense-placement",
|
||||||
|
"version": "1.0.0",
|
||||||
|
"description": "Control manual de ubicacion de anuncios AdSense",
|
||||||
|
"groups": {
|
||||||
|
"visibility": {
|
||||||
|
"label": "Visibilidad",
|
||||||
|
"priority": 10,
|
||||||
|
"fields": {
|
||||||
|
"is_enabled": {
|
||||||
|
"type": "boolean",
|
||||||
|
"label": "Activar Placement Manual",
|
||||||
|
"default": false,
|
||||||
|
"editable": true,
|
||||||
|
"required": true,
|
||||||
|
"description": "Activa el control manual de ubicacion de anuncios"
|
||||||
|
},
|
||||||
|
"disable_auto_ads": {
|
||||||
|
"type": "boolean",
|
||||||
|
"label": "Deshabilitar Auto Ads",
|
||||||
|
"default": true,
|
||||||
|
"editable": true,
|
||||||
|
"description": "Desactiva Auto Ads de Google cuando el placement manual esta activo"
|
||||||
|
},
|
||||||
|
"show_on_desktop": {
|
||||||
|
"type": "boolean",
|
||||||
|
"label": "Mostrar en escritorio",
|
||||||
|
"default": true,
|
||||||
|
"editable": true,
|
||||||
|
"description": "Muestra anuncios en pantallas desktop (>=992px)"
|
||||||
|
},
|
||||||
|
"show_on_mobile": {
|
||||||
|
"type": "boolean",
|
||||||
|
"label": "Mostrar en movil",
|
||||||
|
"default": true,
|
||||||
|
"editable": true,
|
||||||
|
"description": "Muestra anuncios en pantallas moviles (<992px)"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"content": {
|
||||||
|
"label": "Credenciales AdSense",
|
||||||
|
"priority": 20,
|
||||||
|
"fields": {
|
||||||
|
"publisher_id": {
|
||||||
|
"type": "text",
|
||||||
|
"label": "Publisher ID",
|
||||||
|
"default": "ca-pub-8476420265998726",
|
||||||
|
"editable": true,
|
||||||
|
"description": "Tu ID de publicador de Google AdSense"
|
||||||
|
},
|
||||||
|
"slot_display": {
|
||||||
|
"type": "text",
|
||||||
|
"label": "Slot Display (fijo)",
|
||||||
|
"default": "2873062302",
|
||||||
|
"editable": true,
|
||||||
|
"description": "Para anuncios de tamano fijo (728x90, 970x250)"
|
||||||
|
},
|
||||||
|
"slot_auto": {
|
||||||
|
"type": "text",
|
||||||
|
"label": "Slot Auto (responsive)",
|
||||||
|
"default": "8471732096",
|
||||||
|
"editable": true,
|
||||||
|
"description": "Para anuncios responsive"
|
||||||
|
},
|
||||||
|
"slot_autorelaxed": {
|
||||||
|
"type": "text",
|
||||||
|
"label": "Slot Autorelaxed (feed)",
|
||||||
|
"default": "9205569855",
|
||||||
|
"editable": true,
|
||||||
|
"description": "Para feeds y listados"
|
||||||
|
},
|
||||||
|
"slot_inarticle": {
|
||||||
|
"type": "text",
|
||||||
|
"label": "Slot In-Article (fluid)",
|
||||||
|
"default": "7285187368",
|
||||||
|
"editable": true,
|
||||||
|
"description": "Para insertar dentro del contenido"
|
||||||
|
},
|
||||||
|
"slot_skyscraper": {
|
||||||
|
"type": "text",
|
||||||
|
"label": "Slot Skyscraper (160x600 / 300x600)",
|
||||||
|
"default": "",
|
||||||
|
"editable": true,
|
||||||
|
"description": "Para Rail Ads en margenes laterales"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"behavior": {
|
||||||
|
"label": "Ubicaciones en Posts",
|
||||||
|
"priority": 70,
|
||||||
|
"fields": {
|
||||||
|
"post_top_enabled": {
|
||||||
|
"type": "boolean",
|
||||||
|
"label": "Despues de Featured Image",
|
||||||
|
"default": true,
|
||||||
|
"editable": true
|
||||||
|
},
|
||||||
|
"post_top_format": {
|
||||||
|
"type": "select",
|
||||||
|
"label": "Formato Post Top",
|
||||||
|
"default": "auto",
|
||||||
|
"editable": true,
|
||||||
|
"options": ["auto", "in-article", "display", "display-large"]
|
||||||
|
},
|
||||||
|
"post_content_enabled": {
|
||||||
|
"type": "boolean",
|
||||||
|
"label": "Insertar dentro del contenido",
|
||||||
|
"default": false,
|
||||||
|
"editable": true,
|
||||||
|
"description": "Inserta anuncios automaticamente entre parrafos"
|
||||||
|
},
|
||||||
|
"post_content_after_paragraphs": {
|
||||||
|
"type": "text",
|
||||||
|
"label": "Despues del parrafo #",
|
||||||
|
"default": "3",
|
||||||
|
"editable": true,
|
||||||
|
"description": "Numero de parrafo despues del cual insertar"
|
||||||
|
},
|
||||||
|
"post_content_max_ads": {
|
||||||
|
"type": "text",
|
||||||
|
"label": "Maximo ads en contenido",
|
||||||
|
"default": "2",
|
||||||
|
"editable": true
|
||||||
|
},
|
||||||
|
"post_content_format": {
|
||||||
|
"type": "select",
|
||||||
|
"label": "Formato Contenido",
|
||||||
|
"default": "in-article",
|
||||||
|
"editable": true,
|
||||||
|
"options": ["in-article", "auto"]
|
||||||
|
},
|
||||||
|
"post_bottom_enabled": {
|
||||||
|
"type": "boolean",
|
||||||
|
"label": "Despues del contenido",
|
||||||
|
"default": true,
|
||||||
|
"editable": true
|
||||||
|
},
|
||||||
|
"post_bottom_format": {
|
||||||
|
"type": "select",
|
||||||
|
"label": "Formato Post Bottom",
|
||||||
|
"default": "auto",
|
||||||
|
"editable": true,
|
||||||
|
"options": ["auto", "in-article", "display"]
|
||||||
|
},
|
||||||
|
"after_related_enabled": {
|
||||||
|
"type": "boolean",
|
||||||
|
"label": "Despues de Related Posts",
|
||||||
|
"default": false,
|
||||||
|
"editable": true
|
||||||
|
},
|
||||||
|
"after_related_format": {
|
||||||
|
"type": "select",
|
||||||
|
"label": "Formato After Related",
|
||||||
|
"default": "autorelaxed",
|
||||||
|
"editable": true,
|
||||||
|
"options": ["autorelaxed", "auto"]
|
||||||
|
},
|
||||||
|
"rail_ads_enabled": {
|
||||||
|
"type": "boolean",
|
||||||
|
"label": "Rail Ads (margenes laterales)",
|
||||||
|
"default": false,
|
||||||
|
"editable": true,
|
||||||
|
"description": "Anuncios fijos en los espacios laterales del viewport (solo pantallas >=1600px)"
|
||||||
|
},
|
||||||
|
"rail_left_enabled": {
|
||||||
|
"type": "boolean",
|
||||||
|
"label": "Rail izquierdo",
|
||||||
|
"default": true,
|
||||||
|
"editable": true
|
||||||
|
},
|
||||||
|
"rail_right_enabled": {
|
||||||
|
"type": "boolean",
|
||||||
|
"label": "Rail derecho",
|
||||||
|
"default": true,
|
||||||
|
"editable": true
|
||||||
|
},
|
||||||
|
"rail_format": {
|
||||||
|
"type": "select",
|
||||||
|
"label": "Formato Rail Ads",
|
||||||
|
"default": "skyscraper",
|
||||||
|
"editable": true,
|
||||||
|
"options": ["skyscraper", "half-page"],
|
||||||
|
"description": "skyscraper=160x600, half-page=300x600"
|
||||||
|
},
|
||||||
|
"rail_top_offset": {
|
||||||
|
"type": "text",
|
||||||
|
"label": "Distancia desde arriba (px)",
|
||||||
|
"default": "150",
|
||||||
|
"editable": true,
|
||||||
|
"description": "Espacio desde el top del viewport"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"layout": {
|
||||||
|
"label": "Ubicaciones Archivos/Globales",
|
||||||
|
"priority": 80,
|
||||||
|
"fields": {
|
||||||
|
"archive_top_enabled": {
|
||||||
|
"type": "boolean",
|
||||||
|
"label": "Arriba del listado (archives)",
|
||||||
|
"default": false,
|
||||||
|
"editable": true
|
||||||
|
},
|
||||||
|
"archive_between_enabled": {
|
||||||
|
"type": "boolean",
|
||||||
|
"label": "Entre posts del listado",
|
||||||
|
"default": false,
|
||||||
|
"editable": true
|
||||||
|
},
|
||||||
|
"archive_between_every": {
|
||||||
|
"type": "text",
|
||||||
|
"label": "Mostrar cada X posts",
|
||||||
|
"default": "4",
|
||||||
|
"editable": true,
|
||||||
|
"description": "Ej: 4 = un anuncio cada 4 posts"
|
||||||
|
},
|
||||||
|
"archive_bottom_enabled": {
|
||||||
|
"type": "boolean",
|
||||||
|
"label": "Abajo del listado",
|
||||||
|
"default": false,
|
||||||
|
"editable": true
|
||||||
|
},
|
||||||
|
"archive_format": {
|
||||||
|
"type": "select",
|
||||||
|
"label": "Formato para archivos",
|
||||||
|
"default": "autorelaxed",
|
||||||
|
"editable": true,
|
||||||
|
"options": ["autorelaxed", "auto"]
|
||||||
|
},
|
||||||
|
"header_below_enabled": {
|
||||||
|
"type": "boolean",
|
||||||
|
"label": "Debajo del header (global)",
|
||||||
|
"default": false,
|
||||||
|
"editable": true
|
||||||
|
},
|
||||||
|
"footer_above_enabled": {
|
||||||
|
"type": "boolean",
|
||||||
|
"label": "Arriba del footer (global)",
|
||||||
|
"default": false,
|
||||||
|
"editable": true
|
||||||
|
},
|
||||||
|
"global_format": {
|
||||||
|
"type": "select",
|
||||||
|
"label": "Formato para globales",
|
||||||
|
"default": "auto",
|
||||||
|
"editable": true,
|
||||||
|
"options": ["auto", "display-large"]
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"forms": {
|
||||||
|
"label": "Exclusiones",
|
||||||
|
"priority": 90,
|
||||||
|
"fields": {
|
||||||
|
"exclude_categories": {
|
||||||
|
"type": "textarea",
|
||||||
|
"label": "Excluir categorias (IDs)",
|
||||||
|
"default": "",
|
||||||
|
"editable": true,
|
||||||
|
"description": "IDs de categorias separados por coma (ej: 5,12,23)"
|
||||||
|
},
|
||||||
|
"exclude_post_types": {
|
||||||
|
"type": "textarea",
|
||||||
|
"label": "Excluir tipos de post",
|
||||||
|
"default": "",
|
||||||
|
"editable": true,
|
||||||
|
"description": "Tipos de post separados por coma (ej: page,attachment)"
|
||||||
|
},
|
||||||
|
"exclude_post_ids": {
|
||||||
|
"type": "textarea",
|
||||||
|
"label": "Excluir posts especificos (IDs)",
|
||||||
|
"default": "",
|
||||||
|
"editable": true,
|
||||||
|
"description": "IDs de posts/paginas separados por coma"
|
||||||
|
},
|
||||||
|
"min_content_length": {
|
||||||
|
"type": "text",
|
||||||
|
"label": "Longitud minima de contenido",
|
||||||
|
"default": "500",
|
||||||
|
"editable": true,
|
||||||
|
"description": "No insertar ads si el contenido tiene menos caracteres"
|
||||||
|
},
|
||||||
|
"delay_enabled": {
|
||||||
|
"type": "boolean",
|
||||||
|
"label": "Retrasar carga de anuncios",
|
||||||
|
"default": true,
|
||||||
|
"editable": true,
|
||||||
|
"description": "Mejora rendimiento: carga ads despues de interaccion"
|
||||||
|
},
|
||||||
|
"delay_timeout": {
|
||||||
|
"type": "text",
|
||||||
|
"label": "Timeout de delay (ms)",
|
||||||
|
"default": "5000",
|
||||||
|
"editable": true,
|
||||||
|
"description": "Tiempo maximo de espera en milisegundos"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
Reference in New Issue
Block a user