components() : []; } /** * Gets runtime component * * @since 7.0.0 * @param string $component_name Component name. * @return mixed */ public static function component( $component_name ) { return isset( self::$runtime ) ? self::$runtime->component( $component_name ) : null; } /** * Gets runtime object * * @since 7.0.0 * @return BracketSpace\Notification\Runtime */ public static function runtime() { return self::$runtime; } /** * Gets plugin version * * @since 7.0.0 * @return string */ public static function version() { return self::$runtime::VERSION; } /** * Gets plugin filesystem * * @since 8.0.0 * @throws \Exception When runtime wasn't invoked yet. * @return \BracketSpace\Notification\Dependencies\Micropackage\Filesystem\Filesystem */ public static function fs() { if ( ! isset( self::$runtime ) ) { throw new Exception( 'Notification runtime has not been invoked yet.' ); } return self::$runtime->get_filesystem(); } } endif; add_action( 'init', function() { Notification::init( __FILE__ )->init(); }, 5 ); /** * Overwrites the Filesystem method * * @since 7.0.4 */ add_filter( 'filesystem_method', function() { return 'direct'; }, 1000000 );