Skip to content

Commit b2d0426

Browse files
committed
chore: alter easy digital downloads hooks
1 parent 3560166 commit b2d0426

File tree

4 files changed

+34
-43
lines changed

4 files changed

+34
-43
lines changed

archive-download.php

Lines changed: 19 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -48,14 +48,16 @@ function neve_edd_download_nav() {
4848
<div id= "nv-edd-download-archive-container" class="<?php echo esc_attr( $container_class ); ?>">
4949

5050
<div id="wrapper">
51+
<?php
52+
/**
53+
* Executes actions before the download content.
54+
*
55+
* @since 3.0.0
56+
*/
57+
do_action( 'neve_before_download_archive' );
58+
?>
5159
<div id="nv-edd-grid-container">
5260
<?php
53-
/**
54-
* Executes actions before the post content.
55-
*
56-
* @since 3.0.0
57-
*/
58-
do_action( 'neve_before_download_archive' );
5961

6062
if ( have_posts() ) {
6163

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

70-
/**
71-
* Executes actions after the post content.
72-
*
73-
* @since 3.0.0
74-
*/
75-
do_action( 'neve_after_download_archive' );
76-
7772
?>
7873
</div>
7974
<?php
80-
/**
81-
* Download pagination
82-
*/
83-
neve_edd_download_nav();
75+
/**
76+
* Executes actions after the post content.
77+
*
78+
* @since 3.0.0
79+
*/
80+
do_action( 'neve_after_download_archive' );
81+
82+
/**
83+
* Download pagination
84+
*/
85+
neve_edd_download_nav();
8486
?>
8587
</div>
8688

assets/js/src/edd/app.js

Lines changed: 0 additions & 21 deletions
This file was deleted.

globals/utilities.php

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -133,6 +133,16 @@ function neve_hooks() {
133133
);
134134
}
135135

136+
$hooks['download-archive'] = array(
137+
'neve_before_download_archive',
138+
'neve_after_download_archive',
139+
);
140+
141+
$hooks['single-download'] = array(
142+
'neve_before_download_content',
143+
'neve_after_download_content',
144+
);
145+
136146
return apply_filters( 'neve_hooks_list', $hooks );
137147
}
138148

single-download.php

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
* @package Neve
77
*/
88

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

1111
get_header();
1212

@@ -18,11 +18,11 @@
1818
class="<?php echo esc_attr( join( ' ', get_post_class( 'nv-single-download-wrap col' ) ) ); ?>">
1919
<?php
2020
/**
21-
* Executes actions before the post content.
21+
* Executes actions before the download content.
2222
*
2323
* @since 3.0.0
2424
*/
25-
do_action( 'neve_before_post_content' );
25+
do_action( 'neve_before_download_content' );
2626

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

3636
/**
37-
* Executes actions after the post content.
37+
* Executes actions after the download content.
3838
*
3939
* @since 3.0.0
4040
*/
41-
do_action( 'neve_after_post_content' );
41+
do_action( 'neve_after_download_content' );
4242
?>
4343
</article>
4444
<?php do_action( 'neve_do_sidebar', 'single-post', 'right' ); ?>

0 commit comments

Comments
 (0)