Merge pull request #918 from alantygel/patch-1

Allow metadata fetch() method without arguments
This commit is contained in:
Vinícius Nunes Medeiros 2024-10-25 15:59:00 -03:00 committed by GitHub
commit 54fecbb1da
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 1 additions and 1 deletions

View File

@ -344,7 +344,7 @@ class Metadata extends Repository {
* @return Entities\Metadatum|\WP_Query|Array an instance of wp query OR array of entities;
* @throws \Exception
*/
public function fetch( $args, $output = null ) {
public function fetch( $args = [], $output = null ) {
if ( is_numeric( $args ) ) {
$existing_post = get_post( $args );