Skip to content

Commit

Permalink
Fixes a but that prevented has_permission from providing the argument…
Browse files Browse the repository at this point in the history
…s from the callback
  • Loading branch information
alexstandiford committed Mar 25, 2022
1 parent b7010de commit cb6e558
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion lib/Abstracts/Meta_Record_Type.php
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ public function sanitize( $meta_value, $meta_key, $object_type ){
*
* @return mixed
*/
abstract public function has_permission();
abstract public function has_permission( $allowed, $meta_key, $object_id, $user_id, $cap, $caps );

/**
* Adds the metadata.
Expand Down
2 changes: 1 addition & 1 deletion lib/Factories/Meta_Record_Type_Instance.php
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ public function sanitize( $meta_value, $meta_key, $object_type ) {
return parent::sanitize( $meta_value, $meta_key, $object_type );
}

public function has_permission() {
public function has_permission( $allowed, $meta_key, $object_id, $user_id, $cap, $caps ) {
return $this->set_callable( $this->has_permission_callback );
}

Expand Down

0 comments on commit cb6e558

Please sign in to comment.