Skip to content

Commit

Permalink
Merge pull request #1657 from INN/1656-largo_byline-filter-args
Browse files Browse the repository at this point in the history
Add a second parameter to the largo_byline filter, containing an array of the arguments used in largo_byline()
  • Loading branch information
benlk authored Mar 27, 2019
2 parents ab66a95 + 41dc0c1 commit 099fd2c
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 1 deletion.
1 change: 1 addition & 0 deletions changelog.md
Original file line number Diff line number Diff line change
Expand Up @@ -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 #1657](https://github.com/INN/largo/pull/1657) for [issue #1646](https://github.com/INN/largo/issues/1656).

### Fixes

Expand Down
11 changes: 10 additions & 1 deletion inc/post-tags.php
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down

0 comments on commit 099fd2c

Please sign in to comment.