register_importer()
Registers importer for WordPress.
No Hooks.
Returns
null|WP_Error. Void on success. WP_Error when $callback is WP_Error.
Usage
register_importer( $id, $name, $description, $callback );
- $id(string) (required)
- Importer tag. Used to uniquely identify importer.
- $name(string) (required)
- Importer name and title.
- $description(string) (required)
- Importer description.
- $callback(callable) (required)
- Callback to run.
Notes
- Global. Array.
$wp_importers
Changelog
| Since 2.0.0 | Introduced. |
register_importer() register importer code WP 7.0.1
function register_importer( $id, $name, $description, $callback ) {
global $wp_importers;
if ( is_wp_error( $callback ) ) {
return $callback;
}
$wp_importers[ $id ] = array( $name, $description, $callback );
}