This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
php_value memory_limit 256M |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
function mostrar_busqueda( $items, $args ){ | |
/* SI NO ES EL MENU PRINCIPAL, REGRESAMOS EL MENU SIN TOCAR */ | |
if ( "primary" != $args->theme_location ){ | |
return $items; | |
} | |
$formulario = get_search_form(FALSE); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/wp-content/languages/themes/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
function dtorrer_agregar_seguimiento_envio() { | |
?> | |
<script type="text/javascript"> | |
document.addEventListener( 'wpcf7mailsent', function( event ) { | |
location = 'https://dtorrer.com/url-destino'; | |
}, false ); | |
</script> | |
<?php |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
function dtorrer_agregar_seguimiento_envio() { | |
?> | |
<script type="text/javascript"> | |
document.addEventListener( 'wpcf7mailsent', function( event ) { | |
ga( 'send', 'event', 'Contact Form', 'submit' ); | |
location = 'https://dtorrer.com/url-destino'; | |
}, false ); | |
</script> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
CREATE TABLE $tableprefix_et_social_stats ( | |
id mediumint(9) NOT NULL AUTO_INCREMENT, | |
sharing_date datetime DEFAULT '1000-01-01 00:00:00' NOT NULL, | |
network varchar(20) NOT NULL, | |
action varchar(10) NOT NULL, | |
post_id bigint(20) NOT NULL, | |
ip_address varchar(45) NOT NULL, | |
media_url varchar(2083) NOT NULL, | |
location varchar(20) NOT NULL, | |
UNIQUE KEY id (id)) DEFAULT CHARACTER SET utf8 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
add_filter('wp_footer', dtorrer_diagnostico); | |
function dtorrer_diagnostico(){ | |
$datos = array(); | |
$datos[] = 'Fecha: ' . date('Y-m-d H:i:s'); | |
$datos[] = 'Tiempo: ' . timer_stop(0, 2) . ' segundos.'; | |
if (function_exists('memory_get_usage')) { | |
$unidades = array('b','kb','mb','gb','tb','pb'); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/* SI TENEMOS UN REDIRECTING LOOP CON CLOUDFLARE Y HTTPS */ | |
/* LE OBLIGAMOS AL SERVIDOR A "ACTIVAR" EL MODO HTTPS */ | |
define('FORCE_SSL_ADMIN', true); | |
if (strpos($_SERVER['HTTP_X_FORWARDED_PROTO'], 'https') !== false) | |
$_SERVER['HTTPS']='on'; | |
/* SI USAMOS CLOUDFLARE, USAMOS ESTO PARA RESTAURAR EL IP DEL VISITANTE */ | |
if ( !empty( $_SERVER['REMOTE_ADDR'] ) && !empty( $_SERVER['HTTP_CF_CONNECTING_IP'] ) ) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
add_action( 'wp_enqueue_scripts', 'dtorrer_agregar_estilos_al_tema' ); | |
function dtorrer_agregar_estilos_al_tema() { | |
wp_enqueue_style( 'estilos-temapadre', get_template_directory_uri() . '/style.css' ); | |
wp_enqueue_style( 'estilos-temahijo', get_stylesheet_directory_uri() . '/style.css',array( 'estilos-temapadre' ) ); | |
} | |
?> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/* | |
* We verify the HTTP code that WordPress will send and then we decide if the current page | |
* should be allowed to be cached. | |
*/ | |
add_filter('swift_performance_is_cacheable', 'dtorrer_swift_iscacheable', 20, 1); | |
function dtorrer_swift_iscacheable( $cacheable = FALSE ){ | |
if( FALSE === $cacheable ){ return $cacheable; } | |