public function getBookMetadata( $url ) {
		// Handle request (local or global)
		$response = $this->handleGetRequest( $url, 'pressbooks/v2', 'metadata' );

		// Handle errors
		if ( is_wp_error( $response ) ) {
			$_SESSION['pb_errors'][] = sprintf(
				'<p>%1$s</p><p>%2$s</p>',
				__( 'The source book&rsquo;s metadata could not be read.', 'pressbooks' ),
				$response->get_error_message()
			);
			return false;
		}

		// Return successful response
		return $response;
	}
public function getBookMetadata( $url ) {
		// Handle request (local or global)
		$response = $this->handleGetRequest( $url, 'pressbooks/v2', 'metadata' );

		// Handle errors
		if ( is_wp_error( $response ) ) {
			$_SESSION['pb_errors'][] = sprintf(
				'<p>%1$s</p><p>%2$s</p>',
				__( 'The source book&rsquo;s metadata could not be read.', 'pressbooks' ),
				$response->get_error_message()
			);
			return false;
		}

		// Return successful response
		return $response;
	}
public function getBookMetadata ( $ url ) { // Handle request (local or global) $ response = $ this -> handleGetRequest ( $ url , 'pressbooks/v2' , 'metadata' ) ; // Handle errors if ( is_wp_error ( $ response ) ) { $ _SESSION [ 'pb_errors' ] [ ] = sprintf ( '<p>%1$s</p><p>%2$s</p>' , __ ( 'The source book&rsquo;s metadata could not be read.' , 'pressbooks' ) , $ response -> get_error_message ( ) ) ; return false ; } // Return successful response return $ response ; }
Fetch an array containing the metadata of a book.

@since 4.1.0

@param string $url The URL of the book.

@return bool | array False if the operation failed; the metadata array if it succeeded.
Fetch an array containing the metadata of a book .