function getBookMedia( $reset = false ) {
		// Cheap cache
		static $book_media = null;
		if ( $reset || $book_media === null ) {
			$book_media = [];
			$args = [
				'post_type' => 'attachment',
				'posts_per_page' => -1,  // @codingStandardsIgnoreLine
				'post_status' => 'inherit',
				'no_found_rows' => true,
			];

			$attached_media = get_posts( $args );

			foreach ( $attached_media as $media ) {
				$book_media[ $media->ID ] = $media->guid;
			}
		}
		return $book_media;
	}
function getBookMedia( $reset = false ) {
		// Cheap cache
		static $book_media = null;
		if ( $reset || $book_media === null ) {
			$book_media = [];
			$args = [
				'post_type' => 'attachment',
				'posts_per_page' => -1,  // @codingStandardsIgnoreLine
				'post_status' => 'inherit',
				'no_found_rows' => true,
			];

			$attached_media = get_posts( $args );

			foreach ( $attached_media as $media ) {
				$book_media[ $media->ID ] = $media->guid;
			}
		}
		return $book_media;
	}
function getBookMedia ( $ reset = false ) { // Cheap cache static $ book_media = null ; if ( $ reset || $ book_media === null ) { $ book_media = [ ] ; $ args = [ 'post_type' => 'attachment' , 'posts_per_page' => - 1 , // @codingStandardsIgnoreLine 'post_status' => 'inherit' , 'no_found_rows' => true , ] ; $ attached_media = get_posts ( $ args ) ; foreach ( $ attached_media as $ media ) { $ book_media [ $ media -> ID ] = $ media -> guid ; } } return $ book_media ; }
Returns the array of attachments set in the instance variable.

@param bool $reset (optional, default is false)

@since 5.5.0

@return array|null
Returns the array of attachments set in the instance variable .