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
diff --git a/tools/checkstyle.sh b/tools/checkstyle.sh | |
index 8f536e2..e206727 100755 | |
--- a/tools/checkstyle.sh | |
+++ b/tools/checkstyle.sh | |
@@ -1,7 +1,7 @@ | |
#!/bin/sh | |
-if [ x"$1" == x ]; then | |
+if [ -z "$1" ]; then | |
checkstyle -c cq-configs/checkstyle/checkstyle.xml -r src/ |
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 | |
function wpcom_wp_error_merge() { | |
$wp_error_merged = new WP_Error(); | |
$wp_errors = func_get_args(); | |
foreach ( $wp_errors as $wp_error ) { | |
if ( ! is_wp_error( $wp_error ) ) | |
continue; | |
foreach ( $wp_error as $key => $errors ) { |
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_action( 'after_setup_theme', 'x_kses_allow_data_attributes_on_links' ); | |
function x_kses_allow_data_attributes_on_links() { | |
global $allowedposttags; | |
$tags = array( 'a' ); | |
$new_attributes = array( | |
'data-foo' => array(), | |
'data-bar' => array(), |
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_action( 'init', 'x_maybe_load_ad_busters' ); | |
function x_maybe_load_ad_busters() { | |
$ad_busters = array( | |
'/adcentric/ifr_b.html', | |
'/atlas/atlas_rm.htm', | |
'/doubleclick/DARTIframe.html', | |
'/eyereturn/eyereturn.html', |
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_action( 'zoninator_pre_init', function() { | |
add_post_type_support( 'book', 'zoninator_zones' ); | |
} ); |
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 | |
/** | |
* Output Liveblog entries as part of feed content | |
**/ | |
if ( class_exists( 'WPCOM_Liveblog' ) ) | |
add_filter( 'the_content_feed', 'x_add_liveblog_entries_to_feed_content' ); | |
function x_add_liveblog_entries_to_feed_content( $content ) { | |
if ( WPCOM_Liveblog::is_liveblog_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 | |
function x_custom_metadata_sanitize_as_html( $field_slug, $field, $object_type, $object_id, $value ) { | |
if ( is_array( $value ) ) | |
$value = array_map( 'wp_filter_post_kses', $value ); | |
else | |
$value = wp_filter_post_kses( $value ); | |
return $value; | |
} |
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
jQuery( function( $ ) { | |
if ( 'undefined' === typeof FB ) | |
return; | |
if ( $( 'body' ).hasClass( 'single-post' ) || $( 'body' ).hasClass( 'page' ) ) { | |
var $comments_div = $( '<div/>' ); | |
$comments_div.addClass( 'fb-comments' ); | |
$comments_div.attr( 'data-href', document.location ); | |
$comments_div.appendTo( $( '.primary-content' ) ); |
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_action( 'registered_taxonomy', 'cms_modify_default_delete_term_caps', 10, 3 ); | |
function cms_modify_default_delete_term_caps( $taxonomy, $object_type, $args ) { | |
global $wp_taxonomies; | |
if ( 'category' == $taxonomy ) { | |
$wp_taxonomies[ $taxonomy ]->cap->delete_terms = 'cms-delete-terms'; | |
} | |
} |
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
<!--[if lte IE 9]> | |
<script src="<?php echo get_template_directory_uri(); ?>js/respond/respond.min.js"></script> | |
<link href="<?php echo get_template_directory_uri(); ?>/js/respond/respond-proxy.html" id="respond-proxy" rel="respond-proxy" /> | |
<?php // need to load the following proxy files from the mapped domain for cross-domain handling ?> | |
<link href="<?php echo wpcom_vip_noncdn_uri( dirname( __FILE__ ) ); ?>/js/respond/respond.proxy.gif" id="respond-redirect" rel="respond-redirect" /> | |
<script src="<?php echo wpcom_vip_noncdn_uri( dirname( __FILE__ ) ); ?>/js/respond/respond.proxy.js"></script> | |
<![endif]--> |