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
// Add customer user fields in wp admin | |
function modify_contactmethods( $contactmethods ) { | |
// Remove unwanted fields // | |
unset($contactmethods['aim']); | |
unset($contactmethods['yim']); | |
unset($contactmethods['jabber']); | |
// Add new fields // | |
$contactmethods['twitter_handle'] = 'Twitter Handle (@)'; | |
$contactmethods['linkedin_url'] = 'LinkedIn Profile (URL)'; | |
return $contactmethods; |
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_shortcode('wp_caption', 'fixed_img_caption_shortcode'); | |
add_shortcode('caption', 'fixed_img_caption_shortcode'); | |
function fixed_img_caption_shortcode($attr, $content = null) { | |
// New-style shortcode with the caption inside the shortcode with the link and image tags. | |
if ( ! isset( $attr['caption'] ) ) { | |
if ( preg_match( '#((?:<a [^>]+>\s*)?<img [^>]+>(?:\s*</a>)?)(.*)#is', $content, $matches ) ) { | |
$content = $matches[1]; | |
$attr['caption'] = trim( $matches[2] ); | |
} |
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
// --------------------------------------------------------- | |
// ---------- WordPress functions.php boilerplate ---------- | |
// --------------------------------------------------------- | |
<?php | |
// ---------------------------------------------------------------------------- | |
// ---------- Translations can be filed in the /languages/ directory ---------- | |
// ---------------------------------------------------------------------------- | |
load_theme_textdomain( 'html5reset', TEMPLATEPATH . '/languages' ); |
OlderNewer