Skip to content

Instantly share code, notes, and snippets.

Antonio AntonioRigo

Block or report user

Report or block AntonioRigo

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
@AntonioRigo
AntonioRigo / child-theme-style.php
Last active Aug 29, 2015
Añadir CSS a un child theme para WordPress
View child-theme-style.php
<?php
function enqueue_custom_styles() { // función para agregar CSS.
if ( !is_admin() ) { // instrucción para solo cargar el CSS si NO es el área de administración.
// registra la ubicación de tu CSS.
wp_register_style( 'custom_style', get_bloginfo('stylesheet_directory' ) . '/css/custom_style.css' );
// agrega el CSS a la cola de carga.
@AntonioRigo
AntonioRigo / child-theme-locale.php
Last active Aug 29, 2015
Configurar localización/traducción en un child theme para WordPress
View child-theme-locale.php
<?php
function child_theme_setup() { // función para configurar el theme.
// registra el directorio de 'parent theme' y el directorio en el que se almacenan los archivos .po y .mo
load_child_theme_textdomain( 'parent_theme', get_stylesheet_directory() . '/languages' );
}
add_action( 'after_setup_theme', 'child_theme_setup' ); // hook que dispara la función para agregar scripts.
@AntonioRigo
AntonioRigo / wp-send-email.php
Last active Aug 29, 2015
Cambia los datos de envío de emails en WordPress
View wp-send-email.php
<?php
function new_mail_from($old) {
return 'wordpress@tu-dominio.tld'; // Cambiar "wordpress@tu-dominio.tld" por el dominio que quieras que figure.
}
function new_mail_from_name($old) {
return 'WordPress'; // Cambiar "WordPress" por el nombre que quieras que figure.
}
@AntonioRigo
AntonioRigo / wp-mu-suscribirme.php
Last active Aug 29, 2015
Suscribirme a este sitio (wordpress multisite)
View wp-mu-suscribirme.php
<?php
if (isset($_POST['suscribirme'])) {
$blog_id = get_current_blog_id();
$user_ID = get_current_user_id();
$role = 'subscriber';
add_user_to_blog($blog_id, $user_ID, $role);
}
?>
<form action="?suscribirme" method="post">
@AntonioRigo
AntonioRigo / child-theme-script.php
Last active Nov 9, 2016
Añadir scripts a un child theme para WordPress
View child-theme-script.php
<?php
function enqueue_custom_scripts(){ // función para agregar scripts.
if ( !is_admin() ) { // instrucción para solo cargar el script si NO es el área de administración.
// registra la ubicación de tu script, sus dependencias, versión, y si quieres añadirlo al final del archivo.
wp_register_script( 'custom_script', get_bloginfo('stylesheet_directory') . '/js/custom_script.js', array( 'jquery' ), '1.0', true );
// agrega el script a la cola de carga.
@AntonioRigo
AntonioRigo / memrise-timer-toggle.user.js
Last active Jun 28, 2017
Ads a toggle in memrise.com to control the timer. You can click on the timer to pause/unpause the timer.
View memrise-timer-toggle.user.js
// ==UserScript==
// @name Memrise Timer Toggle
// @description Ads a toggle to control the timer. You can click on the timer to pause/unpause the timer.
// @match https://www.memrise.com/course/*/garden/*
// @match https://www.memrise.com/garden/water/*
// @match https://www.memrise.com/garden/review/*
// @version 0.1.2
// @grant none
// @namespace https://gist.github.com/AntonioRigo/fae2536dbf5b7626c509102b2226353c
// @updateURL https://gist.github.com/AntonioRigo/fae2536dbf5b7626c509102b2226353c/raw/7e830938f94e4c4370e2e69c9f4a2142f008761e/memrise-timer-toggle.user.js
@AntonioRigo
AntonioRigo / memrise-kanji-stroke-order.user.js
Last active Sep 12, 2017
Swaps memrise.com course question display font with KanjiStrokeOrders in "Kanji" courses. You must have font installed on your PC. Get it here: http://www.nihilist.org.uk/KanjiStrokeOrders_v4.001.zip
View memrise-kanji-stroke-order.user.js
// ==UserScript==
// @name Memrise Kanji Stroke Order
// @description Swaps display font with KanjiStrokeOrders in "Kanji" courses. You must have font installed on your PC. Get it here: http://www.nihilist.org.uk/KanjiStrokeOrders_v4.001.zip
// @match https://www.memrise.com/course/*/garden/*
// @match https://www.memrise.com/garden/water/*
// @match https://www.memrise.com/garden/review/*
// @version 0.1.4
// @grant none
// @namespace https://gist.github.com/AntonioRigo/946277922b7cea14b66e4ef7e566b924
// @updateURL https://gist.github.com/AntonioRigo/946277922b7cea14b66e4ef7e566b924/raw/0cc22845157cb184bb4191b2400dc0f8fa27e4f4/memrise-kanji-stroke-order.user.js
@AntonioRigo
AntonioRigo / memrise-turbo.user.js
Last active Apr 5, 2018
Memrise Turbo advances to the next question as soon as you finish typing the correct answer, without any delays or even the need for you to press Enter. Ever. It enables you to water your items at the speed of your fingers. It works for all types of questions — no more pauses. Based on MemriseTurbo by infofarmer: https://github.com/infofarmer/me…
View memrise-turbo.user.js
// ==UserScript==
// @name Memrise Turbo
// @namespace https://gist.github.com/AntonioRigo/a0fef624c672b8e992665204960019a5
// @description Makes Memrise faster
// @match https://www.memrise.com/course/*/garden/*
// @match https://www.memrise.com/garden/water/*
// @match https://www.memrise.com/garden/review/*
// @match https://www.memrise.com/course/*/*/garden/*
// @version 0.2.5
// @updateURL https://gist.github.com/AntonioRigo/a0fef624c672b8e992665204960019a5/raw/443d30d11a12a47b8c0a4d6a883a516ca28bc7c9/memrise-turbo.user.js
You can’t perform that action at this time.