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
global $wp_version; | |
if ( version_compare( $wp_version, '3.5', 'ge' ) ) { | |
if ( !function_exists( 'ucc_oembed_twitter_lang' ) ) { | |
function ucc_oembed_twitter_lang( $provider, $url, $args ) { | |
if ( stripos( $url, 'twitter.com' ) ) { | |
if ( defined( 'WPLANG' ) ) | |
$lang = strtolower( WPLANG ); | |
if ( empty( $lang ) ) | |
$lang = 'en'; |
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_action( 'loop_start', 'qd_loop_start' ); | |
add_action( 'loop_end', 'qd_loop_end' ); | |
function qd_loop_start( $query ) { | |
global $query_depth; | |
if(!isset($query_depth)){ | |
$query_depth = 0; | |
} |
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
<audio controls> | |
<source src="<?php echo wp_get_attachment_url(); ?>" type="<?php echo get_post_mime_type(); ?>"> | |
Your browser does not support the audio tag. | |
</audio> |
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 | |
if ( function_exists( 'contact_detail' ) ) { | |
$chair = contact_detail( 'chair' ); | |
$address = contact_detail( 'address' ); | |
} |
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
<div class="grid"> | |
<div class="grid__item one-whole lap-one-half desk-two-thirds"> | |
... | |
</div> | |
<div class="grid__item one-whole lap-one-half desk-one-third"> | |
... | |
</div> |
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 | |
function indicator_helloworld( $indicator_text ) { | |
return 'Hello World!!!'; | |
} | |
add_action( 'tomjn_indicator_text', 'indicator_helloworld' ); |
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 | |
function indicator_colour( $indicator_colour ) { | |
return 'yellow'; | |
} | |
add_action( 'tomjn_indicator_colour', 'indicator_colour' ); |
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
Have you tried using git to do that? |
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 | |
if ( ! function_exists( 'shortcode_exists' ) ) { | |
/** | |
* Check if a shortcode is registered in WordPress. | |
* | |
* Examples: shortcode_exists( 'caption' ) - will return true. | |
* shortcode_exists( 'blah' ) - will return false. | |
*/ | |
function shortcode_exists( $shortcode = false ) { | |
global $shortcode_tags; |