This file contains hidden or 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($) { | |
$( ".website .sb_mod_acf_single_item" ).text(function () { | |
if ( ($(this).text().length >=5) && ($(this).text().substr(0, 5) != 'http:') && ($(this).text().substr(0, 5) != 'https') ) { | |
$(this).replaceWith( '<a href="http://' + $(this).text() + '" target="_blank">' + $(this).text() + '</a>' ); | |
} | |
else { | |
$(this).replaceWith( '<a href="' + $(this).text() + '" target="_blank">' + $(this).text() + '</a>' ); | |
} | |
}); | |
})(jQuery); |
This file contains hidden or 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 | |
/** SHORTCODE TO LIST ALL JOBS OF A USER | |
--- Job Manager shortcode to display a list of "Jobs" (Campaigns) based on the User ID that is set | |
--- Usage: [campaign-type author="3"] | |
------ ... You can add additional parameters to the shortcode to override settings if desired | |
--- Note: Used within the custom Snippet for Ultimate Member tabs. | |
*/ | |
add_shortcode( 'campaign-type', 'fs_job_type_shortcode' ); | |
function fs_job_type_shortcode( $atts ) { |
This file contains hidden or 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
set $bar 0; | |
set $becue 0; | |
if ( $request_uri ~* "wp-content/uploads/private" ) { | |
set $bar 1; | |
} | |
if ($http_cookie ~ "wordpress_logged_in") { | |
set $becue 1; | |
} | |
set $barbecue "$bar:$becue"; | |
if ($barbecue = "1:0") { |
This file contains hidden or 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($) { | |
// do this even when ajax updates content | |
function doStuff(){ | |
$("<span class='icr-item type_checkbox'></span>").insertAfter(".checkbox input"); | |
} | |
$(document).ready(doStuff); | |
$(document).ajaxComplete(doStuff); | |
// add target blank to anchor |
This file contains hidden or 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 | |
function fs_et_builder_post_types( $post_types ) { | |
// the identifier of the post type | |
$post_types[] = 'your-cpt'; | |
return $post_types; | |
} | |
add_filter( 'et_builder_post_types', 'fs_et_builder_post_types' ); | |
// the code to make the Divi Library work is this: |
This file contains hidden or 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
// courtesy: https://bernadot.com/divi-theme-how-to-open-toggled-modules-with-a-url-hashtag/ | |
(function($){ | |
// open Toggle module if URL in address bar has same hash | |
$(window).load(function(){ | |
var et_hash = window.location.hash; | |
if(window.location.hash) { | |
$( '.et_pb_toggle' + et_hash ) | |
.removeClass('et_pb_toggle_close') | |
.addClass('et_pb_toggle_open') | |
} |
This file contains hidden or 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://divibooster.com/use-default-mobile-menu-with-the-centered-inline-logo-header/ | |
(function($) { | |
function resize() { | |
$window = $(window); | |
$body = $('body'); | |
if ($window.width() < 981) { | |
$body.addClass('et_header_style_left'); | |
$body.removeClass('et_header_style_split'); | |
} else { | |
$body.removeClass('et_header_style_left'); |
This file contains hidden or 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_action( 'woocommerce_account_dashboard', 'my_dashboard_tickets' ); | |
function my_dashboard_tickets() { | |
$user_id = get_current_user_id(); | |
$ticket_options = array( | |
'post_type' => 'ticket', | |
'order' => 'DESC', | |
'orderby' => 'date', |
This file contains hidden or 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 | |
// Allow SVG through WordPress Media Uploader | |
function cc_mime_types($mimes) { | |
$mimes['svg'] = 'image/svg+xml'; | |
return $mimes; | |
} | |
add_filter('upload_mimes', 'cc_mime_types'); |
This file contains hidden or 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_shortcode( 'fs-product-special-features', 'fs_product_special_features_img_shortcode' ); | |
function fs_product_special_features_img_shortcode( $atts ) { | |
// begin output buffering | |
ob_start(); | |
// grab the terms of the product's attribute | |
$special_feature_terms = get_the_terms($post->ID, 'pa_special-features'); | |
//$count = count($special_feature_terms); |