first commit

This commit is contained in:
DESKTOP-GBA0BK8\Admin
2023-04-08 12:19:53 -04:00
commit 7c8c8b1c76
4586 changed files with 2050693 additions and 0 deletions
@@ -0,0 +1,101 @@
<?php
/**
* Template for displaying archive layout for easy digital downloads
*
* @package OceanWP WordPress theme
*/
global $post;
do_action( 'ocean_before_archive_download_item' );
?>
<div <?php post_class(); ?>>
<div class="edd_download_inner">
<?php
// Get elements.
$elements = oceanwp_edd_archive_elements_positioning();
// Loop through elements.
foreach ( $elements as $element ) {
// Image.
if ( 'image' === $element ) {
do_action( 'ocean_before_archive_download_image' );
edd_get_template_part( 'shortcode', 'content-image' );
do_action( 'ocean_after_archive_download_image' );
}
// Category.
if ( 'category' === $element ) {
do_action( 'ocean_before_archive_download_categories' );
echo '<div class="edd_download_categories">';
echo oceanwp_edd_terms_list( 'download_category' ); // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped
echo '</div>';
do_action( 'ocean_after_archive_download_categories' );
}
// Title.
if ( 'title' === $element ) {
do_action( 'ocean_before_archive_download_title' );
edd_get_template_part( 'shortcode', 'content-title' );
do_action( 'ocean_after_archive_download_title' );
}
// Price.
if ( 'price' === $element ) {
do_action( 'ocean_before_archive_download_price' );
edd_get_template_part( 'shortcode', 'content-price' );
do_action( 'ocean_before_archive_download_price' );
}
// Description.
if ( 'description' === $element ) {
do_action( 'ocean_before_archive_download_description' );
edd_get_template_part( 'shortcode', 'content-excerpt' );
do_action( 'ocean_after_archive_download_description' );
}
// Add to cart button.
if ( 'button' === $element ) {
do_action( 'ocean_before_archive_download_add_to_cart' );
echo oceanwp_edd_add_to_cart_link(); // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped
do_action( 'ocean_after_archive_download_add_to_cart' );
}
}
?>
</div>
</div>
<?php
do_action( 'ocean_after_archive_download_item' );
@@ -0,0 +1,3 @@
<div class="edd_download_buy_button">
<?php echo oceanwp_edd_add_to_cart_link(); // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped ?>
</div>
@@ -0,0 +1,11 @@
<?php $excerpt_length = get_theme_mod( 'ocean_edd_archive_excerpt_length', 5 ) ?>
<?php $item_prop = edd_add_schema_microdata() ? ' itemprop="description"' : ''; ?>
<?php if ( has_excerpt() ) : ?>
<div<?php echo $item_prop; ?> class="edd_download_excerpt">
<?php echo apply_filters( 'edd_downloads_excerpt', wp_trim_words( get_post_field( 'post_excerpt', get_the_ID() ), $excerpt_length ) ); // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped ?>
</div>
<?php elseif ( get_the_content() ) : ?>
<div<?php echo $item_prop; ?> class="edd_download_excerpt">
<?php echo apply_filters( 'edd_downloads_excerpt', wp_trim_words( get_post_field( 'post_content', get_the_ID() ), $excerpt_length ) ); // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped ?>
</div>
<?php endif; ?>
@@ -0,0 +1,41 @@
<div class="edd_download_image">
<a href="<?php the_permalink(); ?>">
<?php
if ( function_exists( 'has_post_thumbnail' ) && has_post_thumbnail( get_the_ID() ) ) :
?>
<?php
$img_width = get_theme_mod( 'ocean_edd_archive_image_width', 450 );
$img_height = get_theme_mod( 'ocean_edd_archive_image_height', 450 );
// Images attr.
$img_id = get_post_thumbnail_id( get_the_ID(), 'full' );
$img_url = wp_get_attachment_image_src( $img_id, 'full', true );
if ( OCEAN_EXTRA_ACTIVE
&& function_exists( 'ocean_extra_image_attributes' ) ) {
$img_atts = ocean_extra_image_attributes( $img_url[1], $img_url[2], $img_width, $img_height );
}
if ( OCEAN_EXTRA_ACTIVE
&& function_exists( 'ocean_extra_resize' )
&& ! empty( $img_atts ) ) {
?>
<img src="<?php echo ocean_extra_resize( $img_url[0], $img_atts['width'], $img_atts['height'], $img_atts['crop'], true, $img_atts['upscale'] ); // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped ?>" alt="<?php the_title_attribute(); ?>" width="<?php echo esc_attr( $img_width ); ?>" height="<?php echo esc_attr( $img_height ); ?>"<?php oceanwp_schema_markup( 'image' ); ?> />
<?php
} else {
// Display post thumbnail.
the_post_thumbnail( 'full' );
}
?>
<?php
else :
echo '<img src="' . get_template_directory_uri() . '/assets/img/placeholder.png">'; // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped
endif;
?>
</a>
</div>
@@ -0,0 +1,12 @@
<?php $item_props = edd_add_schema_microdata() ? ' itemprop="offers" itemscope itemtype="http://schema.org/Offer"' : ''; ?>
<div<?php echo $item_props; ?>>
<div itemprop="price" class="edd_price">
<?php
if ( ! edd_has_variable_prices( get_the_ID() ) ) :
edd_price( get_the_ID() );
else :
echo edd_price_range( get_the_ID() ); // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped
endif;
?>
</div>
</div>
@@ -0,0 +1,75 @@
<?php
/**
* Template for displaying single layout for easy digital downloads
*
* @package OceanWP WordPress theme
*/
global $post;
do_action( 'ocean_before_single_download_item' ); ?>
<div <?php post_class(); ?>>
<div class="edd_download_inner">
<h2 class="edd_download_title">
<?php the_title(); ?>
</h2>
<?php
if ( function_exists( 'has_post_thumbnail' ) && has_post_thumbnail( get_the_ID() ) ) :
?>
<div class="edd_download_image">
<?php do_action( 'ocean_before_single_download_image' ); ?>
<?php echo get_the_post_thumbnail( get_the_ID(), 'full' ); ?>
<?php do_action( 'ocean_after_single_download_image' ); ?>
</div>
<?php endif; ?>
<div class="edd_download_content">
<?php do_action( 'ocean_before_single_download_content' ); ?>
<?php the_content(); ?>
<?php do_action( 'ocean_after_single_download_content' ); ?>
</div>
<?php
if ( get_theme_mod( 'ocean_edd_display_navigation', true ) ) :
?>
<div class="edd_download_navigation">
<?php
// Term.
$term_tax = get_theme_mod( 'ocean_edd_next_prev_taxonomy', 'download_tag' );
$term_tax = $term_tax ? $term_tax : 'download_tag';
// Args.
$args = array(
'prev_text' => '<span class="title"><i class="fa fa-long-arrow-left" aria-hidden="true"></i>' . esc_html__( 'Previous', 'oceanwp' ) . '</span><span class="post-title">%title</span>',
'next_text' => '<span class="title"><i class="fa fa-long-arrow-right" aria-hidden="true"></i>' . esc_html__( 'Next', 'oceanwp' ) . '</span><span class="post-title">%title</span>',
'in_same_term' => true,
'taxonomy' => $term_tax,
'screen_reader_text' => esc_html__( 'Continue Reading', 'oceanwp' ),
);
// Args.
$args = apply_filters( 'ocean_single_post_next_prev_args', $args );
?>
<?php do_action( 'ocean_before_single_post_next_prev' ); ?>
<?php the_post_navigation( $args ); ?>
<?php do_action( 'ocean_after_single_post_next_prev' ); ?>
</div>
<?php endif; ?>
</div>
</div>
<?php
do_action( 'ocean_after_single_download_item' ); ?>