Skip to content

Commit

Permalink
Add sort by publication date for Works deposits on profiles.
Browse files Browse the repository at this point in the history
  • Loading branch information
mikethicke committed Dec 9, 2024
1 parent 1e72724 commit 228b746
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ public static function display_filter( $field_value, $field_id = '' ) {
}

$api_endpoint = WORKS_URL . '/api/records';
$query_string = $api_endpoint . "?q=metadata.creators.person_or_org.identifiers.identifier:$username&size=100";
$query_string = $api_endpoint . "?q=metadata.creators.person_or_org.identifiers.identifier:$username&size=100&sort=published-desc";
$response = wp_remote_get( $query_string );
if ( is_wp_error( $response ) ) {
trigger_error( 'In hc-member-profiles, error fetching works: ' . $response->get_error_message(), E_USER_WARNING );
Expand Down

0 comments on commit 228b746

Please sign in to comment.