public function backMatterAutoDisplay( $content ) {
		$post = get_post();
		if ( ! $post ) {
			// Try to find using deprecated means
			global $id;
			$post = get_post( $id );
		}
		if ( ! $post ) {
			// Unknown post
			return $content;
		}
		if ( $post->post_type !== 'back-matter' ) {
			// Post is not a back-matter
			return $content;
		}
		$taxonomy = \Pressbooks\Taxonomy::init();
		if ( $taxonomy->getBackMatterType( $post->ID ) !== 'glossary' ) {
			// Post is not a glossary
			return $content;
		}

		if ( ! \Pressbooks\Utility\empty_space( \Pressbooks\Sanitize\decode( str_replace( '&nbsp;', '', $content ) ) ) ) {
			// Content is not empty
			return $content;
		}

		return $this->glossaryTerms();
	}
public function backMatterAutoDisplay( $content ) {
		$post = get_post();
		if ( ! $post ) {
			// Try to find using deprecated means
			global $id;
			$post = get_post( $id );
		}
		if ( ! $post ) {
			// Unknown post
			return $content;
		}
		if ( $post->post_type !== 'back-matter' ) {
			// Post is not a back-matter
			return $content;
		}
		$taxonomy = \Pressbooks\Taxonomy::init();
		if ( $taxonomy->getBackMatterType( $post->ID ) !== 'glossary' ) {
			// Post is not a glossary
			return $content;
		}

		if ( ! \Pressbooks\Utility\empty_space( \Pressbooks\Sanitize\decode( str_replace( '&nbsp;', '', $content ) ) ) ) {
			// Content is not empty
			return $content;
		}

		return $this->glossaryTerms();
	}
public function backMatterAutoDisplay ( $ content ) { $ post = get_post ( ) ; if ( ! $ post ) { // Try to find using deprecated means global $ id ; $ post = get_post ( $ id ) ; } if ( ! $ post ) { // Unknown post return $ content ; } if ( $ post -> post_type !== 'back-matter' ) { // Post is not a back-matter return $ content ; } $ taxonomy = \ Pressbooks \ Taxonomy :: init ( ) ; if ( $ taxonomy -> getBackMatterType ( $ post -> ID ) !== 'glossary' ) { // Post is not a glossary return $ content ; } if ( ! \ Pressbooks \ Utility \ empty_space ( \ Pressbooks \ Sanitize \ decode ( str_replace ( '&nbsp;' , '' , $ content ) ) ) ) { // Content is not empty return $ content ; } return $ this -> glossaryTerms ( ) ; }
Automatically display shortcode list in Glossary back matter if content is empty

@param string $content

@return string
Automatically display shortcode list in Glossary back matter if content is empty