Page Component
Gets data associated with a block
/**
* Called from WP's block preview screen.
* Separate from getServerSideProps because private/session based data might need to be mocked.
* @returns
*/
export const getPreviewProps = async () => {
return await getPropsData();
};
/**
* Called by the page the block exists on within it's getServerSideProps method.
* The result is passed to the component props.
* @returns
*/
export const getServerSideProps = async () => {
return await getPropsData();
};function gravity_platform_core_blocks_init()
{
register_block_type(__DIR__ . '/src/blocks/showroom');
register_block_type(__DIR__ . '/src/blocks/promotions');
}
add_action('init', 'gravity_platform_core_blocks_init');[slug] - Detail Page
Last updated