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
/** | |
* Upsell notice for theme | |
*/ | |
( function( $ ) { | |
// Add Upgrade Message | |
if ('undefined' !== typeof prefixL10n) { | |
upsell = $('<a class="prefix-upsell-link"></a>') | |
.attr('href', prefixL10n.prefixURL) |
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 | |
/** | |
* Friendbuy conversion tracker | |
* | |
*/ | |
function friendbuy_conversion_tracker( $order_id ) { | |
// Lets grab the order | |
$order = new WC_Order( $order_id ); | |
?> | |
<script> |
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
/** | |
* Load alternate page on front page | |
*/ | |
function prefix_query_change( $query ) { | |
// Only filter the main query on the front-end | |
if ( is_admin() || ! $query->is_main_query() ) { | |
return; | |
} |
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 | |
/** | |
* Additional theme customizer options | |
* | |
* @param WP_Customize_Manager $wp_customize Theme Customizer object. | |
*/ | |
function prefix_customize_register( $wp_customize ) { | |
$wp_customize->add_setting( 'prefix[header_taglinecolor]', array( | |
'default' => '#222222', |
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
/** | |
* Output styles in the header | |
*/ | |
function prefix_inline_styles() { | |
$options = get_option( 'prefix', false ); | |
if ( ! $options ) { | |
return; | |
} |
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
/** | |
* Duplicate the sanitize_hex_color function, which is generally | |
* only available to the theme customizer. | |
*/ | |
if ( !function_exists( 'sanitize_hex_color' ) ) { | |
function sanitize_hex_color( $color ) { | |
if ( '' === $color ) | |
return ''; | |
// 3 or 6 hex digits, or the empty string. |
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
/** | |
* Enqueue theme scripts | |
*/ | |
function prefix_scripts() { | |
// FitVids Script conditionally enqueued from inc/extras.php | |
wp_register_script( | |
'prefix-fitvids', | |
get_template_directory_uri() . '/js/jquery.fitvids.min.js', | |
array( 'jquery' ), |
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_service_conversion_tracking( $order_id ) { | |
// Lets grab the order | |
$order = new WC_Order( $order_id ); | |
// Order ID | |
$order_id = $order->get_order_number(); | |
// Order total | |
$order_total = $order->get_total(); |
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_service_conversion_tracking( $order_id ) { | |
// Lets grab the order | |
$order = new WC_Order( $order_id ); | |
// Products | |
$products = $order->get_items(); | |
?> | |
<script> |