Allow metadata fetch() method without arguments
In order to keep consistent with Collection, Items, Filters and others, Metadata fetch method should allow to be called without arguments.
This commit is contained in:
parent
fe43d298fa
commit
4c65d6b1b0
|
@ -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 );
|
||||
|
|
Loading…
Reference in New Issue