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 | |
/** | |
* Enable Jetpack development mode if WP_DEBUG is true and jetpack is not active/connected to WordPress.com | |
* See: https://jetpack.com/support/development-mode/ | |
*/ | |
if ( defined( 'WP_DEBUG' ) && WP_DEBUG ) { | |
if ( method_exists( '\\Jetpack', 'is_active' ) && is_callable( array( '\\Jetpack', 'is_active' ) ) ) { | |
$jetpack_reflection = new \ReflectionMethod( '\\Jetpack', 'is_active' ); |
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 | |
/** | |
* Add the widget ID and widget name as HTML comments. | |
* | |
* Makes it easiser to identify exactly which widget area a widget is appearing in. | |
* This helps a lot with themes that have a lot of sidebars and uses a lot of widgets. | |
*/ | |
function which_dynamic_sidebar( $sidebar_params ) { | |
$sidebar_params['0']['class'] = empty( $sidebar_params['0']['class'] )?$sidebar_params['0']['id']:$sidebar_params['0']['class'].' '.$sidebar_params['0']['id']; | |
$sidebar_params['0']['before_widget'] = '<!--Widget-Area:id:'.esc_attr($sidebar_params['0']['id']).';name:'.esc_attr($sidebar_params['0']['name']).'-->'.$sidebar_params['0']['before_widget']; |
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
// List from https://developer.mozilla.org/en-US/docs/Web/HTML/Block-level_elements | |
@mixin block-elements($context: '') { | |
#{$context} address, | |
#{$context} article, | |
#{$context} aside, | |
#{$context} blockquote, | |
#{$context} canvas, | |
#{$context} dd, | |
#{$context} div, |
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
/\*([^*]|[\r\n]|(\*+([^*/]|[\r\n])))*\*+/ |
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
git ls-files -u |
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
sudo nginx -s reload | |
sudo service php7.0-fpm restart |
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
# Change the upload path of the sites to make sure media files still work | |
SELECT * FROM wpdb_6_options WHERE option_name IN ('upload_path', 'upload_url_path'); |
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
<script type="text/javascript"> | |
var storefront_items_stock = {}; | |
<? | |
var storefront = DB.getObjects('store_item'); | |
for each (item in storefront) { | |
print('storefront_items_stock['); | |
print( item.store_item_KEY ); | |
print( '] = ' ); | |
print( item.Number_in_Stock ); | |
print( ';\n'); |
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
$media-query-mixin-warning: "You should be using the Breakpoint SASS mixin library or the Susy Grid mixin to take advantage of cool features. Your media query will still compile though" | |
=phone-only | |
+phone("down") | |
@content | |
=tablet-only | |
+tablet("only") | |
@content |
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
wp db query "UPDATE wp_users SET user_pass=MD5('new_password_here') WHERE user_login='username'" |