Inventory_Presser_Blocks::register_block_types()

Registers block types

On This Page


Return Return

(void)


Top ↑

Source Source

File: includes/class-blocks.php

	public function register_block_types() {
		if ( ! function_exists( 'register_block_type' ) ) {
			// running on WordPress < 5.0.0, no blocks for you.
			return;
		}

		$block_types = array(
			'year-make-model-and-trim',
			'beam', // For boats.
			'body-style',
			'color',
			'down-payment',
			'engine',
			'interior-color',
			'last-modified',
			'length', // For trailers & boats.
			'make',
			'model',
			'msrp',
			'odometer',
			'payment',
			'price',
			'stock-number',
			'title-status',
			'transmission-speeds',
			'trim',
			'vin',
			'year',
			'youtube',
		);
		foreach ( $block_types as $block_type ) {
			register_block_type( dirname( INVP_PLUGIN_FILE_PATH ) . '/build/blocks/' . $block_type . '/block.json' );
		}
	}