WP_Block_Supports::get_instance() WordPress Method
The WP_Block_Supports::get_instance() method is a static method used to get an instance of the WP_Block_Supports class. This method is useful for getting an instance of the class when you need to use the methods and properties of the class.
WP_Block_Supports::get_instance() #
Utility method to retrieve the main instance of the class.
Description
The instance will be created if it does not exist yet.
Return
(WP_Block_Supports) The main instance.
Source
File: wp-includes/class-wp-block-supports.php
public static function get_instance() { if ( null === self::$instance ) { self::$instance = new self(); } return self::$instance; }
Expand full source codeCollapse full source codeView on TracView on GitHub
Changelog
Version | Description |
---|---|
5.6.0 | Introduced. |