Astra_Beaver_Builder::remove_astra_block_editor_attr( bool $flag, int $post_id )

Disable Astra’s block editor attr which applied for further block layout CSS.


Description


Parameters

$flag

(bool) (Required) Flag to enable/disable entry content attr.

$post_id

(int) (Required) Post ID.


Return

(bool) true|false


Source

File: inc/compatibility/class-astra-beaver-builder.php

		public function remove_astra_block_editor_attr( $flag, $post_id ) {
			$post = get_post( $post_id );

			/** @psalm-suppress PossiblyInvalidPropertyFetch */ // phpcs:ignore Generic.Commenting.DocComment.MissingShort
			if ( ! empty( $post->post_content ) && is_callable( 'FLBuilderModel::is_builder_enabled' ) && FLBuilderModel::is_builder_enabled() ) {
				/** @psalm-suppress PossiblyInvalidPropertyFetch */ // phpcs:ignore Generic.Commenting.DocComment.MissingShort
				$flag = false;
			}

			return $flag;
		}

Changelog

Changelog
Version Description
3.8.1 Introduced.

User Contributed Notes

You must log in before being able to contribute a note or feedback.