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
<script> | |
;( function() { | |
// wait until gsap & ScrollTrigger available | |
let chck_if_gsap_loaded = setInterval( function() { | |
if( window.gsap && window.ScrollTrigger ) { | |
// register scrolTrigger | |
gsap.registerPlugin( ScrollTrigger ); |
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 | |
// Click to tweet functionality. Look for the username and hashtags at the end of the string. | |
$main_question = get_the_title(); | |
$twitter_quote = get_field('twitter_quote'); | |
?> | |
<div class="tweet-this"> | |
<a class="click-tweet" href="http://twitter.com/share?text=<?php echo html_entity_decode($main_question); ?> "<?php if($twitter_quote) { echo urlencode($twitter_quote); } ?>" via <?php echo $fullname . ' ' . $twitter_handle; ?>&url=<?php echo $roundup_permalink; ?>&hashtags=backswing @getbackswing" target="_blank"> | |
Click to Tweet | |
</a> |
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 | |
/** | |
* Custom Style that is base from the theme/ | |
* Cons: Doesnt show real time edit in the customizer | |
*/ | |
add_action('wp_head', 'custom_style_base_theme' ); | |
function custom_style_base_theme() { | |
ob_start(); | |
$output = ""; |
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_payment_method .woocommerce-PaymentMethod label { margin-left: 10px; } | |
#add_payment_method li { clear: right; } | |
#add_payment_method #wc-stripe_sepa-form { padding: 10px; } | |
form#order_review #payment_method_stripe { margin: 25px 0 25px 25px; } | |
form#order_review #payment_method_stripe_sepa { margin: 25px 0 25px 25px; } | |
form#order_review .payment_methods label { margin-left: 10px; } | |
form#order_review li { clear: right; } | |
form#order_review #wc-stripe_sepa-form { padding: 10px; } | |
.wc_payment_method .payment_box label { display: inline; } |
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 | |
/* ————————————————————————— */ | |
/* ACF Inline SVGs | |
/* ————————————————————————— */ | |
$repeater = 'repeater_field_name' | |
if ( have_rows( $repeater ) ): ?> | |
<section class="content-main"> | |
<div class="container"> <?php |
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 | |
/* Pull apart OEmbed video link to get thumbnails out*/ | |
function get_video_thumbnail_uri( $video_uri ) { | |
$thumbnail_uri = ''; | |
// determine the type of video and the video id | |
$video = parse_video_uri( $video_uri ); | |
// get youtube thumbnail |
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 | |
//* Do NOT include the opening php tag shown above. Copy the code shown below into functions.php | |
/** | |
* Manage WooCommerce styles and scripts. | |
*/ | |
function grd_woocommerce_script_cleaner() { | |
// Remove the generator tag | |
remove_action( 'wp_head', array( $GLOBALS['woocommerce'], 'generator' ) ); |
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
wp core config --dbname=database_name --dbuser=database_user --dbpass=user_password --dbhost=localhost --dbprefix=wp_ |
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
#!/bin/bash | |
# Default options | |
LOCALE="fr_FR" | |
DB_HOST='localhost' | |
VIRUSTOTAL_KEY='YOUR_KEY' | |
printf "Name of the project? cf My Project: " | |
read PROJECT_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
echo '1. Updating WP-CLI in /usr/local/bin/' \ | |
&& echo '2. Current version: ' \ | |
&& wp --version \ | |
&& cd /usr/local/bin \ | |
&& curl -O https://raw.githubusercontent.com/wp-cli/builds/gh-pages/phar/wp-cli.phar \ | |
&& chmod +x wp-cli.phar \ | |
&& echo '3. WP-CLI test...' \ | |
&& php wp-cli.phar --version \ | |
&& echo '4. Replacing...' \ | |
&& sudo mv wp-cli.phar wp \ |
NewerOlder