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 to background load images and swap out their source. | |
function replaceImageSrc() { | |
jQuery('svg image').each(function(){ | |
var el = jQuery(this); | |
// Get the new href. | |
var href = el.attr('xlink:href'); | |
href = href.replace( 'assets_small', 'assets_large' ); | |
href = href.replace( '-s.', '-l.' ); |
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
<ion-list *ngIf="(videoCategories$ | async) as categories" class="ion-padding-start"> | |
<ion-item (click)="getSelectedCategoryVideos('2380')"> | |
Therapeutic Breakout Sessions | |
</ion-item> | |
<ion-item (click)="getSelectedCategoryVideos('2374')"> | |
Online Breakout Sessions | |
</ion-item> | |
<ion-item *ngFor="let category of categories" (click)="getSelectedCategoryVideos(category.id)"> | |
{{ category.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
if ( | |
( $_SERVER['HTTP_HOST'] == 'c3.live' ) | |
) { | |
$newurl = 'https://c3.ai/live/'; | |
header('HTTP/1.0 301 Moved Permanently'); | |
header("Location: $newurl"); | |
exit(); | |
} |
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
/** | |
* Removes any test urls from Yoast links. | |
* | |
* @param [type] $link | |
* @return void | |
*/ | |
function c3_fix_yoast_canonical_items( $link ) { | |
return str_replace( | |
array( | |
'c3dti.ai', |
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($) { | |
// Any generic functions can go here... | |
$(document).ready(function($){ | |
// Anything that needs to wait for the document to be ready goes here | |
}); |
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
/** | |
* Scrubs content for curly quotes | |
* @param string $content | |
* @return string | |
*/ | |
function prefix_scrub_smart_quotes_from_shortcodes( $content ){ | |
// Search for all smartquotes inside of shortcodes and replace them | |
$content = preg_replace('/(“|”)(?=[^\[]*\])/', '"', $content ); |
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
$('.cb-drawerfolio a').filter(function () { | |
return /\.(png|jpg|jpeg|gif)(\?.*)?$/i.test(this.href); | |
}).magnificPopup({ | |
closeBtnInside: false, | |
type: 'image', | |
gallery: { | |
enabled: 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
<?php | |
/** | |
* Hides the thirsty link buttons | |
*/ | |
function fsb_admin_hide_ta_mce_button(){ | |
if( get_post_type() == 'post' ){ | |
echo '<style>.mce-toolbar .mce-btn-group .mce-btn.ta-add-link-button + .mce-btn {display: none;}</style>'; | |
} | |
} | |
add_action( 'admin_head', 'fsb_admin_hide_ta_mce_button' ); |
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 | |
/** | |
* Grab the url of a publicly embeddable video hosted on vimeo | |
* @param str $video_url The "embed" url of a video | |
* @return str The url of the thumbnail, or false if there's an error | |
*/ | |
function grab_vimeo_thumbnail($vimeo_url){ | |
if( !$vimeo_url ) return false; | |
$data = json_decode( file_get_contents( 'http://vimeo.com/api/oembed.json?url=' . $vimeo_url ) ); |
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 | |
/** | |
* Deletes a batch (max 50) of S2 Members users | |
* @return int number of users deleted | |
*/ | |
public function delete_batch_of_expired_users(){ | |
$max_users = 50; | |
$args = array( |