public function getMetaPostId() {
		$args = [
			'post_type' => 'metadata',
			'posts_per_page' => 1,
			'post_status' => 'publish',
			'orderby' => 'modified',
			'no_found_rows' => true,
			'cache_results' => true,
			'fields' => 'ids',
		];

		$q = new \WP_Query();
		$results = $q->query( $args );

		if ( empty( $results ) ) {
			return 0;
		}

		return $results[0];
	}
public function getMetaPostId() {
		$args = [
			'post_type' => 'metadata',
			'posts_per_page' => 1,
			'post_status' => 'publish',
			'orderby' => 'modified',
			'no_found_rows' => true,
			'cache_results' => true,
			'fields' => 'ids',
		];

		$q = new \WP_Query();
		$results = $q->query( $args );

		if ( empty( $results ) ) {
			return 0;
		}

		return $results[0];
	}
public function getMetaPostId ( ) { $ args = [ 'post_type' => 'metadata' , 'posts_per_page' => 1 , 'post_status' => 'publish' , 'orderby' => 'modified' , 'no_found_rows' => true , 'cache_results' => true , 'fields' => 'ids' , ] ; $ q = new \ WP_Query ( ) ; $ results = $ q -> query ( $ args ) ; if ( empty ( $ results ) ) { return 0 ; } return $ results [ 0 ] ; }
Returns the latest "metadata" post ID. There should be only one per book.

@return int
Returns the latest metadata post ID . There should be only one per book .