installed plugin Easy Digital Downloads version 3.1.0.3

This commit is contained in:
2022-11-27 15:03:07 +00:00
committed by Gitium
parent 555673545b
commit c5dce2cec6
1200 changed files with 238970 additions and 0 deletions

View File

@ -0,0 +1,30 @@
<div class="edd-blocks__download-content">
<?php
if ( ! empty( $block_attributes['content'] ) ) {
if ( 'content' === $block_attributes['content'] ) {
the_content();
} else {
the_excerpt();
}
}
if ( $block_attributes['price'] ) :
?>
<div class="edd-blocks__download-price">
<?php
if ( edd_is_free_download( get_the_ID() ) ) {
printf(
'<span class="edd_price" id="edd_price_%s">%s</span>',
absint( get_the_ID() ),
esc_html__( 'Free', 'easy-digital-downloads' )
);
} elseif ( edd_has_variable_prices( get_the_ID() ) ) {
echo wp_kses_post( edd_price_range( get_the_ID() ) );
} else {
edd_price( get_the_ID(), true );
}
?>
</div>
<?php
endif;
?>
</div>

View File

@ -0,0 +1,35 @@
<?php
/**
* Displays the download terms block.
*
* @var array $block_attributes
* @var WP_Query $downloads
* @var array $classes
*/
?>
<div class="<?php echo esc_attr( implode( ' ', array_filter( $classes ) ) ); ?>">
<?php
while ( $downloads->have_posts() ) {
$downloads->the_post();
?>
<article class="edd-blocks__download">
<?php
if ( ! empty( $block_attributes['title'] ) || ! empty( $block_attributes['image_location'] ) ) {
include 'header.php';
}
if ( ! empty( $block_attributes['content'] ) || ! empty( $block_attributes['price'] ) ) {
include 'content.php';
}
if ( $block_attributes['purchase_link'] ) {
include 'footer.php';
}
?>
</article>
<?php
}
?>
</div>
<?php
if ( $block_attributes['pagination'] ) {
include 'pagination.php';
}

View File

@ -0,0 +1,10 @@
<footer class="edd-blocks__download-footer">
<?php
$args = array(
'download_id' => get_the_ID(),
'align' => $block_attributes['purchase_link_align'],
'show_price' => (bool) $block_attributes['show_price'],
);
echo EDD\Blocks\Downloads\buy_button( $args );
?>
</footer>

View File

@ -0,0 +1,14 @@
<header class="edd-blocks__download-header">
<?php
do_action( 'edd_blocks_downloads_before_entry_title', $block_attributes );
if ( $block_attributes['title'] ) {
printf(
'<h3><a href="%s">%s</a></h3>',
esc_url( get_the_permalink() ),
esc_html( get_the_title() )
);
}
do_action( 'edd_blocks_downloads_after_entry_title', $block_attributes );
?>
</header>

View File

@ -0,0 +1,27 @@
<?php if ( $block_attributes['image_link'] ) : ?>
<a
href="<?php echo esc_url( get_the_permalink() ); ?>"
class="edd-blocks__download-image-link"
<?php
if ( $block_attributes['title'] ) {
?>
aria-hidden="true"
tabindex="-1"
<?php
}
?>
>
<?php
endif;
the_post_thumbnail(
$block_attributes['image_size'],
array(
'class' => "align{$block_attributes['image_alignment']} edd-blocks__download-image",
'alt' => '',
)
);
if ( $block_attributes['image_link'] ) :
?>
</a>
<?php
endif;

View File

@ -0,0 +1,18 @@
<?php
$args = array(
'type' => 'download',
'format' => '?paged=%#%',
'current' => max( 1, $query_args['paged'] ),
'total' => $downloads->max_num_pages,
);
if ( is_single() ) {
$args['base'] = get_permalink() . '%#%';
} else {
$big = 999999;
$search_for = array( $big, '#038;' );
$replace_with = array( '%#%', '&' );
$args['base'] = str_replace( $search_for, $replace_with, get_pagenum_link( $big ) );
}
edd_pagination( $args );