-
Notifications
You must be signed in to change notification settings - Fork 4.2k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Enhancement: added ability to filter latest posts by author and to di…
…splay author (#16169) * Added ability to filter latest posts by author * Updates to catch up to changes in Gutenberg * Fixes error of: Notice: Undefined index: items in /wp-includes/rest-api.php on line "1245" * Removed unused variables and fixed linting issues * Removed Whitespace from index.php * adding new line to index.php * applied changes suggested by @draganescu to LatestPosts block * linting edit * Updated from users to author on LatestPosts block * Added display author option * Updated edit.js on LatestPosts to match front end on author label * Attempt to fix tests on LatestPosts * Update e2e tests for LatestPostsa * Fix for PHP Unit tests * Updated rendering of author name on editor view * Changed 'posted by' to 'by' on the byline * Fixed linting issue in index.php for LatestPost * Fixed formatting issues in index.php for LatestPosts * fix to undefined author_info Co-authored-by: Paul Stonier <[email protected]>
- Loading branch information
Showing
11 changed files
with
125 additions
and
5 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
/** | ||
* Internal dependencies | ||
*/ | ||
import { buildTermsTree } from './terms'; | ||
import TreeSelect from '../tree-select'; | ||
|
||
export default function AuthorSelect( { | ||
label, | ||
noOptionLabel, | ||
authorList, | ||
selectedAuthorId, | ||
onChange, | ||
} ) { | ||
const termsTree = buildTermsTree( authorList ); | ||
return ( | ||
<TreeSelect | ||
{ ...{ label, noOptionLabel, onChange } } | ||
tree={ termsTree } | ||
selectedId={ selectedAuthorId } | ||
/> | ||
); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1 @@ | ||
<!-- wp:core/latest-posts {"postsToShow":5,"displayPostDate":false} /--> | ||
<!-- wp:core/latest-posts {"postsToShow":5,"displayAuthor":false,"displayPostDate":false} /--> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters