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
/** | |
* Move Category Post Counts Inside Link | |
* | |
* filters wp_list_categories() | |
* | |
* @param string $links link html output | |
* @return string | |
*/ | |
function prefix_move_category_count( $links ) { |
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
/** | |
* Order get_terms() by number | |
* | |
* @param string $orderby ORDERBY clause of the terms query. | |
* @param array $args An array of terms query arguments. | |
* @param string|array $taxonomies A taxonomy or array of taxonomies. | |
* @return string | |
*/ | |
function prefix_get_terms_orderby_numeric( $orderby, $args, $taxonomies ) { |
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
// ---- | |
// Sass (v3.4.11) | |
// Compass (v1.0.3) | |
// ---- | |
// Your Example | |
#id > .element { | |
#{selector-unify(&, div)} { | |
color: blue; | |
} |
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
/** | |
* Add custom directory filter | |
* | |
* 'ev_custom_upload_directory' | |
*/ | |
function ev_pre_upload( $file ) { | |
add_filter( 'upload_dir', 'ev_custom_upload_directory' ); | |
return $file; | |
} |
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
/** | |
* Remove meta boxes | |
* | |
* @return void | |
*/ | |
function prefix_remove_meta_boxes() { | |
/* Publish meta box. */ | |
remove_meta_box( 'submitdiv', 'post', 'normal' ); |
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 | |
/** | |
* Hide Editor | |
*/ | |
function prefix_hide_editor() { | |
// get post id | |
if ( isset( $_GET['post'] ) ) : | |
$post_id = $_GET['post']; |
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 | |
/** | |
* Import Categories and Tags Into Post | |
* | |
* Using WP CSV to export blog posts, taxonomy fields include slug (e.g. term:Term, another-term:Another Term) | |
* This will exclude slug, returning only term's name | |
* | |
* Example Usage: [prefix_import_term_name({tx_category[1]})] | |
* [prefix_import_term_name({tx_post_tag[1]})] | |
* |
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 | |
/** | |
* Disable Emojis | |
* | |
* WordPress 4.2 introduced emoji JS and CSS in the page's head | |
*/ | |
function prefix_disable_emoji() { | |
remove_action( 'wp_head', 'print_emoji_detection_script', 7 ); | |
remove_action( 'admin_print_scripts', 'print_emoji_detection_script' ); |
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
/** | |
* Set X-UA-Compatible for IE | |
* | |
* Sends headers to browser in an attempt to have IE render the website using | |
* their latest rendering engine (i.e. IE=edge). Additionally, attempts to | |
* activate Chrome Frame add-on if it exists. | |
* | |
* IE browser may show compatibility icon in address bar when using HTML5 Boilerplate's | |
* heading markup which contains conditional comments on HTML tag. | |
* |
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 Featured Image Description | |
* | |
* @param string $content Admin post thumbnail HTML markup. | |
* @param integer $content Post ID. | |
* @return string | |
*/ | |
function prefix_featured_image_description( $content, $post_id ) { |