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
-webkit-justify-content: center; | |
-ms-flex-pack: center; /* IE 10 */ | |
justify-content: center; |
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
# Rename your local branch | |
git branch -m old-name new-name | |
# Delete the old branch and push new | |
git push origin :old-name new-name | |
# Reset the upstream branch for the new-name local branch | |
git push origin -u new-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
# Rename your local branch | |
git branch -m old-name new-name | |
# Delete the old branch and push new | |
git push origin :old-name new-name | |
# Reset the upstream branch for the new-name local branch | |
git push origin -u new-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
<?php | |
add_filter( "get_post_metadata", 'bs_replace_td_video_code', 10, 4 ); | |
function bs_replace_td_video_code( $null, $object_id, $meta_key, $single ) { | |
if ( $meta_key == '_featured_embed_code' ) { | |
remove_filter( "get_post_metadata", 'bs_replace_td_video_code', 10 ); |
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_filter( 'wp_get_attachment_image_src', 'fifu_replace_attachment_image_src', 10, 2 ); | |
if ( ! function_exists( 'fifu_replace_attachment_image_src' ) ) { | |
/** | |
* Replaced attachment src with external thumbnail URL | |
* | |
* @hooked wp_get_attachment_image_src | |
* |
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 | |
/** | |
* Remove Class Filter Without Access to Class Object | |
* | |
* In order to use the core WordPress remove_filter() on a filter added with the callback | |
* to a class, you either have to have access to that class object, or it has to be a call | |
* to a static method. This method allows you to remove filters with a callback to a class | |
* you don't have access to. | |
* | |
* Works with WordPress 1.2+ (4.7+ support added 9-19-2016) |
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_filter( 'status_header', 'better_studio_bypass_cloadflare_404_status_header', 100, 2 ); | |
function better_studio_bypass_cloadflare_404_status_header( $status_header, $code ) { | |
// Detect 404 page | |
if ( $code === 404 ) { | |
// Return normal content type when user agent in not set | |
if ( empty( $_SERVER['HTTP_USER_AGENT'] ) ) { | |
// Return normal content type for real visitors |
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
jQuery(document).ready(function() { | |
function bs_fix_vc_full_width_row(){ | |
var $elements = jQuery('[data-vc-full-width="true"]'); | |
jQuery.each($elements, function () { | |
var $el = jQuery(this); | |
$el.css('right', $el.css('left')).css('left', ''); | |
}); | |
} |