- Timestamp:
- 01/25/2024 07:51:12 AM (3 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/wp-includes/l10n/class-wp-translation-controller.php
r57339 r57350 43 43 44 44 /** 45 * Returns the WP_Translation_Controller singleton. 45 * Container for the main instance of the class. 46 * 47 * @since 6.5.0 48 * @var WP_Translation_Controller|null 49 */ 50 private static $instance = null; 51 52 /** 53 * Utility method to retrieve the main instance of the class. 54 * 55 * The instance will be created if it does not exist yet. 46 56 * 47 57 * @since 6.5.0 … … 49 59 * @return WP_Translation_Controller 50 60 */ 51 public static function instance(): WP_Translation_Controller { 52 static $instance; 53 54 if ( ! $instance ) { 55 $instance = new self(); 56 } 57 58 return $instance; 61 public static function get_instance(): WP_Translation_Controller { 62 if ( null === self::$instance ) { 63 self::$instance = new self(); 64 } 65 66 return self::$instance; 59 67 } 60 68
Note:
See TracChangeset
for help on using the changeset viewer.
![(please configure the [header_logo] section in trac.ini)](/chrome/site/your_project_logo.png)