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 | |
//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(); |
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 | |
/* | |
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 | |
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 //no copiar esta línea | |
add_action( 'woocommerce_cart_totals_after_shipping' , 'mostrar_mensaje_tipo_envio' ); | |
add_action( 'woocommerce_review_order_after_shipping' , 'mostrar_mensaje_tipo_envio' ); | |
function mostrar_mensaje_tipo_envio() { | |
$chosen_method = WC()->session->get( 'chosen_shipping_methods' ); | |
$chosen_method = explode(':', reset($chosen_method) ); | |
if ( $chosen_method[0] == 'local_pickup' ){ |
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
-- Cambiar valores | |
SET @prefix = 'wp_'; | |
SET @id_user = 0; | |
-- Actualiza tabla de usermeta | |
SET @set_value_meta ='SET meta_value = ''a:1:{s:13:"administrator";b:1;}'' WHERE user_id ='; | |
SET @usermeta = CONCAT("UPDATE ", @prefix, "usermeta ", @set_value_meta, @id_user,' AND meta_key = "', @prefix, 'capabilities";' ); | |
PREPARE tblmeta FROM @usermeta; |