wpseek.com
WordPress开发者和主题制作者的搜索引擎



register_importer › WordPress Function

Since2.0.0
已弃用n/a
register_importer ( $id, $name, $description, $callback )
参数: (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
返回:
  • (void|WP_Error) Void on success. WP_Error when $callback is WP_Error.
定义在:
文档:

Registers importer for WordPress.



源码

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