View konami.js
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 :)');
}
View comments.php
<?php
//Filtro para modificar la estructura
//de los campos del formulario de comentarios
add_filter( 'comment_form_defaults', 'dcms_modify_fields_form' );
function dcms_modify_fields_form( $args ){
$commenter = wp_get_current_commenter();
View EntradasRecientes.php
<?php
add_action( 'init', 'dcms_agregar_shortcode' );
function dcms_agregar_shortcode(){
add_shortcode('EntradasRecientes', 'dcms_entradasrecientes');
}
function dcms_entradasrecientes( $atts , $content ){
View install.php
<?php
require_once( realpath( dirname( __FILE__ ) ) . '/srdb.class.php' );
if (array_key_exists("step",$_REQUEST) && $_REQUEST["step"] == 2){
add_action("shutdown", "dcms_install_data");
}
function dcms_install_data() {
global $wpdb, $wp_rewrite;
View muestra-pagina-estatica.php
<?php
$paged = (get_query_var('paged')) ? get_query_var('paged') : 1;
if ( $paged == 1 && is_home() ) {
$idPage = 2;
$page = get_post( $idPage );
$title = $page->post_title;
View api-woocommerce.php
<?php
require __DIR__ . '/vendor/autoload.php';
use Automattic\WooCommerce\Client;
use Automattic\WooCommerce\HttpClient\HttpClientException;
try {
$woocommerce = new Client(
View Filtro_descripcion_categoria.php
<?php
// Unfilter Description
foreach ( array( 'pre_term_description' ) as $filter ) {
remove_filter( $filter, 'wp_filter_kses' );
}
foreach ( array( 'term_description' ) as $filter ) {
remove_filter( $filter, 'wp_kses_data' );
}
View Lista_subcategorias.php
<?php
// $list_subcat = get_terms( ['taxonomy' => 'category', 'hide_empty' => false, 'parent' => $cat] );
// $list_subcat = get_categories( ['hide_empty' => false, 'parent' => $cat] );
$list_subcat = array();
if ( !empty($cat) ) $list_subcat = get_categories( ['hide_empty' => false, 'parent' => $cat] );
if ( count($list_subcat)):
echo "<div class='subcat'>";
View maintenance.php
<?php
header( $_SERVER["SERVER_PROTOCOL"] . ' 503 Service Temporarily Unavailable', true, 503 );
header( 'Content-Type: text/html; charset=utf-8' );
header( 'Retry-After: 600' );
?>
<!DOCTYPE html>
<html>
<head>
<title></title>
</head>
View Ejm2-centrar-logo-menu.css
@media (min-width: 980px){
header div.col, header nav{
width: 100%;
}
header .menu-short-container{
text-align: center;
}