From 5c383c89cd640917c2281ed3194b09cc7e689172 Mon Sep 17 00:00:00 2001
From: IanDelMar <42134098+IanDelMar@users.noreply.github.com>
Date: Tue, 18 Oct 2022 09:19:55 +0200
Subject: [PATCH 1/5] deprecate understrap_link_pages_args filter hook
---
inc/template-tags.php | 25 +++++++++++++++++++------
1 file changed, 19 insertions(+), 6 deletions(-)
diff --git a/inc/template-tags.php b/inc/template-tags.php
index 029d9b5c..e4a1ccbd 100644
--- a/inc/template-tags.php
+++ b/inc/template-tags.php
@@ -308,16 +308,29 @@ if ( ! function_exists( 'understrap_link_pages' ) ) {
* `` Quicktag one or more times). This tag must be
* within The Loop. Default: echo.
*
+ * @since 1.0.0
+ *
+ * @link https://developer.wordpress.org/reference/functions/wp_link_pages/
+ *
* @return void|string Formatted output in HTML.
*/
function understrap_link_pages() {
- $args = apply_filters(
- 'understrap_link_pages_args',
- array(
- 'before' => '
' . esc_html__( 'Pages:', 'understrap' ),
- 'after' => '
',
- )
+ $args = array(
+ 'before' => '' . esc_html__( 'Pages:', 'understrap' ),
+ 'after' => '
',
);
+
+ /**
+ * Filters the arguments used in retrieving page links for paginated posts.
+ *
+ * Runs before the 'wp_link_pages_args' hook.
+ *
+ * @since 1.0.0
+ */
+ $args = apply_filters_deprecated(
+ 'understrap_link_pages_args', array( $args ), '1.2.0', 'wp_link_pages_args'
+ );
+
wp_link_pages( $args );
}
}
From 363c67fe71aa672a0312c560909c6e6739049a74 Mon Sep 17 00:00:00 2001
From: IanDelMar <42134098+IanDelMar@users.noreply.github.com>
Date: Tue, 18 Oct 2022 09:26:16 +0200
Subject: [PATCH 2/5] fix wp coding standards
---
inc/template-tags.php | 5 ++++-
1 file changed, 4 insertions(+), 1 deletion(-)
diff --git a/inc/template-tags.php b/inc/template-tags.php
index e4a1ccbd..79ab0698 100644
--- a/inc/template-tags.php
+++ b/inc/template-tags.php
@@ -328,7 +328,10 @@ if ( ! function_exists( 'understrap_link_pages' ) ) {
* @since 1.0.0
*/
$args = apply_filters_deprecated(
- 'understrap_link_pages_args', array( $args ), '1.2.0', 'wp_link_pages_args'
+ 'understrap_link_pages_args',
+ array( $args ),
+ '1.2.0',
+ 'wp_link_pages_args',
);
wp_link_pages( $args );
From d449cee3d3f6928b4db87e965d1cf5c1b39ef2a8 Mon Sep 17 00:00:00 2001
From: IanDelMar <42134098+IanDelMar@users.noreply.github.com>
Date: Tue, 18 Oct 2022 09:31:05 +0200
Subject: [PATCH 3/5] fix wp coding standards
---
inc/template-tags.php | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/inc/template-tags.php b/inc/template-tags.php
index 79ab0698..b239389a 100644
--- a/inc/template-tags.php
+++ b/inc/template-tags.php
@@ -331,7 +331,7 @@ if ( ! function_exists( 'understrap_link_pages' ) ) {
'understrap_link_pages_args',
array( $args ),
'1.2.0',
- 'wp_link_pages_args',
+ 'wp_link_pages_args'
);
wp_link_pages( $args );
From 15dc2ee8c2ae0945c12b566eebee9074dadc350e Mon Sep 17 00:00:00 2001
From: IanDelMar <42134098+IanDelMar@users.noreply.github.com>
Date: Mon, 9 Oct 2023 17:23:08 +0200
Subject: [PATCH 4/5] update theme version that deprecated hook
---
inc/template-tags.php | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/inc/template-tags.php b/inc/template-tags.php
index 7ad715cc..1822b9ba 100644
--- a/inc/template-tags.php
+++ b/inc/template-tags.php
@@ -342,7 +342,7 @@ if ( ! function_exists( 'understrap_link_pages' ) ) {
$args = apply_filters_deprecated(
'understrap_link_pages_args',
array( $args ),
- '1.2.0',
+ '1.3.0',
'wp_link_pages_args'
);
From ed38d74c9542361fb2022b807af2e01d785c26ce Mon Sep 17 00:00:00 2001
From: IanDelMar <42134098+IanDelMar@users.noreply.github.com>
Date: Wed, 11 Oct 2023 08:40:37 +0200
Subject: [PATCH 5/5] update theme version that deprecates hook
---
inc/template-tags.php | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/inc/template-tags.php b/inc/template-tags.php
index 1822b9ba..37b3ce79 100644
--- a/inc/template-tags.php
+++ b/inc/template-tags.php
@@ -342,7 +342,7 @@ if ( ! function_exists( 'understrap_link_pages' ) ) {
$args = apply_filters_deprecated(
'understrap_link_pages_args',
array( $args ),
- '1.3.0',
+ '1.2.3',
'wp_link_pages_args'
);