wpseek.com
A WordPress-centric search engine for devs and theme authors



register_importer › WordPress Function

Since2.0.0
Deprecatedn/a
register_importer ( $id, $name, $description, $callback )
Parameters: (4)
  • (string) $id Importer tag. Used to uniquely identify importer.
    Required: Yes
  • (string) $name Importer name and title.
    Required: Yes
  • (string) $description Importer description.
    Required: Yes
  • (callable) $callback Callback to run.
    Required: Yes
Returns:
  • (void|WP_Error) Void on success. WP_Error when $callback is WP_Error.
Defined at:
Codex:

Registers importer for WordPress.



Source

function register_importer( $id, $name, $description, $callback ) {
	global $wp_importers;
	if ( is_wp_error( $callback ) ) {
		return $callback;
	}
	$wp_importers[ $id ] = array( $name, $description, $callback );
}