public function getGlossaryTerms( $reset = false ) {
		// Cheap cache
		static $glossary_terms = null;
		if ( $reset || $glossary_terms === null ) {
			$glossary_terms = [];
			$args = [
				'post_type' => 'glossary',
				'posts_per_page' => -1, // @codingStandardsIgnoreLine
				'post_status' => [ 'private', 'publish' ],
			];
			$posts = get_posts( $args );
			/** @var \WP_Post $post */
			foreach ( $posts as $post ) {
				$type = '';
				$terms = get_the_terms( $post->ID, 'glossary-type' );
				if ( $terms && ! is_wp_error( $terms ) ) {
					foreach ( $terms as $term ) {
						$type .= "{$term->slug},";
					}
				}
				$glossary_terms[ $post->post_title ] = [
					'id' => $post->ID,
					'content' => $post->post_content,
					'type' => rtrim( $type, ',' ),
					'status' => $post->post_status,
				];
			}
		}
		return $glossary_terms;
	}
public function getGlossaryTerms( $reset = false ) {
		// Cheap cache
		static $glossary_terms = null;
		if ( $reset || $glossary_terms === null ) {
			$glossary_terms = [];
			$args = [
				'post_type' => 'glossary',
				'posts_per_page' => -1, // @codingStandardsIgnoreLine
				'post_status' => [ 'private', 'publish' ],
			];
			$posts = get_posts( $args );
			/** @var \WP_Post $post */
			foreach ( $posts as $post ) {
				$type = '';
				$terms = get_the_terms( $post->ID, 'glossary-type' );
				if ( $terms && ! is_wp_error( $terms ) ) {
					foreach ( $terms as $term ) {
						$type .= "{$term->slug},";
					}
				}
				$glossary_terms[ $post->post_title ] = [
					'id' => $post->ID,
					'content' => $post->post_content,
					'type' => rtrim( $type, ',' ),
					'status' => $post->post_status,
				];
			}
		}
		return $glossary_terms;
	}
public function getGlossaryTerms ( $ reset = false ) { // Cheap cache static $ glossary_terms = null ; if ( $ reset || $ glossary_terms === null ) { $ glossary_terms = [ ] ; $ args = [ 'post_type' => 'glossary' , 'posts_per_page' => - 1 , // @codingStandardsIgnoreLine 'post_status' => [ 'private' , 'publish' ] , ] ; $ posts = get_posts ( $ args ) ; /** @var \WP_Post $post */ foreach ( $ posts as $ post ) { $ type = '' ; $ terms = get_the_terms ( $ post -> ID , 'glossary-type' ) ; if ( $ terms && ! is_wp_error ( $ terms ) ) { foreach ( $ terms as $ term ) { $ type .= "{$term->slug}," ; } } $ glossary_terms [ $ post -> post_title ] = [ 'id' => $ post -> ID , 'content' => $ post -> post_content , 'type' => rtrim ( $ type , ',' ) , 'status' => $ post -> post_status , ] ; } } return $ glossary_terms ; }
Gets the instance variable of glossary terms, returns as an array of
key = post_title, id = post ID, content = post_content. Sets an instance variable

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

@since 5.5.0

@return array
Gets the instance variable of glossary terms returns as an array of key = post_title id = post ID content = post_content . Sets an instance variable