/** * Registers the WP Test Stream Wrapper * * Helper function that prepares the WordPress Test Stream Wrapper for use. * * @since 1.0.0 */ function wp_test_stream_wrapper_register() { $scheme = 'test'; // Wrapper scheme // Wrapper registration metadata $wrapper_metadata = array('name' => 'WP Test Stream Wrapper', 'class' => 'WP_Test_Stream_Wrapper', 'description' => 'WP Test Stream Wrapper provides a simple extension of the WP_Local_Stream_Wrapper_Base class.'); // Register this wrapper WP_Stream_Wrapper_Registry::register_wrapper($scheme, $wrapper_metadata); }
/** * Registers the WP Local Stream Wrapper * * Information about this stream wrapper: * * Scheme : local * Class : WP_Local_Stream_Wrapper * Description: WP Local Stream Wrapper provides a simple example of * leveraging the WP_Local_Stream_Wrapper_Base class to create * simple wrappers capable of manipulating local files. * * @since 1.0.0 */ function wp_local_stream_wrapper_register() { $scheme = 'local'; // Wrapper scheme // Wrapper registration metadata $wrapper_metadata = array('name' => 'WP Local Stream Wrapper', 'class' => 'WP_Local_Stream_Wrapper', 'description' => 'WP Local Stream Wrapper provides a simple example of leveraging the WP_Local_Stream_Wrapper_Base class to create simple wrappers capable of manipulating local files.'); /** * This file contains the WP Local Stream wrapper implementation */ require_once 'wp-local-stream-wrapper-class.php'; // Register this wrapper WP_Stream_Wrapper_Registry::register_wrapper($scheme, $wrapper_metadata); }