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 ct_paging_nav() { | |
// Don't print empty markup if there's only one page. | |
if ( $GLOBALS['wp_query']->max_num_pages < 2 ) { | |
return; | |
} | |
$paged = get_query_var( 'paged' ) ? intval( get_query_var( 'paged' ) ) : 1; | |
$pagenum_link = html_entity_decode( get_pagenum_link() ); | |
$query_args = array(); |
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 upload_table($table_id, $csv_file_name) { | |
$accessToken = $_SESSION['accessToken']; | |
// /hubdb/api/v1/tables/:tableId/import | |
$url = "https://api.hubapi.com/hubdb/api/v1/tables/$table_id/import"; | |
$postBody = [ | |
"file" => "@$csv_file_name;type=text/csv", | |
"config" => [ | |
"resetTable" => true, | |
"skipRows" => 1, | |
"format" => 'csv', |
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 | |
if(!function_exists('wc_get_products')) { | |
return; | |
} | |
$paged = (get_query_var('paged')) ? absint(get_query_var('paged')) : 1; | |
$ordering = WC()->query->get_catalog_ordering_args(); | |
$ordering['orderby'] = array_shift(explode(' ', $ordering['orderby'])); | |
$ordering['orderby'] = stristr($ordering['orderby'], 'price') ? 'meta_value_num' : $ordering['orderby']; |
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
<div class="footer-social-icons"> | |
<h4 class="_14">Follow us on</h4> | |
<ul class="social-icons"> | |
<li><a href="" class="social-icon"> <i class="fa fa-facebook"></i></a></li> | |
<li><a href="" class="social-icon"> <i class="fa fa-twitter"></i></a></li> | |
<li><a href="" class="social-icon"> <i class="fa fa-rss"></i></a></li> | |
<li><a href="" class="social-icon"> <i class="fa fa-youtube"></i></a></li> | |
<li><a href="" class="social-icon"> <i class="fa fa-linkedin"></i></a></li> | |
<li><a href="" class="social-icon"> <i class="fa fa-google-plus"></i></a></li> | |
</ul> |
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_filter( 'evr_divi_popup-js_data', 'my_divi_popup_options' ); | |
function my_divi_popup_options( $config ) { | |
// -- Modify UI of popups -- | |
/** | |
* The base z-index. This z-index is used for the overlay, every | |
* popup has a z-index increased by 1: |
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
// see SeaGrass | |
if ($(".slideshow-full-container").length > 0) { | |
// https://github.com/kenwheeler/slick/issues/1403#issuecomment-282066130 | |
// Test for slide length, if one, hide navigation dots | |
// the event needs to be run before slick is initialized | |
$('.slideshow-full-container').on('init', function (event, slick, direction) { | |
// console.log($('#full_page_slideshow .slick-slide').length); |
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 | |
/** | |
* @param int $post_id The ID of the post. | |
* @param WP_Post $post The post object. | |
* @param bool $update True if the post already exists and is being updated | |
*/ | |
function wpse_post_ping( $post_id, $post, $update ) { | |
if ( $post->post_status === 'publish' ) { // Only fire when published | |
wp_remote_post( |
OlderNewer