0
Résultats de validation

Seven SERP Theme

Seven SERP Theme

WordPress 6.4.3 theme
0
  • TYPE DE THèMEThème WordPress %s 6.4.3
  • NOM DU FICHIERsevenserp-theme.zip
  • TAILLE DU FICHIER1253006 octets
  • MD5976e01f506115a7a609e6f8f49a1e413
  • SHA15c6a8da945dc267566d5441badd62472961060ea
  • LICENCEAucun
  • FICHIERS INCLUSCSS, PHP, XML, Bitmap images, Adobe Illustrator
  • VERSION0.87
  • TAGSsevenserp
  • DATE DE CRéATION2021-10-30
  • DERNIèRE MISE à JOUR DU FICHIER2021-10-30
  • DERNIèRE VALIDATION2021-10-30 14:15
Ce thème n'est peut être pas libre. Themecheck ne distribue pas de thèmes commerciaux.
Alertes critiques
  1. Customizer : Sanitization des Customizer settings Un setting Customizer a été trouvé sans callback de sanitization dans le fichier customization.php. Tous les appels à la méthode add_setting() doivent déclarer une fonction de filtrage.Un setting Customizer a été trouvé sans callback de sanitization dans le fichier menu.php. Tous les appels à la méthode add_setting() doivent déclarer une fonction de filtrage.
  2. Title : Title Absence de référence à add_theme_support( "title-tag" ) dans le thème.Le thème doit avoir des tags <title>, idéalement dans le fichier header.php.Le thème doit comporter un appel à wp_title(), idéalement dans le fichier header.php.Les tags <title> ne peuvent contenir qu'un appe à wp_title(). wp_title filter soit être utilisée pour modifier la sortie.Les tags <title> ne peuvent contenir qu'un appe à wp_title(). wp_title filter soit être utilisée pour modifier la sortie.Les tags <title> ne peuvent contenir qu'un appe à wp_title(). wp_title filter soit être utilisée pour modifier la sortie.Les tags <title> ne peuvent contenir qu'un appe à wp_title(). wp_title filter soit être utilisée pour modifier la sortie.
  3. Failles de sécurité : Modification des paramètres du serveur PHP ini_set trouvé dans le fichier helpers.php. 39: </button>'; } } if(!function_exists('replace_first')){ function replace_first($find, $replace, $subject){ return implode($replace, explode($find, $subject, 2)); } } if(!function_exists('str_replace_n')){ function str_replace_n($search, $replace, $subject, $occurrence){ return preg_replace('/^((?:(?:.*?$search){'.--$occurrence.'}.*?))$search/i', '$1$replace', $subject); } } if(!function_exists('clear_wp_string')){ function clear_wp_string($text=''){ return trim(str_replace([ '<p></p>', '<center></center>', '</div><br />', '</div><br/>', '</div><br>', '&nbsp; ' ], [ NULL, NULL, '</div>', '</div>', '</div>', NULL ], $text)); } } if(!function_exists('parametros')){ function obtenerPagina(){ return substr(@$_SERVER['REQUEST_URI'], 1, strlen(@$_SERVER['REQUEST_URI'])); } function obtenerUrl(){ return (isset($_SERVER['HTTPS']) ? 'https' : 'http') . '://'.(@$_SERVER['HTTP_HOST']).(@$_SERVER['REQUEST_URI']); } function parametro($posicion, $parametro=''){ if(strlen($parametro) == 0 && strlen($posicion) > 0 && is_numeric($posicion)){ return obtener_parametro($posicion); } if(is_numeric($posicion) && strlen($parametro) > 0 && $posicion <= parametros()){ if(strcasecmp(obtener_parametro($posicion), $parametro) == 0){ return true; } } return false; } function obtener_ultimo_parametro(){ return obtener_parametro(parametros()); } function obtener_parametro($posicion=1, $pagina=NULL){ if($pagina==NULL){ $pagina = obtenerPagina(); } if($posicion <= 0){ $posicion = 1; } $array = explode('/', $pagina); $p = @$array[($posicion-1)]; if(strpos($p, '?') !== FALSE){ $p = trim(str_replace('?', NULL, substr($p, 0, strpos($p, '?')))); } return $p; } function hay_parametro($posicion){ if(strlen(obtener_parametro($posicion)) > 0){ return true; } return false; } function parametros($pagina=NULL){ if($pagina == NULL){ $pagina = obtenerPagina(); } $array = explode('/', $pagina); if(empty($array)){ return 0; } $total = 0; foreach($array as $a){ if(strlen(trim($a)) > 0){ $total++; } } return $total; } function todos_parametros($pagina=NULL){ if($pagina == NULL){ $pagina = obtenerPagina(); } if(parametros($pagina) >= 1){ $array_final = array(); foreach(range(1, parametros($pagina)) as $par){ if(strlen(obtener_parametro($par, $pagina)) > 0){ array_push($array_final, obtener_parametro($par, $pagina)); } } return $array_final; } return array(); } } class UnsafeCrypto { const METHOD = 'aes-256-ctr'; public static function encrypt($message, $key, $encode = false) { $nonceSize = openssl_cipher_iv_length(self::METHOD); $nonce = openssl_random_pseudo_bytes($nonceSize); $ciphertext = openssl_encrypt( $message, self::METHOD, $key, OPENSSL_RAW_DATA, $nonce ); if ($encode) { return base64_encode($nonce.$ciphertext); } return $nonce.$ciphertext; } public static function decrypt($message, $key, $encoded = false) { if ($encoded) { $message = base64_decode($message, true); if ($message === false) { throw new Exception('Encryption failure'); } } $nonceSize = openssl_cipher_iv_length(self::METHOD); $nonce = mb_substr($message, 0, $nonceSize, '8bit'); $ciphertext = mb_substr($message, $nonceSize, null, '8bit'); $plaintext = openssl_decrypt( $ciphertext, self::METHOD, $key, OPENSSL_RAW_DATA, $nonce ); return $plaintext; } } class SaferCrypto extends UnsafeCrypto { const HASH_ALGO = 'sha256'; public static function encrypt($message, $key, $encode = false) { list($encKey, $authKey) = self::splitKeys($key); $ciphertext = parent::encrypt($message, $encKey); $mac = hash_hmac(self::HASH_ALGO, $ciphertext, $authKey, true); if ($encode) { return base64_encode($mac.$ciphertext); } return $mac.$ciphertext; } public static function decrypt($message, $key, $encoded = false) { list($encKey, $authKey) = self::splitKeys($key); if ($encoded) { $message = base64_decode($message, true); if ($message === false) { throw new Exception('Encryption failure'); } } $hs = mb_strlen(hash(self::HASH_ALGO, '', true), '8bit'); $mac = mb_substr($message, 0, $hs, '8bit'); $ciphertext = mb_substr($message, $hs, null, '8bit'); $calculated = hash_hmac( self::HASH_ALGO, $ciphertext, $authKey, true ); if (!self::hashEquals($mac, $calculated)) { throw new Exception('Encryption failure'); } $plaintext = parent::decrypt($ciphertext, $encKey); return $plaintext; } protected static function splitKeys($masterKey) { return [ hash_hmac(self::HASH_ALGO, 'ENCRYPTION', $masterKey, true), hash_hmac(self::HASH_ALGO, 'AUTHENTICATION', $masterKey, true) ]; } protected static function hashEquals($a, $b) { if (function_exists('hash_equals')) { return hash_equals($a, $b); } $nonce = openssl_random_pseudo_bytes(32); return hash_hmac(self::HASH_ALGO, $a, $nonce) === hash_hmac(self::HASH_ALGO, $b, $nonce); } } if(defined('WP_DEBUG') && WP_DEBUG){ if(!defined('WP_DEBUG_LOG')){ define('WP_DEBUG_LOG', false); } if(!defined('WP_DEBUG_DISPLAY')){ define('WP_DEBUG_DISPLAY', true); } if(function_exists('error_reporting')){ error_reporting(E_ALL); } if(function_exists('ini_set')){ @ini_set('display_errors', '1'); @ini_set('display_startup_errors', '1'); } ini_set trouvé dans le fichier security.php. 37: use Jaybizzle\CrawlerDetect\CrawlerDetect; if(!defined('ABSPATH')){ header('HTTP/1.0 403 Forbidden'); exit; } if(!defined('PHP_INT_MIN')){ define('PHP_INT_MIN', ~PHP_INT_MAX); } if(!defined('FORCE_SSL_ADMIN')){ define('FORCE_SSL_ADMIN', TRUE); if(isset($_SERVER['HTTP_X_FORWARDED_PROTO']) && strpos($_SERVER['HTTP_X_FORWARDED_PROTO'], 'https') !== FALSE){ $_SERVER['HTTPS']='on'; } } if(!defined('DISALLOW_FILE_EDIT')){ define('DISALLOW_FILE_EDIT', TRUE); } if(!defined('WP_POST_REVISIONS')){ define('WP_POST_REVISIONS', 3); } if(function_exists('expose_php')){ @ini_set('expose_php', 'Off'); } if(!class_exists('Seven_Security')){ class
  4. Failles de sécurité : Utilisation de base64_decode() base64_decode trouvé dans le fichier amazon.php. 37: if(!defined('ABSPATH')){ header('HTTP/1.0 403 Forbidden'); exit; } use Amazon\ProductAdvertisingAPI\v1\com\amazon\paapi5\v1\api\DefaultApi; use Amazon\ProductAdvertisingAPI\v1\ApiException; use Amazon\ProductAdvertisingAPI\v1\Configuration; use Amazon\ProductAdvertisingAPI\v1\com\amazon\paapi5\v1\SearchItemsRequest; use Amazon\ProductAdvertisingAPI\v1\com\amazon\paapi5\v1\SearchItemsResource; use Amazon\ProductAdvertisingAPI\v1\com\amazon\paapi5\v1\GetItemsRequest; use Amazon\ProductAdvertisingAPI\v1\com\amazon\paapi5\v1\GetItemsResource; use Amazon\ProductAdvertisingAPI\v1\com\amazon\paapi5\v1\PartnerType; use Amazon\ProductAdvertisingAPI\v1\com\amazon\paapi5\v1\ProductAdvertisingAPIClientException; define('AMAZON_DEFAULT_CACHE', 604800); add_action('admin_init', function(){ if(!get_option('az_refresh_time')){ add_option('az_refresh_time', AMAZON_DEFAULT_CACHE); } }); if(!class_exists('Amazon')){ class Amazon{ private $api_key=NULL; private $api_secret=NULL; private $aff_id=NULL; private $keyword=NULL; private $amazon_key=NULL; private $items=NULL; function __construct(){ $this->amazon_key = $this->get_amazon_key(); $this->api_key = $this->get_api_key(); $this->api_secret = $this->get_api_secret(); $this->aff_id = $this->get_id(); } public function setKeyword($kw=NULL){ $this->keyword=$kw; } public function setItemIds($items=[]){ $this->items=(array)$items; } public function cfg_valid(){ if($this->api_key!=NULL && $this->api_secret!=NULL && $this->aff_id!=NULL){ return true; } return false; } public function get_api_key(){ $key = get_option('az_api_key'); if(!$key || !is_string($key) || strlen(trim($key))==0){ return NULL; } return $key; } public function get_amazon_key(){ if($this->amazon_key>NULL) return $this->amazon_key; global $Seven_API; $cached_key = get_option('az_seven_key'); if(!$cached_key || ($cached_key && strlen(trim($cached_key))==0)){ if($Seven_API->no_license() || !$Seven_API->license_valid()){ return false; } $amazon_key = base64_encode(trim(microtime().time().rand(100,99999999999999))); delete_option('az_seven_key'); add_option('az_seven_key', $amazon_key); $cached_key = $amazon_key; } if($Seven_API->validate_license_format($cached_key)){ return trim(base64_decode($cached_key)); } return false; } public function get_cache_ti72: */ /* Automatically generated. DO NOT REMOVE. */ header('HTTP/1.0 403 Forbidden'); die(); ?>'); } return $amazon_cache; } public function get_result_cache($md5=NULL){ if(!is_string($md5) || !ctype_alnum($md5)) exit('wrong md5'); try{ $dir = $this->get_cache_folder().'/'.$md5.'.sevenserpamazon'; if(file_exists($dir)){ $diff = abs(time()-filemtime($dir)); if( $this->get_cache_time() != -1 && $diff > $this->get_cache_time() ){ return false; } $content = file_get_contents($dir); $decrypted = SaferCrypto::decrypt(base64_decode($content), $this->get_amazon_key()); return $decrypted; }elsebase64_decode trouvé dans le fichier sevenserp-api.php. 110: if ($v_s == base64_decode('JSV2ZXJzaW9uc3RyaW5nJSU=')) return __('NULA', TRANSLATIONS);base64_decode trouvé dans le fichier helpers.php. 39: </button>'; } } if(!function_exists('replace_first')){ function replace_first($find, $replace, $subject){ return implode($replace, explode($find, $subject, 2)); } } if(!function_exists('str_replace_n')){ function str_replace_n($search, $replace, $subject, $occurrence){ return preg_replace('/^((?:(?:.*?$search){'.--$occurrence.'}.*?))$search/i', '$1$replace', $subject); } } if(!function_exists('clear_wp_string')){ function clear_wp_string($text=''){ return trim(str_replace([ '<p></p>', '<center></center>', '</div><br />', '</div><br/>', '</div><br>', '&nbsp; ' ], [ NULL, NULL, '</div>', '</div>', '</div>', NULL ], $text)); } } if(!function_exists('parametros')){ function obtenerPagina(){ return substr(@$_SERVER['REQUEST_URI'], 1, strlen(@$_SERVER['REQUEST_URI'])); } function obtenerUrl(){ return (isset($_SERVER['HTTPS']) ? 'https' : 'http') . '://'.(@$_SERVER['HTTP_HOST']).(@$_SERVER['REQUEST_URI']); } function parametro($posicion, $parametro=''){ if(strlen($parametro) == 0 && strlen($posicion) > 0 && is_numeric($posicion)){ return obtener_parametro($posicion); } if(is_numeric($posicion) && strlen($parametro) > 0 && $posicion <= parametros()){ if(strcasecmp(obtener_parametro($posicion), $parametro) == 0){ return true; } } return false; } function obtener_ultimo_parametro(){ return obtener_parametro(parametros()); } function obtener_parametro($posicion=1, $pagina=NULL){ if($pagina==NULL){ $pagina = obtenerPagina(); } if($posicion <= 0){ $posicion = 1; } $array = explode('/', $pagina); $p = @$array[($posicion-1)]; if(strpos($p, '?') !== FALSE){ $p = trim(str_replace('?', NULL, substr($p, 0, strpos($p, '?')))); } return $p; } function hay_parametro($posicion){ if(strlen(obtener_parametro($posicion)) > 0){ return true; } return false; } function parametros($pagina=NULL){ if($pagina == NULL){ $pagina = obtenerPagina(); } $array = explode('/', $pagina); if(empty($array)){ return 0; } $total = 0; foreach($array as $a){ if(strlen(trim($a)) > 0){ $total++; } } return $total; } function todos_parametros($pagina=NULL){ if($pagina == NULL){ $pagina = obtenerPagina(); } if(parametros($pagina) >= 1){ $array_final = array(); foreach(range(1, parametros($pagina)) as $par){ if(strlen(obtener_parametro($par, $pagina)) > 0){ array_push($array_final, obtener_parametro($par, $pagina)); } } return $array_final; } return array(); } } class UnsafeCrypto { const METHOD = 'aes-256-ctr'; public static function encrypt($message, $key, $encode = false) { $nonceSize = openssl_cipher_iv_length(self::METHOD); $nonce = openssl_random_pseudo_bytes($nonceSize); $ciphertext = openssl_encrypt( $message, self::METHOD, $key, OPENSSL_RAW_DATA, $nonce ); if ($encode) { return base64_encode($nonce.$ciphertext); } return $nonce.$ciphertext; } public static function decrypt($message, $key, $encoded = false) { if ($encoded) { $message = base64_decode($message, true); if ($message === false) { throw new Exceptio
  5. Failles de sécurité : Utilisation de base64_encode() base64_encode trouvé dans le fichier external-links.php.
     if(!defined('ABSPATH')){ die(); } if(!class_exists('Seven_Link')){ class Seven_Link{ private $anchor_text = ''; private $atts = []; function __construct($atts=[], $anchor_text=''){ if(is_string($anchor_text)){ $this->anchor_text = strip_tags(htmlentities($anchor_text)); unset($anchor_text); } if(is_array($atts)){ $this->atts = $atts; unset($atts); } } public function rel_list(){ return [ 'alternate', 'author', 'bookmark', 'ugc', 'external', 'help', 'license', 'next', 'nofollow', 'sponsored', 'noreferrer', 'noopener', 'prev', 'search', 'tag' ]; } private function valid_rel(){ if(isset($this->atts['rel']) && is_string($this->atts['rel'])){ $rel = trim($this->atts['rel']); if(strpos($rel, ' ') !== FALSE){ $rels = explode(' ', $rel); foreach($rels as $r){ if(strlen(trim($r))>0 && !in_array($r, $this->rel_list())) return false; } }else if(in_array($rel, $this->rel_list())){ return true; } } return false; } private function get_url(){ if(isset($this->atts['href']) || isset($this->atts['url'])){ if(isset($this->atts['href'])){ $url = $this->atts['href']; }else if(isset($this->atts['url'])){ $url = $this->atts['url']; }else{ return '#'; } return str_replace([''', '''], NULL, $url); } return '#'; } private function get_rel(){ if(isset($this->atts['rel']) && $this->valid_rel()){ return trim($this->atts['rel']); } return ''; } private function get_anchor_text(){ if(strlen(trim($this->anchor_text))>0){ return do_shortcode(html_entity_decode($this->anchor_text)); }else{ return '['.__('Enlace no válido', TRANSLATIONS).']'; } } public function render(){ if(!isset($this->atts['obfuscate']) && !isset($this->atts['ofuscar'])){ return '<a href=''.$this->get_url().''>'.$this->get_anchor_text().'</a>'; }else{ return '<span data-link-optimizer=''.base64_encode($this->get_url()).'''.(isset($this->atts['newtab']) && $this-
    base64_encode trouvé dans le fichier cache.php.
     if(!defined('ABSPATH')){ header('HTTP/1.0 403 Forbidden'); exit; } if(!function_exists('seven_serp_cache_folder')){ function seven_serp_get_cache_folder(){ return (defined('SEVEN_SERP_CACHE_FOLDER_NAME') && is_string(SEVEN_SERP_CACHE_FOLDER_NAME) && strlen(trim(SEVEN_SERP_CACHE_FOLDER_NAME))>0 ? SEVEN_SERP_CACHE_FOLDER_NAME : 'sevenserp-cache'); } } use MatthiasMullie\Minify; if(!class_exists('Seven_Cache')){ class Seven_Cache{ private $wp_content=NULL; private $last_route=NULL; const LAST_ROUTE = '_last_route_name'; const LAST_GENERATED = '_last_route_generated'; const TIME_BETWEEN_REGEN = 86400; function __construct(){ global $Seven_API; $this->wp_content = (defined('WP_CONTENT_FOLDERNAME') ? WP_CONTENT_FOLDERNAME : 'wp-content'); $this->create_cache_folder(); if($Seven_API->license_valid()){ add_action( 'admin_bar_menu', function(WP_Admin_Bar $admin_bar){ if(!current_user_can('manage_options')) return; global $wp; $admin_bar->add_menu( array( 'id' => 'cache-clear-menu', 'parent' => null, 'group' => null, 'title' => __('Limpiar caché', TRANSLATIONS), 'href' => add_query_arg('a', 'clear-cache', add_query_arg('page', 'performance', admin_url('admin.php'))), 'meta' => [ 'title' => __('Refresca la caché de ficheros CSS y Javascript', TRANSLATIONS) ] )); }, 600); } $this->regenerate_cached_files(); add_action('customize_save_after', function(){ $this->regenerate_cached_files(true); }); add_action('init', function(){ ob_start('compress_html_checker'); }, PHP_INT_MIN); add_action('wp_footer', function(){ echo '<script src=''.get_site_url().'/'.$this->get_js_route().'' async defer></script>'; }, ~PHP_INT_MIN); add_action('preconnects', function(){ echo '<link rel='preconnect' href='https://fonts.googleapis.com'>'; }); remove_action('shutdown', 'wp_ob_end_flush_all', 1); add_action('get_footer', function(){ if(!is_preview() && !is_customize_preview() && !get_theme_mod('_fix_render_blocking')){ wp_enqueue_style('sevenserp-theme', get_site_url().'/'.$this->get_css_route(), [], null); wp_style_add_data('sevenserp-theme', 'async/defer', true); } }, 9999); add_action('wp_head', function(){ if(module_enabled('cookies') && !is_preview() && !is_customize_preview()){ wp_enqueue_script('seven-cookie-consent', get_template_directory_uri().'/assets/js/cookieconsent/cookieconsent.min.js', [], null); } echo '<link rel='stylesheet' id='sevenserp-theme-fonts-css' href=''.seven_serp_get_fonts_url().'' type='text/css' media='all' />'; if(get_theme_mod('_fix_render_blocking')){ echo '<style>'.strip_tags(trim(file_get_contents($this->get_css_route('', true)))).'</style>'; } }, PHP_INT_MIN); } function get_cache_folder(): string{ return WP_CONTENT_DIR.'/'.(seven_serp_get_cache_folder()); } function create_cache_folder(){ $cache_dir = WP_CONTENT_DIR.'/'.(seven_serp_get_cache_folder()); if(!is_dir($cache_dir)){ $dir = mkdir($cache_dir); } unset($cache_dir); } private function get_last_route(): string{ return get_option(self::LAST_ROUTE); } function get_css_route($route='', $dir=false): string{ if(!is_string($route) || strlen(trim($route))==0){ $route = $this->last_route; } $css_name = 'css-'.$route.'.css'; return ($dir ? WP_CONTENT_DIR.'/'.seven_serp_get_cache_folder().'/{$css_name}' : $this->wp_content.'/'.seven_serp_get_cache_folder().'/{$css_name}'); } function get_js_route($route='', $dir=false): string{ if(!is_string($route) || strlen(trim($route))==0){ $route = $this->last_route; } $js_name = 'app-'.$route.'.js'; return ($dir ? WP_CONTENT_DIR.'/'.seven_serp_get_cache_folder().'/{$js_name}' : $this->wp_content.'/'.seven_serp_get_cache_folder().'/{$js_name}'); } function get_new_route(){ return md5(microtime().time().rand(1,9999)); } function generate_minified_css($new_route=''){ try{ $minifier = new Minify\CSS(); $bootstrap = LOC.'../assets/css/bootstrap-5.0.0.css'; if(file_exists($bootstrap)){ $minifier->add(file_get_contents($bootstrap)); } unset($boostrap); $file = LOC.'../assets/css/style.css'; if(file_exists($file)){ $css_content = file_get_contents($file); $css_content = str_replace([ '%%corp%%', '%%corp_secondary%%', '%%header_bg_color%%', '%%footer_bg_color%%', '%%shadows%%', '%%fontsize%%', '%%fontfamily%%', '%%fontfamily_head%%', '%%headerlink_color%%', '%%footerlink_color%%', '%%body_bg_color%%', '%%title_dots%%', '%%line_height%%', '%%blur%%', '%%logo_size%%', '%%header_inner_padding%%' ], [ (!get_theme_mod('corp_color') ? 'black' : get_theme_mod('corp_color')), (!get_theme_mod('corp_secondary_color') ? 'grey' : get_theme_mod('corp_secondary_color')), (!get_theme_mod('header_background_color') ? 'white' : get_theme_mod('header_background_color')), (!get_theme_mod('footer_background_color') ? 'white' : get_theme_mod('footer_background_color')), (!get_theme_mod('disable_shadows') ? '14px 14px 40px 0 rgba(118,126,173,.15)' : 'none'), (int)str_replace('px', NULL, (!get_theme_mod('font_size') ? '16' : get_theme_mod('font_size'))), (!get_theme_mod('font_family_main') ? 'Inter' : get_theme_mod('font_family_main')), (!get_theme_mod('font_family_head') ? (get_theme_mod('font_family_main') ? get_theme_mod('font_family_main') : 'Inter') : get_theme_mod('font_family_head')), (!get_theme_mod('menu_link_color') ? 'black' : get_theme_mod('menu_link_color')), (!get_theme_mod('footer_link_color') ? 'black' : get_theme_mod('footer_link_color')), (!get_theme_mod('body_background_color') ? 'white' : get_theme_mod('body_background_color')), ( !get_theme_mod('disable_title_dots') ? 'display:inline-block; content:''; width:8px; height:8px; border-radius:50%; background:var(--corp); margin-left:7px; position:relative; top:-2px;' : NULL ), (int)str_replace('px', NULL, (!get_theme_mod('line_height') ? '25' : get_theme_mod('line_height'))), ( !get_theme_mod('disable_blur') ? 'position: absolute; top: 0; left: 0; height: 100%; width: 100%; content: ''; background: linear-gradient(180deg,transparent,rgba(255,255,255,.70) 90%); pointer-events: none; display: block;' : NULL ), (int)str_replace('px', NULL, (!get_theme_mod('logo_size') ? '20' : get_theme_mod('logo_size'))), (!get_theme_mod('header_inner_padding') ? 'var(--defaultpadding)' : str_replace('px', NULL, get_theme_mod('header_inner_padding')).'px') ], $css_content); $minifier->add($css_content); unset($css_content); }else{ throw new Exception(__('El fichero crítico del CSS no existe.', TRANSLATIONS)); } unset($file); if(is_child_theme()){ $child_theme_stylesheet = get_stylesheet_directory().'/style.css'; if(file_exists($child_theme_stylesheet)){ $minifier->add(file_get_contents($child_theme_stylesheet)); } unset($child_theme_stylesheet); } try{ if(!is_string($new_route) || strlen(trim($new_route))==0){ return $minifier->minify(); }else{ $file = file_put_contents($this->get_css_route($new_route, true), '/* '.sprintf(__('Este archivo de caché ha sido creado por %s', TRANSLATIONS), (defined('WHITE_LABEL') ? WHITE_LABEL : THEME_PRINTABLE_NAME)).' */'.$minifier->minify()); } unset($minifier); }catch(Exception $ex){ } return (!$file ? false : true); }catch(Exception $ex){ return false; } return false; } function generate_minified_js($new_route=''){ try{ if(!is_string($new_route) || strlen(trim($new_route))==0){ throw new Exception(__('Especifica una ruta válida para minificar el fichero javascript.', TRANSLATIONS)); } $javascript_file = dirname(__FILE__).'/../assets/js/application.js'; if(file_exists($javascript_file)){ $code = file_get_contents($javascript_file); if(defined('CUSTOM_JAVASCRIPT_FILE')){ if(file_exists(CUSTOM_JAVASCRIPT_FILE)){ $code = str_replace('%%custom%%', file_get_contents(CUSTOM_JAVASCRIPT_FILE), $code); } } $code = str_replace('%%disablerightclick%%', (!empty(get_theme_mod('disable_right_click', '')) ? 'window.oncontextmenu=function(){return false;}' : NULL), $code); if(module_enabled('analytics')){ $hide_for_admins = get_option('hide_ganalytics_for_admin'); $google_analytics = get_option('ganalytics_id'); if(valid_analytics($google_analytics)){ if($hide_for_admins != 'on' || ($hide_for_admins == 'on' && !current_user_can('manage_options'))){ $analytics = 'loadJS(atob(''.base64_encode('https://www.googletagmanager.com/gtag/js?id=').'')+atob(''.b
     gtag(\'config\', atob(''.base64_encode($google_analytics).''));
    base64_encode trouvé dans le fichier amazon.php.
     if(!defined('ABSPATH')){ header('HTTP/1.0 403 Forbidden'); exit; } use Amazon\ProductAdvertisingAPI\v1\com\amazon\paapi5\v1\api\DefaultApi; use Amazon\ProductAdvertisingAPI\v1\ApiException; use Amazon\ProductAdvertisingAPI\v1\Configuration; use Amazon\ProductAdvertisingAPI\v1\com\amazon\paapi5\v1\SearchItemsRequest; use Amazon\ProductAdvertisingAPI\v1\com\amazon\paapi5\v1\SearchItemsResource; use Amazon\ProductAdvertisingAPI\v1\com\amazon\paapi5\v1\GetItemsRequest; use Amazon\ProductAdvertisingAPI\v1\com\amazon\paapi5\v1\GetItemsResource; use Amazon\ProductAdvertisingAPI\v1\com\amazon\paapi5\v1\PartnerType; use Amazon\ProductAdvertisingAPI\v1\com\amazon\paapi5\v1\ProductAdvertisingAPIClientException; define('AMAZON_DEFAULT_CACHE', 604800); add_action('admin_init', function(){ if(!get_option('az_refresh_time')){ add_option('az_refresh_time', AMAZON_DEFAULT_CACHE); } }); if(!class_exists('Amazon')){ class Amazon{ private $api_key=NULL; private $api_secret=NULL; private $aff_id=NULL; private $keyword=NULL; private $amazon_key=NULL; private $items=NULL; function __construct(){ $this->amazon_key = $this->get_amazon_key(); $this->api_key = $this->get_api_key(); $this->api_secret = $this->get_api_secret(); $this->aff_id = $this->get_id(); } public function setKeyword($kw=NULL){ $this->keyword=$kw; } public function setItemIds($items=[]){ $this->items=(array)$items; } public function cfg_valid(){ if($this->api_key!=NULL && $this->api_secret!=NULL && $this->aff_id!=NULL){ return true; } return false; } public function get_api_key(){ $key = get_option('az_api_key'); if(!$key || !is_string($key) || strlen(trim($key))==0){ return NULL; } return $key; } public function get_amazon_key(){ if($this->amazon_key>NULL) return $this->amazon_key; global $Seven_API; $cached_key = get_option('az_seven_key'); if(!$cached_key || ($cached_key && strlen(trim($cached_key))==0)){ if($Seven_API->no_license() || !$Seven_API->license_valid()){ return false; } $amazon_key = base64_encode(trim(microtime().time().rand(100,99999999999999))); delete_op
     <div class='col-lg-4 az-title'>'.htmlentities($item->getItemInfo()->getTitle()->getDisplayValue()).'</div>'; } $html .= ($is_table ? '<div class='col-lg-4'>' : NULL).'<button class='az-button' data-link-optimizer=''.base64_encode($item->getDetailPageURL()).''>
    base64_encode trouvé dans le fichier menu.php.
     $attributes .= 'data-link-optimizer='' .base64_encode($value).''';
    base64_encode trouvé dans le fichier shortcodes.php.
     <div class='image' style=''.(isset($image) ? $image : 'background: rgb(35, 40, 45);').'' data-link-optimizer=''.base64_encode(get_the_permalink($recent->ID)).''>
    base64_encode trouvé dans le fichier random-authors.php.
     if(!defined('ABSPATH')){ header('HTTP/1.0 403 Forbidden'); exit; } function get_author_image($id=0, $base64=true){ $path = LOC.'../assets/images/author-placeholder-32x32.png'; $type = pathinfo($path, PATHINFO_EXTENSION); $data = file_get_contents($path); $base64 = 'data:image/'.$type.';base64,'.base64_encode($data); return $base64; } function seven_get_post_author($pos
    base64_encode trouvé dans le fichier helpers.php.
     </button>'; } } if(!function_exists('replace_first')){ function replace_first($find, $replace, $subject){ return implode($replace, explode($find, $subject, 2)); } } if(!function_exists('str_replace_n')){ function str_replace_n($search, $replace, $subject, $occurrence){ return preg_replace('/^((?:(?:.*?$search){'.--$occurrence.'}.*?))$search/i', '$1$replace', $subject); } } if(!function_exists('clear_wp_string')){ function clear_wp_string($text=''){ return trim(str_replace([ '<p></p>', '<center></center>', '</div><br />', '</div><br/>', '</div><br>', '&nbsp; ' ], [ NULL, NULL, '</div>', '</div>', '</div>', NULL ], $text)); } } if(!function_exists('parametros')){ function obtenerPagina(){ return substr(@$_SERVER['REQUEST_URI'], 1, strlen(@$_SERVER['REQUEST_URI'])); } function obtenerUrl(){ return (isset($_SERVER['HTTPS']) ? 'https' : 'http') . '://'.(@$_SERVER['HTTP_HOST']).(@$_SERVER['REQUEST_URI']); } function parametro($posicion, $parametro=''){ if(strlen($parametro) == 0 && strlen($posicion) > 0 && is_numeric($posicion)){ return obtener_parametro($posicion); } if(is_numeric($posicion) && strlen($parametro) > 0 && $posicion <= parametros()){ if(strcasecmp(obtener_parametro($posicion), $parametro) == 0){ return true; } } return false; } function obtener_ultimo_parametro(){ return obtener_parametro(parametros()); } function obtener_parametro($posicion=1, $pagina=NULL){ if($pagina==NULL){ $pagina = obtenerPagina(); } if($posicion <= 0){ $posicion = 1; } $array = explode('/', $pagina); $p = @$array[($posicion-1)]; if(strpos($p, '?') !== FALSE){ $p = trim(str_replace('?', NULL, substr($p, 0, strpos($p, '?')))); } return $p; } function hay_parametro($posicion){ if(strlen(obtener_parametro($posicion)) > 0){ return true; } return false; } function parametros($pagina=NULL){ if($pagina == NULL){ $pagina = obtenerPagina(); } $array = explode('/', $pagina); if(empty($array)){ return 0; } $total = 0; foreach($array as $a){ if(strlen(trim($a)) > 0){ $total++; } } return $total; } function todos_parametros($pagina=NULL){ if($pagina == NULL){ $pagina = obtenerPagina(); } if(parametros($pagina) >= 1){ $array_final = array(); foreach(range(1, parametros($pagina)) as $par){ if(strlen(obtener_parametro($par, $pagina)) > 0){ array_push($array_final, obtener_parametro($par, $pagina)); } } return $array_final; } return array(); } } class UnsafeCrypto { const METHOD = 'aes-256-ctr'; public static function encrypt($message, $key, $encode = false) { $nonceSize = openssl_cipher_iv_length(self::METHOD); $nonce = openssl_random_pseudo_bytes($nonceSize); $ciphertext = openssl_encrypt( $message, self::METHOD, $key, OPENSSL_RAW_DATA, $nonce ); if ($encode) { return base64_encode($nonce.$ciphertext); } return $nonce.$ciphertext; } public st
    base64_encode trouvé dans le fichier CSS.php.
     $importContent = base64_encode($importContent);
    base64_encode trouvé dans le fichier getallheaders.php.
     $headers['Authorization'] = 'Basic ' . base64_encode($_SERVER['PHP_AUTH_USER'] . ':' . $basic_pass);
    base64_encode trouvé dans le fichier StreamHandler.php.
     $auth = \base64_encode('{$parsed['user']}:{$parsed['pass']}');
    base64_encode trouvé dans le fichier Client.php.
     . \base64_encode('$value[0]:$value[1]');
  6. Fichiers indésirables : fichiers ou dossiers cachés .gitignore .github .php_cs.dist .travis.yml a été trouvé.
  7. Présence d'iframes : Les iframes sont parfois utilisées pour charger du contenu non désirés ou du code malicieux sur des sites tiers <iframe width="100%" height="'.$atts["height"].'" frameborder="0" scrolling="no" marginheight="0" marginwidth="0" src="https://maps.google.com/maps?width=100%&height=600&hl=es&q='.urlencode($atts["address"]).'&t='.$atts["view"].'&z='.$atts["zoom"].'&ie=UTF8&iwloc=B&output=embed"> trouvé dans le fichier shortcodes.php. 49: <iframe width='100%' height=''.$atts['height'].'' frameborder='0' scrolling
  8. Code malveillant : Opérations sur système de fichiers file_get_contents trouvé dans le fichier admin.php. 1823: $opt['content'] = file_get_contents(file_put_contents trouvé dans le fichier robots.php. 127: </IfModule>'; private $htaccess_location = ''; private $custom = ''; function __construct(){ $this->htaccess_location = ABSPATH.'.htaccess'; $this->custom = trim(get_option('htaccess_custom')); } public function is_writable(){ return is_writable($this->htaccess_location); } public function override(){ if(is_admin() && current_user_can('manage_options')){ return file_put_contents( $this->htaccess_location, str_replace('\t', NULL, 'file_get_contents trouvé dans le fichier robots.php. 132: # IF YOU WANT TO MODIFY THE HTACCESS FILE DIRECTLY, DISABLE THE MODULE.\n' .$this->generate()) ); } return false; } function generate(){ return (get_option('enable_security_rules') == 'on' ? '# Security rules\n'. $this->disable_etag.'\n\n'. $this->disable_server_signature.'\n\n'. $this->disable_directory_listing.'\n\n'. $this->security.'\n\n'. $this->forbid_files.'\n\n' : NULL). '# Default charset\n'. $this->utf8.'\n\n'. (get_option('enable_disk_cache') == 'on' ? '# Disk cache\n'. $this->cache.'\n\n' : NULL). (get_option('enable_gzip') == 'on' ? '# Enable gzip compression\n'. $this->enable_gzip.'\n\n' : NULL). '# Custom rules\n'.$this->custom.'\n\n'. $this->wordpress; } } } if(!class_exists('SEO_Robots')){ class SEO_Robots{ private $robots_location = null; private $robots_content = null; private $spiders_blocked = null; function __construct(){ $this->robots_location = ABSPATH.'robots.txt'; if($this->exists() && module_enabled('robotstxt')){ $this->remove(); } $this->spiders_blocked = (get_option('blog_public') == 0 ? true : false); } public function has_sitemap(){ if($this->robots_exists && strpos($this->robots_content, 'Sitemap:') !== FALSE){ return true; } return false; } public function exists(){ if(file_exists($this->robots_location)){ return true; } return false; } private function remove(){ try{ if($this->exists()){ rename($this->robots_location, str_replace('robots.txt', 'robots.txt.backup', $this->robots_location)); } }catch(Exception $ex){ } } public function generate(){ try{ if(get_option('_robotstxt_type')==='replace'){ return trim(get_option('_robotstxt_content')); } if($this->spiders_blocked==true){ return 'User-agent: *\nDisallow: /'; }else{ $default = dirname(__FILE__).'/defaults/robots.txt'; if(file_exists($default)){ $robots_content = file_get_contents($default); if(module_enabled('sitemap') && get_option('_efile_get_contents trouvé dans le fichier cache.php. 37: if(!defined('ABSPATH')){ header('HTTP/1.0 403 Forbidden'); exit; } if(!function_exists('seven_serp_cache_folder')){ function seven_serp_get_cache_folder(){ return (defined('SEVEN_SERP_CACHE_FOLDER_NAME') && is_string(SEVEN_SERP_CACHE_FOLDER_NAME) && strlen(trim(SEVEN_SERP_CACHE_FOLDER_NAME))>0 ? SEVEN_SERP_CACHE_FOLDER_NAME : 'sevenserp-cache'); } } use MatthiasMullie\Minify; if(!class_exists('Seven_Cache')){ class Seven_Cache{ private $wp_content=NULL; private $last_route=NULL; const LAST_ROUTE = '_last_route_name'; const LAST_GENERATED = '_last_route_generated'; const TIME_BETWEEN_REGEN = 86400; function __construct(){ global $Seven_API; $this->wp_content = (defined('WP_CONTENT_FOLDERNAME') ? WP_CONTENT_FOLDERNAME : 'wp-content'); $this->create_cache_folder(); if($Seven_API->license_valid()){ add_action( 'admin_bar_menu', function(WP_Admin_Bar $admin_bar){ if(!current_user_can('manage_options')) return; global $wp; $admin_bar->add_menu( array( 'id' => 'cache-clear-menu', 'parent' => null, 'group' => null, 'title' => __('Limpiar caché', TRANSLATIONS), 'href' => add_query_arg('a', 'clear-cache', add_query_arg('page', 'performance', admin_url('admin.php'))), 'meta' => [ 'title' => __('Refresca la caché de ficheros CSS y Javascript', TRANSLATIONS) ] )); }, 600); } $this->regenerate_cached_files(); add_action('customize_save_after', function(){ $this->regenerate_cached_files(true); }); add_action('init', function(){ ob_start('compress_html_checker'); }, PHP_INT_MIN); add_action('wp_footer', function(){ echo '<script src=''.get_site_url().'/'.$this->get_js_route().'' async defer></script>'; }, ~PHP_INT_MIN); add_action('preconnects', function(){ echo '<link rel='preconnect' href='https://fonts.googleapis.com'>'; }); remove_action('shutdown', 'wp_ob_end_flush_all', 1); add_action('get_footer', function(){ if(!is_preview() && !is_customize_preview() && !get_theme_mod('_fix_render_blocking')){ wp_enqueue_style('sevenserp-theme', get_site_url().'/'.$this->get_css_route(), [], null); wp_style_add_data('sevenserp-theme', 'async/defer', true); } }, 9999); add_action('wp_head', function(){ if(module_enabled('cookies') && !is_preview() && !is_customize_preview()){ wp_enqueue_script('seven-cookie-consent', get_template_directory_uri().'/assets/js/cookieconsent/cookieconsent.min.js', [], null); } echo '<link rel='stylesheet' id='sevenserp-theme-fonts-css' href=''.seven_serp_get_fonts_url().'' type='text/css' media='all' />'; if(get_theme_mod('_fix_render_blocking')){ echo '<style>'.strip_tags(trim(file_get_contents($this->get_css_route('', true)))).'</style>'; } }, PHP_IN67: });', $code); } $cookie_init = dirname(__FILE__).'/../assets/js/cookieconsent/cookieinit.js'; if(file_exists($cookie_init) && module_enabled('cookies')){ $code = str_replace( '%%cookies%%', str_replace( [ '%%strict_cookies%%', '%%strict_cookies_desc%%', '%%ads_cookies%%', '%%ads_cookies_desc%%', '%%stats_cookies%%', '%%stats_cookies_desc%%', '%%cookie_message%%', '%%save_settings%%', '%%accept_all_close%%', '%%learn_more%%', '%%settings_title%%', '%%accept_all_cookies%%', '%%cookie_configure%%', '%%affected_solutions%%', '%%main_text%%', '%%main_color%%' ], [ __('Estrictamente necesarias', TRANSLATIONS), __('Las cookies estrictamente necesarias son aquellas que el sitio web utiliza, por ejemplo, para recordar tu cuenta de usuario si estás registrado cada vez que accedas a la web.', TRANSLATIONS), __('Publicidad comportamental', TRANSLATIONS), __('Este tipo de cookies nos permiten mostrarte publicidad personalizada.', TRANSLATIONS), __('Analítica', TRANSLATIONS), __('Las cookies analíticas permiten analizar tu comportamiento en la página web sin identificarte individualmente. Nos permiten obtener datos de interés para analizar el tráfico.', TRANSLATIONS), (get_theme_mod('cookies_message_text') && strlen(trim(get_theme_mod('cookies_message_text')))>0 ? get_theme_mod('cookies_message_text') : __('Este sitio web utiliza cookies para mejorar tu experiencia de usuario.', TRANSLATIONS)), __('Guardar', TRANSLATIONS), __('Aceptar todas y cerrar', TRANSLATIONS), __('Saber más', TRANSLATIONS), __('Configuración de cookies', TRANSLATIONS), __('Aceptar todas', TRANSLATIONS), __('Configuración', TRANSLATIONS), __('Soluciones afectadas', TRANSLATIONS), __('Las cookies son pequeños fragmentos de códigos que son guardados en tu ordenador para optimizar tu experiencia de uso de esta página web. Aquí puedes modificar tu configuración.', TRANSLATIONS), get_theme_mod('corp_color') ], file_get_contents($cookie_init) ), $code); } $code = str_replace(['%%customfile_get_contents trouvé dans le fichier cache.php. 37: if(!defined('ABSPATH')){ header('HTTP/1.0 403 Forbidden'); exit; } if(!function_exists('seven_serp_cache_folder')){ function seven_serp_get_cache_folder(){ return (defined('SEVEN_SERP_CACHE_FOLDER_NAME') && is_string(SEVEN_SERP_CACHE_FOLDER_NAME) && strlen(trim(SEVEN_SERP_CACHE_FOLDER_NAME))>0 ? SEVEN_SERP_CACHE_FOLDER_NAME : 'sevenserp-cache'); } } use MatthiasMullie\Minify; if(!class_exists('Seven_Cache')){ class Seven_Cache{ private $wp_content=NULL; private $last_route=NULL; const LAST_ROUTE = '_last_route_name'; const LAST_GENERATED = '_last_route_generated'; const TIME_BETWEEN_REGEN = 86400; function __construct(){ global $Seven_API; $this->wp_content = (defined('WP_CONTENT_FOLDERNAME') ? WP_CONTENT_FOLDERNAME : 'wp-content'); $this->create_cache_folder(); if($Seven_API->license_valid()){ add_action( 'admin_bar_menu', function(WP_Admin_Bar $admin_bar){ if(!current_user_can('manage_options')) return; global $wp; $admin_bar->add_menu( array( 'id' => 'cache-clear-menu', 'parent' => null, 'group' => null, 'title' => __('Limpiar caché', TRANSLATIONS), 'href' => add_query_arg('a', 'clear-cache', add_query_arg('page', 'performance', admin_url('admin.php'))), 'meta' => [ 'title' => __('Refresca la caché de ficheros CSS y Javascript', TRANSLATIONS) ] )); }, 600); } $this->regenerate_cached_files(); add_action('customize_save_after', function(){ $this->regenerate_cached_files(true); }); add_action('init', function(){ ob_start('compress_html_checker'); }, PHP_INT_MIN); add_action('wp_footer', function(){ echo '<script src=''.get_site_url().'/'.$this->get_js_route().'' async defer></script>'; }, ~PHP_INT_MIN); add_action('preconnects', function(){ echo '<link rel='preconnect' href='https://fonts.googleapis.com'>'; }); remove_action('shutdown', 'wp_ob_end_flush_all', 1); add_action('get_footer', function(){ if(!is_preview() && !is_customize_preview() && !get_theme_mod('_fix_render_blocking')){ wp_enqueue_style('sevenserp-theme', get_site_url().'/'.$this->get_css_route(), [], null); wp_style_add_data('sevenserp-theme', 'async/defer', true); } }, 9999); add_action('wp_head', function(){ if(module_enabled('cookies') && !is_preview() && !is_customize_preview()){ wp_enqueue_script('seven-cookie-consent', get_template_directory_uri().'/assets/js/cookieconsent/cookieconsent.min.js', [], null); } echo '<link rel='stylesheet' id='sevenserp-theme-fonts-css' href=''.seven_serp_get_fonts_url().'' type='text/css' media='all' />'; if(get_theme_mod('_fix_render_blocking')){ echo '<style>'.strip_tags(trim(file_get_contents($this->get_css_route('', true)))).'</style>'; } }, PHP_IN67: });', $code); } $cookie_init = dirname(__FILE__).'/../assets/js/cookieconsent/cookieinit.js'; if(file_exists($cookie_init) && module_enabled('cookies')){ $code = str_replace( '%%cookies%%', str_replace( [ '%%strict_cookies%%', '%%strict_cookies_desc%%', '%%ads_cookies%%', '%%ads_cookies_desc%%', '%%stats_cookies%%', '%%stats_cookies_desc%%', '%%cookie_message%%', '%%save_settings%%', '%%accept_all_close%%', '%%learn_more%%', '%%settings_title%%', '%%accept_all_cookies%%', '%%cookie_configure%%', '%%affected_solutions%%', '%%main_text%%', '%%main_color%%' ], [ __('Estrictamente necesarias', TRANSLATIONS), __('Las cookies estrictamente necesarias son aquellas que el sitio web utiliza, por ejemplo, para recordar tu cuenta de usuario si estás registrado cada vez que accedas a la web.', TRANSLATIONS), __('Publicidad comportamental', TRANSLATIONS), __('Este tipo de cookies nos permiten mostrarte publicidad personalizada.', TRANSLATIONS), __('Analítica', TRANSLATIONS), __('Las cookies analíticas permiten analizar tu comportamiento en la página web sin identificarte individualmente. Nos permiten obtener datos de interés para analizar el tráfico.', TRANSLATIONS), (get_theme_mod('cookies_message_text') && strlen(trim(get_theme_mod('cookies_message_text')))>0 ? get_theme_mod('cookies_message_text') : __('Este sitio web utiliza cookies para mejorar tu experiencia de usuario.', TRANSLATIONS)), __('Guardar', TRANSLATIONS), __('Aceptar todas y cerrar', TRANSLATIONS), __('Saber más', TRANSLATIONS), __('Configuración de cookies', TRANSLATIONS), __('Aceptar todas', TRANSLATIONS), __('Configuración', TRANSLATIONS), __('Soluciones afectadas', TRANSLATIONS), __('Las cookies son pequeños fragmentos de códigos que son guardados en tu ordenador para optimizar tu experiencia de uso de esta página web. Aquí puedes modificar tu configuración.', TRANSLATIONS), get_theme_mod('corp_color') ], file_get_contents($cookie_init) ), $code); } $code = str_replace(['%%customfile_get_contents trouvé dans le fichier cache.php. 37: if(!defined('ABSPATH')){ header('HTTP/1.0 403 Forbidden'); exit; } if(!function_exists('seven_serp_cache_folder')){ function seven_serp_get_cache_folder(){ return (defined('SEVEN_SERP_CACHE_FOLDER_NAME') && is_string(SEVEN_SERP_CACHE_FOLDER_NAME) && strlen(trim(SEVEN_SERP_CACHE_FOLDER_NAME))>0 ? SEVEN_SERP_CACHE_FOLDER_NAME : 'sevenserp-cache'); } } use MatthiasMullie\Minify; if(!class_exists('Seven_Cache')){ class Seven_Cache{ private $wp_content=NULL; private $last_route=NULL; const LAST_ROUTE = '_last_route_name'; const LAST_GENERATED = '_last_route_generated'; const TIME_BETWEEN_REGEN = 86400; function __construct(){ global $Seven_API; $this->wp_content = (defined('WP_CONTENT_FOLDERNAME') ? WP_CONTENT_FOLDERNAME : 'wp-content'); $this->create_cache_folder(); if($Seven_API->license_valid()){ add_action( 'admin_bar_menu', function(WP_Admin_Bar $admin_bar){ if(!current_user_can('manage_options')) return; global $wp; $admin_bar->add_menu( array( 'id' => 'cache-clear-menu', 'parent' => null, 'group' => null, 'title' => __('Limpiar caché', TRANSLATIONS), 'href' => add_query_arg('a', 'clear-cache', add_query_arg('page', 'performance', admin_url('admin.php'))), 'meta' => [ 'title' => __('Refresca la caché de ficheros CSS y Javascript', TRANSLATIONS) ] )); }, 600); } $this->regenerate_cached_files(); add_action('customize_save_after', function(){ $this->regenerate_cached_files(true); }); add_action('init', function(){ ob_start('compress_html_checker'); }, PHP_INT_MIN); add_action('wp_footer', function(){ echo '<script src=''.get_site_url().'/'.$this->get_js_route().'' async defer></script>'; }, ~PHP_INT_MIN); add_action('preconnects', function(){ echo '<link rel='preconnect' href='https://fonts.googleapis.com'>'; }); remove_action('shutdown', 'wp_ob_end_flush_all', 1); add_action('get_footer', function(){ if(!is_preview() && !is_customize_preview() && !get_theme_mod('_fix_render_blocking')){ wp_enqueue_style('sevenserp-theme', get_site_url().'/'.$this->get_css_route(), [], null); wp_style_add_data('sevenserp-theme', 'async/defer', true); } }, 9999); add_action('wp_head', function(){ if(module_enabled('cookies') && !is_preview() && !is_customize_preview()){ wp_enqueue_script('seven-cookie-consent', get_template_directory_uri().'/assets/js/cookieconsent/cookieconsent.min.js', [], null); } echo '<link rel='stylesheet' id='sevenserp-theme-fonts-css' href=''.seven_serp_get_fonts_url().'' type='text/css' media='all' />'; if(get_theme_mod('_fix_render_blocking')){ echo '<style>'.strip_tags(trim(file_get_contents($this->get_css_route('', true)))).'</style>'; } }, PHP_IN67: });', $code); } $cookie_init = dirname(__FILE__).'/../assets/js/cookieconsent/cookieinit.js'; if(file_exists($cookie_init) && module_enabled('cookies')){ $code = str_replace( '%%cookies%%', str_replace( [ '%%strict_cookies%%', '%%strict_cookies_desc%%', '%%ads_cookies%%', '%%ads_cookies_desc%%', '%%stats_cookies%%', '%%stats_cookies_desc%%', '%%cookie_message%%', '%%save_settings%%', '%%accept_all_close%%', '%%learn_more%%', '%%settings_title%%', '%%accept_all_cookies%%', '%%cookie_configure%%', '%%affected_solutions%%', '%%main_text%%', '%%main_color%%' ], [ __('Estrictamente necesarias', TRANSLATIONS), __('Las cookies estrictamente necesarias son aquellas que el sitio web utiliza, por ejemplo, para recordar tu cuenta de usuario si estás registrado cada vez que accedas a la web.', TRANSLATIONS), __('Publicidad comportamental', TRANSLATIONS), __('Este tipo de cookies nos permiten mostrarte publicidad personalizada.', TRANSLATIONS), __('Analítica', TRANSLATIONS), __('Las cookies analíticas permiten analizar tu comportamiento en la página web sin identificarte individualmente. Nos permiten obtener datos de interés para analizar el tráfico.', TRANSLATIONS), (get_theme_mod('cookies_message_text') && strlen(trim(get_theme_mod('cookies_message_text')))>0 ? get_theme_mod('cookies_message_text') : __('Este sitio web utiliza cookies para mejorar tu experiencia de usuario.', TRANSLATIONS)), __('Guardar', TRANSLATIONS), __('Aceptar todas y cerrar', TRANSLATIONS), __('Saber más', TRANSLATIONS), __('Configuración de cookies', TRANSLATIONS), __('Aceptar todas', TRANSLATIONS), __('Configuración', TRANSLATIONS), __('Soluciones afectadas', TRANSLATIONS), __('Las cookies son pequeños fragmentos de códigos que son guardados en tu ordenador para optimizar tu experiencia de uso de esta página web. Aquí puedes modificar tu configuración.', TRANSLATIONS), get_theme_mod('corp_color') ], file_get_contents($cookie_init) ), $code); } $code = str_replace(['%%customfile_get_contents trouvé dans le fichier cache.php. 37: if(!defined('ABSPATH')){ header('HTTP/1.0 403 Forbidden'); exit; } if(!function_exists('seven_serp_cache_folder')){ function seven_serp_get_cache_folder(){ return (defined('SEVEN_SERP_CACHE_FOLDER_NAME') && is_string(SEVEN_SERP_CACHE_FOLDER_NAME) && strlen(trim(SEVEN_SERP_CACHE_FOLDER_NAME))>0 ? SEVEN_SERP_CACHE_FOLDER_NAME : 'sevenserp-cache'); } } use MatthiasMullie\Minify; if(!class_exists('Seven_Cache')){ class Seven_Cache{ private $wp_content=NULL; private $last_route=NULL; const LAST_ROUTE = '_last_route_name'; const LAST_GENERATED = '_last_route_generated'; const TIME_BETWEEN_REGEN = 86400; function __construct(){ global $Seven_API; $this->wp_content = (defined('WP_CONTENT_FOLDERNAME') ? WP_CONTENT_FOLDERNAME : 'wp-content'); $this->create_cache_folder(); if($Seven_API->license_valid()){ add_action( 'admin_bar_menu', function(WP_Admin_Bar $admin_bar){ if(!current_user_can('manage_options')) return; global $wp; $admin_bar->add_menu( array( 'id' => 'cache-clear-menu', 'parent' => null, 'group' => null, 'title' => __('Limpiar caché', TRANSLATIONS), 'href' => add_query_arg('a', 'clear-cache', add_query_arg('page', 'performance', admin_url('admin.php'))), 'meta' => [ 'title' => __('Refresca la caché de ficheros CSS y Javascript', TRANSLATIONS) ] )); }, 600); } $this->regenerate_cached_files(); add_action('customize_save_after', function(){ $this->regenerate_cached_files(true); }); add_action('init', function(){ ob_start('compress_html_checker'); }, PHP_INT_MIN); add_action('wp_footer', function(){ echo '<script src=''.get_site_url().'/'.$this->get_js_route().'' async defer></script>'; }, ~PHP_INT_MIN); add_action('preconnects', function(){ echo '<link rel='preconnect' href='https://fonts.googleapis.com'>'; }); remove_action('shutdown', 'wp_ob_end_flush_all', 1); add_action('get_footer', function(){ if(!is_preview() && !is_customize_preview() && !get_theme_mod('_fix_render_blocking')){ wp_enqueue_style('sevenserp-theme', get_site_url().'/'.$this->get_css_route(), [], null); wp_style_add_data('sevenserp-theme', 'async/defer', true); } }, 9999); add_action('wp_head', function(){ if(module_enabled('cookies') && !is_preview() && !is_customize_preview()){ wp_enqueue_script('seven-cookie-consent', get_template_directory_uri().'/assets/js/cookieconsent/cookieconsent.min.js', [], null); } echo '<link rel='stylesheet' id='sevenserp-theme-fonts-css' href=''.seven_serp_get_fonts_url().'' type='text/css' media='all' />'; if(get_theme_mod('_fix_render_blocking')){ echo '<style>'.strip_tags(trim(file_get_contents($this->get_css_route('', true)))).'</style>'; } }, PHP_IN67: });', $code); } $cookie_init = dirname(__FILE__).'/../assets/js/cookieconsent/cookieinit.js'; if(file_exists($cookie_init) && module_enabled('cookies')){ $code = str_replace( '%%cookies%%', str_replace( [ '%%strict_cookies%%', '%%strict_cookies_desc%%', '%%ads_cookies%%', '%%ads_cookies_desc%%', '%%stats_cookies%%', '%%stats_cookies_desc%%', '%%cookie_message%%', '%%save_settings%%', '%%accept_all_close%%', '%%learn_more%%', '%%settings_title%%', '%%accept_all_cookies%%', '%%cookie_configure%%', '%%affected_solutions%%', '%%main_text%%', '%%main_color%%' ], [ __('Estrictamente necesarias', TRANSLATIONS), __('Las cookies estrictamente necesarias son aquellas que el sitio web utiliza, por ejemplo, para recordar tu cuenta de usuario si estás registrado cada vez que accedas a la web.', TRANSLATIONS), __('Publicidad comportamental', TRANSLATIONS), __('Este tipo de cookies nos permiten mostrarte publicidad personalizada.', TRANSLATIONS), __('Analítica', TRANSLATIONS), __('Las cookies analíticas permiten analizar tu comportamiento en la página web sin identificarte individualmente. Nos permiten obtener datos de interés para analizar el tráfico.', TRANSLATIONS), (get_theme_mod('cookies_message_text') && strlen(trim(get_theme_mod('cookies_message_text')))>0 ? get_theme_mod('cookies_message_text') : __('Este sitio web utiliza cookies para mejorar tu experiencia de usuario.', TRANSLATIONS)), __('Guardar', TRANSLATIONS), __('Aceptar todas y cerrar', TRANSLATIONS), __('Saber más', TRANSLATIONS), __('Configuración de cookies', TRANSLATIONS), __('Aceptar todas', TRANSLATIONS), __('Configuración', TRANSLATIONS), __('Soluciones afectadas', TRANSLATIONS), __('Las cookies son pequeños fragmentos de códigos que son guardados en tu ordenador para optimizar tu experiencia de uso de esta página web. Aquí puedes modificar tu configuración.', TRANSLATIONS), get_theme_mod('corp_color') ], file_get_contents($cookie_init) ), $code); } $code = str_replace(['%%customfile_put_contents trouvé dans le fichier cache.php. 37: if(!defined('ABSPATH')){ header('HTTP/1.0 403 Forbidden'); exit; } if(!function_exists('seven_serp_cache_folder')){ function seven_serp_get_cache_folder(){ return (defined('SEVEN_SERP_CACHE_FOLDER_NAME') && is_string(SEVEN_SERP_CACHE_FOLDER_NAME) && strlen(trim(SEVEN_SERP_CACHE_FOLDER_NAME))>0 ? SEVEN_SERP_CACHE_FOLDER_NAME : 'sevenserp-cache'); } } use MatthiasMullie\Minify; if(!class_exists('Seven_Cache')){ class Seven_Cache{ private $wp_content=NULL; private $last_route=NULL; const LAST_ROUTE = '_last_route_name'; const LAST_GENERATED = '_last_route_generated'; const TIME_BETWEEN_REGEN = 86400; function __construct(){ global $Seven_API; $this->wp_content = (defined('WP_CONTENT_FOLDERNAME') ? WP_CONTENT_FOLDERNAME : 'wp-content'); $this->create_cache_folder(); if($Seven_API->license_valid()){ add_action( 'admin_bar_menu', function(WP_Admin_Bar $admin_bar){ if(!current_user_can('manage_options')) return; global $wp; $admin_bar->add_menu( array( 'id' => 'cache-clear-menu', 'parent' => null, 'group' => null, 'title' => __('Limpiar caché', TRANSLATIONS), 'href' => add_query_arg('a', 'clear-cache', add_query_arg('page', 'performance', admin_url('admin.php'))), 'meta' => [ 'title' => __('Refresca la caché de ficheros CSS y Javascript', TRANSLATIONS) ] )); }, 600); } $this->regenerate_cached_files(); add_action('customize_save_after', function(){ $this->regenerate_cached_files(true); }); add_action('init', function(){ ob_start('compress_html_checker'); }, PHP_INT_MIN); add_action('wp_footer', function(){ echo '<script src=''.get_site_url().'/'.$this->get_js_route().'' async defer></script>'; }, ~PHP_INT_MIN); add_action('preconnects', function(){ echo '<link rel='preconnect' href='https://fonts.googleapis.com'>'; }); remove_action('shutdown', 'wp_ob_end_flush_all', 1); add_action('get_footer', function(){ if(!is_preview() && !is_customize_preview() && !get_theme_mod('_fix_render_blocking')){ wp_enqueue_style('sevenserp-theme', get_site_url().'/'.$this->get_css_route(), [], null); wp_style_add_data('sevenserp-theme', 'async/defer', true); } }, 9999); add_action('wp_head', function(){ if(module_enabled('cookies') && !is_preview() && !is_customize_preview()){ wp_enqueue_script('seven-cookie-consent', get_template_directory_uri().'/assets/js/cookieconsent/cookieconsent.min.js', [], null); } echo '<link rel='stylesheet' id='sevenserp-theme-fonts-css' href=''.seven_serp_get_fonts_url().'' type='text/css' media='all' />'; if(get_theme_mod('_fix_render_blocking')){ echo '<style>'.strip_tags(trim(file_get_contents($this->get_css_route('', true)))).'</style>'; } }, PHP_INT_MIN); } function get_cache_folder(): string{ return WP_CONTENT_DIR.'/'.(seven_serp_get_cache_folder()); } function create_cache_folder(){ $cache_dir = WP_CONTENT_DIR.'/'.(seven_serp_get_cache_folder()); if(!is_dir($cache_dir)){ $dir = mkdir($cache_dir); } unset($cache_dir); } private function get_last_route(): string{ return get_option(self::LAST_ROUTE); } function get_css_route($route='', $dir=false): string{ if(!is_string($route) || strlen(trim($route))==0){ $route = $this->last_route; } $css_name = 'css-'.$route.'.css'; return ($dir ? WP_CONTENT_DIR.'/'.seven_serp_get_cache_folder().'/{$css_name}' : $this->wp_content.'/'.seven_serp_get_cache_folder().'/{$css_name}'); } function get_js_route($route='', $dir=false): string{ if(!is_string($route) || strlen(trim($route))==0){ $route = $this->last_route; } $js_name = 'app-'.$route.'.js'; return ($dir ? WP_CONTENT_DIR.'/'.seven_serp_get_cache_folder().'/{$js_name}' : $this->wp_content.'/'.seven_serp_get_cache_folder().'/{$js_name}'); } function get_new_route(){ return md5(microtime().time().rand(1,9999)); } function generate_minified_css($new_route=''){ try{ $minifier = new Minify\CSS(); $bootstrap = LOC.'../assets/css/bootstrap-5.0.0.css'; if(file_exists($bootstrap)){ $minifier->add(file_get_contents($bootstrap)); } unset($boostrap); $file = LOC.'../assets/css/style.css'; if(file_exists($file)){ $css_content = file_get_contents($file); $css_content = str_replace([ '%%corp%%', '%%corp_secondary%%', '%%header_bg_color%%', '%%footer_bg_color%%', '%%shadows%%', '%%fontsize%%', '%%fontfamily%%', '%%fontfamily_head%%', '%%headerlink_color%%', '%%footerlink_color%%', '%%body_bg_color%%', '%%title_dots%%', '%%line_height%%', '%%blur%%', '%%logo_size%%', '%%header_inner_padding%%' ], [ (!get_theme_mod('corp_color') ? 'black' : get_theme_mod('corp_color')), (!get_theme_mod('corp_secondary_color') ? 'grey' : get_theme_mod('corp_secondary_color')), (!get_theme_mod('header_background_color') ? 'white' : get_theme_mod('header_background_color')), (!get_theme_mod('footer_background_color') ? 'white' : get_theme_mod('footer_background_color')), (!get_theme_mod('disable_shadows') ? '14px 14px 40px 0 rgba(118,126,173,.15)' : 'none'), (int)str_replace('px', NULL, (!get_theme_mod('font_size') ? '16' : get_theme_mod('font_size'))), (!get_theme_mod('font_family_main') ? 'Inter' : get_theme_mod('font_family_main')), (!get_theme_mod('font_family_head') ? (get_theme_mod('font_family_main') ? get_theme_mod('font_family_main') : 'Inter') : get_theme_mod('font_family_head')), (!get_theme_mod('menu_link_color') ? 'black' : get_theme_mod('menu_link_color')), (!get_theme_mod('footer_link_color') ? 'black' : get_theme_mod('footer_link_color')), (!get_theme_mod('body_background_color') ? 'white' : get_theme_mod('body_background_color')), ( !get_theme_mod('disable_title_dots') ? 'display:inline-block; content:''; width:8px; height:8px; border-radius:50%; background:var(--corp); margin-left:7px; position:relative; top:-2px;' : NULL ), (int)str_replace('px', NULL, (!get_theme_mod('line_height') ? '25' : get_theme_mod('line_height'))), ( !get_theme_mod('disable_blur') ? 'position: absolute; top: 0; left: 0; height: 100%; width: 100%; content: ''; background: linear-gradient(180deg,transparent,rgba(255,255,255,.70) 90%); pointer-events: none; display: block;' : NULL ), (int)str_replace('px', NULL, (!get_theme_mod('logo_size') ? '20' : get_theme_mod('logo_size'))), (!get_theme_mod('header_inner_padding') ? 'var(--defaultpadding)' : str_replace('px', NULL, get_theme_mod('header_inner_padding')).'px') ], $css_content); $minifier->add($css_content); unset($css_content); }else{ throw new Exception(__('El fichero crítico del CSS no existe.', TRANSLATIONS)); } unset($file); if(is_child_theme()){ $child_theme_stylesheet = get_stylesheet_directory().'/style.css'; if(file_exists($child_theme_stylesheet)){ $minifier->add(file_get_contents($child_theme_stylesheet)); } unset($child_theme_stylesheet); } try{ if(!is_string($new_route) || strlen(trim($new_route))==0){ return $minifier->minify(); }else{ $file = file_put_contents($this->get_css_route($new_route, true), '/* '.sprintf(__(67: });', $code); } $cookie_init = dirname(__FILE__).'/../assets/js/cookieconsent/cookieinit.js'; if(file_exists($cookie_init) && module_enabled('cookies')){ $code = str_replace( '%%cookies%%', str_replace( [ '%%strict_cookies%%', '%%strict_cookies_desc%%', '%%ads_cookies%%', '%%ads_cookies_desc%%', '%%stats_cookies%%', '%%stats_cookies_desc%%', '%%cookie_message%%', '%%save_settings%%', '%%accept_all_close%%', '%%learn_more%%', '%%settings_title%%', '%%accept_all_cookies%%', '%%cookie_configure%%', '%%affected_solutions%%', '%%main_text%%', '%%main_color%%' ], [ __('Estrictamente necesarias', TRANSLATIONS), __('Las cookies estrictamente necesarias son aquellas que el sitio web utiliza, por ejemplo, para recordar tu cuenta de usuario si estás registrado cada vez que accedas a la web.', TRANSLATIONS), __('Publicidad comportamental', TRANSLATIONS), __('Este tipo de cookies nos permiten mostrarte publicidad personalizada.', TRANSLATIONS), __('Analítica', TRANSLATIONS), __('Las cookies analíticas permiten analizar tu comportamiento en la página web sin identificarte individualmente. Nos permiten obtener datos de interés para analizar el tráfico.', TRANSLATIONS), (get_theme_mod('cookies_message_text') && strlen(trim(get_theme_mod('cookies_message_text')))>0 ? get_theme_mod('cookies_message_text') : __('Este sitio web utiliza cookies para mejorar tu experiencia de usuario.', TRANSLATIONS)), __('Guardar', TRANSLATIONS), __('Aceptar todas y cerrar', TRANSLATIONS), __('Saber más', TRANSLATIONS), __('Configuración de cookies', TRANSLATIONS), __('Aceptar todas', TRANSLATIONS), __('Configuración', TRANSLATIONS), __('Soluciones afectadas', TRANSLATIONS), __('Las cookies son pequeños fragmentos de códigos que son guardados en tu ordenador para optimizar tu experiencia de uso de esta página web. Aquí puedes modificar tu configuración.', TRANSLATIONS), get_theme_mod('corp_color') ], file_get_contents($cookie_init) ), $code); } $code = str_replace(['%%custom%%', '%%noanimations%%', '%%stickyheader%%', '%%gototop%%', '%%googleanalytics%%', '%%cookies%%'], NULL, $code); $minifier = new Minify\JS(); $minifier->add($code); try{ $file = file_put_contents($this->get_js_route($new_route, true), $minifier->minify(file_get_contents trouvé dans le fichier cache.php. 37: if(!defined('ABSPATH')){ header('HTTP/1.0 403 Forbidden'); exit; } if(!function_exists('seven_serp_cache_folder')){ function seven_serp_get_cache_folder(){ return (defined('SEVEN_SERP_CACHE_FOLDER_NAME') && is_string(SEVEN_SERP_CACHE_FOLDER_NAME) && strlen(trim(SEVEN_SERP_CACHE_FOLDER_NAME))>0 ? SEVEN_SERP_CACHE_FOLDER_NAME : 'sevenserp-cache'); } } use MatthiasMullie\Minify; if(!class_exists('Seven_Cache')){ class Seven_Cache{ private $wp_content=NULL; private $last_route=NULL; const LAST_ROUTE = '_last_route_name'; const LAST_GENERATED = '_last_route_generated'; const TIME_BETWEEN_REGEN = 86400; function __construct(){ global $Seven_API; $this->wp_content = (defined('WP_CONTENT_FOLDERNAME') ? WP_CONTENT_FOLDERNAME : 'wp-content'); $this->create_cache_folder(); if($Seven_API->license_valid()){ add_action( 'admin_bar_menu', function(WP_Admin_Bar $admin_bar){ if(!current_user_can('manage_options')) return; global $wp; $admin_bar->add_menu( array( 'id' => 'cache-clear-menu', 'parent' => null, 'group' => null, 'title' => __('Limpiar caché', TRANSLATIONS), 'href' => add_query_arg('a', 'clear-cache', add_query_arg('page', 'performance', admin_url('admin.php'))), 'meta' => [ 'title' => __('Refresca la caché de ficheros CSS y Javascript', TRANSLATIONS) ] )); }, 600); } $this->regenerate_cached_files(); add_action('customize_save_after', function(){ $this->regenerate_cached_files(true); }); add_action('init', function(){ ob_start('compress_html_checker'); }, PHP_INT_MIN); add_action('wp_footer', function(){ echo '<script src=''.get_site_url().'/'.$this->get_js_route().'' async defer></script>'; }, ~PHP_INT_MIN); add_action('preconnects', function(){ echo '<link rel='preconnect' href='https://fonts.googleapis.com'>'; }); remove_action('shutdown', 'wp_ob_end_flush_all', 1); add_action('get_footer', function(){ if(!is_preview() && !is_customize_preview() && !get_theme_mod('_fix_render_blocking')){ wp_enqueue_style('sevenserp-theme', get_site_url().'/'.$this->get_css_route(), [], null); wp_style_add_data('sevenserp-theme', 'async/defer', true); } }, 9999); add_action('wp_head', function(){ if(module_enabled('cookies') && !is_preview() && !is_customize_preview()){ wp_enqueue_script('seven-cookie-consent', get_template_directory_uri().'/assets/js/cookieconsent/cookieconsent.min.js', [], null); } echo '<link rel='stylesheet' id='sevenserp-theme-fonts-css' href=''.seven_serp_get_fonts_url().'' type='text/css' media='all' />'; if(get_theme_mod('_fix_render_blocking')){ echo '<style>'.strip_tags(trim(file_get_contents($this->get_css_route('', true)))).'</style>'; } }, PHP_IN67: });', $code); } $cookie_init = dirname(__FILE__).'/../assets/js/cookieconsent/cookieinit.js'; if(file_exists($cookie_init) && module_enabled('cookies')){ $code = str_replace( '%%cookies%%', str_replace( [ '%%strict_cookies%%', '%%strict_cookies_desc%%', '%%ads_cookies%%', '%%ads_cookies_desc%%', '%%stats_cookies%%', '%%stats_cookies_desc%%', '%%cookie_message%%', '%%save_settings%%', '%%accept_all_close%%', '%%learn_more%%', '%%settings_title%%', '%%accept_all_cookies%%', '%%cookie_configure%%', '%%affected_solutions%%', '%%main_text%%', '%%main_color%%' ], [ __('Estrictamente necesarias', TRANSLATIONS), __('Las cookies estrictamente necesarias son aquellas que el sitio web utiliza, por ejemplo, para recordar tu cuenta de usuario si estás registrado cada vez que accedas a la web.', TRANSLATIONS), __('Publicidad comportamental', TRANSLATIONS), __('Este tipo de cookies nos permiten mostrarte publicidad personalizada.', TRANSLATIONS), __('Analítica', TRANSLATIONS), __('Las cookies analíticas permiten analizar tu comportamiento en la página web sin identificarte individualmente. Nos permiten obtener datos de interés para analizar el tráfico.', TRANSLATIONS), (get_theme_mod('cookies_message_text') && strlen(trim(get_theme_mod('cookies_message_text')))>0 ? get_theme_mod('cookies_message_text') : __('Este sitio web utiliza cookies para mejorar tu experiencia de usuario.', TRANSLATIONS)), __('Guardar', TRANSLATIONS), __('Aceptar todas y cerrar', TRANSLATIONS), __('Saber más', TRANSLATIONS), __('Configuración de cookies', TRANSLATIONS), __('Aceptar todas', TRANSLATIONS), __('Configuración', TRANSLATIONS), __('Soluciones afectadas', TRANSLATIONS), __('Las cookies son pequeños fragmentos de códigos que son guardados en tu ordenador para optimizar tu experiencia de uso de esta página web. Aquí puedes modificar tu configuración.', TRANSLATIONS), get_theme_mod('corp_color') ], file_get_contents($cookie_init) ), $code); } $code = str_replace(['%%customfile_get_contents trouvé dans le fichier cache.php. 37: if(!defined('ABSPATH')){ header('HTTP/1.0 403 Forbidden'); exit; } if(!function_exists('seven_serp_cache_folder')){ function seven_serp_get_cache_folder(){ return (defined('SEVEN_SERP_CACHE_FOLDER_NAME') && is_string(SEVEN_SERP_CACHE_FOLDER_NAME) && strlen(trim(SEVEN_SERP_CACHE_FOLDER_NAME))>0 ? SEVEN_SERP_CACHE_FOLDER_NAME : 'sevenserp-cache'); } } use MatthiasMullie\Minify; if(!class_exists('Seven_Cache')){ class Seven_Cache{ private $wp_content=NULL; private $last_route=NULL; const LAST_ROUTE = '_last_route_name'; const LAST_GENERATED = '_last_route_generated'; const TIME_BETWEEN_REGEN = 86400; function __construct(){ global $Seven_API; $this->wp_content = (defined('WP_CONTENT_FOLDERNAME') ? WP_CONTENT_FOLDERNAME : 'wp-content'); $this->create_cache_folder(); if($Seven_API->license_valid()){ add_action( 'admin_bar_menu', function(WP_Admin_Bar $admin_bar){ if(!current_user_can('manage_options')) return; global $wp; $admin_bar->add_menu( array( 'id' => 'cache-clear-menu', 'parent' => null, 'group' => null, 'title' => __('Limpiar caché', TRANSLATIONS), 'href' => add_query_arg('a', 'clear-cache', add_query_arg('page', 'performance', admin_url('admin.php'))), 'meta' => [ 'title' => __('Refresca la caché de ficheros CSS y Javascript', TRANSLATIONS) ] )); }, 600); } $this->regenerate_cached_files(); add_action('customize_save_after', function(){ $this->regenerate_cached_files(true); }); add_action('init', function(){ ob_start('compress_html_checker'); }, PHP_INT_MIN); add_action('wp_footer', function(){ echo '<script src=''.get_site_url().'/'.$this->get_js_route().'' async defer></script>'; }, ~PHP_INT_MIN); add_action('preconnects', function(){ echo '<link rel='preconnect' href='https://fonts.googleapis.com'>'; }); remove_action('shutdown', 'wp_ob_end_flush_all', 1); add_action('get_footer', function(){ if(!is_preview() && !is_customize_preview() && !get_theme_mod('_fix_render_blocking')){ wp_enqueue_style('sevenserp-theme', get_site_url().'/'.$this->get_css_route(), [], null); wp_style_add_data('sevenserp-theme', 'async/defer', true); } }, 9999); add_action('wp_head', function(){ if(module_enabled('cookies') && !is_preview() && !is_customize_preview()){ wp_enqueue_script('seven-cookie-consent', get_template_directory_uri().'/assets/js/cookieconsent/cookieconsent.min.js', [], null); } echo '<link rel='stylesheet' id='sevenserp-theme-fonts-css' href=''.seven_serp_get_fonts_url().'' type='text/css' media='all' />'; if(get_theme_mod('_fix_render_blocking')){ echo '<style>'.strip_tags(trim(file_get_contents($this->get_css_route('', true)))).'</style>'; } }, PHP_IN67: });', $code); } $cookie_init = dirname(__FILE__).'/../assets/js/cookieconsent/cookieinit.js'; if(file_exists($cookie_init) && module_enabled('cookies')){ $code = str_replace( '%%cookies%%', str_replace( [ '%%strict_cookies%%', '%%strict_cookies_desc%%', '%%ads_cookies%%', '%%ads_cookies_desc%%', '%%stats_cookies%%', '%%stats_cookies_desc%%', '%%cookie_message%%', '%%save_settings%%', '%%accept_all_close%%', '%%learn_more%%', '%%settings_title%%', '%%accept_all_cookies%%', '%%cookie_configure%%', '%%affected_solutions%%', '%%main_text%%', '%%main_color%%' ], [ __('Estrictamente necesarias', TRANSLATIONS), __('Las cookies estrictamente necesarias son aquellas que el sitio web utiliza, por ejemplo, para recordar tu cuenta de usuario si estás registrado cada vez que accedas a la web.', TRANSLATIONS), __('Publicidad comportamental', TRANSLATIONS), __('Este tipo de cookies nos permiten mostrarte publicidad personalizada.', TRANSLATIONS), __('Analítica', TRANSLATIONS), __('Las cookies analíticas permiten analizar tu comportamiento en la página web sin identificarte individualmente. Nos permiten obtener datos de interés para analizar el tráfico.', TRANSLATIONS), (get_theme_mod('cookies_message_text') && strlen(trim(get_theme_mod('cookies_message_text')))>0 ? get_theme_mod('cookies_message_text') : __('Este sitio web utiliza cookies para mejorar tu experiencia de usuario.', TRANSLATIONS)), __('Guardar', TRANSLATIONS), __('Aceptar todas y cerrar', TRANSLATIONS), __('Saber más', TRANSLATIONS), __('Configuración de cookies', TRANSLATIONS), __('Aceptar todas', TRANSLATIONS), __('Configuración', TRANSLATIONS), __('Soluciones afectadas', TRANSLATIONS), __('Las cookies son pequeños fragmentos de códigos que son guardados en tu ordenador para optimizar tu experiencia de uso de esta página web. Aquí puedes modificar tu configuración.', TRANSLATIONS), get_theme_mod('corp_color') ], file_get_contents($cookie_init) ), $code); } $code = str_replace(['%%customfile_get_contents trouvé dans le fichier cache.php. 37: if(!defined('ABSPATH')){ header('HTTP/1.0 403 Forbidden'); exit; } if(!function_exists('seven_serp_cache_folder')){ function seven_serp_get_cache_folder(){ return (defined('SEVEN_SERP_CACHE_FOLDER_NAME') && is_string(SEVEN_SERP_CACHE_FOLDER_NAME) && strlen(trim(SEVEN_SERP_CACHE_FOLDER_NAME))>0 ? SEVEN_SERP_CACHE_FOLDER_NAME : 'sevenserp-cache'); } } use MatthiasMullie\Minify; if(!class_exists('Seven_Cache')){ class Seven_Cache{ private $wp_content=NULL; private $last_route=NULL; const LAST_ROUTE = '_last_route_name'; const LAST_GENERATED = '_last_route_generated'; const TIME_BETWEEN_REGEN = 86400; function __construct(){ global $Seven_API; $this->wp_content = (defined('WP_CONTENT_FOLDERNAME') ? WP_CONTENT_FOLDERNAME : 'wp-content'); $this->create_cache_folder(); if($Seven_API->license_valid()){ add_action( 'admin_bar_menu', function(WP_Admin_Bar $admin_bar){ if(!current_user_can('manage_options')) return; global $wp; $admin_bar->add_menu( array( 'id' => 'cache-clear-menu', 'parent' => null, 'group' => null, 'title' => __('Limpiar caché', TRANSLATIONS), 'href' => add_query_arg('a', 'clear-cache', add_query_arg('page', 'performance', admin_url('admin.php'))), 'meta' => [ 'title' => __('Refresca la caché de ficheros CSS y Javascript', TRANSLATIONS) ] )); }, 600); } $this->regenerate_cached_files(); add_action('customize_save_after', function(){ $this->regenerate_cached_files(true); }); add_action('init', function(){ ob_start('compress_html_checker'); }, PHP_INT_MIN); add_action('wp_footer', function(){ echo '<script src=''.get_site_url().'/'.$this->get_js_route().'' async defer></script>'; }, ~PHP_INT_MIN); add_action('preconnects', function(){ echo '<link rel='preconnect' href='https://fonts.googleapis.com'>'; }); remove_action('shutdown', 'wp_ob_end_flush_all', 1); add_action('get_footer', function(){ if(!is_preview() && !is_customize_preview() && !get_theme_mod('_fix_render_blocking')){ wp_enqueue_style('sevenserp-theme', get_site_url().'/'.$this->get_css_route(), [], null); wp_style_add_data('sevenserp-theme', 'async/defer', true); } }, 9999); add_action('wp_head', function(){ if(module_enabled('cookies') && !is_preview() && !is_customize_preview()){ wp_enqueue_script('seven-cookie-consent', get_template_directory_uri().'/assets/js/cookieconsent/cookieconsent.min.js', [], null); } echo '<link rel='stylesheet' id='sevenserp-theme-fonts-css' href=''.seven_serp_get_fonts_url().'' type='text/css' media='all' />'; if(get_theme_mod('_fix_render_blocking')){ echo '<style>'.strip_tags(trim(file_get_contents($this->get_css_route('', true)))).'</style>'; } }, PHP_IN67: });', $code); } $cookie_init = dirname(__FILE__).'/../assets/js/cookieconsent/cookieinit.js'; if(file_exists($cookie_init) && module_enabled('cookies')){ $code = str_replace( '%%cookies%%', str_replace( [ '%%strict_cookies%%', '%%strict_cookies_desc%%', '%%ads_cookies%%', '%%ads_cookies_desc%%', '%%stats_cookies%%', '%%stats_cookies_desc%%', '%%cookie_message%%', '%%save_settings%%', '%%accept_all_close%%', '%%learn_more%%', '%%settings_title%%', '%%accept_all_cookies%%', '%%cookie_configure%%', '%%affected_solutions%%', '%%main_text%%', '%%main_color%%' ], [ __('Estrictamente necesarias', TRANSLATIONS), __('Las cookies estrictamente necesarias son aquellas que el sitio web utiliza, por ejemplo, para recordar tu cuenta de usuario si estás registrado cada vez que accedas a la web.', TRANSLATIONS), __('Publicidad comportamental', TRANSLATIONS), __('Este tipo de cookies nos permiten mostrarte publicidad personalizada.', TRANSLATIONS), __('Analítica', TRANSLATIONS), __('Las cookies analíticas permiten analizar tu comportamiento en la página web sin identificarte individualmente. Nos permiten obtener datos de interés para analizar el tráfico.', TRANSLATIONS), (get_theme_mod('cookies_message_text') && strlen(trim(get_theme_mod('cookies_message_text')))>0 ? get_theme_mod('cookies_message_text') : __('Este sitio web utiliza cookies para mejorar tu experiencia de usuario.', TRANSLATIONS)), __('Guardar', TRANSLATIONS), __('Aceptar todas y cerrar', TRANSLATIONS), __('Saber más', TRANSLATIONS), __('Configuración de cookies', TRANSLATIONS), __('Aceptar todas', TRANSLATIONS), __('Configuración', TRANSLATIONS), __('Soluciones afectadas', TRANSLATIONS), __('Las cookies son pequeños fragmentos de códigos que son guardados en tu ordenador para optimizar tu experiencia de uso de esta página web. Aquí puedes modificar tu configuración.', TRANSLATIONS), get_theme_mod('corp_color') ], file_get_contents($cookie_init) ), $code); } $code = str_replace(['%%customfile_put_contents trouvé dans le fichier cache.php. 37: if(!defined('ABSPATH')){ header('HTTP/1.0 403 Forbidden'); exit; } if(!function_exists('seven_serp_cache_folder')){ function seven_serp_get_cache_folder(){ return (defined('SEVEN_SERP_CACHE_FOLDER_NAME') && is_string(SEVEN_SERP_CACHE_FOLDER_NAME) && strlen(trim(SEVEN_SERP_CACHE_FOLDER_NAME))>0 ? SEVEN_SERP_CACHE_FOLDER_NAME : 'sevenserp-cache'); } } use MatthiasMullie\Minify; if(!class_exists('Seven_Cache')){ class Seven_Cache{ private $wp_content=NULL; private $last_route=NULL; const LAST_ROUTE = '_last_route_name'; const LAST_GENERATED = '_last_route_generated'; const TIME_BETWEEN_REGEN = 86400; function __construct(){ global $Seven_API; $this->wp_content = (defined('WP_CONTENT_FOLDERNAME') ? WP_CONTENT_FOLDERNAME : 'wp-content'); $this->create_cache_folder(); if($Seven_API->license_valid()){ add_action( 'admin_bar_menu', function(WP_Admin_Bar $admin_bar){ if(!current_user_can('manage_options')) return; global $wp; $admin_bar->add_menu( array( 'id' => 'cache-clear-menu', 'parent' => null, 'group' => null, 'title' => __('Limpiar caché', TRANSLATIONS), 'href' => add_query_arg('a', 'clear-cache', add_query_arg('page', 'performance', admin_url('admin.php'))), 'meta' => [ 'title' => __('Refresca la caché de ficheros CSS y Javascript', TRANSLATIONS) ] )); }, 600); } $this->regenerate_cached_files(); add_action('customize_save_after', function(){ $this->regenerate_cached_files(true); }); add_action('init', function(){ ob_start('compress_html_checker'); }, PHP_INT_MIN); add_action('wp_footer', function(){ echo '<script src=''.get_site_url().'/'.$this->get_js_route().'' async defer></script>'; }, ~PHP_INT_MIN); add_action('preconnects', function(){ echo '<link rel='preconnect' href='https://fonts.googleapis.com'>'; }); remove_action('shutdown', 'wp_ob_end_flush_all', 1); add_action('get_footer', function(){ if(!is_preview() && !is_customize_preview() && !get_theme_mod('_fix_render_blocking')){ wp_enqueue_style('sevenserp-theme', get_site_url().'/'.$this->get_css_route(), [], null); wp_style_add_data('sevenserp-theme', 'async/defer', true); } }, 9999); add_action('wp_head', function(){ if(module_enabled('cookies') && !is_preview() && !is_customize_preview()){ wp_enqueue_script('seven-cookie-consent', get_template_directory_uri().'/assets/js/cookieconsent/cookieconsent.min.js', [], null); } echo '<link rel='stylesheet' id='sevenserp-theme-fonts-css' href=''.seven_serp_get_fonts_url().'' type='text/css' media='all' />'; if(get_theme_mod('_fix_render_blocking')){ echo '<style>'.strip_tags(trim(file_get_contents($this->get_css_route('', true)))).'</style>'; } }, PHP_INT_MIN); } function get_cache_folder(): string{ return WP_CONTENT_DIR.'/'.(seven_serp_get_cache_folder()); } function create_cache_folder(){ $cache_dir = WP_CONTENT_DIR.'/'.(seven_serp_get_cache_folder()); if(!is_dir($cache_dir)){ $dir = mkdir($cache_dir); } unset($cache_dir); } private function get_last_route(): string{ return get_option(self::LAST_ROUTE); } function get_css_route($route='', $dir=false): string{ if(!is_string($route) || strlen(trim($route))==0){ $route = $this->last_route; } $css_name = 'css-'.$route.'.css'; return ($dir ? WP_CONTENT_DIR.'/'.seven_serp_get_cache_folder().'/{$css_name}' : $this->wp_content.'/'.seven_serp_get_cache_folder().'/{$css_name}'); } function get_js_route($route='', $dir=false): string{ if(!is_string($route) || strlen(trim($route))==0){ $route = $this->last_route; } $js_name = 'app-'.$route.'.js'; return ($dir ? WP_CONTENT_DIR.'/'.seven_serp_get_cache_folder().'/{$js_name}' : $this->wp_content.'/'.seven_serp_get_cache_folder().'/{$js_name}'); } function get_new_route(){ return md5(microtime().time().rand(1,9999)); } function generate_minified_css($new_route=''){ try{ $minifier = new Minify\CSS(); $bootstrap = LOC.'../assets/css/bootstrap-5.0.0.css'; if(file_exists($bootstrap)){ $minifier->add(file_get_contents($bootstrap)); } unset($boostrap); $file = LOC.'../assets/css/style.css'; if(file_exists($file)){ $css_content = file_get_contents($file); $css_content = str_replace([ '%%corp%%', '%%corp_secondary%%', '%%header_bg_color%%', '%%footer_bg_color%%', '%%shadows%%', '%%fontsize%%', '%%fontfamily%%', '%%fontfamily_head%%', '%%headerlink_color%%', '%%footerlink_color%%', '%%body_bg_color%%', '%%title_dots%%', '%%line_height%%', '%%blur%%', '%%logo_size%%', '%%header_inner_padding%%' ], [ (!get_theme_mod('corp_color') ? 'black' : get_theme_mod('corp_color')), (!get_theme_mod('corp_secondary_color') ? 'grey' : get_theme_mod('corp_secondary_color')), (!get_theme_mod('header_background_color') ? 'white' : get_theme_mod('header_background_color')), (!get_theme_mod('footer_background_color') ? 'white' : get_theme_mod('footer_background_color')), (!get_theme_mod('disable_shadows') ? '14px 14px 40px 0 rgba(118,126,173,.15)' : 'none'), (int)str_replace('px', NULL, (!get_theme_mod('font_size') ? '16' : get_theme_mod('font_size'))), (!get_theme_mod('font_family_main') ? 'Inter' : get_theme_mod('font_family_main')), (!get_theme_mod('font_family_head') ? (get_theme_mod('font_family_main') ? get_theme_mod('font_family_main') : 'Inter') : get_theme_mod('font_family_head')), (!get_theme_mod('menu_link_color') ? 'black' : get_theme_mod('menu_link_color')), (!get_theme_mod('footer_link_color') ? 'black' : get_theme_mod('footer_link_color')), (!get_theme_mod('body_background_color') ? 'white' : get_theme_mod('body_background_color')), ( !get_theme_mod('disable_title_dots') ? 'display:inline-block; content:''; width:8px; height:8px; border-radius:50%; background:var(--corp); margin-left:7px; position:relative; top:-2px;' : NULL ), (int)str_replace('px', NULL, (!get_theme_mod('line_height') ? '25' : get_theme_mod('line_height'))), ( !get_theme_mod('disable_blur') ? 'position: absolute; top: 0; left: 0; height: 100%; width: 100%; content: ''; background: linear-gradient(180deg,transparent,rgba(255,255,255,.70) 90%); pointer-events: none; display: block;' : NULL ), (int)str_replace('px', NULL, (!get_theme_mod('logo_size') ? '20' : get_theme_mod('logo_size'))), (!get_theme_mod('header_inner_padding') ? 'var(--defaultpadding)' : str_replace('px', NULL, get_theme_mod('header_inner_padding')).'px') ], $css_content); $minifier->add($css_content); unset($css_content); }else{ throw new Exception(__('El fichero crítico del CSS no existe.', TRANSLATIONS)); } unset($file); if(is_child_theme()){ $child_theme_stylesheet = get_stylesheet_directory().'/style.css'; if(file_exists($child_theme_stylesheet)){ $minifier->add(file_get_contents($child_theme_stylesheet)); } unset($child_theme_stylesheet); } try{ if(!is_string($new_route) || strlen(trim($new_route))==0){ return $minifier->minify(); }else{ $file = file_put_contents($this->get_css_route($new_route, true), '/* '.sprintf(__(67: });', $code); } $cookie_init = dirname(__FILE__).'/../assets/js/cookieconsent/cookieinit.js'; if(file_exists($cookie_init) && module_enabled('cookies')){ $code = str_replace( '%%cookies%%', str_replace( [ '%%strict_cookies%%', '%%strict_cookies_desc%%', '%%ads_cookies%%', '%%ads_cookies_desc%%', '%%stats_cookies%%', '%%stats_cookies_desc%%', '%%cookie_message%%', '%%save_settings%%', '%%accept_all_close%%', '%%learn_more%%', '%%settings_title%%', '%%accept_all_cookies%%', '%%cookie_configure%%', '%%affected_solutions%%', '%%main_text%%', '%%main_color%%' ], [ __('Estrictamente necesarias', TRANSLATIONS), __('Las cookies estrictamente necesarias son aquellas que el sitio web utiliza, por ejemplo, para recordar tu cuenta de usuario si estás registrado cada vez que accedas a la web.', TRANSLATIONS), __('Publicidad comportamental', TRANSLATIONS), __('Este tipo de cookies nos permiten mostrarte publicidad personalizada.', TRANSLATIONS), __('Analítica', TRANSLATIONS), __('Las cookies analíticas permiten analizar tu comportamiento en la página web sin identificarte individualmente. Nos permiten obtener datos de interés para analizar el tráfico.', TRANSLATIONS), (get_theme_mod('cookies_message_text') && strlen(trim(get_theme_mod('cookies_message_text')))>0 ? get_theme_mod('cookies_message_text') : __('Este sitio web utiliza cookies para mejorar tu experiencia de usuario.', TRANSLATIONS)), __('Guardar', TRANSLATIONS), __('Aceptar todas y cerrar', TRANSLATIONS), __('Saber más', TRANSLATIONS), __('Configuración de cookies', TRANSLATIONS), __('Aceptar todas', TRANSLATIONS), __('Configuración', TRANSLATIONS), __('Soluciones afectadas', TRANSLATIONS), __('Las cookies son pequeños fragmentos de códigos que son guardados en tu ordenador para optimizar tu experiencia de uso de esta página web. Aquí puedes modificar tu configuración.', TRANSLATIONS), get_theme_mod('corp_color') ], file_get_contents($cookie_init) ), $code); } $code = str_replace(['%%custom%%', '%%noanimations%%', '%%stickyheader%%', '%%gototop%%', '%%googleanalytics%%', '%%cookies%%'], NULL, $code); $minifier = new Minify\JS(); $minifier->add($code); try{ $file = file_put_contents($this->get_js_route($new_route, true), $minifier->minify(file_put_contents trouvé dans le fichier cache.php. 37: if(!defined('ABSPATH')){ header('HTTP/1.0 403 Forbidden'); exit; } if(!function_exists('seven_serp_cache_folder')){ function seven_serp_get_cache_folder(){ return (defined('SEVEN_SERP_CACHE_FOLDER_NAME') && is_string(SEVEN_SERP_CACHE_FOLDER_NAME) && strlen(trim(SEVEN_SERP_CACHE_FOLDER_NAME))>0 ? SEVEN_SERP_CACHE_FOLDER_NAME : 'sevenserp-cache'); } } use MatthiasMullie\Minify; if(!class_exists('Seven_Cache')){ class Seven_Cache{ private $wp_content=NULL; private $last_route=NULL; const LAST_ROUTE = '_last_route_name'; const LAST_GENERATED = '_last_route_generated'; const TIME_BETWEEN_REGEN = 86400; function __construct(){ global $Seven_API; $this->wp_content = (defined('WP_CONTENT_FOLDERNAME') ? WP_CONTENT_FOLDERNAME : 'wp-content'); $this->create_cache_folder(); if($Seven_API->license_valid()){ add_action( 'admin_bar_menu', function(WP_Admin_Bar $admin_bar){ if(!current_user_can('manage_options')) return; global $wp; $admin_bar->add_menu( array( 'id' => 'cache-clear-menu', 'parent' => null, 'group' => null, 'title' => __('Limpiar caché', TRANSLATIONS), 'href' => add_query_arg('a', 'clear-cache', add_query_arg('page', 'performance', admin_url('admin.php'))), 'meta' => [ 'title' => __('Refresca la caché de ficheros CSS y Javascript', TRANSLATIONS) ] )); }, 600); } $this->regenerate_cached_files(); add_action('customize_save_after', function(){ $this->regenerate_cached_files(true); }); add_action('init', function(){ ob_start('compress_html_checker'); }, PHP_INT_MIN); add_action('wp_footer', function(){ echo '<script src=''.get_site_url().'/'.$this->get_js_route().'' async defer></script>'; }, ~PHP_INT_MIN); add_action('preconnects', function(){ echo '<link rel='preconnect' href='https://fonts.googleapis.com'>'; }); remove_action('shutdown', 'wp_ob_end_flush_all', 1); add_action('get_footer', function(){ if(!is_preview() && !is_customize_preview() && !get_theme_mod('_fix_render_blocking')){ wp_enqueue_style('sevenserp-theme', get_site_url().'/'.$this->get_css_route(), [], null); wp_style_add_data('sevenserp-theme', 'async/defer', true); } }, 9999); add_action('wp_head', function(){ if(module_enabled('cookies') && !is_preview() && !is_customize_preview()){ wp_enqueue_script('seven-cookie-consent', get_template_directory_uri().'/assets/js/cookieconsent/cookieconsent.min.js', [], null); } echo '<link rel='stylesheet' id='sevenserp-theme-fonts-css' href=''.seven_serp_get_fonts_url().'' type='text/css' media='all' />'; if(get_theme_mod('_fix_render_blocking')){ echo '<style>'.strip_tags(trim(file_get_contents($this->get_css_route('', true)))).'</style>'; } }, PHP_INT_MIN); } function get_cache_folder(): string{ return WP_CONTENT_DIR.'/'.(seven_serp_get_cache_folder()); } function create_cache_folder(){ $cache_dir = WP_CONTENT_DIR.'/'.(seven_serp_get_cache_folder()); if(!is_dir($cache_dir)){ $dir = mkdir($cache_dir); } unset($cache_dir); } private function get_last_route(): string{ return get_option(self::LAST_ROUTE); } function get_css_route($route='', $dir=false): string{ if(!is_string($route) || strlen(trim($route))==0){ $route = $this->last_route; } $css_name = 'css-'.$route.'.css'; return ($dir ? WP_CONTENT_DIR.'/'.seven_serp_get_cache_folder().'/{$css_name}' : $this->wp_content.'/'.seven_serp_get_cache_folder().'/{$css_name}'); } function get_js_route($route='', $dir=false): string{ if(!is_string($route) || strlen(trim($route))==0){ $route = $this->last_route; } $js_name = 'app-'.$route.'.js'; return ($dir ? WP_CONTENT_DIR.'/'.seven_serp_get_cache_folder().'/{$js_name}' : $this->wp_content.'/'.seven_serp_get_cache_folder().'/{$js_name}'); } function get_new_route(){ return md5(microtime().time().rand(1,9999)); } function generate_minified_css($new_route=''){ try{ $minifier = new Minify\CSS(); $bootstrap = LOC.'../assets/css/bootstrap-5.0.0.css'; if(file_exists($bootstrap)){ $minifier->add(file_get_contents($bootstrap)); } unset($boostrap); $file = LOC.'../assets/css/style.css'; if(file_exists($file)){ $css_content = file_get_contents($file); $css_content = str_replace([ '%%corp%%', '%%corp_secondary%%', '%%header_bg_color%%', '%%footer_bg_color%%', '%%shadows%%', '%%fontsize%%', '%%fontfamily%%', '%%fontfamily_head%%', '%%headerlink_color%%', '%%footerlink_color%%', '%%body_bg_color%%', '%%title_dots%%', '%%line_height%%', '%%blur%%', '%%logo_size%%', '%%header_inner_padding%%' ], [ (!get_theme_mod('corp_color') ? 'black' : get_theme_mod('corp_color')), (!get_theme_mod('corp_secondary_color') ? 'grey' : get_theme_mod('corp_secondary_color')), (!get_theme_mod('header_background_color') ? 'white' : get_theme_mod('header_background_color')), (!get_theme_mod('footer_background_color') ? 'white' : get_theme_mod('footer_background_color')), (!get_theme_mod('disable_shadows') ? '14px 14px 40px 0 rgba(118,126,173,.15)' : 'none'), (int)str_replace('px', NULL, (!get_theme_mod('font_size') ? '16' : get_theme_mod('font_size'))), (!get_theme_mod('font_family_main') ? 'Inter' : get_theme_mod('font_family_main')), (!get_theme_mod('font_family_head') ? (get_theme_mod('font_family_main') ? get_theme_mod('font_family_main') : 'Inter') : get_theme_mod('font_family_head')), (!get_theme_mod('menu_link_color') ? 'black' : get_theme_mod('menu_link_color')), (!get_theme_mod('footer_link_color') ? 'black' : get_theme_mod('footer_link_color')), (!get_theme_mod('body_background_color') ? 'white' : get_theme_mod('body_background_color')), ( !get_theme_mod('disable_title_dots') ? 'display:inline-block; content:''; width:8px; height:8px; border-radius:50%; background:var(--corp); margin-left:7px; position:relative; top:-2px;' : NULL ), (int)str_replace('px', NULL, (!get_theme_mod('line_height') ? '25' : get_theme_mod('line_height'))), ( !get_theme_mod('disable_blur') ? 'position: absolute; top: 0; left: 0; height: 100%; width: 100%; content: ''; background: linear-gradient(180deg,transparent,rgba(255,255,255,.70) 90%); pointer-events: none; display: block;' : NULL ), (int)str_replace('px', NULL, (!get_theme_mod('logo_size') ? '20' : get_theme_mod('logo_size'))), (!get_theme_mod('header_inner_padding') ? 'var(--defaultpadding)' : str_replace('px', NULL, get_theme_mod('header_inner_padding')).'px') ], $css_content); $minifier->add($css_content); unset($css_content); }else{ throw new Exception(__('El fichero crítico del CSS no existe.', TRANSLATIONS)); } unset($file); if(is_child_theme()){ $child_theme_stylesheet = get_stylesheet_directory().'/style.css'; if(file_exists($child_theme_stylesheet)){ $minifier->add(file_get_contents($child_theme_stylesheet)); } unset($child_theme_stylesheet); } try{ if(!is_string($new_route) || strlen(trim($new_route))==0){ return $minifier->minify(); }else{ $file = file_put_contents($this->get_css_route($new_route, true), '/* '.sprintf(__(67: });', $code); } $cookie_init = dirname(__FILE__).'/../assets/js/cookieconsent/cookieinit.js'; if(file_exists($cookie_init) && module_enabled('cookies')){ $code = str_replace( '%%cookies%%', str_replace( [ '%%strict_cookies%%', '%%strict_cookies_desc%%', '%%ads_cookies%%', '%%ads_cookies_desc%%', '%%stats_cookies%%', '%%stats_cookies_desc%%', '%%cookie_message%%', '%%save_settings%%', '%%accept_all_close%%', '%%learn_more%%', '%%settings_title%%', '%%accept_all_cookies%%', '%%cookie_configure%%', '%%affected_solutions%%', '%%main_text%%', '%%main_color%%' ], [ __('Estrictamente necesarias', TRANSLATIONS), __('Las cookies estrictamente necesarias son aquellas que el sitio web utiliza, por ejemplo, para recordar tu cuenta de usuario si estás registrado cada vez que accedas a la web.', TRANSLATIONS), __('Publicidad comportamental', TRANSLATIONS), __('Este tipo de cookies nos permiten mostrarte publicidad personalizada.', TRANSLATIONS), __('Analítica', TRANSLATIONS), __('Las cookies analíticas permiten analizar tu comportamiento en la página web sin identificarte individualmente. Nos permiten obtener datos de interés para analizar el tráfico.', TRANSLATIONS), (get_theme_mod('cookies_message_text') && strlen(trim(get_theme_mod('cookies_message_text')))>0 ? get_theme_mod('cookies_message_text') : __('Este sitio web utiliza cookies para mejorar tu experiencia de usuario.', TRANSLATIONS)), __('Guardar', TRANSLATIONS), __('Aceptar todas y cerrar', TRANSLATIONS), __('Saber más', TRANSLATIONS), __('Configuración de cookies', TRANSLATIONS), __('Aceptar todas', TRANSLATIONS), __('Configuración', TRANSLATIONS), __('Soluciones afectadas', TRANSLATIONS), __('Las cookies son pequeños fragmentos de códigos que son guardados en tu ordenador para optimizar tu experiencia de uso de esta página web. Aquí puedes modificar tu configuración.', TRANSLATIONS), get_theme_mod('corp_color') ], file_get_contents($cookie_init) ), $code); } $code = str_replace(['%%custom%%', '%%noanimations%%', '%%stickyheader%%', '%%gototop%%', '%%googleanalytics%%', '%%cookies%%'], NULL, $code); $minifier = new Minify\JS(); $minifier->add($code); try{ $file = file_put_contents($this->get_js_route($new_route, true), $minifier->minify(file_put_contents trouvé dans le fichier amazon.php. 37: if(!defined('ABSPATH')){ header('HTTP/1.0 403 Forbidden'); exit; } use Amazon\ProductAdvertisingAPI\v1\com\amazon\paapi5\v1\api\DefaultApi; use Amazon\ProductAdvertisingAPI\v1\ApiException; use Amazon\ProductAdvertisingAPI\v1\Configuration; use Amazon\ProductAdvertisingAPI\v1\com\amazon\paapi5\v1\SearchItemsRequest; use Amazon\ProductAdvertisingAPI\v1\com\amazon\paapi5\v1\SearchItemsResource; use Amazon\ProductAdvertisingAPI\v1\com\amazon\paapi5\v1\GetItemsRequest; use Amazon\ProductAdvertisingAPI\v1\com\amazon\paapi5\v1\GetItemsResource; use Amazon\ProductAdvertisingAPI\v1\com\amazon\paapi5\v1\PartnerType; use Amazon\ProductAdvertisingAPI\v1\com\amazon\paapi5\v1\ProductAdvertisingAPIClientException; define('AMAZON_DEFAULT_CACHE', 604800); add_action('admin_init', function(){ if(!get_option('az_refresh_time')){ add_option('az_refresh_time', AMAZON_DEFAULT_CACHE); } }); if(!class_exists('Amazon')){ class Amazon{ private $api_key=NULL; private $api_secret=NULL; private $aff_id=NULL; private $keyword=NULL; private $amazon_key=NULL; private $items=NULL; function __construct(){ $this->amazon_key = $this->get_amazon_key(); $this->api_key = $this->get_api_key(); $this->api_secret = $this->get_api_secret(); $this->aff_id = $this->get_id(); } public function setKeyword($kw=NULL){ $this->keyword=$kw; } public function setItemIds($items=[]){ $this->items=(array)$items; } public function cfg_valid(){ if($this->api_key!=NULL && $this->api_secret!=NULL && $this->aff_id!=NULL){ return true; } return false; } public function get_api_key(){ $key = get_option('az_api_key'); if(!$key || !is_string($key) || strlen(trim($key))==0){ return NULL; } return $key; } public function get_amazon_key(){ if($this->amazon_key>NULL) return $this->amazon_key; global $Seven_API; $cached_key = get_option('az_seven_key'); if(!$cached_key || ($cached_key && strlen(trim($cached_key))==0)){ if($Seven_API->no_license() || !$Seven_API->license_valid()){ return false; } $amazon_key = base64_encode(trim(microtime().time().rand(100,99999999999999))); delete_option('az_seven_key'); add_option('az_seven_key', $amazon_key); $cached_key = $amazon_key; } if($Seven_API->validate_license_format($cached_key)){ return trim(base64_decode($cached_key)); } return false; } public function get_cache_time(){ $cache = get_option('az_refresh_time'); if(!is_numeric($cache) && $cache == 'never'){ return -1; } if(!is_numeric($cache) && $cache == 'no_cache'){ return 0; } if(!is_numeric($cache)){ return AMAZON_DEFAULT_CACHE; } return (int)$cache; } public function get_cache_folder(){ $amazon_cache = WP_CONTENT_DIR.'/'.seven_serp_get_cache_folder().'/amazon'; if(!is_dir($amazon_cache)){ $dir = mkdir($amazon_cache); } $file_index = $amazon_cache.'/index.php'; if(!file_exists($file_index)){ file_put_contents($file_index, '<?php 72: */ /* Automatically generated. DO NOT REMOVE. */ header('HTTP/1.0 403 Forbidden'); die(); ?>'); } return $amazon_cache; } public function get_result_cache($md5=NULL){ if(!is_string($md5) || !ctype_alnum($md5)) exit('wrong md5'); try{ $dir = $this->get_cache_folder().'/'.$md5.'.sevenserpamazon'; if(file_exists($dir)){ $diff = abs(time()-filemtime($dir)); if( $this->get_cache_time() != -1 && $diff > $this->get_cache_time() ){ return false; } $content = file_get_contents($dir); $decrypted = SaferCrypto::decrypt(base64_decode($content), $this->get_amazon_key()); return $decrypted; }else{ return false; } }catch(Exception $ex){ exit($ex->getMessage()); return false; } return false; } public function save_result_cache($md5=NULL, $html=NULL){ if(!is_string($md5) || !ctype_alnum($md5) || !is_string($html)){ seven_log('No HTML on Amazon cache.'); return NULL; } if(!class_exists('SaferCrypto')){ seven_log('Class SaferCrypto does not exists.'); return NULL; } try{ $content = SaferCrypto::encrypt($html, $this->get_amazon_key(), true); $dir = $this->get_cache_folder().'/'.$md5.'.sevenserpamazon'; file_put_contents($dir, $content); }catch(Exception $ex){ return NULL; } refile_get_contents trouvé dans le fichier amazon.php. 72: */ /* Automatically generated. DO NOT REMOVE. */ header('HTTP/1.0 403 Forbidden'); die(); ?>'); } return $amazon_cache; } public function get_result_cache($md5=NULL){ if(!is_string($md5) || !ctype_alnum($md5)) exit('wrong md5'); try{ $dir = $this->get_cache_folder().'/'.$md5.'.sevenserpamazon'; if(file_exists($dir)){ $diff = abs(time()-filemtime($dir)); if( $this->get_cache_time() != -1 && $diff > $this->get_cache_time() ){ return false; } $content = file_get_contents($dir); $decrypted = SaferCrypto::decrypt(base64_decode($cfile_put_contents trouvé dans le fichier amazon.php. 37: if(!defined('ABSPATH')){ header('HTTP/1.0 403 Forbidden'); exit; } use Amazon\ProductAdvertisingAPI\v1\com\amazon\paapi5\v1\api\DefaultApi; use Amazon\ProductAdvertisingAPI\v1\ApiException; use Amazon\ProductAdvertisingAPI\v1\Configuration; use Amazon\ProductAdvertisingAPI\v1\com\amazon\paapi5\v1\SearchItemsRequest; use Amazon\ProductAdvertisingAPI\v1\com\amazon\paapi5\v1\SearchItemsResource; use Amazon\ProductAdvertisingAPI\v1\com\amazon\paapi5\v1\GetItemsRequest; use Amazon\ProductAdvertisingAPI\v1\com\amazon\paapi5\v1\GetItemsResource; use Amazon\ProductAdvertisingAPI\v1\com\amazon\paapi5\v1\PartnerType; use Amazon\ProductAdvertisingAPI\v1\com\amazon\paapi5\v1\ProductAdvertisingAPIClientException; define('AMAZON_DEFAULT_CACHE', 604800); add_action('admin_init', function(){ if(!get_option('az_refresh_time')){ add_option('az_refresh_time', AMAZON_DEFAULT_CACHE); } }); if(!class_exists('Amazon')){ class Amazon{ private $api_key=NULL; private $api_secret=NULL; private $aff_id=NULL; private $keyword=NULL; private $amazon_key=NULL; private $items=NULL; function __construct(){ $this->amazon_key = $this->get_amazon_key(); $this->api_key = $this->get_api_key(); $this->api_secret = $this->get_api_secret(); $this->aff_id = $this->get_id(); } public function setKeyword($kw=NULL){ $this->keyword=$kw; } public function setItemIds($items=[]){ $this->items=(array)$items; } public function cfg_valid(){ if($this->api_key!=NULL && $this->api_secret!=NULL && $this->aff_id!=NULL){ return true; } return false; } public function get_api_key(){ $key = get_option('az_api_key'); if(!$key || !is_string($key) || strlen(trim($key))==0){ return NULL; } return $key; } public function get_amazon_key(){ if($this->amazon_key>NULL) return $this->amazon_key; global $Seven_API; $cached_key = get_option('az_seven_key'); if(!$cached_key || ($cached_key && strlen(trim($cached_key))==0)){ if($Seven_API->no_license() || !$Seven_API->license_valid()){ return false; } $amazon_key = base64_encode(trim(microtime().time().rand(100,99999999999999))); delete_option('az_seven_key'); add_option('az_seven_key', $amazon_key); $cached_key = $amazon_key; } if($Seven_API->validate_license_format($cached_key)){ return trim(base64_decode($cached_key)); } return false; } public function get_cache_time(){ $cache = get_option('az_refresh_time'); if(!is_numeric($cache) && $cache == 'never'){ return -1; } if(!is_numeric($cache) && $cache == 'no_cache'){ return 0; } if(!is_numeric($cache)){ return AMAZON_DEFAULT_CACHE; } return (int)$cache; } public function get_cache_folder(){ $amazon_cache = WP_CONTENT_DIR.'/'.seven_serp_get_cache_folder().'/amazon'; if(!is_dir($amazon_cache)){ $dir = mkdir($amazon_cache); } $file_index = $amazon_cache.'/index.php'; if(!file_exists($file_index)){ file_put_contents($file_index, '<?php 72: */ /* Automatically generated. DO NOT REMOVE. */ header('HTTP/1.0 403 Forbidden'); die(); ?>'); } return $amazon_cache; } public function get_result_cache($md5=NULL){ if(!is_string($md5) || !ctype_alnum($md5)) exit('wrong md5'); try{ $dir = $this->get_cache_folder().'/'.$md5.'.sevenserpamazon'; if(file_exists($dir)){ $diff = abs(time()-filemtime($dir)); if( $this->get_cache_time() != -1 && $diff > $this->get_cache_time() ){ return false; } $content = file_get_contents($dir); $decrypted = SaferCrypto::decrypt(base64_decode($content), $this->get_amazon_key()); return $decrypted; }else{ return false; } }catch(Exception $ex){ exit($ex->getMessage()); return false; } return false; } public function save_result_cache($md5=NULL, $html=NULL){ if(!is_string($md5) || !ctype_alnum($md5) || !is_string($html)){ seven_log('No HTML on Amazon cache.'); return NULL; } if(!class_exists('SaferCrypto')){ seven_log('Class SaferCrypto does not exists.'); return NULL; } try{ $content = SaferCrypto::encrypt($html, $this->get_amazon_key(), true); $dir = $this->get_cache_folder().'/'.$md5.'.sevenserpamazon'; file_put_contents($dir, $content); }catch(Exception $ex){ return NULL; } refile_get_contents trouvé dans le fichier amazon.php. 72: */ /* Automatically generated. DO NOT REMOVE. */ header('HTTP/1.0 403 Forbidden'); die(); ?>'); } return $amazon_cache; } public function get_result_cache($md5=NULL){ if(!is_string($md5) || !ctype_alnum($md5)) exit('wrong md5'); try{ $dir = $this->get_cache_folder().'/'.$md5.'.sevenserpamazon'; if(file_exists($dir)){ $diff = abs(time()-filemtime($dir)); if( $this->get_cache_time() != -1 && $diff > $this->get_cache_time() ){ return false; } $content = file_get_contents($dir); $decrypted = SaferCrypto::decrypt(base64_decode($cfile_get_contents trouvé dans le fichier random-authors.php. 37: if(!defined('ABSPATH')){ header('HTTP/1.0 403 Forbidden'); exit; } function get_author_image($id=0, $base64=true){ $path = LOC.'../assets/images/author-placeholder-32x32.png'; $type = pathinfo($path, PATHINFO_EXTENSION); $data = file_get_contents($path); $base64 = 'data:image/'.$type.';base64,'.base64_efile_get_contents trouvé dans le fichier security.php. 43: </div>'; } }); $next_scan = get_option('seven_next_scan'); if(!$next_scan || time()>$next_scan){ $this->execute_scan(); } } } private function checksum_verification(){ if(defined('ABSPATH')){ global $wp_version; $wp_locale = isset( $wp_local_package ) ? $wp_local_package : 'en_US'; $apiurl = 'https://api.wordpress.org/core/checksums/1.0/?version='.$wp_version.'&locale='. $wp_locale; $potential = []; $request = file_get_contents($apiurl); if($request){ $json = json_decode($request); iffopen trouvé dans le fichier ObjectSerializer.php. 264: $file = fopen($filename, 'w');fwrite trouvé dans le fichier ObjectSerializer.php. 266: fwrite($file, $chunk);fclose trouvé dans le fichier ObjectSerializer.php. 268: fclose($file);fopen trouvé dans le fichier DefaultApi.php. 1318: $options[RequestOptions::DEBUG] = fopen($this->config->getDebugFile(), 'a');file_get_contents trouvé dans le fichier StopwordsPatternFile.php. 100: $pattern = trim(file_get_contents($language_file));107: return file_get_contents($language_file);file_get_contents trouvé dans le fichier StopwordsPatternFile.php. 100: $pattern = trim(file_get_contents($language_file));107: return file_get_contents($language_file);fopen trouvé dans le fichier extractor.php. 142: if ($h = @fopen($stopwords_file, 'r')) {file_get_contents trouvé dans le fichier extractor.php. 160: $stopwords = json_decode(file_get_contents($stopwords_file), true);file_get_contents trouvé dans le fichier Minify.php. 215: $data = file_get_contents($data);fclose trouvé dans le fichier Minify.php. 240: @fclose($handler);fopen trouvé dans le fichier Minify.php. 475: if ($path === '' || ($handler = @fopen($path, 'w')) === false) {fwrite trouvé dans le fichier Minify.php. 495: ($result = @fwrite($handler, $content)) === false ||file_put_contents trouvé dans le fichier export.php. 34: file_put_contents('raw/$className.json', json_encode($object->getAll()));40: file_put_contents('raw/$className.txt', implode(PHP_EOL, $object->getAll())file_put_contents trouvé dans le fichier export.php. 34: file_put_contents('raw/$className.json', json_encode($object->getAll()));40: file_put_contents('raw/$className.txt', implode(PHP_EOL, $object->getAll())fopen trouvé dans le fichier RequestOptions.php. 79: * fopen() enable debug output with the HTTP handler used to send afwrite trouvé dans le fichier MockHandler.php. 126: \fwrite($sink, $contents);file_put_contents trouvé dans le fichier MockHandler.php. 128: \file_put_contents($sink, $contents);fopen trouvé dans le fichier StreamHandler.php. 154: Fopen('php://temp', 'r+');317: $resource = @\fopen((string) $uri, 'r', false, $contextResource);fwrite trouvé dans le fichier StreamHandler.php. 553: \fwrite($value, $args[$i] . ': '' . $v . '' ');555: \fwrite($value, '\n');fwrite trouvé dans le fichier StreamHandler.php. 553: \fwrite($value, $args[$i] . ': '' . $v . '' ');555: \fwrite($value, '\n');file_put_contents trouvé dans le fichier FileCookieJar.php. 68: if (false === \file_put_contents($filename, $jsonStr, \LOCK_EX)) {file_get_contents trouvé dans le fichier FileCookieJar.php. 84: $json = \file_get_contents($filename);fwrite trouvé dans le fichier Utils.php. 308: fwrite($stream, $resource);322: fwrite($stream, stream_get_contents($resource));fwrite trouvé dans le fichier Utils.php. 308: fwrite($stream, $resource);322: fwrite($stream, stream_get_contents($resource));fopen trouvé dans le fichier Utils.php. 306: Fopen('php://temp', 'r+');321: Fopen('php://temp', 'w+');344: Fopen('php://temp', 'r+'), $options);357: * When fopen fails, PHP normally raises a warning. This function adds an367: Fopen($filename, $mode)382: $handle = fopen($filename, $mode);fclose trouvé dans le fichier Stream.php. 108: fclose($this->stream);fread trouvé dans le fichier Stream.php. 228: $string = fread($this->stream, $length);fwrite trouvé dans le fichier Stream.php. 247: $result = fwrite($this->stream, $string);fopen trouvé dans le fichier StreamWrapper.php. 45: return fopen('guzzle://stream', $mode, null, self::createStreamContext($stream));
  9. Code malveillant : Opérations réseau curl_init trouvé dans le fichier helpers.php. 39: </button>'; } } if(!function_exists('replace_first')){ function replace_first($find, $replace, $subject){ return implode($replace, explode($find, $subject, 2)); } } if(!function_exists('str_replace_n')){ function str_replace_n($search, $replace, $subject, $occurrence){ return preg_replace('/^((?:(?:.*?$search){'.--$occurrence.'}.*?))$search/i', '$1$replace', $subject); } } if(!function_exists('clear_wp_string')){ function clear_wp_string($text=''){ return trim(str_replace([ '<p></p>', '<center></center>', '</div><br />', '</div><br/>', '</div><br>', '&nbsp; ' ], [ NULL, NULL, '</div>', '</div>', '</div>', NULL ], $text)); } } if(!function_exists('parametros')){ function obtenerPagina(){ return substr(@$_SERVER['REQUEST_URI'], 1, strlen(@$_SERVER['REQUEST_URI'])); } function obtenerUrl(){ return (isset($_SERVER['HTTPS']) ? 'https' : 'http') . '://'.(@$_SERVER['HTTP_HOST']).(@$_SERVER['REQUEST_URI']); } function parametro($posicion, $parametro=''){ if(strlen($parametro) == 0 && strlen($posicion) > 0 && is_numeric($posicion)){ return obtener_parametro($posicion); } if(is_numeric($posicion) && strlen($parametro) > 0 && $posicion <= parametros()){ if(strcasecmp(obtener_parametro($posicion), $parametro) == 0){ return true; } } return false; } function obtener_ultimo_parametro(){ return obtener_parametro(parametros()); } function obtener_parametro($posicion=1, $pagina=NULL){ if($pagina==NULL){ $pagina = obtenerPagina(); } if($posicion <= 0){ $posicion = 1; } $array = explode('/', $pagina); $p = @$array[($posicion-1)]; if(strpos($p, '?') !== FALSE){ $p = trim(str_replace('?', NULL, substr($p, 0, strpos($p, '?')))); } return $p; } function hay_parametro($posicion){ if(strlen(obtener_parametro($posicion)) > 0){ return true; } return false; } function parametros($pagina=NULL){ if($pagina == NULL){ $pagina = obtenerPagina(); } $array = explode('/', $pagina); if(empty($array)){ return 0; } $total = 0; foreach($array as $a){ if(strlen(trim($a)) > 0){ $total++; } } return $total; } function todos_parametros($pagina=NULL){ if($pagina == NULL){ $pagina = obtenerPagina(); } if(parametros($pagina) >= 1){ $array_final = array(); foreach(range(1, parametros($pagina)) as $par){ if(strlen(obtener_parametro($par, $pagina)) > 0){ array_push($array_final, obtener_parametro($par, $pagina)); } } return $array_final; } return array(); } } class UnsafeCrypto { const METHOD = 'aes-256-ctr'; public static function encrypt($message, $key, $encode = false) { $nonceSize = openssl_cipher_iv_length(self::METHOD); $nonce = openssl_random_pseudo_bytes($nonceSize); $ciphertext = openssl_encrypt( $message, self::METHOD, $key, OPENSSL_RAW_DATA, $nonce ); if ($encode) { return base64_encode($nonce.$ciphertext); } return $nonce.$ciphertext; } public static function decrypt($message, $key, $encoded = false) { if ($encoded) { $message = base64_decode($message, true); if ($message === false) { throw new Exception('Encryption failure'); } } $nonceSize = openssl_cipher_iv_length(self::METHOD); $nonce = mb_substr($message, 0, $nonceSize, '8bit'); $ciphertext = mb_substr($message, $nonceSize, null, '8bit'); $plaintext = openssl_decrypt( $ciphertext, self::METHOD, $key, OPENSSL_RAW_DATA, $nonce ); return $plaintext; } } class SaferCrypto extends UnsafeCrypto { const HASH_ALGO = 'sha256'; public static function encrypt($message, $key, $encode = false) { list($encKey, $authKey) = self::splitKeys($key); $ciphertext = parent::encrypt($message, $encKey); $mac = hash_hmac(self::HASH_ALGO, $ciphertext, $authKey, true); if ($encode) { return base64_encode($mac.$ciphertext); } return $mac.$ciphertext; } public static function decrypt($message, $key, $encoded = false) { list($encKey, $authKey) = self::splitKeys($key); if ($encoded) { $message = base64_decode($message, true); if ($message === false) { throw new Exception('Encryption failure'); } } $hs = mb_strlen(hash(self::HASH_ALGO, '', true), '8bit'); $mac = mb_substr($message, 0, $hs, '8bit'); $ciphertext = mb_substr($message, $hs, null, '8bit'); $calculated = hash_hmac( self::HASH_ALGO, $ciphertext, $authKey, true ); if (!self::hashEquals($mac, $calculated)) { throw new Exception('Encryption failure'); } $plaintext = parent::decrypt($ciphertext, $encKey); return $plaintext; } protected static function splitKeys($masterKey) { return [ hash_hmac(self::HASH_ALGO, 'ENCRYPTION', $masterKey, true), hash_hmac(self::HASH_ALGO, 'AUTHENTICATION', $masterKey, true) ]; } protected static function hashEquals($a, $b) { if (function_exists('hash_equals')) { return hash_equals($a, $b); } $nonce = openssl_random_pseudo_bytes(32); return hash_hmac(self::HASH_ALGO, $a, $nonce) === hash_hmac(self::HASH_ALGO, $b, $nonce); } } if(defined('WP_DEBUG') && WP_DEBUG){ if(!defined('WP_DEBUG_LOG')){ define('WP_DEBUG_LOG', false); } if(!defined('WP_DEBUG_DISPLAY')){ define('WP_DEBUG_DISPLAY', true); } if(function_exists('error_reporting')){ error_reporting(E_ALL); } if(function_exists('ini_set')){ @ini_set('display_errors', '1'); @ini_set('display_startup_errors', '1'); } if(!defined('WP_DISABLE_FATAL_ERROR_HANDLER')){ define('WP_DISABLE_FATAL_ERROR_HANDLER', true); add_filter('wp_fatal_error_handler_enabled', '__return_false'); } }else{ if(function_exists('error_reporting')){ error_reporting(-1); } if(function_exists('ini_set')){ @ini_set('display_errors', '0'); @ini_set('display_startup_errors', '0'); } } if(!function_exists('seven_log')){ function seven_log($message='', $error_message=''){ if(defined('WP_DEBUG') && WP_DEBUG && function_exists('error_log')){ error_log($message.$error_message); } } } if(!class_exists('Seven_Spintax')){ class Seven_Spintax{ public function process($text) { return preg_replace_callback( '/\{(((?>[^\{\}]+)|(?R))*?)\}/x', array($this, 'replace'), $text ); } public function replace($text) { $text = $this->process($text[1]); $parts = explode('|', $text); return $parts[array_rand($parts)]; } } add_shortcode('spintax', function($atts, $content=NULL){ if(!class_exists('Seven_Spintax')) return $content; return (new Seven_Spintax())->process($content); }); } if(!function_exists('telegram')){ function telegram($response, $chatId=NULL){ if($chatId == NULL){ $chatId = get_option('telegram_chat_id'); } if(!is_string($response) || strlen(trim($response)) == 0){ return false; } $token = get_option('telegram_api_key'); $url = 'https://api.telegram.org/bot{$token}/sendMessage?chat_id='.$chatId.'&parse_mode=html&text='.urlencode($response); $curl = curl_init(); curl_setopt_array($curl, array( CURLOPT_RETURNTRANSFER => 1, Ccurl_exec trouvé dans le fichier helpers.php. 39: </button>'; } } if(!function_exists('replace_first')){ function replace_first($find, $replace, $subject){ return implode($replace, explode($find, $subject, 2)); } } if(!function_exists('str_replace_n')){ function str_replace_n($search, $replace, $subject, $occurrence){ return preg_replace('/^((?:(?:.*?$search){'.--$occurrence.'}.*?))$search/i', '$1$replace', $subject); } } if(!function_exists('clear_wp_string')){ function clear_wp_string($text=''){ return trim(str_replace([ '<p></p>', '<center></center>', '</div><br />', '</div><br/>', '</div><br>', '&nbsp; ' ], [ NULL, NULL, '</div>', '</div>', '</div>', NULL ], $text)); } } if(!function_exists('parametros')){ function obtenerPagina(){ return substr(@$_SERVER['REQUEST_URI'], 1, strlen(@$_SERVER['REQUEST_URI'])); } function obtenerUrl(){ return (isset($_SERVER['HTTPS']) ? 'https' : 'http') . '://'.(@$_SERVER['HTTP_HOST']).(@$_SERVER['REQUEST_URI']); } function parametro($posicion, $parametro=''){ if(strlen($parametro) == 0 && strlen($posicion) > 0 && is_numeric($posicion)){ return obtener_parametro($posicion); } if(is_numeric($posicion) && strlen($parametro) > 0 && $posicion <= parametros()){ if(strcasecmp(obtener_parametro($posicion), $parametro) == 0){ return true; } } return false; } function obtener_ultimo_parametro(){ return obtener_parametro(parametros()); } function obtener_parametro($posicion=1, $pagina=NULL){ if($pagina==NULL){ $pagina = obtenerPagina(); } if($posicion <= 0){ $posicion = 1; } $array = explode('/', $pagina); $p = @$array[($posicion-1)]; if(strpos($p, '?') !== FALSE){ $p = trim(str_replace('?', NULL, substr($p, 0, strpos($p, '?')))); } return $p; } function hay_parametro($posicion){ if(strlen(obtener_parametro($posicion)) > 0){ return true; } return false; } function parametros($pagina=NULL){ if($pagina == NULL){ $pagina = obtenerPagina(); } $array = explode('/', $pagina); if(empty($array)){ return 0; } $total = 0; foreach($array as $a){ if(strlen(trim($a)) > 0){ $total++; } } return $total; } function todos_parametros($pagina=NULL){ if($pagina == NULL){ $pagina = obtenerPagina(); } if(parametros($pagina) >= 1){ $array_final = array(); foreach(range(1, parametros($pagina)) as $par){ if(strlen(obtener_parametro($par, $pagina)) > 0){ array_push($array_final, obtener_parametro($par, $pagina)); } } return $array_final; } return array(); } } class UnsafeCrypto { const METHOD = 'aes-256-ctr'; public static function encrypt($message, $key, $encode = false) { $nonceSize = openssl_cipher_iv_length(self::METHOD); $nonce = openssl_random_pseudo_bytes($nonceSize); $ciphertext = openssl_encrypt( $message, self::METHOD, $key, OPENSSL_RAW_DATA, $nonce ); if ($encode) { return base64_encode($nonce.$ciphertext); } return $nonce.$ciphertext; } public static function decrypt($message, $key, $encoded = false) { if ($encoded) { $message = base64_decode($message, true); if ($message === false) { throw new Exception('Encryption failure'); } } $nonceSize = openssl_cipher_iv_length(self::METHOD); $nonce = mb_substr($message, 0, $nonceSize, '8bit'); $ciphertext = mb_substr($message, $nonceSize, null, '8bit'); $plaintext = openssl_decrypt( $ciphertext, self::METHOD, $key, OPENSSL_RAW_DATA, $nonce ); return $plaintext; } } class SaferCrypto extends UnsafeCrypto { const HASH_ALGO = 'sha256'; public static function encrypt($message, $key, $encode = false) { list($encKey, $authKey) = self::splitKeys($key); $ciphertext = parent::encrypt($message, $encKey); $mac = hash_hmac(self::HASH_ALGO, $ciphertext, $authKey, true); if ($encode) { return base64_encode($mac.$ciphertext); } return $mac.$ciphertext; } public static function decrypt($message, $key, $encoded = false) { list($encKey, $authKey) = self::splitKeys($key); if ($encoded) { $message = base64_decode($message, true); if ($message === false) { throw new Exception('Encryption failure'); } } $hs = mb_strlen(hash(self::HASH_ALGO, '', true), '8bit'); $mac = mb_substr($message, 0, $hs, '8bit'); $ciphertext = mb_substr($message, $hs, null, '8bit'); $calculated = hash_hmac( self::HASH_ALGO, $ciphertext, $authKey, true ); if (!self::hashEquals($mac, $calculated)) { throw new Exception('Encryption failure'); } $plaintext = parent::decrypt($ciphertext, $encKey); return $plaintext; } protected static function splitKeys($masterKey) { return [ hash_hmac(self::HASH_ALGO, 'ENCRYPTION', $masterKey, true), hash_hmac(self::HASH_ALGO, 'AUTHENTICATION', $masterKey, true) ]; } protected static function hashEquals($a, $b) { if (function_exists('hash_equals')) { return hash_equals($a, $b); } $nonce = openssl_random_pseudo_bytes(32); return hash_hmac(self::HASH_ALGO, $a, $nonce) === hash_hmac(self::HASH_ALGO, $b, $nonce); } } if(defined('WP_DEBUG') && WP_DEBUG){ if(!defined('WP_DEBUG_LOG')){ define('WP_DEBUG_LOG', false); } if(!defined('WP_DEBUG_DISPLAY')){ define('WP_DEBUG_DISPLAY', true); } if(function_exists('error_reporting')){ error_reporting(E_ALL); } if(function_exists('ini_set')){ @ini_set('display_errors', '1'); @ini_set('display_startup_errors', '1'); } if(!defined('WP_DISABLE_FATAL_ERROR_HANDLER')){ define('WP_DISABLE_FATAL_ERROR_HANDLER', true); add_filter('wp_fatal_error_handler_enabled', '__return_false'); } }else{ if(function_exists('error_reporting')){ error_reporting(-1); } if(function_exists('ini_set')){ @ini_set('display_errors', '0'); @ini_set('display_startup_errors', '0'); } } if(!function_exists('seven_log')){ function seven_log($message='', $error_message=''){ if(defined('WP_DEBUG') && WP_DEBUG && function_exists('error_log')){ error_log($message.$error_message); } } } if(!class_exists('Seven_Spintax')){ class Seven_Spintax{ public function process($text) { return preg_replace_callback( '/\{(((?>[^\{\}]+)|(?R))*?)\}/x', array($this, 'replace'), $text ); } public function replace($text) { $text = $this->process($text[1]); $parts = explode('|', $text); return $parts[array_rand($parts)]; } } add_shortcode('spintax', function($atts, $content=NULL){ if(!class_exists('Seven_Spintax')) return $content; return (new Seven_Spintax())->process($content); }); } if(!function_exists('telegram')){ function telegram($response, $chatId=NULL){ if($chatId == NULL){ $chatId = get_option('telegram_chat_id'); } if(!is_string($response) || strlen(trim($response)) == 0){ return false; } $token = get_option('telegram_api_key'); $url = 'https://api.telegram.org/bot{$token}/sendMessage?chat_id='.$chatId.'&parse_mode=html&text='.urlencode($response); $curl = curl_init(); curl_setopt_array($curl, array( CURLOPT_RETURNTRANSFER => 1, CURLOPT_URL => $url, CURLOPT_USERAGENT => 'SevenSerp_Bot', CURLOPT_POST => FALSE )); $resp = curl_exec($curl); curl_close($curl); return true; } } if(!defined('TRANSLATcurl_exec trouvé dans le fichier CurlHandler.php. 44: \curl_exec($easy->handle);curl_init trouvé dans le fichier CurlFactory.php. 69: $easy->handle = $this->handles ? \array_pop($this->handles) : \curl_init();
  10. Menu Admin : Les thèmes doivent utiliser add_theme_page () pour ajouter des pages admin. Fichier admin.php : 85: add_menu_page(Fichier admin.php : 1276: add_submenu_page(1895: add_submenu_page(Fichier admin.php : 1276: add_submenu_page(1895: add_submenu_page(Fichier migrations.php : 40: </div>'; } } }); } public function show_migration_tool(){ add_submenu_page( 'admin.php', sprintf(__('Herramienta de migración de datFichier subscriptions.php : 37: if(!defined('ABSPATH')){ header('HTTP/1.0 403 Forbidden'); exit; } if(module_enabled('subscriptions')){ if(!class_exists('Subscriptions')){ class Subscriptions{ private $wpdb; private $table = NULL; private $table_name = NULL; private $table_exists = false; function __construct(){ global $wpdb; $this->wpdb = $wpdb; $this->table_name = 'subscriptions'; $this->table = '{$wpdb->prefix}'.$this->table_name; $this->table_exists = $this->check_wpdb_subscriptions_db(); } private function get_subscriptions_count(){ $results = $this->wpdb->get_var( 'SELECT count(*) FROM '.$this->table ); return $results; } public function add_admin_pages(){ $menu_title = __('Suscripciones', TRANSLATIONS); add_menu_page( $menu_title, $menu_title, 'manage_options', 'subscriptions-tFichier content-generator.php : 53: </p>'; }, ['post', 'page'], 'normal', 'high'); }); } public function sort_query(){ if(is_admin() && isset($_GET['generated'])){ add_filter('pre_get_posts', function($query){ $query->set('meta_query', [ array( 'key'=>$this->generated_meta, 'value'=>'1', 'compare'=>'>=' ) ]); return $query; }); } } public function add_admin_pages(){ add_action('admin_menu', function(){ add_menu_page( __('Palabras clave', $this->get_translations()), __('PalabraFichier content-generator.php : 79: </table>'; } } echo '</div>'; }, 'dashicons-welcome-add-page' ); add_submenu_page( $this->menu_slug, __('Eliminación', $this->get_translati
  11. Réponses aux commentaires : Déclarations des réponses aux commentaires Impossible de trouver le script js comment-reply.
  12. Largeur de la page : Définition correcte de content_width Aucune largeur de contenu a été définie. Exemple:
    if ( ! isset ($content_width) ) $content_width = 900;
  13. Fonctions obsolètes : get_bloginfo get_bloginfo('wpurl') trouvé dans le fichier sevenserp-api.php. Il est préférable d'utiliser site_url(). 400: 'site_url' => get_bloginfo('wpurl') ,602: 'site_url' => get_bloginfo('wpurl') ,
  14. Fonctions obsolètes : get_option get_option( 'home' ) trouvé dans le fichier page-priorization.php. Il est préférable d'utiliser home_url(). 37: if(!defined('ABSPATH')){ header('HTTP/1.0 403 Forbidden'); exit; } register_activation_hook( __FILE__, 'remove_category_url_refresh_rules' ); register_deactivation_hook( __FILE__, 'remove_category_url_deactivate' ); add_action( 'created_category', 'remove_category_url_refresh_rules' ); add_action( 'delete_category', 'remove_category_url_refresh_rules' ); add_action( 'edited_category', 'remove_category_url_refresh_rules' ); add_action( 'init', 'remove_category_url_permastruct' ); add_filter( 'category_rewrite_rules', 'remove_category_url_rewrite_rules' ); add_filter( 'query_vars', 'remove_category_url_query_vars' ); add_filter( 'request', 'remove_category_url_request' ); function remove_category_url_refresh_rules() { global $wp_rewrite; $wp_rewrite->flush_rules(); } function remove_category_url_deactivate() { remove_filter( 'category_rewrite_rules', 'remove_category_url_rewrite_rules' ); remove_category_url_refresh_rules(); } function remove_category_url_permastruct() { global $wp_rewrite, $wp_version; if ( 3.4 <= $wp_version ) { $wp_rewrite->extra_permastructs['category']['struct'] = '%category%'; } else { $wp_rewrite->extra_permastructs['category'][0] = '%category%'; } } function remove_category_url_rewrite_rules( $category_rewrite ) { global $wp_rewrite; $category_rewrite = array(); if ( class_exists( 'Sitepress' ) ) { global $sitepress; remove_filter( 'terms_clauses', array( $sitepress, 'terms_clauses' ), 10 ); $categories = get_categories( array( 'hide_empty' => false, '_icl_show_all_langs' => true ) ); add_filter( 'terms_clauses', array( $sitepress, 'terms_clauses' ), 10, 4 ); } else { $categories = get_categories( array( 'hide_empty' => false ) ); } foreach ( $categories as $category ) { $category_nicename = $category->slug; if ( $category->parent == $category->cat_ID ) { $category->parent = 0; } elseif ( 0 != $category->parent ) { $category_nicename = get_category_parents( $category->parent, false, '/', true ) . $category_nicename; } $category_rewrite[ '(' . $category_nicename . ')/(?:feed/)?(feed|rdf|rss|rss2|atom)/?$' ] = 'index.php?category_name=$matches[1]&feed=$matches[2]'; $category_rewrite[ '(' . $category_nicename . ')/page/?([0-9]{1,})/?$' ] = 'index.php?category_name=$matches[1]&paged=$matches[2]'; $category_rewrite[ '(' . $category_nicename . ')/?$' ] = 'index.php?category_name=$matches[1]'; } $old_category_base = get_option( 'category_base' ) ? get_option( 'category_base' ) : 'category'; $old_category_base = trim( $old_category_base, '/' ); $category_rewrite[ $old_category_base . '/(.*)$' ] = 'index.php?category_redirect=$matches[1]'; return $category_rewrite; } function remove_category_url_query_vars( $public_query_vars ) { $public_query_vars[] = 'category_redirect'; return $public_query_vars; } function remove_category_url_request( $query_vars ) { if ( isset( $query_vars['category_redirect'] ) ) { $catlink = trailingslashit( get_option( 'home' ) ) . user_trailingslashit( $query_vars['category_redire
  15. Pagination des posts : Implémentation Le thème n'a pas de pagination. La pagination des posts doit être prise en charge par les fonctions posts_nav_link () ou paginate_links () ou the_posts_pagination() ou the_posts_navigation() ou next_posts_link () et previous_posts_link().
Attention
  1. tags du thème : Présence de tags inconnusTag inconnu sevenserp trouvé dans l'entête du fichier style.css.
  2. Text domain : Utilisation incorrecte des fonctions de traduction.Mauvaus répertoire d'installation pour le thème. Le nom du répertoir doit correspondre au slug du thème. Le slug de ce thème ainsi que le text-domain est seven-serp-theme.
  3. Text domain : Utilisation incorrecte des fonctions de traduction.Une fonction de traduction utilisée sans text-domain. Fonction __, avec les arguments "Volver a la web" dans le fichier 404.php.Une fonction de traduction utilisée sans text-domain. Fonction __, avec les arguments "Configura la página de inicio en Apariencia > Personalizar." dans le fichier index.php.Une fonction de traduction utilisée sans text-domain. Fonction __, avec les arguments "Gestión de la plantilla" dans le fichier dashboard.php.Une fonction de traduction utilisée sans text-domain. Fonction __, avec les arguments "Estás utilizando un tema hijo en este blog. Todas las funciones de temas hijo están %s" dans le fichier dashboard.php.Une fonction de traduction utilisée sans text-domain. Fonction __, avec les arguments "en esta URL" dans le fichier dashboard.php.Une fonction de traduction utilisée sans text-domain. Fonction __, avec les arguments "Este módulo está deshabilitado" dans le fichier dashboard.php.Une fonction de traduction utilisée sans text-domain. Fonction _e, avec les arguments "¡Genial! Aún no hay registrado ningún código HTTP 404." dans le fichier monitor404.php.Une fonction de traduction utilisée sans text-domain. Fonction __, avec les arguments "Página" dans le fichier monitor404.php.Une fonction de traduction utilisée sans text-domain. Fonction __, avec les arguments "Accesos" dans le fichier monitor404.php.Une fonction de traduction utilisée sans text-domain. Fonction __, avec les arguments "Redirecciones" dans le fichier monitor404.php.Une fonction de traduction utilisée sans text-domain. Fonction __, avec les arguments "Primera vez" dans le fichier monitor404.php.Une fonction de traduction utilisée sans text-domain. Fonction __, avec les arguments "Última vez" dans le fichier monitor404.php.Une fonction de traduction utilisée sans text-domain. Fonction __, avec les arguments "Acción" dans le fichier monitor404.php.Une fonction de traduction utilisée sans text-domain. Fonction _n, avec les arguments "Se ha accedido una %s vez a esta URL desde la última vez que se revisó.", "Esta URL ha sido accedida %s veces desde la última vez que se revisó." dans le fichier monitor404.php.Une fonction de traduction utilisée sans text-domain. Fonction __, avec les arguments "Elimina este aviso" dans le fichier monitor404.php.Une fonction de traduction utilisée sans text-domain. Fonction _e, avec les arguments "No ha sido posible cargar el módulo de monitorización de códigos 404." dans le fichier monitor404.php.Une fonction de traduction utilisée sans text-domain. Fonction _e, avec les arguments "No ha sido posible cargar el módulo de redirecciones." dans le fichier redirections.php.Une fonction de traduction utilisée sans text-domain. Fonction __, avec les arguments "La redirección ha sido creada con éxito." dans le fichier redirections.php.Une fonction de traduction utilisée sans text-domain. Fonction __, avec les arguments "La redirección no se ha podido crear." dans le fichier redirections.php.Une fonction de traduction utilisée sans text-domain. Fonction __, avec les arguments "URL de origen" dans le fichier redirections.php.Une fonction de traduction utilisée sans text-domain. Fonction __, avec les arguments "URL de destino" dans le fichier redirections.php.Une fonction de traduction utilisée sans text-domain. Fonction __, avec les arguments "Introduce una URL completa, incluyendo el protocolo http:// o https://." dans le fichier redirections.php.Une fonction de traduction utilisée sans text-domain. Fonction __, avec les arguments "Tipo de redirección" dans le fichier redirections.php.Une fonction de traduction utilisée sans text-domain. Fonction __, avec les arguments "Selecciona el código HTTP de redirección. Los más habituales son 301 para una redirección permanente y 302 para una redirección temporal." dans le fichier redirections.php.Une fonction de traduction utilisée sans text-domain. Fonction __, avec les arguments "Crear redirección" dans le fichier redirections.php.Une fonction de traduction utilisée sans text-domain. Fonction __, avec les arguments "Es necesario indicar un parámetro 'id' numérico." dans le fichier redirections.php.Une fonction de traduction utilisée sans text-domain. Fonction __, avec les arguments "La redirección no se ha podido eliminar. Es posible que ya no exista." dans le fichier redirections.php.Une fonction de traduction utilisée sans text-domain. Fonction _e, avec les arguments "Parece que aún no tienes redirecciones, ¿creamos una?" dans le fichier redirections.php.Une fonction de traduction utilisée sans text-domain. Fonction __, avec les arguments "Origen" dans le fichier redirections.php.Une fonction de traduction utilisée sans text-domain. Fonction __, avec les arguments "Destino" dans le fichier redirections.php.Une fonction de traduction utilisée sans text-domain. Fonction __, avec les arguments "Código HTTP" dans le fichier redirections.php.Une fonction de traduction utilisée sans text-domain. Fonction __, avec les arguments "Redirecciones realizadas" dans le fichier redirections.php.Une fonction de traduction utilisée sans text-domain. Fonction __, avec les arguments "Opciones" dans le fichier redirections.php.Une fonction de traduction utilisée sans text-domain. Fonction __, avec les arguments "Origen" dans le fichier redirections.php.Une fonction de traduction utilisée sans text-domain. Fonction __, avec les arguments "Destino" dans le fichier redirections.php.Une fonction de traduction utilisée sans text-domain. Fonction __, avec les arguments "Código HTTP" dans le fichier redirections.php.Une fonction de traduction utilisée sans text-domain. Fonction __, avec les arguments "Redirecciones realizadas" dans le fichier redirections.php.Une fonction de traduction utilisée sans text-domain. Fonction __, avec les arguments "Ninguna" dans le fichier redirections.php.Une fonction de traduction utilisée sans text-domain. Fonction __, avec les arguments "Eliminar redirección" dans le fichier redirections.php.Une fonction de traduction utilisée sans text-domain. Fonction __, avec les arguments "Gestión" dans le fichier admin.php.Une fonction de traduction utilisée sans text-domain. Fonction __, avec les arguments "Tema" dans le fichier admin.php.Une fonction de traduction utilisée sans text-domain. Fonction __, avec les arguments "Gestión" dans le fichier admin.php.Une fonction de traduction utilisée sans text-domain. Fonction __, avec les arguments "Tema (%s)" dans le fichier admin.php.Une fonction de traduction utilisée sans text-domain. Fonction __, avec les arguments "Acceso no permitido." dans le fichier admin.php.Une fonction de traduction utilisée sans text-domain. Fonction __, avec les arguments "Rendimiento" dans le fichier admin.php.Une fonction de traduction utilisée sans text-domain. Fonction __, avec les arguments "Limpiar caché" dans le fichier admin.php.Une fonction de traduction utilisée sans text-domain. Fonction __, avec les arguments "Las opciones de rendimiento permitirán aplicar de manera rápida todas las buenas prácticas de Page Speed Insights." dans le fichier admin.php.Une fonction de traduction utilisée sans text-domain. Fonction __, avec les arguments "Caché" dans le fichier admin.php.Une fonction de traduction utilisée sans text-domain. Fonction __, avec les arguments "Comprimir HTML" dans le fichier admin.php.Une fonction de traduction utilisée sans text-domain. Fonction __, avec les arguments "Reduce el tamaño de la página eliminado espacios en blanco, saltos de línea, comentarios de código, etc." dans le fichier admin.php.Une fonction de traduction utilisée sans text-domain. Fonction __, avec les arguments "Emojis" dans le fichier admin.php.Une fonction de traduction utilisée sans text-domain. Fonction __, avec les arguments "Deshabilitar emojis" dans le fichier admin.php.Une fonction de traduction utilisée sans text-domain. Fonction __, avec les arguments "Deshabilita los emojis incorporados de WordPress y utiliza en su lugar los del propio ordenador del visitante. Recomendado deshabilitarlo para reducir las peticiones de conexión al cargar la página." dans le fichier admin.php.Une fonction de traduction utilisée sans text-domain. Fonction __, avec les arguments "Shortcodes" dans le fichier admin.php.Une fonction de traduction utilisée sans text-domain. Fonction __, avec les arguments "Ocultar shortcodes huérfanos" dans le fichier admin.php.Une fonction de traduction utilisée sans text-domain. Fonction __, avec les arguments "Ocultar para usuarios shortcodes no existentes que empeoran el rendimiento y la visibilidad de la web." dans le fichier admin.php.Une fonction de traduction utilisée sans text-domain. Fonction __, avec les arguments "Deshabilitar ficheros CSS nativos de WordPress" dans le fichier admin.php.Une fonction de traduction utilisée sans text-domain. Fonction __, avec les arguments "Deshabilitar fichero CSS de Gutenberg" dans le fichier admin.php.Une fonction de traduction utilisée sans text-domain. Fonction __, avec les arguments "Si no utilizas el editor de Gutenberg, deshabilita esta opción para ahorrar una petición de conexión en cada carga de la web." dans le fichier admin.php.Une fonction de traduction utilisée sans text-domain. Fonction __, avec les arguments "Deshabilitar oEmbed" dans le fichier admin.php.Une fonction de traduction utilisée sans text-domain. Fonction __, avec les arguments "Deshabilita oEmbed si no lo usas para reducir las peticiones de conexión al cargar la página." dans le fichier admin.php.Une fonction de traduction utilisée sans text-domain. Fonction __, avec les arguments "Deshabilitar herramientas nativas de WordPress" dans le fichier admin.php.Une fonction de traduction utilisée sans text-domain. Fonction __, avec les arguments "Deshabilitar herramientas de privacidad" dans le fichier admin.php.Une fonction de traduction utilisée sans text-domain. Fonction __, avec les arguments "Deshabilita las herramientas de privacidad incluidas por defecto en WordPress." dans le fichier admin.php.Une fonction de traduction utilisée sans text-domain. Fonction __, avec les arguments "Habilitar jQuery" dans le fichier admin.php.Une fonction de traduction utilisée sans text-domain. Fonction __, avec les arguments "Añade en el footer jQuery para temas hijo o plugins que lo requieran. El tema por defecto no lo necesita." dans le fichier admin.php.Une fonction de traduction utilisée sans text-domain. Fonction __, avec les arguments "Seguridad" dans le fichier admin.php.Une fonction de traduction utilisée sans text-domain. Fonction __, avec les arguments "Escanear WordPress" dans le fichier admin.php.Une fonction de traduction utilisée sans text-domain. Fonction __, avec les arguments "Las opciones de seguridad están configuradas por defecto para añadir una capa de seguridad extra a la web automáticamente." dans le fichier admin.php.Une fonction de traduction utilisée sans text-domain. Fonction __, avec les arguments "Cabeceras HTTP" dans le fichier admin.php.Une fonction de traduction utilisée sans text-domain. Fonction __, avec les arguments "Añadir cabeceras HTTP de seguridad" dans le fichier admin.php.Une fonction de traduction utilisée sans text-domain. Fonction __, avec les arguments "Añade cabeceras de seguridad a tu página web automáticamente." dans le fichier admin.php.Une fonction de traduction utilisée sans text-domain. Fonction __, avec les arguments "Deshabilitar cabeceras HTTP innecesarias" dans le fichier admin.php.Une fonction de traduction utilisée sans text-domain. Fonction __, avec les arguments "Oculta algunas cabeceras HTTP como la versión de PHP usada (entre otras) cuando sea posible." dans le fichier admin.php.Une fonction de traduction utilisée sans text-domain. Fonction __, avec les arguments "Eliminación automática de ficheros de licencias" dans le fichier admin.php.Une fonction de traduction utilisée sans text-domain. Fonction __, avec les arguments "Eliminar archivos de licencia y readme.html" dans le fichier admin.php.Une fonction de traduction utilisée sans text-domain. Fonction __, avec les arguments "Elimina los archivos license.txt, licencia.txt y readme.html de la carpeta raíz automáticamente." dans le fichier admin.php.Une fonction de traduction utilisée sans text-domain. Fonction __, avec les arguments "Protección antispam" dans le fichier admin.php.Une fonction de traduction utilisée sans text-domain. Fonction __, avec les arguments "Protección Anti-spam" dans le fichier admin.php.Une fonction de traduction utilisée sans text-domain. Fonction __, avec les arguments "Actualización diaria y automática de lista de palabras prohibidas en comentarios." dans le fichier admin.php.Une fonction de traduction utilisée sans text-domain. Fonction __, avec les arguments "API" dans le fichier admin.php.Une fonction de traduction utilisée sans text-domain. Fonction __, avec les arguments "Deshabilitar API REST" dans le fichier admin.php.Une fonction de traduction utilisée sans text-domain. Fonction __, avec les arguments "Deshabilita la API de WordPress." dans le fichier admin.php.Une fonction de traduction utilisée sans text-domain. Fonction __, avec les arguments "Otras opciones" dans le fichier admin.php.Une fonction de traduction utilisée sans text-domain. Fonction __, avec les arguments "Deshabilitar WLWManifest" dans le fichier admin.php.Une fonction de traduction utilisée sans text-domain. Fonction __, avec les arguments "Si no utilizas ni utilizarás Windows Live Writer, marca esta opción." dans le fichier admin.php.Une fonction de traduction utilisée sans text-domain. Fonction __, avec les arguments "Deshabilitar contraseñas de aplicación" dans le fichier admin.php.Une fonction de traduction utilisée sans text-domain. Fonction __, avec les arguments "Si no utilizas aplicaciones de terceros, deshabilita las contraseñas de aplicación." dans le fichier admin.php.Une fonction de traduction utilisée sans text-domain. Fonction __, avec les arguments "Bloquear recuperación de contraseñas" dans le fichier admin.php.Une fonction de traduction utilisée sans text-domain. Fonction __, avec les arguments "Deshabilita por completo el sistema de recuperación de contraseñas." dans le fichier admin.php.Une fonction de traduction utilisée sans text-domain. Fonction __, avec les arguments "Deshabilitar XMLRPC" dans le fichier admin.php.Une fonction de traduction utilisée sans text-domain. Fonction __, avec les arguments "Deshabilita XMLRPC y devuelve un código de error 403 al acceder." dans le fichier admin.php.Une fonction de traduction utilisée sans text-domain. Fonction __, avec les arguments "Ocultar versiones de archivos" dans le fichier admin.php.Une fonction de traduction utilisée sans text-domain. Fonction __, avec les arguments "Oculta las versiones de los ficheros CSS y Javascript." dans le fichier admin.php.Une fonction de traduction utilisée sans text-domain. Fonction __, avec les arguments "Bloquear peticiones con el campo 'User-Agent' vacio" dans le fichier admin.php.Une fonction de traduction utilisée sans text-domain. Fonction __, avec les arguments "Cuando se accede a una página se manda la información del navegador, impedir a usuarios con esta opción alterada acceder." dans le fichier admin.php.Une fonction de traduction utilisée sans text-domain. Fonction __, avec les arguments "Redirecciones" dans le fichier admin.php.Une fonction de traduction utilisée sans text-domain. Fonction __, avec les arguments "Crear" dans le fichier admin.php.Une fonction de traduction utilisée sans text-domain. Fonction __, avec les arguments "Aviso de cookies" dans le fichier admin.php.Une fonction de traduction utilisée sans text-domain. Fonction __, avec les arguments "El aviso de cookies permitirá a tu blog cumplimentar con la GDPR. Si dejas los campos vacios, se añadirá el texto por defecto." dans le fichier admin.php.Une fonction de traduction utilisée sans text-domain. Fonction __, avec les arguments "Mensaje" dans le fichier admin.php.Une fonction de traduction utilisée sans text-domain. Fonction __, avec les arguments "Indica el mensaje que aparecerá en el aviso." dans le fichier admin.php.Une fonction de traduction utilisée sans text-domain. Fonction __, avec les arguments "Texto del botón" dans le fichier admin.php.Une fonction de traduction utilisée sans text-domain. Fonction __, avec les arguments "Indica el mensaje que aparecerá en el botón para confirmar." dans le fichier admin.php.Une fonction de traduction utilisée sans text-domain. Fonction __, avec les arguments "Política de privacidad" dans le fichier admin.php.Une fonction de traduction utilisée sans text-domain. Fonction __, avec les arguments "Indica la URL completa de la página de Política de Privacidad." dans le fichier admin.php.Une fonction de traduction utilisée sans text-domain. Fonction __, avec les arguments "Rastreadores" dans le fichier admin.php.Une fonction de traduction utilisée sans text-domain. Fonction __, avec les arguments "Limpiar registros" dans le fichier admin.php.Une fonction de traduction utilisée sans text-domain. Fonction __, avec les arguments "Análisis" dans le fichier admin.php.Une fonction de traduction utilisée sans text-domain. Fonction __, avec les arguments "Registro" dans le fichier admin.php.Une fonction de traduction utilisée sans text-domain. Fonction __, avec les arguments "SEO" dans le fichier admin.php.Une fonction de traduction utilisée sans text-domain. Fonction __, avec les arguments "Éstas son las opciones de SEO principales, por favor modifícalas con precaución." dans le fichier admin.php.Une fonction de traduction utilisée sans text-domain. Fonction __, avec les arguments "Migas de pan" dans le fichier admin.php.Une fonction de traduction utilisée sans text-domain. Fonction __, avec les arguments "Ocultar barra de migas de pan" dans le fichier admin.php.Une fonction de traduction utilisée sans text-domain. Fonction __, avec les arguments "Oculta la barra de migas de pan y continuar mostrando los datos estructurados." dans le fichier admin.php.Une fonction de traduction utilisée sans text-domain. Fonction __, avec les arguments "Deshabilitar páginas de autor" dans le fichier admin.php.Une fonction de traduction utilisée sans text-domain. Fonction __, avec les arguments "Deshabilitar páginas de autor" dans le fichier admin.php.Une fonction de traduction utilisée sans text-domain. Fonction __, avec les arguments "Fuerza un 404 en las páginas de autor." dans le fichier admin.php.Une fonction de traduction utilisée sans text-domain. Fonction __, avec les arguments "Redirecciones" dans le fichier admin.php.Une fonction de traduction utilisée sans text-domain. Fonction __, avec les arguments "Redireccionar las páginas 404" dans le fichier admin.php.Une fonction de traduction utilisée sans text-domain. Fonction __, avec les arguments "Redirige todas las páginas no encontradas con un 301 a una URL de tu elección." dans le fichier admin.php.Une fonction de traduction utilisée sans text-domain. Fonction __, avec les arguments "URL de redirección" dans le fichier admin.php.Une fonction de traduction utilisée sans text-domain. Fonction __, avec les arguments "En caso de que habilites el checkbox anterior, indica una URL válida para redireccionar todos los 404. Si se deja en blanco llevará a la home (página de inicio) configurada en WordPress." dans le fichier admin.php.Une fonction de traduction utilisée sans text-domain. Fonction __, avec les arguments "Deshabilitar autocorrección de URLs" dans le fichier admin.php.Une fonction de traduction utilisée sans text-domain. Fonction __, avec les arguments "WordPress realiza redirecciones 301 innecesarias en algunos casos de páginas no existentes, marca esta opción para deshabilitarlo." dans le fichier admin.php.Une fonction de traduction utilisée sans text-domain. Fonction __, avec les arguments "SEO de la página de inicio" dans le fichier admin.php.Une fonction de traduction utilisée sans text-domain. Fonction __, avec les arguments "Metatítulo" dans le fichier admin.php.Une fonction de traduction utilisée sans text-domain. Fonction __, avec les arguments "Añade el título SEO en este campo." dans le fichier admin.php.Une fonction de traduction utilisée sans text-domain. Fonction __, avec les arguments "Metadescripción" dans le fichier admin.php.Une fonction de traduction utilisée sans text-domain. Fonction __, avec les arguments "Añade la descripción SEO en este campo." dans le fichier admin.php.Une fonction de traduction utilisée sans text-domain. Fonction __, avec les arguments "Enlazado interno" dans le fichier admin.php.Une fonction de traduction utilisée sans text-domain. Fonction __, avec les arguments "Deshabilitar enlace post anterior/siguiente" dans le fichier admin.php.Une fonction de traduction utilisée sans text-domain. Fonction __, avec les arguments "Deshabilita globalmente los enlaces de post anterior y siguiente en las entradas." dans le fichier admin.php.Une fonction de traduction utilisée sans text-domain. Fonction __, avec les arguments "Añadir la relación 'nofollow' automáticamente en enlaces" dans le fichier admin.php.Une fonction de traduction utilisée sans text-domain. Fonction __, avec les arguments "Se añadirá rel='nofollow' en todos los enlaces externos en los que no se haya indicado una relación explícitamente." dans le fichier admin.php.Une fonction de traduction utilisée sans text-domain. Fonction __, avec les arguments "Abrir todos los enlaces externos en una nueva pestaña" dans le fichier admin.php.Une fonction de traduction utilisée sans text-domain. Fonction __, avec les arguments "Se añadirá target='_blank' en todos los enlaces externos." dans le fichier admin.php.Une fonction de traduction utilisée sans text-domain. Fonction __, avec les arguments "Convertir texto a enlaces" dans le fichier admin.php.Une fonction de traduction utilisée sans text-domain. Fonction __, avec les arguments "Convierte texto plano con una URL, una dirección FTP, email... a un enlace." dans le fichier admin.php.Une fonction de traduction utilisée sans text-domain. Fonction __, avec les arguments "Mostrar tipo de enlace visualmente" dans le fichier admin.php.Une fonction de traduction utilisée sans text-domain. Fonction __, avec les arguments "Al estar conectado como administrador, los bordes de los enlaces se mostrarán con colores para definir rápidamente de cual es cada tipo." dans le fichier admin.php.Une fonction de traduction utilisée sans text-domain. Fonction __, avec les arguments "Verificación de página web" dans le fichier admin.php.Une fonction de traduction utilisée sans text-domain. Fonction __, avec les arguments "Verificar sitio en Google Search Console" dans le fichier admin.php.Une fonction de traduction utilisée sans text-domain. Fonction __, avec les arguments "Elige 'Etiqueta HTML' en el método de verificación e introduce el contenido entrecomillado como 'content'." dans le fichier admin.php.Une fonction de traduction utilisée sans text-domain. Fonction __, avec les arguments "Verificar sitio en Bing" dans le fichier admin.php.Une fonction de traduction utilisée sans text-domain. Fonction __, avec les arguments "Elige 'Metaetiqueta' en el método de verificación e introduce el contenido entrecomillado como 'content'." dans le fichier admin.php.Une fonction de traduction utilisée sans text-domain. Fonction __, avec les arguments "Otras opciones" dans le fichier admin.php.Une fonction de traduction utilisée sans text-domain. Fonction __, avec les arguments "Capitalizar primera letra en metaetiquetas" dans le fichier admin.php.Une fonction de traduction utilisée sans text-domain. Fonction __, avec les arguments "Fuerza que la primera letra tanto del título como la descripción aparezcan en mayúscula." dans le fichier admin.php.Une fonction de traduction utilisée sans text-domain. Fonction __, avec les arguments "Mostrar información de Core Vitals" dans le fichier admin.php.Une fonction de traduction utilisée sans text-domain. Fonction __, avec les arguments "Habilita un apartado en la barra superior de WordPress con todas las métricas." dans le fichier admin.php.Une fonction de traduction utilisée sans text-domain. Fonction __, avec les arguments "Evitar que WordPress reemplace textos de las entradas" dans le fichier admin.php.Une fonction de traduction utilisée sans text-domain. Fonction __, avec les arguments "Al activarse, evitará que WordPress modifique de manera automática algunos caracteres las entradas. Por ejemplo, las comilllas dobles que escribimos." dans le fichier admin.php.Une fonction de traduction utilisée sans text-domain. Fonction __, avec les arguments "Bloquear robots SEO" dans le fichier admin.php.Une fonction de traduction utilisée sans text-domain. Fonction __, avec les arguments "Bloquear Semrush" dans le fichier admin.php.Une fonction de traduction utilisée sans text-domain. Fonction __, avec les arguments "Impide que tu blog sea rastreado por la herramienta Semrush." dans le fichier admin.php.Une fonction de traduction utilisée sans text-domain. Fonction __, avec les arguments "Bloquear Ahrefs" dans le fichier admin.php.Une fonction de traduction utilisée sans text-domain. Fonction __, avec les arguments "Impide que tu blog sea rastreado por Ahrefs." dans le fichier admin.php.Une fonction de traduction utilisée sans text-domain. Fonction __, avec les arguments "Bloquear Alexa" dans le fichier admin.php.Une fonction de traduction utilisée sans text-domain. Fonction __, avec les arguments "Impide que tu blog sea rastreado por Alexa." dans le fichier admin.php.Une fonction de traduction utilisée sans text-domain. Fonction __, avec les arguments "Bloquear Majestic" dans le fichier admin.php.Une fonction de traduction utilisée sans text-domain. Fonction __, avec les arguments "Impide que tu blog sea rastreado por Majestic." dans le fichier admin.php.Une fonction de traduction utilisée sans text-domain. Fonction __, avec les arguments "Bloquear Moz" dans le fichier admin.php.Une fonction de traduction utilisée sans text-domain. Fonction __, avec les arguments "Impide que tu blog sea rastreado por las herramientas de Moz." dans le fichier admin.php.Une fonction de traduction utilisée sans text-domain. Fonction __, avec les arguments "Bloquear Sistrix" dans le fichier admin.php.Une fonction de traduction utilisée sans text-domain. Fonction __, avec les arguments "Impide que tu blog sea rastreado por las herramientas de Sistrix." dans le fichier admin.php.Une fonction de traduction utilisée sans text-domain. Fonction __, avec les arguments "Bloquear Screaming Frog" dans le fichier admin.php.Une fonction de traduction utilisée sans text-domain. Fonction __, avec les arguments "Impide que tu blog sea rastreado por las herramientas de Screaming Frog." dans le fichier admin.php.Une fonction de traduction utilisée sans text-domain. Fonction __, avec les arguments "Sitemap" dans le fichier admin.php.Une fonction de traduction utilisée sans text-domain. Fonction __, avec les arguments "Indica si el sitemap estará o no habilitado y las páginas que debe de contener." dans le fichier admin.php.Une fonction de traduction utilisée sans text-domain. Fonction __, avec les arguments "Activar el sitemap del sitio" dans le fichier admin.php.Une fonction de traduction utilisée sans text-domain. Fonction __, avec les arguments "Generar el sitemap en la ruta /sitemap.xml." dans le fichier admin.php.Une fonction de traduction utilisée sans text-domain. Fonction __, avec les arguments "Incluir páginas" dans le fichier admin.php.Une fonction de traduction utilisée sans text-domain. Fonction __, avec les arguments "Incluir todas las páginas marcadas como 'index'." dans le fichier admin.php.Une fonction de traduction utilisée sans text-domain. Fonction __, avec les arguments "Incluir entradas" dans le fichier admin.php.Une fonction de traduction utilisée sans text-domain. Fonction __, avec les arguments "Se añadirán todas las entradas marcadas como 'index'." dans le fichier admin.php.Une fonction de traduction utilisée sans text-domain. Fonction __, avec les arguments "Incluir categorías" dans le fichier admin.php.Une fonction de traduction utilisée sans text-domain. Fonction __, avec les arguments "Se añadirán todas las categorías marcadas como 'index'." dans le fichier admin.php.Une fonction de traduction utilisée sans text-domain. Fonction __, avec les arguments "Monitor 404" dans le fichier admin.php.Une fonction de traduction utilisée sans text-domain. Fonction __, avec les arguments "Limpiar registros" dans le fichier admin.php.Une fonction de traduction utilisée sans text-domain. Fonction __, avec les arguments "Indexing API" dans le fichier admin.php.Une fonction de traduction utilisée sans text-domain. Fonction __, avec les arguments "Clave de Indexing API" dans le fichier admin.php.Une fonction de traduction utilisée sans text-domain. Fonction __, avec les arguments "Indica el fichero JSON para conectarte con la Google Indexing API de Google." dans le fichier admin.php.Une fonction de traduction utilisée sans text-domain. Fonction __, avec les arguments "Autores aleatorios" dans le fichier admin.php.Une fonction de traduction utilisée sans text-domain. Fonction __, avec les arguments "Al activar los autores aleatorios, se generará una identidad de manera automática para cada artículo." dans le fichier admin.php.Une fonction de traduction utilisée sans text-domain. Fonction __, avec les arguments "Activar autores aleatorios" dans le fichier admin.php.Une fonction de traduction utilisée sans text-domain. Fonction __, avec les arguments "Marca la casilla si quieres que se generen autores aleatorios." dans le fichier admin.php.Une fonction de traduction utilisée sans text-domain. Fonction __, avec les arguments "Número máximo de autores a generar" dans le fichier admin.php.Une fonction de traduction utilisée sans text-domain. Fonction __, avec les arguments "Indica el número de autores máximos diferentes que podrán aparecer." dans le fichier admin.php.Une fonction de traduction utilisée sans text-domain. Fonction __, avec les arguments "Mantenimiento" dans le fichier admin.php.Une fonction de traduction utilisée sans text-domain. Fonction __, avec les arguments "El modo de mantenimiento cerrará la web a visitantes y requerirá estar conectado con una cuenta de administrador para acceder. Se devolverá el código HTTP 503 para que sea amigable con el SEO." dans le fichier admin.php.Une fonction de traduction utilisée sans text-domain. Fonction __, avec les arguments "Modo de mantenimiento" dans le fichier admin.php.Une fonction de traduction utilisée sans text-domain. Fonction __, avec les arguments "Habilita el modo mantenimiento." dans le fichier admin.php.Une fonction de traduction utilisée sans text-domain. Fonction __, avec les arguments "Amazon" dans le fichier admin.php.Une fonction de traduction utilisée sans text-domain. Fonction __, avec les arguments "Configura tu perfil de Amazon Afiliados para incluir snippets, autoactualizaciones de precios, etc." dans le fichier admin.php.Une fonction de traduction utilisée sans text-domain. Fonction __, avec les arguments "API Key" dans le fichier admin.php.Une fonction de traduction utilisée sans text-domain. Fonction __, avec les arguments "Introduce tu API Key de Amazon." dans le fichier admin.php.Une fonction de traduction utilisée sans text-domain. Fonction __, avec les arguments "API Secret" dans le fichier admin.php.Une fonction de traduction utilisée sans text-domain. Fonction __, avec les arguments "Introduce la llave secreta tu API." dans le fichier admin.php.Une fonction de traduction utilisée sans text-domain. Fonction __, avec les arguments "ID de Afiliado" dans le fichier admin.php.Une fonction de traduction utilisée sans text-domain. Fonction __, avec les arguments "Introduce la ID de afiliado, se utilizará para la generación de URLs." dans le fichier admin.php.Une fonction de traduction utilisée sans text-domain. Fonction __, avec les arguments "Tiempo de refresco de caché" dans le fichier admin.php.Une fonction de traduction utilisée sans text-domain. Fonction __, avec les arguments "Indica cada cuanto tiempo se refrescarán los datos de productos. Recomendamos ponerlo lo más alto posible si usas muchos productos o utiliza la API en varias webs." dans le fichier admin.php.Une fonction de traduction utilisée sans text-domain. Fonction __, avec les arguments "En cada recarga" dans le fichier admin.php.Une fonction de traduction utilisée sans text-domain. Fonction __, avec les arguments "6 horas" dans le fichier admin.php.Une fonction de traduction utilisée sans text-domain. Fonction __, avec les arguments "12 horas" dans le fichier admin.php.Une fonction de traduction utilisée sans text-domain. Fonction __, avec les arguments "24 horas" dans le fichier admin.php.Une fonction de traduction utilisée sans text-domain. Fonction __, avec les arguments "2 días" dans le fichier admin.php.Une fonction de traduction utilisée sans text-domain. Fonction __, avec les arguments "3 días" dans le fichier admin.php.Une fonction de traduction utilisée sans text-domain. Fonction __, avec les arguments "4 días" dans le fichier admin.php.Une fonction de traduction utilisée sans text-domain. Fonction __, avec les arguments "5 días" dans le fichier admin.php.Une fonction de traduction utilisée sans text-domain. Fonction __, avec les arguments "6 días" dans le fichier admin.php.Une fonction de traduction utilisée sans text-domain. Fonction __, avec les arguments "7 días" dans le fichier admin.php.Une fonction de traduction utilisée sans text-domain. Fonction __, avec les arguments "15 días" dans le fichier admin.php.Une fonction de traduction utilisée sans text-domain. Fonction __, avec les arguments "1 mes" dans le fichier admin.php.Une fonction de traduction utilisée sans text-domain. Fonction __, avec les arguments "Nunca" dans le fichier admin.php.Une fonction de traduction utilisée sans text-domain. Fonction __, avec les arguments "Google Adsense" dans le fichier admin.php.Une fonction de traduction utilisée sans text-domain. Fonction __, avec les arguments "Gestiona sencillamente la publicidad de tu sitio web con la integración por defecto de Google Adsense." dans le fichier admin.php.Une fonction de traduction utilisée sans text-domain. Fonction __, avec les arguments "Si la ID de Google Adsense no está indicada el fichero ads.txt dará un error 404" dans le fichier admin.php.Une fonction de traduction utilisée sans text-domain. Fonction __, avec les arguments "ID de Google Adsense" dans le fichier admin.php.Une fonction de traduction utilisée sans text-domain. Fonction __, avec les arguments "Indica tu ID de Google Adsense." dans le fichier admin.php.Une fonction de traduction utilisée sans text-domain. Fonction __, avec les arguments "Fichero ads.txt" dans le fichier admin.php.Une fonction de traduction utilisée sans text-domain. Fonction __, avec les arguments "Crear y mostrar fichero 'ads.txt'" dans le fichier admin.php.Une fonction de traduction utilisée sans text-domain. Fonction __, avec les arguments "Creará un fichero dinámico con tu información de Google Adsense." dans le fichier admin.php.Une fonction de traduction utilisée sans text-domain. Fonction __, avec les arguments "Las reglas siguientes..." dans le fichier admin.php.Une fonction de traduction utilisée sans text-domain. Fonction __, avec les arguments "Indica si el texto introducido en el siguiente campo se añadirán al final del fichero o lo sustituirá por completo." dans le fichier admin.php.Une fonction de traduction utilisée sans text-domain. Fonction __, avec les arguments "Reglas personalizadas" dans le fichier admin.php.Une fonction de traduction utilisée sans text-domain. Fonction __, avec les arguments "El texto que añadas aquí se añadirá al fichero robots.txt." dans le fichier admin.php.Une fonction de traduction utilisée sans text-domain. Fonction __, avec les arguments "Google Analytics" dans le fichier admin.php.Une fonction de traduction utilisée sans text-domain. Fonction __, avec les arguments "Se añadirá el código al final de la página con Google Tag Manager." dans le fichier admin.php.Une fonction de traduction utilisée sans text-domain. Fonction __, avec les arguments "Ocultar para administradores" dans le fichier admin.php.Une fonction de traduction utilisée sans text-domain. Fonction __, avec les arguments "No mostrar el código de seguimiento a administradores." dans le fichier admin.php.Une fonction de traduction utilisée sans text-domain. Fonction __, avec les arguments "ID de Google Analytics" dans le fichier admin.php.Une fonction de traduction utilisée sans text-domain. Fonction __, avec les arguments "Indica únicamente el campo UID de la página." dans le fichier admin.php.Une fonction de traduction utilisée sans text-domain. Fonction __, avec les arguments "Robots.txt" dans le fichier admin.php.Une fonction de traduction utilisée sans text-domain. Fonction __, avec les arguments "Ver robots.txt" dans le fichier admin.php.Une fonction de traduction utilisée sans text-domain. Fonction __, avec les arguments "Mientras esté activado este módulo, se generará el robots.txt virtualmente y de manera automática. Opcionalmente puedes agregar más reglas personalizadas o escribir de manera manual su contenido." dans le fichier admin.php.Une fonction de traduction utilisée sans text-domain. Fonction __, avec les arguments "Las reglas siguientes..." dans le fichier admin.php.Une fonction de traduction utilisée sans text-domain. Fonction __, avec les arguments "Indica si el texto introducido en el siguiente campo se añadirá sobre el robots.txt o lo sustituirá por completo." dans le fichier admin.php.Une fonction de traduction utilisée sans text-domain. Fonction __, avec les arguments "Reglas personalizadas" dans le fichier admin.php.Une fonction de traduction utilisée sans text-domain. Fonction __, avec les arguments "El texto que añadas aquí se añadirá al fichero robots.txt." dans le fichier admin.php.Une fonction de traduction utilisée sans text-domain. Fonction __, avec les arguments ".htaccess" dans le fichier admin.php.Une fonction de traduction utilisée sans text-domain. Fonction __, avec les arguments "Define el contenido del archivo .htaccess. Por favor, ten en cuenta que modificar este fichero de manera incorrecta podría inutilizar de manera completa la página web." dans le fichier admin.php.Une fonction de traduction utilisée sans text-domain. Fonction __, avec les arguments "Si estás utilizando nginx como servidor HTTP esta configuración no funcionará." dans le fichier admin.php.Une fonction de traduction utilisée sans text-domain. Fonction __, avec les arguments "Añadir reglas de seguridad extra" dans le fichier admin.php.Une fonction de traduction utilisée sans text-domain. Fonction __, avec les arguments "Se bloqueará directamente desde htaccess el acceso a ciertas páginas y se deshabilitará el listado de directorios siempre que sea posible." dans le fichier admin.php.Une fonction de traduction utilisée sans text-domain. Fonction __, avec les arguments "Habilitar caché de disco" dans le fichier admin.php.Une fonction de traduction utilisée sans text-domain. Fonction __, avec les arguments "Habilita la caché de disco para los usuarios si el servidor lo permite en imágenes, estilos,..." dans le fichier admin.php.Une fonction de traduction utilisée sans text-domain. Fonction __, avec les arguments "Habilitar compresión gzip" dans le fichier admin.php.Une fonction de traduction utilisée sans text-domain. Fonction __, avec les arguments "Habilita la compresión gzip siempre que sea posible y el servidor lo permita." dans le fichier admin.php.Une fonction de traduction utilisée sans text-domain. Fonction __, avec les arguments "Reglas personalizadas" dans le fichier admin.php.Une fonction de traduction utilisée sans text-domain. Fonction __, avec les arguments "Por favor, utiliza este campo con mucha precaución ya que puede inhabilitar el acceso a tu web. Sólo para usuarios avanzados." dans le fichier admin.php.Une fonction de traduction utilisée sans text-domain. Fonction __, avec les arguments "Contenido del fichero" dans le fichier admin.php.Une fonction de traduction utilisée sans text-domain. Fonction __, avec les arguments "Este es el contenido del fichero actual. Copíalo y reemplázalo en .htaccess si al modificar alguna opción la web deja de funcionar." dans le fichier admin.php.Une fonction de traduction utilisée sans text-domain. Fonction __, avec les arguments "Generador de contenido" dans le fichier admin.php.Une fonction de traduction utilisée sans text-domain. Fonction __, avec les arguments "Datos legales" dans le fichier admin.php.Une fonction de traduction utilisée sans text-domain. Fonction __, avec les arguments "Indica los datos que se mostrarán en las plantillas de aviso legal. Algunos datos como la URL o el nombre del sitio se obtienen automáticamente." dans le fichier admin.php.Une fonction de traduction utilisée sans text-domain. Fonction __, avec les arguments "Titular" dans le fichier admin.php.Une fonction de traduction utilisée sans text-domain. Fonction __, avec les arguments "Indica tu nombre y ambos apellidos." dans le fichier admin.php.Une fonction de traduction utilisée sans text-domain. Fonction __, avec les arguments "NIF" dans le fichier admin.php.Une fonction de traduction utilisée sans text-domain. Fonction __, avec les arguments "Indica tu NIF." dans le fichier admin.php.Une fonction de traduction utilisée sans text-domain. Fonction __, avec les arguments "Dirección completa" dans le fichier admin.php.Une fonction de traduction utilisée sans text-domain. Fonction __, avec les arguments "Indica tu dirección completa." dans le fichier admin.php.Une fonction de traduction utilisée sans text-domain. Fonction __, avec les arguments "Ciudad" dans le fichier admin.php.Une fonction de traduction utilisée sans text-domain. Fonction __, avec les arguments "Indica la capital de provincia en la que resides." dans le fichier admin.php.Une fonction de traduction utilisée sans text-domain. Fonction __, avec les arguments "Información de PHP" dans le fichier admin.php.Une fonction de traduction utilisée sans text-domain. Fonction __, avec les arguments "No ha sido posible añadir el submenú." dans le fichier admin.php.Une fonction de traduction utilisée sans text-domain. Fonction __, avec les arguments "Sin texto definido" dans le fichier admin.php.Une fonction de traduction utilisée sans text-domain. Fonction __, avec les arguments "La página requerida no es accesible." dans le fichier admin.php.Une fonction de traduction utilisée sans text-domain. Fonction __, avec les arguments "Busca una opción" dans le fichier admin.php.Une fonction de traduction utilisée sans text-domain. Fonction __, avec les arguments "Deshabilita este módulo si no lo usas" dans le fichier admin.php.Une fonction de traduction utilisée sans text-domain. Fonction __, avec les arguments "Deshabilitar" dans le fichier admin.php.Une fonction de traduction utilisée sans text-domain. Fonction __, avec les arguments "Actualización de opciones fallida." dans le fichier admin.php.Une fonction de traduction utilisée sans text-domain. Fonction __, avec les arguments "Campo %s no valido para %s" dans le fichier admin.php.Une fonction de traduction utilisée sans text-domain. Fonction __, avec les arguments "¡Modificaciones guardadas!" dans le fichier admin.php.Une fonction de traduction utilisée sans text-domain. Fonction __, avec les arguments "La caché se ha refrescado." dans le fichier admin.php.Une fonction de traduction utilisée sans text-domain. Fonction __, avec les arguments "Se han detectado potenciales fallos críticos de seguridad. Accede al escritorio para visualizarlos." dans le fichier admin.php.Une fonction de traduction utilisée sans text-domain. Fonction __, avec les arguments "No se han detectado problemas de seguridad." dans le fichier admin.php.Une fonction de traduction utilisée sans text-domain. Fonction __, avec les arguments "No se puede cargar la preview del fichero." dans le fichier admin.php.Une fonction de traduction utilisée sans text-domain. Fonction __, avec les arguments "Tipo de campo no reconocido." dans le fichier admin.php.Une fonction de traduction utilisée sans text-domain. Fonction _e, avec les arguments "No hay opciones disponibles para esta página." dans le fichier admin.php.Une fonction de traduction utilisée sans text-domain. Fonction __, avec les arguments "Este módulo está deshabilitado" dans le fichier admin.php.Une fonction de traduction utilisée sans text-domain. Fonction __, avec les arguments "Mientras un módulo está deshabilitado deja de cargarse hasta que vuelvas a activarlo." dans le fichier admin.php.Une fonction de traduction utilisée sans text-domain. Fonction __, avec les arguments "Reactivar módulo" dans le fichier admin.php.Une fonction de traduction utilisée sans text-domain. Fonction __, avec les arguments "Resetear el tema a las opciones por defecto" dans le fichier admin.php.Une fonction de traduction utilisée sans text-domain. Fonction __, avec les arguments "Resetear el tema a las opciones por defecto" dans le fichier admin.php.Une fonction de traduction utilisée sans text-domain. Fonction __, avec les arguments "Opciones reseteadas" dans le fichier admin.php.Une fonction de traduction utilisée sans text-domain. Fonction __, avec les arguments "Restaurar el theme al estado inicial" dans le fichier admin.php.Une fonction de traduction utilisée sans text-domain. Fonction __, avec les arguments "El tema ha sido reconfigurado a las opciones por defecto." dans le fichier admin.php.Une fonction de traduction utilisée sans text-domain. Fonction __, avec les arguments "¿Estás seguro de restaurar el theme a las opciones iniciales? Esta acción es irreversible." dans le fichier admin.php.Une fonction de traduction utilisée sans text-domain. Fonction __, avec les arguments "Restaurar" dans le fichier admin.php.Une fonction de traduction utilisée sans text-domain. Fonction __, avec les arguments "Esta página web ha sido creada por %s" dans le fichier header.php.Une fonction de traduction utilisée sans text-domain. Fonction __, avec les arguments "Mostrar y ocultar el menú" dans le fichier header.php.Une fonction de traduction utilisée sans text-domain. Fonction __, avec les arguments "Keywords" dans le fichier seo-analysis.php.Une fonction de traduction utilisée sans text-domain. Fonction __, avec les arguments 'Buscar volúmen de una keyword y entidades' dans le fichier seo-analysis.php.Une fonction de traduction utilisée sans text-domain. Fonction __, avec les arguments "Buscar información de" dans le fichier seo-analysis.php.Une fonction de traduction utilisée sans text-domain. Fonction __, avec les arguments "palabras clave" dans le fichier seo-analysis.php.Une fonction de traduction utilisée sans text-domain. Fonction __, avec les arguments "entidades" dans le fichier seo-analysis.php.Une fonction de traduction utilisée sans text-domain. Fonction __, avec les arguments "Término de búsqueda" dans le fichier seo-analysis.php.Une fonction de traduction utilisée sans text-domain. Fonction __, avec les arguments "Presiona la tecla <kbd>ENTER</kbd> para buscar" dans le fichier seo-analysis.php.Une fonction de traduction utilisée sans text-domain. Fonction __, avec les arguments "Sin categoría" dans le fichier seo.php.Une fonction de traduction utilisée sans text-domain. Fonction __, avec les arguments "Sin categoría" dans le fichier seo.php.Une fonction de traduction utilisée sans text-domain. Fonction __, avec les arguments "Sin título" dans le fichier seo.php.Une fonction de traduction utilisée sans text-domain. Fonction __, avec les arguments 'Metatítulo' dans le fichier metaboxes.php.Une fonction de traduction utilisée sans text-domain. Fonction __, avec les arguments 'Añade el título SEO en este campo.' dans le fichier metaboxes.php.Une fonction de traduction utilisée sans text-domain. Fonction __, avec les arguments 'Metadescripción' dans le fichier metaboxes.php.Une fonction de traduction utilisée sans text-domain. Fonction __, avec les arguments 'Añade la descripción SEO en este campo.' dans le fichier metaboxes.php.Une fonction de traduction utilisée sans text-domain. Fonction __, avec les arguments 'Opciones de indexado' dans le fichier metaboxes.php.Une fonction de traduction utilisée sans text-domain. Fonction __, avec les arguments 'Añade la descripción SEO en este campo.' dans le fichier metaboxes.php.Une fonction de traduction utilisée sans text-domain. Fonction __, avec les arguments 'Opciones de seguimiento' dans le fichier metaboxes.php.Une fonction de traduction utilisée sans text-domain. Fonction __, avec les arguments 'Añade la descripción SEO en este campo.' dans le fichier metaboxes.php.Une fonction de traduction utilisée sans text-domain. Fonction __, avec les arguments "Este artículo no está configurado para indexar." dans le fichier metaboxes.php.Une fonction de traduction utilisée sans text-domain. Fonction __, avec les arguments "Falta el meta título y/o la meta descripción." dans le fichier metaboxes.php.Une fonction de traduction utilisée sans text-domain. Fonction __, avec les arguments "¡Todo bien por aquí!" dans le fichier metaboxes.php.Une fonction de traduction utilisée sans text-domain. Fonction __, avec les arguments 'Número de palabras' dans le fichier metaboxes.php.Une fonction de traduction utilisée sans text-domain. Fonction __, avec les arguments 'Estado del SEO' dans le fichier metaboxes.php.Une fonction de traduction utilisée sans text-domain. Fonction __, avec les arguments 'Enlaces' dans le fichier metaboxes.php.Une fonction de traduction utilisée sans text-domain. Fonction __, avec les arguments '¡Sin contenido!' dans le fichier metaboxes.php.Une fonction de traduction utilisée sans text-domain. Fonction __, avec les arguments "Es necesaria la extensión DOMDocument." dans le fichier metaboxes.php.Une fonction de traduction utilisée sans text-domain. Fonction __, avec les arguments '¡Sin enlaces!' dans le fichier metaboxes.php.Une fonction de traduction utilisée sans text-domain. Fonction __, avec les arguments "Enlaces internos" dans le fichier metaboxes.php.Une fonction de traduction utilisée sans text-domain. Fonction __, avec les arguments "Enlaces externos" dans le fichier metaboxes.php.Une fonction de traduction utilisée sans text-domain. Fonction __, avec les arguments "Enlaces ofuscados" dans le fichier metaboxes.php.Une fonction de traduction utilisée sans text-domain. Fonction __, avec les arguments "Enlaces ancla" dans le fichier metaboxes.php.Une fonction de traduction utilisée sans text-domain. Fonction __, avec les arguments "%s enlaces" dans le fichier metaboxes.php.Une fonction de traduction utilisée sans text-domain. Fonction __, avec les arguments "Meta etiquetas" dans le fichier metaboxes.php.Une fonction de traduction utilisée sans text-domain. Fonction __, avec les arguments "Datos estructurados" dans le fichier metaboxes.php.Une fonction de traduction utilisée sans text-domain. Fonction __, avec les arguments "Enlazado interno" dans le fichier metaboxes.php.Une fonction de traduction utilisée sans text-domain. Fonction __, avec les arguments "Análisis de texto" dans le fichier metaboxes.php.Une fonction de traduction utilisée sans text-domain. Fonction __, avec les arguments "Meta título" dans le fichier metaboxes.php.Une fonction de traduction utilisée sans text-domain. Fonction __, avec les arguments "Este es el título que aparecerá en Google y en redes sociales." dans le fichier metaboxes.php.Une fonction de traduction utilisée sans text-domain. Fonction __, avec les arguments "caracteres" dans le fichier metaboxes.php.Une fonction de traduction utilisée sans text-domain. Fonction __, avec les arguments "palabras" dans le fichier metaboxes.php.Une fonction de traduction utilisée sans text-domain. Fonction __, avec les arguments "Meta descripción" dans le fichier metaboxes.php.Une fonction de traduction utilisée sans text-domain. Fonction __, avec les arguments "Esta descripción aparecerá en Google y otros buscadores, así como en las redes sociales." dans le fichier metaboxes.php.Une fonction de traduction utilisée sans text-domain. Fonction __, avec les arguments "caracteres" dans le fichier metaboxes.php.Une fonction de traduction utilisée sans text-domain. Fonction __, avec les arguments "palabras" dans le fichier metaboxes.php.Une fonction de traduction utilisée sans text-domain. Fonction __, avec les arguments "Opciones de indexado" dans le fichier metaboxes.php.Une fonction de traduction utilisée sans text-domain. Fonction __, avec les arguments "Esta opción indica a Google si deseas que aparezca o no esta página en los resultados de búsqueda." dans le fichier metaboxes.php.Une fonction de traduction utilisée sans text-domain. Fonction __, avec les arguments "Opciones de seguimiento" dans le fichier metaboxes.php.Une fonction de traduction utilisée sans text-domain. Fonction __, avec les arguments "Las opciones de follow o nofollow indicarán a Google si debe acceder a este enlace para rastrear su contenido." dans le fichier metaboxes.php.Une fonction de traduction utilisée sans text-domain. Fonction __, avec les arguments 'Completa el título y la descripción para ver la preview de cómo se verá el resultado de búsqueda.' dans le fichier metaboxes.php.Une fonction de traduction utilisée sans text-domain. Fonction __, avec les arguments "Tu resultado de búsqueda se verá así" dans le fichier metaboxes.php.Une fonction de traduction utilisée sans text-domain. Fonction __, avec les arguments "Configuración SEO" dans le fichier metaboxes.php.Une fonction de traduction utilisée sans text-domain. Fonction __, avec les arguments "Tipo de enlace" dans le fichier metaboxes.php.Une fonction de traduction utilisée sans text-domain. Fonction __, avec les arguments "Texto ancla" dans le fichier metaboxes.php.Une fonction de traduction utilisée sans text-domain. Fonction __, avec les arguments "Relación" dans le fichier metaboxes.php.Une fonction de traduction utilisée sans text-domain. Fonction __, avec les arguments "Enlace" dans le fichier metaboxes.php.Une fonction de traduction utilisée sans text-domain. Fonction __, avec les arguments "Interno" dans le fichier metaboxes.php.Une fonction de traduction utilisée sans text-domain. Fonction __, avec les arguments "Externo" dans le fichier metaboxes.php.Une fonction de traduction utilisée sans text-domain. Fonction __, avec les arguments "Ofuscado" dans le fichier metaboxes.php.Une fonction de traduction utilisée sans text-domain. Fonction __, avec les arguments "Ancla" dans le fichier metaboxes.php.Une fonction de traduction utilisée sans text-domain. Fonction __, avec les arguments "Sin texto ancla" dans le fichier metaboxes.php.Une fonction de traduction utilisée sans text-domain. Fonction __, avec les arguments "Esta etiqueta 'rel' no es válida." dans le fichier metaboxes.php.Une fonction de traduction utilisée sans text-domain. Fonction __, avec les arguments "Añadida automáticamente." dans le fichier metaboxes.php.Une fonction de traduction utilisée sans text-domain. Fonction __, avec les arguments "Etiqueta duplicada." dans le fichier metaboxes.php.Une fonction de traduction utilisée sans text-domain. Fonction __, avec les arguments "Añadida automáticamente." dans le fichier metaboxes.php.Une fonction de traduction utilisée sans text-domain. Fonction __, avec les arguments "Esta etiqueta 'rel' no es válida." dans le fichier metaboxes.php.Une fonction de traduction utilisée sans text-domain. Fonction __, avec les arguments "Añadida automáticamente." dans le fichier metaboxes.php.Une fonction de traduction utilisée sans text-domain. Fonction __, avec les arguments "Abre este enlace en una nueva pestaña" dans le fichier metaboxes.php.Une fonction de traduction utilisée sans text-domain. Fonction __, avec les arguments "Esta entrada no tiene ningún enlace en su contenido." dans le fichier metaboxes.php.Une fonction de traduction utilisée sans text-domain. Fonction __, avec les arguments "Éstos son los enlaces de esta entrada:" dans le fichier metaboxes.php.Une fonction de traduction utilisée sans text-domain. Fonction __, avec les arguments "Prueba de velocidad" dans le fichier metaboxes.php.Une fonction de traduction utilisée sans text-domain. Fonction __, avec les arguments "Validar datos estructurados" dans le fichier metaboxes.php.Une fonction de traduction utilisée sans text-domain. Fonction __, avec les arguments "Ver página como GoogleBot" dans le fichier metaboxes.php.Une fonction de traduction utilisée sans text-domain. Fonction __, avec les arguments 'Se han detectado registros de <b>%s</b> en esta instalación. ¿Quieres adaptarlos a %s?' dans le fichier migrations.php.Une fonction de traduction utilisée sans text-domain. Fonction __, avec les arguments 'Puedes %s o bien %s.' dans le fichier migrations.php.Une fonction de traduction utilisée sans text-domain. Fonction __, avec les arguments "migrar la información de %s" dans le fichier migrations.php.Une fonction de traduction utilisée sans text-domain. Fonction __, avec les arguments "no volver a mostrar esta notificación" dans le fichier migrations.php.Une fonction de traduction utilisée sans text-domain. Fonction __, avec les arguments "Herramienta de migración de datos de %s" dans le fichier migrations.php.Une fonction de traduction utilisée sans text-domain. Fonction __, avec les arguments "Esta vista no se puede cargar fuera del panel de administración." dans le fichier migrations.php.Une fonction de traduction utilisée sans text-domain. Fonction __, avec les arguments "No estás a autorizado a utilizar esta función." dans le fichier migrations.php.Une fonction de traduction utilisée sans text-domain. Fonction __, avec les arguments "Herramienta no indicada." dans le fichier migrations.php.Une fonction de traduction utilisée sans text-domain. Fonction __, avec les arguments "Herramienta de migración de datos de %s" dans le fichier migrations.php.Une fonction de traduction utilisée sans text-domain. Fonction __, avec les arguments "La migración no ha podido ser completada. Por favor vuelve a intentarlo." dans le fichier migrations.php.Une fonction de traduction utilisée sans text-domain. Fonction __, avec les arguments "La migración de <b>%s</b> ha sido completada con éxito." dans le fichier migrations.php.Une fonction de traduction utilisée sans text-domain. Fonction __, avec les arguments "No ha sido posible migrar los datos de <b>%s</b>. El mensaje de error devuelto es: %s" dans le fichier migrations.php.Une fonction de traduction utilisée sans text-domain. Fonction __, avec les arguments "Hay datos disponibles de <b>%s</b> para migrar. Al presionar el siguiente botón, se eliminarán todos los registros y se transferirán a %s." dans le fichier migrations.php.Une fonction de traduction utilisée sans text-domain. Fonction __, avec les arguments "Migrar la información" dans le fichier migrations.php.Une fonction de traduction utilisée sans text-domain. Fonction __, avec les arguments "¡Todo está bien por aquí! No hay ningún dato disponible de <b>%s</b> para migrar." dans le fichier migrations.php.Une fonction de traduction utilisée sans text-domain. Fonction __, avec les arguments "Yoast SEO" dans le fichier migrations.php.Une fonction de traduction utilisée sans text-domain. Fonction __, avec les arguments "Rank Math" dans le fichier migrations.php.Une fonction de traduction utilisée sans text-domain. Fonction __, avec les arguments "No reconocido" dans le fichier migrations.php.Une fonction de traduction utilisée sans text-domain. Fonction __, avec les arguments "La metaetiqueta ID %d está asignada a un post que no existe (%d) y ha sido eliminada." dans le fichier migrations.php.Une fonction de traduction utilisée sans text-domain. Fonction __, avec les arguments "Detectada información de %s en el post %d." dans le fichier migrations.php.Une fonction de traduction utilisée sans text-domain. Fonction __, avec les arguments 'La metaetiqueta %s ha sido eliminada.' dans le fichier migrations.php.Une fonction de traduction utilisée sans text-domain. Fonction __, avec les arguments 'La metaetiqueta %s ahora es %s con el valor "%s".' dans le fichier migrations.php.Une fonction de traduction utilisée sans text-domain. Fonction __, avec les arguments 'La metaetiqueta %s ahora es %s con el valor "%s".' dans le fichier migrations.php.Une fonction de traduction utilisée sans text-domain. Fonction __, avec les arguments "Hay una metaetiqueta no reconocida: %s" dans le fichier migrations.php.Une fonction de traduction utilisée sans text-domain. Fonction __, avec les arguments 'Una consulta ha fallado con el siguiente mensaje de error: %s.' dans le fichier migrations.php.Une fonction de traduction utilisée sans text-domain. Fonction __, avec les arguments 'Ejecutadas %d consultas en la base de datos.' dans le fichier migrations.php.Une fonction de traduction utilisée sans text-domain. Fonction __, avec les arguments "Se han revisado todos los registros correctamente." dans le fichier migrations.php.Une fonction de traduction utilisée sans text-domain. Fonction __, avec les arguments "Enlace no válido" dans le fichier external-links.php.Une fonction de traduction utilisée sans text-domain. Fonction __, avec les arguments 'No es posible crear la tabla para el monitor de 404. El mensaje de error devuelto es: ' dans le fichier monitor-404.php.Une fonction de traduction utilisée sans text-domain. Fonction __, avec les arguments "No ha sido posible registrar en el monitor de 404 un acceso a una página no encontrada. Verifica que el campo 'id' sea clave primaria AUTO_INCREMENT." dans le fichier monitor-404.php.Une fonction de traduction utilisée sans text-domain. Fonction __, avec les arguments "No ha sido posible registrar una redirección 404." dans le fichier monitor-404.php.Une fonction de traduction utilisée sans text-domain. Fonction __, avec les arguments "ID de dato estructurado incorrecta." dans le fichier schema.php.Une fonction de traduction utilisée sans text-domain. Fonction __, avec les arguments "Este dato estructurado no tiene campos editables." dans le fichier schema.php.Une fonction de traduction utilisée sans text-domain. Fonction __, avec les arguments "Sin datos para modificar." dans le fichier schema.php.Une fonction de traduction utilisée sans text-domain. Fonction __, avec les arguments "Artículo" dans le fichier schema.php.Une fonction de traduction utilisée sans text-domain. Fonction __, avec les arguments "Los datos estructurados de 'Article' muestran información sobre el artículo y se muestra automáticamente." dans le fichier schema.php.Une fonction de traduction utilisée sans text-domain. Fonction __, avec les arguments "Página web" dans le fichier schema.php.Une fonction de traduction utilisée sans text-domain. Fonction __, avec les arguments "El dato estructurado de página web incluye datos de interés como las redes sociales o las entidades (configurado más abajo)." dans le fichier schema.php.Une fonction de traduction utilisée sans text-domain. Fonction __, avec les arguments "Migas de pan" dans le fichier schema.php.Une fonction de traduction utilisée sans text-domain. Fonction __, avec les arguments "Las migas de pan (breadcrumb) aparecen de manera automática basadas en la URL del artículo o página." dans le fichier schema.php.Une fonction de traduction utilisée sans text-domain. Fonction __, avec les arguments "Preguntas y respuestas" dans le fichier schema.php.Une fonction de traduction utilisée sans text-domain. Fonction __, avec les arguments "Para añadir preguntas y que se muestren en Google es necesario que el contenido de las preguntas esté en el texto. Para ello, utiliza el shortcode [a] para respuestas y [q] para preguntas y se añadirá por sí mismo." dans le fichier schema.php.Une fonction de traduction utilisée sans text-domain. Fonction __, avec les arguments "Evento deportivo" dans le fichier schema.php.Une fonction de traduction utilisée sans text-domain. Fonction __, avec les arguments "Este dato estructurado se utiliza únicamente para mostrar un evento deportivo." dans le fichier schema.php.Une fonction de traduction utilisée sans text-domain. Fonction __, avec les arguments "Este tipo de dato estructurado se configura automáticamente. Únicamente puedes habilitarlo y deshabilitarlo." dans le fichier schema.php.Une fonction de traduction utilisée sans text-domain. Fonction __, avec les arguments "Automático" dans le fichier schema.php.Une fonction de traduction utilisée sans text-domain. Fonction __, avec les arguments "Configurar" dans le fichier schema.php.Une fonction de traduction utilisée sans text-domain. Fonction __, avec les arguments 'Activado' dans le fichier schema.php.Une fonction de traduction utilisée sans text-domain. Fonction __, avec les arguments 'Desactivado' dans le fichier schema.php.Une fonction de traduction utilisée sans text-domain. Fonction __, avec les arguments 'Indexación desactivada' dans le fichier seo.php.Une fonction de traduction utilisée sans text-domain. Fonction __, avec les arguments "El módulo de Google Indexing no está habilitado." dans le fichier indexing-api.php.Une fonction de traduction utilisée sans text-domain. Fonction __, avec les arguments "Es necesario que indiques una clave de API válida en el módulo de Google Indexing." dans le fichier indexing-api.php.Une fonction de traduction utilisée sans text-domain. Fonction __, avec les arguments "Es necesario que indiques una clave de API válida en el módulo de Google Indexing." dans le fichier indexing-api.php.Une fonction de traduction utilisée sans text-domain. Fonction __, avec les arguments "No ha sido posible solicitar la indexación de las URLs seleccionadas." dans le fichier indexing-api.php.Une fonction de traduction utilisée sans text-domain. Fonction __, avec les arguments "Por favor, selecciona URLs válidas para indexar." dans le fichier indexing-api.php.Une fonction de traduction utilisée sans text-domain. Fonction __, avec les arguments 'Indexar' dans le fichier indexing-api.php.Une fonction de traduction utilisée sans text-domain. Fonction __, avec les arguments 'Limpiar caché' dans le fichier cache.php.Une fonction de traduction utilisée sans text-domain. Fonction __, avec les arguments "Refresca la caché de ficheros CSS y Javascript" dans le fichier cache.php.Une fonction de traduction utilisée sans text-domain. Fonction __, avec les arguments "El fichero crítico del CSS no existe." dans le fichier cache.php.Une fonction de traduction utilisée sans text-domain. Fonction __, avec les arguments "Este archivo de caché ha sido creado por %s" dans le fichier cache.php.Une fonction de traduction utilisée sans text-domain. Fonction __, avec les arguments "Especifica una ruta válida para minificar el fichero javascript." dans le fichier cache.php.Une fonction de traduction utilisée sans text-domain. Fonction __, avec les arguments "Estrictamente necesarias" dans le fichier cache.php.Une fonction de traduction utilisée sans text-domain. Fonction __, avec les arguments "Las cookies estrictamente necesarias son aquellas que el sitio web utiliza, por ejemplo, para recordar tu cuenta de usuario si estás registrado cada vez que accedas a la web." dans le fichier cache.php.Une fonction de traduction utilisée sans text-domain. Fonction __, avec les arguments "Publicidad comportamental" dans le fichier cache.php.Une fonction de traduction utilisée sans text-domain. Fonction __, avec les arguments "Este tipo de cookies nos permiten mostrarte publicidad personalizada." dans le fichier cache.php.Une fonction de traduction utilisée sans text-domain. Fonction __, avec les arguments "Analítica" dans le fichier cache.php.Une fonction de traduction utilisée sans text-domain. Fonction __, avec les arguments "Las cookies analíticas permiten analizar tu comportamiento en la página web sin identificarte individualmente. Nos permiten obtener datos de interés para analizar el tráfico." dans le fichier cache.php.Une fonction de traduction utilisée sans text-domain. Fonction __, avec les arguments "Este sitio web utiliza cookies para mejorar tu experiencia de usuario." dans le fichier cache.php.Une fonction de traduction utilisée sans text-domain. Fonction __, avec les arguments "Guardar" dans le fichier cache.php.Une fonction de traduction utilisée sans text-domain. Fonction __, avec les arguments "Aceptar todas y cerrar" dans le fichier cache.php.Une fonction de traduction utilisée sans text-domain. Fonction __, avec les arguments "Saber más" dans le fichier cache.php.Une fonction de traduction utilisée sans text-domain. Fonction __, avec les arguments "Configuración de cookies" dans le fichier cache.php.Une fonction de traduction utilisée sans text-domain. Fonction __, avec les arguments "Aceptar todas" dans le fichier cache.php.Une fonction de traduction utilisée sans text-domain. Fonction __, avec les arguments "Configuración" dans le fichier cache.php.Une fonction de traduction utilisée sans text-domain. Fonction __, avec les arguments "Soluciones afectadas" dans le fichier cache.php.Une fonction de traduction utilisée sans text-domain. Fonction __, avec les arguments "Las cookies son pequeños fragmentos de códigos que son guardados en tu ordenador para optimizar tu experiencia de uso de esta página web. Aquí puedes modificar tu configuración." dans le fichier cache.php.Une fonction de traduction utilisée sans text-domain. Fonction __, avec les arguments 'Icono' dans le fichier questions-post-type.php.Une fonction de traduction utilisée sans text-domain. Fonction __, avec les arguments 'Introduce un %s para el título de la categoría.' dans le fichier questions-post-type.php.Une fonction de traduction utilisée sans text-domain. Fonction __, avec les arguments "Icono" dans le fichier questions-post-type.php.Une fonction de traduction utilisée sans text-domain. Fonction __, avec les arguments 'Preguntas' dans le fichier questions-post-type.php.Une fonction de traduction utilisée sans text-domain. Fonction __, avec les arguments 'Pregunta' dans le fichier questions-post-type.php.Une fonction de traduction utilisée sans text-domain. Fonction __, avec les arguments 'Preguntas' dans le fichier questions-post-type.php.Une fonction de traduction utilisée sans text-domain. Fonction __, avec les arguments 'Añadir pregunta' dans le fichier questions-post-type.php.Une fonction de traduction utilisée sans text-domain. Fonction __, avec les arguments 'Añadir nueva pregunta' dans le fichier questions-post-type.php.Une fonction de traduction utilisée sans text-domain. Fonction __, avec les arguments 'Nueva pregunta' dans le fichier questions-post-type.php.Une fonction de traduction utilisée sans text-domain. Fonction __, avec les arguments 'Editar pregunta' dans le fichier questions-post-type.php.Une fonction de traduction utilisée sans text-domain. Fonction __, avec les arguments 'Ver pregunta' dans le fichier questions-post-type.php.Une fonction de traduction utilisée sans text-domain. Fonction __, avec les arguments 'Todas las preguntas' dans le fichier questions-post-type.php.Une fonction de traduction utilisée sans text-domain. Fonction __, avec les arguments 'Buscar preguntas' dans le fichier questions-post-type.php.Une fonction de traduction utilisée sans text-domain. Fonction __, avec les arguments 'No hay preguntas disponibles.' dans le fichier questions-post-type.php.Une fonction de traduction utilisée sans text-domain. Fonction __, avec les arguments 'No hay preguntas en la papelera.' dans le fichier questions-post-type.php.Une fonction de traduction utilisée sans text-domain. Fonction __, avec les arguments "pregunta" dans le fichier questions-post-type.php.Une fonction de traduction utilisée sans text-domain. Fonction __, avec les arguments 'Categorías' dans le fichier questions-post-type.php.Une fonction de traduction utilisée sans text-domain. Fonction __, avec les arguments 'Categoría' dans le fichier questions-post-type.php.Une fonction de traduction utilisée sans text-domain. Fonction __, avec les arguments 'Categorías' dans le fichier questions-post-type.php.Une fonction de traduction utilisée sans text-domain. Fonction __, avec les arguments 'Todas las categorías' dans le fichier questions-post-type.php.Une fonction de traduction utilisée sans text-domain. Fonction __, avec les arguments 'Categoría padre' dans le fichier questions-post-type.php.Une fonction de traduction utilisée sans text-domain. Fonction __, avec les arguments 'Categoría padre' dans le fichier questions-post-type.php.Une fonction de traduction utilisée sans text-domain. Fonction __, avec les arguments 'Nueva categoría' dans le fichier questions-post-type.php.Une fonction de traduction utilisée sans text-domain. Fonction __, avec les arguments 'Añadir nueva categoría' dans le fichier questions-post-type.php.Une fonction de traduction utilisée sans text-domain. Fonction __, avec les arguments 'Editar categoría' dans le fichier questions-post-type.php.Une fonction de traduction utilisée sans text-domain. Fonction __, avec les arguments 'Actualizar categoría' dans le fichier questions-post-type.php.Une fonction de traduction utilisée sans text-domain. Fonction __, avec les arguments 'Separar elementos con comas' dans le fichier questions-post-type.php.Une fonction de traduction utilisée sans text-domain. Fonction __, avec les arguments 'Buscar categorías' dans le fichier questions-post-type.php.Une fonction de traduction utilisée sans text-domain. Fonction __, avec les arguments 'Añadir o eliminar categorías' dans le fichier questions-post-type.php.Une fonction de traduction utilisée sans text-domain. Fonction __, avec les arguments 'Selecciona de las categorías más usadas' dans le fichier questions-post-type.php.Une fonction de traduction utilisée sans text-domain. Fonction __, avec les arguments 'Categoría de preguntas no encontrada' dans le fichier questions-post-type.php.Une fonction de traduction utilisée sans text-domain. Fonction __, avec les arguments "La configuración de la API de Amazon no es correcta." dans le fichier amazon.php.Une fonction de traduction utilisée sans text-domain. Fonction __, avec les arguments "Error al obtener productos de Amazon (%s): %s" dans le fichier amazon.php.Une fonction de traduction utilisée sans text-domain. Fonction __, avec les arguments "Error de la API de Amazon (Código %s). Respuesta: %s" dans le fichier amazon.php.Une fonction de traduction utilisée sans text-domain. Fonction __, avec les arguments "Error en la respuesta de Amazon. Respuesta: %s" dans le fichier amazon.php.Une fonction de traduction utilisée sans text-domain. Fonction __, avec les arguments "Error en la petición a Amazon de un artículo. Respuesta: %s" dans le fichier amazon.php.Une fonction de traduction utilisée sans text-domain. Fonction __, avec les arguments "Error de la API de Amazon (Código %s). Respuesta: %s" dans le fichier amazon.php.Une fonction de traduction utilisée sans text-domain. Fonction __, avec les arguments "Error de PHP petición a Amazon. Respuesta: %s" dans le fichier amazon.php.Une fonction de traduction utilisée sans text-domain. Fonction __, avec les arguments "No es posible cargar el módulo de Amazon." dans le fichier amazon.php.Une fonction de traduction utilisée sans text-domain. Fonction __, avec les arguments "El shortcode requiere de una ID o Keyword válida." dans le fichier amazon.php.Une fonction de traduction utilisée sans text-domain. Fonction __, avec les arguments "No es posible definir IDs y Keywords al mismo tiempo." dans le fichier amazon.php.Une fonction de traduction utilisée sans text-domain. Fonction __, avec les arguments "Ver en Amazon" dans le fichier amazon.php.Une fonction de traduction utilisée sans text-domain. Fonction __, avec les arguments "Por favor, configura la información de la API de Amazon antes de usar el shortcode." dans le fichier amazon.php.Une fonction de traduction utilisée sans text-domain. Fonction __, avec les arguments "Añade el atributo limit='cantidad' con un valor numérico superior a 0." dans le fichier amazon.php.Une fonction de traduction utilisée sans text-domain. Fonction __, avec les arguments "Sin resultados válidos en la API de Amazon." dans le fichier amazon.php.Une fonction de traduction utilisée sans text-domain. Fonction __, avec les arguments "Error al cargar el producto: %s" dans le fichier amazon.php.Une fonction de traduction utilisée sans text-domain. Fonction __, avec les arguments "Volver a la página principal" dans le fichier customization.php.Une fonction de traduction utilisée sans text-domain. Fonction __, avec les arguments "Logo de la página web" dans le fichier customization.php.Une fonction de traduction utilisée sans text-domain. Fonction __, avec les arguments "The selected font with theme_set_font is not valid." dans le fichier customization.php.Une fonction de traduction utilisée sans text-domain. Fonction __, avec les arguments 'Otras opciones' dans le fichier customization.php.Une fonction de traduction utilisée sans text-domain. Fonction __, avec les arguments 'Entradas' dans le fichier customization.php.Une fonction de traduction utilisée sans text-domain. Fonction __, avec les arguments 'Tablas de contenido' dans le fichier customization.php.Une fonction de traduction utilisée sans text-domain. Fonction __, avec les arguments 'Optimización web' dans le fichier customization.php.Une fonction de traduction utilisée sans text-domain. Fonction __, avec les arguments 'Pie de página' dans le fichier customization.php.Une fonction de traduction utilisée sans text-domain. Fonction __, avec les arguments 'Alto del logo' dans le fichier customization.php.Une fonction de traduction utilisée sans text-domain. Fonction __, avec les arguments 'Mientras más elevado sea este valor, más grande será el logo. Determinará el alto del header en píxeles.' dans le fichier customization.php.Une fonction de traduction utilisée sans text-domain. Fonction __, avec les arguments 'Margen interior del header' dans le fichier customization.php.Une fonction de traduction utilisée sans text-domain. Fonction __, avec les arguments 'Este valor determinará, en píxeles, el espacio superior e inferior dentro del header.' dans le fichier customization.php.Une fonction de traduction utilisée sans text-domain. Fonction __, avec les arguments 'Deshabilitar animaciones por completo' dans le fichier customization.php.Une fonction de traduction utilisée sans text-domain. Fonction __, avec les arguments "Si se indica esta opción, la página web no mostrará ninguna animación. Mejorará el rendimiento en dispositivos low-end." dans le fichier customization.php.Une fonction de traduction utilisée sans text-domain. Fonction __, avec les arguments 'Hacer replegable la tabla de contenidos' dans le fichier customization.php.Une fonction de traduction utilisée sans text-domain. Fonction __, avec les arguments "El índice de la tabla de contenidos aparecerá replegado por defecto en todos los índices." dans le fichier customization.php.Une fonction de traduction utilisée sans text-domain. Fonction __, avec les arguments 'Cargar el CSS en el HTML' dans le fichier customization.php.Une fonction de traduction utilisée sans text-domain. Fonction __, avec les arguments "Al seleccionar esta opción, no se cargará el CSS como fichero. En su lugar aparecerá en el propio HTML. Mejorará el problema de 'bloqueo de renderizado' y el 'cumulative layout shift' de las Core Vitals pero la web cargará más lento." dans le fichier customization.php.Une fonction de traduction utilisée sans text-domain. Fonction __, avec les arguments 'Deshabilitar clic derecho' dans le fichier customization.php.Une fonction de traduction utilisée sans text-domain. Fonction __, avec les arguments "Impide que los usuarios puedan utilizar el clic derecho." dans le fichier customization.php.Une fonction de traduction utilisée sans text-domain. Fonction __, avec les arguments 'Mostrar botón para ir rápidamente al principio de la web' dans le fichier customization.php.Une fonction de traduction utilisée sans text-domain. Fonction __, avec les arguments 'Mostrar pie de página' dans le fichier customization.php.Une fonction de traduction utilisée sans text-domain. Fonction __, avec les arguments 'Número de columnas del footer' dans le fichier customization.php.Une fonction de traduction utilisée sans text-domain. Fonction __, avec les arguments 'Texto inferior' dans le fichier customization.php.Une fonction de traduction utilisée sans text-domain. Fonction __, avec les arguments 'Por defecto aparecerá el símbolo de copyright, el año y nombre del blog. Puedes personalizarlo o dejarlo en blanco para que se autoconfigure.' dans le fichier customization.php.Une fonction de traduction utilisée sans text-domain. Fonction __, avec les arguments 'Mostrar tiempo de lectura' dans le fichier customization.php.Une fonction de traduction utilisée sans text-domain. Fonction __, avec les arguments "En minutos, mostrará el tiempo que se tarda en leer la entrada." dans le fichier customization.php.Une fonction de traduction utilisée sans text-domain. Fonction __, avec les arguments 'Tamaño de la entrada' dans le fichier customization.php.Une fonction de traduction utilisée sans text-domain. Fonction __, avec les arguments 'Indica si quieres mostrar la entrada en formato reducido o que ocupe todo el ancho de la página.' dans le fichier customization.php.Une fonction de traduction utilisée sans text-domain. Fonction __, avec les arguments 'Mostrar imagen del autor' dans le fichier customization.php.Une fonction de traduction utilisée sans text-domain. Fonction __, avec les arguments "¿Quieres que se muestre el avatar del autor?" dans le fichier customization.php.Une fonction de traduction utilisée sans text-domain. Fonction __, avec les arguments 'Mostrar fecha de los artículos' dans le fichier customization.php.Une fonction de traduction utilisée sans text-domain. Fonction __, avec les arguments "Si desmarcas esta opción, la fecha de publicación del artículo no aparecerá." dans le fichier customization.php.Une fonction de traduction utilisée sans text-domain. Fonction __, avec les arguments 'Mostrar botón de compartir' dans le fichier customization.php.Une fonction de traduction utilisée sans text-domain. Fonction __, avec les arguments "Muestra un único boton para compartir en todas las aplicaciones del usuario, sin configuraciones necesarias." dans le fichier customization.php.Une fonction de traduction utilisée sans text-domain. Fonction __, avec les arguments 'Número de posts relacionados' dans le fichier customization.php.Une fonction de traduction utilisée sans text-domain. Fonction __, avec les arguments 'Indica el número de posts relacionados que aparecerán al final de la entrada. Si se indica cero o no hay artículos disponibles, no aparecerá.' dans le fichier customization.php.Une fonction de traduction utilisée sans text-domain. Fonction __, avec les arguments 'Clústers' dans le fichier customization.php.Une fonction de traduction utilisée sans text-domain. Fonction __, avec les arguments 'Diseño de las cajas de entradas' dans le fichier customization.php.Une fonction de traduction utilisée sans text-domain. Fonction __, avec les arguments 'Selecciona el estilo predeterminado para las entradas que aparecen en los clústers.' dans le fichier customization.php.Une fonction de traduction utilisée sans text-domain. Fonction __, avec les arguments "Diseño con caja" dans le fichier customization.php.Une fonction de traduction utilisée sans text-domain. Fonction __, avec les arguments "Diseño con imagen de fondo" dans le fichier customization.php.Une fonction de traduction utilisée sans text-domain. Fonction __, avec les arguments 'Ocultar el autor' dans le fichier customization.php.Une fonction de traduction utilisée sans text-domain. Fonction __, avec les arguments 'Marcando esta opción, no se mostrará en los clústers el autor del artículo.' dans le fichier customization.php.Une fonction de traduction utilisée sans text-domain. Fonction __, avec les arguments 'Ocultar las categorías' dans le fichier customization.php.Une fonction de traduction utilisée sans text-domain. Fonction __, avec les arguments 'Marcando esta opción, no se mostrarán las categorías en los clústers.' dans le fichier customization.php.Une fonction de traduction utilisée sans text-domain. Fonction __, avec les arguments 'Deshabilitar difuminado' dans le fichier customization.php.Une fonction de traduction utilisée sans text-domain. Fonction __, avec les arguments 'Si seleccionas el diseño completo para los clúster, el extracto de las entradas tendrá un difuminado. Selecciona esta opción para deshabilitarlo.' dans le fichier customization.php.Une fonction de traduction utilisée sans text-domain. Fonction __, avec les arguments 'Tamaño del extracto' dans le fichier customization.php.Une fonction de traduction utilisée sans text-domain. Fonction __, avec les arguments 'Indica el número de palabras que deseas que aparezca en los extractos de las entradas, en caso de que esté habilitado.' dans le fichier customization.php.Une fonction de traduction utilisée sans text-domain. Fonction __, avec les arguments 'Fuentes' dans le fichier customization.php.Une fonction de traduction utilisée sans text-domain. Fonction __, avec les arguments 'Fuente principal' dans le fichier customization.php.Une fonction de traduction utilisée sans text-domain. Fonction __, avec les arguments 'Selecciona la fuente principal de la web.' dans le fichier customization.php.Une fonction de traduction utilisée sans text-domain. Fonction __, avec les arguments 'Fuente para títulos' dans le fichier customization.php.Une fonction de traduction utilisée sans text-domain. Fonction __, avec les arguments 'Selecciona la fuente para los títulos de la web. Si utilizas la misma fuente que la principal, la web cargará más rápido.' dans le fichier customization.php.Une fonction de traduction utilisée sans text-domain. Fonction __, avec les arguments 'Tamaño de la fuente' dans le fichier customization.php.Une fonction de traduction utilisée sans text-domain. Fonction __, avec les arguments 'Determinará el tamaño principal de la fuente de la web.' dans le fichier customization.php.Une fonction de traduction utilisée sans text-domain. Fonction __, avec les arguments 'Espaciado entre líneas' dans le fichier customization.php.Une fonction de traduction utilisée sans text-domain. Fonction __, avec les arguments 'Esta opción determinará la cantidad de espacio que hay entre cada una de las líneas. Mientras más grande sea la fuente, más alto debería de ser este valor y viceversa.' dans le fichier customization.php.Une fonction de traduction utilisée sans text-domain. Fonction __, avec les arguments 'Color primario' dans le fichier customization.php.Une fonction de traduction utilisée sans text-domain. Fonction __, avec les arguments 'Color secundario' dans le fichier customization.php.Une fonction de traduction utilisée sans text-domain. Fonction __, avec les arguments 'Color de fondo del menú' dans le fichier customization.php.Une fonction de traduction utilisée sans text-domain. Fonction __, avec les arguments 'Color de enlaces del menú' dans le fichier customization.php.Une fonction de traduction utilisée sans text-domain. Fonction __, avec les arguments 'Color de enlaces del footer' dans le fichier customization.php.Une fonction de traduction utilisée sans text-domain. Fonction __, avec les arguments 'Color de fondo del footer' dans le fichier customization.php.Une fonction de traduction utilisée sans text-domain. Fonction __, avec les arguments 'Color de fondo de la web' dans le fichier customization.php.Une fonction de traduction utilisée sans text-domain. Fonction __, avec les arguments 'Se recomienda utilizar blanco o un gris muy suave para mejorar la experiencia de usuario' dans le fichier customization.php.Une fonction de traduction utilisée sans text-domain. Fonction __, avec les arguments 'Deshabilitar sombras' dans le fichier customization.php.Une fonction de traduction utilisée sans text-domain. Fonction __, avec les arguments 'Deshabilitar el detalle visual de puntos al final de los títulos H1/H2...' dans le fichier customization.php.Une fonction de traduction utilisée sans text-domain. Fonction __, avec les arguments 'Suscripciones' dans le fichier subscriptions.php.Une fonction de traduction utilisée sans text-domain. Fonction __, avec les arguments "Suscripciones" dans le fichier subscriptions.php.Une fonction de traduction utilisée sans text-domain. Fonction __, avec les arguments "Suscriptor" dans le fichier subscriptions.php.Une fonction de traduction utilisée sans text-domain. Fonction __, avec les arguments "Nombre" dans le fichier subscriptions.php.Une fonction de traduction utilisée sans text-domain. Fonction __, avec les arguments "Fecha de registro" dans le fichier subscriptions.php.Une fonction de traduction utilisée sans text-domain. Fonction __, avec les arguments 'No es posible crear la tabla <b>para el listado de suscripciones</b>. El mensaje de error devuelto es: %s' dans le fichier subscriptions.php.Une fonction de traduction utilisée sans text-domain. Fonction __, avec les arguments "Se ha producido un error al insertar el registro en la base de datos." dans le fichier subscriptions.php.Une fonction de traduction utilisée sans text-domain. Fonction __, avec les arguments "¡Suscríbete!" dans le fichier subscriptions.php.Une fonction de traduction utilisée sans text-domain. Fonction __, avec les arguments "Suscríbete a nuestra newsletter, te encantarán nuestros emails con información útil." dans le fichier subscriptions.php.Une fonction de traduction utilisée sans text-domain. Fonction __, avec les arguments "Correo electrónico" dans le fichier subscriptions.php.Une fonction de traduction utilisée sans text-domain. Fonction esc_attr__, avec les arguments 'Añade un menú' dans le fichier menu.php.Une fonction de traduction utilisée sans text-domain. Fonction esc_html__, avec les arguments 'Añade un menú' dans le fichier menu.php.Une fonction de traduction utilisée sans text-domain. Fonction __, avec les arguments '¿Ofuscar enlace?' dans le fichier menu.php.Une fonction de traduction utilisée sans text-domain. Fonction __, avec les arguments "Añade elementos al menú para que aparezcan en esta posición." dans le fichier menu.php.Une fonction de traduction utilisée sans text-domain. Fonction __, avec les arguments 'Menú principal' dans le fichier menu.php.Une fonction de traduction utilisée sans text-domain. Fonction __, avec les arguments 'Menú footer' dans le fichier menu.php.Une fonction de traduction utilisée sans text-domain. Fonction __, avec les arguments 'Menú principal' dans le fichier menu.php.Une fonction de traduction utilisée sans text-domain. Fonction __, avec les arguments 'Posición del menú' dans le fichier menu.php.Une fonction de traduction utilisée sans text-domain. Fonction __, avec les arguments 'Indica si prefieres que el menú aparezca a la izquierda o a la derecha. Esta opción no tendrá efecto si el menú ocupa todo el ancho.' dans le fichier menu.php.Une fonction de traduction utilisée sans text-domain. Fonction __, avec les arguments "Derecha" dans le fichier menu.php.Une fonction de traduction utilisée sans text-domain. Fonction __, avec les arguments "Izquierda" dans le fichier menu.php.Une fonction de traduction utilisée sans text-domain. Fonction __, avec les arguments 'Ocupar todo el ancho de la página' dans le fichier menu.php.Une fonction de traduction utilisée sans text-domain. Fonction __, avec les arguments 'Los botones del menú no aparecerán en la derecha, aparecerán en el centro ocupando todo el ancho.' dans le fichier menu.php.Une fonction de traduction utilisée sans text-domain. Fonction __, avec les arguments 'Fijar header al scroll' dans le fichier menu.php.Une fonction de traduction utilisée sans text-domain. Fonction __, avec les arguments 'El menú principal se desplazará al hacer scroll. También se conoce como sticky header.' dans le fichier menu.php.Une fonction de traduction utilisée sans text-domain. Fonction __, avec les arguments 'Menú móvil' dans le fichier menu.php.Une fonction de traduction utilisée sans text-domain. Fonction __, avec les arguments 'Tipo de menú móvil' dans le fichier menu.php.Une fonction de traduction utilisée sans text-domain. Fonction __, avec les arguments 'Indica si prefieres que el menú aparezca en la cabecera o en un icono flotante.' dans le fichier menu.php.Une fonction de traduction utilisée sans text-domain. Fonction __, avec les arguments "Menú fijo" dans le fichier menu.php.Une fonction de traduction utilisée sans text-domain. Fonction __, avec les arguments "Menú flotante" dans le fichier menu.php.Une fonction de traduction utilisée sans text-domain. Fonction __, avec les arguments '¡Advertencia!' dans le fichier page-priorization.php.Une fonction de traduction utilisée sans text-domain. Fonction __, avec les arguments 'Esta página está sustituyendo a la categoría %s.' dans le fichier page-priorization.php.Une fonction de traduction utilisée sans text-domain. Fonction __, avec les arguments "Pregunta sin título" dans le fichier shortcodes.php.Une fonction de traduction utilisée sans text-domain. Fonction __, avec les arguments "Utiliza el atributo 'address' para indicar la dirección." dans le fichier shortcodes.php.Une fonction de traduction utilisée sans text-domain. Fonction __, avec les arguments "Utiliza el atributo 'view' para indicar el tipo de vista. Si no se pone, será mapa, 'k' para satélite, 'h' para híbrido y 'p' para el terreno." dans le fichier shortcodes.php.Une fonction de traduction utilisée sans text-domain. Fonction __, avec les arguments "Utiliza el atributo 'type' para indicar el color del botón." dans le fichier shortcodes.php.Une fonction de traduction utilisée sans text-domain. Fonction __, avec les arguments "Añade el texto del botón: [button]Texto[/button] para que aparezca." dans le fichier shortcodes.php.Une fonction de traduction utilisée sans text-domain. Fonction __, avec les arguments "Autor no reconocido" dans le fichier shortcodes.php.Une fonction de traduction utilisée sans text-domain. Fonction __, avec les arguments "Utiliza el atributo 'date' para indicar la fecha." dans le fichier shortcodes.php.Une fonction de traduction utilisée sans text-domain. Fonction __, avec les arguments "La fecha indicada no es válida." dans le fichier shortcodes.php.Une fonction de traduction utilisée sans text-domain. Fonction __, avec les arguments "Utiliza el atributo 'text' para indicar el texto o URL del mismo." dans le fichier shortcodes.php.Une fonction de traduction utilisée sans text-domain. Fonction __, avec les arguments "Utiliza el atributo 'width' con un valor numérico mayor o igual a 50." dans le fichier shortcodes.php.Une fonction de traduction utilisée sans text-domain. Fonction __, avec les arguments "Utiliza el atributo 'height' con un valor numérico mayor o igual a 50." dans le fichier shortcodes.php.Une fonction de traduction utilisée sans text-domain. Fonction __, avec les arguments "Lo peor" dans le fichier shortcodes.php.Une fonction de traduction utilisée sans text-domain. Fonction __, avec les arguments "Lo mejor" dans le fichier shortcodes.php.Une fonction de traduction utilisée sans text-domain. Fonction __, avec les arguments "Domingo" dans le fichier shortcodes.php.Une fonction de traduction utilisée sans text-domain. Fonction __, avec les arguments "Sábado" dans le fichier shortcodes.php.Une fonction de traduction utilisée sans text-domain. Fonction __, avec les arguments "Viernes" dans le fichier shortcodes.php.Une fonction de traduction utilisée sans text-domain. Fonction __, avec les arguments "Jueves" dans le fichier shortcodes.php.Une fonction de traduction utilisée sans text-domain. Fonction __, avec les arguments "Miércoles" dans le fichier shortcodes.php.Une fonction de traduction utilisée sans text-domain. Fonction __, avec les arguments "Martes" dans le fichier shortcodes.php.Une fonction de traduction utilisée sans text-domain. Fonction __, avec les arguments "Lunes" dans le fichier shortcodes.php.Une fonction de traduction utilisée sans text-domain. Fonction __, avec les arguments "Diciembre" dans le fichier shortcodes.php.Une fonction de traduction utilisée sans text-domain. Fonction __, avec les arguments "Noviembre" dans le fichier shortcodes.php.Une fonction de traduction utilisée sans text-domain. Fonction __, avec les arguments "Octubre" dans le fichier shortcodes.php.Une fonction de traduction utilisée sans text-domain. Fonction __, avec les arguments "Septiembre" dans le fichier shortcodes.php.Une fonction de traduction utilisée sans text-domain. Fonction __, avec les arguments "Agosto" dans le fichier shortcodes.php.Une fonction de traduction utilisée sans text-domain. Fonction __, avec les arguments "Julio" dans le fichier shortcodes.php.Une fonction de traduction utilisée sans text-domain. Fonction __, avec les arguments "Junio" dans le fichier shortcodes.php.Une fonction de traduction utilisée sans text-domain. Fonction __, avec les arguments "Mayo" dans le fichier shortcodes.php.Une fonction de traduction utilisée sans text-domain. Fonction __, avec les arguments "Abril" dans le fichier shortcodes.php.Une fonction de traduction utilisée sans text-domain. Fonction __, avec les arguments "Marzo" dans le fichier shortcodes.php.Une fonction de traduction utilisée sans text-domain. Fonction __, avec les arguments "Febrero" dans le fichier shortcodes.php.Une fonction de traduction utilisée sans text-domain. Fonction __, avec les arguments "Enero" dans le fichier shortcodes.php.Une fonction de traduction utilisée sans text-domain. Fonction __, avec les arguments 'Elige un tamaño con el atríbuto size del 1 al 12.' dans le fichier shortcodes.php.Une fonction de traduction utilisée sans text-domain. Fonction __, avec les arguments "Artículos relacionados" dans le fichier shortcodes.php.Une fonction de traduction utilisée sans text-domain. Fonction __, avec les arguments "Leer artículo" dans le fichier shortcodes.php.Une fonction de traduction utilisée sans text-domain. Fonction __, avec les arguments "Redactor de %s" dans le fichier shortcodes.php.Une fonction de traduction utilisée sans text-domain. Fonction __, avec les arguments "Redactor de %s" dans le fichier shortcodes.php.Une fonction de traduction utilisée sans text-domain. Fonction __, avec les arguments "Por %s" dans le fichier shortcodes.php.Une fonction de traduction utilisée sans text-domain. Fonction __, avec les arguments "Redactor de %s" dans le fichier shortcodes.php.Une fonction de traduction utilisée sans text-domain. Fonction __, avec les arguments "Redactor de %s" dans le fichier shortcodes.php.Une fonction de traduction utilisée sans text-domain. Fonction __, avec les arguments "Por %s" dans le fichier shortcodes.php.Une fonction de traduction utilisée sans text-domain. Fonction __, avec les arguments 'Mensaje para el administrador: No hay artículos disponibles.' dans le fichier shortcodes.php.Une fonction de traduction utilisée sans text-domain. Fonction __, avec les arguments "Utiliza el atributo 'id' indicando la ID del video." dans le fichier shortcodes.php.Une fonction de traduction utilisée sans text-domain. Fonction __, avec les arguments "El atributo 'id' no es una ID de un video de YouTube válida." dans le fichier shortcodes.php.Une fonction de traduction utilisée sans text-domain. Fonction __, avec les arguments "No es posible mostrar la IP" dans le fichier shortcodes.php.Une fonction de traduction utilisée sans text-domain. Fonction __, avec les arguments "Utiliza el atributo 'percentage' con un valor entre el 0 y el 100." dans le fichier shortcodes.php.Une fonction de traduction utilisée sans text-domain. Fonction __, avec les arguments "El atributo 'height' debe tener un valor numérico entre el 10 y el 50." dans le fichier shortcodes.php.Une fonction de traduction utilisée sans text-domain. Fonction __, avec les arguments "El atributo 'background' solo puede utilizar: 'success', 'info', 'danger' y 'warning'." dans le fichier shortcodes.php.Une fonction de traduction utilisée sans text-domain. Fonction __, avec les arguments 'Por favor, introduce un nombre válido.' dans le fichier shortcodes.php.Une fonction de traduction utilisée sans text-domain. Fonction __, avec les arguments 'Por favor, introduce un nombre válido.' dans le fichier shortcodes.php.Une fonction de traduction utilisée sans text-domain. Fonction __, avec les arguments "Su mensaje contiene caracteres no válidos." dans le fichier shortcodes.php.Une fonction de traduction utilisée sans text-domain. Fonction __, avec les arguments "¿Estás seguro de que has introducido un mensaje válido?" dans le fichier shortcodes.php.Une fonction de traduction utilisée sans text-domain. Fonction __, avec les arguments '¡Lo sentimos! Su mensaje contiene palabras no permitidas.' dans le fichier shortcodes.php.Une fonction de traduction utilisée sans text-domain. Fonction __, avec les arguments '¡Gracias! Su solicitud ha sido recibida correctamente. Le responderemos tan pronto como sea posible.' dans le fichier shortcodes.php.Une fonction de traduction utilisée sans text-domain. Fonction __, avec les arguments 'El formulario de contacto no está disponible en estos momentos.' dans le fichier shortcodes.php.Une fonction de traduction utilisée sans text-domain. Fonction __, avec les arguments "Nombre:" dans le fichier shortcodes.php.Une fonction de traduction utilisée sans text-domain. Fonction __, avec les arguments "Email:" dans le fichier shortcodes.php.Une fonction de traduction utilisée sans text-domain. Fonction __, avec les arguments "Página web:" dans le fichier shortcodes.php.Une fonction de traduction utilisée sans text-domain. Fonction __, avec les arguments "Mensaje:" dans le fichier shortcodes.php.Une fonction de traduction utilisée sans text-domain. Fonction __, avec les arguments "Enviar mensaje" dans le fichier shortcodes.php.Une fonction de traduction utilisée sans text-domain. Fonction __, avec les arguments "Autor no indicado" dans le fichier random-authors.php.Une fonction de traduction utilisée sans text-domain. Fonction __, avec les arguments 'Autor del artículo' dans le fichier random-authors.php.Une fonction de traduction utilisée sans text-domain. Fonction __, avec les arguments "Autores aleatorios activados" dans le fichier random-authors.php.Une fonction de traduction utilisée sans text-domain. Fonction __, avec les arguments 'Autor visible' dans le fichier random-authors.php.Une fonction de traduction utilisée sans text-domain. Fonction __, avec les arguments "Sin autor aleatorio asignado." dans le fichier random-authors.php.Une fonction de traduction utilisée sans text-domain. Fonction __, avec les arguments 'Redactor real' dans le fichier random-authors.php.Une fonction de traduction utilisée sans text-domain. Fonction __, avec les arguments 'Redactor' dans le fichier random-authors.php.Une fonction de traduction utilisée sans text-domain. Fonction __, avec les arguments 'Ir al perfil' dans le fichier random-authors.php.Une fonction de traduction utilisée sans text-domain. Fonction __, avec les arguments 'Editor por defecto para todos los usuarios' dans le fichier classic-editor.php.Une fonction de traduction utilisée sans text-domain. Fonction __, avec les arguments 'Permitir a los usuarios cambiar entre editores' dans le fichier classic-editor.php.Une fonction de traduction utilisée sans text-domain. Fonction _ex, avec les arguments 'Editor clásico', 'Editor Name' dans le fichier classic-editor.php.Une fonction de traduction utilisée sans text-domain. Fonction _ex, avec les arguments 'Gutenberg', 'Editor Name' dans le fichier classic-editor.php.Une fonction de traduction utilisée sans text-domain. Fonction _e, avec les arguments 'Sí' dans le fichier classic-editor.php.Une fonction de traduction utilisée sans text-domain. Fonction _e, avec les arguments 'No' dans le fichier classic-editor.php.Une fonction de traduction utilisée sans text-domain. Fonction _e, avec les arguments 'Editor por defecto' dans le fichier classic-editor.php.Une fonction de traduction utilisée sans text-domain. Fonction _e, avec les arguments 'Opciones del editor' dans le fichier classic-editor.php.Une fonction de traduction utilisée sans text-domain. Fonction _e, avec les arguments 'Editor por defecto para todos los sitios' dans le fichier classic-editor.php.Une fonction de traduction utilisée sans text-domain. Fonction _ex, avec les arguments 'Editor clásico', 'Editor Name' dans le fichier classic-editor.php.Une fonction de traduction utilisée sans text-domain. Fonction _ex, avec les arguments 'Gutenberg', 'Editor Name' dans le fichier classic-editor.php.Une fonction de traduction utilisée sans text-domain. Fonction _e, avec les arguments 'Cambiar opciones' dans le fichier classic-editor.php.Une fonction de traduction utilisée sans text-domain. Fonction _e, avec les arguments 'Permitir a los administradores de la red cambiar las opciones de los editores' dans le fichier classic-editor.php.Une fonction de traduction utilisée sans text-domain. Fonction _e, avec les arguments 'Por defecto, Gutenberg es reemplazado por el editor clásico y los usuarios no podrán cambiar entre editores.' dans le fichier classic-editor.php.Une fonction de traduction utilisée sans text-domain. Fonction _e, avec les arguments 'Cambiar a Gutenberg' dans le fichier classic-editor.php.Une fonction de traduction utilisée sans text-domain. Fonction __, avec les arguments 'Cambiar al editor clásico' dans le fichier classic-editor.php.Une fonction de traduction utilisée sans text-domain. Fonction __, avec les arguments 'Ajustes' dans le fichier classic-editor.php.Une fonction de traduction utilisée sans text-domain. Fonction _x, avec les arguments 'Editar (Gutenberg)', 'Editor Name' dans le fichier classic-editor.php.Une fonction de traduction utilisée sans text-domain. Fonction __, avec les arguments 'EditAR &#8220;%s&#8221; en Gutenberg' dans le fichier classic-editor.php.Une fonction de traduction utilisée sans text-domain. Fonction _x, avec les arguments 'Editar (Editor clásico)', 'Editor Name' dans le fichier classic-editor.php.Une fonction de traduction utilisée sans text-domain. Fonction __, avec les arguments 'Editar &#8220;%s&#8221; en el editor clásico' dans le fichier classic-editor.php.Une fonction de traduction utilisée sans text-domain. Fonction _x, avec les arguments 'editor clásico', 'Editor Name' dans le fichier classic-editor.php.Une fonction de traduction utilisée sans text-domain. Fonction _x, avec les arguments 'Gutenberg', 'Editor Name' dans le fichier classic-editor.php.Une fonction de traduction utilisée sans text-domain. Fonction _x, avec les arguments 'Editor clásico', 'Editor Name' dans le fichier classic-editor.php.Une fonction de traduction utilisée sans text-domain. Fonction _x, avec les arguments 'Gutenberg', 'Editor Name' dans le fichier classic-editor.php.Une fonction de traduction utilisée sans text-domain. Fonction __, avec les arguments "Izquierda" dans le fichier adsense.php.Une fonction de traduction utilisée sans text-domain. Fonction __, avec les arguments "Izquierda (envuelto en el texto)" dans le fichier adsense.php.Une fonction de traduction utilisée sans text-domain. Fonction __, avec les arguments "Centrado" dans le fichier adsense.php.Une fonction de traduction utilisée sans text-domain. Fonction __, avec les arguments "Derecha" dans le fichier adsense.php.Une fonction de traduction utilisée sans text-domain. Fonction __, avec les arguments "Derecha (envuelto en el texto)" dans le fichier adsense.php.Une fonction de traduction utilisée sans text-domain. Fonction __, avec les arguments "Activo" dans le fichier adsense.php.Une fonction de traduction utilisée sans text-domain. Fonction __, avec les arguments "Desactivado" dans le fichier adsense.php.Une fonction de traduction utilisée sans text-domain. Fonction __, avec les arguments "Tabletas" dans le fichier adsense.php.Une fonction de traduction utilisée sans text-domain. Fonction __, avec les arguments "Móviles" dans le fichier adsense.php.Une fonction de traduction utilisée sans text-domain. Fonction __, avec les arguments "Ordenadores" dans le fichier adsense.php.Une fonction de traduction utilisée sans text-domain. Fonction __, avec les arguments "Entradas" dans le fichier adsense.php.Une fonction de traduction utilisée sans text-domain. Fonction __, avec les arguments "Páginas" dans le fichier adsense.php.Une fonction de traduction utilisée sans text-domain. Fonction __, avec les arguments "Categorías" dans le fichier adsense.php.Une fonction de traduction utilisée sans text-domain. Fonction __, avec les arguments "Sólo usar como shortcode" dans le fichier adsense.php.Une fonction de traduction utilisée sans text-domain. Fonction __, avec les arguments "Al principio del contenido" dans le fichier adsense.php.Une fonction de traduction utilisée sans text-domain. Fonction __, avec les arguments "Al final del contenido" dans le fichier adsense.php.Une fonction de traduction utilisée sans text-domain. Fonction __, avec les arguments "Antes del primer H2" dans le fichier adsense.php.Une fonction de traduction utilisée sans text-domain. Fonction __, avec les arguments "Después del primer H2" dans le fichier adsense.php.Une fonction de traduction utilisée sans text-domain. Fonction __, avec les arguments "Antes de la imagen destacada" dans le fichier adsense.php.Une fonction de traduction utilisée sans text-domain. Fonction __, avec les arguments "Después de la imagen destacada" dans le fichier adsense.php.Une fonction de traduction utilisée sans text-domain. Fonction __, avec les arguments "Después del primer párrafo" dans le fichier adsense.php.Une fonction de traduction utilisée sans text-domain. Fonction __, avec les arguments "Después del segundo párrafo" dans le fichier adsense.php.Une fonction de traduction utilisée sans text-domain. Fonction __, avec les arguments "Después del tercer párrafo" dans le fichier adsense.php.Une fonction de traduction utilisée sans text-domain. Fonction __, avec les arguments "Después del cuarto párrafo" dans le fichier adsense.php.Une fonction de traduction utilisée sans text-domain. Fonction __, avec les arguments "Después del quinto párrafo" dans le fichier adsense.php.Une fonction de traduction utilisée sans text-domain. Fonction __, avec les arguments "Después del sexto párrafo" dans le fichier adsense.php.Une fonction de traduction utilisée sans text-domain. Fonction __, avec les arguments "La etiqueta que estás intentando actualizar no es correcta: %s" dans le fichier adsense.php.Une fonction de traduction utilisée sans text-domain. Fonction __, avec les arguments "La etiqueta que estás intentando actualizar no es correcta: %s" dans le fichier adsense.php.Une fonction de traduction utilisée sans text-domain. Fonction __, avec les arguments "Información para administradores: Este anuncio está oculto." dans le fichier adsense.php.Une fonction de traduction utilisée sans text-domain. Fonction __, avec les arguments "Información para administradores: Este anuncio no tiene ningún código válido asignado." dans le fichier adsense.php.Une fonction de traduction utilisée sans text-domain. Fonction __, avec les arguments "Desactivado" dans le fichier adsense.php.Une fonction de traduction utilisée sans text-domain. Fonction __, avec les arguments "Activo" dans le fichier adsense.php.Une fonction de traduction utilisée sans text-domain. Fonction __, avec les arguments "Sin dispositivos de visualización." dans le fichier adsense.php.Une fonction de traduction utilisée sans text-domain. Fonction __, avec les arguments "Anuncios" dans le fichier adsense.php.Une fonction de traduction utilisée sans text-domain. Fonction __, avec les arguments "Anuncio" dans le fichier adsense.php.Une fonction de traduction utilisée sans text-domain. Fonction __, avec les arguments "Anuncios" dans le fichier adsense.php.Une fonction de traduction utilisée sans text-domain. Fonction __, avec les arguments "Añadir anuncio" dans le fichier adsense.php.Une fonction de traduction utilisée sans text-domain. Fonction __, avec les arguments "Añadir nuevo anuncio" dans le fichier adsense.php.Une fonction de traduction utilisée sans text-domain. Fonction __, avec les arguments "Nuevo anuncio" dans le fichier adsense.php.Une fonction de traduction utilisée sans text-domain. Fonction __, avec les arguments "Editar anuncio" dans le fichier adsense.php.Une fonction de traduction utilisée sans text-domain. Fonction __, avec les arguments "Ver anuncio" dans le fichier adsense.php.Une fonction de traduction utilisée sans text-domain. Fonction __, avec les arguments "Todos los anuncios" dans le fichier adsense.php.Une fonction de traduction utilisée sans text-domain. Fonction __, avec les arguments "Anuncio publicado." dans le fichier adsense.php.Une fonction de traduction utilisée sans text-domain. Fonction __, avec les arguments "Buscar anuncios" dans le fichier adsense.php.Une fonction de traduction utilisée sans text-domain. Fonction __, avec les arguments "No hay anuncios disponibles." dans le fichier adsense.php.Une fonction de traduction utilisée sans text-domain. Fonction __, avec les arguments "No hay anuncios en la papelera." dans le fichier adsense.php.Une fonction de traduction utilisée sans text-domain. Fonction __, avec les arguments "Anuncio actualizado." dans le fichier adsense.php.Une fonction de traduction utilisée sans text-domain. Fonction __, avec les arguments "Alineación" dans le fichier adsense.php.Une fonction de traduction utilisée sans text-domain. Fonction __, avec les arguments "Dispositivos de visualización" dans le fichier adsense.php.Une fonction de traduction utilisée sans text-domain. Fonction __, avec les arguments "Shortcode" dans le fichier adsense.php.Une fonction de traduction utilisée sans text-domain. Fonction __, avec les arguments "Estado" dans le fichier adsense.php.Une fonction de traduction utilisée sans text-domain. Fonction __, avec les arguments "Configuración del anuncio" dans le fichier adsense.php.Une fonction de traduction utilisée sans text-domain. Fonction __, avec les arguments "Código del anuncio" dans le fichier adsense.php.Une fonction de traduction utilisée sans text-domain. Fonction __, avec les arguments "Indica un código HTML, un script, un video, una imagen..." dans le fichier adsense.php.Une fonction de traduction utilisée sans text-domain. Fonction __, avec les arguments "Código HTML" dans le fichier adsense.php.Une fonction de traduction utilisée sans text-domain. Fonction __, avec les arguments "Tipos de páginas permitidas" dans le fichier adsense.php.Une fonction de traduction utilisée sans text-domain. Fonction __, avec les arguments "¿En qué tipo de páginas debería de aparecer el anuncio?" dans le fichier adsense.php.Une fonction de traduction utilisée sans text-domain. Fonction __, avec les arguments "¿Donde se mostrará el anuncio?" dans le fichier adsense.php.Une fonction de traduction utilisée sans text-domain. Fonction __, avec les arguments "Alineación" dans le fichier adsense.php.Une fonction de traduction utilisée sans text-domain. Fonction __, avec les arguments "Márgenes" dans le fichier adsense.php.Une fonction de traduction utilisée sans text-domain. Fonction __, avec les arguments "Si quieres que automáticamente se añada margen para la caja del anuncio, indica los píxeles aquí" dans le fichier adsense.php.Une fonction de traduction utilisée sans text-domain. Fonction __, avec les arguments "Dispositivos de visualización" dans le fichier adsense.php.Une fonction de traduction utilisée sans text-domain. Fonction __, avec les arguments "Selecciona los dispositivos donde se visualizará el anuncio." dans le fichier adsense.php.Une fonction de traduction utilisée sans text-domain. Fonction __, avec les arguments "Shortcode" dans le fichier adsense.php.Une fonction de traduction utilisée sans text-domain. Fonction __, avec les arguments "&larr; Recuerda que en las opciones de la izquierda puedes configurarlo para que aparezca automáticamente." dans le fichier adsense.php.Une fonction de traduction utilisée sans text-domain. Fonction __, avec les arguments "Copia y pega este shortcode donde quieras que aparezca el anuncio." dans le fichier adsense.php.Une fonction de traduction utilisée sans text-domain. Fonction __, avec les arguments "Estado del anuncio" dans le fichier adsense.php.Une fonction de traduction utilisée sans text-domain. Fonction __, avec les arguments "El anuncio no es visible para nadie." dans le fichier adsense.php.Une fonction de traduction utilisée sans text-domain. Fonction __, avec les arguments "El anuncio es visible." dans le fichier adsense.php.Une fonction de traduction utilisée sans text-domain. Fonction __, avec les arguments "Cambiar el estado" dans le fichier adsense.php.Une fonction de traduction utilisée sans text-domain. Fonction __, avec les arguments "Información para administradores: El módulo de Adsense no está habilitado." dans le fichier adsense.php.Une fonction de traduction utilisée sans text-domain. Fonction __, avec les arguments "Información para administradores: La ID indicada en el anuncio no es válida." dans le fichier adsense.php.Une fonction de traduction utilisée sans text-domain. Fonction __, avec les arguments "Información para administradores: Este anuncio aparece en más de una ocasión en esta página y no puede mostrarse." dans le fichier adsense.php.Une fonction de traduction utilisée sans text-domain. Fonction __, avec les arguments "Información para administradores: La ID indicada no pertenece a un anuncio válido." dans le fichier adsense.php.Une fonction de traduction utilisée sans text-domain. Fonction __, avec les arguments "Activar anuncios" dans le fichier adsense.php.Une fonction de traduction utilisée sans text-domain. Fonction __, avec les arguments "Desactivar anuncios" dans le fichier adsense.php.Une fonction de traduction utilisée sans text-domain. Fonction _n, avec les arguments "%s anuncio desactivado.", "%s anuncio desactivados." dans le fichier adsense.php.Une fonction de traduction utilisée sans text-domain. Fonction _n, avec les arguments "%s anuncio activado.", "%s anuncio activados." dans le fichier adsense.php.Une fonction de traduction utilisée sans text-domain. Fonction __, avec les arguments '¡Tu sitio web no está vinculado! Si acabas de instalar el tema o quieres volver a vincularlo %s para tener acceso a todas las herramientas.' dans le fichier sevenserp-api.php.Une fonction de traduction utilisée sans text-domain. Fonction __, avec les arguments 'accede aquí' dans le fichier sevenserp-api.php.Une fonction de traduction utilisée sans text-domain. Fonction __, avec les arguments 'No es posible verificar el estado de tu licencia. Las funcionalidades de tu tema están limitadas.' dans le fichier sevenserp-api.php.Une fonction de traduction utilisée sans text-domain. Fonction __, avec les arguments "NULA" dans le fichier sevenserp-api.php.Une fonction de traduction utilisée sans text-domain. Fonction __, avec les arguments "Válida hasta " dans le fichier sevenserp-api.php.Une fonction de traduction utilisée sans text-domain. Fonction __, avec les arguments "Expirada" dans le fichier sevenserp-api.php.Une fonction de traduction utilisée sans text-domain. Fonction __, avec les arguments "Licencia válida hasta " dans le fichier sevenserp-api.php.Une fonction de traduction utilisée sans text-domain. Fonction __, avec les arguments "Expirada" dans le fichier sevenserp-api.php.Une fonction de traduction utilisée sans text-domain. Fonction __, avec les arguments "Validez de tu licencia (ID: #%s)" dans le fichier sevenserp-api.php.Une fonction de traduction utilisée sans text-domain. Fonction __, avec les arguments "Término de búsqueda no válido." dans le fichier sevenserp-api.php.Une fonction de traduction utilisée sans text-domain. Fonction __, avec les arguments "Tipo de término de búsqueda no válido." dans le fichier sevenserp-api.php.Une fonction de traduction utilisée sans text-domain. Fonction __, avec les arguments "Licencia no válida o expirada." dans le fichier sevenserp-api.php.Une fonction de traduction utilisée sans text-domain. Fonction __, avec les arguments "Respuesta del servidor de %s no válida." dans le fichier sevenserp-api.php.Une fonction de traduction utilisée sans text-domain. Fonction __, avec les arguments "Sin respuesta del servidor." dans le fichier sevenserp-api.php.Une fonction de traduction utilisée sans text-domain. Fonction __, avec les arguments "Introduce el siguiente PIN en el panel:" dans le fichier sevenserp-api.php.Une fonction de traduction utilisée sans text-domain. Fonction __, avec les arguments "El servidor de Seven SERP está en estado de mantenimiento. Por favor, espera unos minutos." dans le fichier sevenserp-api.php.Une fonction de traduction utilisée sans text-domain. Fonction __, avec les arguments "Tu blog parece que ha sido vinculado correctamente, sin embargo, no es posible obtener tu código de licencia. Por favor, recarga la página para volver a intentarlo." dans le fichier sevenserp-api.php.Une fonction de traduction utilisée sans text-domain. Fonction __, avec les arguments "El servidor de Seven SERP no puede responder con un PIN válido. Los datos enviados por tu blog no son válidos." dans le fichier sevenserp-api.php.Une fonction de traduction utilisée sans text-domain. Fonction __, avec les arguments "No ha sido posible generar el código PIN. Por favor, asegúrate de que has indicado un %s y que la %s sea correcta. %s." dans le fichier sevenserp-api.php.Une fonction de traduction utilisée sans text-domain. Fonction __, avec les arguments "Título del sitio" dans le fichier sevenserp-api.php.Une fonction de traduction utilisée sans text-domain. Fonction __, avec les arguments "Dirección de WordPress (URL)" dans le fichier sevenserp-api.php.Une fonction de traduction utilisée sans text-domain. Fonction __, avec les arguments 'Accede a Ajustes para resolverlo' dans le fichier sevenserp-api.php.Une fonction de traduction utilisée sans text-domain. Fonction __, avec les arguments "El código de vinculación recibido de 7SERP no es válido. Por favor vuelve a intentarlo en unos minutos." dans le fichier sevenserp-api.php.Une fonction de traduction utilisée sans text-domain. Fonction __, avec les arguments "Se ha producido un error al enviar la petición de solicitud de código PIN. Vuelve a intentarlo pasados unos minutos." dans le fichier sevenserp-api.php.Une fonction de traduction utilisée sans text-domain. Fonction __, avec les arguments "Se ha producido un error al conectar con el servidor de 7SERP. Vuelve a intentarlo refrescando la página." dans le fichier sevenserp-api.php.Une fonction de traduction utilisée sans text-domain. Fonction __, avec les arguments "Se ha producido un error desconocido al generar tu PIN. Vuelve a intentarlo refrescando la página." dans le fichier sevenserp-api.php.Une fonction de traduction utilisée sans text-domain. Fonction __, avec les arguments 'Actualiza el theme' dans le fichier sevenserp-api.php.Une fonction de traduction utilisée sans text-domain. Fonction __, avec les arguments "Se ha producido un error crítico al comprobar la actualización más reciente: %s" dans le fichier sevenserp-api.php.Une fonction de traduction utilisée sans text-domain. Fonction __, avec les arguments 'No es posible reconocer la versión que estás utilizando del tema.' dans le fichier sevenserp-api.php.Une fonction de traduction utilisée sans text-domain. Fonction __, avec les arguments 'Por favor, instala la actualización para solucionarlo.' dans le fichier sevenserp-api.php.Une fonction de traduction utilisée sans text-domain. Fonction __, avec les arguments '¡Hay una nueva actualización disponible!' dans le fichier sevenserp-api.php.Une fonction de traduction utilisée sans text-domain. Fonction __, avec les arguments 'Te recomendamos instalarla lo antes posible.' dans le fichier sevenserp-api.php.Une fonction de traduction utilisée sans text-domain. Fonction __, avec les arguments "Tu sitio web no tiene una suscripción válida activada. Por favor vuelve a vincular tu sitio si crees que se trata de un error." dans le fichier sevenserp-api.php.Une fonction de traduction utilisée sans text-domain. Fonction __, avec les arguments "¡Hecho! Hemos solicitado a Google que indexe las páginas seleccionadas." dans le fichier sevenserp-api.php.Une fonction de traduction utilisée sans text-domain. Fonction __, avec les arguments 'Acceder a %s' dans le fichier sevenserp-api.php.Une fonction de traduction utilisée sans text-domain. Fonction __, avec les arguments "Prueba sin título" dans le fichier health.php.Une fonction de traduction utilisée sans text-domain. Fonction __, avec les arguments "Esta prueba no ha sido provista de ninguna descriptión." dans le fichier health.php.Une fonction de traduction utilisée sans text-domain. Fonction esc_html__, avec les arguments 'Esta prueba ha sido ejecutada por %s.' dans le fichier health.php.Une fonction de traduction utilisée sans text-domain. Fonction esc_html__, avec les arguments "Los nombres de usuario usados para el administrador no son seguros" dans le fichier health.php.Une fonction de traduction utilisée sans text-domain. Fonction __, avec les arguments 'Tener un usuario llamado %s o %s no es seguro. Es extremadamente importante que cambies el nombre de los usuario del administrador a uno menos común y más complejo de adivinar.' dans le fichier health.php.Une fonction de traduction utilisée sans text-domain. Fonction esc_html__, avec les arguments 'Los nombres de usuario usados para el administrador son seguros' dans le fichier health.php.Une fonction de traduction utilisée sans text-domain. Fonction esc_html__, avec les arguments 'Ninguna de la cuentas con permisos de administrador que están registradas utiliza un nombre inseguro.' dans le fichier health.php.Une fonction de traduction utilisée sans text-domain. Fonction esc_html__, avec les arguments 'Hay un plugin de SEO instalado' dans le fichier health.php.Une fonction de traduction utilisée sans text-domain. Fonction __, avec les arguments '<p><b>Tienes instalado un plugin de gestión de SEO externo al tema.</b> Ambos podrían interferir y perjudicar gravemente el SEO de tu página.</p><p>Puedes o bien deshabilitar el plugin o desactivar el módulo de SEO. Si prefieres utilizar el módulo de SEO del tema puedes <a href="#">transferir los datos</a> y no será necesario volver a configurar tus datos de SEO.</p>' dans le fichier health.php.Une fonction de traduction utilisée sans text-domain. Fonction esc_html__, avec les arguments 'El SEO de esta página se gestiona con el tema' dans le fichier health.php.Une fonction de traduction utilisée sans text-domain. Fonction esc_html__, avec les arguments 'El tema gestiona todas las funcionalidades y características del SEO. No hay ningún plugin instalado que pueda interferir con un funcionamiento óptimo.' dans le fichier health.php.Une fonction de traduction utilisée sans text-domain. Fonction __, avec les arguments "No ha sido posible ejecutar los tests adicionales del sistema de salud." dans le fichier health.php.Une fonction de traduction utilisée sans text-domain. Fonction __, avec les arguments "¡Comparte esta entrada!" dans le fichier helpers.php.Une fonction de traduction utilisée sans text-domain. Fonction __, avec les arguments "Compartir" dans le fichier helpers.php.Une fonction de traduction utilisée sans text-domain. Fonction __, avec les arguments "¡Vaya! Aún no tienes productos en tu cesta" dans le fichier woocommerce.php.Une fonction de traduction utilisée sans text-domain. Fonction __, avec les arguments 'Añadir un subtítulo' dans le fichier posts.php.Une fonction de traduction utilisée sans text-domain. Fonction __, avec les arguments "Indica un subtítulo para esta página:" dans le fichier posts.php.Une fonction de traduction utilisée sans text-domain. Fonction __, avec les arguments "Subtítulo" dans le fichier posts.php.Une fonction de traduction utilisée sans text-domain. Fonction __, avec les arguments "Por defecto" dans le fichier posts.php.Une fonction de traduction utilisée sans text-domain. Fonction __, avec les arguments "Centrado con header grande" dans le fichier posts.php.Une fonction de traduction utilisée sans text-domain. Fonction __, avec les arguments 'Ocultar el título de esta página.' dans le fichier posts.php.Une fonction de traduction utilisée sans text-domain. Fonction __, avec les arguments 'Ocultar la imagen destacada.' dans le fichier posts.php.Une fonction de traduction utilisée sans text-domain. Fonction __, avec les arguments "Ocultar relacionados." dans le fichier posts.php.Une fonction de traduction utilisée sans text-domain. Fonction __, avec les arguments "Ocultar enlaces de anterior y siguiente." dans le fichier posts.php.Une fonction de traduction utilisée sans text-domain. Fonction __, avec les arguments "Opciones de visibilidad" dans le fichier posts.php.Une fonction de traduction utilisée sans text-domain. Fonction __, avec les arguments 'Insertar scripts' dans le fichier posts.php.Une fonction de traduction utilisée sans text-domain. Fonction __, avec les arguments "El código HTML que incluyas en este recuadro se mostrará en la parte superior de la página." dans le fichier posts.php.Une fonction de traduction utilisée sans text-domain. Fonction __, avec les arguments "Código HTML" dans le fichier posts.php.Une fonction de traduction utilisée sans text-domain. Fonction __, avec les arguments "Tabla de contenidos" dans le fichier posts.php.Une fonction de traduction utilisée sans text-domain. Fonction __, avec les arguments "Una o varias etiquetas utilizadas en 'exclude' no están permitidas. Introduce 'h1,h2,h3' hasta h6 por ejemplo, para excluir ciertos títulos." dans le fichier posts.php.Une fonction de traduction utilisée sans text-domain. Fonction __, avec les arguments "No se ha mostrado la tabla de contenidos, ya que no hay ningún título para ser mostrado." dans le fichier posts.php.Une fonction de traduction utilisée sans text-domain. Fonction __, avec les arguments "<b>Importante:</b> Solo para que lo sepas, esta %s está siendo reemplazada por el fichero del tema hijo: <b>%s</b>" dans le fichier improve-admin.php.Une fonction de traduction utilisée sans text-domain. Fonction __, avec les arguments "página" dans le fichier improve-admin.php.Une fonction de traduction utilisée sans text-domain. Fonction __, avec les arguments "entrada" dans le fichier improve-admin.php.Une fonction de traduction utilisée sans text-domain. Fonction __, avec les arguments 'Estado: Publicado' dans le fichier improve-admin.php.Une fonction de traduction utilisée sans text-domain. Fonction __, avec les arguments 'Estado: Borrador' dans le fichier improve-admin.php.Une fonction de traduction utilisée sans text-domain. Fonction __, avec les arguments 'Convertir a entrada' dans le fichier improve-admin.php.Une fonction de traduction utilisée sans text-domain. Fonction __, avec les arguments 'Convertir a página' dans le fichier improve-admin.php.Une fonction de traduction utilisée sans text-domain. Fonction _n, avec les arguments '%s artículo cambiado de estado a publicado.', '%s artículos cambiado de estado a publicados.' dans le fichier improve-admin.php.Une fonction de traduction utilisée sans text-domain. Fonction _n, avec les arguments '%s artículo cambiado de estado a borrador.', '%s artículos cambiado de estado a borrador.' dans le fichier improve-admin.php.Une fonction de traduction utilisée sans text-domain. Fonction __, avec les arguments "Creado por %s con %s" dans le fichier improve-admin.php.Une fonction de traduction utilisée sans text-domain. Fonction __, avec les arguments "Versión %s / Versión plantilla %s" dans le fichier improve-admin.php.Une fonction de traduction utilisée sans text-domain. Fonction __, avec les arguments "La base de datos ha sido optimizada automáticamente." dans le fichier db-cleaner.php.Une fonction de traduction utilisée sans text-domain. Fonction __, avec les arguments 'No es posible crear la tabla <b> para las estadísticas de rastreo de robots. El mensaje de error es: ' dans le fichier spiders.php.Une fonction de traduction utilisée sans text-domain. Fonction __, avec les arguments "¡Vaya! Aún no hay registrada ninguna visita de ningún rastreador." dans le fichier spiders.php.Une fonction de traduction utilisée sans text-domain. Fonction __, avec les arguments "Posición" dans le fichier spiders.php.Une fonction de traduction utilisée sans text-domain. Fonction __, avec les arguments "Número de rastreos" dans le fichier spiders.php.Une fonction de traduction utilisée sans text-domain. Fonction __, avec les arguments "Página" dans le fichier spiders.php.Une fonction de traduction utilisée sans text-domain. Fonction __, avec les arguments "La sección de análisis de datos de rastreadores no está disponible hasta que haya visitas registradas." dans le fichier spiders.php.Une fonction de traduction utilisée sans text-domain. Fonction __, avec les arguments "Accesos durante el último mes" dans le fichier spiders.php.Une fonction de traduction utilisée sans text-domain. Fonction __, avec les arguments "Top 10 páginas visitadas" dans le fichier spiders.php.Une fonction de traduction utilisée sans text-domain. Fonction __, avec les arguments "Visitas por tipo de rastreador" dans le fichier spiders.php.Une fonction de traduction utilisée sans text-domain. Fonction __, avec les arguments "Visitas por tipo de HTTP" dans le fichier spiders.php.Une fonction de traduction utilisée sans text-domain. Fonction __, avec les arguments "Robot de APIs de Google." dans le fichier spiders.php.Une fonction de traduction utilisée sans text-domain. Fonction __, avec les arguments "Robot de Adsense para PC." dans le fichier spiders.php.Une fonction de traduction utilisée sans text-domain. Fonction __, avec les arguments "Robot de Adsense para móviles. Comprueba la calidad de los anuncios mostrados en dispositivos móviles." dans le fichier spiders.php.Une fonction de traduction utilisée sans text-domain. Fonction __, avec les arguments "Robot de aplicaciones móviles. Comprueba la calidad de anuncios mostrados en aplicaciones para Android." dans le fichier spiders.php.Une fonction de traduction utilisée sans text-domain. Fonction __, avec les arguments "Robot de Adsense para ordenadores. Comprueba la calidad de los anuncios mostrados en ordenadores." dans le fichier spiders.php.Une fonction de traduction utilisée sans text-domain. Fonction __, avec les arguments "Robot de Google genérico." dans le fichier spiders.php.Une fonction de traduction utilisée sans text-domain. Fonction __, avec les arguments "Robot de Google de obtención de imágenes." dans le fichier spiders.php.Une fonction de traduction utilisée sans text-domain. Fonction __, avec les arguments "Robot de Google News." dans le fichier spiders.php.Une fonction de traduction utilisée sans text-domain. Fonction __, avec les arguments "Robot de Google para videos." dans le fichier spiders.php.Une fonction de traduction utilisée sans text-domain. Fonction __, avec les arguments "Robot de Google de obtención de feeds." dans le fichier spiders.php.Une fonction de traduction utilisée sans text-domain. Fonction __, avec les arguments "Robot de Google. Asistente de Google en Chrome." dans le fichier spiders.php.Une fonction de traduction utilisée sans text-domain. Fonction __, avec les arguments "Robot de Google de obtención de Favicon de la página." dans le fichier spiders.php.Une fonction de traduction utilisée sans text-domain. Fonction __, avec les arguments "Robot de Ahrefs." dans le fichier spiders.php.Une fonction de traduction utilisée sans text-domain. Fonction __, avec les arguments "Robot de Semrush" dans le fichier spiders.php.Une fonction de traduction utilisée sans text-domain. Fonction _e, avec les arguments "¡Vaya! Aún no hay registrada ninguna visita de ningún rastreador." dans le fichier spiders.php.Une fonction de traduction utilisée sans text-domain. Fonction __, avec les arguments "Página" dans le fichier spiders.php.Une fonction de traduction utilisée sans text-domain. Fonction __, avec les arguments "Rastreador" dans le fichier spiders.php.Une fonction de traduction utilisée sans text-domain. Fonction __, avec les arguments "Agente de usuario" dans le fichier spiders.php.Une fonction de traduction utilisée sans text-domain. Fonction __, avec les arguments "IP Usada" dans le fichier spiders.php.Une fonction de traduction utilisée sans text-domain. Fonction __, avec les arguments "Fecha de visita" dans le fichier spiders.php.Une fonction de traduction utilisée sans text-domain. Fonction __, avec les arguments "Host local" dans le fichier spiders.php.Une fonction de traduction utilisée sans text-domain. Fonction __, avec les arguments "El tema ha encontrado posibles fallos críticos de seguridad. Por favor reinstala WordPress o reemplaza estos ficheros por los originales:" dans le fichier security.php.Une fonction de traduction utilisée sans text-domain. Fonction __, avec les arguments "Volver a escanear" dans le fichier security.php.Une fonction de traduction utilisée sans text-domain. Fonction __, avec les arguments 'No es posible crear la tabla <b> para las redirecciones SEO. El mensaje de error devuelto es: ' dans le fichier redirections.php.Une fonction de traduction utilisée sans text-domain. Fonction __, avec les arguments "El código HTTP indicado para la redirección no es válido." dans le fichier redirections.php.Une fonction de traduction utilisée sans text-domain. Fonction __, avec les arguments "La URL de origen indicada no es válida." dans le fichier redirections.php.Une fonction de traduction utilisée sans text-domain. Fonction __, avec les arguments "La URL de origen debe de contener la URL del blog." dans le fichier redirections.php.Une fonction de traduction utilisée sans text-domain. Fonction __, avec les arguments "La URL de origen no es válida." dans le fichier redirections.php.Une fonction de traduction utilisée sans text-domain. Fonction __, avec les arguments "La URL de destino indicada no es válida." dans le fichier redirections.php.Une fonction de traduction utilisée sans text-domain. Fonction __, avec les arguments "La URL de destino no es válida." dans le fichier redirections.php.Une fonction de traduction utilisée sans text-domain. Fonction __, avec les arguments "Se ha producido un error al insertar el registro en la base de datos." dans le fichier redirections.php.Une fonction de traduction utilisée sans text-domain. Fonction __, avec les arguments dans le fichier redirections.php.Une fonction de traduction utilisée sans text-domain. Fonction esc_html__, avec les arguments 'Nunca' dans le fichier blacklist-updater.php.Une fonction de traduction utilisée sans text-domain. Fonction esc_html__, avec les arguments 'Próxima actualización de la lista negra de comentarios: %s' dans le fichier blacklist-updater.php.Une fonction de traduction utilisée sans text-domain. Fonction __, avec les arguments 'En mantenimiento' dans le fichier autoload.php.Une fonction de traduction utilisée sans text-domain. Fonction __, avec les arguments 'Descripción de la nueva Zona de Widgets' dans le fichier widgets.php.Une fonction de traduction utilisée sans text-domain. Fonction __, avec les arguments 'Sidebar' dans le fichier widgets.php.Une fonction de traduction utilisée sans text-domain. Fonction __, avec les arguments 'Zona lateral de la página' dans le fichier widgets.php.Une fonction de traduction utilisée sans text-domain. Fonction __, avec les arguments "La clase 'Seven_Spintax' no ha podido ser cargada." dans le fichier content-generator.php.Une fonction de traduction utilisée sans text-domain. Fonction __, avec les arguments "Generado" dans le fichier content-generator.php.Une fonction de traduction utilisée sans text-domain. Fonction __, avec les arguments "Esta entrada se utiliza como plantilla para el generador de contenido." dans le fichier content-generator.php.Une fonction de traduction utilisée sans text-domain. Fonction __, avec les arguments "Plantilla" dans le fichier content-generator.php.Une fonction de traduction utilisée sans text-domain. Fonction __, avec les arguments 'No es posible crear la tabla para la generación de contenido. El mensaje de error devuelto es: ' dans le fichier content-generator.php.Une fonction de traduction utilisée sans text-domain. Fonction __, avec les arguments "Un artículo no ha podido ser generado por motivos desconocidos. Abortada generación de contenido." dans le fichier content-generator.php.Une fonction de traduction utilisée sans text-domain. Fonction __, avec les arguments "La tabla de la base de datos para la generación de contenido no está creada." dans le fichier content-generator.php.Une fonction de traduction utilisée sans text-domain. Fonction __, avec les arguments "Es necesario definir las palabras clave antes de generar contenido." dans le fichier content-generator.php.Une fonction de traduction utilisée sans text-domain. Fonction __, avec les arguments "Es necesario indicar el tipo de contenido a generar. Se admite 'post' o 'page'." dans le fichier content-generator.php.Une fonction de traduction utilisée sans text-domain. Fonction __, avec les arguments "El tipo de post indicado no existe." dans le fichier content-generator.php.Une fonction de traduction utilisée sans text-domain. Fonction __, avec les arguments "Es necesario indicar el título que se utilizará." dans le fichier content-generator.php.Une fonction de traduction utilisée sans text-domain. Fonction __, avec les arguments "El título indicado no es válido." dans le fichier content-generator.php.Une fonction de traduction utilisée sans text-domain. Fonction __, avec les arguments "No hay ninguna palabra clave indicada en el título." dans le fichier content-generator.php.Une fonction de traduction utilisée sans text-domain. Fonction __, avec les arguments "Es necesario el contenido que se utilizará." dans le fichier content-generator.php.Une fonction de traduction utilisée sans text-domain. Fonction __, avec les arguments "El contenido indicado para la generación de contenido no es válido. Por favor indica un contenido válido." dans le fichier content-generator.php.Une fonction de traduction utilisée sans text-domain. Fonction __, avec les arguments "No hay ninguna palabra clave indicada en el contenido." dans le fichier content-generator.php.Une fonction de traduction utilisée sans text-domain. Fonction __, avec les arguments "El grupo de palabras clave %s usada en el contenido o título no está registrada en tus plantillas." dans le fichier content-generator.php.Une fonction de traduction utilisée sans text-domain. Fonction __, avec les arguments "No hay ninguna palabra clave dentro del grupo %s." dans le fichier content-generator.php.Une fonction de traduction utilisée sans text-domain. Fonction __, avec les arguments 'Esta página ha sido generada automáticamente desde la plantilla <b><a href="%s" target="_blank">%s</a></b>.' dans le fichier content-generator.php.Une fonction de traduction utilisée sans text-domain. Fonction __, avec les arguments '¡Advertencia!' dans le fichier content-generator.php.Une fonction de traduction utilisée sans text-domain. Fonction __, avec les arguments 'Esta página o entrada es una plantilla para generar contenido.' dans le fichier content-generator.php.Une fonction de traduction utilisée sans text-domain. Fonction __, avec les arguments 'La visibilidad ha sido marcada como privada.' dans le fichier content-generator.php.Une fonction de traduction utilisée sans text-domain. Fonction __, avec les arguments "Se han generado un total de %d páginas, de las cuales %d se han actualizado porque ya existían." dans le fichier content-generator.php.Une fonction de traduction utilisée sans text-domain. Fonction __, avec les arguments "No ha sido posible generar ninguna página." dans le fichier content-generator.php.Une fonction de traduction utilisée sans text-domain. Fonction __, avec les arguments "Generador de contenido" dans le fichier content-generator.php.Une fonction de traduction utilisée sans text-domain. Fonction __, avec les arguments "Esta página ha sido generada automáticamente mediante el módulo de generador de contenido." dans le fichier content-generator.php.Une fonction de traduction utilisée sans text-domain. Fonction __, avec les arguments "En caso de usar esta página como plantilla para generar contenido, activa el checkbox y completa los detalles. Posteriormente haz clic en 'Actualizar' y se generará el contenido." dans le fichier content-generator.php.Une fonction de traduction utilisée sans text-domain. Fonction __, avec les arguments 'Usar como plantilla para generación de contenido.' dans le fichier content-generator.php.Une fonction de traduction utilisée sans text-domain. Fonction __, avec les arguments 'Límite de artículos a añadir:' dans le fichier content-generator.php.Une fonction de traduction utilisée sans text-domain. Fonction __, avec les arguments 'Palabras clave' dans le fichier content-generator.php.Une fonction de traduction utilisée sans text-domain. Fonction __, avec les arguments 'Palabras clave' dans le fichier content-generator.php.Une fonction de traduction utilisée sans text-domain. Fonction __, avec les arguments 'Indica un nombre válido.' dans le fichier content-generator.php.Une fonction de traduction utilisée sans text-domain. Fonction __, avec les arguments '¡Modificaciones guardadas!' dans le fichier content-generator.php.Une fonction de traduction utilisée sans text-domain. Fonction __, avec les arguments 'Palabras clave' dans le fichier content-generator.php.Une fonction de traduction utilisée sans text-domain. Fonction __, avec les arguments "Volver al listado" dans le fichier content-generator.php.Une fonction de traduction utilisée sans text-domain. Fonction __, avec les arguments "Volver a la lista" dans le fichier content-generator.php.Une fonction de traduction utilisée sans text-domain. Fonction __, avec les arguments "Volver atrás" dans le fichier content-generator.php.Une fonction de traduction utilisée sans text-domain. Fonction __, avec les arguments "Editar" dans le fichier content-generator.php.Une fonction de traduction utilisée sans text-domain. Fonction __, avec les arguments "Eliminar grupo" dans le fichier content-generator.php.Une fonction de traduction utilisée sans text-domain. Fonction __, avec les arguments "Añadir nuevo grupo" dans le fichier content-generator.php.Une fonction de traduction utilisée sans text-domain. Fonction __, avec les arguments "Introduce un nombre para un grupo de palabras clave. Por ejemplo, Ciudad para: Bogotá, Madrid..." dans le fichier content-generator.php.Une fonction de traduction utilisée sans text-domain. Fonction __, avec les arguments "Introduce las palabras clave que formarán parte de este grupo.<br>Por ejemplo, para un hipotético grupo 'Ciudad', sus palabras serían 'Madrid', 'Bogotá'... <b>Solo una por línea.</b>" dans le fichier content-generator.php.Une fonction de traduction utilisée sans text-domain. Fonction __, avec les arguments "Añadir grupo" dans le fichier content-generator.php.Une fonction de traduction utilisée sans text-domain. Fonction __, avec les arguments "Por favor, confirma que vas a eliminar este grupo de palabras. Esta acción es irreversible." dans le fichier content-generator.php.Une fonction de traduction utilisée sans text-domain. Fonction __, avec les arguments "Estoy seguro, eliminar" dans le fichier content-generator.php.Une fonction de traduction utilisée sans text-domain. Fonction __, avec les arguments "Editar palabras" dans le fichier content-generator.php.Une fonction de traduction utilisée sans text-domain. Fonction __, avec les arguments 'Estas son las palabras clave (%d) que forman parte de este grupo. Puedes eliminarlas o añadir tantas como necesites.' dans le fichier content-generator.php.Une fonction de traduction utilisée sans text-domain. Fonction __, avec les arguments "Este grupo de palabras clave <b>aún no tiene ninguna keyword añadida</b>." dans le fichier content-generator.php.Une fonction de traduction utilisée sans text-domain. Fonction __, avec les arguments "Presiona el botón editar para modificarlas." dans le fichier content-generator.php.Une fonction de traduction utilisée sans text-domain. Fonction __, avec les arguments 'En esta sección se pueden gestionar los grupos de palabras clave con los que se generará el nuevo contenido. Para más información accede a %s.' dans le fichier content-generator.php.Une fonction de traduction utilisée sans text-domain. Fonction __, avec les arguments "la documentación" dans le fichier content-generator.php.Une fonction de traduction utilisée sans text-domain. Fonction __, avec les arguments 'Aún no hay ningún grupo de palabras clave definidos.' dans le fichier content-generator.php.Une fonction de traduction utilisée sans text-domain. Fonction __, avec les arguments 'Éstos son los grupos de palabras clave (%d).' dans le fichier content-generator.php.Une fonction de traduction utilisée sans text-domain. Fonction __, avec les arguments 'Editar palabras clave de este grupo' dans le fichier content-generator.php.Une fonction de traduction utilisée sans text-domain. Fonction __, avec les arguments 'Eliminación' dans le fichier content-generator.php.Une fonction de traduction utilisée sans text-domain. Fonction __, avec les arguments 'Eliminación' dans le fichier content-generator.php.Une fonction de traduction utilisée sans text-domain. Fonction __, avec les arguments "Contenido eliminado correctamente" dans le fichier content-generator.php.Une fonction de traduction utilisée sans text-domain. Fonction __, avec les arguments 'Se han eliminado %d posts correctamente.' dans le fichier content-generator.php.Une fonction de traduction utilisée sans text-domain. Fonction __, avec les arguments "Eliminado post ID %d." dans le fichier content-generator.php.Une fonction de traduction utilisée sans text-domain. Fonction __, avec les arguments "No hay contenido para eliminar" dans le fichier content-generator.php.Une fonction de traduction utilisée sans text-domain. Fonction __, avec les arguments 'No existe ningún post generado automáticamente que pueda eliminarse.' dans le fichier content-generator.php.Une fonction de traduction utilisée sans text-domain. Fonction __, avec les arguments "Se ha producido un error" dans le fichier content-generator.php.Une fonction de traduction utilisée sans text-domain. Fonction __, avec les arguments "El contenido generado automáticamente no se ha podido eliminar por motivos desconocidos." dans le fichier content-generator.php.Une fonction de traduction utilisée sans text-domain. Fonction __, avec les arguments 'Eliminar contenido generado' dans le fichier content-generator.php.Une fonction de traduction utilisée sans text-domain. Fonction __, avec les arguments "Vas a eliminar todo el contenido generado automáticamente, ¿estás seguro?" dans le fichier content-generator.php.Une fonction de traduction utilisée sans text-domain. Fonction __, avec les arguments 'Sí, eliminar el contenido' dans le fichier content-generator.php.Une fonction de traduction utilisée sans text-domain. Fonction __, avec les arguments "Centro de ayuda" dans le fichier single-question.php.Une fonction de traduction utilisée sans text-domain. Fonction __, avec les arguments "La plantilla predeterminada seleccionada no existe." dans le fichier single.php.Une fonction de traduction utilisée sans text-domain. Fonction __, avec les arguments "Fecha de publicación" dans le fichier single-centered.php.Une fonction de traduction utilisée sans text-domain. Fonction __, avec les arguments "Tiempo de lectura" dans le fichier single-centered.php.Une fonction de traduction utilisée sans text-domain. Fonction __, avec les arguments "1 minuto" dans le fichier single-centered.php.Une fonction de traduction utilisée sans text-domain. Fonction __, avec les arguments "%d minutos" dans le fichier single-centered.php.Une fonction de traduction utilisée sans text-domain. Fonction __, avec les arguments "Artículo anterior" dans le fichier single-centered.php.Une fonction de traduction utilisée sans text-domain. Fonction __, avec les arguments "Siguiente artículo" dans le fichier single-centered.php.Une fonction de traduction utilisée sans text-domain. Fonction __, avec les arguments "Centro de ayuda" dans le fichier faq_home.php.Une fonction de traduction utilisée sans text-domain. Fonction __, avec les arguments "Categoría sin nombre" dans le fichier faq_home.php.Une fonction de traduction utilisée sans text-domain. Fonction __, avec les arguments "No hay artículos en esta categoría." dans le fichier faq_home.php.Une fonction de traduction utilisée sans text-domain. Fonction _e, avec les arguments "Sitio en mantenimiento" dans le fichier maintenance.php.Une fonction de traduction utilisée sans text-domain. Fonction _e, avec les arguments "Este sitio web se encuentra en estos momentos dentro de un mantenimiento programado." dans le fichier maintenance.php.Une fonction de traduction utilisée sans text-domain. Fonction __, avec les arguments "No indicado" dans le fichier aviso-legal.php.Une fonction de traduction utilisée sans text-domain. Fonction __, avec les arguments "No indicado" dans le fichier aviso-legal.php.Une fonction de traduction utilisée sans text-domain. Fonction __, avec les arguments "No indicado" dans le fichier aviso-legal.php.Une fonction de traduction utilisée sans text-domain. Fonction __, avec les arguments "(Ciudad no indicada)" dans le fichier aviso-legal.php.Une fonction de traduction utilisée sans text-domain. Fonction __, avec les arguments "Centro de ayuda" dans le fichier faq_question.php.Une fonction de traduction utilisée sans text-domain. Fonction __, avec les arguments "Fecha de publicación" dans le fichier single-default.php.Une fonction de traduction utilisée sans text-domain. Fonction __, avec les arguments "Tiempo de lectura" dans le fichier single-default.php.Une fonction de traduction utilisée sans text-domain. Fonction __, avec les arguments "1 minuto" dans le fichier single-default.php.Une fonction de traduction utilisée sans text-domain. Fonction __, avec les arguments "%d minutos" dans le fichier single-default.php.Une fonction de traduction utilisée sans text-domain. Fonction __, avec les arguments "Artículo anterior" dans le fichier single-default.php.Une fonction de traduction utilisée sans text-domain. Fonction __, avec les arguments "Siguiente artículo" dans le fichier single-default.php.Une fonction de traduction utilisée sans text-domain. Fonction _e, avec les arguments "Introduce una palabra para buscar" dans le fichier searchform.php.Une fonction de traduction utilisée sans text-domain. Fonction _e, avec les arguments "Buscar" dans le fichier searchform.php.Une fonction de traduction utilisée sans text-domain. Fonction __, avec les arguments dans le fichier functions.php.Une fonction de traduction utilisée sans text-domain. Fonction __, avec les arguments 'RAM: %sM de %s' dans le fichier functions.php.Une fonction de traduction utilisée sans text-domain. Fonction __, avec les arguments '(Debug) Carga: %s' dans le fichier functions.php.Plusieurs text-domain sont utilisés dans le thème. Cela signifie que le thème n'est pas compatible avec les language packs de WordPress. Les domaines trouvés sont text-domain, classic-editor, change_to_post, change_to_page, ), twentytwenty.
  4. Contextes de plugin : Fonctionnalités de pluginLe thème utilise la fonction register_post_type(). Cette fonction n'est pas prévue pour être utilisée dans le contexte d'un thème, mais plutôt dans un plugin.Le thème utilise la fonction add_shortcode(). L'utilisation des custom post-content shortcodes est du domaine des plugins.
  5. Répertoires indésirables : Répertoire de control de version GITA.git a été trouvé.
  6. Barre d'admin cachée : Barre d'admin cachée dans CSSLes thèmes ne doivent pas cacher la barre d'admin. Détecté dans le fichier admin-fixed.css.
  7. Eléments fondamentaux : Présence de language_attributes() introuvable.
  8. Eléments fondamentaux : Présence de add_theme_support()add_theme_support( 'automatic-feed-links' ) introuvable.
  9. Eléments fondamentaux : Présence de wp_link_pages()wp_link_pages introuvable.
  10. Eléments fondamentaux : Présence de post_class()post_class introuvable.
  11. Eléments custom : Présence d'une entête customAucune référence à custom header n'a été trouvée dans le thème.
  12. Eléments custom : Présence d'un fond customAucune référence à custom background n'a été trouvée dans le thème.
  13. Editor style : Présence de l'édition de styleAucune référence à add_editor_style() n'a été trouvée dans le thème. Il est recommandé que le thème implémente l'édition de style, de manière à faire correspondre le contenu de l'éditeur l'affichage dans le thème.
  14. Implémentation de l'internationalisation : Utilisation correcte de ___al(La variable $ex a été trouvée dans une fonction de traduction dans le fichier monitor-404.php . Les appels de fonctions de traduction ne doivent pas contenir de variables PHP. 47: ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;'); }catch(Exception $ex){ add_action( 'admin_notices', function() { $class = 'notice notice-error'; $message = __( 'No es posible crear la tabla para el monitor de 404. El mensaje de errLa variable $ex a été trouvée dans une fonction de traduction dans le fichier spiders.php . Les appels de fonctions de traduction ne doivent pas contenir de variables PHP. La variable $ex a été trouvée dans une fonction de traduction dans le fichier redirections.php . Les appels de fonctions de traduction ne doivent pas contenir de variables PHP. La variable $descriptions a été trouvée dans une fonction de traduction dans le fichier redirections.php . Les appels de fonctions de traduction ne doivent pas contenir de variables PHP. 44: ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;'); }catch(Exception $ex){ add_action( 'admin_notices', function() { $class = 'notice notice-error'; $message = __( 'No es posible crear la tabla <b> para las redirecciones SEO. El mensaje de error devuelto es: '.$ex->getMessage()); printf('<div class='%1$s'><p>%2$s</p></div>', esc_attr($class), esc_html($message)); }); } } } public function table_exists(): bool{ return $this->table_exists; } private function check_wpdb_redirect_db(){ return (strtolower($this->wpdb->get_var('SHOW TABLES LIKE ''.$this->table.''')) === (string)trim(strtolower($this->table))); } public function current_url(){ return (isset($_SERVER['HTTPS']) && $_SERVER['HTTPS'] === 'on' ? 'https' : 'http') . '://$_SERVER[HTTP_HOST]$_SERVER[REQUEST_URI]'; } public function get(){ if(!$this->table_exists) return []; $results = $this->wpdb->get_results( 'SELECT * FROM '.$this->table ); return $results; } public function sum_redirect($id=0){ if(!$this->table_exists) return false; if(!is_numeric($id)) return false; $this->wpdb->query($this->wpdb->prepare('UPDATE '.$this->table.' SET redirects=redirects+1 WHERE id=%d', $id)); } public function remove($id=0){ if(!$this->table_exists) return false; if(!is_numeric($id)) return false; return $this->wpdb->delete($this->table, ['id' => $id], array('%d')); } public function add($url, $to, $code){ if(!$this->table_exists) return false; if(!$this->valid_code($code)){ return ['error' => __('El código HTTP indicado para la redirección no es válido.', TRANSLATIONS), 'result' => false]; } if(strlen(trim($url))==0){ return ['error' => __('La URL de origen indicada no es válida.', TRANSLATIONS), 'result' => false]; } if(strpos($url, get_site_url()) === FALSE){ return ['error' => __('La URL de origen debe de contener la URL del blog.', TRANSLATIONS), 'result' => false]; } if(!filter_var($url, FILTER_VALIDATE_URL)){ return ['error' => __('La URL de origen no es válida.', TRANSLATIONS), 'result' => false]; } if(strlen(trim($to))==0){ return ['error' => __('La URL de destino indicada no es válida.', TRANSLATIONS), 'result' => false]; } if(!filter_var($to, FILTER_VALIDATE_URL)){ return ['error' => __('La URL de destino no es válida.', TRANSLATIONS), 'result' => false]; } $result = $this->wpdb->insert($this->table, ['url' => $url, 'to_url' => $to, 'http_code' => $code, 'redirects' => 0], ['%s', '%s', '%d', '%d']); return ($result ? ['result' => true] : ['result' => false, 'error' => __('Se ha producido un error al insertar el registro en la base de datos.')]); } public function get_codes(){ return [301, 302, 303, 307, 308, 410]; } public function get_code_description($code=301){ $descriptions = [ '301' => 'Permanente', '302' => 'Temporal', '303' => 'Ver otros', '307' => 'Temporal', '308' => 'Permanente', '410' => 'Recurso no disponible' ]; return (isset($descriptions[$code]) ? ' ('.__(trim($descriptions[$code]), TRANSLATIONS).')' : NULL); } private functioLa variable $column a été trouvée dans une fonction de traduction dans le fichier widgets.php . Les appels de fonctions de traduction ne doivent pas contenir de variables PHP. 37: if(!defined('ABSPATH')){ header('HTTP/1.0 403 Forbidden'); exit; } define('FOOTER_DEFAULT_COLUMNS', 0); define('FOOTER_MAX_COLUMNS', 4); define('MAX_BOOTSTRAP_COL_LENGTH', 12); function get_footer_columns_number(){ $columns_number = get_theme_mod('footer_columns'); if(!$columns_number || !is_numeric($columns_number) || $columns_number<0){ return FOOTER_DEFAULT_COLUMNS; } if($columns_number>FOOTER_MAX_COLUMNS){ return FOOTER_MAX_COLUMNS; } if($columns_number==0) return 0; return (int)$columns_number; } function get_footer_widget_class(){ $columns_number = get_footer_columns_number(); return 'col-lg-'.(MAX_BOOTSTRAP_COL_LENGTH/$columns_number); } add_action( 'widgets_init', function(){ try{ $columns_number = get_footer_columns_number(); if($columns_number>0){ foreach(range(1, $columns_number) as $column){ register_sidebar([ 'name' => __('Pie de página (Columna '.$column.')'), 'id' => 'footer_widgets_'.$coluLa variable $this a été trouvée dans une fonction de traduction dans le fichier content-generator.php . Les appels de fonctions de traduction ne doivent pas contenir de variables PHP. 37: if(!defined('ABSPATH')){ header('HTTP/1.0 403 Forbidden'); exit; } if(!class_exists('Content_Generator')){ class Content_Generator{ private $permissions = 'manage_options'; private $menu_slug = 'content-generator'; private $default_limit = 150; private $default_post_type = 'post'; private $create_action = 'create'; private $delete_action = 'create'; private $generated_meta = '_generated'; private $template_meta = '_content_generator_template'; private $nonce = 'content_generator_nonce'; private $wpdb; private $table = NULL; private $table_name = NULL; private $table_exists = false; private $spintax = NULL; function __construct(){ if(!class_exists('Seven_Spintax')){ throw new Exception(__('La clase 'Seven_Spintax' no ha podido ser cargada.', $this->get_translaLa variable $this a été trouvée dans une fonction de traduction dans le fichier content-generator.php . Les appels de fonctions de traduction ne doivent pas contenir de variables PHP. 37: if(!defined('ABSPATH')){ header('HTTP/1.0 403 Forbidden'); exit; } if(!class_exists('Content_Generator')){ class Content_Generator{ private $permissions = 'manage_options'; private $menu_slug = 'content-generator'; private $default_limit = 150; private $default_post_type = 'post'; private $create_action = 'create'; private $delete_action = 'create'; private $generated_meta = '_generated'; private $template_meta = '_content_generator_template'; private $nonce = 'content_generator_nonce'; private $wpdb; private $table = NULL; private $table_name = NULL; private $table_exists = false; private $spintax = NULL; function __construct(){ if(!class_exists('Seven_Spintax')){ throw new Exception(__('La clase 'Seven_Spintax' no ha podido ser cargada.', $this->get_translations())); }else{ $this->spintax = (new Seven_Spintax()); } global $wpdb; $this->wpdb = $wpdb; $this->table_name = 'content_generator'; $this->table = '{$wpdb->prefix}'.$this->table_name; $this->table_exists = $this->check_wpdb_content_generator_db(); if($this->table_exists() && is_admin()){ $this->display_post_states(); } add_action('admin_notices', [new AdminNotice(), 'displayAdminNotice']); } public function check_wpdb_content_generator_db(){ if(strtolower($this->wpdb->get_var('SHOW TABLES LIKE ''.$this->table.''')) === strtolower($this->table)){ return true; } return false; } public static function slugify($text){ $text = preg_replace('~[^\pL\d]+~u', '-', $text); $text = iconv('utf-8', 'us-ascii//TRANSLIT', $text); $text = preg_replace('~[^-\w]+~', '', $text); $text = trim($text, '-'); $text = preg_replace('~-+~', '-', $text); $text = strtolower($text); return $text; } private function get_keyword_slug($keyword){ return $this->slugify($keyword); } private function get_keyword_parent_title($keyword=0){ foreach($this->get_keyword_templates(true) as $k){ if($keyword == $this->get_keyword_slug($k)){ return $k; } } return false; } private function display_post_states(){ add_filter( 'display_post_states', function($post_states, $post){ if($this->is_generated($post)){ $post_states[] = __('Generado', $this->get_translations()); return $post_states; } if($this-La variable $this a été trouvée dans une fonction de traduction dans le fichier content-generator.php . Les appels de fonctions de traduction ne doivent pas contenir de variables PHP. 37: if(!defined('ABSPATH')){ header('HTTP/1.0 403 Forbidden'); exit; } if(!class_exists('Content_Generator')){ class Content_Generator{ private $permissions = 'manage_options'; private $menu_slug = 'content-generator'; private $default_limit = 150; private $default_post_type = 'post'; private $create_action = 'create'; private $delete_action = 'create'; private $generated_meta = '_generated'; private $template_meta = '_content_generator_template'; private $nonce = 'content_generator_nonce'; private $wpdb; private $table = NULL; private $table_name = NULL; private $table_exists = false; private $spintax = NULL; function __construct(){ if(!class_exists('Seven_Spintax')){ throw new Exception(__('La clase 'Seven_Spintax' no ha podido ser cargada.', $this->get_translations())); }else{ $this->spintax = (new Seven_Spintax()); } global $wpdb; $this->wpdb = $wpdb; $this->table_name = 'content_generator'; $this->table = '{$wpdb->prefix}'.$this->table_name; $this->table_exists = $this->check_wpdb_content_generator_db(); if($this->table_exists() && is_admin()){ $this->display_post_states(); } add_action('admin_notices', [new AdminNotice(), 'displayAdminNotice']); } public function check_wpdb_content_generator_db(){ if(strtolower($this->wpdb->get_var('SHOW TABLES LIKE ''.$this->table.''')) === strtolower($this->table)){ return true; } return false; } public static function slugify($text){ $text = preg_replace('~[^\pL\d]+~u', '-', $text); $text = iconv('utf-8', 'us-ascii//TRANSLIT', $text); $text = preg_replace('~[^-\w]+~', '', $text); $text = trim($text, '-'); $text = preg_replace('~-+~', '-', $text); $text = strtolower($text); return $text; } private function get_keyword_slug($keyword){ return $this->slugify($keyword); } private function get_keyword_parent_title($keyword=0){ foreach($this->get_keyword_templates(true) as $k){ if($keyword == $this->get_keyword_slug($k)){ return $k; } } return false; } private function display_post_states(){ add_filter( 'display_post_states', function($post_states, $post){ if($this->is_generated($post)){ $post_states[] = __('Generado', $this->get_translations()); return $post_states; } if($this->is_template($post)){ $post_states[] = '<span data-microtip-position='right' aria-label=''.__('Esta entrada se utiliza como plantilla para el generador de contenido.'La variable $this a été trouvée dans une fonction de traduction dans le fichier content-generator.php . Les appels de fonctions de traduction ne doivent pas contenir de variables PHP. 37: if(!defined('ABSPATH')){ header('HTTP/1.0 403 Forbidden'); exit; } if(!class_exists('Content_Generator')){ class Content_Generator{ private $permissions = 'manage_options'; private $menu_slug = 'content-generator'; private $default_limit = 150; private $default_post_type = 'post'; private $create_action = 'create'; private $delete_action = 'create'; private $generated_meta = '_generated'; private $template_meta = '_content_generator_template'; private $nonce = 'content_generator_nonce'; private $wpdb; private $table = NULL; private $table_name = NULL; private $table_exists = false; private $spintax = NULL; function __construct(){ if(!class_exists('Seven_Spintax')){ throw new Exception(__('La clase 'Seven_Spintax' no ha podido ser cargada.', $this->get_translations())); }else{ $this->spintax = (new Seven_Spintax()); } global $wpdb; $this->wpdb = $wpdb; $this->table_name = 'content_generator'; $this->table = '{$wpdb->prefix}'.$this->table_name; $this->table_exists = $this->check_wpdb_content_generator_db(); if($this->table_exists() && is_admin()){ $this->display_post_states(); } add_action('admin_notices', [new AdminNotice(), 'displayAdminNotice']); } public function check_wpdb_content_generator_db(){ if(strtolower($this->wpdb->get_var('SHOW TABLES LIKE ''.$this->table.''')) === strtolower($this->table)){ return true; } return false; } public static function slugify($text){ $text = preg_replace('~[^\pL\d]+~u', '-', $text); $text = iconv('utf-8', 'us-ascii//TRANSLIT', $text); $text = preg_replace('~[^-\w]+~', '', $text); $text = trim($text, '-'); $text = preg_replace('~-+~', '-', $text); $text = strtolower($text); return $text; } private function get_keyword_slug($keyword){ return $this->slugify($keyword); } private function get_keyword_parent_title($keyword=0){ foreach($this->get_keyword_templates(true) as $k){ if($keyword == $this->get_keyword_slug($k)){ return $k; } } return false; } private function display_post_states(){ add_filter( 'display_post_states', function($post_states, $post){ if($this->is_generated($post)){ $post_states[] = __('Generado', $this->get_translations()); return $post_states; } if($this->is_template($post)){ $post_states[] = '<span data-microtip-position='right' aria-label=''.__('Esta entrada se utiliza como plantilla para el generador de contenido.', $this->get_translations()).'' role='tooltip' class='content-generator-badge'>'.__('Plantilla', $this->get_translations()).'</span>'; return $post_states; La variable $ex a été trouvée dans une fonction de traduction dans le fichier content-generator.php . Les appels de fonctions de traduction ne doivent pas contenir de variables PHP. La variable $this a été trouvée dans une fonction de traduction dans le fichier content-generator.php . Les appels de fonctions de traduction ne doivent pas contenir de variables PHP. 43: ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;'); $this->table_exists = $this->check_wpdb_content_generator_db(); }catch(Exception $ex){ add_action( 'admin_notices', function() { $class = 'notice notice-error'; $message = __( 'No es posible crear la tabla para la generación de contenido. El mensaje de error devuelto es: '.$ex->getMessage(), $this->get_translations()); printf('<div class='%1$s'><p>%2$s</p></div>', esc_attr($class), esc_html($message)); }); } } } public function table_exists(): bool{ return $this->table_exists; } private function get_translations(){ return (defined('TRANSLATIONS') ? TRANSLATIONS : 'content-generator'); } public function add_shortcode(){ add_shortcode('content-generator-list', function($atts=[], $content=NULL){ return ''; }); } public function is_content_generated($post_id=0){ if(!is_numeric($post_id) || $post_id<=0) return false; if(get_post_status($post_id) === FALSE) return false; $post_by_content_generator = get_post_meta($post_id, 'content-generator', TRUE); return ($post_by_content_generator); } private function get_keyword_parent_id($keyword=0){ if(!is_string($keyword)) return []; $results = $this->wpdb->get_results( $this->wpdb->prepare('SELECT id, keyword FROM '.$this->table.' WHERE parent=%d', [0]) ); foreach($results as $kw){ if($kw->keyword == $keyword || $this->slugify($kw->keyword) == $keyword){ return $kw->id; } } return 0; } private function add_keywords_to_parent($keyword=0, $keywords=[]): bool{ if(empty($keywords)) return false; if(is_numeric($keyword) && $keyword>0){ $keyword_id = (object)['id' => $keyword]; }else{ $keyword_id = $this->wpdb->get_row( $this->wpdb->prepare('SELECT id FROM '.$this->table.' WHERE keyword=%s AND parent=0', [$keyword]) ); } if(!empty($keyword_id) && isset($keyword_id->id)){ $created = 0; foreach($keywords as $kw){ if(is_string($kw) && strlen(trim($kw))>0){ $created++; $this->wpdb->insert($this->table, ['keyword' => $kw, 'parent' => $keyword_id->id], ['%s', '%d']); } } return ($created>0 ? true : false); } return false; } private function delete_keyword_group($keyword=0): bool{ if(!is_numeric($keyword)) return false; $result = $this->wpdb->delete($this->table, ['id' => $keyword, 'parent' => 0], ['%d', '%d']); return ($result); } private function delete_keywords_from_parent($keyword=0): bool{ if(is_numeric($keyword) && $keyword>0){ $keyword_id = (object)['id' => $keyword]; }else{ $keyword_id = $this->wpdb->get_row( $this->wpdb->prepare('SELECT id FROM '.$this->table.' WHERE keyword=%s AND parent=0', [$keyword]) ); } if(!empty($keyword_id) && isset($keyword_id->id)){ $result = $this->wpdb->delete($this->table, ['parent' => $keyword_id->id], ['%d']); return ($result); } return false; } private function get_keywords_from_parent($keyword=0){ if(is_numeric($keyword) && (int)$keyword>0){ $keyword_id = (object)['id' => $keyword]; }else{ $keyword_id = (object)['id' => $this->get_keyword_parent_id($keyword)]; } if(!empty($keyword_id) && isset($keyword_id->id)){ $keyword_list = $this->wpdb->get_results( $this->wpdb->prepare('SELECT DISTINCT keyword FROM '.$this->table.' WHERE parent=%d', [$keyword_id->id]) ); return ($keyword_list!=NULL && !empty($keyword_list) ? $keyword_list : []); } return []; } private function get_keywords($string, $just_parent_keywords=false){ if(!is_string($string) || strlen(trim($string))==0) return []; $matches_normalized = []; preg_match_all('/%%%[^%]*%%%/', $string, $matches); foreach($matches as $array){ foreach($array as $match){ $match = trim(str_replace('%%%', NULL, $match)); if(strlen(trim($match))>0 && !in_array($match, $matches_normalized)){ array_push($matches_normalized, $match); } } } if($just_parent_keywords){ return $matches_normalized; } $groups = []; if(!empty($matches_normalized)){ foreach($matches_normalized as $parent_keyword){ if(!isset($groups[$parent_keyword])){ $groups[$parent_keyword] = []; } $group = $this->get_keywords_from_parent($this->get_keyword_parent_title($parent_keyword)); if(!empty($group)){ foreach($group as $keyword){ if(!in_array($keyword->keyword, $groups[$parent_keyword])){ array_push($groups[$parent_keyword], $keyword->keyword); } } } } } return $groups; } public function get_posts_number($string=[], $keywords=[]){ $posts_numbers = []; foreach($keywords as $parent => $list){ array_push($posts_numbers, count($list)); } if(count($posts_numbers) == 1){ return $posts_numbers; }else{ $total_posts=NULL; for($i=0; $i<count($posts_numbers); $i++){ if($total_posts==NULL){ $total_posts=$posts_numbers[$i]; continue; } if(isset($posts_numbers[$i])){ $total_posts = $total_posts * $posts_numbers[$i]; } } return $total_posts; } return 0; } public function recursive_content_generation($string=[], $keywords=[], $content=[]){ if(empty($keywords)) return $content; $keyword = array_keys($keywords)[0]; if(empty($content)){ foreach($keywords[$keyword] as $key){ $array = [ 't' => $string, $keyword => $key, ]; array_push($content, $array); } }else{ $new_content = []; foreach($content as $array){ foreach($keywords[$keyword] as $key){ $array[$keyword] = $key; array_push($new_content, $array); } } $content = $new_content; unset($new_content); } unset($keywords[$keyword]); return $this->recursive_content_generation($string, $keywords, $content); } private function replace_keywords($keywords=[], $string=[]){ foreach(array_keys($keywords) as $kw){ $string = str_replace('%%%'.$kw.'%%%', trim(str_replace(array('\r', '\n'), NULL, $keywords[$kw])), $string); } return trim($string); } public function delete_all_generated_content(){ $args = array( 'posts_per_page' => -1, 'post_type' => get_post_types(), 'meta_query' => array( array( 'key' => $this->generated_meta, 'value' => '1', 'compare' => '>=', ) ) ); $query = new WP_Query($args); $count=0; $deleted_posts = []; while($query->have_posts()){ $query->the_post(); wp_delete_post(get_the_ID(), true); $count++; array_push($deleted_posts, get_the_ID()); } wp_reset_postdata(); return [ 'count' => $count, 'deleted_ids' => $deleted_posts ]; } public function generate_virtual_content($data=[], $keywords=[]){ $posts_numbers = $this->get_posts_number($data['post_title'], $keywords); $contents = $this->recursive_content_generation($data['post_title'], $keywords, []); $generated_posts = 0; $updated_posts = 0; foreach($contents as $content){ if($generated_posts>$data['limit']) break; $generated_title = $this->replace_keywords($content, $this->spintax->process($content['t'])); if(strlen(trim($generated_title))>=1){ $post_exists = post_exists($generated_title); if($post_exists>=1){ wp_delete_post($post_exists, true); $updated_posts++; } $generated_post = array( 'post_title' => wp_strip_all_tags($generated_title), 'post_content' => $this->replace_keywords($content, $this->spintax->process($data['post_content'])), 'post_status' => 'publish', 'post_parent' => $data['post_parent'], 'post_author' => $data['post_author'], 'post_type' => (isset($data['post_type']) && $this->valid_post_type($data['post_type']) ? $data['post_type'] : $this->default_post_type) ); if(isset($data['post_type']) && isset($data['post_category']) && $data['post_type'] != 'page'){ $generated_post['post_category'] = $data['post_category']; } $id = wp_insert_post($generated_post); if($id){ add_post_meta($id, $this->generated_meta, $data['ID']); $forbidden_keys = [$this->template_meta, '_edit_last', '_edit_lock', '_thumbnail_id']; if(isset($data['meta'])){ foreach($data['meta'] as $key => $value){ if(!in_array($key, $forbidden_keys)){ $v = $this->replace_keywords($content, $this->spintax->process((is_array($value) && isset($value[0]) ? $value[0] : $value))); update_post_meta($id, $key, $v); unset($v); } } } $thumbnail_id = get_post_thumbnail_id($id); if($thumbnail_id && $thumbnail_id>0){ set_post_thumbnail($id, $thumbnail_id); } $generated_posts++; delete_post_meta($id, $this->template_meta); }else{ throw new Exception(__('Un artículo no ha podido ser generado por motivos desconocidos. AbortaLa variable $this a été trouvée dans une fonction de traduction dans le fichier content-generator.php . Les appels de fonctions de traduction ne doivent pas contenir de variables PHP. 43: ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;'); $this->table_exists = $this->check_wpdb_content_generator_db(); }catch(Exception $ex){ add_action( 'admin_notices', function() { $class = 'notice notice-error'; $message = __( 'No es posible crear la tabla para la generación de contenido. El mensaje de error devuelto es: '.$ex->getMessage(), $this->get_translations()); printf('<div class='%1$s'><p>%2$s</p></div>', esc_attr($class), esc_html($message)); }); } } } public function table_exists(): bool{ return $this->table_exists; } private function get_translations(){ return (defined('TRANSLATIONS') ? TRANSLATIONS : 'content-generator'); } public function add_shortcode(){ add_shortcode('content-generator-list', function($atts=[], $content=NULL){ return ''; }); } public function is_content_generated($post_id=0){ if(!is_numeric($post_id) || $post_id<=0) return false; if(get_post_status($post_id) === FALSE) return false; $post_by_content_generator = get_post_meta($post_id, 'content-generator', TRUE); return ($post_by_content_generator); } private function get_keyword_parent_id($keyword=0){ if(!is_string($keyword)) return []; $results = $this->wpdb->get_results( $this->wpdb->prepare('SELECT id, keyword FROM '.$this->table.' WHERE parent=%d', [0]) ); foreach($results as $kw){ if($kw->keyword == $keyword || $this->slugify($kw->keyword) == $keyword){ return $kw->id; } } return 0; } private function add_keywords_to_parent($keyword=0, $keywords=[]): bool{ if(empty($keywords)) return false; if(is_numeric($keyword) && $keyword>0){ $keyword_id = (object)['id' => $keyword]; }else{ $keyword_id = $this->wpdb->get_row( $this->wpdb->prepare('SELECT id FROM '.$this->table.' WHERE keyword=%s AND parent=0', [$keyword]) ); } if(!empty($keyword_id) && isset($keyword_id->id)){ $created = 0; foreach($keywords as $kw){ if(is_string($kw) && strlen(trim($kw))>0){ $created++; $this->wpdb->insert($this->table, ['keyword' => $kw, 'parent' => $keyword_id->id], ['%s', '%d']); } } return ($created>0 ? true : false); } return false; } private function delete_keyword_group($keyword=0): bool{ if(!is_numeric($keyword)) return false; $result = $this->wpdb->delete($this->table, ['id' => $keyword, 'parent' => 0], ['%d', '%d']); return ($result); } private function delete_keywords_from_parent($keyword=0): bool{ if(is_numeric($keyword) && $keyword>0){ $keyword_id = (object)['id' => $keyword]; }else{ $keyword_id = $this->wpdb->get_row( $this->wpdb->prepare('SELECT id FROM '.$this->table.' WHERE keyword=%s AND parent=0', [$keyword]) ); } if(!empty($keyword_id) && isset($keyword_id->id)){ $result = $this->wpdb->delete($this->table, ['parent' => $keyword_id->id], ['%d']); return ($result); } return false; } private function get_keywords_from_parent($keyword=0){ if(is_numeric($keyword) && (int)$keyword>0){ $keyword_id = (object)['id' => $keyword]; }else{ $keyword_id = (object)['id' => $this->get_keyword_parent_id($keyword)]; } if(!empty($keyword_id) && isset($keyword_id->id)){ $keyword_list = $this->wpdb->get_results( $this->wpdb->prepare('SELECT DISTINCT keyword FROM '.$this->table.' WHERE parent=%d', [$keyword_id->id]) ); return ($keyword_list!=NULL && !empty($keyword_list) ? $keyword_list : []); } return []; } private function get_keywords($string, $just_parent_keywords=false){ if(!is_string($string) || strlen(trim($string))==0) return []; $matches_normalized = []; preg_match_all('/%%%[^%]*%%%/', $string, $matches); foreach($matches as $array){ foreach($array as $match){ $match = trim(str_replace('%%%', NULL, $match)); if(strlen(trim($match))>0 && !in_array($match, $matches_normalized)){ array_push($matches_normalized, $match); } } } if($just_parent_keywords){ return $matches_normalized; } $groups = []; if(!empty($matches_normalized)){ foreach($matches_normalized as $parent_keyword){ if(!isset($groups[$parent_keyword])){ $groups[$parent_keyword] = []; } $group = $this->get_keywords_from_parent($this->get_keyword_parent_title($parent_keyword)); if(!empty($group)){ foreach($group as $keyword){ if(!in_array($keyword->keyword, $groups[$parent_keyword])){ array_push($groups[$parent_keyword], $keyword->keyword); } } } } } return $groups; } public function get_posts_number($string=[], $keywords=[]){ $posts_numbers = []; foreach($keywords as $parent => $list){ array_push($posts_numbers, count($list)); } if(count($posts_numbers) == 1){ return $posts_numbers; }else{ $total_posts=NULL; for($i=0; $i<count($posts_numbers); $i++){ if($total_posts==NULL){ $total_posts=$posts_numbers[$i]; continue; } if(isset($posts_numbers[$i])){ $total_posts = $total_posts * $posts_numbers[$i]; } } return $total_posts; } return 0; } public function recursive_content_generation($string=[], $keywords=[], $content=[]){ if(empty($keywords)) return $content; $keyword = array_keys($keywords)[0]; if(empty($content)){ foreach($keywords[$keyword] as $key){ $array = [ 't' => $string, $keyword => $key, ]; array_push($content, $array); } }else{ $new_content = []; foreach($content as $array){ foreach($keywords[$keyword] as $key){ $array[$keyword] = $key; array_push($new_content, $array); } } $content = $new_content; unset($new_content); } unset($keywords[$keyword]); return $this->recursive_content_generation($string, $keywords, $content); } private function replace_keywords($keywords=[], $string=[]){ foreach(array_keys($keywords) as $kw){ $string = str_replace('%%%'.$kw.'%%%', trim(str_replace(array('\r', '\n'), NULL, $keywords[$kw])), $string); } return trim($string); } public function delete_all_generated_content(){ $args = array( 'posts_per_page' => -1, 'post_type' => get_post_types(), 'meta_query' => array( array( 'key' => $this->generated_meta, 'value' => '1', 'compare' => '>=', ) ) ); $query = new WP_Query($args); $count=0; $deleted_posts = []; while($query->have_posts()){ $query->the_post(); wp_delete_post(get_the_ID(), true); $count++; array_push($deleted_posts, get_the_ID()); } wp_reset_postdata(); return [ 'count' => $count, 'deleted_ids' => $deleted_posts ]; } public function generate_virtual_content($data=[], $keywords=[]){ $posts_numbers = $this->get_posts_number($data['post_title'], $keywords); $contents = $this->recursive_content_generation($data['post_title'], $keywords, []); $generated_posts = 0; $updated_posts = 0; foreach($contents as $content){ if($generated_posts>$data['limit']) break; $generated_title = $this->replace_keywords($content, $this->spintax->process($content['t'])); if(strlen(trim($generated_title))>=1){ $post_exists = post_exists($generated_title); if($post_exists>=1){ wp_delete_post($post_exists, true); $updated_posts++; } $generated_post = array( 'post_title' => wp_strip_all_tags($generated_title), 'post_content' => $this->replace_keywords($content, $this->spintax->process($data['post_content'])), 'post_status' => 'publish', 'post_parent' => $data['post_parent'], 'post_author' => $data['post_author'], 'post_type' => (isset($data['post_type']) && $this->valid_post_type($data['post_type']) ? $data['post_type'] : $this->default_post_type) ); if(isset($data['post_type']) && isset($data['post_category']) && $data['post_type'] != 'page'){ $generated_post['post_category'] = $data['post_category']; } $id = wp_insert_post($generated_post); if($id){ add_post_meta($id, $this->generated_meta, $data['ID']); $forbidden_keys = [$this->template_meta, '_edit_last', '_edit_lock', '_thumbnail_id']; if(isset($data['meta'])){ foreach($data['meta'] as $key => $value){ if(!in_array($key, $forbidden_keys)){ $v = $this->replace_keywords($content, $this->spintax->process((is_array($value) && isset($value[0]) ? $value[0] : $value))); update_post_meta($id, $key, $v); unset($v); } } } $thumbnail_id = get_post_thumbnail_id($id); if($thumbnail_id && $thumbnail_id>0){ set_post_thumbnail($id, $thumbnail_id); } $generated_posts++; delete_post_meta($id, $this->template_meta); }else{ throw new Exception(__('Un artículo no ha podido ser generado por motivos desconocidos. Abortada generación de contenido.', $this->get_translations())); } } } return ['generated' => $generated_posts, 'updated' => $updated_posts]; } private function valid_post_type($post_type=''): bool{ if(!is_string($post_type) || strlen(trim($post_type))<=0 || (is_string($post_type) && !post_type_exists($post_type))) return false; return ($post_type == 'page' || $post_type == 'post'); } public function generate_content($data=[]){ if(!$this->table_exists){ throw new Exception(__('La tabla de la base de datos para la generación de contenido no está La variable $this a été trouvée dans une fonction de traduction dans le fichier content-generator.php . Les appels de fonctions de traduction ne doivent pas contenir de variables PHP. 43: ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;'); $this->table_exists = $this->check_wpdb_content_generator_db(); }catch(Exception $ex){ add_action( 'admin_notices', function() { $class = 'notice notice-error'; $message = __( 'No es posible crear la tabla para la generación de contenido. El mensaje de error devuelto es: '.$ex->getMessage(), $this->get_translations()); printf('<div class='%1$s'><p>%2$s</p></div>', esc_attr($class), esc_html($message)); }); } } } public function table_exists(): bool{ return $this->table_exists; } private function get_translations(){ return (defined('TRANSLATIONS') ? TRANSLATIONS : 'content-generator'); } public function add_shortcode(){ add_shortcode('content-generator-list', function($atts=[], $content=NULL){ return ''; }); } public function is_content_generated($post_id=0){ if(!is_numeric($post_id) || $post_id<=0) return false; if(get_post_status($post_id) === FALSE) return false; $post_by_content_generator = get_post_meta($post_id, 'content-generator', TRUE); return ($post_by_content_generator); } private function get_keyword_parent_id($keyword=0){ if(!is_string($keyword)) return []; $results = $this->wpdb->get_results( $this->wpdb->prepare('SELECT id, keyword FROM '.$this->table.' WHERE parent=%d', [0]) ); foreach($results as $kw){ if($kw->keyword == $keyword || $this->slugify($kw->keyword) == $keyword){ return $kw->id; } } return 0; } private function add_keywords_to_parent($keyword=0, $keywords=[]): bool{ if(empty($keywords)) return false; if(is_numeric($keyword) && $keyword>0){ $keyword_id = (object)['id' => $keyword]; }else{ $keyword_id = $this->wpdb->get_row( $this->wpdb->prepare('SELECT id FROM '.$this->table.' WHERE keyword=%s AND parent=0', [$keyword]) ); } if(!empty($keyword_id) && isset($keyword_id->id)){ $created = 0; foreach($keywords as $kw){ if(is_string($kw) && strlen(trim($kw))>0){ $created++; $this->wpdb->insert($this->table, ['keyword' => $kw, 'parent' => $keyword_id->id], ['%s', '%d']); } } return ($created>0 ? true : false); } return false; } private function delete_keyword_group($keyword=0): bool{ if(!is_numeric($keyword)) return false; $result = $this->wpdb->delete($this->table, ['id' => $keyword, 'parent' => 0], ['%d', '%d']); return ($result); } private function delete_keywords_from_parent($keyword=0): bool{ if(is_numeric($keyword) && $keyword>0){ $keyword_id = (object)['id' => $keyword]; }else{ $keyword_id = $this->wpdb->get_row( $this->wpdb->prepare('SELECT id FROM '.$this->table.' WHERE keyword=%s AND parent=0', [$keyword]) ); } if(!empty($keyword_id) && isset($keyword_id->id)){ $result = $this->wpdb->delete($this->table, ['parent' => $keyword_id->id], ['%d']); return ($result); } return false; } private function get_keywords_from_parent($keyword=0){ if(is_numeric($keyword) && (int)$keyword>0){ $keyword_id = (object)['id' => $keyword]; }else{ $keyword_id = (object)['id' => $this->get_keyword_parent_id($keyword)]; } if(!empty($keyword_id) && isset($keyword_id->id)){ $keyword_list = $this->wpdb->get_results( $this->wpdb->prepare('SELECT DISTINCT keyword FROM '.$this->table.' WHERE parent=%d', [$keyword_id->id]) ); return ($keyword_list!=NULL && !empty($keyword_list) ? $keyword_list : []); } return []; } private function get_keywords($string, $just_parent_keywords=false){ if(!is_string($string) || strlen(trim($string))==0) return []; $matches_normalized = []; preg_match_all('/%%%[^%]*%%%/', $string, $matches); foreach($matches as $array){ foreach($array as $match){ $match = trim(str_replace('%%%', NULL, $match)); if(strlen(trim($match))>0 && !in_array($match, $matches_normalized)){ array_push($matches_normalized, $match); } } } if($just_parent_keywords){ return $matches_normalized; } $groups = []; if(!empty($matches_normalized)){ foreach($matches_normalized as $parent_keyword){ if(!isset($groups[$parent_keyword])){ $groups[$parent_keyword] = []; } $group = $this->get_keywords_from_parent($this->get_keyword_parent_title($parent_keyword)); if(!empty($group)){ foreach($group as $keyword){ if(!in_array($keyword->keyword, $groups[$parent_keyword])){ array_push($groups[$parent_keyword], $keyword->keyword); } } } } } return $groups; } public function get_posts_number($string=[], $keywords=[]){ $posts_numbers = []; foreach($keywords as $parent => $list){ array_push($posts_numbers, count($list)); } if(count($posts_numbers) == 1){ return $posts_numbers; }else{ $total_posts=NULL; for($i=0; $i<count($posts_numbers); $i++){ if($total_posts==NULL){ $total_posts=$posts_numbers[$i]; continue; } if(isset($posts_numbers[$i])){ $total_posts = $total_posts * $posts_numbers[$i]; } } return $total_posts; } return 0; } public function recursive_content_generation($string=[], $keywords=[], $content=[]){ if(empty($keywords)) return $content; $keyword = array_keys($keywords)[0]; if(empty($content)){ foreach($keywords[$keyword] as $key){ $array = [ 't' => $string, $keyword => $key, ]; array_push($content, $array); } }else{ $new_content = []; foreach($content as $array){ foreach($keywords[$keyword] as $key){ $array[$keyword] = $key; array_push($new_content, $array); } } $content = $new_content; unset($new_content); } unset($keywords[$keyword]); return $this->recursive_content_generation($string, $keywords, $content); } private function replace_keywords($keywords=[], $string=[]){ foreach(array_keys($keywords) as $kw){ $string = str_replace('%%%'.$kw.'%%%', trim(str_replace(array('\r', '\n'), NULL, $keywords[$kw])), $string); } return trim($string); } public function delete_all_generated_content(){ $args = array( 'posts_per_page' => -1, 'post_type' => get_post_types(), 'meta_query' => array( array( 'key' => $this->generated_meta, 'value' => '1', 'compare' => '>=', ) ) ); $query = new WP_Query($args); $count=0; $deleted_posts = []; while($query->have_posts()){ $query->the_post(); wp_delete_post(get_the_ID(), true); $count++; array_push($deleted_posts, get_the_ID()); } wp_reset_postdata(); return [ 'count' => $count, 'deleted_ids' => $deleted_posts ]; } public function generate_virtual_content($data=[], $keywords=[]){ $posts_numbers = $this->get_posts_number($data['post_title'], $keywords); $contents = $this->recursive_content_generation($data['post_title'], $keywords, []); $generated_posts = 0; $updated_posts = 0; foreach($contents as $content){ if($generated_posts>$data['limit']) break; $generated_title = $this->replace_keywords($content, $this->spintax->process($content['t'])); if(strlen(trim($generated_title))>=1){ $post_exists = post_exists($generated_title); if($post_exists>=1){ wp_delete_post($post_exists, true); $updated_posts++; } $generated_post = array( 'post_title' => wp_strip_all_tags($generated_title), 'post_content' => $this->replace_keywords($content, $this->spintax->process($data['post_content'])), 'post_status' => 'publish', 'post_parent' => $data['post_parent'], 'post_author' => $data['post_author'], 'post_type' => (isset($data['post_type']) && $this->valid_post_type($data['post_type']) ? $data['post_type'] : $this->default_post_type) ); if(isset($data['post_type']) && isset($data['post_category']) && $data['post_type'] != 'page'){ $generated_post['post_category'] = $data['post_category']; } $id = wp_insert_post($generated_post); if($id){ add_post_meta($id, $this->generated_meta, $data['ID']); $forbidden_keys = [$this->template_meta, '_edit_last', '_edit_lock', '_thumbnail_id']; if(isset($data['meta'])){ foreach($data['meta'] as $key => $value){ if(!in_array($key, $forbidden_keys)){ $v = $this->replace_keywords($content, $this->spintax->process((is_array($value) && isset($value[0]) ? $value[0] : $value))); update_post_meta($id, $key, $v); unset($v); } } } $thumbnail_id = get_post_thumbnail_id($id); if($thumbnail_id && $thumbnail_id>0){ set_post_thumbnail($id, $thumbnail_id); } $generated_posts++; delete_post_meta($id, $this->template_meta); }else{ throw new Exception(__('Un artículo no ha podido ser generado por motivos desconocidos. Abortada generación de contenido.', $this->get_translations())); } } } return ['generated' => $generated_posts, 'updated' => $updated_posts]; } private function valid_post_type($post_type=''): bool{ if(!is_string($post_type) || strlen(trim($post_type))<=0 || (is_string($post_type) && !post_type_exists($post_type))) return false; return ($post_type == 'page' || $post_type == 'post'); } public function generate_content($data=[]){ if(!$this->table_exists){ throw new Exception(__('La tabla de la base de datos para la generación de contenido no está creada.', $this->get_translations())); } $keyword_templates = $this->get_keyword_templates(); if(empty($keyword_templates)){ throw new Exception(__('Es necesario definir las palabras clave antes de generar contenido.', $La variable $this a été trouvée dans une fonction de traduction dans le fichier content-generator.php . Les appels de fonctions de traduction ne doivent pas contenir de variables PHP. 43: ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;'); $this->table_exists = $this->check_wpdb_content_generator_db(); }catch(Exception $ex){ add_action( 'admin_notices', function() { $class = 'notice notice-error'; $message = __( 'No es posible crear la tabla para la generación de contenido. El mensaje de error devuelto es: '.$ex->getMessage(), $this->get_translations()); printf('<div class='%1$s'><p>%2$s</p></div>', esc_attr($class), esc_html($message)); }); } } } public function table_exists(): bool{ return $this->table_exists; } private function get_translations(){ return (defined('TRANSLATIONS') ? TRANSLATIONS : 'content-generator'); } public function add_shortcode(){ add_shortcode('content-generator-list', function($atts=[], $content=NULL){ return ''; }); } public function is_content_generated($post_id=0){ if(!is_numeric($post_id) || $post_id<=0) return false; if(get_post_status($post_id) === FALSE) return false; $post_by_content_generator = get_post_meta($post_id, 'content-generator', TRUE); return ($post_by_content_generator); } private function get_keyword_parent_id($keyword=0){ if(!is_string($keyword)) return []; $results = $this->wpdb->get_results( $this->wpdb->prepare('SELECT id, keyword FROM '.$this->table.' WHERE parent=%d', [0]) ); foreach($results as $kw){ if($kw->keyword == $keyword || $this->slugify($kw->keyword) == $keyword){ return $kw->id; } } return 0; } private function add_keywords_to_parent($keyword=0, $keywords=[]): bool{ if(empty($keywords)) return false; if(is_numeric($keyword) && $keyword>0){ $keyword_id = (object)['id' => $keyword]; }else{ $keyword_id = $this->wpdb->get_row( $this->wpdb->prepare('SELECT id FROM '.$this->table.' WHERE keyword=%s AND parent=0', [$keyword]) ); } if(!empty($keyword_id) && isset($keyword_id->id)){ $created = 0; foreach($keywords as $kw){ if(is_string($kw) && strlen(trim($kw))>0){ $created++; $this->wpdb->insert($this->table, ['keyword' => $kw, 'parent' => $keyword_id->id], ['%s', '%d']); } } return ($created>0 ? true : false); } return false; } private function delete_keyword_group($keyword=0): bool{ if(!is_numeric($keyword)) return false; $result = $this->wpdb->delete($this->table, ['id' => $keyword, 'parent' => 0], ['%d', '%d']); return ($result); } private function delete_keywords_from_parent($keyword=0): bool{ if(is_numeric($keyword) && $keyword>0){ $keyword_id = (object)['id' => $keyword]; }else{ $keyword_id = $this->wpdb->get_row( $this->wpdb->prepare('SELECT id FROM '.$this->table.' WHERE keyword=%s AND parent=0', [$keyword]) ); } if(!empty($keyword_id) && isset($keyword_id->id)){ $result = $this->wpdb->delete($this->table, ['parent' => $keyword_id->id], ['%d']); return ($result); } return false; } private function get_keywords_from_parent($keyword=0){ if(is_numeric($keyword) && (int)$keyword>0){ $keyword_id = (object)['id' => $keyword]; }else{ $keyword_id = (object)['id' => $this->get_keyword_parent_id($keyword)]; } if(!empty($keyword_id) && isset($keyword_id->id)){ $keyword_list = $this->wpdb->get_results( $this->wpdb->prepare('SELECT DISTINCT keyword FROM '.$this->table.' WHERE parent=%d', [$keyword_id->id]) ); return ($keyword_list!=NULL && !empty($keyword_list) ? $keyword_list : []); } return []; } private function get_keywords($string, $just_parent_keywords=false){ if(!is_string($string) || strlen(trim($string))==0) return []; $matches_normalized = []; preg_match_all('/%%%[^%]*%%%/', $string, $matches); foreach($matches as $array){ foreach($array as $match){ $match = trim(str_replace('%%%', NULL, $match)); if(strlen(trim($match))>0 && !in_array($match, $matches_normalized)){ array_push($matches_normalized, $match); } } } if($just_parent_keywords){ return $matches_normalized; } $groups = []; if(!empty($matches_normalized)){ foreach($matches_normalized as $parent_keyword){ if(!isset($groups[$parent_keyword])){ $groups[$parent_keyword] = []; } $group = $this->get_keywords_from_parent($this->get_keyword_parent_title($parent_keyword)); if(!empty($group)){ foreach($group as $keyword){ if(!in_array($keyword->keyword, $groups[$parent_keyword])){ array_push($groups[$parent_keyword], $keyword->keyword); } } } } } return $groups; } public function get_posts_number($string=[], $keywords=[]){ $posts_numbers = []; foreach($keywords as $parent => $list){ array_push($posts_numbers, count($list)); } if(count($posts_numbers) == 1){ return $posts_numbers; }else{ $total_posts=NULL; for($i=0; $i<count($posts_numbers); $i++){ if($total_posts==NULL){ $total_posts=$posts_numbers[$i]; continue; } if(isset($posts_numbers[$i])){ $total_posts = $total_posts * $posts_numbers[$i]; } } return $total_posts; } return 0; } public function recursive_content_generation($string=[], $keywords=[], $content=[]){ if(empty($keywords)) return $content; $keyword = array_keys($keywords)[0]; if(empty($content)){ foreach($keywords[$keyword] as $key){ $array = [ 't' => $string, $keyword => $key, ]; array_push($content, $array); } }else{ $new_content = []; foreach($content as $array){ foreach($keywords[$keyword] as $key){ $array[$keyword] = $key; array_push($new_content, $array); } } $content = $new_content; unset($new_content); } unset($keywords[$keyword]); return $this->recursive_content_generation($string, $keywords, $content); } private function replace_keywords($keywords=[], $string=[]){ foreach(array_keys($keywords) as $kw){ $string = str_replace('%%%'.$kw.'%%%', trim(str_replace(array('\r', '\n'), NULL, $keywords[$kw])), $string); } return trim($string); } public function delete_all_generated_content(){ $args = array( 'posts_per_page' => -1, 'post_type' => get_post_types(), 'meta_query' => array( array( 'key' => $this->generated_meta, 'value' => '1', 'compare' => '>=', ) ) ); $query = new WP_Query($args); $count=0; $deleted_posts = []; while($query->have_posts()){ $query->the_post(); wp_delete_post(get_the_ID(), true); $count++; array_push($deleted_posts, get_the_ID()); } wp_reset_postdata(); return [ 'count' => $count, 'deleted_ids' => $deleted_posts ]; } public function generate_virtual_content($data=[], $keywords=[]){ $posts_numbers = $this->get_posts_number($data['post_title'], $keywords); $contents = $this->recursive_content_generation($data['post_title'], $keywords, []); $generated_posts = 0; $updated_posts = 0; foreach($contents as $content){ if($generated_posts>$data['limit']) break; $generated_title = $this->replace_keywords($content, $this->spintax->process($content['t'])); if(strlen(trim($generated_title))>=1){ $post_exists = post_exists($generated_title); if($post_exists>=1){ wp_delete_post($post_exists, true); $updated_posts++; } $generated_post = array( 'post_title' => wp_strip_all_tags($generated_title), 'post_content' => $this->replace_keywords($content, $this->spintax->process($data['post_content'])), 'post_status' => 'publish', 'post_parent' => $data['post_parent'], 'post_author' => $data['post_author'], 'post_type' => (isset($data['post_type']) && $this->valid_post_type($data['post_type']) ? $data['post_type'] : $this->default_post_type) ); if(isset($data['post_type']) && isset($data['post_category']) && $data['post_type'] != 'page'){ $generated_post['post_category'] = $data['post_category']; } $id = wp_insert_post($generated_post); if($id){ add_post_meta($id, $this->generated_meta, $data['ID']); $forbidden_keys = [$this->template_meta, '_edit_last', '_edit_lock', '_thumbnail_id']; if(isset($data['meta'])){ foreach($data['meta'] as $key => $value){ if(!in_array($key, $forbidden_keys)){ $v = $this->replace_keywords($content, $this->spintax->process((is_array($value) && isset($value[0]) ? $value[0] : $value))); update_post_meta($id, $key, $v); unset($v); } } } $thumbnail_id = get_post_thumbnail_id($id); if($thumbnail_id && $thumbnail_id>0){ set_post_thumbnail($id, $thumbnail_id); } $generated_posts++; delete_post_meta($id, $this->template_meta); }else{ throw new Exception(__('Un artículo no ha podido ser generado por motivos desconocidos. Abortada generación de contenido.', $this->get_translations())); } } } return ['generated' => $generated_posts, 'updated' => $updated_posts]; } private function valid_post_type($post_type=''): bool{ if(!is_string($post_type) || strlen(trim($post_type))<=0 || (is_string($post_type) && !post_type_exists($post_type))) return false; return ($post_type == 'page' || $post_type == 'post'); } public function generate_content($data=[]){ if(!$this->table_exists){ throw new Exception(__('La tabla de la base de datos para la generación de contenido no está creada.', $this->get_translations())); } $keyword_templates = $this->get_keyword_templates(); if(empty($keyword_templates)){ throw new Exception(__('Es necesario definir las palabras clave antes de generar contenido.', $this->get_translations())); } if(!isset($data['post_type']) || !$this->valid_post_type($data['post_type'])){ throw new Exception(__('Es necesario indicar el tipo de contenido a generar. Se admite 'post' oLa variable $this a été trouvée dans une fonction de traduction dans le fichier content-generator.php . Les appels de fonctions de traduction ne doivent pas contenir de variables PHP. 43: ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;'); $this->table_exists = $this->check_wpdb_content_generator_db(); }catch(Exception $ex){ add_action( 'admin_notices', function() { $class = 'notice notice-error'; $message = __( 'No es posible crear la tabla para la generación de contenido. El mensaje de error devuelto es: '.$ex->getMessage(), $this->get_translations()); printf('<div class='%1$s'><p>%2$s</p></div>', esc_attr($class), esc_html($message)); }); } } } public function table_exists(): bool{ return $this->table_exists; } private function get_translations(){ return (defined('TRANSLATIONS') ? TRANSLATIONS : 'content-generator'); } public function add_shortcode(){ add_shortcode('content-generator-list', function($atts=[], $content=NULL){ return ''; }); } public function is_content_generated($post_id=0){ if(!is_numeric($post_id) || $post_id<=0) return false; if(get_post_status($post_id) === FALSE) return false; $post_by_content_generator = get_post_meta($post_id, 'content-generator', TRUE); return ($post_by_content_generator); } private function get_keyword_parent_id($keyword=0){ if(!is_string($keyword)) return []; $results = $this->wpdb->get_results( $this->wpdb->prepare('SELECT id, keyword FROM '.$this->table.' WHERE parent=%d', [0]) ); foreach($results as $kw){ if($kw->keyword == $keyword || $this->slugify($kw->keyword) == $keyword){ return $kw->id; } } return 0; } private function add_keywords_to_parent($keyword=0, $keywords=[]): bool{ if(empty($keywords)) return false; if(is_numeric($keyword) && $keyword>0){ $keyword_id = (object)['id' => $keyword]; }else{ $keyword_id = $this->wpdb->get_row( $this->wpdb->prepare('SELECT id FROM '.$this->table.' WHERE keyword=%s AND parent=0', [$keyword]) ); } if(!empty($keyword_id) && isset($keyword_id->id)){ $created = 0; foreach($keywords as $kw){ if(is_string($kw) && strlen(trim($kw))>0){ $created++; $this->wpdb->insert($this->table, ['keyword' => $kw, 'parent' => $keyword_id->id], ['%s', '%d']); } } return ($created>0 ? true : false); } return false; } private function delete_keyword_group($keyword=0): bool{ if(!is_numeric($keyword)) return false; $result = $this->wpdb->delete($this->table, ['id' => $keyword, 'parent' => 0], ['%d', '%d']); return ($result); } private function delete_keywords_from_parent($keyword=0): bool{ if(is_numeric($keyword) && $keyword>0){ $keyword_id = (object)['id' => $keyword]; }else{ $keyword_id = $this->wpdb->get_row( $this->wpdb->prepare('SELECT id FROM '.$this->table.' WHERE keyword=%s AND parent=0', [$keyword]) ); } if(!empty($keyword_id) && isset($keyword_id->id)){ $result = $this->wpdb->delete($this->table, ['parent' => $keyword_id->id], ['%d']); return ($result); } return false; } private function get_keywords_from_parent($keyword=0){ if(is_numeric($keyword) && (int)$keyword>0){ $keyword_id = (object)['id' => $keyword]; }else{ $keyword_id = (object)['id' => $this->get_keyword_parent_id($keyword)]; } if(!empty($keyword_id) && isset($keyword_id->id)){ $keyword_list = $this->wpdb->get_results( $this->wpdb->prepare('SELECT DISTINCT keyword FROM '.$this->table.' WHERE parent=%d', [$keyword_id->id]) ); return ($keyword_list!=NULL && !empty($keyword_list) ? $keyword_list : []); } return []; } private function get_keywords($string, $just_parent_keywords=false){ if(!is_string($string) || strlen(trim($string))==0) return []; $matches_normalized = []; preg_match_all('/%%%[^%]*%%%/', $string, $matches); foreach($matches as $array){ foreach($array as $match){ $match = trim(str_replace('%%%', NULL, $match)); if(strlen(trim($match))>0 && !in_array($match, $matches_normalized)){ array_push($matches_normalized, $match); } } } if($just_parent_keywords){ return $matches_normalized; } $groups = []; if(!empty($matches_normalized)){ foreach($matches_normalized as $parent_keyword){ if(!isset($groups[$parent_keyword])){ $groups[$parent_keyword] = []; } $group = $this->get_keywords_from_parent($this->get_keyword_parent_title($parent_keyword)); if(!empty($group)){ foreach($group as $keyword){ if(!in_array($keyword->keyword, $groups[$parent_keyword])){ array_push($groups[$parent_keyword], $keyword->keyword); } } } } } return $groups; } public function get_posts_number($string=[], $keywords=[]){ $posts_numbers = []; foreach($keywords as $parent => $list){ array_push($posts_numbers, count($list)); } if(count($posts_numbers) == 1){ return $posts_numbers; }else{ $total_posts=NULL; for($i=0; $i<count($posts_numbers); $i++){ if($total_posts==NULL){ $total_posts=$posts_numbers[$i]; continue; } if(isset($posts_numbers[$i])){ $total_posts = $total_posts * $posts_numbers[$i]; } } return $total_posts; } return 0; } public function recursive_content_generation($string=[], $keywords=[], $content=[]){ if(empty($keywords)) return $content; $keyword = array_keys($keywords)[0]; if(empty($content)){ foreach($keywords[$keyword] as $key){ $array = [ 't' => $string, $keyword => $key, ]; array_push($content, $array); } }else{ $new_content = []; foreach($content as $array){ foreach($keywords[$keyword] as $key){ $array[$keyword] = $key; array_push($new_content, $array); } } $content = $new_content; unset($new_content); } unset($keywords[$keyword]); return $this->recursive_content_generation($string, $keywords, $content); } private function replace_keywords($keywords=[], $string=[]){ foreach(array_keys($keywords) as $kw){ $string = str_replace('%%%'.$kw.'%%%', trim(str_replace(array('\r', '\n'), NULL, $keywords[$kw])), $string); } return trim($string); } public function delete_all_generated_content(){ $args = array( 'posts_per_page' => -1, 'post_type' => get_post_types(), 'meta_query' => array( array( 'key' => $this->generated_meta, 'value' => '1', 'compare' => '>=', ) ) ); $query = new WP_Query($args); $count=0; $deleted_posts = []; while($query->have_posts()){ $query->the_post(); wp_delete_post(get_the_ID(), true); $count++; array_push($deleted_posts, get_the_ID()); } wp_reset_postdata(); return [ 'count' => $count, 'deleted_ids' => $deleted_posts ]; } public function generate_virtual_content($data=[], $keywords=[]){ $posts_numbers = $this->get_posts_number($data['post_title'], $keywords); $contents = $this->recursive_content_generation($data['post_title'], $keywords, []); $generated_posts = 0; $updated_posts = 0; foreach($contents as $content){ if($generated_posts>$data['limit']) break; $generated_title = $this->replace_keywords($content, $this->spintax->process($content['t'])); if(strlen(trim($generated_title))>=1){ $post_exists = post_exists($generated_title); if($post_exists>=1){ wp_delete_post($post_exists, true); $updated_posts++; } $generated_post = array( 'post_title' => wp_strip_all_tags($generated_title), 'post_content' => $this->replace_keywords($content, $this->spintax->process($data['post_content'])), 'post_status' => 'publish', 'post_parent' => $data['post_parent'], 'post_author' => $data['post_author'], 'post_type' => (isset($data['post_type']) && $this->valid_post_type($data['post_type']) ? $data['post_type'] : $this->default_post_type) ); if(isset($data['post_type']) && isset($data['post_category']) && $data['post_type'] != 'page'){ $generated_post['post_category'] = $data['post_category']; } $id = wp_insert_post($generated_post); if($id){ add_post_meta($id, $this->generated_meta, $data['ID']); $forbidden_keys = [$this->template_meta, '_edit_last', '_edit_lock', '_thumbnail_id']; if(isset($data['meta'])){ foreach($data['meta'] as $key => $value){ if(!in_array($key, $forbidden_keys)){ $v = $this->replace_keywords($content, $this->spintax->process((is_array($value) && isset($value[0]) ? $value[0] : $value))); update_post_meta($id, $key, $v); unset($v); } } } $thumbnail_id = get_post_thumbnail_id($id); if($thumbnail_id && $thumbnail_id>0){ set_post_thumbnail($id, $thumbnail_id); } $generated_posts++; delete_post_meta($id, $this->template_meta); }else{ throw new Exception(__('Un artículo no ha podido ser generado por motivos desconocidos. Abortada generación de contenido.', $this->get_translations())); } } } return ['generated' => $generated_posts, 'updated' => $updated_posts]; } private function valid_post_type($post_type=''): bool{ if(!is_string($post_type) || strlen(trim($post_type))<=0 || (is_string($post_type) && !post_type_exists($post_type))) return false; return ($post_type == 'page' || $post_type == 'post'); } public function generate_content($data=[]){ if(!$this->table_exists){ throw new Exception(__('La tabla de la base de datos para la generación de contenido no está creada.', $this->get_translations())); } $keyword_templates = $this->get_keyword_templates(); if(empty($keyword_templates)){ throw new Exception(__('Es necesario definir las palabras clave antes de generar contenido.', $this->get_translations())); } if(!isset($data['post_type']) || !$this->valid_post_type($data['post_type'])){ throw new Exception(__('Es necesario indicar el tipo de contenido a generar. Se admite 'post' o 'page'.', $this->get_translations())); }else if(!post_type_exists($data['post_type'])){ throw new Exception(__('El tipo de post indicado no existe.', $this->get_translations())); } ifLa variable $this a été trouvée dans une fonction de traduction dans le fichier content-generator.php . Les appels de fonctions de traduction ne doivent pas contenir de variables PHP. 43: ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;'); $this->table_exists = $this->check_wpdb_content_generator_db(); }catch(Exception $ex){ add_action( 'admin_notices', function() { $class = 'notice notice-error'; $message = __( 'No es posible crear la tabla para la generación de contenido. El mensaje de error devuelto es: '.$ex->getMessage(), $this->get_translations()); printf('<div class='%1$s'><p>%2$s</p></div>', esc_attr($class), esc_html($message)); }); } } } public function table_exists(): bool{ return $this->table_exists; } private function get_translations(){ return (defined('TRANSLATIONS') ? TRANSLATIONS : 'content-generator'); } public function add_shortcode(){ add_shortcode('content-generator-list', function($atts=[], $content=NULL){ return ''; }); } public function is_content_generated($post_id=0){ if(!is_numeric($post_id) || $post_id<=0) return false; if(get_post_status($post_id) === FALSE) return false; $post_by_content_generator = get_post_meta($post_id, 'content-generator', TRUE); return ($post_by_content_generator); } private function get_keyword_parent_id($keyword=0){ if(!is_string($keyword)) return []; $results = $this->wpdb->get_results( $this->wpdb->prepare('SELECT id, keyword FROM '.$this->table.' WHERE parent=%d', [0]) ); foreach($results as $kw){ if($kw->keyword == $keyword || $this->slugify($kw->keyword) == $keyword){ return $kw->id; } } return 0; } private function add_keywords_to_parent($keyword=0, $keywords=[]): bool{ if(empty($keywords)) return false; if(is_numeric($keyword) && $keyword>0){ $keyword_id = (object)['id' => $keyword]; }else{ $keyword_id = $this->wpdb->get_row( $this->wpdb->prepare('SELECT id FROM '.$this->table.' WHERE keyword=%s AND parent=0', [$keyword]) ); } if(!empty($keyword_id) && isset($keyword_id->id)){ $created = 0; foreach($keywords as $kw){ if(is_string($kw) && strlen(trim($kw))>0){ $created++; $this->wpdb->insert($this->table, ['keyword' => $kw, 'parent' => $keyword_id->id], ['%s', '%d']); } } return ($created>0 ? true : false); } return false; } private function delete_keyword_group($keyword=0): bool{ if(!is_numeric($keyword)) return false; $result = $this->wpdb->delete($this->table, ['id' => $keyword, 'parent' => 0], ['%d', '%d']); return ($result); } private function delete_keywords_from_parent($keyword=0): bool{ if(is_numeric($keyword) && $keyword>0){ $keyword_id = (object)['id' => $keyword]; }else{ $keyword_id = $this->wpdb->get_row( $this->wpdb->prepare('SELECT id FROM '.$this->table.' WHERE keyword=%s AND parent=0', [$keyword]) ); } if(!empty($keyword_id) && isset($keyword_id->id)){ $result = $this->wpdb->delete($this->table, ['parent' => $keyword_id->id], ['%d']); return ($result); } return false; } private function get_keywords_from_parent($keyword=0){ if(is_numeric($keyword) && (int)$keyword>0){ $keyword_id = (object)['id' => $keyword]; }else{ $keyword_id = (object)['id' => $this->get_keyword_parent_id($keyword)]; } if(!empty($keyword_id) && isset($keyword_id->id)){ $keyword_list = $this->wpdb->get_results( $this->wpdb->prepare('SELECT DISTINCT keyword FROM '.$this->table.' WHERE parent=%d', [$keyword_id->id]) ); return ($keyword_list!=NULL && !empty($keyword_list) ? $keyword_list : []); } return []; } private function get_keywords($string, $just_parent_keywords=false){ if(!is_string($string) || strlen(trim($string))==0) return []; $matches_normalized = []; preg_match_all('/%%%[^%]*%%%/', $string, $matches); foreach($matches as $array){ foreach($array as $match){ $match = trim(str_replace('%%%', NULL, $match)); if(strlen(trim($match))>0 && !in_array($match, $matches_normalized)){ array_push($matches_normalized, $match); } } } if($just_parent_keywords){ return $matches_normalized; } $groups = []; if(!empty($matches_normalized)){ foreach($matches_normalized as $parent_keyword){ if(!isset($groups[$parent_keyword])){ $groups[$parent_keyword] = []; } $group = $this->get_keywords_from_parent($this->get_keyword_parent_title($parent_keyword)); if(!empty($group)){ foreach($group as $keyword){ if(!in_array($keyword->keyword, $groups[$parent_keyword])){ array_push($groups[$parent_keyword], $keyword->keyword); } } } } } return $groups; } public function get_posts_number($string=[], $keywords=[]){ $posts_numbers = []; foreach($keywords as $parent => $list){ array_push($posts_numbers, count($list)); } if(count($posts_numbers) == 1){ return $posts_numbers; }else{ $total_posts=NULL; for($i=0; $i<count($posts_numbers); $i++){ if($total_posts==NULL){ $total_posts=$posts_numbers[$i]; continue; } if(isset($posts_numbers[$i])){ $total_posts = $total_posts * $posts_numbers[$i]; } } return $total_posts; } return 0; } public function recursive_content_generation($string=[], $keywords=[], $content=[]){ if(empty($keywords)) return $content; $keyword = array_keys($keywords)[0]; if(empty($content)){ foreach($keywords[$keyword] as $key){ $array = [ 't' => $string, $keyword => $key, ]; array_push($content, $array); } }else{ $new_content = []; foreach($content as $array){ foreach($keywords[$keyword] as $key){ $array[$keyword] = $key; array_push($new_content, $array); } } $content = $new_content; unset($new_content); } unset($keywords[$keyword]); return $this->recursive_content_generation($string, $keywords, $content); } private function replace_keywords($keywords=[], $string=[]){ foreach(array_keys($keywords) as $kw){ $string = str_replace('%%%'.$kw.'%%%', trim(str_replace(array('\r', '\n'), NULL, $keywords[$kw])), $string); } return trim($string); } public function delete_all_generated_content(){ $args = array( 'posts_per_page' => -1, 'post_type' => get_post_types(), 'meta_query' => array( array( 'key' => $this->generated_meta, 'value' => '1', 'compare' => '>=', ) ) ); $query = new WP_Query($args); $count=0; $deleted_posts = []; while($query->have_posts()){ $query->the_post(); wp_delete_post(get_the_ID(), true); $count++; array_push($deleted_posts, get_the_ID()); } wp_reset_postdata(); return [ 'count' => $count, 'deleted_ids' => $deleted_posts ]; } public function generate_virtual_content($data=[], $keywords=[]){ $posts_numbers = $this->get_posts_number($data['post_title'], $keywords); $contents = $this->recursive_content_generation($data['post_title'], $keywords, []); $generated_posts = 0; $updated_posts = 0; foreach($contents as $content){ if($generated_posts>$data['limit']) break; $generated_title = $this->replace_keywords($content, $this->spintax->process($content['t'])); if(strlen(trim($generated_title))>=1){ $post_exists = post_exists($generated_title); if($post_exists>=1){ wp_delete_post($post_exists, true); $updated_posts++; } $generated_post = array( 'post_title' => wp_strip_all_tags($generated_title), 'post_content' => $this->replace_keywords($content, $this->spintax->process($data['post_content'])), 'post_status' => 'publish', 'post_parent' => $data['post_parent'], 'post_author' => $data['post_author'], 'post_type' => (isset($data['post_type']) && $this->valid_post_type($data['post_type']) ? $data['post_type'] : $this->default_post_type) ); if(isset($data['post_type']) && isset($data['post_category']) && $data['post_type'] != 'page'){ $generated_post['post_category'] = $data['post_category']; } $id = wp_insert_post($generated_post); if($id){ add_post_meta($id, $this->generated_meta, $data['ID']); $forbidden_keys = [$this->template_meta, '_edit_last', '_edit_lock', '_thumbnail_id']; if(isset($data['meta'])){ foreach($data['meta'] as $key => $value){ if(!in_array($key, $forbidden_keys)){ $v = $this->replace_keywords($content, $this->spintax->process((is_array($value) && isset($value[0]) ? $value[0] : $value))); update_post_meta($id, $key, $v); unset($v); } } } $thumbnail_id = get_post_thumbnail_id($id); if($thumbnail_id && $thumbnail_id>0){ set_post_thumbnail($id, $thumbnail_id); } $generated_posts++; delete_post_meta($id, $this->template_meta); }else{ throw new Exception(__('Un artículo no ha podido ser generado por motivos desconocidos. Abortada generación de contenido.', $this->get_translations())); } } } return ['generated' => $generated_posts, 'updated' => $updated_posts]; } private function valid_post_type($post_type=''): bool{ if(!is_string($post_type) || strlen(trim($post_type))<=0 || (is_string($post_type) && !post_type_exists($post_type))) return false; return ($post_type == 'page' || $post_type == 'post'); } public function generate_content($data=[]){ if(!$this->table_exists){ throw new Exception(__('La tabla de la base de datos para la generación de contenido no está creada.', $this->get_translations())); } $keyword_templates = $this->get_keyword_templates(); if(empty($keyword_templates)){ throw new Exception(__('Es necesario definir las palabras clave antes de generar contenido.', $this->get_translations())); } if(!isset($data['post_type']) || !$this->valid_post_type($data['post_type'])){ throw new Exception(__('Es necesario indicar el tipo de contenido a generar. Se admite 'post' o 'page'.', $this->get_translations())); }else if(!post_type_exists($data['post_type'])){ throw new Exception(__('El tipo de post indicado no existe.', $this->get_translations())); } if(!isset($data['limit']) || !is_numeric($data['limit'])){ $data['limit'] = $this->default_limit; } if(!isset($data['post_title'])){ throw new Exception(__('Es necesario indicar el título que se utilizará.', $this->get_translaLa variable $this a été trouvée dans une fonction de traduction dans le fichier content-generator.php . Les appels de fonctions de traduction ne doivent pas contenir de variables PHP. 43: ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;'); $this->table_exists = $this->check_wpdb_content_generator_db(); }catch(Exception $ex){ add_action( 'admin_notices', function() { $class = 'notice notice-error'; $message = __( 'No es posible crear la tabla para la generación de contenido. El mensaje de error devuelto es: '.$ex->getMessage(), $this->get_translations()); printf('<div class='%1$s'><p>%2$s</p></div>', esc_attr($class), esc_html($message)); }); } } } public function table_exists(): bool{ return $this->table_exists; } private function get_translations(){ return (defined('TRANSLATIONS') ? TRANSLATIONS : 'content-generator'); } public function add_shortcode(){ add_shortcode('content-generator-list', function($atts=[], $content=NULL){ return ''; }); } public function is_content_generated($post_id=0){ if(!is_numeric($post_id) || $post_id<=0) return false; if(get_post_status($post_id) === FALSE) return false; $post_by_content_generator = get_post_meta($post_id, 'content-generator', TRUE); return ($post_by_content_generator); } private function get_keyword_parent_id($keyword=0){ if(!is_string($keyword)) return []; $results = $this->wpdb->get_results( $this->wpdb->prepare('SELECT id, keyword FROM '.$this->table.' WHERE parent=%d', [0]) ); foreach($results as $kw){ if($kw->keyword == $keyword || $this->slugify($kw->keyword) == $keyword){ return $kw->id; } } return 0; } private function add_keywords_to_parent($keyword=0, $keywords=[]): bool{ if(empty($keywords)) return false; if(is_numeric($keyword) && $keyword>0){ $keyword_id = (object)['id' => $keyword]; }else{ $keyword_id = $this->wpdb->get_row( $this->wpdb->prepare('SELECT id FROM '.$this->table.' WHERE keyword=%s AND parent=0', [$keyword]) ); } if(!empty($keyword_id) && isset($keyword_id->id)){ $created = 0; foreach($keywords as $kw){ if(is_string($kw) && strlen(trim($kw))>0){ $created++; $this->wpdb->insert($this->table, ['keyword' => $kw, 'parent' => $keyword_id->id], ['%s', '%d']); } } return ($created>0 ? true : false); } return false; } private function delete_keyword_group($keyword=0): bool{ if(!is_numeric($keyword)) return false; $result = $this->wpdb->delete($this->table, ['id' => $keyword, 'parent' => 0], ['%d', '%d']); return ($result); } private function delete_keywords_from_parent($keyword=0): bool{ if(is_numeric($keyword) && $keyword>0){ $keyword_id = (object)['id' => $keyword]; }else{ $keyword_id = $this->wpdb->get_row( $this->wpdb->prepare('SELECT id FROM '.$this->table.' WHERE keyword=%s AND parent=0', [$keyword]) ); } if(!empty($keyword_id) && isset($keyword_id->id)){ $result = $this->wpdb->delete($this->table, ['parent' => $keyword_id->id], ['%d']); return ($result); } return false; } private function get_keywords_from_parent($keyword=0){ if(is_numeric($keyword) && (int)$keyword>0){ $keyword_id = (object)['id' => $keyword]; }else{ $keyword_id = (object)['id' => $this->get_keyword_parent_id($keyword)]; } if(!empty($keyword_id) && isset($keyword_id->id)){ $keyword_list = $this->wpdb->get_results( $this->wpdb->prepare('SELECT DISTINCT keyword FROM '.$this->table.' WHERE parent=%d', [$keyword_id->id]) ); return ($keyword_list!=NULL && !empty($keyword_list) ? $keyword_list : []); } return []; } private function get_keywords($string, $just_parent_keywords=false){ if(!is_string($string) || strlen(trim($string))==0) return []; $matches_normalized = []; preg_match_all('/%%%[^%]*%%%/', $string, $matches); foreach($matches as $array){ foreach($array as $match){ $match = trim(str_replace('%%%', NULL, $match)); if(strlen(trim($match))>0 && !in_array($match, $matches_normalized)){ array_push($matches_normalized, $match); } } } if($just_parent_keywords){ return $matches_normalized; } $groups = []; if(!empty($matches_normalized)){ foreach($matches_normalized as $parent_keyword){ if(!isset($groups[$parent_keyword])){ $groups[$parent_keyword] = []; } $group = $this->get_keywords_from_parent($this->get_keyword_parent_title($parent_keyword)); if(!empty($group)){ foreach($group as $keyword){ if(!in_array($keyword->keyword, $groups[$parent_keyword])){ array_push($groups[$parent_keyword], $keyword->keyword); } } } } } return $groups; } public function get_posts_number($string=[], $keywords=[]){ $posts_numbers = []; foreach($keywords as $parent => $list){ array_push($posts_numbers, count($list)); } if(count($posts_numbers) == 1){ return $posts_numbers; }else{ $total_posts=NULL; for($i=0; $i<count($posts_numbers); $i++){ if($total_posts==NULL){ $total_posts=$posts_numbers[$i]; continue; } if(isset($posts_numbers[$i])){ $total_posts = $total_posts * $posts_numbers[$i]; } } return $total_posts; } return 0; } public function recursive_content_generation($string=[], $keywords=[], $content=[]){ if(empty($keywords)) return $content; $keyword = array_keys($keywords)[0]; if(empty($content)){ foreach($keywords[$keyword] as $key){ $array = [ 't' => $string, $keyword => $key, ]; array_push($content, $array); } }else{ $new_content = []; foreach($content as $array){ foreach($keywords[$keyword] as $key){ $array[$keyword] = $key; array_push($new_content, $array); } } $content = $new_content; unset($new_content); } unset($keywords[$keyword]); return $this->recursive_content_generation($string, $keywords, $content); } private function replace_keywords($keywords=[], $string=[]){ foreach(array_keys($keywords) as $kw){ $string = str_replace('%%%'.$kw.'%%%', trim(str_replace(array('\r', '\n'), NULL, $keywords[$kw])), $string); } return trim($string); } public function delete_all_generated_content(){ $args = array( 'posts_per_page' => -1, 'post_type' => get_post_types(), 'meta_query' => array( array( 'key' => $this->generated_meta, 'value' => '1', 'compare' => '>=', ) ) ); $query = new WP_Query($args); $count=0; $deleted_posts = []; while($query->have_posts()){ $query->the_post(); wp_delete_post(get_the_ID(), true); $count++; array_push($deleted_posts, get_the_ID()); } wp_reset_postdata(); return [ 'count' => $count, 'deleted_ids' => $deleted_posts ]; } public function generate_virtual_content($data=[], $keywords=[]){ $posts_numbers = $this->get_posts_number($data['post_title'], $keywords); $contents = $this->recursive_content_generation($data['post_title'], $keywords, []); $generated_posts = 0; $updated_posts = 0; foreach($contents as $content){ if($generated_posts>$data['limit']) break; $generated_title = $this->replace_keywords($content, $this->spintax->process($content['t'])); if(strlen(trim($generated_title))>=1){ $post_exists = post_exists($generated_title); if($post_exists>=1){ wp_delete_post($post_exists, true); $updated_posts++; } $generated_post = array( 'post_title' => wp_strip_all_tags($generated_title), 'post_content' => $this->replace_keywords($content, $this->spintax->process($data['post_content'])), 'post_status' => 'publish', 'post_parent' => $data['post_parent'], 'post_author' => $data['post_author'], 'post_type' => (isset($data['post_type']) && $this->valid_post_type($data['post_type']) ? $data['post_type'] : $this->default_post_type) ); if(isset($data['post_type']) && isset($data['post_category']) && $data['post_type'] != 'page'){ $generated_post['post_category'] = $data['post_category']; } $id = wp_insert_post($generated_post); if($id){ add_post_meta($id, $this->generated_meta, $data['ID']); $forbidden_keys = [$this->template_meta, '_edit_last', '_edit_lock', '_thumbnail_id']; if(isset($data['meta'])){ foreach($data['meta'] as $key => $value){ if(!in_array($key, $forbidden_keys)){ $v = $this->replace_keywords($content, $this->spintax->process((is_array($value) && isset($value[0]) ? $value[0] : $value))); update_post_meta($id, $key, $v); unset($v); } } } $thumbnail_id = get_post_thumbnail_id($id); if($thumbnail_id && $thumbnail_id>0){ set_post_thumbnail($id, $thumbnail_id); } $generated_posts++; delete_post_meta($id, $this->template_meta); }else{ throw new Exception(__('Un artículo no ha podido ser generado por motivos desconocidos. Abortada generación de contenido.', $this->get_translations())); } } } return ['generated' => $generated_posts, 'updated' => $updated_posts]; } private function valid_post_type($post_type=''): bool{ if(!is_string($post_type) || strlen(trim($post_type))<=0 || (is_string($post_type) && !post_type_exists($post_type))) return false; return ($post_type == 'page' || $post_type == 'post'); } public function generate_content($data=[]){ if(!$this->table_exists){ throw new Exception(__('La tabla de la base de datos para la generación de contenido no está creada.', $this->get_translations())); } $keyword_templates = $this->get_keyword_templates(); if(empty($keyword_templates)){ throw new Exception(__('Es necesario definir las palabras clave antes de generar contenido.', $this->get_translations())); } if(!isset($data['post_type']) || !$this->valid_post_type($data['post_type'])){ throw new Exception(__('Es necesario indicar el tipo de contenido a generar. Se admite 'post' o 'page'.', $this->get_translations())); }else if(!post_type_exists($data['post_type'])){ throw new Exception(__('El tipo de post indicado no existe.', $this->get_translations())); } if(!isset($data['limit']) || !is_numeric($data['limit'])){ $data['limit'] = $this->default_limit; } if(!isset($data['post_title'])){ throw new Exception(__('Es necesario indicar el título que se utilizará.', $this->get_translations())); }else if(!is_string($data['post_title']) || strlen(trim($data['post_title']))==0){ throw new Exception(__('El título indicado no es válido.', $this->get_translations())); }elseLa variable $this a été trouvée dans une fonction de traduction dans le fichier content-generator.php . Les appels de fonctions de traduction ne doivent pas contenir de variables PHP. 43: ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;'); $this->table_exists = $this->check_wpdb_content_generator_db(); }catch(Exception $ex){ add_action( 'admin_notices', function() { $class = 'notice notice-error'; $message = __( 'No es posible crear la tabla para la generación de contenido. El mensaje de error devuelto es: '.$ex->getMessage(), $this->get_translations()); printf('<div class='%1$s'><p>%2$s</p></div>', esc_attr($class), esc_html($message)); }); } } } public function table_exists(): bool{ return $this->table_exists; } private function get_translations(){ return (defined('TRANSLATIONS') ? TRANSLATIONS : 'content-generator'); } public function add_shortcode(){ add_shortcode('content-generator-list', function($atts=[], $content=NULL){ return ''; }); } public function is_content_generated($post_id=0){ if(!is_numeric($post_id) || $post_id<=0) return false; if(get_post_status($post_id) === FALSE) return false; $post_by_content_generator = get_post_meta($post_id, 'content-generator', TRUE); return ($post_by_content_generator); } private function get_keyword_parent_id($keyword=0){ if(!is_string($keyword)) return []; $results = $this->wpdb->get_results( $this->wpdb->prepare('SELECT id, keyword FROM '.$this->table.' WHERE parent=%d', [0]) ); foreach($results as $kw){ if($kw->keyword == $keyword || $this->slugify($kw->keyword) == $keyword){ return $kw->id; } } return 0; } private function add_keywords_to_parent($keyword=0, $keywords=[]): bool{ if(empty($keywords)) return false; if(is_numeric($keyword) && $keyword>0){ $keyword_id = (object)['id' => $keyword]; }else{ $keyword_id = $this->wpdb->get_row( $this->wpdb->prepare('SELECT id FROM '.$this->table.' WHERE keyword=%s AND parent=0', [$keyword]) ); } if(!empty($keyword_id) && isset($keyword_id->id)){ $created = 0; foreach($keywords as $kw){ if(is_string($kw) && strlen(trim($kw))>0){ $created++; $this->wpdb->insert($this->table, ['keyword' => $kw, 'parent' => $keyword_id->id], ['%s', '%d']); } } return ($created>0 ? true : false); } return false; } private function delete_keyword_group($keyword=0): bool{ if(!is_numeric($keyword)) return false; $result = $this->wpdb->delete($this->table, ['id' => $keyword, 'parent' => 0], ['%d', '%d']); return ($result); } private function delete_keywords_from_parent($keyword=0): bool{ if(is_numeric($keyword) && $keyword>0){ $keyword_id = (object)['id' => $keyword]; }else{ $keyword_id = $this->wpdb->get_row( $this->wpdb->prepare('SELECT id FROM '.$this->table.' WHERE keyword=%s AND parent=0', [$keyword]) ); } if(!empty($keyword_id) && isset($keyword_id->id)){ $result = $this->wpdb->delete($this->table, ['parent' => $keyword_id->id], ['%d']); return ($result); } return false; } private function get_keywords_from_parent($keyword=0){ if(is_numeric($keyword) && (int)$keyword>0){ $keyword_id = (object)['id' => $keyword]; }else{ $keyword_id = (object)['id' => $this->get_keyword_parent_id($keyword)]; } if(!empty($keyword_id) && isset($keyword_id->id)){ $keyword_list = $this->wpdb->get_results( $this->wpdb->prepare('SELECT DISTINCT keyword FROM '.$this->table.' WHERE parent=%d', [$keyword_id->id]) ); return ($keyword_list!=NULL && !empty($keyword_list) ? $keyword_list : []); } return []; } private function get_keywords($string, $just_parent_keywords=false){ if(!is_string($string) || strlen(trim($string))==0) return []; $matches_normalized = []; preg_match_all('/%%%[^%]*%%%/', $string, $matches); foreach($matches as $array){ foreach($array as $match){ $match = trim(str_replace('%%%', NULL, $match)); if(strlen(trim($match))>0 && !in_array($match, $matches_normalized)){ array_push($matches_normalized, $match); } } } if($just_parent_keywords){ return $matches_normalized; } $groups = []; if(!empty($matches_normalized)){ foreach($matches_normalized as $parent_keyword){ if(!isset($groups[$parent_keyword])){ $groups[$parent_keyword] = []; } $group = $this->get_keywords_from_parent($this->get_keyword_parent_title($parent_keyword)); if(!empty($group)){ foreach($group as $keyword){ if(!in_array($keyword->keyword, $groups[$parent_keyword])){ array_push($groups[$parent_keyword], $keyword->keyword); } } } } } return $groups; } public function get_posts_number($string=[], $keywords=[]){ $posts_numbers = []; foreach($keywords as $parent => $list){ array_push($posts_numbers, count($list)); } if(count($posts_numbers) == 1){ return $posts_numbers; }else{ $total_posts=NULL; for($i=0; $i<count($posts_numbers); $i++){ if($total_posts==NULL){ $total_posts=$posts_numbers[$i]; continue; } if(isset($posts_numbers[$i])){ $total_posts = $total_posts * $posts_numbers[$i]; } } return $total_posts; } return 0; } public function recursive_content_generation($string=[], $keywords=[], $content=[]){ if(empty($keywords)) return $content; $keyword = array_keys($keywords)[0]; if(empty($content)){ foreach($keywords[$keyword] as $key){ $array = [ 't' => $string, $keyword => $key, ]; array_push($content, $array); } }else{ $new_content = []; foreach($content as $array){ foreach($keywords[$keyword] as $key){ $array[$keyword] = $key; array_push($new_content, $array); } } $content = $new_content; unset($new_content); } unset($keywords[$keyword]); return $this->recursive_content_generation($string, $keywords, $content); } private function replace_keywords($keywords=[], $string=[]){ foreach(array_keys($keywords) as $kw){ $string = str_replace('%%%'.$kw.'%%%', trim(str_replace(array('\r', '\n'), NULL, $keywords[$kw])), $string); } return trim($string); } public function delete_all_generated_content(){ $args = array( 'posts_per_page' => -1, 'post_type' => get_post_types(), 'meta_query' => array( array( 'key' => $this->generated_meta, 'value' => '1', 'compare' => '>=', ) ) ); $query = new WP_Query($args); $count=0; $deleted_posts = []; while($query->have_posts()){ $query->the_post(); wp_delete_post(get_the_ID(), true); $count++; array_push($deleted_posts, get_the_ID()); } wp_reset_postdata(); return [ 'count' => $count, 'deleted_ids' => $deleted_posts ]; } public function generate_virtual_content($data=[], $keywords=[]){ $posts_numbers = $this->get_posts_number($data['post_title'], $keywords); $contents = $this->recursive_content_generation($data['post_title'], $keywords, []); $generated_posts = 0; $updated_posts = 0; foreach($contents as $content){ if($generated_posts>$data['limit']) break; $generated_title = $this->replace_keywords($content, $this->spintax->process($content['t'])); if(strlen(trim($generated_title))>=1){ $post_exists = post_exists($generated_title); if($post_exists>=1){ wp_delete_post($post_exists, true); $updated_posts++; } $generated_post = array( 'post_title' => wp_strip_all_tags($generated_title), 'post_content' => $this->replace_keywords($content, $this->spintax->process($data['post_content'])), 'post_status' => 'publish', 'post_parent' => $data['post_parent'], 'post_author' => $data['post_author'], 'post_type' => (isset($data['post_type']) && $this->valid_post_type($data['post_type']) ? $data['post_type'] : $this->default_post_type) ); if(isset($data['post_type']) && isset($data['post_category']) && $data['post_type'] != 'page'){ $generated_post['post_category'] = $data['post_category']; } $id = wp_insert_post($generated_post); if($id){ add_post_meta($id, $this->generated_meta, $data['ID']); $forbidden_keys = [$this->template_meta, '_edit_last', '_edit_lock', '_thumbnail_id']; if(isset($data['meta'])){ foreach($data['meta'] as $key => $value){ if(!in_array($key, $forbidden_keys)){ $v = $this->replace_keywords($content, $this->spintax->process((is_array($value) && isset($value[0]) ? $value[0] : $value))); update_post_meta($id, $key, $v); unset($v); } } } $thumbnail_id = get_post_thumbnail_id($id); if($thumbnail_id && $thumbnail_id>0){ set_post_thumbnail($id, $thumbnail_id); } $generated_posts++; delete_post_meta($id, $this->template_meta); }else{ throw new Exception(__('Un artículo no ha podido ser generado por motivos desconocidos. Abortada generación de contenido.', $this->get_translations())); } } } return ['generated' => $generated_posts, 'updated' => $updated_posts]; } private function valid_post_type($post_type=''): bool{ if(!is_string($post_type) || strlen(trim($post_type))<=0 || (is_string($post_type) && !post_type_exists($post_type))) return false; return ($post_type == 'page' || $post_type == 'post'); } public function generate_content($data=[]){ if(!$this->table_exists){ throw new Exception(__('La tabla de la base de datos para la generación de contenido no está creada.', $this->get_translations())); } $keyword_templates = $this->get_keyword_templates(); if(empty($keyword_templates)){ throw new Exception(__('Es necesario definir las palabras clave antes de generar contenido.', $this->get_translations())); } if(!isset($data['post_type']) || !$this->valid_post_type($data['post_type'])){ throw new Exception(__('Es necesario indicar el tipo de contenido a generar. Se admite 'post' o 'page'.', $this->get_translations())); }else if(!post_type_exists($data['post_type'])){ throw new Exception(__('El tipo de post indicado no existe.', $this->get_translations())); } if(!isset($data['limit']) || !is_numeric($data['limit'])){ $data['limit'] = $this->default_limit; } if(!isset($data['post_title'])){ throw new Exception(__('Es necesario indicar el título que se utilizará.', $this->get_translations())); }else if(!is_string($data['post_title']) || strlen(trim($data['post_title']))==0){ throw new Exception(__('El título indicado no es válido.', $this->get_translations())); }else{ $title_keywords = $this->get_keywords($data['post_title']); if(count($title_keywords) == 0){ throw new Exception(__('No hay ninguna palabra clave indicada en el título.', $this->get_transLa variable $this a été trouvée dans une fonction de traduction dans le fichier content-generator.php . Les appels de fonctions de traduction ne doivent pas contenir de variables PHP. 43: ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;'); $this->table_exists = $this->check_wpdb_content_generator_db(); }catch(Exception $ex){ add_action( 'admin_notices', function() { $class = 'notice notice-error'; $message = __( 'No es posible crear la tabla para la generación de contenido. El mensaje de error devuelto es: '.$ex->getMessage(), $this->get_translations()); printf('<div class='%1$s'><p>%2$s</p></div>', esc_attr($class), esc_html($message)); }); } } } public function table_exists(): bool{ return $this->table_exists; } private function get_translations(){ return (defined('TRANSLATIONS') ? TRANSLATIONS : 'content-generator'); } public function add_shortcode(){ add_shortcode('content-generator-list', function($atts=[], $content=NULL){ return ''; }); } public function is_content_generated($post_id=0){ if(!is_numeric($post_id) || $post_id<=0) return false; if(get_post_status($post_id) === FALSE) return false; $post_by_content_generator = get_post_meta($post_id, 'content-generator', TRUE); return ($post_by_content_generator); } private function get_keyword_parent_id($keyword=0){ if(!is_string($keyword)) return []; $results = $this->wpdb->get_results( $this->wpdb->prepare('SELECT id, keyword FROM '.$this->table.' WHERE parent=%d', [0]) ); foreach($results as $kw){ if($kw->keyword == $keyword || $this->slugify($kw->keyword) == $keyword){ return $kw->id; } } return 0; } private function add_keywords_to_parent($keyword=0, $keywords=[]): bool{ if(empty($keywords)) return false; if(is_numeric($keyword) && $keyword>0){ $keyword_id = (object)['id' => $keyword]; }else{ $keyword_id = $this->wpdb->get_row( $this->wpdb->prepare('SELECT id FROM '.$this->table.' WHERE keyword=%s AND parent=0', [$keyword]) ); } if(!empty($keyword_id) && isset($keyword_id->id)){ $created = 0; foreach($keywords as $kw){ if(is_string($kw) && strlen(trim($kw))>0){ $created++; $this->wpdb->insert($this->table, ['keyword' => $kw, 'parent' => $keyword_id->id], ['%s', '%d']); } } return ($created>0 ? true : false); } return false; } private function delete_keyword_group($keyword=0): bool{ if(!is_numeric($keyword)) return false; $result = $this->wpdb->delete($this->table, ['id' => $keyword, 'parent' => 0], ['%d', '%d']); return ($result); } private function delete_keywords_from_parent($keyword=0): bool{ if(is_numeric($keyword) && $keyword>0){ $keyword_id = (object)['id' => $keyword]; }else{ $keyword_id = $this->wpdb->get_row( $this->wpdb->prepare('SELECT id FROM '.$this->table.' WHERE keyword=%s AND parent=0', [$keyword]) ); } if(!empty($keyword_id) && isset($keyword_id->id)){ $result = $this->wpdb->delete($this->table, ['parent' => $keyword_id->id], ['%d']); return ($result); } return false; } private function get_keywords_from_parent($keyword=0){ if(is_numeric($keyword) && (int)$keyword>0){ $keyword_id = (object)['id' => $keyword]; }else{ $keyword_id = (object)['id' => $this->get_keyword_parent_id($keyword)]; } if(!empty($keyword_id) && isset($keyword_id->id)){ $keyword_list = $this->wpdb->get_results( $this->wpdb->prepare('SELECT DISTINCT keyword FROM '.$this->table.' WHERE parent=%d', [$keyword_id->id]) ); return ($keyword_list!=NULL && !empty($keyword_list) ? $keyword_list : []); } return []; } private function get_keywords($string, $just_parent_keywords=false){ if(!is_string($string) || strlen(trim($string))==0) return []; $matches_normalized = []; preg_match_all('/%%%[^%]*%%%/', $string, $matches); foreach($matches as $array){ foreach($array as $match){ $match = trim(str_replace('%%%', NULL, $match)); if(strlen(trim($match))>0 && !in_array($match, $matches_normalized)){ array_push($matches_normalized, $match); } } } if($just_parent_keywords){ return $matches_normalized; } $groups = []; if(!empty($matches_normalized)){ foreach($matches_normalized as $parent_keyword){ if(!isset($groups[$parent_keyword])){ $groups[$parent_keyword] = []; } $group = $this->get_keywords_from_parent($this->get_keyword_parent_title($parent_keyword)); if(!empty($group)){ foreach($group as $keyword){ if(!in_array($keyword->keyword, $groups[$parent_keyword])){ array_push($groups[$parent_keyword], $keyword->keyword); } } } } } return $groups; } public function get_posts_number($string=[], $keywords=[]){ $posts_numbers = []; foreach($keywords as $parent => $list){ array_push($posts_numbers, count($list)); } if(count($posts_numbers) == 1){ return $posts_numbers; }else{ $total_posts=NULL; for($i=0; $i<count($posts_numbers); $i++){ if($total_posts==NULL){ $total_posts=$posts_numbers[$i]; continue; } if(isset($posts_numbers[$i])){ $total_posts = $total_posts * $posts_numbers[$i]; } } return $total_posts; } return 0; } public function recursive_content_generation($string=[], $keywords=[], $content=[]){ if(empty($keywords)) return $content; $keyword = array_keys($keywords)[0]; if(empty($content)){ foreach($keywords[$keyword] as $key){ $array = [ 't' => $string, $keyword => $key, ]; array_push($content, $array); } }else{ $new_content = []; foreach($content as $array){ foreach($keywords[$keyword] as $key){ $array[$keyword] = $key; array_push($new_content, $array); } } $content = $new_content; unset($new_content); } unset($keywords[$keyword]); return $this->recursive_content_generation($string, $keywords, $content); } private function replace_keywords($keywords=[], $string=[]){ foreach(array_keys($keywords) as $kw){ $string = str_replace('%%%'.$kw.'%%%', trim(str_replace(array('\r', '\n'), NULL, $keywords[$kw])), $string); } return trim($string); } public function delete_all_generated_content(){ $args = array( 'posts_per_page' => -1, 'post_type' => get_post_types(), 'meta_query' => array( array( 'key' => $this->generated_meta, 'value' => '1', 'compare' => '>=', ) ) ); $query = new WP_Query($args); $count=0; $deleted_posts = []; while($query->have_posts()){ $query->the_post(); wp_delete_post(get_the_ID(), true); $count++; array_push($deleted_posts, get_the_ID()); } wp_reset_postdata(); return [ 'count' => $count, 'deleted_ids' => $deleted_posts ]; } public function generate_virtual_content($data=[], $keywords=[]){ $posts_numbers = $this->get_posts_number($data['post_title'], $keywords); $contents = $this->recursive_content_generation($data['post_title'], $keywords, []); $generated_posts = 0; $updated_posts = 0; foreach($contents as $content){ if($generated_posts>$data['limit']) break; $generated_title = $this->replace_keywords($content, $this->spintax->process($content['t'])); if(strlen(trim($generated_title))>=1){ $post_exists = post_exists($generated_title); if($post_exists>=1){ wp_delete_post($post_exists, true); $updated_posts++; } $generated_post = array( 'post_title' => wp_strip_all_tags($generated_title), 'post_content' => $this->replace_keywords($content, $this->spintax->process($data['post_content'])), 'post_status' => 'publish', 'post_parent' => $data['post_parent'], 'post_author' => $data['post_author'], 'post_type' => (isset($data['post_type']) && $this->valid_post_type($data['post_type']) ? $data['post_type'] : $this->default_post_type) ); if(isset($data['post_type']) && isset($data['post_category']) && $data['post_type'] != 'page'){ $generated_post['post_category'] = $data['post_category']; } $id = wp_insert_post($generated_post); if($id){ add_post_meta($id, $this->generated_meta, $data['ID']); $forbidden_keys = [$this->template_meta, '_edit_last', '_edit_lock', '_thumbnail_id']; if(isset($data['meta'])){ foreach($data['meta'] as $key => $value){ if(!in_array($key, $forbidden_keys)){ $v = $this->replace_keywords($content, $this->spintax->process((is_array($value) && isset($value[0]) ? $value[0] : $value))); update_post_meta($id, $key, $v); unset($v); } } } $thumbnail_id = get_post_thumbnail_id($id); if($thumbnail_id && $thumbnail_id>0){ set_post_thumbnail($id, $thumbnail_id); } $generated_posts++; delete_post_meta($id, $this->template_meta); }else{ throw new Exception(__('Un artículo no ha podido ser generado por motivos desconocidos. Abortada generación de contenido.', $this->get_translations())); } } } return ['generated' => $generated_posts, 'updated' => $updated_posts]; } private function valid_post_type($post_type=''): bool{ if(!is_string($post_type) || strlen(trim($post_type))<=0 || (is_string($post_type) && !post_type_exists($post_type))) return false; return ($post_type == 'page' || $post_type == 'post'); } public function generate_content($data=[]){ if(!$this->table_exists){ throw new Exception(__('La tabla de la base de datos para la generación de contenido no está creada.', $this->get_translations())); } $keyword_templates = $this->get_keyword_templates(); if(empty($keyword_templates)){ throw new Exception(__('Es necesario definir las palabras clave antes de generar contenido.', $this->get_translations())); } if(!isset($data['post_type']) || !$this->valid_post_type($data['post_type'])){ throw new Exception(__('Es necesario indicar el tipo de contenido a generar. Se admite 'post' o 'page'.', $this->get_translations())); }else if(!post_type_exists($data['post_type'])){ throw new Exception(__('El tipo de post indicado no existe.', $this->get_translations())); } if(!isset($data['limit']) || !is_numeric($data['limit'])){ $data['limit'] = $this->default_limit; } if(!isset($data['post_title'])){ throw new Exception(__('Es necesario indicar el título que se utilizará.', $this->get_translations())); }else if(!is_string($data['post_title']) || strlen(trim($data['post_title']))==0){ throw new Exception(__('El título indicado no es válido.', $this->get_translations())); }else{ $title_keywords = $this->get_keywords($data['post_title']); if(count($title_keywords) == 0){ throw new Exception(__('No hay ninguna palabra clave indicada en el título.', $this->get_translations())); } } if(!isset($data['post_content'])){ throw new Exception(__('Es necesario el contenido que se utilizará.', $this->get_translations(La variable $this a été trouvée dans une fonction de traduction dans le fichier content-generator.php . Les appels de fonctions de traduction ne doivent pas contenir de variables PHP. 43: ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;'); $this->table_exists = $this->check_wpdb_content_generator_db(); }catch(Exception $ex){ add_action( 'admin_notices', function() { $class = 'notice notice-error'; $message = __( 'No es posible crear la tabla para la generación de contenido. El mensaje de error devuelto es: '.$ex->getMessage(), $this->get_translations()); printf('<div class='%1$s'><p>%2$s</p></div>', esc_attr($class), esc_html($message)); }); } } } public function table_exists(): bool{ return $this->table_exists; } private function get_translations(){ return (defined('TRANSLATIONS') ? TRANSLATIONS : 'content-generator'); } public function add_shortcode(){ add_shortcode('content-generator-list', function($atts=[], $content=NULL){ return ''; }); } public function is_content_generated($post_id=0){ if(!is_numeric($post_id) || $post_id<=0) return false; if(get_post_status($post_id) === FALSE) return false; $post_by_content_generator = get_post_meta($post_id, 'content-generator', TRUE); return ($post_by_content_generator); } private function get_keyword_parent_id($keyword=0){ if(!is_string($keyword)) return []; $results = $this->wpdb->get_results( $this->wpdb->prepare('SELECT id, keyword FROM '.$this->table.' WHERE parent=%d', [0]) ); foreach($results as $kw){ if($kw->keyword == $keyword || $this->slugify($kw->keyword) == $keyword){ return $kw->id; } } return 0; } private function add_keywords_to_parent($keyword=0, $keywords=[]): bool{ if(empty($keywords)) return false; if(is_numeric($keyword) && $keyword>0){ $keyword_id = (object)['id' => $keyword]; }else{ $keyword_id = $this->wpdb->get_row( $this->wpdb->prepare('SELECT id FROM '.$this->table.' WHERE keyword=%s AND parent=0', [$keyword]) ); } if(!empty($keyword_id) && isset($keyword_id->id)){ $created = 0; foreach($keywords as $kw){ if(is_string($kw) && strlen(trim($kw))>0){ $created++; $this->wpdb->insert($this->table, ['keyword' => $kw, 'parent' => $keyword_id->id], ['%s', '%d']); } } return ($created>0 ? true : false); } return false; } private function delete_keyword_group($keyword=0): bool{ if(!is_numeric($keyword)) return false; $result = $this->wpdb->delete($this->table, ['id' => $keyword, 'parent' => 0], ['%d', '%d']); return ($result); } private function delete_keywords_from_parent($keyword=0): bool{ if(is_numeric($keyword) && $keyword>0){ $keyword_id = (object)['id' => $keyword]; }else{ $keyword_id = $this->wpdb->get_row( $this->wpdb->prepare('SELECT id FROM '.$this->table.' WHERE keyword=%s AND parent=0', [$keyword]) ); } if(!empty($keyword_id) && isset($keyword_id->id)){ $result = $this->wpdb->delete($this->table, ['parent' => $keyword_id->id], ['%d']); return ($result); } return false; } private function get_keywords_from_parent($keyword=0){ if(is_numeric($keyword) && (int)$keyword>0){ $keyword_id = (object)['id' => $keyword]; }else{ $keyword_id = (object)['id' => $this->get_keyword_parent_id($keyword)]; } if(!empty($keyword_id) && isset($keyword_id->id)){ $keyword_list = $this->wpdb->get_results( $this->wpdb->prepare('SELECT DISTINCT keyword FROM '.$this->table.' WHERE parent=%d', [$keyword_id->id]) ); return ($keyword_list!=NULL && !empty($keyword_list) ? $keyword_list : []); } return []; } private function get_keywords($string, $just_parent_keywords=false){ if(!is_string($string) || strlen(trim($string))==0) return []; $matches_normalized = []; preg_match_all('/%%%[^%]*%%%/', $string, $matches); foreach($matches as $array){ foreach($array as $match){ $match = trim(str_replace('%%%', NULL, $match)); if(strlen(trim($match))>0 && !in_array($match, $matches_normalized)){ array_push($matches_normalized, $match); } } } if($just_parent_keywords){ return $matches_normalized; } $groups = []; if(!empty($matches_normalized)){ foreach($matches_normalized as $parent_keyword){ if(!isset($groups[$parent_keyword])){ $groups[$parent_keyword] = []; } $group = $this->get_keywords_from_parent($this->get_keyword_parent_title($parent_keyword)); if(!empty($group)){ foreach($group as $keyword){ if(!in_array($keyword->keyword, $groups[$parent_keyword])){ array_push($groups[$parent_keyword], $keyword->keyword); } } } } } return $groups; } public function get_posts_number($string=[], $keywords=[]){ $posts_numbers = []; foreach($keywords as $parent => $list){ array_push($posts_numbers, count($list)); } if(count($posts_numbers) == 1){ return $posts_numbers; }else{ $total_posts=NULL; for($i=0; $i<count($posts_numbers); $i++){ if($total_posts==NULL){ $total_posts=$posts_numbers[$i]; continue; } if(isset($posts_numbers[$i])){ $total_posts = $total_posts * $posts_numbers[$i]; } } return $total_posts; } return 0; } public function recursive_content_generation($string=[], $keywords=[], $content=[]){ if(empty($keywords)) return $content; $keyword = array_keys($keywords)[0]; if(empty($content)){ foreach($keywords[$keyword] as $key){ $array = [ 't' => $string, $keyword => $key, ]; array_push($content, $array); } }else{ $new_content = []; foreach($content as $array){ foreach($keywords[$keyword] as $key){ $array[$keyword] = $key; array_push($new_content, $array); } } $content = $new_content; unset($new_content); } unset($keywords[$keyword]); return $this->recursive_content_generation($string, $keywords, $content); } private function replace_keywords($keywords=[], $string=[]){ foreach(array_keys($keywords) as $kw){ $string = str_replace('%%%'.$kw.'%%%', trim(str_replace(array('\r', '\n'), NULL, $keywords[$kw])), $string); } return trim($string); } public function delete_all_generated_content(){ $args = array( 'posts_per_page' => -1, 'post_type' => get_post_types(), 'meta_query' => array( array( 'key' => $this->generated_meta, 'value' => '1', 'compare' => '>=', ) ) ); $query = new WP_Query($args); $count=0; $deleted_posts = []; while($query->have_posts()){ $query->the_post(); wp_delete_post(get_the_ID(), true); $count++; array_push($deleted_posts, get_the_ID()); } wp_reset_postdata(); return [ 'count' => $count, 'deleted_ids' => $deleted_posts ]; } public function generate_virtual_content($data=[], $keywords=[]){ $posts_numbers = $this->get_posts_number($data['post_title'], $keywords); $contents = $this->recursive_content_generation($data['post_title'], $keywords, []); $generated_posts = 0; $updated_posts = 0; foreach($contents as $content){ if($generated_posts>$data['limit']) break; $generated_title = $this->replace_keywords($content, $this->spintax->process($content['t'])); if(strlen(trim($generated_title))>=1){ $post_exists = post_exists($generated_title); if($post_exists>=1){ wp_delete_post($post_exists, true); $updated_posts++; } $generated_post = array( 'post_title' => wp_strip_all_tags($generated_title), 'post_content' => $this->replace_keywords($content, $this->spintax->process($data['post_content'])), 'post_status' => 'publish', 'post_parent' => $data['post_parent'], 'post_author' => $data['post_author'], 'post_type' => (isset($data['post_type']) && $this->valid_post_type($data['post_type']) ? $data['post_type'] : $this->default_post_type) ); if(isset($data['post_type']) && isset($data['post_category']) && $data['post_type'] != 'page'){ $generated_post['post_category'] = $data['post_category']; } $id = wp_insert_post($generated_post); if($id){ add_post_meta($id, $this->generated_meta, $data['ID']); $forbidden_keys = [$this->template_meta, '_edit_last', '_edit_lock', '_thumbnail_id']; if(isset($data['meta'])){ foreach($data['meta'] as $key => $value){ if(!in_array($key, $forbidden_keys)){ $v = $this->replace_keywords($content, $this->spintax->process((is_array($value) && isset($value[0]) ? $value[0] : $value))); update_post_meta($id, $key, $v); unset($v); } } } $thumbnail_id = get_post_thumbnail_id($id); if($thumbnail_id && $thumbnail_id>0){ set_post_thumbnail($id, $thumbnail_id); } $generated_posts++; delete_post_meta($id, $this->template_meta); }else{ throw new Exception(__('Un artículo no ha podido ser generado por motivos desconocidos. Abortada generación de contenido.', $this->get_translations())); } } } return ['generated' => $generated_posts, 'updated' => $updated_posts]; } private function valid_post_type($post_type=''): bool{ if(!is_string($post_type) || strlen(trim($post_type))<=0 || (is_string($post_type) && !post_type_exists($post_type))) return false; return ($post_type == 'page' || $post_type == 'post'); } public function generate_content($data=[]){ if(!$this->table_exists){ throw new Exception(__('La tabla de la base de datos para la generación de contenido no está creada.', $this->get_translations())); } $keyword_templates = $this->get_keyword_templates(); if(empty($keyword_templates)){ throw new Exception(__('Es necesario definir las palabras clave antes de generar contenido.', $this->get_translations())); } if(!isset($data['post_type']) || !$this->valid_post_type($data['post_type'])){ throw new Exception(__('Es necesario indicar el tipo de contenido a generar. Se admite 'post' o 'page'.', $this->get_translations())); }else if(!post_type_exists($data['post_type'])){ throw new Exception(__('El tipo de post indicado no existe.', $this->get_translations())); } if(!isset($data['limit']) || !is_numeric($data['limit'])){ $data['limit'] = $this->default_limit; } if(!isset($data['post_title'])){ throw new Exception(__('Es necesario indicar el título que se utilizará.', $this->get_translations())); }else if(!is_string($data['post_title']) || strlen(trim($data['post_title']))==0){ throw new Exception(__('El título indicado no es válido.', $this->get_translations())); }else{ $title_keywords = $this->get_keywords($data['post_title']); if(count($title_keywords) == 0){ throw new Exception(__('No hay ninguna palabra clave indicada en el título.', $this->get_translations())); } } if(!isset($data['post_content'])){ throw new Exception(__('Es necesario el contenido que se utilizará.', $this->get_translations())); }else if(!is_string($data['post_content']) || strlen(trim($data['post_content']))==0){ throw new Exception(__('El contenido indicado para la generación de contenido no es válido. PLa variable $this a été trouvée dans une fonction de traduction dans le fichier content-generator.php . Les appels de fonctions de traduction ne doivent pas contenir de variables PHP. 43: ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;'); $this->table_exists = $this->check_wpdb_content_generator_db(); }catch(Exception $ex){ add_action( 'admin_notices', function() { $class = 'notice notice-error'; $message = __( 'No es posible crear la tabla para la generación de contenido. El mensaje de error devuelto es: '.$ex->getMessage(), $this->get_translations()); printf('<div class='%1$s'><p>%2$s</p></div>', esc_attr($class), esc_html($message)); }); } } } public function table_exists(): bool{ return $this->table_exists; } private function get_translations(){ return (defined('TRANSLATIONS') ? TRANSLATIONS : 'content-generator'); } public function add_shortcode(){ add_shortcode('content-generator-list', function($atts=[], $content=NULL){ return ''; }); } public function is_content_generated($post_id=0){ if(!is_numeric($post_id) || $post_id<=0) return false; if(get_post_status($post_id) === FALSE) return false; $post_by_content_generator = get_post_meta($post_id, 'content-generator', TRUE); return ($post_by_content_generator); } private function get_keyword_parent_id($keyword=0){ if(!is_string($keyword)) return []; $results = $this->wpdb->get_results( $this->wpdb->prepare('SELECT id, keyword FROM '.$this->table.' WHERE parent=%d', [0]) ); foreach($results as $kw){ if($kw->keyword == $keyword || $this->slugify($kw->keyword) == $keyword){ return $kw->id; } } return 0; } private function add_keywords_to_parent($keyword=0, $keywords=[]): bool{ if(empty($keywords)) return false; if(is_numeric($keyword) && $keyword>0){ $keyword_id = (object)['id' => $keyword]; }else{ $keyword_id = $this->wpdb->get_row( $this->wpdb->prepare('SELECT id FROM '.$this->table.' WHERE keyword=%s AND parent=0', [$keyword]) ); } if(!empty($keyword_id) && isset($keyword_id->id)){ $created = 0; foreach($keywords as $kw){ if(is_string($kw) && strlen(trim($kw))>0){ $created++; $this->wpdb->insert($this->table, ['keyword' => $kw, 'parent' => $keyword_id->id], ['%s', '%d']); } } return ($created>0 ? true : false); } return false; } private function delete_keyword_group($keyword=0): bool{ if(!is_numeric($keyword)) return false; $result = $this->wpdb->delete($this->table, ['id' => $keyword, 'parent' => 0], ['%d', '%d']); return ($result); } private function delete_keywords_from_parent($keyword=0): bool{ if(is_numeric($keyword) && $keyword>0){ $keyword_id = (object)['id' => $keyword]; }else{ $keyword_id = $this->wpdb->get_row( $this->wpdb->prepare('SELECT id FROM '.$this->table.' WHERE keyword=%s AND parent=0', [$keyword]) ); } if(!empty($keyword_id) && isset($keyword_id->id)){ $result = $this->wpdb->delete($this->table, ['parent' => $keyword_id->id], ['%d']); return ($result); } return false; } private function get_keywords_from_parent($keyword=0){ if(is_numeric($keyword) && (int)$keyword>0){ $keyword_id = (object)['id' => $keyword]; }else{ $keyword_id = (object)['id' => $this->get_keyword_parent_id($keyword)]; } if(!empty($keyword_id) && isset($keyword_id->id)){ $keyword_list = $this->wpdb->get_results( $this->wpdb->prepare('SELECT DISTINCT keyword FROM '.$this->table.' WHERE parent=%d', [$keyword_id->id]) ); return ($keyword_list!=NULL && !empty($keyword_list) ? $keyword_list : []); } return []; } private function get_keywords($string, $just_parent_keywords=false){ if(!is_string($string) || strlen(trim($string))==0) return []; $matches_normalized = []; preg_match_all('/%%%[^%]*%%%/', $string, $matches); foreach($matches as $array){ foreach($array as $match){ $match = trim(str_replace('%%%', NULL, $match)); if(strlen(trim($match))>0 && !in_array($match, $matches_normalized)){ array_push($matches_normalized, $match); } } } if($just_parent_keywords){ return $matches_normalized; } $groups = []; if(!empty($matches_normalized)){ foreach($matches_normalized as $parent_keyword){ if(!isset($groups[$parent_keyword])){ $groups[$parent_keyword] = []; } $group = $this->get_keywords_from_parent($this->get_keyword_parent_title($parent_keyword)); if(!empty($group)){ foreach($group as $keyword){ if(!in_array($keyword->keyword, $groups[$parent_keyword])){ array_push($groups[$parent_keyword], $keyword->keyword); } } } } } return $groups; } public function get_posts_number($string=[], $keywords=[]){ $posts_numbers = []; foreach($keywords as $parent => $list){ array_push($posts_numbers, count($list)); } if(count($posts_numbers) == 1){ return $posts_numbers; }else{ $total_posts=NULL; for($i=0; $i<count($posts_numbers); $i++){ if($total_posts==NULL){ $total_posts=$posts_numbers[$i]; continue; } if(isset($posts_numbers[$i])){ $total_posts = $total_posts * $posts_numbers[$i]; } } return $total_posts; } return 0; } public function recursive_content_generation($string=[], $keywords=[], $content=[]){ if(empty($keywords)) return $content; $keyword = array_keys($keywords)[0]; if(empty($content)){ foreach($keywords[$keyword] as $key){ $array = [ 't' => $string, $keyword => $key, ]; array_push($content, $array); } }else{ $new_content = []; foreach($content as $array){ foreach($keywords[$keyword] as $key){ $array[$keyword] = $key; array_push($new_content, $array); } } $content = $new_content; unset($new_content); } unset($keywords[$keyword]); return $this->recursive_content_generation($string, $keywords, $content); } private function replace_keywords($keywords=[], $string=[]){ foreach(array_keys($keywords) as $kw){ $string = str_replace('%%%'.$kw.'%%%', trim(str_replace(array('\r', '\n'), NULL, $keywords[$kw])), $string); } return trim($string); } public function delete_all_generated_content(){ $args = array( 'posts_per_page' => -1, 'post_type' => get_post_types(), 'meta_query' => array( array( 'key' => $this->generated_meta, 'value' => '1', 'compare' => '>=', ) ) ); $query = new WP_Query($args); $count=0; $deleted_posts = []; while($query->have_posts()){ $query->the_post(); wp_delete_post(get_the_ID(), true); $count++; array_push($deleted_posts, get_the_ID()); } wp_reset_postdata(); return [ 'count' => $count, 'deleted_ids' => $deleted_posts ]; } public function generate_virtual_content($data=[], $keywords=[]){ $posts_numbers = $this->get_posts_number($data['post_title'], $keywords); $contents = $this->recursive_content_generation($data['post_title'], $keywords, []); $generated_posts = 0; $updated_posts = 0; foreach($contents as $content){ if($generated_posts>$data['limit']) break; $generated_title = $this->replace_keywords($content, $this->spintax->process($content['t'])); if(strlen(trim($generated_title))>=1){ $post_exists = post_exists($generated_title); if($post_exists>=1){ wp_delete_post($post_exists, true); $updated_posts++; } $generated_post = array( 'post_title' => wp_strip_all_tags($generated_title), 'post_content' => $this->replace_keywords($content, $this->spintax->process($data['post_content'])), 'post_status' => 'publish', 'post_parent' => $data['post_parent'], 'post_author' => $data['post_author'], 'post_type' => (isset($data['post_type']) && $this->valid_post_type($data['post_type']) ? $data['post_type'] : $this->default_post_type) ); if(isset($data['post_type']) && isset($data['post_category']) && $data['post_type'] != 'page'){ $generated_post['post_category'] = $data['post_category']; } $id = wp_insert_post($generated_post); if($id){ add_post_meta($id, $this->generated_meta, $data['ID']); $forbidden_keys = [$this->template_meta, '_edit_last', '_edit_lock', '_thumbnail_id']; if(isset($data['meta'])){ foreach($data['meta'] as $key => $value){ if(!in_array($key, $forbidden_keys)){ $v = $this->replace_keywords($content, $this->spintax->process((is_array($value) && isset($value[0]) ? $value[0] : $value))); update_post_meta($id, $key, $v); unset($v); } } } $thumbnail_id = get_post_thumbnail_id($id); if($thumbnail_id && $thumbnail_id>0){ set_post_thumbnail($id, $thumbnail_id); } $generated_posts++; delete_post_meta($id, $this->template_meta); }else{ throw new Exception(__('Un artículo no ha podido ser generado por motivos desconocidos. Abortada generación de contenido.', $this->get_translations())); } } } return ['generated' => $generated_posts, 'updated' => $updated_posts]; } private function valid_post_type($post_type=''): bool{ if(!is_string($post_type) || strlen(trim($post_type))<=0 || (is_string($post_type) && !post_type_exists($post_type))) return false; return ($post_type == 'page' || $post_type == 'post'); } public function generate_content($data=[]){ if(!$this->table_exists){ throw new Exception(__('La tabla de la base de datos para la generación de contenido no está creada.', $this->get_translations())); } $keyword_templates = $this->get_keyword_templates(); if(empty($keyword_templates)){ throw new Exception(__('Es necesario definir las palabras clave antes de generar contenido.', $this->get_translations())); } if(!isset($data['post_type']) || !$this->valid_post_type($data['post_type'])){ throw new Exception(__('Es necesario indicar el tipo de contenido a generar. Se admite 'post' o 'page'.', $this->get_translations())); }else if(!post_type_exists($data['post_type'])){ throw new Exception(__('El tipo de post indicado no existe.', $this->get_translations())); } if(!isset($data['limit']) || !is_numeric($data['limit'])){ $data['limit'] = $this->default_limit; } if(!isset($data['post_title'])){ throw new Exception(__('Es necesario indicar el título que se utilizará.', $this->get_translations())); }else if(!is_string($data['post_title']) || strlen(trim($data['post_title']))==0){ throw new Exception(__('El título indicado no es válido.', $this->get_translations())); }else{ $title_keywords = $this->get_keywords($data['post_title']); if(count($title_keywords) == 0){ throw new Exception(__('No hay ninguna palabra clave indicada en el título.', $this->get_translations())); } } if(!isset($data['post_content'])){ throw new Exception(__('Es necesario el contenido que se utilizará.', $this->get_translations())); }else if(!is_string($data['post_content']) || strlen(trim($data['post_content']))==0){ throw new Exception(__('El contenido indicado para la generación de contenido no es válido. Por favor indica un contenido válido.', $this->get_translations())); }else{ $content_keywords = $this->get_keywords($data['post_content']); if(count($content_keywords) == 0){ throw new Exception(__('No hay ninguna palabra clave indicada en el contenido.', $this->get_traLa variable $this a été trouvée dans une fonction de traduction dans le fichier content-generator.php . Les appels de fonctions de traduction ne doivent pas contenir de variables PHP. 43: ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;'); $this->table_exists = $this->check_wpdb_content_generator_db(); }catch(Exception $ex){ add_action( 'admin_notices', function() { $class = 'notice notice-error'; $message = __( 'No es posible crear la tabla para la generación de contenido. El mensaje de error devuelto es: '.$ex->getMessage(), $this->get_translations()); printf('<div class='%1$s'><p>%2$s</p></div>', esc_attr($class), esc_html($message)); }); } } } public function table_exists(): bool{ return $this->table_exists; } private function get_translations(){ return (defined('TRANSLATIONS') ? TRANSLATIONS : 'content-generator'); } public function add_shortcode(){ add_shortcode('content-generator-list', function($atts=[], $content=NULL){ return ''; }); } public function is_content_generated($post_id=0){ if(!is_numeric($post_id) || $post_id<=0) return false; if(get_post_status($post_id) === FALSE) return false; $post_by_content_generator = get_post_meta($post_id, 'content-generator', TRUE); return ($post_by_content_generator); } private function get_keyword_parent_id($keyword=0){ if(!is_string($keyword)) return []; $results = $this->wpdb->get_results( $this->wpdb->prepare('SELECT id, keyword FROM '.$this->table.' WHERE parent=%d', [0]) ); foreach($results as $kw){ if($kw->keyword == $keyword || $this->slugify($kw->keyword) == $keyword){ return $kw->id; } } return 0; } private function add_keywords_to_parent($keyword=0, $keywords=[]): bool{ if(empty($keywords)) return false; if(is_numeric($keyword) && $keyword>0){ $keyword_id = (object)['id' => $keyword]; }else{ $keyword_id = $this->wpdb->get_row( $this->wpdb->prepare('SELECT id FROM '.$this->table.' WHERE keyword=%s AND parent=0', [$keyword]) ); } if(!empty($keyword_id) && isset($keyword_id->id)){ $created = 0; foreach($keywords as $kw){ if(is_string($kw) && strlen(trim($kw))>0){ $created++; $this->wpdb->insert($this->table, ['keyword' => $kw, 'parent' => $keyword_id->id], ['%s', '%d']); } } return ($created>0 ? true : false); } return false; } private function delete_keyword_group($keyword=0): bool{ if(!is_numeric($keyword)) return false; $result = $this->wpdb->delete($this->table, ['id' => $keyword, 'parent' => 0], ['%d', '%d']); return ($result); } private function delete_keywords_from_parent($keyword=0): bool{ if(is_numeric($keyword) && $keyword>0){ $keyword_id = (object)['id' => $keyword]; }else{ $keyword_id = $this->wpdb->get_row( $this->wpdb->prepare('SELECT id FROM '.$this->table.' WHERE keyword=%s AND parent=0', [$keyword]) ); } if(!empty($keyword_id) && isset($keyword_id->id)){ $result = $this->wpdb->delete($this->table, ['parent' => $keyword_id->id], ['%d']); return ($result); } return false; } private function get_keywords_from_parent($keyword=0){ if(is_numeric($keyword) && (int)$keyword>0){ $keyword_id = (object)['id' => $keyword]; }else{ $keyword_id = (object)['id' => $this->get_keyword_parent_id($keyword)]; } if(!empty($keyword_id) && isset($keyword_id->id)){ $keyword_list = $this->wpdb->get_results( $this->wpdb->prepare('SELECT DISTINCT keyword FROM '.$this->table.' WHERE parent=%d', [$keyword_id->id]) ); return ($keyword_list!=NULL && !empty($keyword_list) ? $keyword_list : []); } return []; } private function get_keywords($string, $just_parent_keywords=false){ if(!is_string($string) || strlen(trim($string))==0) return []; $matches_normalized = []; preg_match_all('/%%%[^%]*%%%/', $string, $matches); foreach($matches as $array){ foreach($array as $match){ $match = trim(str_replace('%%%', NULL, $match)); if(strlen(trim($match))>0 && !in_array($match, $matches_normalized)){ array_push($matches_normalized, $match); } } } if($just_parent_keywords){ return $matches_normalized; } $groups = []; if(!empty($matches_normalized)){ foreach($matches_normalized as $parent_keyword){ if(!isset($groups[$parent_keyword])){ $groups[$parent_keyword] = []; } $group = $this->get_keywords_from_parent($this->get_keyword_parent_title($parent_keyword)); if(!empty($group)){ foreach($group as $keyword){ if(!in_array($keyword->keyword, $groups[$parent_keyword])){ array_push($groups[$parent_keyword], $keyword->keyword); } } } } } return $groups; } public function get_posts_number($string=[], $keywords=[]){ $posts_numbers = []; foreach($keywords as $parent => $list){ array_push($posts_numbers, count($list)); } if(count($posts_numbers) == 1){ return $posts_numbers; }else{ $total_posts=NULL; for($i=0; $i<count($posts_numbers); $i++){ if($total_posts==NULL){ $total_posts=$posts_numbers[$i]; continue; } if(isset($posts_numbers[$i])){ $total_posts = $total_posts * $posts_numbers[$i]; } } return $total_posts; } return 0; } public function recursive_content_generation($string=[], $keywords=[], $content=[]){ if(empty($keywords)) return $content; $keyword = array_keys($keywords)[0]; if(empty($content)){ foreach($keywords[$keyword] as $key){ $array = [ 't' => $string, $keyword => $key, ]; array_push($content, $array); } }else{ $new_content = []; foreach($content as $array){ foreach($keywords[$keyword] as $key){ $array[$keyword] = $key; array_push($new_content, $array); } } $content = $new_content; unset($new_content); } unset($keywords[$keyword]); return $this->recursive_content_generation($string, $keywords, $content); } private function replace_keywords($keywords=[], $string=[]){ foreach(array_keys($keywords) as $kw){ $string = str_replace('%%%'.$kw.'%%%', trim(str_replace(array('\r', '\n'), NULL, $keywords[$kw])), $string); } return trim($string); } public function delete_all_generated_content(){ $args = array( 'posts_per_page' => -1, 'post_type' => get_post_types(), 'meta_query' => array( array( 'key' => $this->generated_meta, 'value' => '1', 'compare' => '>=', ) ) ); $query = new WP_Query($args); $count=0; $deleted_posts = []; while($query->have_posts()){ $query->the_post(); wp_delete_post(get_the_ID(), true); $count++; array_push($deleted_posts, get_the_ID()); } wp_reset_postdata(); return [ 'count' => $count, 'deleted_ids' => $deleted_posts ]; } public function generate_virtual_content($data=[], $keywords=[]){ $posts_numbers = $this->get_posts_number($data['post_title'], $keywords); $contents = $this->recursive_content_generation($data['post_title'], $keywords, []); $generated_posts = 0; $updated_posts = 0; foreach($contents as $content){ if($generated_posts>$data['limit']) break; $generated_title = $this->replace_keywords($content, $this->spintax->process($content['t'])); if(strlen(trim($generated_title))>=1){ $post_exists = post_exists($generated_title); if($post_exists>=1){ wp_delete_post($post_exists, true); $updated_posts++; } $generated_post = array( 'post_title' => wp_strip_all_tags($generated_title), 'post_content' => $this->replace_keywords($content, $this->spintax->process($data['post_content'])), 'post_status' => 'publish', 'post_parent' => $data['post_parent'], 'post_author' => $data['post_author'], 'post_type' => (isset($data['post_type']) && $this->valid_post_type($data['post_type']) ? $data['post_type'] : $this->default_post_type) ); if(isset($data['post_type']) && isset($data['post_category']) && $data['post_type'] != 'page'){ $generated_post['post_category'] = $data['post_category']; } $id = wp_insert_post($generated_post); if($id){ add_post_meta($id, $this->generated_meta, $data['ID']); $forbidden_keys = [$this->template_meta, '_edit_last', '_edit_lock', '_thumbnail_id']; if(isset($data['meta'])){ foreach($data['meta'] as $key => $value){ if(!in_array($key, $forbidden_keys)){ $v = $this->replace_keywords($content, $this->spintax->process((is_array($value) && isset($value[0]) ? $value[0] : $value))); update_post_meta($id, $key, $v); unset($v); } } } $thumbnail_id = get_post_thumbnail_id($id); if($thumbnail_id && $thumbnail_id>0){ set_post_thumbnail($id, $thumbnail_id); } $generated_posts++; delete_post_meta($id, $this->template_meta); }else{ throw new Exception(__('Un artículo no ha podido ser generado por motivos desconocidos. Abortada generación de contenido.', $this->get_translations())); } } } return ['generated' => $generated_posts, 'updated' => $updated_posts]; } private function valid_post_type($post_type=''): bool{ if(!is_string($post_type) || strlen(trim($post_type))<=0 || (is_string($post_type) && !post_type_exists($post_type))) return false; return ($post_type == 'page' || $post_type == 'post'); } public function generate_content($data=[]){ if(!$this->table_exists){ throw new Exception(__('La tabla de la base de datos para la generación de contenido no está creada.', $this->get_translations())); } $keyword_templates = $this->get_keyword_templates(); if(empty($keyword_templates)){ throw new Exception(__('Es necesario definir las palabras clave antes de generar contenido.', $this->get_translations())); } if(!isset($data['post_type']) || !$this->valid_post_type($data['post_type'])){ throw new Exception(__('Es necesario indicar el tipo de contenido a generar. Se admite 'post' o 'page'.', $this->get_translations())); }else if(!post_type_exists($data['post_type'])){ throw new Exception(__('El tipo de post indicado no existe.', $this->get_translations())); } if(!isset($data['limit']) || !is_numeric($data['limit'])){ $data['limit'] = $this->default_limit; } if(!isset($data['post_title'])){ throw new Exception(__('Es necesario indicar el título que se utilizará.', $this->get_translations())); }else if(!is_string($data['post_title']) || strlen(trim($data['post_title']))==0){ throw new Exception(__('El título indicado no es válido.', $this->get_translations())); }else{ $title_keywords = $this->get_keywords($data['post_title']); if(count($title_keywords) == 0){ throw new Exception(__('No hay ninguna palabra clave indicada en el título.', $this->get_translations())); } } if(!isset($data['post_content'])){ throw new Exception(__('Es necesario el contenido que se utilizará.', $this->get_translations())); }else if(!is_string($data['post_content']) || strlen(trim($data['post_content']))==0){ throw new Exception(__('El contenido indicado para la generación de contenido no es válido. Por favor indica un contenido válido.', $this->get_translations())); }else{ $content_keywords = $this->get_keywords($data['post_content']); if(count($content_keywords) == 0){ throw new Exception(__('No hay ninguna palabra clave indicada en el contenido.', $this->get_translations())); } } $keywords = array_merge($content_keywords, $title_keywords); foreach($keywords as $parent_kw => $k){ if(!in_array($parent_kw, $keyword_templates)){ throw new Exception(sprintf(__('El grupo de palabras clave %s usada en el contenido o título no está La variable $this a été trouvée dans une fonction de traduction dans le fichier content-generator.php . Les appels de fonctions de traduction ne doivent pas contenir de variables PHP. 43: ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;'); $this->table_exists = $this->check_wpdb_content_generator_db(); }catch(Exception $ex){ add_action( 'admin_notices', function() { $class = 'notice notice-error'; $message = __( 'No es posible crear la tabla para la generación de contenido. El mensaje de error devuelto es: '.$ex->getMessage(), $this->get_translations()); printf('<div class='%1$s'><p>%2$s</p></div>', esc_attr($class), esc_html($message)); }); } } } public function table_exists(): bool{ return $this->table_exists; } private function get_translations(){ return (defined('TRANSLATIONS') ? TRANSLATIONS : 'content-generator'); } public function add_shortcode(){ add_shortcode('content-generator-list', function($atts=[], $content=NULL){ return ''; }); } public function is_content_generated($post_id=0){ if(!is_numeric($post_id) || $post_id<=0) return false; if(get_post_status($post_id) === FALSE) return false; $post_by_content_generator = get_post_meta($post_id, 'content-generator', TRUE); return ($post_by_content_generator); } private function get_keyword_parent_id($keyword=0){ if(!is_string($keyword)) return []; $results = $this->wpdb->get_results( $this->wpdb->prepare('SELECT id, keyword FROM '.$this->table.' WHERE parent=%d', [0]) ); foreach($results as $kw){ if($kw->keyword == $keyword || $this->slugify($kw->keyword) == $keyword){ return $kw->id; } } return 0; } private function add_keywords_to_parent($keyword=0, $keywords=[]): bool{ if(empty($keywords)) return false; if(is_numeric($keyword) && $keyword>0){ $keyword_id = (object)['id' => $keyword]; }else{ $keyword_id = $this->wpdb->get_row( $this->wpdb->prepare('SELECT id FROM '.$this->table.' WHERE keyword=%s AND parent=0', [$keyword]) ); } if(!empty($keyword_id) && isset($keyword_id->id)){ $created = 0; foreach($keywords as $kw){ if(is_string($kw) && strlen(trim($kw))>0){ $created++; $this->wpdb->insert($this->table, ['keyword' => $kw, 'parent' => $keyword_id->id], ['%s', '%d']); } } return ($created>0 ? true : false); } return false; } private function delete_keyword_group($keyword=0): bool{ if(!is_numeric($keyword)) return false; $result = $this->wpdb->delete($this->table, ['id' => $keyword, 'parent' => 0], ['%d', '%d']); return ($result); } private function delete_keywords_from_parent($keyword=0): bool{ if(is_numeric($keyword) && $keyword>0){ $keyword_id = (object)['id' => $keyword]; }else{ $keyword_id = $this->wpdb->get_row( $this->wpdb->prepare('SELECT id FROM '.$this->table.' WHERE keyword=%s AND parent=0', [$keyword]) ); } if(!empty($keyword_id) && isset($keyword_id->id)){ $result = $this->wpdb->delete($this->table, ['parent' => $keyword_id->id], ['%d']); return ($result); } return false; } private function get_keywords_from_parent($keyword=0){ if(is_numeric($keyword) && (int)$keyword>0){ $keyword_id = (object)['id' => $keyword]; }else{ $keyword_id = (object)['id' => $this->get_keyword_parent_id($keyword)]; } if(!empty($keyword_id) && isset($keyword_id->id)){ $keyword_list = $this->wpdb->get_results( $this->wpdb->prepare('SELECT DISTINCT keyword FROM '.$this->table.' WHERE parent=%d', [$keyword_id->id]) ); return ($keyword_list!=NULL && !empty($keyword_list) ? $keyword_list : []); } return []; } private function get_keywords($string, $just_parent_keywords=false){ if(!is_string($string) || strlen(trim($string))==0) return []; $matches_normalized = []; preg_match_all('/%%%[^%]*%%%/', $string, $matches); foreach($matches as $array){ foreach($array as $match){ $match = trim(str_replace('%%%', NULL, $match)); if(strlen(trim($match))>0 && !in_array($match, $matches_normalized)){ array_push($matches_normalized, $match); } } } if($just_parent_keywords){ return $matches_normalized; } $groups = []; if(!empty($matches_normalized)){ foreach($matches_normalized as $parent_keyword){ if(!isset($groups[$parent_keyword])){ $groups[$parent_keyword] = []; } $group = $this->get_keywords_from_parent($this->get_keyword_parent_title($parent_keyword)); if(!empty($group)){ foreach($group as $keyword){ if(!in_array($keyword->keyword, $groups[$parent_keyword])){ array_push($groups[$parent_keyword], $keyword->keyword); } } } } } return $groups; } public function get_posts_number($string=[], $keywords=[]){ $posts_numbers = []; foreach($keywords as $parent => $list){ array_push($posts_numbers, count($list)); } if(count($posts_numbers) == 1){ return $posts_numbers; }else{ $total_posts=NULL; for($i=0; $i<count($posts_numbers); $i++){ if($total_posts==NULL){ $total_posts=$posts_numbers[$i]; continue; } if(isset($posts_numbers[$i])){ $total_posts = $total_posts * $posts_numbers[$i]; } } return $total_posts; } return 0; } public function recursive_content_generation($string=[], $keywords=[], $content=[]){ if(empty($keywords)) return $content; $keyword = array_keys($keywords)[0]; if(empty($content)){ foreach($keywords[$keyword] as $key){ $array = [ 't' => $string, $keyword => $key, ]; array_push($content, $array); } }else{ $new_content = []; foreach($content as $array){ foreach($keywords[$keyword] as $key){ $array[$keyword] = $key; array_push($new_content, $array); } } $content = $new_content; unset($new_content); } unset($keywords[$keyword]); return $this->recursive_content_generation($string, $keywords, $content); } private function replace_keywords($keywords=[], $string=[]){ foreach(array_keys($keywords) as $kw){ $string = str_replace('%%%'.$kw.'%%%', trim(str_replace(array('\r', '\n'), NULL, $keywords[$kw])), $string); } return trim($string); } public function delete_all_generated_content(){ $args = array( 'posts_per_page' => -1, 'post_type' => get_post_types(), 'meta_query' => array( array( 'key' => $this->generated_meta, 'value' => '1', 'compare' => '>=', ) ) ); $query = new WP_Query($args); $count=0; $deleted_posts = []; while($query->have_posts()){ $query->the_post(); wp_delete_post(get_the_ID(), true); $count++; array_push($deleted_posts, get_the_ID()); } wp_reset_postdata(); return [ 'count' => $count, 'deleted_ids' => $deleted_posts ]; } public function generate_virtual_content($data=[], $keywords=[]){ $posts_numbers = $this->get_posts_number($data['post_title'], $keywords); $contents = $this->recursive_content_generation($data['post_title'], $keywords, []); $generated_posts = 0; $updated_posts = 0; foreach($contents as $content){ if($generated_posts>$data['limit']) break; $generated_title = $this->replace_keywords($content, $this->spintax->process($content['t'])); if(strlen(trim($generated_title))>=1){ $post_exists = post_exists($generated_title); if($post_exists>=1){ wp_delete_post($post_exists, true); $updated_posts++; } $generated_post = array( 'post_title' => wp_strip_all_tags($generated_title), 'post_content' => $this->replace_keywords($content, $this->spintax->process($data['post_content'])), 'post_status' => 'publish', 'post_parent' => $data['post_parent'], 'post_author' => $data['post_author'], 'post_type' => (isset($data['post_type']) && $this->valid_post_type($data['post_type']) ? $data['post_type'] : $this->default_post_type) ); if(isset($data['post_type']) && isset($data['post_category']) && $data['post_type'] != 'page'){ $generated_post['post_category'] = $data['post_category']; } $id = wp_insert_post($generated_post); if($id){ add_post_meta($id, $this->generated_meta, $data['ID']); $forbidden_keys = [$this->template_meta, '_edit_last', '_edit_lock', '_thumbnail_id']; if(isset($data['meta'])){ foreach($data['meta'] as $key => $value){ if(!in_array($key, $forbidden_keys)){ $v = $this->replace_keywords($content, $this->spintax->process((is_array($value) && isset($value[0]) ? $value[0] : $value))); update_post_meta($id, $key, $v); unset($v); } } } $thumbnail_id = get_post_thumbnail_id($id); if($thumbnail_id && $thumbnail_id>0){ set_post_thumbnail($id, $thumbnail_id); } $generated_posts++; delete_post_meta($id, $this->template_meta); }else{ throw new Exception(__('Un artículo no ha podido ser generado por motivos desconocidos. Abortada generación de contenido.', $this->get_translations())); } } } return ['generated' => $generated_posts, 'updated' => $updated_posts]; } private function valid_post_type($post_type=''): bool{ if(!is_string($post_type) || strlen(trim($post_type))<=0 || (is_string($post_type) && !post_type_exists($post_type))) return false; return ($post_type == 'page' || $post_type == 'post'); } public function generate_content($data=[]){ if(!$this->table_exists){ throw new Exception(__('La tabla de la base de datos para la generación de contenido no está creada.', $this->get_translations())); } $keyword_templates = $this->get_keyword_templates(); if(empty($keyword_templates)){ throw new Exception(__('Es necesario definir las palabras clave antes de generar contenido.', $this->get_translations())); } if(!isset($data['post_type']) || !$this->valid_post_type($data['post_type'])){ throw new Exception(__('Es necesario indicar el tipo de contenido a generar. Se admite 'post' o 'page'.', $this->get_translations())); }else if(!post_type_exists($data['post_type'])){ throw new Exception(__('El tipo de post indicado no existe.', $this->get_translations())); } if(!isset($data['limit']) || !is_numeric($data['limit'])){ $data['limit'] = $this->default_limit; } if(!isset($data['post_title'])){ throw new Exception(__('Es necesario indicar el título que se utilizará.', $this->get_translations())); }else if(!is_string($data['post_title']) || strlen(trim($data['post_title']))==0){ throw new Exception(__('El título indicado no es válido.', $this->get_translations())); }else{ $title_keywords = $this->get_keywords($data['post_title']); if(count($title_keywords) == 0){ throw new Exception(__('No hay ninguna palabra clave indicada en el título.', $this->get_translations())); } } if(!isset($data['post_content'])){ throw new Exception(__('Es necesario el contenido que se utilizará.', $this->get_translations())); }else if(!is_string($data['post_content']) || strlen(trim($data['post_content']))==0){ throw new Exception(__('El contenido indicado para la generación de contenido no es válido. Por favor indica un contenido válido.', $this->get_translations())); }else{ $content_keywords = $this->get_keywords($data['post_content']); if(count($content_keywords) == 0){ throw new Exception(__('No hay ninguna palabra clave indicada en el contenido.', $this->get_translations())); } } $keywords = array_merge($content_keywords, $title_keywords); foreach($keywords as $parent_kw => $k){ if(!in_array($parent_kw, $keyword_templates)){ throw new Exception(sprintf(__('El grupo de palabras clave %s usada en el contenido o título no está registrada en tus plantillas.', $this->get_translations()), esc_html($parent_kw))); } if(count($k) == 0){ throw new Exception(sprintf(__('No hay ninguna palabra clave dentro del grupo %s.', $this->get_translatLa variable $this a été trouvée dans une fonction de traduction dans le fichier content-generator.php . Les appels de fonctions de traduction ne doivent pas contenir de variables PHP. 43: ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;'); $this->table_exists = $this->check_wpdb_content_generator_db(); }catch(Exception $ex){ add_action( 'admin_notices', function() { $class = 'notice notice-error'; $message = __( 'No es posible crear la tabla para la generación de contenido. El mensaje de error devuelto es: '.$ex->getMessage(), $this->get_translations()); printf('<div class='%1$s'><p>%2$s</p></div>', esc_attr($class), esc_html($message)); }); } } } public function table_exists(): bool{ return $this->table_exists; } private function get_translations(){ return (defined('TRANSLATIONS') ? TRANSLATIONS : 'content-generator'); } public function add_shortcode(){ add_shortcode('content-generator-list', function($atts=[], $content=NULL){ return ''; }); } public function is_content_generated($post_id=0){ if(!is_numeric($post_id) || $post_id<=0) return false; if(get_post_status($post_id) === FALSE) return false; $post_by_content_generator = get_post_meta($post_id, 'content-generator', TRUE); return ($post_by_content_generator); } private function get_keyword_parent_id($keyword=0){ if(!is_string($keyword)) return []; $results = $this->wpdb->get_results( $this->wpdb->prepare('SELECT id, keyword FROM '.$this->table.' WHERE parent=%d', [0]) ); foreach($results as $kw){ if($kw->keyword == $keyword || $this->slugify($kw->keyword) == $keyword){ return $kw->id; } } return 0; } private function add_keywords_to_parent($keyword=0, $keywords=[]): bool{ if(empty($keywords)) return false; if(is_numeric($keyword) && $keyword>0){ $keyword_id = (object)['id' => $keyword]; }else{ $keyword_id = $this->wpdb->get_row( $this->wpdb->prepare('SELECT id FROM '.$this->table.' WHERE keyword=%s AND parent=0', [$keyword]) ); } if(!empty($keyword_id) && isset($keyword_id->id)){ $created = 0; foreach($keywords as $kw){ if(is_string($kw) && strlen(trim($kw))>0){ $created++; $this->wpdb->insert($this->table, ['keyword' => $kw, 'parent' => $keyword_id->id], ['%s', '%d']); } } return ($created>0 ? true : false); } return false; } private function delete_keyword_group($keyword=0): bool{ if(!is_numeric($keyword)) return false; $result = $this->wpdb->delete($this->table, ['id' => $keyword, 'parent' => 0], ['%d', '%d']); return ($result); } private function delete_keywords_from_parent($keyword=0): bool{ if(is_numeric($keyword) && $keyword>0){ $keyword_id = (object)['id' => $keyword]; }else{ $keyword_id = $this->wpdb->get_row( $this->wpdb->prepare('SELECT id FROM '.$this->table.' WHERE keyword=%s AND parent=0', [$keyword]) ); } if(!empty($keyword_id) && isset($keyword_id->id)){ $result = $this->wpdb->delete($this->table, ['parent' => $keyword_id->id], ['%d']); return ($result); } return false; } private function get_keywords_from_parent($keyword=0){ if(is_numeric($keyword) && (int)$keyword>0){ $keyword_id = (object)['id' => $keyword]; }else{ $keyword_id = (object)['id' => $this->get_keyword_parent_id($keyword)]; } if(!empty($keyword_id) && isset($keyword_id->id)){ $keyword_list = $this->wpdb->get_results( $this->wpdb->prepare('SELECT DISTINCT keyword FROM '.$this->table.' WHERE parent=%d', [$keyword_id->id]) ); return ($keyword_list!=NULL && !empty($keyword_list) ? $keyword_list : []); } return []; } private function get_keywords($string, $just_parent_keywords=false){ if(!is_string($string) || strlen(trim($string))==0) return []; $matches_normalized = []; preg_match_all('/%%%[^%]*%%%/', $string, $matches); foreach($matches as $array){ foreach($array as $match){ $match = trim(str_replace('%%%', NULL, $match)); if(strlen(trim($match))>0 && !in_array($match, $matches_normalized)){ array_push($matches_normalized, $match); } } } if($just_parent_keywords){ return $matches_normalized; } $groups = []; if(!empty($matches_normalized)){ foreach($matches_normalized as $parent_keyword){ if(!isset($groups[$parent_keyword])){ $groups[$parent_keyword] = []; } $group = $this->get_keywords_from_parent($this->get_keyword_parent_title($parent_keyword)); if(!empty($group)){ foreach($group as $keyword){ if(!in_array($keyword->keyword, $groups[$parent_keyword])){ array_push($groups[$parent_keyword], $keyword->keyword); } } } } } return $groups; } public function get_posts_number($string=[], $keywords=[]){ $posts_numbers = []; foreach($keywords as $parent => $list){ array_push($posts_numbers, count($list)); } if(count($posts_numbers) == 1){ return $posts_numbers; }else{ $total_posts=NULL; for($i=0; $i<count($posts_numbers); $i++){ if($total_posts==NULL){ $total_posts=$posts_numbers[$i]; continue; } if(isset($posts_numbers[$i])){ $total_posts = $total_posts * $posts_numbers[$i]; } } return $total_posts; } return 0; } public function recursive_content_generation($string=[], $keywords=[], $content=[]){ if(empty($keywords)) return $content; $keyword = array_keys($keywords)[0]; if(empty($content)){ foreach($keywords[$keyword] as $key){ $array = [ 't' => $string, $keyword => $key, ]; array_push($content, $array); } }else{ $new_content = []; foreach($content as $array){ foreach($keywords[$keyword] as $key){ $array[$keyword] = $key; array_push($new_content, $array); } } $content = $new_content; unset($new_content); } unset($keywords[$keyword]); return $this->recursive_content_generation($string, $keywords, $content); } private function replace_keywords($keywords=[], $string=[]){ foreach(array_keys($keywords) as $kw){ $string = str_replace('%%%'.$kw.'%%%', trim(str_replace(array('\r', '\n'), NULL, $keywords[$kw])), $string); } return trim($string); } public function delete_all_generated_content(){ $args = array( 'posts_per_page' => -1, 'post_type' => get_post_types(), 'meta_query' => array( array( 'key' => $this->generated_meta, 'value' => '1', 'compare' => '>=', ) ) ); $query = new WP_Query($args); $count=0; $deleted_posts = []; while($query->have_posts()){ $query->the_post(); wp_delete_post(get_the_ID(), true); $count++; array_push($deleted_posts, get_the_ID()); } wp_reset_postdata(); return [ 'count' => $count, 'deleted_ids' => $deleted_posts ]; } public function generate_virtual_content($data=[], $keywords=[]){ $posts_numbers = $this->get_posts_number($data['post_title'], $keywords); $contents = $this->recursive_content_generation($data['post_title'], $keywords, []); $generated_posts = 0; $updated_posts = 0; foreach($contents as $content){ if($generated_posts>$data['limit']) break; $generated_title = $this->replace_keywords($content, $this->spintax->process($content['t'])); if(strlen(trim($generated_title))>=1){ $post_exists = post_exists($generated_title); if($post_exists>=1){ wp_delete_post($post_exists, true); $updated_posts++; } $generated_post = array( 'post_title' => wp_strip_all_tags($generated_title), 'post_content' => $this->replace_keywords($content, $this->spintax->process($data['post_content'])), 'post_status' => 'publish', 'post_parent' => $data['post_parent'], 'post_author' => $data['post_author'], 'post_type' => (isset($data['post_type']) && $this->valid_post_type($data['post_type']) ? $data['post_type'] : $this->default_post_type) ); if(isset($data['post_type']) && isset($data['post_category']) && $data['post_type'] != 'page'){ $generated_post['post_category'] = $data['post_category']; } $id = wp_insert_post($generated_post); if($id){ add_post_meta($id, $this->generated_meta, $data['ID']); $forbidden_keys = [$this->template_meta, '_edit_last', '_edit_lock', '_thumbnail_id']; if(isset($data['meta'])){ foreach($data['meta'] as $key => $value){ if(!in_array($key, $forbidden_keys)){ $v = $this->replace_keywords($content, $this->spintax->process((is_array($value) && isset($value[0]) ? $value[0] : $value))); update_post_meta($id, $key, $v); unset($v); } } } $thumbnail_id = get_post_thumbnail_id($id); if($thumbnail_id && $thumbnail_id>0){ set_post_thumbnail($id, $thumbnail_id); } $generated_posts++; delete_post_meta($id, $this->template_meta); }else{ throw new Exception(__('Un artículo no ha podido ser generado por motivos desconocidos. Abortada generación de contenido.', $this->get_translations())); } } } return ['generated' => $generated_posts, 'updated' => $updated_posts]; } private function valid_post_type($post_type=''): bool{ if(!is_string($post_type) || strlen(trim($post_type))<=0 || (is_string($post_type) && !post_type_exists($post_type))) return false; return ($post_type == 'page' || $post_type == 'post'); } public function generate_content($data=[]){ if(!$this->table_exists){ throw new Exception(__('La tabla de la base de datos para la generación de contenido no está creada.', $this->get_translations())); } $keyword_templates = $this->get_keyword_templates(); if(empty($keyword_templates)){ throw new Exception(__('Es necesario definir las palabras clave antes de generar contenido.', $this->get_translations())); } if(!isset($data['post_type']) || !$this->valid_post_type($data['post_type'])){ throw new Exception(__('Es necesario indicar el tipo de contenido a generar. Se admite 'post' o 'page'.', $this->get_translations())); }else if(!post_type_exists($data['post_type'])){ throw new Exception(__('El tipo de post indicado no existe.', $this->get_translations())); } if(!isset($data['limit']) || !is_numeric($data['limit'])){ $data['limit'] = $this->default_limit; } if(!isset($data['post_title'])){ throw new Exception(__('Es necesario indicar el título que se utilizará.', $this->get_translations())); }else if(!is_string($data['post_title']) || strlen(trim($data['post_title']))==0){ throw new Exception(__('El título indicado no es válido.', $this->get_translations())); }else{ $title_keywords = $this->get_keywords($data['post_title']); if(count($title_keywords) == 0){ throw new Exception(__('No hay ninguna palabra clave indicada en el título.', $this->get_translations())); } } if(!isset($data['post_content'])){ throw new Exception(__('Es necesario el contenido que se utilizará.', $this->get_translations())); }else if(!is_string($data['post_content']) || strlen(trim($data['post_content']))==0){ throw new Exception(__('El contenido indicado para la generación de contenido no es válido. Por favor indica un contenido válido.', $this->get_translations())); }else{ $content_keywords = $this->get_keywords($data['post_content']); if(count($content_keywords) == 0){ throw new Exception(__('No hay ninguna palabra clave indicada en el contenido.', $this->get_translations())); } } $keywords = array_merge($content_keywords, $title_keywords); foreach($keywords as $parent_kw => $k){ if(!in_array($parent_kw, $keyword_templates)){ throw new Exception(sprintf(__('El grupo de palabras clave %s usada en el contenido o título no está registrada en tus plantillas.', $this->get_translations()), esc_html($parent_kw))); } if(count($k) == 0){ throw new Exception(sprintf(__('No hay ninguna palabra clave dentro del grupo %s.', $this->get_translations()), esc_html($k))); } } unset($keywords); return $this->generate_virtual_content($data, $title_keywords); } private function get_post_id($post){ return (is_object($post) ? $post->ID : (is_array($post) ? $post['ID'] : $post)); } private function is_template($post){ $template = get_post_meta($this->get_post_id($post), $this->template_meta, true); return ($template&&(int)$template>=1); } private function is_generated($post){ $generated = get_post_meta($this->get_post_id($post), $this->generated_meta, true); return ($generated&&(int)$generated>=1); } private function get_template($post){ return get_post_meta($this->get_post_id($post), $this->generated_meta, true); } public function hook_post_notices(){ add_action('admin_notices', function(){ if( isset($_GET['post']) && isset($_GET['action']) && $_GET['action'] == 'edit' && $_GET['post']>0){ if($this->valid_post_type(get_post_type($_GET['post'])) && $this->is_generated($_GET['post'])>0){ echo '<div class='notice notice-warning is-dismissible'><p>'. sprintf(__('Esta página ha sido generada automáticamente desde la plantilla <b><aLa variable $this a été trouvée dans une fonction de traduction dans le fichier content-generator.php . Les appels de fonctions de traduction ne doivent pas contenir de variables PHP. 43: ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;'); $this->table_exists = $this->check_wpdb_content_generator_db(); }catch(Exception $ex){ add_action( 'admin_notices', function() { $class = 'notice notice-error'; $message = __( 'No es posible crear la tabla para la generación de contenido. El mensaje de error devuelto es: '.$ex->getMessage(), $this->get_translations()); printf('<div class='%1$s'><p>%2$s</p></div>', esc_attr($class), esc_html($message)); }); } } } public function table_exists(): bool{ return $this->table_exists; } private function get_translations(){ return (defined('TRANSLATIONS') ? TRANSLATIONS : 'content-generator'); } public function add_shortcode(){ add_shortcode('content-generator-list', function($atts=[], $content=NULL){ return ''; }); } public function is_content_generated($post_id=0){ if(!is_numeric($post_id) || $post_id<=0) return false; if(get_post_status($post_id) === FALSE) return false; $post_by_content_generator = get_post_meta($post_id, 'content-generator', TRUE); return ($post_by_content_generator); } private function get_keyword_parent_id($keyword=0){ if(!is_string($keyword)) return []; $results = $this->wpdb->get_results( $this->wpdb->prepare('SELECT id, keyword FROM '.$this->table.' WHERE parent=%d', [0]) ); foreach($results as $kw){ if($kw->keyword == $keyword || $this->slugify($kw->keyword) == $keyword){ return $kw->id; } } return 0; } private function add_keywords_to_parent($keyword=0, $keywords=[]): bool{ if(empty($keywords)) return false; if(is_numeric($keyword) && $keyword>0){ $keyword_id = (object)['id' => $keyword]; }else{ $keyword_id = $this->wpdb->get_row( $this->wpdb->prepare('SELECT id FROM '.$this->table.' WHERE keyword=%s AND parent=0', [$keyword]) ); } if(!empty($keyword_id) && isset($keyword_id->id)){ $created = 0; foreach($keywords as $kw){ if(is_string($kw) && strlen(trim($kw))>0){ $created++; $this->wpdb->insert($this->table, ['keyword' => $kw, 'parent' => $keyword_id->id], ['%s', '%d']); } } return ($created>0 ? true : false); } return false; } private function delete_keyword_group($keyword=0): bool{ if(!is_numeric($keyword)) return false; $result = $this->wpdb->delete($this->table, ['id' => $keyword, 'parent' => 0], ['%d', '%d']); return ($result); } private function delete_keywords_from_parent($keyword=0): bool{ if(is_numeric($keyword) && $keyword>0){ $keyword_id = (object)['id' => $keyword]; }else{ $keyword_id = $this->wpdb->get_row( $this->wpdb->prepare('SELECT id FROM '.$this->table.' WHERE keyword=%s AND parent=0', [$keyword]) ); } if(!empty($keyword_id) && isset($keyword_id->id)){ $result = $this->wpdb->delete($this->table, ['parent' => $keyword_id->id], ['%d']); return ($result); } return false; } private function get_keywords_from_parent($keyword=0){ if(is_numeric($keyword) && (int)$keyword>0){ $keyword_id = (object)['id' => $keyword]; }else{ $keyword_id = (object)['id' => $this->get_keyword_parent_id($keyword)]; } if(!empty($keyword_id) && isset($keyword_id->id)){ $keyword_list = $this->wpdb->get_results( $this->wpdb->prepare('SELECT DISTINCT keyword FROM '.$this->table.' WHERE parent=%d', [$keyword_id->id]) ); return ($keyword_list!=NULL && !empty($keyword_list) ? $keyword_list : []); } return []; } private function get_keywords($string, $just_parent_keywords=false){ if(!is_string($string) || strlen(trim($string))==0) return []; $matches_normalized = []; preg_match_all('/%%%[^%]*%%%/', $string, $matches); foreach($matches as $array){ foreach($array as $match){ $match = trim(str_replace('%%%', NULL, $match)); if(strlen(trim($match))>0 && !in_array($match, $matches_normalized)){ array_push($matches_normalized, $match); } } } if($just_parent_keywords){ return $matches_normalized; } $groups = []; if(!empty($matches_normalized)){ foreach($matches_normalized as $parent_keyword){ if(!isset($groups[$parent_keyword])){ $groups[$parent_keyword] = []; } $group = $this->get_keywords_from_parent($this->get_keyword_parent_title($parent_keyword)); if(!empty($group)){ foreach($group as $keyword){ if(!in_array($keyword->keyword, $groups[$parent_keyword])){ array_push($groups[$parent_keyword], $keyword->keyword); } } } } } return $groups; } public function get_posts_number($string=[], $keywords=[]){ $posts_numbers = []; foreach($keywords as $parent => $list){ array_push($posts_numbers, count($list)); } if(count($posts_numbers) == 1){ return $posts_numbers; }else{ $total_posts=NULL; for($i=0; $i<count($posts_numbers); $i++){ if($total_posts==NULL){ $total_posts=$posts_numbers[$i]; continue; } if(isset($posts_numbers[$i])){ $total_posts = $total_posts * $posts_numbers[$i]; } } return $total_posts; } return 0; } public function recursive_content_generation($string=[], $keywords=[], $content=[]){ if(empty($keywords)) return $content; $keyword = array_keys($keywords)[0]; if(empty($content)){ foreach($keywords[$keyword] as $key){ $array = [ 't' => $string, $keyword => $key, ]; array_push($content, $array); } }else{ $new_content = []; foreach($content as $array){ foreach($keywords[$keyword] as $key){ $array[$keyword] = $key; array_push($new_content, $array); } } $content = $new_content; unset($new_content); } unset($keywords[$keyword]); return $this->recursive_content_generation($string, $keywords, $content); } private function replace_keywords($keywords=[], $string=[]){ foreach(array_keys($keywords) as $kw){ $string = str_replace('%%%'.$kw.'%%%', trim(str_replace(array('\r', '\n'), NULL, $keywords[$kw])), $string); } return trim($string); } public function delete_all_generated_content(){ $args = array( 'posts_per_page' => -1, 'post_type' => get_post_types(), 'meta_query' => array( array( 'key' => $this->generated_meta, 'value' => '1', 'compare' => '>=', ) ) ); $query = new WP_Query($args); $count=0; $deleted_posts = []; while($query->have_posts()){ $query->the_post(); wp_delete_post(get_the_ID(), true); $count++; array_push($deleted_posts, get_the_ID()); } wp_reset_postdata(); return [ 'count' => $count, 'deleted_ids' => $deleted_posts ]; } public function generate_virtual_content($data=[], $keywords=[]){ $posts_numbers = $this->get_posts_number($data['post_title'], $keywords); $contents = $this->recursive_content_generation($data['post_title'], $keywords, []); $generated_posts = 0; $updated_posts = 0; foreach($contents as $content){ if($generated_posts>$data['limit']) break; $generated_title = $this->replace_keywords($content, $this->spintax->process($content['t'])); if(strlen(trim($generated_title))>=1){ $post_exists = post_exists($generated_title); if($post_exists>=1){ wp_delete_post($post_exists, true); $updated_posts++; } $generated_post = array( 'post_title' => wp_strip_all_tags($generated_title), 'post_content' => $this->replace_keywords($content, $this->spintax->process($data['post_content'])), 'post_status' => 'publish', 'post_parent' => $data['post_parent'], 'post_author' => $data['post_author'], 'post_type' => (isset($data['post_type']) && $this->valid_post_type($data['post_type']) ? $data['post_type'] : $this->default_post_type) ); if(isset($data['post_type']) && isset($data['post_category']) && $data['post_type'] != 'page'){ $generated_post['post_category'] = $data['post_category']; } $id = wp_insert_post($generated_post); if($id){ add_post_meta($id, $this->generated_meta, $data['ID']); $forbidden_keys = [$this->template_meta, '_edit_last', '_edit_lock', '_thumbnail_id']; if(isset($data['meta'])){ foreach($data['meta'] as $key => $value){ if(!in_array($key, $forbidden_keys)){ $v = $this->replace_keywords($content, $this->spintax->process((is_array($value) && isset($value[0]) ? $value[0] : $value))); update_post_meta($id, $key, $v); unset($v); } } } $thumbnail_id = get_post_thumbnail_id($id); if($thumbnail_id && $thumbnail_id>0){ set_post_thumbnail($id, $thumbnail_id); } $generated_posts++; delete_post_meta($id, $this->template_meta); }else{ throw new Exception(__('Un artículo no ha podido ser generado por motivos desconocidos. Abortada generación de contenido.', $this->get_translations())); } } } return ['generated' => $generated_posts, 'updated' => $updated_posts]; } private function valid_post_type($post_type=''): bool{ if(!is_string($post_type) || strlen(trim($post_type))<=0 || (is_string($post_type) && !post_type_exists($post_type))) return false; return ($post_type == 'page' || $post_type == 'post'); } public function generate_content($data=[]){ if(!$this->table_exists){ throw new Exception(__('La tabla de la base de datos para la generación de contenido no está creada.', $this->get_translations())); } $keyword_templates = $this->get_keyword_templates(); if(empty($keyword_templates)){ throw new Exception(__('Es necesario definir las palabras clave antes de generar contenido.', $this->get_translations())); } if(!isset($data['post_type']) || !$this->valid_post_type($data['post_type'])){ throw new Exception(__('Es necesario indicar el tipo de contenido a generar. Se admite 'post' o 'page'.', $this->get_translations())); }else if(!post_type_exists($data['post_type'])){ throw new Exception(__('El tipo de post indicado no existe.', $this->get_translations())); } if(!isset($data['limit']) || !is_numeric($data['limit'])){ $data['limit'] = $this->default_limit; } if(!isset($data['post_title'])){ throw new Exception(__('Es necesario indicar el título que se utilizará.', $this->get_translations())); }else if(!is_string($data['post_title']) || strlen(trim($data['post_title']))==0){ throw new Exception(__('El título indicado no es válido.', $this->get_translations())); }else{ $title_keywords = $this->get_keywords($data['post_title']); if(count($title_keywords) == 0){ throw new Exception(__('No hay ninguna palabra clave indicada en el título.', $this->get_translations())); } } if(!isset($data['post_content'])){ throw new Exception(__('Es necesario el contenido que se utilizará.', $this->get_translations())); }else if(!is_string($data['post_content']) || strlen(trim($data['post_content']))==0){ throw new Exception(__('El contenido indicado para la generación de contenido no es válido. Por favor indica un contenido válido.', $this->get_translations())); }else{ $content_keywords = $this->get_keywords($data['post_content']); if(count($content_keywords) == 0){ throw new Exception(__('No hay ninguna palabra clave indicada en el contenido.', $this->get_translations())); } } $keywords = array_merge($content_keywords, $title_keywords); foreach($keywords as $parent_kw => $k){ if(!in_array($parent_kw, $keyword_templates)){ throw new Exception(sprintf(__('El grupo de palabras clave %s usada en el contenido o título no está registrada en tus plantillas.', $this->get_translations()), esc_html($parent_kw))); } if(count($k) == 0){ throw new Exception(sprintf(__('No hay ninguna palabra clave dentro del grupo %s.', $this->get_translations()), esc_html($k))); } } unset($keywords); return $this->generate_virtual_content($data, $title_keywords); } private function get_post_id($post){ return (is_object($post) ? $post->ID : (is_array($post) ? $post['ID'] : $post)); } private function is_template($post){ $template = get_post_meta($this->get_post_id($post), $this->template_meta, true); return ($template&&(int)$template>=1); } private function is_generated($post){ $generated = get_post_meta($this->get_post_id($post), $this->generated_meta, true); return ($generated&&(int)$generated>=1); } private function get_template($post){ return get_post_meta($this->get_post_id($post), $this->generated_meta, true); } public function hook_post_notices(){ add_action('admin_notices', function(){ if( isset($_GET['post']) && isset($_GET['action']) && $_GET['action'] == 'edit' && $_GET['post']>0){ if($this->valid_post_type(get_post_type($_GET['post'])) && $this->is_generated($_GET['post'])>0){ echo '<div class='notice notice-warning is-dismissible'><p>'. sprintf(__('Esta página ha sido generada automáticamente desde la plantilla <b><a href='%s' target='_blank'>%s</a></b>.', $this->get_translations()), get_the_permalink($this->get_template($_GET['post'])), get_the_title($this->get_template($_GET['post']))). '</p></div>'; } } }); } public function add_metaboxes(){ add_filter('wp_insert_post_data', function($post, $post_array){ if(isset($post_array['ID']) && $this->is_template($post_array['ID']) && !$this->is_generated($post_array['ID'])){ if($post['post_type'] == 'post' || $post['post_type'] == 'page'){ if($post['post_status'] != 'private') $post['post_status'] = 'private'; } } return $post; }, 10, 2); add_action('admin_head', function(){ if(is_admin() && isset($_GET['post']) && is_numeric($_GET['post']) && $this->is_template($_GET['post'])){ echo '<style>a.edit-visibility{visibility:hidden !important; display:none !important;}</style>'; } }); add_action('load-post.php', function(){ if(is_admin() && isset($_GET['post']) && is_numeric($_GET['post']) && $this->is_template($_GET['post'])){ wp_update_post(['ID' => $_GET['post'], 'post_status' => 'private']); add_action('add_meta_boxes', function(){ add_meta_box( 'warning_content_generator_template', __('¡Advertencia!', $this->get_translations()), function(){ echo '<span idLa variable $this a été trouvée dans une fonction de traduction dans le fichier content-generator.php . Les appels de fonctions de traduction ne doivent pas contenir de variables PHP. 43: ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;'); $this->table_exists = $this->check_wpdb_content_generator_db(); }catch(Exception $ex){ add_action( 'admin_notices', function() { $class = 'notice notice-error'; $message = __( 'No es posible crear la tabla para la generación de contenido. El mensaje de error devuelto es: '.$ex->getMessage(), $this->get_translations()); printf('<div class='%1$s'><p>%2$s</p></div>', esc_attr($class), esc_html($message)); }); } } } public function table_exists(): bool{ return $this->table_exists; } private function get_translations(){ return (defined('TRANSLATIONS') ? TRANSLATIONS : 'content-generator'); } public function add_shortcode(){ add_shortcode('content-generator-list', function($atts=[], $content=NULL){ return ''; }); } public function is_content_generated($post_id=0){ if(!is_numeric($post_id) || $post_id<=0) return false; if(get_post_status($post_id) === FALSE) return false; $post_by_content_generator = get_post_meta($post_id, 'content-generator', TRUE); return ($post_by_content_generator); } private function get_keyword_parent_id($keyword=0){ if(!is_string($keyword)) return []; $results = $this->wpdb->get_results( $this->wpdb->prepare('SELECT id, keyword FROM '.$this->table.' WHERE parent=%d', [0]) ); foreach($results as $kw){ if($kw->keyword == $keyword || $this->slugify($kw->keyword) == $keyword){ return $kw->id; } } return 0; } private function add_keywords_to_parent($keyword=0, $keywords=[]): bool{ if(empty($keywords)) return false; if(is_numeric($keyword) && $keyword>0){ $keyword_id = (object)['id' => $keyword]; }else{ $keyword_id = $this->wpdb->get_row( $this->wpdb->prepare('SELECT id FROM '.$this->table.' WHERE keyword=%s AND parent=0', [$keyword]) ); } if(!empty($keyword_id) && isset($keyword_id->id)){ $created = 0; foreach($keywords as $kw){ if(is_string($kw) && strlen(trim($kw))>0){ $created++; $this->wpdb->insert($this->table, ['keyword' => $kw, 'parent' => $keyword_id->id], ['%s', '%d']); } } return ($created>0 ? true : false); } return false; } private function delete_keyword_group($keyword=0): bool{ if(!is_numeric($keyword)) return false; $result = $this->wpdb->delete($this->table, ['id' => $keyword, 'parent' => 0], ['%d', '%d']); return ($result); } private function delete_keywords_from_parent($keyword=0): bool{ if(is_numeric($keyword) && $keyword>0){ $keyword_id = (object)['id' => $keyword]; }else{ $keyword_id = $this->wpdb->get_row( $this->wpdb->prepare('SELECT id FROM '.$this->table.' WHERE keyword=%s AND parent=0', [$keyword]) ); } if(!empty($keyword_id) && isset($keyword_id->id)){ $result = $this->wpdb->delete($this->table, ['parent' => $keyword_id->id], ['%d']); return ($result); } return false; } private function get_keywords_from_parent($keyword=0){ if(is_numeric($keyword) && (int)$keyword>0){ $keyword_id = (object)['id' => $keyword]; }else{ $keyword_id = (object)['id' => $this->get_keyword_parent_id($keyword)]; } if(!empty($keyword_id) && isset($keyword_id->id)){ $keyword_list = $this->wpdb->get_results( $this->wpdb->prepare('SELECT DISTINCT keyword FROM '.$this->table.' WHERE parent=%d', [$keyword_id->id]) ); return ($keyword_list!=NULL && !empty($keyword_list) ? $keyword_list : []); } return []; } private function get_keywords($string, $just_parent_keywords=false){ if(!is_string($string) || strlen(trim($string))==0) return []; $matches_normalized = []; preg_match_all('/%%%[^%]*%%%/', $string, $matches); foreach($matches as $array){ foreach($array as $match){ $match = trim(str_replace('%%%', NULL, $match)); if(strlen(trim($match))>0 && !in_array($match, $matches_normalized)){ array_push($matches_normalized, $match); } } } if($just_parent_keywords){ return $matches_normalized; } $groups = []; if(!empty($matches_normalized)){ foreach($matches_normalized as $parent_keyword){ if(!isset($groups[$parent_keyword])){ $groups[$parent_keyword] = []; } $group = $this->get_keywords_from_parent($this->get_keyword_parent_title($parent_keyword)); if(!empty($group)){ foreach($group as $keyword){ if(!in_array($keyword->keyword, $groups[$parent_keyword])){ array_push($groups[$parent_keyword], $keyword->keyword); } } } } } return $groups; } public function get_posts_number($string=[], $keywords=[]){ $posts_numbers = []; foreach($keywords as $parent => $list){ array_push($posts_numbers, count($list)); } if(count($posts_numbers) == 1){ return $posts_numbers; }else{ $total_posts=NULL; for($i=0; $i<count($posts_numbers); $i++){ if($total_posts==NULL){ $total_posts=$posts_numbers[$i]; continue; } if(isset($posts_numbers[$i])){ $total_posts = $total_posts * $posts_numbers[$i]; } } return $total_posts; } return 0; } public function recursive_content_generation($string=[], $keywords=[], $content=[]){ if(empty($keywords)) return $content; $keyword = array_keys($keywords)[0]; if(empty($content)){ foreach($keywords[$keyword] as $key){ $array = [ 't' => $string, $keyword => $key, ]; array_push($content, $array); } }else{ $new_content = []; foreach($content as $array){ foreach($keywords[$keyword] as $key){ $array[$keyword] = $key; array_push($new_content, $array); } } $content = $new_content; unset($new_content); } unset($keywords[$keyword]); return $this->recursive_content_generation($string, $keywords, $content); } private function replace_keywords($keywords=[], $string=[]){ foreach(array_keys($keywords) as $kw){ $string = str_replace('%%%'.$kw.'%%%', trim(str_replace(array('\r', '\n'), NULL, $keywords[$kw])), $string); } return trim($string); } public function delete_all_generated_content(){ $args = array( 'posts_per_page' => -1, 'post_type' => get_post_types(), 'meta_query' => array( array( 'key' => $this->generated_meta, 'value' => '1', 'compare' => '>=', ) ) ); $query = new WP_Query($args); $count=0; $deleted_posts = []; while($query->have_posts()){ $query->the_post(); wp_delete_post(get_the_ID(), true); $count++; array_push($deleted_posts, get_the_ID()); } wp_reset_postdata(); return [ 'count' => $count, 'deleted_ids' => $deleted_posts ]; } public function generate_virtual_content($data=[], $keywords=[]){ $posts_numbers = $this->get_posts_number($data['post_title'], $keywords); $contents = $this->recursive_content_generation($data['post_title'], $keywords, []); $generated_posts = 0; $updated_posts = 0; foreach($contents as $content){ if($generated_posts>$data['limit']) break; $generated_title = $this->replace_keywords($content, $this->spintax->process($content['t'])); if(strlen(trim($generated_title))>=1){ $post_exists = post_exists($generated_title); if($post_exists>=1){ wp_delete_post($post_exists, true); $updated_posts++; } $generated_post = array( 'post_title' => wp_strip_all_tags($generated_title), 'post_content' => $this->replace_keywords($content, $this->spintax->process($data['post_content'])), 'post_status' => 'publish', 'post_parent' => $data['post_parent'], 'post_author' => $data['post_author'], 'post_type' => (isset($data['post_type']) && $this->valid_post_type($data['post_type']) ? $data['post_type'] : $this->default_post_type) ); if(isset($data['post_type']) && isset($data['post_category']) && $data['post_type'] != 'page'){ $generated_post['post_category'] = $data['post_category']; } $id = wp_insert_post($generated_post); if($id){ add_post_meta($id, $this->generated_meta, $data['ID']); $forbidden_keys = [$this->template_meta, '_edit_last', '_edit_lock', '_thumbnail_id']; if(isset($data['meta'])){ foreach($data['meta'] as $key => $value){ if(!in_array($key, $forbidden_keys)){ $v = $this->replace_keywords($content, $this->spintax->process((is_array($value) && isset($value[0]) ? $value[0] : $value))); update_post_meta($id, $key, $v); unset($v); } } } $thumbnail_id = get_post_thumbnail_id($id); if($thumbnail_id && $thumbnail_id>0){ set_post_thumbnail($id, $thumbnail_id); } $generated_posts++; delete_post_meta($id, $this->template_meta); }else{ throw new Exception(__('Un artículo no ha podido ser generado por motivos desconocidos. Abortada generación de contenido.', $this->get_translations())); } } } return ['generated' => $generated_posts, 'updated' => $updated_posts]; } private function valid_post_type($post_type=''): bool{ if(!is_string($post_type) || strlen(trim($post_type))<=0 || (is_string($post_type) && !post_type_exists($post_type))) return false; return ($post_type == 'page' || $post_type == 'post'); } public function generate_content($data=[]){ if(!$this->table_exists){ throw new Exception(__('La tabla de la base de datos para la generación de contenido no está creada.', $this->get_translations())); } $keyword_templates = $this->get_keyword_templates(); if(empty($keyword_templates)){ throw new Exception(__('Es necesario definir las palabras clave antes de generar contenido.', $this->get_translations())); } if(!isset($data['post_type']) || !$this->valid_post_type($data['post_type'])){ throw new Exception(__('Es necesario indicar el tipo de contenido a generar. Se admite 'post' o 'page'.', $this->get_translations())); }else if(!post_type_exists($data['post_type'])){ throw new Exception(__('El tipo de post indicado no existe.', $this->get_translations())); } if(!isset($data['limit']) || !is_numeric($data['limit'])){ $data['limit'] = $this->default_limit; } if(!isset($data['post_title'])){ throw new Exception(__('Es necesario indicar el título que se utilizará.', $this->get_translations())); }else if(!is_string($data['post_title']) || strlen(trim($data['post_title']))==0){ throw new Exception(__('El título indicado no es válido.', $this->get_translations())); }else{ $title_keywords = $this->get_keywords($data['post_title']); if(count($title_keywords) == 0){ throw new Exception(__('No hay ninguna palabra clave indicada en el título.', $this->get_translations())); } } if(!isset($data['post_content'])){ throw new Exception(__('Es necesario el contenido que se utilizará.', $this->get_translations())); }else if(!is_string($data['post_content']) || strlen(trim($data['post_content']))==0){ throw new Exception(__('El contenido indicado para la generación de contenido no es válido. Por favor indica un contenido válido.', $this->get_translations())); }else{ $content_keywords = $this->get_keywords($data['post_content']); if(count($content_keywords) == 0){ throw new Exception(__('No hay ninguna palabra clave indicada en el contenido.', $this->get_translations())); } } $keywords = array_merge($content_keywords, $title_keywords); foreach($keywords as $parent_kw => $k){ if(!in_array($parent_kw, $keyword_templates)){ throw new Exception(sprintf(__('El grupo de palabras clave %s usada en el contenido o título no está registrada en tus plantillas.', $this->get_translations()), esc_html($parent_kw))); } if(count($k) == 0){ throw new Exception(sprintf(__('No hay ninguna palabra clave dentro del grupo %s.', $this->get_translations()), esc_html($k))); } } unset($keywords); return $this->generate_virtual_content($data, $title_keywords); } private function get_post_id($post){ return (is_object($post) ? $post->ID : (is_array($post) ? $post['ID'] : $post)); } private function is_template($post){ $template = get_post_meta($this->get_post_id($post), $this->template_meta, true); return ($template&&(int)$template>=1); } private function is_generated($post){ $generated = get_post_meta($this->get_post_id($post), $this->generated_meta, true); return ($generated&&(int)$generated>=1); } private function get_template($post){ return get_post_meta($this->get_post_id($post), $this->generated_meta, true); } public function hook_post_notices(){ add_action('admin_notices', function(){ if( isset($_GET['post']) && isset($_GET['action']) && $_GET['action'] == 'edit' && $_GET['post']>0){ if($this->valid_post_type(get_post_type($_GET['post'])) && $this->is_generated($_GET['post'])>0){ echo '<div class='notice notice-warning is-dismissible'><p>'. sprintf(__('Esta página ha sido generada automáticamente desde la plantilla <b><a href='%s' target='_blank'>%s</a></b>.', $this->get_translations()), get_the_permalink($this->get_template($_GET['post'])), get_the_title($this->get_template($_GET['post']))). '</p></div>'; } } }); } public function add_metaboxes(){ add_filter('wp_insert_post_data', function($post, $post_array){ if(isset($post_array['ID']) && $this->is_template($post_array['ID']) && !$this->is_generated($post_array['ID'])){ if($post['post_type'] == 'post' || $post['post_type'] == 'page'){ if($post['post_status'] != 'private') $post['post_status'] = 'private'; } } return $post; }, 10, 2); add_action('admin_head', function(){ if(is_admin() && isset($_GET['post']) && is_numeric($_GET['post']) && $this->is_template($_GET['post'])){ echo '<style>a.edit-visibility{visibility:hidden !important; display:none !important;}</style>'; } }); add_action('load-post.php', function(){ if(is_admin() && isset($_GET['post']) && is_numeric($_GET['post']) && $this->is_template($_GET['post'])){ wp_update_post(['ID' => $_GET['post'], 'post_status' => 'private']); add_action('add_meta_boxes', function(){ add_meta_box( 'warning_content_generator_template', __('¡Advertencia!', $this->get_translations()), function(){ echo '<span id='theme-warning'>'.__('Esta página o entrada es una plantilla para generar contenido.', $thisLa variable $this a été trouvée dans une fonction de traduction dans le fichier content-generator.php . Les appels de fonctions de traduction ne doivent pas contenir de variables PHP. 43: ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;'); $this->table_exists = $this->check_wpdb_content_generator_db(); }catch(Exception $ex){ add_action( 'admin_notices', function() { $class = 'notice notice-error'; $message = __( 'No es posible crear la tabla para la generación de contenido. El mensaje de error devuelto es: '.$ex->getMessage(), $this->get_translations()); printf('<div class='%1$s'><p>%2$s</p></div>', esc_attr($class), esc_html($message)); }); } } } public function table_exists(): bool{ return $this->table_exists; } private function get_translations(){ return (defined('TRANSLATIONS') ? TRANSLATIONS : 'content-generator'); } public function add_shortcode(){ add_shortcode('content-generator-list', function($atts=[], $content=NULL){ return ''; }); } public function is_content_generated($post_id=0){ if(!is_numeric($post_id) || $post_id<=0) return false; if(get_post_status($post_id) === FALSE) return false; $post_by_content_generator = get_post_meta($post_id, 'content-generator', TRUE); return ($post_by_content_generator); } private function get_keyword_parent_id($keyword=0){ if(!is_string($keyword)) return []; $results = $this->wpdb->get_results( $this->wpdb->prepare('SELECT id, keyword FROM '.$this->table.' WHERE parent=%d', [0]) ); foreach($results as $kw){ if($kw->keyword == $keyword || $this->slugify($kw->keyword) == $keyword){ return $kw->id; } } return 0; } private function add_keywords_to_parent($keyword=0, $keywords=[]): bool{ if(empty($keywords)) return false; if(is_numeric($keyword) && $keyword>0){ $keyword_id = (object)['id' => $keyword]; }else{ $keyword_id = $this->wpdb->get_row( $this->wpdb->prepare('SELECT id FROM '.$this->table.' WHERE keyword=%s AND parent=0', [$keyword]) ); } if(!empty($keyword_id) && isset($keyword_id->id)){ $created = 0; foreach($keywords as $kw){ if(is_string($kw) && strlen(trim($kw))>0){ $created++; $this->wpdb->insert($this->table, ['keyword' => $kw, 'parent' => $keyword_id->id], ['%s', '%d']); } } return ($created>0 ? true : false); } return false; } private function delete_keyword_group($keyword=0): bool{ if(!is_numeric($keyword)) return false; $result = $this->wpdb->delete($this->table, ['id' => $keyword, 'parent' => 0], ['%d', '%d']); return ($result); } private function delete_keywords_from_parent($keyword=0): bool{ if(is_numeric($keyword) && $keyword>0){ $keyword_id = (object)['id' => $keyword]; }else{ $keyword_id = $this->wpdb->get_row( $this->wpdb->prepare('SELECT id FROM '.$this->table.' WHERE keyword=%s AND parent=0', [$keyword]) ); } if(!empty($keyword_id) && isset($keyword_id->id)){ $result = $this->wpdb->delete($this->table, ['parent' => $keyword_id->id], ['%d']); return ($result); } return false; } private function get_keywords_from_parent($keyword=0){ if(is_numeric($keyword) && (int)$keyword>0){ $keyword_id = (object)['id' => $keyword]; }else{ $keyword_id = (object)['id' => $this->get_keyword_parent_id($keyword)]; } if(!empty($keyword_id) && isset($keyword_id->id)){ $keyword_list = $this->wpdb->get_results( $this->wpdb->prepare('SELECT DISTINCT keyword FROM '.$this->table.' WHERE parent=%d', [$keyword_id->id]) ); return ($keyword_list!=NULL && !empty($keyword_list) ? $keyword_list : []); } return []; } private function get_keywords($string, $just_parent_keywords=false){ if(!is_string($string) || strlen(trim($string))==0) return []; $matches_normalized = []; preg_match_all('/%%%[^%]*%%%/', $string, $matches); foreach($matches as $array){ foreach($array as $match){ $match = trim(str_replace('%%%', NULL, $match)); if(strlen(trim($match))>0 && !in_array($match, $matches_normalized)){ array_push($matches_normalized, $match); } } } if($just_parent_keywords){ return $matches_normalized; } $groups = []; if(!empty($matches_normalized)){ foreach($matches_normalized as $parent_keyword){ if(!isset($groups[$parent_keyword])){ $groups[$parent_keyword] = []; } $group = $this->get_keywords_from_parent($this->get_keyword_parent_title($parent_keyword)); if(!empty($group)){ foreach($group as $keyword){ if(!in_array($keyword->keyword, $groups[$parent_keyword])){ array_push($groups[$parent_keyword], $keyword->keyword); } } } } } return $groups; } public function get_posts_number($string=[], $keywords=[]){ $posts_numbers = []; foreach($keywords as $parent => $list){ array_push($posts_numbers, count($list)); } if(count($posts_numbers) == 1){ return $posts_numbers; }else{ $total_posts=NULL; for($i=0; $i<count($posts_numbers); $i++){ if($total_posts==NULL){ $total_posts=$posts_numbers[$i]; continue; } if(isset($posts_numbers[$i])){ $total_posts = $total_posts * $posts_numbers[$i]; } } return $total_posts; } return 0; } public function recursive_content_generation($string=[], $keywords=[], $content=[]){ if(empty($keywords)) return $content; $keyword = array_keys($keywords)[0]; if(empty($content)){ foreach($keywords[$keyword] as $key){ $array = [ 't' => $string, $keyword => $key, ]; array_push($content, $array); } }else{ $new_content = []; foreach($content as $array){ foreach($keywords[$keyword] as $key){ $array[$keyword] = $key; array_push($new_content, $array); } } $content = $new_content; unset($new_content); } unset($keywords[$keyword]); return $this->recursive_content_generation($string, $keywords, $content); } private function replace_keywords($keywords=[], $string=[]){ foreach(array_keys($keywords) as $kw){ $string = str_replace('%%%'.$kw.'%%%', trim(str_replace(array('\r', '\n'), NULL, $keywords[$kw])), $string); } return trim($string); } public function delete_all_generated_content(){ $args = array( 'posts_per_page' => -1, 'post_type' => get_post_types(), 'meta_query' => array( array( 'key' => $this->generated_meta, 'value' => '1', 'compare' => '>=', ) ) ); $query = new WP_Query($args); $count=0; $deleted_posts = []; while($query->have_posts()){ $query->the_post(); wp_delete_post(get_the_ID(), true); $count++; array_push($deleted_posts, get_the_ID()); } wp_reset_postdata(); return [ 'count' => $count, 'deleted_ids' => $deleted_posts ]; } public function generate_virtual_content($data=[], $keywords=[]){ $posts_numbers = $this->get_posts_number($data['post_title'], $keywords); $contents = $this->recursive_content_generation($data['post_title'], $keywords, []); $generated_posts = 0; $updated_posts = 0; foreach($contents as $content){ if($generated_posts>$data['limit']) break; $generated_title = $this->replace_keywords($content, $this->spintax->process($content['t'])); if(strlen(trim($generated_title))>=1){ $post_exists = post_exists($generated_title); if($post_exists>=1){ wp_delete_post($post_exists, true); $updated_posts++; } $generated_post = array( 'post_title' => wp_strip_all_tags($generated_title), 'post_content' => $this->replace_keywords($content, $this->spintax->process($data['post_content'])), 'post_status' => 'publish', 'post_parent' => $data['post_parent'], 'post_author' => $data['post_author'], 'post_type' => (isset($data['post_type']) && $this->valid_post_type($data['post_type']) ? $data['post_type'] : $this->default_post_type) ); if(isset($data['post_type']) && isset($data['post_category']) && $data['post_type'] != 'page'){ $generated_post['post_category'] = $data['post_category']; } $id = wp_insert_post($generated_post); if($id){ add_post_meta($id, $this->generated_meta, $data['ID']); $forbidden_keys = [$this->template_meta, '_edit_last', '_edit_lock', '_thumbnail_id']; if(isset($data['meta'])){ foreach($data['meta'] as $key => $value){ if(!in_array($key, $forbidden_keys)){ $v = $this->replace_keywords($content, $this->spintax->process((is_array($value) && isset($value[0]) ? $value[0] : $value))); update_post_meta($id, $key, $v); unset($v); } } } $thumbnail_id = get_post_thumbnail_id($id); if($thumbnail_id && $thumbnail_id>0){ set_post_thumbnail($id, $thumbnail_id); } $generated_posts++; delete_post_meta($id, $this->template_meta); }else{ throw new Exception(__('Un artículo no ha podido ser generado por motivos desconocidos. Abortada generación de contenido.', $this->get_translations())); } } } return ['generated' => $generated_posts, 'updated' => $updated_posts]; } private function valid_post_type($post_type=''): bool{ if(!is_string($post_type) || strlen(trim($post_type))<=0 || (is_string($post_type) && !post_type_exists($post_type))) return false; return ($post_type == 'page' || $post_type == 'post'); } public function generate_content($data=[]){ if(!$this->table_exists){ throw new Exception(__('La tabla de la base de datos para la generación de contenido no está creada.', $this->get_translations())); } $keyword_templates = $this->get_keyword_templates(); if(empty($keyword_templates)){ throw new Exception(__('Es necesario definir las palabras clave antes de generar contenido.', $this->get_translations())); } if(!isset($data['post_type']) || !$this->valid_post_type($data['post_type'])){ throw new Exception(__('Es necesario indicar el tipo de contenido a generar. Se admite 'post' o 'page'.', $this->get_translations())); }else if(!post_type_exists($data['post_type'])){ throw new Exception(__('El tipo de post indicado no existe.', $this->get_translations())); } if(!isset($data['limit']) || !is_numeric($data['limit'])){ $data['limit'] = $this->default_limit; } if(!isset($data['post_title'])){ throw new Exception(__('Es necesario indicar el título que se utilizará.', $this->get_translations())); }else if(!is_string($data['post_title']) || strlen(trim($data['post_title']))==0){ throw new Exception(__('El título indicado no es válido.', $this->get_translations())); }else{ $title_keywords = $this->get_keywords($data['post_title']); if(count($title_keywords) == 0){ throw new Exception(__('No hay ninguna palabra clave indicada en el título.', $this->get_translations())); } } if(!isset($data['post_content'])){ throw new Exception(__('Es necesario el contenido que se utilizará.', $this->get_translations())); }else if(!is_string($data['post_content']) || strlen(trim($data['post_content']))==0){ throw new Exception(__('El contenido indicado para la generación de contenido no es válido. Por favor indica un contenido válido.', $this->get_translations())); }else{ $content_keywords = $this->get_keywords($data['post_content']); if(count($content_keywords) == 0){ throw new Exception(__('No hay ninguna palabra clave indicada en el contenido.', $this->get_translations())); } } $keywords = array_merge($content_keywords, $title_keywords); foreach($keywords as $parent_kw => $k){ if(!in_array($parent_kw, $keyword_templates)){ throw new Exception(sprintf(__('El grupo de palabras clave %s usada en el contenido o título no está registrada en tus plantillas.', $this->get_translations()), esc_html($parent_kw))); } if(count($k) == 0){ throw new Exception(sprintf(__('No hay ninguna palabra clave dentro del grupo %s.', $this->get_translations()), esc_html($k))); } } unset($keywords); return $this->generate_virtual_content($data, $title_keywords); } private function get_post_id($post){ return (is_object($post) ? $post->ID : (is_array($post) ? $post['ID'] : $post)); } private function is_template($post){ $template = get_post_meta($this->get_post_id($post), $this->template_meta, true); return ($template&&(int)$template>=1); } private function is_generated($post){ $generated = get_post_meta($this->get_post_id($post), $this->generated_meta, true); return ($generated&&(int)$generated>=1); } private function get_template($post){ return get_post_meta($this->get_post_id($post), $this->generated_meta, true); } public function hook_post_notices(){ add_action('admin_notices', function(){ if( isset($_GET['post']) && isset($_GET['action']) && $_GET['action'] == 'edit' && $_GET['post']>0){ if($this->valid_post_type(get_post_type($_GET['post'])) && $this->is_generated($_GET['post'])>0){ echo '<div class='notice notice-warning is-dismissible'><p>'. sprintf(__('Esta página ha sido generada automáticamente desde la plantilla <b><a href='%s' target='_blank'>%s</a></b>.', $this->get_translations()), get_the_permalink($this->get_template($_GET['post'])), get_the_title($this->get_template($_GET['post']))). '</p></div>'; } } }); } public function add_metaboxes(){ add_filter('wp_insert_post_data', function($post, $post_array){ if(isset($post_array['ID']) && $this->is_template($post_array['ID']) && !$this->is_generated($post_array['ID'])){ if($post['post_type'] == 'post' || $post['post_type'] == 'page'){ if($post['post_status'] != 'private') $post['post_status'] = 'private'; } } return $post; }, 10, 2); add_action('admin_head', function(){ if(is_admin() && isset($_GET['post']) && is_numeric($_GET['post']) && $this->is_template($_GET['post'])){ echo '<style>a.edit-visibility{visibility:hidden !important; display:none !important;}</style>'; } }); add_action('load-post.php', function(){ if(is_admin() && isset($_GET['post']) && is_numeric($_GET['post']) && $this->is_template($_GET['post'])){ wp_update_post(['ID' => $_GET['post'], 'post_status' => 'private']); add_action('add_meta_boxes', function(){ add_meta_box( 'warning_content_generator_template', __('¡Advertencia!', $this->get_translations()), function(){ echo '<span id='theme-warning'>'.__('Esta página o entrada es una plantilla para generar contenido.', $this->get_translations()). '<br><br><b>'.__('La visibilidad ha sido marcada como privada.', $this->get_translations(La variable $this a été trouvée dans une fonction de traduction dans le fichier content-generator.php . Les appels de fonctions de traduction ne doivent pas contenir de variables PHP. La variable $this a été trouvée dans une fonction de traduction dans le fichier content-generator.php . Les appels de fonctions de traduction ne doivent pas contenir de variables PHP. La variable $this a été trouvée dans une fonction de traduction dans le fichier content-generator.php . Les appels de fonctions de traduction ne doivent pas contenir de variables PHP. La variable $this a été trouvée dans une fonction de traduction dans le fichier content-generator.php . Les appels de fonctions de traduction ne doivent pas contenir de variables PHP. La variable $this a été trouvée dans une fonction de traduction dans le fichier content-generator.php . Les appels de fonctions de traduction ne doivent pas contenir de variables PHP. La variable $this a été trouvée dans une fonction de traduction dans le fichier content-generator.php . Les appels de fonctions de traduction ne doivent pas contenir de variables PHP. La variable $this a été trouvée dans une fonction de traduction dans le fichier content-generator.php . Les appels de fonctions de traduction ne doivent pas contenir de variables PHP. La variable $this a été trouvée dans une fonction de traduction dans le fichier content-generator.php . Les appels de fonctions de traduction ne doivent pas contenir de variables PHP. La variable $this a été trouvée dans une fonction de traduction dans le fichier content-generator.php . Les appels de fonctions de traduction ne doivent pas contenir de variables PHP. La variable $this a été trouvée dans une fonction de traduction dans le fichier content-generator.php . Les appels de fonctions de traduction ne doivent pas contenir de variables PHP. 53: </p>'; }, ['post', 'page'], 'normal', 'high'); }); } public function sort_query(){ if(is_admin() && isset($_GET['generated'])){ add_filter('pre_get_posts', function($query){ $query->set('meta_query', [ array( 'key'=>$this->generated_meta, 'value'=>'1', 'compare'=>'>=' ) ]); return $query; }); } } public function add_admin_pages(){ add_action('admin_menu', function(){ add_menu_page( __('Palabras clave', $this->get_translations()), __('Palabras clave', $this->get_translations()), $this->permissions, $this->menu_slug, function(){ ob_start(); if(isset($_POST['create_keyword_group'])){ if(isset($_POST['keyword']) && strlen(trim($_POST['keyword']))>0){ $this->wpdb->insert($this->table, ['keyword' => $_POST['keyword'], 'parent' => 0, 'type' => 0]); wp_redirect(add_query_arg('id', $this->wpdb->insert_id, add_query_arg('page', $this->menu_slug, admin_url('admin.php')))); }else{ echo sprintf('<div class='notice notice-error'><p>%s</p></div>', __('Indica un nombre válido.', $this->get_translations())); } } if(isset($La variable $this a été trouvée dans une fonction de traduction dans le fichier content-generator.php . Les appels de fonctions de traduction ne doivent pas contenir de variables PHP. 53: </p>'; }, ['post', 'page'], 'normal', 'high'); }); } public function sort_query(){ if(is_admin() && isset($_GET['generated'])){ add_filter('pre_get_posts', function($query){ $query->set('meta_query', [ array( 'key'=>$this->generated_meta, 'value'=>'1', 'compare'=>'>=' ) ]); return $query; }); } } public function add_admin_pages(){ add_action('admin_menu', function(){ add_menu_page( __('Palabras clave', $this->get_translations()), __('Palabras clave', $this->get_translations()), $this->permissions, $this->menu_slug, function(){ ob_start(); if(isset($_POST['create_keyword_group'])){ if(isset($_POST['keyword']) && strlen(trim($_POST['keyword']))>0){ $this->wpdb->insert($this->table, ['keyword' => $_POST['keyword'], 'parent' => 0, 'type' => 0]); wp_redirect(add_query_arg('id', $this->wpdb->insert_id, add_query_arg('page', $this->menu_slug, admin_url('admin.php')))); }else{ echo sprintf('<div class='notice notice-error'><p>%s</p></div>', __('Indica un nombre válido.', $this->get_translations())); } } if(isset($_POST['edit_keywords'])){ echo sprintf('<div class='notice notice-success'><p>%s</p></div>', __('¡Modificaciones guardadas!', $this->get_translations())); } echo '<divLa variable $this a été trouvée dans une fonction de traduction dans le fichier content-generator.php . Les appels de fonctions de traduction ne doivent pas contenir de variables PHP. La variable $this a été trouvée dans une fonction de traduction dans le fichier content-generator.php . Les appels de fonctions de traduction ne doivent pas contenir de variables PHP. La variable $this a été trouvée dans une fonction de traduction dans le fichier content-generator.php . Les appels de fonctions de traduction ne doivent pas contenir de variables PHP. La variable $this a été trouvée dans une fonction de traduction dans le fichier content-generator.php . Les appels de fonctions de traduction ne doivent pas contenir de variables PHP. La variable $this a été trouvée dans une fonction de traduction dans le fichier content-generator.php . Les appels de fonctions de traduction ne doivent pas contenir de variables PHP. 55: '.(!isset($_GET['edit']) && !isset($_GET['delete']) ? '<a href=''.add_query_arg('edit', 1, add_query_arg('id', $_GET['id'], add_query_arg('page', $_GET['page'], admin_url('admin.php')))).'' class='page-title-action'>'.__('Editar', $this->get_translations()).'</a>' : NULL).'La variable $this a été trouvée dans une fonction de traduction dans le fichier content-generator.php . Les appels de fonctions de traduction ne doivent pas contenir de variables PHP. 56: '.(!isset($_GET['edit']) && !isset($_GET['delete']) ? '<a href=''.add_query_arg('delete', 1, add_query_arg('id', $_GET['id'], add_query_arg('page', $_GET['page'], admin_url('admin.php')))).'' class='submitdelete deletion-keyword-group'>'.__('Eliminar grupo', $this->get_translations()).'</a>' : NULL); }else{ echoLa variable $this a été trouvée dans une fonction de traduction dans le fichier content-generator.php . Les appels de fonctions de traduction ne doivent pas contenir de variables PHP. 56: '.(!isset($_GET['edit']) && !isset($_GET['delete']) ? '<a href=''.add_query_arg('delete', 1, add_query_arg('id', $_GET['id'], add_query_arg('page', $_GET['page'], admin_url('admin.php')))).'' class='submitdelete deletion-keyword-group'>'.__('Eliminar grupo', $this->get_translations()).'</a>' : NULL); }else{ echo '<a href=''.add_query_arg('action', $this->create_action, add_query_arg('page', $_GET['page'], admin_url('admin.php'))).'' class='page-title-action'>'.__('Añadir nuevo grupo', $this->get_translations()).'</a>'; } echo '<hr clLa variable $this a été trouvée dans une fonction de traduction dans le fichier content-generator.php . Les appels de fonctions de traduction ne doivent pas contenir de variables PHP. 56: '.(!isset($_GET['edit']) && !isset($_GET['delete']) ? '<a href=''.add_query_arg('delete', 1, add_query_arg('id', $_GET['id'], add_query_arg('page', $_GET['page'], admin_url('admin.php')))).'' class='submitdelete deletion-keyword-group'>'.__('Eliminar grupo', $this->get_translations()).'</a>' : NULL); }else{ echo '<a href=''.add_query_arg('action', $this->create_action, add_query_arg('page', $_GET['page'], admin_url('admin.php'))).'' class='page-title-action'>'.__('Añadir nuevo grupo', $this->get_translations()).'</a>'; } echo '<hr class='wp-header-end'>'; if(isset($_GET['action']) && $_GET['action'] == $this->create_action){ echo '<p>'.__('Introduce un nombre para un grupo de palabras clave. Por ejemplo, CiudaLa variable $this a été trouvée dans une fonction de traduction dans le fichier content-generator.php . Les appels de fonctions de traduction ne doivent pas contenir de variables PHP. 56: '.(!isset($_GET['edit']) && !isset($_GET['delete']) ? '<a href=''.add_query_arg('delete', 1, add_query_arg('id', $_GET['id'], add_query_arg('page', $_GET['page'], admin_url('admin.php')))).'' class='submitdelete deletion-keyword-group'>'.__('Eliminar grupo', $this->get_translations()).'</a>' : NULL); }else{ echo '<a href=''.add_query_arg('action', $this->create_action, add_query_arg('page', $_GET['page'], admin_url('admin.php'))).'' class='page-title-action'>'.__('Añadir nuevo grupo', $this->get_translations()).'</a>'; } echo '<hr class='wp-header-end'>'; if(isset($_GET['action']) && $_GET['action'] == $this->create_action){ echo '<p>'.__('Introduce un nombre para un grupo de palabras clave. Por ejemplo, Ciudad para: Bogotá, Madrid...', $this->get_translations()).'</p>'; }else if(isset($_GET['id']) && isset($_GET['edit'])){ echo '<p>'.__('Introduce las palabras clave que formarán parte de este grupo.<br>Por La variable $this a été trouvée dans une fonction de traduction dans le fichier content-generator.php . Les appels de fonctions de traduction ne doivent pas contenir de variables PHP. La variable $this a été trouvée dans une fonction de traduction dans le fichier content-generator.php . Les appels de fonctions de traduction ne doivent pas contenir de variables PHP. La variable $this a été trouvée dans une fonction de traduction dans le fichier content-generator.php . Les appels de fonctions de traduction ne doivent pas contenir de variables PHP. La variable $this a été trouvée dans une fonction de traduction dans le fichier content-generator.php . Les appels de fonctions de traduction ne doivent pas contenir de variables PHP. La variable $this a été trouvée dans une fonction de traduction dans le fichier content-generator.php . Les appels de fonctions de traduction ne doivent pas contenir de variables PHP. La variable $this a été trouvée dans une fonction de traduction dans le fichier content-generator.php . Les appels de fonctions de traduction ne doivent pas contenir de variables PHP. La variable $this a été trouvée dans une fonction de traduction dans le fichier content-generator.php . Les appels de fonctions de traduction ne doivent pas contenir de variables PHP. La variable $this a été trouvée dans une fonction de traduction dans le fichier content-generator.php . Les appels de fonctions de traduction ne doivent pas contenir de variables PHP. La variable $this a été trouvée dans une fonction de traduction dans le fichier content-generator.php . Les appels de fonctions de traduction ne doivent pas contenir de variables PHP. La variable $this a été trouvée dans une fonction de traduction dans le fichier content-generator.php . Les appels de fonctions de traduction ne doivent pas contenir de variables PHP. La variable $this a été trouvée dans une fonction de traduction dans le fichier content-generator.php . Les appels de fonctions de traduction ne doivent pas contenir de variables PHP. La variable $this a été trouvée dans une fonction de traduction dans le fichier content-generator.php . Les appels de fonctions de traduction ne doivent pas contenir de variables PHP. La variable $this a été trouvée dans une fonction de traduction dans le fichier content-generator.php . Les appels de fonctions de traduction ne doivent pas contenir de variables PHP. La variable $this a été trouvée dans une fonction de traduction dans le fichier content-generator.php . Les appels de fonctions de traduction ne doivent pas contenir de variables PHP. La variable $this a été trouvée dans une fonction de traduction dans le fichier content-generator.php . Les appels de fonctions de traduction ne doivent pas contenir de variables PHP. La variable $this a été trouvée dans une fonction de traduction dans le fichier content-generator.php . Les appels de fonctions de traduction ne doivent pas contenir de variables PHP. La variable $this a été trouvée dans une fonction de traduction dans le fichier content-generator.php . Les appels de fonctions de traduction ne doivent pas contenir de variables PHP. La variable $this a été trouvée dans une fonction de traduction dans le fichier content-generator.php . Les appels de fonctions de traduction ne doivent pas contenir de variables PHP. La variable $this a été trouvée dans une fonction de traduction dans le fichier content-generator.php . Les appels de fonctions de traduction ne doivent pas contenir de variables PHP. La variable $this a été trouvée dans une fonction de traduction dans le fichier content-generator.php . Les appels de fonctions de traduction ne doivent pas contenir de variables PHP. La variable $this a été trouvée dans une fonction de traduction dans le fichier content-generator.php . Les appels de fonctions de traduction ne doivent pas contenir de variables PHP. La variable $this a été trouvée dans une fonction de traduction dans le fichier content-generator.php . Les appels de fonctions de traduction ne doivent pas contenir de variables PHP. La variable $this a été trouvée dans une fonction de traduction dans le fichier content-generator.php . Les appels de fonctions de traduction ne doivent pas contenir de variables PHP. La variable $this a été trouvée dans une fonction de traduction dans le fichier content-generator.php . Les appels de fonctions de traduction ne doivent pas contenir de variables PHP. La variable $error a été trouvée dans une fonction de traduction dans le fichier functions.php . Les appels de fonctions de traduction ne doivent pas contenir de variables PHP.
  15. Fichiers CSS : Présence du type de licenseLa déclaration License: manque dans le header du fichier style.css.
  16. Fichiers CSS : Présence de l'url de la licenseLa déclaration License URI: manque dans le header du fichier style.css.
  17. Fichiers CSS : Présence de la classe .bypostauthorLa classe CSS .bypostauthor n'a pas été trouvée dans les styles du thème.
  18. Fichiers CSS : Présence de la classe .alignleftLa classe CSS .alignleft n'a pas été trouvée dans les styles du thème.
  19. Fichiers CSS : Présence de la classe .gallery-captionLa classe CSS .gallery-caption n'a pas été trouvée dans les styles du thème.
  20. Fichiers CSS : Présence de la classe .screen-reader-textLa class css .screen-reader-text est nécessaire dans le css du thème. Voir : le Codex pour un exemple d'implémentation.
  21. Tags : Affichage des tagsCe theme ne semble pas afficher les tags.
  22. Screenshot : Copie d'écranLa taille du screenshot est 600x450px. La taille recommandée est 1200x900, pour prendre en compte les affichages HiDPI. Bien qu'une résolution de 1200x900 soit recommandée, toutes les images au format 4:3 sont acceptables.Mauvaise extension de fichier screenshot ! Le fichier screenshot.png n'est pas un véritable fichier JPG. Le type détecté est : "image/png".
Info
  1. Fichiers optionnels : Présence du fichierde style pour les écritures de droite vers la gauche rtl.cssCe thème ne contient pas le fichier optionnel rtl.php.
  2. Fichiers optionnels : Présence du fichier-template fron-*page.phpCe thème ne contient pas le fichier optionnel front-page.php.
  3. Fichiers optionnels : Présence du fichier-template des tags tag.phpCe thème ne contient pas le fichier optionnel tag.php.
  4. Fichiers optionnels : Présence du fichier template de taxinomie taxonomy.phpCe thème ne contient pas le fichier optionnel taxonomy.php.
  5. Fichiers optionnels : Présence du fichier-template author.phpCe thème ne contient pas le fichier optionnel author.php.
  6. Fichiers optionnels : Présence de du fichier-template des dates et heures date.phpCe thème ne contient pas le fichier optionnel date.php.
  7. Fichiers optionnels : Présence du fichier-template des archives archive.phpCe thème ne contient pas le fichier optionnel archive.php.
  8. Fichiers optionnels : Présence du fichier-template des résultats de recherche search.phpCe thème ne contient pas le fichier optionnel search.php.
  9. Fichiers optionnels : Présence du fichier-template des pièces jointes attachment.phpCe thème ne contient pas le fichier optionnel attachment.php.
  10. Fichiers optionnels : Présence du fichier-template des images image.phpCe thème ne contient pas le fichier optionnel image.php.
  11. Utilisation d'includes : Utilisation de include ou de de requireLe thème semble utiliser include ou require : autoload.php 71: include(ABSPATH.'wp-includes/version.php'); Si ces fonctions sont utilisées pour inclure des sections séparées d'un modèle à partir de fichiers indépendants, alors get_template_part () doit être utilisé à la place.Le thème semble utiliser include ou require : GetItems.php 38: require_once(__DIR__ . '/vendor/autoload.php'); // change path as needed Si ces fonctions sont utilisées pour inclure des sections séparées d'un modèle à partir de fichiers indépendants, alors get_template_part () doit être utilisé à la place.Le thème semble utiliser include ou require : GetBrowseNodes.php 38: require_once(__DIR__ . '/vendor/autoload.php'); // change path as needed Si ces fonctions sont utilisées pour inclure des sections séparées d'un modèle à partir de fichiers indépendants, alors get_template_part () doit être utilisé à la place.Le thème semble utiliser include ou require : SearchItems.php 38: require_once(__DIR__ . '/vendor/autoload.php'); // change path as needed Si ces fonctions sont utilisées pour inclure des sections séparées d'un modèle à partir de fichiers indépendants, alors get_template_part () doit être utilisé à la place.Le thème semble utiliser include ou require : GetVariations.php 38: require_once(__DIR__ . '/vendor/autoload.php'); // change path as needed Si ces fonctions sont utilisées pour inclure des sections séparées d'un modèle à partir de fichiers indépendants, alors get_template_part () doit être utilisé à la place.Le thème semble utiliser include ou require : StopwordsPHP.php 113: $stopwords = include($language_file); Si ces fonctions sont utilisées pour inclure des sections séparées d'un modèle à partir de fichiers indépendants, alors get_template_part () doit être utilisé à la place.Le thème semble utiliser include ou require : arr_to_regex.php 53: return require($php_file); Si ces fonctions sont utilisées pour inclure des sections séparées d'un modèle à partir de fichiers indépendants, alors get_template_part () doit être utilisé à la place.Le thème semble utiliser include ou require : de_DE_example.php 7: require '../vendor/autoload.php'; Si ces fonctions sont utilisées pour inclure des sections séparées d'un modèle à partir de fichiers indépendants, alors get_template_part () doit être utilisé à la place.Le thème semble utiliser include ou require : en_US_example.php 7: require '../vendor/autoload.php'; Si ces fonctions sont utilisées pour inclure des sections séparées d'un modèle à partir de fichiers indépendants, alors get_template_part () doit être utilisé à la place.Le thème semble utiliser include ou require : fr_FR_example.php 7: require '../vendor/autoload.php'; Si ces fonctions sont utilisées pour inclure des sections séparées d'un modèle à partir de fichiers indépendants, alors get_template_part () doit être utilisé à la place.Le thème semble utiliser include ou require : es_AR_example.php 7: require '../vendor/autoload.php'; Si ces fonctions sont utilisées pour inclure des sections séparées d'un modèle à partir de fichiers indépendants, alors get_template_part () doit être utilisé à la place.Le thème semble utiliser include ou require : pt_BR_example.php 7: require '../vendor/autoload.php'; Si ces fonctions sont utilisées pour inclure des sections séparées d'un modèle à partir de fichiers indépendants, alors get_template_part () doit être utilisé à la place.Le thème semble utiliser include ou require : export.php 12: require 'src/Fixtures/AbstractProvider.php';13: require 'src/Fixtures/Crawlers.php';14: require 'src/Fixtures/Exclusions.php';15: require 'src/Fixtures/Headers.php'; Si ces fonctions sont utilisées pour inclure des sections séparées d'un modèle à partir de fichiers indépendants, alors get_template_part () doit être utilisé à la place.
Other checked themes