Skip to content

Commit

Permalink
Remove reference to validate_path() in meta.php
Browse files Browse the repository at this point in the history
  • Loading branch information
srtfisher committed Jul 24, 2024
1 parent d862f88 commit d77f641
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions src/meta.php
Original file line number Diff line number Diff line change
Expand Up @@ -130,9 +130,10 @@ function register_meta_helper(
* Reads the post meta definitions from config and registers them.
*/
function register_post_meta_from_defs(): void {
// Ensure the config file exists.
$filepath = dirname( __DIR__ ) . '/config/post-meta.json';
if ( ! validate_path( $filepath ) ) {

// Ensure the config file exists and is valid.
if ( ! file_exists( $filepath ) || ! in_array( validate_file( $filepath ), [ 0, 2 ], true ) ) {
return;
}

Expand Down

0 comments on commit d77f641

Please sign in to comment.