❯ find /Path/to/parent/folder -name "node_modules" -type d -prune -exec rm -rf '{}' +
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
@font-face { | |
font-family: 'ssi-fontello'; | |
src: url('../font/fontello.eot?78492063'); | |
src: url('../font/fontello.eot?78492063#iefix') format('embedded-opentype'), | |
url('../font/fontello.woff?78492063') format('woff'), | |
url('../font/fontello.ttf?78492063') format('truetype'), | |
url('../font/fontello.svg?78492063#fontello') format('svg'); | |
font-weight: normal; | |
font-style: normal; | |
} |
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 | |
// Add to functions.php and leave the “Content” box unticked in Settings > Mandrill | |
// Be sure to omit the opening <?php tag when copying this code | |
// Add paragraph breaks to plain text notifications sent by Mandrill | |
add_filter('mandrill_payload', 'wpmandrill_auto_add_breaks'); | |
function wpmandrill_auto_add_breaks($message) { | |
$html = $message['html']; |
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 // be sure to remove this line! | |
// Workaround for iThemes Exchange breadcrumbs issue. | |
// Strip breadcrumbs on iThemes Exchange ghost pages unless | |
// Genesis settings have enabled breadcrumbs on pages. | |
add_action( 'genesis_before_content', 'studiopress_it_exchange_breadcrumbs' ); | |
function studiopress_it_exchange_breadcrumbs() { | |
global $post; |
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 | |
add_filter( 'simple_social_default_profiles', 'custom_reorder_simple_icons' ); | |
function custom_reorder_simple_icons( $icons ) { | |
// Set your new order here | |
$new_icon_order = array( | |
'bloglovin' => '', | |
'dribbble' => '', | |
'email' => '', |
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
include config/theme-info.make | |
include src/make/theme-info-original.make | |
include src/make/show-help-from-comments.make | |
.PHONY: help sass build watch bump gitinit rename undo-rename dist clean b r ur gi ts | |
help: show-help-from-comments | |
## Watch and build Sass files only. Compiles all Sass to style.css, unminified. | |
sass: |
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
// From https://news.ycombinator.com/item?id=12172180 | |
var parser = document.createElement('a'); | |
parser.href = "http://example.com:3000/pathname/?search=test#hash"; | |
parser.protocol; // => "http:" | |
parser.hostname; // => "example.com" | |
parser.port; // => "3000" | |
parser.pathname; // => "/pathname/" | |
parser.search; // => "?search=test" | |
parser.hash; // => "#hash" | |
parser.host; // => "example.com:3000" |
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 | |
add_filter( 'get_the_content_more_link', 'custom_remove_ellipsis' ); | |
/** | |
* Strips the ellipsis from the Genesis more link. | |
* | |
* @param string $more_link_html The current more link HTML. | |
* @return string The link HTML without the ellipsis. | |
*/ | |
function custom_remove_ellipsis( $more_link_html ) { | |
$link_without_ellipsis = str_replace( '…', '', $more_link_html ); |
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 // add everything except for this opening line to your functions file | |
add_filter( 'wp_nav_menu_items', 'sp_add_loginout_link', 10, 2 ); | |
function sp_add_loginout_link( $items, $args ) { | |
// Change 'primary' to 'secondary' to put the login link in your secondary nav bar. | |
if ( $args->theme_location != 'primary' ) { | |
return $items; | |
} | |
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 | |
/** | |
* Fix Google Schema error, "The property logo is not recognised by Google for an object of type WPHeader". | |
* | |
* @param string $html The logo HTML. | |
* | |
* @return string The modified HTML. | |
*/ | |
add_filter( 'get_custom_logo', function( $html ) { | |
$html = str_replace( 'itemprop="logo"', 'itemprop="image"', $html ); |