git clone <repo>
clone the repository specified by ; this is similar to "checkout" in some other version control systems such as Subversion and CVS
Add colors to your ~/.gitconfig file:
<?php | |
/** | |
* Grid Content | |
* Change the number of words in excerpt if in the grid loop | |
*/ | |
function be_grid_content() { | |
// First, we make sure we're in the grid loop. | |
if( ! apply_filters( 'is_genesis_grid_loop', false ) ) | |
return; |
We have a private Git running on a server somewhere which we consider our central repository. Inside the .git/hooks/post-recieve is the following: | |
#!/bin/bash | |
while read oldrev newrev ref | |
do | |
branch=`echo $ref | cut -d/ -f3` | |
if [ "master" == "$branch" ]; then |
<?php | |
/** | |
* | |
* Remove Links from Post Titles in Genesis | |
* | |
* @author Joshua Nelson | |
* @link http://joshuadnelson.com | |
* | |
*/ |
<?php | |
// add parameter html5=1 to oembed YouTube requests as per | |
// http://stackoverflow.com/questions/17747443/css-transform-translate-breaking-youtube-embedded-video | |
// using modified version of code on http://www.alittleofboth.com/2013/06/modifying-youtube-video-display-in-wordpress/ | |
add_filter( 'oembed_result', 'youtube_oembed_html5_parameter', 10, 3); | |
function youtube_oembed_html5_parameter($data, $url, $args = array()) { | |
// add &html5=1 parameter | |
$data = preg_replace('/(youtube\.com.*)(\?feature=oembed)(.*)/', '$1?' . apply_filters("hyrv_extra_querystring_parameters", "feature=oembed&html5=1&") . 'rel=0$3', $data); | |
return $data; | |
} |
The reason you might not be able to remove the Open Sans font that Wordpress >= 3.8 adds to the frontend is that quite a few WP styles and scripts list 'open-sans' as a dependancy when being registered and enqueued. When you remove the 'open-sans' style the other plugins dependant on it will not load. So you just need to deregister WP's open sans style and register your own, with a false
value for the src
like below.
Credit to seventhsteel from http://wordpress.org/support/topic/turning-off-open-sans-for-the-38-dashboard
<?php | |
/** | |
* Blog Intro | |
* | |
*/ | |
function be_blog_intro() { | |
$content = get_post( get_option( 'page_for_posts' ) )->post_content; | |
if( $content ) | |
echo '<div class="blog-intro">' . wpautop( $content ) . '</div>'; |
<?php | |
/* | |
Plugin Name: Pew Scripts | |
Description: Scripts that are used on multiple sites can be registered and maintained in one place through this plugin. | |
Version: 1.2 | |
Author: Russell Heimlich | |
Author URI: http://www.russellheimlich.com | |
*/ | |
function pew_register_global_scripts() { |
<?php | |
/* | |
* Add "Formats" dropdown to TinyMCE Editor | |
*/ | |
function matt2015_mce_formats($buttons) { | |
array_unshift($buttons, 'styleselect'); | |
return $buttons; | |
} | |
add_filter('mce_buttons_2', 'matt2015_mce_formats'); |