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 | |
/** | |
* Pop this into your functions.php if you like :) | |
* | |
*/ | |
function jordesigns_mce_buttons( $buttons ) { | |
array_unshift( $buttons, 'styleselect' ); | |
return $buttons; | |
} | |
add_filter( 'mce_buttons_2', 'jordesigns_mce_buttons' ); |
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 sz_get_testimonials( $page_id ){ | |
$testimonials = get_post_meta( $page_id, 'testimonial', false ); | |
if ( $testimonials ) { | |
$testimonial_list = "\n<ul>\n"; | |
foreach ( $testimonials as $testimonial ) { | |
$testimonial_image = false; | |
$testimonial_content = false; | |
$testimonial_list .= "\t<li class='row'>"; | |
if ( $testimonial['testimonial-image'] ) { | |
$testimonial_image = wp_get_attachment_image( $testimonial['testimonial-image'], 'full', '', array( 'class' => 'columns small-3' ) ); |
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 | |
Sometimes we want to give clients access to additional styles in TinyMCE. These functions also handle backwards compatibility with WordPress as TinyMCE 3 and TinyMCE 4 handle this differently | |
function sennza_mce_buttons( $buttons ) { | |
array_unshift( $buttons, 'styleselect' ); | |
return $buttons; | |
} | |
add_filter( 'mce_buttons_2', 'sennza_mce_buttons' ); | |
function sennza_mce_before_init( $init_array ) { |
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
# Chassis Configuration | |
# | |
# This file is the default configuration for all projects. The fallback order of | |
# configuration files is: | |
# | |
# - project/content/config.local.yaml (project-specific overrides) | |
# - project/content/config.yaml (project-specific defaults) | |
# - project/config.local.yaml (global overrides) | |
# - project/config.yaml (global defaults) |
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 | |
/* | |
* Better backtracing to fix dodgy themes and plugins. Pop this into mu-plugins | |
*/ | |
function sennza_backtrace() { | |
echo implode( '<br>', explode( ',', wp_debug_backtrace_summary( null, 4 ) ) ); | |
}; | |
add_action( 'deprecated_function_run', 'sennza_backtrace' ); |
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
SELECT table_schema "Data Base Name", | |
sum( data_length + index_length ) / 1024 / 1024 "Data Base Size in MB" | |
FROM information_schema.TABLES GROUP BY table_schema ; |
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
echo 'flush_all' | nc localhost 11211 |
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
<!doctype html> | |
<html class="no-js" lang="en"> | |
<head> | |
<meta charset="utf-8" /> | |
<meta name="viewport" content="width=device-width, initial-scale=1.0" /> | |
<title>Foundation Mega Menu</title> | |
<link rel="stylesheet" href="css/app.css" /> | |
<link href="http://cdnjs.cloudflare.com/ajax/libs/foundicons/3.0.0/foundation-icons.css" rel="stylesheet"> | |
<script src="bower_components/modernizr/modernizr.js"></script> | |
</head> |
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
brew update && brew upgrade git |
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
wp post list --field=ID --post_type=product | xargs wp post delete --force |
OlderNewer