From fa2c3bcad4710dcf451d20e33e0ab7f629494ce1 Mon Sep 17 00:00:00 2001 From: Ben Keith Date: Wed, 27 Mar 2019 13:26:31 -0400 Subject: [PATCH 1/2] Add a second parameter to the largo_byline filter, containing an array of the arguments used in largo_byline() For https://github.com/INN/largo/issues/1656 --- changelog.md | 1 + inc/post-tags.php | 11 ++++++++++- 2 files changed, 11 insertions(+), 1 deletion(-) diff --git a/changelog.md b/changelog.md index aa4ff4499..e7c40c95a 100644 --- a/changelog.md +++ b/changelog.md @@ -13,6 +13,7 @@ This release contains bug fixes for Largo 0.6. - Updates INN's logos in the `img/` folder. If your child theme redefines the function `inn_logo()`, please update that function to reference the new SVG image locations in `img/`. [Pull request #1633](https://github.com/INN/largo/pull/1633) for [issue #1621](https://github.com/INN/largo/issues/1631) - Adds the term's taxonomy slug and term slug in the format `taxonomy-term` as a class on the term in the output of `largo_top_term()`, `largo_category_and_tags()`, and `largo_maybe_top_term()`. [Pull request](https://github.com/INN/largo/pull/1648) for [issue #1646](https://github.com/INN/largo/issues/1646). +- The arguments set on `largo_byline()` are now passed to the `largo_byline` filter as an array of argument name => argument value. [Pull request #]() for [issue #1646](https://github.com/INN/largo/issues/1656). ### Fixes diff --git a/inc/post-tags.php b/inc/post-tags.php index 79935f013..f6bfa91cc 100644 --- a/inc/post-tags.php +++ b/inc/post-tags.php @@ -161,9 +161,18 @@ function largo_byline( $echo = true, $exclude_date = false, $post = null ) { * * @since 0.5.4 * @param string $partial The HTML of the output of largo_byline(), before the edit link is added. + * @param array $array Associative array of argument name => argument value, with the arguments passed to largo_byline(). Since https://github.com/INN/largo/issues/1656 * @link https://github.com/INN/Largo/issues/1070 */ - $byline = apply_filters( 'largo_byline', $byline ); + $byline = apply_filters( + 'largo_byline', + $byline, + array( + 'echo' => $echo, + 'exclude_date' => $exclude_date, + 'post' => $post + ) + ); if ( $echo ) { echo $byline; From 41dc0c14e69b20dd05adfef64c4499ea1585dd38 Mon Sep 17 00:00:00 2001 From: Ben Keith Date: Wed, 27 Mar 2019 13:30:13 -0400 Subject: [PATCH 2/2] Update changelog for https://github.com/INN/largo/pull/1657 --- changelog.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/changelog.md b/changelog.md index e7c40c95a..eb1ed40cd 100644 --- a/changelog.md +++ b/changelog.md @@ -13,7 +13,7 @@ This release contains bug fixes for Largo 0.6. - Updates INN's logos in the `img/` folder. If your child theme redefines the function `inn_logo()`, please update that function to reference the new SVG image locations in `img/`. [Pull request #1633](https://github.com/INN/largo/pull/1633) for [issue #1621](https://github.com/INN/largo/issues/1631) - Adds the term's taxonomy slug and term slug in the format `taxonomy-term` as a class on the term in the output of `largo_top_term()`, `largo_category_and_tags()`, and `largo_maybe_top_term()`. [Pull request](https://github.com/INN/largo/pull/1648) for [issue #1646](https://github.com/INN/largo/issues/1646). -- The arguments set on `largo_byline()` are now passed to the `largo_byline` filter as an array of argument name => argument value. [Pull request #]() for [issue #1646](https://github.com/INN/largo/issues/1656). +- The arguments set on `largo_byline()` are now passed to the `largo_byline` filter as an array of argument name => argument value. [Pull request #1657](https://github.com/INN/largo/pull/1657) for [issue #1646](https://github.com/INN/largo/issues/1656). ### Fixes