BP_REST_Document_Details_Endpoint::get_documents_privacy()

Get privacy for the documents.

Description

Return

(array)

Source

File: bp-document/classes/class-bp-rest-document-details-endpoint.php

	public function get_documents_privacy() {
		$privacy = buddypress()->document->visibility_levels;
		$retval  = array();

		if ( ! empty( $privacy ) ) {
			foreach ( $privacy as $key => $value ) {
				if ( 'grouponly' === $key ) {
					continue;
				}

				$retval[ $key ] = $value;
			}
		}

		return $retval;
	}

Questions?

We're always happy to help with code or other questions you might have! Search our developer docs, contact support, or connect with our sales team.