Skip to content

Commit

Permalink
chore: alter easy digital downloads hooks
Browse files Browse the repository at this point in the history
  • Loading branch information
UVLabs committed Oct 27, 2021
1 parent 3560166 commit b2d0426
Show file tree
Hide file tree
Showing 4 changed files with 34 additions and 43 deletions.
36 changes: 19 additions & 17 deletions archive-download.php
Original file line number Diff line number Diff line change
Expand Up @@ -48,14 +48,16 @@ function neve_edd_download_nav() {
<div id= "nv-edd-download-archive-container" class="<?php echo esc_attr( $container_class ); ?>">

<div id="wrapper">
<?php
/**
* Executes actions before the download content.
*
* @since 3.0.0
*/
do_action( 'neve_before_download_archive' );
?>
<div id="nv-edd-grid-container">
<?php
/**
* Executes actions before the post content.
*
* @since 3.0.0
*/
do_action( 'neve_before_download_archive' );

if ( have_posts() ) {

Expand All @@ -67,20 +69,20 @@ function neve_edd_download_nav() {
get_template_part( 'template-parts/content', 'none' );
}

/**
* Executes actions after the post content.
*
* @since 3.0.0
*/
do_action( 'neve_after_download_archive' );

?>
</div>
<?php
/**
* Download pagination
*/
neve_edd_download_nav();
/**
* Executes actions after the post content.
*
* @since 3.0.0
*/
do_action( 'neve_after_download_archive' );

/**
* Download pagination
*/
neve_edd_download_nav();
?>
</div>

Expand Down
21 changes: 0 additions & 21 deletions assets/js/src/edd/app.js

This file was deleted.

10 changes: 10 additions & 0 deletions globals/utilities.php
Original file line number Diff line number Diff line change
Expand Up @@ -133,6 +133,16 @@ function neve_hooks() {
);
}

$hooks['download-archive'] = array(
'neve_before_download_archive',
'neve_after_download_archive',
);

$hooks['single-download'] = array(
'neve_before_download_content',
'neve_after_download_content',
);

return apply_filters( 'neve_hooks_list', $hooks );
}

Expand Down
10 changes: 5 additions & 5 deletions single-download.php
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
* @package Neve
*/

$container_class = apply_filters( 'neve_container_class_filter', 'container', 'single-post' );
$container_class = apply_filters( 'neve_container_class_filter', 'container', 'single-download' );

get_header();

Expand All @@ -18,11 +18,11 @@
class="<?php echo esc_attr( join( ' ', get_post_class( 'nv-single-download-wrap col' ) ) ); ?>">
<?php
/**
* Executes actions before the post content.
* Executes actions before the download content.
*
* @since 3.0.0
*/
do_action( 'neve_before_post_content' );
do_action( 'neve_before_download_content' );

if ( have_posts() ) {
while ( have_posts() ) {
Expand All @@ -34,11 +34,11 @@ class="<?php echo esc_attr( join( ' ', get_post_class( 'nv-single-download-wrap
}

/**
* Executes actions after the post content.
* Executes actions after the download content.
*
* @since 3.0.0
*/
do_action( 'neve_after_post_content' );
do_action( 'neve_after_download_content' );
?>
</article>
<?php do_action( 'neve_do_sidebar', 'single-post', 'right' ); ?>
Expand Down

0 comments on commit b2d0426

Please sign in to comment.