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
/** | |
* Open a preview e-mail. | |
* | |
* @return null | |
*/ | |
function previewEmail() { | |
if (is_admin()) { | |
$default_path = WC()->plugin_path() . '/templates/'; |
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($) { | |
$(function() { | |
// Lightbox | |
$("a.zoom").prettyPhoto({ | |
hook: 'data-rel', | |
social_tools: false, | |
theme: 'pp_woocommerce', | |
horizontal_padding: 20, | |
opacity: 0.8, |
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
/*------------------------------------*\ | |
@CSSWIZARDRY-GRIDS | |
\*------------------------------------*/ | |
/** | |
* CONTENTS | |
* VARIABLES............Your settings. | |
* GRID SETUP...........Build the grid structure. | |
* WIDTHS...............Build our responsive widths around our breakpoints. | |
*/ |
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
include_once(ABSPATH . 'wp-content/plugins/woocommerce/includes/admin/reports/class-wc-admin-report.php'); | |
$report = new WC_Admin_Report(); | |
$start_date = get_field('campaign_start_date', $campaign->ID); | |
$end_date = get_field('campaign_end_date', $campaign->ID); | |
$report->start_date = strtotime($start_date); | |
$report->end_date = strtotime($end_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
@lap-start: 481px; | |
@desk-start: 1024px; | |
@palm-end: @lap-start - 1px; | |
@lap-end: @desk-start - 1px; |
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 cv_twitter_get( $method='', $args=array() ){ | |
$implode_args = implode('_', $args); | |
$sani_method = sanitize_title_with_dashes( $method ); | |
$sani_args = sanitize_title_with_dashes( $implode_args ); | |
$transient = $sani_method . '_' . $sani_args; | |
// avoid rate limiting |
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
/** | |
* On the fly image cropping based on WP 3.5 image editor | |
* | |
* @param int $id | |
* @param int $width | |
* @param int $height | |
* @param boolean $crop | |
* | |
* @return string | |
*/ |
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
add_action( 'wp_ajax_tt_action', 'tt_action_callback' ); | |
add_action( 'wp_ajax_nopriv_tt_action', 'tt_action_callback' ); | |
function tt_action_callback() { | |
$args = $_POST['query_args']; | |
$args['posts_per_page'] = 10; | |
$args['post_status'] = 'publish'; | |
$args['suppress_filters'] = true; | |
$args['cache_results'] = false; |
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
/** | |
* Add theme support for infinite scroll. | |
* | |
* @uses add_theme_support | |
* @return void | |
*/ | |
function gh_infinite_scroll_init() { | |
add_theme_support( 'infinite-scroll', array( | |
'container' => 'isoblock', |
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( '_s_posted_on' ) ) : | |
/** | |
* Prints HTML with meta information for the current post-date/time and author. | |
*/ | |
function _s_posted_on() { | |
$time_string = '<time class="entry-date published updated" datetime="%1$s">%2$s</time>'; | |
if ( get_the_time( 'U' ) !== get_the_modified_time( 'U' ) ) { | |
$time_string = '<time class="entry-date published" datetime="%1$s">%2$s</time><time class="updated" datetime="%3$s">%4$s</time>'; | |
} |