function getAttributions( $content ) {
		$media_in_page = get_media_embedded_in_content( $content );

		// these are not the droids you're looking for
		if ( empty( $media_in_page ) ) {
			return $content;
		}

		// get all book attachments
		$book_media = $this->getBookMedia();
		if ( ! empty( $book_media ) ) {
			$media_ids = Media\extract_id_from_media( $media_in_page );
			// intersect media_ids found in page with found in book
			$unique_ids = Media\intersect_media_ids( $media_ids, $book_media );
		} else {
			return $content;
		}

		// get attribution meta for each attachment
		$all_attributions = $this->getAttributionsMeta( $unique_ids );

		// get the content of the attributions
		$media_attributions = $this->attributionsContent( $all_attributions );

		return $content . $media_attributions;
	}
function getAttributions( $content ) {
		$media_in_page = get_media_embedded_in_content( $content );

		// these are not the droids you're looking for
		if ( empty( $media_in_page ) ) {
			return $content;
		}

		// get all book attachments
		$book_media = $this->getBookMedia();
		if ( ! empty( $book_media ) ) {
			$media_ids = Media\extract_id_from_media( $media_in_page );
			// intersect media_ids found in page with found in book
			$unique_ids = Media\intersect_media_ids( $media_ids, $book_media );
		} else {
			return $content;
		}

		// get attribution meta for each attachment
		$all_attributions = $this->getAttributionsMeta( $unique_ids );

		// get the content of the attributions
		$media_attributions = $this->attributionsContent( $all_attributions );

		return $content . $media_attributions;
	}
function getAttributions ( $ content ) { $ media_in_page = get_media_embedded_in_content ( $ content ) ; // these are not the droids you're looking for if ( empty ( $ media_in_page ) ) { return $ content ; } // get all book attachments $ book_media = $ this -> getBookMedia ( ) ; if ( ! empty ( $ book_media ) ) { $ media_ids = Media \ extract_id_from_media ( $ media_in_page ) ; // intersect media_ids found in page with found in book $ unique_ids = Media \ intersect_media_ids ( $ media_ids , $ book_media ) ; } else { return $ content ; } // get attribution meta for each attachment $ all_attributions = $ this -> getAttributionsMeta ( $ unique_ids ) ; // get the content of the attributions $ media_attributions = $ this -> attributionsContent ( $ all_attributions ) ; return $ content . $ media_attributions ; }
Produces a list of media attributions if they are
found in the current page and part of the media library
appends said list to the end of the content

@since 5.5.0

@param $content

@return string
Produces a list of media attributions if they are found in the current page and part of the media library appends said list to the end of the content