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
/** | |
* Sync the reusable blocks between the sites of the multisite. | |
* | |
* @param int $post_id The post id. | |
* @param WP_Post $post The post object. | |
*/ | |
add_action( 'publish_wp_block', 'slug_sync_reusable_blocks', 10, 2 ); | |
function slug_sync_reusable_blocks( $post_id, $post ) { | |
// Check if the post already has a sync_hash or create one. | |
if ( get_post_meta( $post_id, 'sync_hash', true ) !== '' ) { |
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
"typography": { | |
"fontFamilies": [ | |
{ | |
"fontFamily": "\"Macklin Sans\", Frutiger, \"Frutiger Linotype\", Univers, Calibri, \"Gill Sans\", \"Gill Sans MT\", \"Myriad Pro\", Myriad, \"DejaVu Sans Condensed\", \"Liberation Sans\", \"Nimbus Sans L\", Tahoma, Geneva, \"Helvetica Neue\", Helvetica, Arial, sans-serif", | |
"slug": "macklin-sans", | |
"name": "Macklin Sans", | |
"fontFace": [ | |
{ | |
"fontFamily": "Macklin Sans", | |
"fontWeight": "100 200 300 400 500 600 700 800 900 950", |
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
suggest_recycled_tweet_inline | |
suggestrecycledtweet_inline | |
suggestpyletweet | |
suggestactivitytweet | |
suggest_timeline_tweet | |
suggest_sc_tweet | |
suggest_ranked_organic_tweet | |
suggest_activity_highlights | |
suggest_activity_feed | |
suggest_activity |
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
/** | |
* Finds all Pardot form iframes and appends a ?embedded_on= query parameter to the source. | |
* Very useful for fixing the crappy issues with pardot tracking... | |
*/ | |
add_filter( 'pardot_content', 'pardot_iframe_src_filter', 99, 1 ); | |
function pardot_iframe_src_filter( $content ) { | |
global $post; | |
$permalink_path = wp_make_link_relative( get_permalink( $post->ID ) ); |
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
//* ------------------------------------------------- | |
// ---------- GSFC + TEC Customization --------------- *// | |
//* Event Secondary Thumbnail Call | |
add_action ( 'gsfc_before_post_content', 'add_event_thumb', 1); | |
function add_event_thumb() { | |
$attr = array( | |
'class' => "event-thumb", // set custom class |
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
<section class="row widget-area post-picker auto <?php the_sub_field( 'css_class' ); the_sub_field( 'background_selector' ); ?>" id="<?php the_sub_field ('block_id'); ?>" <?php if( get_sub_field( 'background_image' ) ) { ?> style="background-image: url(<?php the_sub_field( 'background_image' ); ?>);"<?php } ?> > | |
<div class="wrap"> | |
<?php if( get_sub_field( 'headline' ) ) { ?> | |
<h3><?php the_sub_field( 'headline' ); ?></h3> | |
<?php } ?> | |
<section class="section news-post"><div class="box wrap"> |
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 prefix_reset_metabox_positions(){ | |
delete_user_meta( 1, 'meta-box-order_post' ); | |
delete_user_meta( 1, 'meta-box-order_page' ); | |
delete_user_meta( 1, 'meta-box-order_custom_post_type' ); | |
} | |
add_action( 'admin_init', 'prefix_reset_metabox_positions' ); |
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
/** | |
* Compile Sass. | |
* | |
* https://www.npmjs.com/package/gulp-sass | |
*/ | |
gulp.task( 'styles', function () { | |
gulp.src( paths.styles ) | |
// Notify on error |
NewerOlder