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 | |
/** | |
* wp.template.php | |
* | |
* PHP Wrapper to emulate wp.template using mustache.php | |
* | |
* mustache.php: https://github.com/bobthecow/mustache.php | |
* | |
* JS Example | |
* |
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 | |
/** | |
* Plugin Check for the WP customizer | |
* Inspired by http://ottopress.com/2012/themeplugin-dependencies/ & http://ottopress.com/2013/slides-a-presentation-theme/ | |
* | |
* Of Desks Studio Inc. | |
* | |
* Example: | |
$wp_customize->add_section( 'plugins', 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
creator — title | |
— Office Space: the Soundtrack | |
— 10 Things I Hate About You: Music From The Motion Picture | |
— Chicago | |
— Eternal Sunshine of the Spotless Mind | |
— O Brother, Where Art Thou? | |
— There Will Be Blood | |
!!! — Me & Giuliani Down By the School Yard: True Story | |
!!! — Louden Up Now | |
!!! (Chk Chk Chk) — !!! |
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
// Hides Yoast SEO Plugin Field Columns for Author users and below | |
// @since Jan, 2013 | |
// @author R. Dall | |
function my_columns_filter( $columns ) { | |
if( ! current_user_can( 'edit_users' ) ) | |
unset( $columns['wpseo-score'], $columns['wpseo-title'], $columns['wpseo-metadesc'], $columns['wpseo-focuskw'] ); | |
return $columns; |
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
function flush() { | |
// Don't flush if multi-blog. | |
if ( function_exists( 'is_site_admin' ) || defined( 'CUSTOM_USER_TABLE' ) && defined( 'CUSTOM_USER_META_TABLE' ) ) | |
return true; | |
$user_cache = apc_cache_info( 'user' ); | |
foreach( $user_cache['cache_list'] as $cache_entry ) { | |
if ( false !== strstr( $cache_entry['info'], WP_APC_KEY_SALT . ':' . $this->abspath ) ) | |
apc_delete( $cache_entry['info'] ); |
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
//get the review type based on page custom meta field | |
function oswc_get_review_meta($postid) { | |
//try every reasonble conceivable variation that the user my enter to make this as user friendly as possible | |
$postTypeName = get_post_meta($postid, "Review Type", $single = true); | |
if(empty($postTypeName)){ | |
$postTypeName = get_post_meta($postid, "review type", $single = true); | |
if(empty($postTypeName)){ | |
$postTypeName = get_post_meta($postid, "reviewtype", $single = true); | |
if(empty($postTypeName)){ | |
$postTypeName = get_post_meta($postid, "Reviewtype", $single = true); |
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
Site Root / | |
content/ | |
advanced-cache.php | |
index.php | |
mu-plugins/ -> /shared/wp/mu-plugins | |
object-cache.php | |
plugins/ | |
themes/ | |
uploads/ | |
index.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
sudo apt-get install php5 php5-fpm php-pear php5-common php5-mcrypt php5-mysql php5-cli php5-gd php-apc |
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
# powjs r1 - @weskoop | |
# Config.ru concept and file by Assaf Arkin http://labnotes.org/2011/08/06/using-pow-with-your-node-js-project/ | |
function powjs { | |
if [[ $# -ne 0 ]]; then | |
if [[ $1 == "config" ]]; then | |
echo "Creating Node compatible config.ru..." | |
cat > config.ru <<POWJS | |
require "net/http" |