value pair for each `classname => instance` in self::$_instance * for each sub-class. */ $called_class = get_called_class(); if ( ! isset( $instance[ $called_class ] ) ) { $instance[ $called_class ] = new $called_class(); /** * Dependent items can use the all_about_modal_singleton_init_{$called_class} hook to execute code */ do_action( sprintf( 'all_about_modal_singleton_init_%s', $called_class ) ); // phpcs:ignore WordPress.NamingConventions.ValidHookName.UseUnderscores } return $instance[ $called_class ]; } } // End trait