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 get_vine_thumbnail( $id ) | |
{ | |
$vine = file_get_contents("http://vine.co/v/{$id}"); | |
preg_match('/property="og:image" content="(.*?)"/', $vine, $matches); | |
return ($matches[1]) ? $matches[1] : false; | |
} | |
echo get_vine_thumbnail('bv5ZeQjY352'); |
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 ssl_post_thumbnail_html( $html ) | |
{ | |
if( is_ssl() ) | |
{ | |
return str_replace("http://", "https://", $html); | |
} | |
else | |
{ | |
return $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
// READ MORE, WHEN EXCERPT IT USED | |
add_action( 'after_setup_theme', 'flexslider_hg_after_theme_setup' ); | |
function flexslider_hg_after_theme_setup() | |
{ | |
remove_filter( 'excerpt_more', 'twentyeleven_auto_excerpt_more' ); // CHANGE THIS CALLBACK TO THE FUNCTION YOUR THEME IS USING | |
add_filter( 'excerpt_more', 'flexslider_hg_excerpt_more' ); | |
} | |
function flexslider_hg_excerpt_more( $more ) | |
{ |
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 hg_stripe_checkout_all_currencies( $currencies ) | |
{ | |
$currencies['INR'] = __('Indian Rupee', 'hg_edd'); | |
$currencies['AED'] = __('United Arab Emirates Dirham', 'hg_edd'); | |
$currencies['AFN'] = __('Afghan Afghani', 'hg_edd'); | |
$currencies['ALL'] = __('Albanian Lek', 'hg_edd'); | |
$currencies['AMD'] = __('Armenian Dram', 'hg_edd'); | |
$currencies['ANG'] = __('Netherlands Antillean Gulden', 'hg_edd'); | |
$currencies['AOA'] = __('Angolan Kwanza', 'hg_edd'); | |
$currencies['ARS'] = __('Argentine Peso', 'hg_edd'); |
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 redirect_if_not_found( $item, $to ) | |
{ | |
if(!$item) | |
{ | |
// WHATEVER OTHER HEADER OPTIONS YOU WANT CAN GO HERE, LIKE A 301 | |
header("HTTP/1.1 301 Moved Permanently"); | |
// REDIRECT | |
header("Location: $to"); | |
} |
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
{"icons":[{"name":"Glass","id":"glass","unicode":"f000","created":1,"categories":["Web Application Icons"]},{"name":"Music","id":"music","unicode":"f001","created":1,"categories":["Web Application Icons"]},{"name":"Search","id":"search","unicode":"f002","created":1,"categories":["Web Application Icons"]},{"name":"Envelope Outlined","id":"envelope-o","unicode":"f003","created":1,"categories":["Web Application Icons"]},{"name":"Heart","id":"heart","unicode":"f004","created":1,"categories":["Web Application Icons"]},{"name":"Star","id":"star","unicode":"f005","created":1,"categories":["Web Application Icons"]},{"name":"Star Outlined","id":"star-o","unicode":"f006","created":1,"categories":["Web Application Icons"]},{"name":"User","id":"user","unicode":"f007","created":1,"categories":["Web Application Icons"]},{"name":"Film","id":"film","unicode":"f008","created":1,"categories":["Web Application Icons"]},{"name":"th-large","id":"th-large","unicode":"f009","created":1,"categories":["Text Editor Icons"]},{"name":" |
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 tr_stars( $icon, $template_name, $id ) | |
{ | |
return "fa-paw"; | |
} | |
add_filter( 'testimonial_rotator_star' , 'tr_stars', 10, 3 ); |
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 tr_stars( $icon, $template_name, $id ) | |
{ | |
if( $template_name == "boom" ) return "fa-bomb"; | |
if( $template_name == "dogs" ) return "fa-paw"; | |
if( $id == 115 ) return "fa-asterisk"; | |
return $icon; | |
} | |
add_filter( 'testimonial_rotator_star' , 'tr_stars', 10, 3 ); |
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 hg_register_type( $plural, $singular, $post_type = false, $position = 30, $supports = array('title','editor','thumbnail','author','custom-fields')) | |
{ | |
$uc_plural = ucwords($plural); | |
$uc_single = ucwords($singular); | |
$lc_plural = strtolower($plural); | |
$lc_single = strtolower($singular); | |
$pt = ($post_type) ? $post_type : $lc_single; | |
$labels = array('name' => $uc_plural,'singular_name' => $uc_single,'add_new' => 'Add New','add_new_item' => 'Add New ' . $uc_single,'edit_item' => 'Edit ' . $uc_single,'new_item' => 'New ' . $uc_single,'view_item' => 'View ' . $uc_single,'search_items' => 'Search ' . $uc_plural,'not_found' => 'No ' . $uc_plural . ' Found','not_found_in_trash' => 'No ' . $uc_plural . ' Found in Trash', 'parent_item_colon' => 'Parent ' . $uc_single . ':' ); |