diff --git a/functions.php b/functions.php
index 2452eba..dc48bd8 100644
--- a/functions.php
+++ b/functions.php
@@ -14,8 +14,10 @@ use Timber\Timber;
require_once __DIR__ . '/src/SMTP.php'; //config email
require_once __DIR__ . '/vendor/autoload.php'; // Load Composer dependencies.
+require_once __DIR__ . '/src/Comments.php'; // ocultar posibilidad de comentarios
Timber::init();
+Comments::init();
$site = new StarterSite();
@@ -66,48 +68,3 @@ foreach(['/es/documentos/page/:paged','/eu/dokumentuak/page/:paged'] as $route)
Routes::load('archive-documentos.php', $params, $query, 200);
});
}
-
-
-// *************************DEBUGUEANDO...................
-
-// add_shortcode('test_smtp_db', function() {
-// global $wpdb;
-
-// $output = '
Verificación directa en BD:
';
-
-// // Buscar en la tabla wp_options todas las entradas que contengan 'smtp'
-// $results = $wpdb->get_results("
-// SELECT option_name, option_value
-// FROM {$wpdb->options}
-// WHERE option_name LIKE '%smtp%'
-// ORDER BY option_name
-// ");
-
-// if ($results) {
-// $output .= '';
-// foreach ($results as $row) {
-// $value = strlen($row->option_value) > 100 ? substr($row->option_value, 0, 100) . '...' : $row->option_value;
-// $output .= '- ' . $row->option_name . ': ' . esc_html($value) . '
';
-// }
-// $output .= '
';
-// } else {
-// $output .= '❌ No se encontró ninguna opción con "smtp" en la base de datos
';
-// }
-
-// // Probar diferentes variaciones
-// $output .= 'Pruebas de get_option:
';
-// $variations = [
-// 'smtp_host',
-// 'options_smtp_host',
-// '_smtp_host',
-// 'configuracion-smtp-correo_smtp_host'
-// ];
-
-// foreach ($variations as $key) {
-// $value = get_option($key);
-// $output .= '- ' . $key . ': ' . ($value ? esc_html($value) : '❌ VACÍO') . '
';
-// }
-// $output .= '
';
-
-// return $output;
-// });
\ No newline at end of file
diff --git a/src/Comments.php b/src/Comments.php
new file mode 100644
index 0000000..0d19ae2
--- /dev/null
+++ b/src/Comments.php
@@ -0,0 +1,94 @@
+remove_menu( 'comments' );
+ error_log('✅ admin_bar_render');
+
+ }
+
+
+}
+
+
diff --git a/src/StarterSite.php b/src/StarterSite.php
index 5c695da..17e1c7d 100644
--- a/src/StarterSite.php
+++ b/src/StarterSite.php
@@ -35,7 +35,8 @@ class StarterSite extends Site {
add_filter('timber/context', [$this, 'add_global_context']); // variables globales
add_filter('timber/twig', [$this, 'add_videos_embed_to_twig']); //videos embed
add_action('pre_get_posts', array($this, 'exclude_pages_from_search')); //exclude pages with ACF
-
+
+
// función que reconoce los campos ACF en los diferentes idiomas.
add_action('init', function() {
if (function_exists('pll_current_language')) {