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
<!DOCTYPE HTML> | |
<html> | |
<head> | |
<title>CSS Tricks & Tips</title> | |
<meta charset="UTF-8" /> | |
<style> | |
.checklist { | |
padding: 50px; | |
position: relative; | |
background: #043b3e; |
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
<!DOCTYPE HTML> | |
<html> | |
<head> | |
<title>CSS Tricks & Tips</title> | |
<meta charset="UTF-8" /> | |
<style> | |
.tooltip { | |
position: relative; | |
border-bottom: 1px dotted black; | |
} |
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
<!DOCTYPE HTML> | |
<html> | |
<head> | |
<title>CSS Tricks & Tips</title> | |
<meta charset="UTF-8" /> | |
<style> | |
.typing { | |
height: 80vh; | |
display: flex; | |
align-items: center; |
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
/* 1. Use a more-intuitive box-sizing model. */ | |
*, *::before, *::after { | |
box-sizing: border-box; | |
} | |
/* 2. Remove default margin */ | |
* { | |
margin: 0; | |
} | |
/* 3. Allow percentage-based heights in the application */ | |
html, body { |
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
# BEGIN Ocultar URL login WP | |
<IfModule mod_rewrite.c> | |
RewriteEngine On | |
RewriteRule ^tu_url_personalizada/?$ /wp-login.php?tu_clave_secreta [R,L] | |
RewriteCond %{HTTP_COOKIE} !^.*wordpress_logged_in_.*$ | |
RewriteRule ^tu_url_personalizada/?$ /wp-login.php?tu_clave_secreta&redirect_to=/wp-admin/ [R,L] | |
RewriteRule ^tu_url_personalizada/?$ /wp-admin/?tu_clave_secreta [R,L] | |
RewriteCond %{SCRIPT_FILENAME} !^(.*)admin-ajax\.php | |
RewriteCond %{HTTP_REFERER} !^(.*)tudominio.com/wp-admin | |
RewriteCond %{HTTP_REFERER} !^(.*)tudominio.com/wp-login\.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 | |
// 1. Configurar el PATH hacia la nueva carpeta de ACF | |
function configurar_path_a_acf( $path ) { | |
// actualizar el path | |
$path = get_stylesheet_directory() . '/acf/'; | |
return $path; | |
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 jpd_add_image_sizes() { | |
add_image_size( 'pw-thumb', 300, 100, true ); | |
add_image_size( 'pw-large', 600, 300, true ); | |
} | |
add_action( 'init', 'jpd_add_image_sizes' ); | |
function jpd_show_image_sizes($sizes) { | |
$sizes['pw-thumb'] = __( 'Custom Thumb', 'perezdans' ); | |
$sizes['pw-large'] = __( 'Custom Large', 'perezdans' ); |
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('authenticate', 'jpd_single_login_authenticate', 0, 3); | |
function jpd_single_login_authenticate($user, $username, $password) { | |
$user = get_user_by('login', $username); | |
if( isset($user->ID) ){ | |
if(isset($user->roles) && is_array($user->roles)) { |
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 | |
// --------------------------------- | |
// Redirección de registro (login) según el tipo (rol) de usuario. | |
// --------------------------------- | |
function jpd_custom_login_redirect($redirect_to, $request, $user) { | |
global $user; | |
if ( isset( $user->roles ) && is_array( $user->roles ) ) { | |
// Si es un usuario administrador le redirigimos al dashboard | |
if ( in_array( 'administrator', $user->roles ) ) |
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
//Evitar la carga en todas las páginas | |
add_filter( ‘wpcf7_load_js’, ‘__return_false’ ); | |
add_filter( ‘wpcf7_load_css’, ‘__return_false’ ); | |
//Cargar solo en las que nos interesan | |
function jpd_carga_contactform7(){ | |
if ( is_page(‘contacto, inicio’) ) { | |
if ( function_exists( ‘wpcf7_enqueue_scripts’ ) ) { | |
wpcf7_enqueue_scripts(); | |
} |
NewerOlder