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
var pressed = []; | |
var secretcode = 'navidad'; | |
window.addEventListener('keyup', function (e) { | |
pressed.push(e.key); | |
pressed.splice(-secretcode.length -1, pressed.length - secretcode.length); | |
if (pressed.join('') == secretcode) { | |
console.log('Se usó el código secreto :)'); | |
} |
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 | |
/* | |
Plugin Name: Ejemplo Cron | |
Description: Plugin para mostrar cómo funciona el cron de WordPress | |
Version: 1.0 | |
Author: Jhon Marreros Guzmán | |
Author URI: http://decodecms.com | |
License: GPL2 | |
License URI: https://www.gnu.org/licenses/gpl-2.0.html | |
*/ |
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 | |
/* | |
Template Name: Página Contacto | |
*/ | |
get_header(); ?> | |
<div class="wrap"> | |
<div id="primary" class="content-area"> | |
<main id="main" class="site-main" role="main"> |
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 //no copiar esta línea | |
add_action( 'woocommerce_cart_totals_after_shipping' , 'mostrar_mensaje_zona_envio' ); | |
add_action( 'woocommerce_review_order_after_shipping' , 'mostrar_mensaje_zona_envio' ); | |
function mostrar_mensaje_zona_envio() { | |
$targeted_zones_names = array('Países Nórdicos'); //Zonas de envío configuradas | |
// Zona de envío seleccionada por el usuario |
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
<div id="login-code-container"> | |
<form name="loginform" id="loginform" action="/wp-login.php" method="post"> | |
<p class="login-username"> | |
<label for="user_login">Nombre de usuario o dirección de correo</label> | |
<input type="text" name="log" id="user_login" class="input" value="" size="20"> | |
</p> | |
<p class="login-password"> | |
<label for="user_pass">Contraseña</label> | |
<input type="password" name="pwd" id="user_pass" class="input" value="" size="20"> |
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:heading --> | |
<h2>Heading Block (H2)</h2> | |
<!-- /wp:heading --> | |
<!-- wp:heading --> | |
<h3>You are looking at one. (H3)</h3> | |
<!-- /wp:heading --> | |
<!-- wp:heading --> | |
<h2>Subhead Block</h2> |
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
/*Ancho ampliado y Ancho Completo*/ | |
.wrap-full .entry-content .alignwide{ | |
max-width: 980px; | |
padding:0; | |
} | |
.wrap-full .entry-content .alignfull{ | |
max-width: 100%; | |
padding:0; |
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 // No copiar esta línea | |
function dcms_setup_theme_supported_features() { | |
add_theme_support( 'editor-color-palette', array( | |
array( | |
'name' => __( 'strong magenta', 'dominiotema' ), | |
'slug' => 'strong-magenta', | |
'color' => '#a156b4', | |
), | |
array( |
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 dc_related_after_content( $content ) | |
{ | |
$number_related = 4; | |
$custom_field = 'relacionados'; | |
$counter = 0; | |
$cad = ""; | |
if ( !is_singular('post') ) return $content; |
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 | |
$json_data = file_get_contents('php://input'); | |
error_log('error-reportado'); | |
error_log(print_r($json_data,true)); | |
//En caso quieras especificar el archivo en donde se guardarán los mensajes, tendrías que cambiar la ruta | |
//error_log(print_r($json_data,true), 3, "/Users/jmarreros/www/decodecms/errores_csp.log"); |