Dataviews: All Templates: Add filters to template author.#56338
Dataviews: All Templates: Add filters to template author.#56338jorgefilipecosta merged 1 commit intotrunkfrom
Conversation
|
Warning: Type of PR label mismatch To merge this PR, it requires exactly 1 label indicating the type of PR. Other labels are optional and not being checked here.
Read more about Type labels in Gutenberg. Don't worry if you don't have the required permissions to add labels; the PR reviewer should be able to help with the task. |
|
This pull request changed or added PHP files in previous commits, but none have been detected in the latest commit. Thank you! ❤️ |
|
Size Change: +101 B (0%) Total Size: 1.7 MB
ℹ️ View Unchanged
|
23e13bf to
5289030
Compare
|
Hi @ntsekouras, now that sorting is merged I guess this one is ready for review. |
| if ( | ||
| filter.field === 'author' && | ||
| filter.operator === OPERATOR_IN && | ||
| filter.value !== '' |
There was a problem hiding this comment.
Do we need to check explicitly for empty string?
There was a problem hiding this comment.
I updated the condition to check if the filter has value instead of checking for an empty string.
| per_page: -1, | ||
| } ); | ||
|
|
||
| const allAuthorElements = useMemo( () => { |
There was a problem hiding this comment.
This could be named just authors, I guess?
There was a problem hiding this comment.
Suggestion applied 👍
060846e to
87a688d
Compare
Part of the follow-ups on #55848 (comment).
Adds an author filter to all templates view.
Screenshot
Testing
Go to the manage all templates page.
Verify it is possible to filter templates by author.