Skip to content

Commit 217d74b

Browse files
authored
Merge pull request #6 from Cyperwu/patch-1
bug fix
2 parents 401c65e + 34d8008 commit 217d74b

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

api/pvc-api.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ public function __construct() {
2424
public function rest_api_init() {
2525

2626
foreach ( $this->rest_bases as $rest_base ) {
27-
register_rest_route( $this->namespace, $rest_base . '/(?P<post_ids>[a-zA-Z0-9_]+)', array(
27+
register_rest_route( $this->namespace, $rest_base . '/(?P<post_ids>([a-zA-Z0-9_]\,?)+)', array(
2828
'methods' => 'GET',
2929
'callback' => array( $this, str_replace( '/', '', $rest_base ) . '_stats' ),
3030
) );
@@ -135,4 +135,4 @@ public function view_stats( WP_REST_Request $request ) {
135135

136136
global $pvc_api;
137137
$pvc_api = new PVC_API();
138-
?>
138+
?>

0 commit comments

Comments
 (0)