Skip to content

Commit 954a98f

Browse files
committed
Pass the capability to the object_id filter for the user.can middleware
1 parent 38456e7 commit 954a98f

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/Middleware/UserCanMiddleware.php

+1-1
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ class UserCanMiddleware {
2222
*/
2323
public function handle( RequestInterface $request, Closure $next, $capability = '', $object_id = '0', $url = '' ) {
2424
$capability = apply_filters( 'wpemerge.middleware.user.can.capability', $capability, $request );
25-
$object_id = apply_filters( 'wpemerge.middleware.user.can.object_id', (int) $object_id, $request );
25+
$object_id = apply_filters( 'wpemerge.middleware.user.can.object_id', (int) $object_id, $capability, $request );
2626
$args = [$capability];
2727

2828
if ( $object_id !== 0 ) {

0 commit comments

Comments
 (0)