A Pen by Ryan Smith on CodePen.
This file contains hidden or 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 | |
// you'll have to put a plugin header here | |
// Stop auto updated in WordPress 3.7+ | |
add_filter( 'auto_update_core', '__return_false' ); | |
add_filter( 'auto_update_plugin', '__return_false' ); | |
add_filter( 'auto_update_theme', '__return_false' ); | |
add_filter( 'auto_update_translation', '__return_false' ); | |
// stop translation updates when updating plugins or themes |
This file contains hidden or 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 | |
//Runs on User Registration | |
add_action( 'user_register', 'wc_map_guest_initial_match_past_orders', 10, 1 ); | |
function wc_map_guestinitial_match_past_orders( $user_id ) { | |
//Get current users's e-mail from ID | |
$current_user = get_user_by( 'ID', $user_id ); | |
$email = $current_user->user_email; |
This file contains hidden or 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 | |
//Form ID | |
$form_id = 1; | |
//Field ID | |
$field_id = 1; | |
//Pulls only the most recent entry | |
$paging = array( 'offset' => 0, 'page_size' => 1 ); |
This file contains hidden or 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 | |
//Registers the pre_update_option filter for elements to encrypt. Format pre_update_option_(option name) | |
//Only do this for ones you want encrypted... in this case, first and third options. | |
function yourplugin_init() { | |
add_filter( 'pre_update_option_your_first_option', 'yourplugin_update_option', 10, 2 ); | |
add_filter( 'pre_update_option_your_third_option', 'yourplugin_update_option', 10, 2 ); | |
} | |
add_action( 'init', 'yourplugin_init' ); |
This file contains hidden or 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 | |
//Change gform_pre_submission_1 to gform_pre_submission_(your form # here) | |
add_action( 'gform_pre_submission_1', 'sweepstakes_winner_check' ); | |
function sweepstakes_winner_check( $form ) { | |
//Array of codes for the first listed prize | |
$prize_one = array('aaaa','bbbb','cccc'); | |
//Array of codes for second listed prize |
This file contains hidden or 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
.gform_wrapper .pt-toggle .gfield_checkbox input[type=checkbox] { | |
margin-left: -9999px; | |
position: absolute; | |
visibility: hidden; | |
} | |
.gform_wrapper .pt-toggle .gfield_checkbox input[type=checkbox] + label { | |
background-color: #ddd; | |
border-radius: 60px; | |
cursor: pointer; | |
display: block; |
This file contains hidden or 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 Make Allmusic Accessible: Follow Artist | |
// @namespace http://tampermonkey.net/ | |
// @version 1.0 | |
// @description Makes the clickable div button to follow an artist accessible to screenreaders | |
// @author Dan Dulaney | |
// @match https://www.allmusic.com/artist/* | |
// @grant none | |
// ==/UserScript== |
This file contains hidden or 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
// Útil para filtros de Gutenberg como "allowed_block_types" | |
archives | |
audio | |
button | |
categories | |
code | |
column | |
columns | |
coverImage |
This file contains hidden or 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
var noteValues = { | |
'C0': 16.35, | |
'C#0': 17.32, | |
'Db0': 17.32, | |
'D0': 18.35, | |
'D#0': 19.45, | |
'Eb0': 19.45, | |
'E0': 20.60, | |
'F0': 21.83, | |
'F#0': 23.12, |
OlderNewer