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 custom_shortcode_scripts() { | |
global $post; | |
if( has_shortcode( $post->post_content, 'custom-shortcode') ) { | |
wp_enqueue_script( 'custom-script'); | |
} | |
} | |
add_action( 'wp_enqueue_scripts', 'custom_shortcode_scripts'); |
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
- Diff | |
- EditorConfig | |
- Emmet | |
- HTML-CSS-JS Prettify | |
- JSHint | |
- Local History | |
- Sass | |
- SideBarEnhancements | |
- SublimeLinter | |
- SublimeLinter-css-lint |
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 | |
/** | |
* Display Post Image and Caption | |
* | |
* @link http://www.billerickson.net/wordpress-featured-image-captions/ | |
* @author Bill Erickson | |
* | |
*/ | |
function be_display_image_and_caption() { |
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 description to menu | |
* @author Bill Erickson | |
* @link http://www.billerickson.net/code/add-description-to-menu | |
* | |
* @param string $item_output | |
* @param object $item | |
* @return string modified item output | |
*/ |
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 | |
/** | |
* Customize Read More Link | |
* @author Bill Erickson | |
* @link http://www.billerickson.net/read-more-link | |
* | |
* @param string | |
* @return string | |
*/ | |
function be_more_link($more_link) { |
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 Extra Code to Any Menu | |
* @author Bill Erickson | |
* @link http://www.billerickson.net/customizing-wordpress-menus/ | |
* | |
* @param string $menu | |
* @param object $args | |
* @return string modified menu | |
*/ |
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 | |
// Trims by word | |
wp_trim_words( $text, $num_words, $moretext ); | |
// Trims by character (and strips HTML) | |
wp_html_excerpt( $str, $num_char ); |
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 | |
/** | |
* Black and White Image | |
* @url http://ottopress.com/2011/customizing-wordpress-images/ | |
* | |
* @param array $meta | |
* @return array $meta | |
*/ | |
function be_bw_filter($meta) { |
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 | |
/** | |
* Enqueue iOS bug fix | |
* | |
*/ | |
function be_enqueue_ios_bug_fix() { | |
wp_enqueue_script( 'be-ios-bug', get_stylesheet_directory_uri() . '/lib/js/ios-bug.js' ); | |
} |
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 Custom Image Sizes to Media Uploader | |
* @author Pippin Williamson | |
* @link http://pippinsplugins.com/add-custom-image-sizes-to-media-uploader/ | |
* | |
* @param array $sizes | |
* @return array | |
*/ |
NewerOlder