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,12 @@
<div class="edd-blocks-cart__row edd-blocks-cart__row-footer edd_cart_footer_row edd_cart_discount_row"
<?php
if ( ! edd_cart_has_discounts() ) {
echo ' style="display:none;"';}
?>
>
<?php do_action( 'edd_checkout_table_discount_first' ); ?>
<div class="edd_cart_discount">
<?php edd_cart_discounts_html(); ?>
</div>
<?php do_action( 'edd_checkout_table_discount_last' ); ?>
</div>

View File

@ -0,0 +1,24 @@
<?php foreach ( edd_get_cart_fees() as $fee_id => $fee ) : ?>
<div class="edd-blocks-cart__row edd-blocks-cart__row-footer edd_cart_fee" id="edd_cart_fee_<?php echo esc_attr( $fee_id ); ?>">
<?php do_action( 'edd_cart_fee_rows_before', $fee_id, $fee ); ?>
<div class="edd_cart_fee_label"><?php echo esc_html( $fee['label'] ); ?></div>
<div class="edd_cart_fee_amount">
<?php echo esc_html( edd_currency_filter( edd_format_amount( $fee['amount'] ) ) ); ?>
<?php if ( ! empty( $fee['type'] ) && 'item' === $fee['type'] ) : ?>
<div class="edd_cart_actions">
<a
class="edd-blocks-cart__action-remove"
href="<?php echo esc_url( edd_remove_cart_fee_url( $fee_id ) ); ?>"
>
<span class="screen-reader-text"><?php esc_html_e( 'Remove', 'easy-digital-downloads' ); ?></span>
</a>
</div>
<?php endif; ?>
</div>
<?php do_action( 'edd_cart_fee_rows_after', $fee_id, $fee ); ?>
</div>
<?php endforeach;

View File

@ -0,0 +1,9 @@
<?php
$classes = array( 'edd-blocks-cart__row', 'edd-blocks-cart__row-footer', 'edd-blocks-cart__row-buttons', 'edd_cart_footer_row' );
if ( edd_is_cart_saving_disabled() ) {
$classes[] = 'edd-no-js';
}
?>
<div class="<?php echo esc_attr( implode( ' ', $classes ) ); ?>">
<?php do_action( 'edd_cart_footer_buttons' ); ?>
</div>

View File

@ -0,0 +1,59 @@
<div class="edd-blocks-cart__row edd-blocks-cart__row-item edd_cart_item" id="edd_cart_item_<?php echo esc_attr( $key ) . '_' . esc_attr( $item['id'] ); ?>" data-download-id="<?php echo esc_attr( $item['id'] ); ?>">
<div class="edd_cart_item_name">
<div class="edd_checkout_cart_item_title">
<?php
if ( has_post_thumbnail( $item['id'] ) ) {
echo '<div class="edd_cart_item_image">';
echo get_the_post_thumbnail( $item['id'], apply_filters( 'edd_checkout_image_size', array( 25, 25 ) ) );
echo '</div>';
}
echo esc_html( edd_get_cart_item_name( $item ) );
echo '</div>';
/**
* Runs after the item in cart's title is echoed
* @since 2.6
*
* @param array $item Cart Item
* @param int $key Cart key
*/
do_action( 'edd_checkout_cart_item_title_after', $item, $key );
if ( $is_checkout_block && edd_item_quantities_enabled() && ! edd_download_quantities_disabled( $item['id'] ) ) :
?>
<div class="edd_cart_actions">
<label for="edd-cart-download-<?php echo esc_attr( $key ); ?>-quantity"><?php esc_html_e( 'Quantity:', 'easy-digital-downloads' ); ?></label>
<input type="number" min="1" step="1" name="edd-cart-download-<?php echo esc_attr( $key ); ?>-quantity" id="edd-cart-download-<?php echo esc_attr( $key ); ?>-quantity" data-key="<?php echo esc_attr( $key ); ?>" class="edd-input edd-item-quantity" value="<?php echo esc_attr( edd_get_cart_item_quantity( $item['id'], $item['options'] ) ); ?>"/>
<input type="hidden" name="edd-cart-downloads[]" value="<?php echo esc_attr( $item['id'] ); ?>"/>
<input type="hidden" name="edd-cart-download-<?php echo esc_attr( $key ); ?>-options" value="<?php echo esc_attr( json_encode( $item['options'] ) ); ?>"/>
</div>
<?php
endif;
?>
</div>
<div class="edd_cart_item_price">
<?php
echo wp_kses_post( edd_cart_item_price( $item['id'], $item['options'] ) );
do_action( 'edd_checkout_cart_item_price_after', $item );
$remove_url = edd_remove_item_url( $key );
$button_class = 'edd-remove-from-cart';
if ( empty( $is_cart_widget ) ) {
$remove_url = wp_nonce_url( $remove_url, 'edd-remove-from-cart-' . sanitize_key( $key ), 'edd_remove_from_cart_nonce' );
$button_class = 'edd_cart_remove_item_btn';
}
?>
<div class="edd_cart_actions">
<?php do_action( 'edd_cart_actions', $item, $key ); ?>
<a
class="edd-blocks-cart__action-remove <?php echo esc_attr( $button_class ); ?>"
href="<?php echo esc_url( $remove_url ); ?>"
<?php if ( ! empty( $is_cart_widget ) ) : ?>
data-nonce="<?php echo esc_attr( wp_create_nonce( 'edd-remove-cart-widget-item' ) ); ?>"
data-cart-item="<?php echo absint( $key ); ?>"
data-download-id="<?php echo absint( $item['id'] ); ?>"
data-action="edd_remove_from_cart"
<?php endif; ?>
>
<span class="screen-reader-text"><?php esc_html_e( 'Remove', 'easy-digital-downloads' ); ?></span>
</a>
</div>
</div>
</div>

View File

@ -0,0 +1,13 @@
<div class="edd-blocks-cart__row edd-blocks-cart__row-footer edd_cart_footer_row edd_cart_subtotal_row"
<?php
if ( ! edd_is_cart_taxed() ) {
echo ' style="display:none;"';
}
?>
>
<?php do_action( 'edd_checkout_table_subtotal_first' ); ?>
<div class="edd_cart_subtotal">
<?php esc_html_e( 'Subtotal', 'easy-digital-downloads' ); ?>:&nbsp;<span class="edd_cart_subtotal_amount"><?php echo edd_cart_subtotal(); // Escaped ?></span>
</div>
<?php do_action( 'edd_checkout_table_subtotal_last' ); ?>
</div>

View File

@ -0,0 +1,12 @@
<div class="edd-blocks-cart__row edd-blocks-cart__row-footer edd_cart_footer_row edd_cart_tax_row"
<?php
if ( ! edd_is_cart_taxed() ) {
echo ' style="display:none;"';}
?>
>
<?php do_action( 'edd_checkout_table_tax_first' ); ?>
<div class="edd_cart_tax">
<?php esc_html_e( 'Tax', 'easy-digital-downloads' ); ?>:&nbsp;<span class="edd_cart_tax_amount" data-tax="<?php echo esc_attr( edd_get_cart_tax() ); ?>"><?php edd_cart_tax( true ); // Escaped ?></span>
</div>
<?php do_action( 'edd_checkout_table_tax_last' ); ?>
</div>

View File

@ -0,0 +1,10 @@
<div class="edd-blocks-cart__row edd-blocks-cart__row-footer edd_cart_footer_row">
<?php
if ( $is_checkout_block ) {
include EDD_BLOCKS_DIR . 'views/checkout/discount.php';
}
?>
<div class="edd_cart_total">
<?php esc_html_e( 'Total', 'easy-digital-downloads' ); ?>: <span class="edd_cart_amount" data-subtotal="<?php echo esc_attr( edd_get_cart_subtotal() ); ?>" data-total="<?php echo esc_attr( edd_get_cart_total() ); ?>"><?php edd_cart_total(); // Escaped ?></span>
</div>
</div>

View File

@ -0,0 +1,52 @@
<form id="edd_checkout_cart_form" class="edd-blocks-form edd-blocks-form__cart" method="post">
<?php
$cart_classes = array(
'edd-blocks-cart',
'ajaxed',
);
$is_checkout_block = empty( $is_cart_widget ) && ( edd_is_checkout() || edd_doing_ajax() );
?>
<div id="edd_checkout_cart" class="<?php echo esc_attr( implode( ' ', $cart_classes ) ); ?>">
<?php if ( edd_is_checkout() ) : ?>
<div class="edd-blocks-cart__row edd-blocks-cart__row-header edd_cart_header_row">
<div class="edd_cart_item_name"><?php esc_html_e( 'Item Name', 'easy-digital-downloads' ); ?></div>
<div class="edd_cart_item_price"><?php esc_html_e( 'Item Price', 'easy-digital-downloads' ); ?></div>
</div>
<?php
endif;
do_action( 'edd_cart_items_before' );
if ( $cart_items ) {
?>
<div class="edd-blocks-cart__items">
<?php
foreach ( $cart_items as $key => $item ) {
include 'cart-item.php';
}
?>
</div>
<?php
}
do_action( 'edd_cart_items_middle' );
if ( edd_cart_has_fees() ) {
include 'cart-fees.php';
}
do_action( 'edd_cart_items_after' );
if ( edd_use_taxes() && ! edd_prices_include_tax() ) {
include 'cart-subtotal.php';
}
require 'cart-discounts.php';
if ( edd_use_taxes() ) {
include 'cart-taxes.php';
}
require 'cart-total.php';
if ( has_action( 'edd_cart_footer_buttons' ) ) {
include 'cart-footer-row.php';
}
?>
</div>
</form>

View File

@ -0,0 +1,22 @@
<?php
if ( ! empty( $block_attributes['link'] ) && ! edd_is_checkout() ) {
?>
<a href="<?php echo esc_url( edd_get_checkout_uri() ); ?>">
<?php
}
require EDD_BLOCKS_DIR . 'assets/images/cart.svg';
$output = array();
if ( ! empty( $block_attributes['show_quantity'] ) ) {
$output[] = '<span class="edd-blocks-cart__mini-quantity">' . \EDD\Blocks\Checkout\Functions\get_quantity_string() . '</span>';
}
if ( ! empty( $block_attributes['show_total'] ) ) {
$output[] = '<span class="edd-blocks-cart__mini-total">' . edd_currency_filter( edd_format_amount( edd_get_cart_total() ) ) . '</span>';
}
if ( ! empty( $output ) ) {
echo wp_kses_post( implode( ' - ', $output ) );
}
if ( ! empty( $block_attributes['link'] ) && ! edd_is_checkout() ) {
?>
</a>
<?php
}