tp TouchPointWP Blocks BlocksController - TenthPres/TouchPoint-WP GitHub Wiki
tp\TouchPointWP\Blocks\BlocksController
- Class name: BlocksController
- Namespace: \tp\TouchPointWP\Blocks
- This is an abstract class
- This class implements: tp\TouchPointWP\Interfaces\api
Methods
init
mixed tp\TouchPointWP\Blocks\BlocksController::init()
Registers the block using a blocks-manifest.php file, which improves the performance of block type registration.
Behind the scenes, it also registers all assets so they can be enqueued through the block editor in the corresponding context.
- Visibility: public
- This method is static.
Returns
- mixed
enqueueBlockAssets
mixed tp\TouchPointWP\Blocks\BlocksController::enqueueBlockAssets()
- Visibility: public
- This method is static.
Returns
- mixed
api
bool tp\TouchPointWP\Interfaces\api::api(array uri)
Handle API requests
- Visibility: public
- This method is static.
- This method is defined by tp\TouchPointWP\Interfaces\api
Arguments
- uri array - The request URI already parsed by parse_url()
Returns
- bool - False if endpoint is not found. Should print the result.