Automattic\WooCommerce\Blocks\Assets
AssetDataRegistry::register_page_id()
Adds a page permalink to the data registry.
Method of the class: AssetDataRegistry{}
No Hooks.
Return
null
. Nothing (null).
Usage
$AssetDataRegistry = new AssetDataRegistry(); $AssetDataRegistry->register_page_id( $page_id );
- $page_id(int) (required)
- Page ID to add to the registry.
AssetDataRegistry::register_page_id() AssetDataRegistry::register page id code WC 9.2.3
public function register_page_id( $page_id ) { $permalink = $page_id ? get_permalink( $page_id ) : false; if ( $permalink ) { $this->data[ 'page-' . $page_id ] = $permalink; } }