public function append_modules_content( string $content ) : string {

		global $more, $post;
		$flexible_content = '';

		// Remove current filter to avoid recursive loop.
		remove_filter( 'the_content', [ $this, 'append_modules_content' ], $this->_the_content_priority );

		if ( $this->is_current_post_flexible( $post, $more ) ) {
			$flexible_content = $this->get_modules_content( $post );
		}

		// Re-add filter after parsing content.
		add_filter( 'the_content', [ $this, 'append_modules_content' ], $this->_the_content_priority, 1 );

		return $content . $flexible_content;
	}
public function append_modules_content( string $content ) : string {

		global $more, $post;
		$flexible_content = '';

		// Remove current filter to avoid recursive loop.
		remove_filter( 'the_content', [ $this, 'append_modules_content' ], $this->_the_content_priority );

		if ( $this->is_current_post_flexible( $post, $more ) ) {
			$flexible_content = $this->get_modules_content( $post );
		}

		// Re-add filter after parsing content.
		add_filter( 'the_content', [ $this, 'append_modules_content' ], $this->_the_content_priority, 1 );

		return $content . $flexible_content;
	}
public function append_modules_content ( string $ content ) : string { global $ more , $ post ; $ flexible_content = '' ; // Remove current filter to avoid recursive loop. remove_filter ( 'the_content' , [ $ this , 'append_modules_content' ] , $ this -> _the_content_priority ) ; if ( $ this -> is_current_post_flexible ( $ post , $ more ) ) { $ flexible_content = $ this -> get_modules_content ( $ post ) ; } // Re-add filter after parsing content. add_filter ( 'the_content' , [ $ this , 'append_modules_content' ] , $ this -> _the_content_priority , 1 ) ; return $ content . $ flexible_content ; }
Append modules HTML content to the_content for the global post object.

@param string $content Content HTML string.
@return string
Append modules HTML content to the_content for the global post object .