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

PCH Related Top Posts: Add filter values drop-down #1986

Merged
merged 3 commits into from
Nov 13, 2023
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
2 changes: 1 addition & 1 deletion build/content-helper/dashboard-widget.asset.php
Original file line number Diff line number Diff line change
@@ -1 +1 @@
<?php return array('dependencies' => array('react', 'wp-api-fetch', 'wp-components', 'wp-element', 'wp-i18n', 'wp-url'), 'version' => '1f1e7627c5ac7f2fa1a3');
<?php return array('dependencies' => array('react', 'wp-api-fetch', 'wp-components', 'wp-element', 'wp-i18n', 'wp-url'), 'version' => '0f88ee8ac4cc60c9513b');
2 changes: 1 addition & 1 deletion build/content-helper/dashboard-widget.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion build/content-helper/editor-sidebar.asset.php
Original file line number Diff line number Diff line change
@@ -1 +1 @@
<?php return array('dependencies' => array('react', 'wp-api-fetch', 'wp-components', 'wp-data', 'wp-edit-post', 'wp-element', 'wp-i18n', 'wp-plugins', 'wp-url'), 'version' => '473dfc4f81be5b212efa');
<?php return array('dependencies' => array('react', 'wp-api-fetch', 'wp-components', 'wp-core-data', 'wp-data', 'wp-edit-post', 'wp-editor', 'wp-element', 'wp-i18n', 'wp-plugins', 'wp-url'), 'version' => '840cac654c8581057702');
22 changes: 11 additions & 11 deletions build/content-helper/editor-sidebar.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion build/loader.asset.php
Original file line number Diff line number Diff line change
@@ -1 +1 @@
<?php return array('dependencies' => array('wp-hooks', 'wp-i18n'), 'version' => 'df4f48d62b4a84ae4497');
<?php return array('dependencies' => array('wp-hooks', 'wp-i18n'), 'version' => 'f5c2d06f6755fda3f6d4');
2 changes: 1 addition & 1 deletion build/loader.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

224 changes: 224 additions & 0 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -62,6 +62,7 @@
"@wordpress/data": "^9.11.0",
"@wordpress/e2e-test-utils": "^10.16.0",
"@wordpress/edit-post": "^7.22.0",
"@wordpress/editor": "^13.22.0",
"@wordpress/element": "^5.22.0",
"@wordpress/env": "^8.11.0",
"@wordpress/eslint-plugin": "^17.2.0",
Expand Down
2 changes: 1 addition & 1 deletion src/Metadata/class-post-builder.php
Original file line number Diff line number Diff line change
Expand Up @@ -380,7 +380,7 @@ private function get_bottom_level_term( int $post_id, string $taxonomy_name ): s
* @param WP_Post $post The post object.
* @return array<string>
*/
private function get_author_names( WP_Post $post ): array {
public function get_author_names( WP_Post $post ): array {
$authors = $this->get_coauthor_names( $post->ID );
if ( 0 === count( $authors ) ) {
$post_author = get_user_by( 'id', $post->post_author );
Expand Down
13 changes: 12 additions & 1 deletion src/content-helper/common/utils/constants.ts
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,18 @@ export enum Metric {
export enum PostFilterType {
Author = 'author',
Section = 'section',
Tag = 'tag'
Tag = 'tag',
Unavailable = 'unavailable'
}

/**
* Defines the structure of Post filters.
*
* @since 3.11.0
*/
export interface PostFilter {
type: PostFilterType;
value: string;
}

/**
Expand Down
Loading