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
// Just run this in the console and you're good to go | |
var firstOption = true; | |
jQuery( 'select[name="edd_report_series[0][download]"] option' ).each( function( index, option ) { | |
if ( jQuery( option ).val() == 0 || jQuery( option ).val() == 'all' ) return true; | |
if ( firstOption ) { |
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
let excludeSites = [ | |
'urltoexclude.com', | |
'anotherurltoexclude.com', | |
]; | |
jQuery( '.updates-container .update-row' ).each( function( index, updatesToggle ) { | |
if ( ! jQuery( updatesToggle ).hasClass( 'expand' ) ) { | |
jQuery( updatesToggle ).click(); | |
} |
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
{ | |
"id": 10, | |
"result": [ | |
{ | |
"bundled": true, | |
"type": "RM-J1100" | |
}, | |
[ | |
{ | |
"name": "PowerOff", |
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
/** | |
* Copies all CSS from one selector to another | |
* This is done by searching for a selector and then replacing it with another | |
* | |
* @param object replacements Selector => Replacement | |
* @param string stylesheethref Only check Stylesheets with this in its href attribute | |
* | |
* @since {{VERSION}} | |
* @return void | |
*/ |
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
/** | |
* Gets a Value from a Query String by Key | |
* | |
* @param {string} queryString Query String | |
* @param {string} key | |
* | |
* @since 1.0.0 | |
* @return {string} Query String | |
*/ | |
function getURLParam( queryString, key ) { |
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
// Multisite Plugin Stats plugin shows a list of sites per Plugin in a Hidden List. | |
var plugins = []; | |
jQuery( '.plugin_site_list' ).each( function( index, list ) { | |
if ( jQuery( list ).find( 'li:contains("SITE NAME")' ).length > 0 ) { | |
plugins.push( jQuery( list ).prev().text() ); |
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 | |
/** | |
* Allows certain Customizer Settings to not require `manage_options` | |
* Since no one wants to give Clients Admin Access if they don't have to. | |
* | |
* You will need to grant them `edit_theme_options` for this example, which will also give them access to the Customizer | |
*/ | |
add_action( 'customize_register', 'add_site_identity_for_non_admins' ); | |
function add_site_identity_for_non_admins( $wp_customize ) { |
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
/* | |
* Zurb's Foundations Magellan feature doesn't have a way to update the URL Hash without also altering the History | |
* | |
* http://foundation.zurb.com/sites/docs/magellan.html#js-options | |
*/ | |
( function( $ ) { | |
$( '.magellan' ).on( 'update.zf.magellan', function( event, activeElement ) { |
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
// Import a WP .xml File | |
// Paste into Browser Console when it asks you who to assign different Users' Content to | |
// Change "75" to the desired User ID | |
jQuery( 'select[name^="user_map"]' ).each( function( index, element ) { | |
jQuery( element ).val( 75 ); | |
} ); |
NewerOlder