From d77f641c868648d823d7468030c24026e90df296 Mon Sep 17 00:00:00 2001 From: Sean Fisher Date: Wed, 24 Jul 2024 15:46:15 -0400 Subject: [PATCH] Remove reference to validate_path() in meta.php --- src/meta.php | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/meta.php b/src/meta.php index 8eb05eb0..f7dcb268 100644 --- a/src/meta.php +++ b/src/meta.php @@ -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; }