Blocks::tec_ce_remove_blocks_on_edit( string $post_content, WP_Post $event )

Grab the original content for the content editor.


Parameters

$post_content

(string) (Required) Post Content.

$event

(WP_Post) (Required) The event.


Top ↑

Return

(string)


Top ↑

Source

File: src/Events_Community/Block_Conversion/Blocks.php

	public function tec_ce_remove_blocks_on_edit( string $post_content, WP_Post $event ): string {
		// Return if we are on the admin page.
		if ( is_admin() ) {
			return $post_content;
		}

		// No post, nothing to convert.
		if ( empty( $post_content ) ) {
			return $post_content;
		}

		return $this->extract_block_text( $post_content );
	}

Top ↑

Changelog

Changelog
Version Description
4.10.17 Introduced.