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 | |
/** | |
* PayPal Standard Gateway | |
* | |
* @package Easy Digital Downloads | |
* @subpackage PayPal Standard Gateway | |
* @copyright Copyright (c) 2012, Pippin Williamson | |
* @license http://opensource.org/licenses/gpl-2.0.php GNU Public License | |
* @since 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
<?php | |
function pw_edd_global_labels($labels) { | |
$labels = array( | |
'singular' => __('Singular Label','edd'), | |
'plural' => __('Plural Label','edd') | |
); | |
return $labels; | |
} | |
add_filter('edd_default_downloads_name', 'pw_edd_global_labels'); |
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 pw_edd_discount_label( $translated_text, $text, $domain ) { | |
switch( $translated_text ) { | |
case 'Enter discount': | |
$translated_text = 'Enter Discount Code Here'; | |
break; | |
} | |
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 pw_edd_add_email_confirmation() { | |
?> | |
<p> | |
<label class="edd-label" for="edd-email-confirm"> | |
<?php _e('Confirm Your Email Address', 'easy-digital-downloads'); ?> | |
<span class="edd-required-indicator">*</span> | |
</label> | |
<span class="edd-description" id="edd-email-description"><?php esc_html_e( 'Please confirm your email address.', 'easy-digital-downloads' ); ?></span> |
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 to display only upcoming events for Sugar Events Calendar on the main Events archive. | |
function sc_filter_events( $query ) { | |
if( is_post_type_archive('sc_event') && (!is_admin()) ) { | |
$meta = array( | |
array( | |
'key' => 'sc_event_date_time', | |
'value' => time(), |
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 pippin_edd_extra_statuses( $statuses ) { | |
$statues['your_status_id'] => 'Your Status Label'; | |
$statues['your_second_status_id'] => 'Your Second Status Label'; | |
return $statuses | |
} | |
add_filter('edd_payment_statuses', 'pippin_edd_extra_statuses'); |
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 tumble_menu( $args = array() ) { | |
/* Default arguments */ | |
$defaults = array( | |
'container' => 'ul', | |
'menu_class' => 'nav', | |
'menu_id' => 'top_nav', | |
'theme_location' => 'top-menu', | |
'echo' => false, | |
'before' => '', |
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 edd_remove_list_indention( $email_body ) { | |
$email_body = str_replace('<ul>', '<ul style="margin:0 0 10px;padding:0;">', $email_body); | |
$email_body = str_replace('<li>', '<li style="margin:0 0 8px;padding:0;">', $email_body); | |
return $email_body; | |
} | |
add_filter('edd_purchase_receipt_default', 'edd_remove_list_indention'); |
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 ecpt_include_post_types_in_search($query) { | |
if( $query->is_main_query() && is_search() && $query->query_vars['post_type'] != 'nav_menu_item' ) { | |
$post_types = get_post_types(array('exclude_from_search' => false), 'objects'); | |
$searchable_types = array(); | |
if($post_types) { | |
foreach( $post_types as $type) { | |
$searchable_types[] = $type->name; | |
} |
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
/** | |
* Retrieve current sidebar ID for a location. | |
* | |
* @since 2.0.0 | |
* | |
* @param string $location the location for the sidebar | |
* @return string $id the id of the sidebar that should be shown | |
*/ | |
if( ! function_exists( 'themeblvd_get_sidebar_id' ) ) { |