Skip to content

Commit f5e268a

Browse files
committed
Remove get_client_by_id since get_by_id has been modified to work correctly
1 parent 8c8d4a5 commit f5e268a

File tree

1 file changed

+0
-27
lines changed

1 file changed

+0
-27
lines changed

inc/class-client.php

Lines changed: 0 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -314,33 +314,6 @@ public static function get_by_post_id( $id ) {
314314
return new static( $post );
315315
}
316316

317-
/**
318-
* Get a client by Client ID.
319-
*
320-
* @param int $id Client ID of the app.
321-
* @return static|null Client instance on success, null if invalid/not found.
322-
*/
323-
public static function get_by_client_id( $id ) {
324-
$args = array(
325-
'meta_query' => array(
326-
array(
327-
'key' => '_oauth2_client_id',
328-
'value' => $id,
329-
'compare' => '=',
330-
)
331-
),
332-
'post_type' => 'oauth2_client',
333-
'post_status' => 'any'
334-
);
335-
336-
$client_ids = get_posts( $args );
337-
if ( count( $client_ids ) !== 1 ) {
338-
return null;
339-
}
340-
341-
return new static( $client_ids[0] );
342-
}
343-
344317
/**
345318
* Create a new client.
346319
*

0 commit comments

Comments
 (0)