WP_Block_Type::get_attributes

Advertisement

Summery Summery

Get all available block attributes including possible layout attribute from Columns block.

Syntax Syntax

WP_Block_Type::get_attributes()

Return Return

(array) Array of attributes.

Source Source

File: wp-includes/class-wp-block-type.php

	/**
	 * Validates attributes against the current block schema, populating
	 * defaulted and missing values.
	 *
	 * @since 5.0.0
	 *
	 * @param array $attributes Original block attributes.
	 * @return array Prepared block attributes.
	 */
	public function prepare_attributes_for_render( $attributes ) {
		// If there are no attribute definitions for the block type, skip
		// processing and return vebatim.
		if ( ! isset( $this->attributes ) ) {
			return $attributes;
		}

Advertisement

Changelog Changelog

Changelog
Version Description
5.0.0 Introduced.

Advertisement

Leave a Reply