View child-theme-script.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 | |
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. |
View child-theme-locale.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 | |
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. |
View child-theme-style.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 | |
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. |
View wp-send-email.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 | |
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. | |
} |
View wp-mu-suscribirme.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 | |
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"> |
View memrise-kanji-stroke-order.user.js
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
// ==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 |
View memrise-timer-toggle.user.js
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
// ==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 |
View memrise-turbo.user.js
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
// ==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 |