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
// Get people preview template | |
if ( is_singular( 'sc_people' ) && is_preview() ) : | |
get_template_part( 'template-parts/people', 'preview' ); | |
endif; |
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
.all { | |
overflow: hidden; | |
display: block; | |
position: absolute; | |
width: 100%; | |
height: 100%; | |
animation: bodygradient 45s infinite; | |
-webkit-animation: bodygradient 45s infinite; | |
-moz-animation: bodygradient 45s infinite; | |
border: 20px solid rgba(255, 255, 255, 0.5); |
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( window ).load( function () { | |
jQuery.fn.isOnScreen = function() { | |
var win = jQuery( window ); | |
var viewport = { | |
top: win.scrollTop(), | |
left: win.scrollLeft() | |
}; | |
viewport.right = viewport.left + win.width(); |
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 the_thing() { | |
$classes = get_body_class(); | |
if( in_array( 'the-class', $classes, true ) ) { | |
// Do a thing | |
} | |
} | |
// or | |
function the_thing() { |
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
// Loops through the tabs and if true, run function to create dropdown | |
$( '.tab-wrap > .panel' ).each(function( index, value ) { | |
if ( $( '.header-only', value ).length > 1 ) { | |
yearsfilter( value ); | |
} | |
}) | |
function yearsfilter( panel ) { | |
// Creates dropdown | |
$( panel ).prepend('<div class="contact-filter"><div class="sc-filtering"><select class="theyears filters-select"><option value="">Show All</option></select></div></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
================================================================ | |
Opening | |
================================================================ | |
<?php // Check if the buttons should show | |
if ( 'yes' === $settings->cb_blk_one_show_btns ) : | |
// Run a foreach loop over every button from global options | |
if ( count( $settings->cb_blk_one_btns ) === 1 ) : | |
foreach ( $settings->cb_blk_one_btns as $key => $val ) : |
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
$insightcats = get_categories( [ | |
'orderby' => 'include', | |
'include' => array( 9, 6, 7, 8, 5 ) | |
] ); |
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
// https://stackoverflow.com/questions/1338728/delete-commits-from-a-branch-in-git?utm_medium=organic&utm_source=google_rich_qa&utm_campaign=google_rich_qa | |
Careful: git reset --hard WILL DELETE YOUR WORKING DIRECTORY CHANGES. Be sure to stash any local changes you want to keep before running this command. | |
Assuming you are sitting on that commit, then this command will wack it... | |
git reset --hard HEAD~1 | |
The HEAD~1 means the commit before head. | |
Or, you could look at the output of git log, find the commit id of the commit you want to back up to, and then do this: |
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 ( has_term( 'quote', 'sc_insighttype' ) ) { | |
$insightquote = get_post_meta( get_the_ID(), 'mbsc-insight-quote', true ); | |
?> | |
<div class="insight-box-quote"> | |
<?php if ( substr( $insightquote, 0, 1 ) === '"' || utf8_decode( substr( $insightquote, 0, 1 ) ) === utf8_decode( '“' ) ) { ?> | |
<?php echo '<h3>' . esc_html( $insightquote ) . '</h3>'; ?> | |
<?php } else { ?> | |
<?php echo '<h3>' . '“' . esc_html( $insightquote ) . '”' . '</h3>'; ?> | |
<?php } ?> | |
</div> |