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
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
/*! | |
* Script for initializing globally-used functions and libs. | |
* | |
* @since 1.0.0 | |
*/ | |
(function($) { | |
var gather = { | |
// Cache selectors |
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
$wp_customize->add_setting( 'example-control', array() ); | |
$wp_customize->add_control( new Prefix_Custom_Content( $wp_customize, 'example-control', array( | |
'section' => 'title_tagline', | |
'priority' => 20, | |
'label' => __( 'Example Control', 'govpress' ), | |
'content' => __( 'Content to output. Use <a href="#">HTML</a> if you like.', 'textdomain' ) . '</p>', | |
'description' => __( 'Optional: Example Description.', 'textdomain' ), | |
) ) ); |
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 | |
/** | |
* Allows customer to log in using e-mail address | |
* | |
* @param string username | |
*/ | |
function prefix_authenticate_by_email( &$username ) { | |
error_log( $username ); |