Skip to content

Commit

Permalink
Merge pull request #219 from phpbits/fixes/permission_callback_error
Browse files Browse the repository at this point in the history
Fix 'permission_callback' error on WordPress 5.5
  • Loading branch information
jeffpaul committed Sep 1, 2020
2 parents 1ae9bc7 + 4fb15c0 commit b8ce434
Showing 1 changed file with 8 additions and 6 deletions.
14 changes: 8 additions & 6 deletions includes/Classifai/Services/ImageProcessing.php
Original file line number Diff line number Diff line change
Expand Up @@ -75,18 +75,20 @@ public function register_endpoints() {
'classifai/v1',
'alt-tags/(?P<id>\d+)',
[
'methods' => 'GET',
'callback' => [ $this, 'provider_endpoint_callback' ],
'args' => [ 'route' => 'alt-tags' ],
'methods' => 'GET',
'callback' => [ $this, 'provider_endpoint_callback' ],
'args' => [ 'route' => 'alt-tags' ],
'permission_callback' => '__return_true',
]
);
register_rest_route(
'classifai/v1',
'image-tags/(?P<id>\d+)',
[
'methods' => 'GET',
'callback' => [ $this, 'provider_endpoint_callback' ],
'args' => [ 'route' => 'image-tags' ],
'methods' => 'GET',
'callback' => [ $this, 'provider_endpoint_callback' ],
'args' => [ 'route' => 'image-tags' ],
'permission_callback' => '__return_true',
]
);
}
Expand Down

0 comments on commit b8ce434

Please sign in to comment.