Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add a second parameter to the largo_byline filter, containing an array of the arguments used in largo_byline() #1657

Merged
merged 2 commits into from
Mar 27, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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