Skip to content

Commit

Permalink
Corrects underpin autoloader
Browse files Browse the repository at this point in the history
  • Loading branch information
alexstandiford committed May 9, 2021
1 parent 7759dbe commit 2222ff2
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 2 deletions.
4 changes: 3 additions & 1 deletion lib/abstracts/Meta_Record_Type.php
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,9 @@ abstract class Meta_Record_Type {
*
* @since 1.0.0
*/
abstract public function sanitize( $meta_value, $meta_key, $object_type );
public function sanitize( $meta_value, $meta_key, $object_type ){
return $meta_value;
}

/**
* Callback that determines if this meta can be saved, or not.
Expand Down
6 changes: 5 additions & 1 deletion lib/factories/Meta_Record_Type_Instance.php
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,11 @@ public function __construct( $args ) {
}

public function sanitize( $meta_value, $meta_key, $object_type ) {
return $this->set_callable( $this->sanitize_callback, $meta_value, $meta_key, $object_type );
if ( is_callable( $this->sanitize_callback ) ) {
return $this->set_callable( $this->sanitize_callback, $meta_value, $meta_key, $object_type );
}

return parent::sanitize( $meta_value, $meta_key, $object_type );
}

public function has_permission() {
Expand Down

0 comments on commit 2222ff2

Please sign in to comment.