Skip to content

Commit

Permalink
Merge pull request #256 from easydigitaldownloads/release/1.0.8
Browse files Browse the repository at this point in the history
Release/1.0.8
  • Loading branch information
ashleyfae authored Sep 23, 2021
2 parents ab0ee5f + 00e3bc8 commit 11bf8e5
Show file tree
Hide file tree
Showing 8 changed files with 154 additions and 162 deletions.
2 changes: 1 addition & 1 deletion functions.php
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
* @since 1.0.0
*/
if ( ! defined( 'THEMEDD_VERSION' ) ) {
define( 'THEMEDD_VERSION', '1.0.7' );
define( 'THEMEDD_VERSION', '1.0.8' );
}

if ( ! defined( 'THEMEDD_AUTHOR' ) ) {
Expand Down
3 changes: 1 addition & 2 deletions includes/compatibility/edd/class-cross-sell-upsell.php
Original file line number Diff line number Diff line change
Expand Up @@ -61,9 +61,8 @@ public function html( $html, $downloads, $heading, $columns, $class_list ) {
<?php
$i = 1;
while ( $downloads->have_posts() ) : $downloads->the_post(); ?>
<?php $schema = edd_add_schema_microdata() ? 'itemscope itemtype="http://schema.org/Product" ' : ''; ?>

<div <?php echo $schema; ?>class="<?php echo apply_filters( 'edd_download_class', 'edd_download', get_the_ID(), '', $i ); ?>" id="edd_download_<?php echo get_the_ID(); ?>">
<div class="<?php echo apply_filters( 'edd_download_class', 'edd_download', get_the_ID(), '', $i ); ?>" id="edd_download_<?php echo get_the_ID(); ?>">
<div class="edd_download_inner">

<?php
Expand Down
43 changes: 28 additions & 15 deletions includes/compatibility/edd/filters.php
Original file line number Diff line number Diff line change
Expand Up @@ -30,11 +30,24 @@ function themedd_edd_settings_styles( $settings ) {
unset( $settings['main']['disable_styles'] );

// Remove "Default Button Color" option since Themedd controls all button styling
unset( $settings['button_text']['checkout_color'] );
unset( $settings['main']['checkout_color'] );

// Remove the button style selector.
unset( $settings['button_text']['button_style'] );

return $settings;
}
add_filter( 'edd_settings_styles', 'themedd_edd_settings_styles' );
add_filter( 'edd_settings_misc', 'themedd_edd_settings_styles' );

/**
* For EDD 2.x, use the `edd_settings_styles` filter to remove style settings.
*
* @return void
*/
if ( ! function_exists( 'edd_get_orders' ) ) {
add_filter( 'edd_settings_styles', 'themedd_edd_settings_styles' );
}

/**
* Filter the purchase link defaults
Expand All @@ -61,24 +74,24 @@ function themedd_edd_purchase_link_defaults( $defaults ) {
*
* @since 1.0.0 Filtered the price
* @since 1.0.3 Filtered other attributes
*
*
* @param array $out The output array of shortcode attributes.
* @param array $pairs The supported attributes and their defaults.
* @param array $atts The user defined shortcode attributes.
* @param string $shortcode The shortcode name.
*
*
* @return array $out The output array of shortcode attributes.
*/
function themedd_edd_shortcode_atts_downloads( $out, $pairs, $atts, $shortcode ) {

/**
* Get the download grid options.
*/
$download_grid_options = themedd_edd_download_grid_options( $out );

/**
* Filter the pagination.
*
*
* @since 1.0.3
*/
if ( false === $download_grid_options['pagination'] ) {
Expand All @@ -89,28 +102,28 @@ function themedd_edd_shortcode_atts_downloads( $out, $pairs, $atts, $shortcode )

/**
* Sets the number of download columns shown.
*
*
* @since 1.0.3
*/
$out['columns'] = $download_grid_options['columns'];

/**
* Sets the number of downloads shown.
*
*
* @since 1.0.3
*/
$out['number'] = $download_grid_options['number'];

/**
* Sets the "order".
*
*
* @since 1.0.3
*/
$out['order'] = $download_grid_options['order'];

/**
* Sets the "orderby"
*
*
* @since 1.0.3
*/
$out['orderby'] = $download_grid_options['orderby'];
Expand All @@ -123,7 +136,7 @@ function themedd_edd_shortcode_atts_downloads( $out, $pairs, $atts, $shortcode )
if ( ! isset( $atts['price'] ) && false !== $download_grid_options['price'] ) {
$out['price'] = 'yes';
}

return $out;

}
Expand Down Expand Up @@ -209,7 +222,7 @@ function themedd_edd_download_class( $class, $download_id, $atts, $i ) {
case 'after':
$classes[] = 'eddDownloadMeta-after';
break;

}

// Implode the $classes array and return it as a string.
Expand Down Expand Up @@ -274,7 +287,7 @@ function themedd_edd_downloads_shortcode( $display, $atts, $buy_button, $columns
}

do_action( 'edd_download_before_title' );

if ( true === $download_grid_options['title'] ) {
edd_get_template_part( 'shortcode', 'content-title' );
}
Expand All @@ -284,12 +297,12 @@ function themedd_edd_downloads_shortcode( $display, $atts, $buy_button, $columns
if ( true === $download_grid_options['excerpt'] && true !== $download_grid_options['full_content'] ) {
// Show the excerpt.
edd_get_template_part( 'shortcode', 'content-excerpt' );

do_action( 'edd_download_after_content' );
} elseif ( true === $download_grid_options['full_content'] ) {
// Show the full content.
edd_get_template_part( 'shortcode', 'content-full' );

do_action( 'edd_download_after_content' );
}

Expand Down Expand Up @@ -362,4 +375,4 @@ function themedd_edd_downloads_shortcode( $display, $atts, $buy_button, $columns
function themedd_edd_schema_microdata( $ret ) {
return false;
}
add_filter( 'edd_add_schema_microdata', 'themedd_edd_schema_microdata', 10, 1 );
add_filter( 'edd_add_schema_microdata', 'themedd_edd_schema_microdata', 10, 1 );
2 changes: 2 additions & 0 deletions includes/footer.php
Original file line number Diff line number Diff line change
Expand Up @@ -107,6 +107,8 @@ function themedd_footer_widget_column_classes( $widget_columns ) {
case 1:
$classes = 'col-xs-12 col-sm-6';
break;
default:
$classes = '';

}

Expand Down
Loading

0 comments on commit 11bf8e5

Please sign in to comment.