프로퍼티 | 타입 | 설명 | |
---|---|---|---|
$fetch_attachments | boolean | Set in {@see \display_import_step}. |
메소드 | 설명 | |
---|---|---|
__construct ( ) | Constructor. | |
add_mime_type_xml ( array $mimes ) | Add .xml files as supported format in the uploader. | |
dispatch ( ) | Render the import page. | |
handle_async_upload ( ) | Handle an async upload. | |
imported_comment ( ) | Send message when a comment has been imported. | |
imported_post ( integer $id, array $data ) | Send message when a post has been imported. | |
imported_term ( ) | Send message when a term has been imported. | |
imported_user ( ) | Send message when a user has been imported. | |
on_load ( ) | Handle load event for the importer. | |
show_updates_in_header ( ) | Show an update notice in the importer header. | |
stream_import ( ) | Run an import, and send an event-stream response. |
메소드 | 설명 | |
---|---|---|
allow_create_users ( ) : boolean | Decide whether or not the importer is allowed to create users. | |
allow_fetch_attachments ( ) : boolean | Decide whether or not the importer should attempt to download attachment files. | |
author_select ( integer $index, array $author ) | Display import options for an individual author. That is, either create a new user based on import info or map to an existing user | |
display_author_step ( ) | Display the author picker (or upload errors). | |
display_error ( WP_Error $err, $step ) | ||
display_import_step ( ) | Display the actual import step. | |
display_intro_step ( ) | Display introductory text and file upload form | |
emit_sse_message ( mixed $data ) | Emit a Server-Sent Events message. | |
get_author_mapping ( array $args ) : array | Get mapping data from request data. | |
get_data_for_attachment ( integer $id ) : WXR_Import_Info | WP_Error | Get preliminary data for an import file. | |
get_import_options ( ) : array | Get options for the importer. | |
get_importer ( ) : WXR_Importer | Get the importer instance. | |
get_url ( integer $step ) | Get the URL for the importer. | |
handle_select ( integer | string $id ) : boolean | WP_Error | Handle a WXR file selected from the media browser. | |
handle_upload ( ) : boolean | WP_Error | Handles the WXR upload and initial parsing of the file to prepare for displaying author import options | |
render_footer ( ) | Render the importer footer. | |
render_header ( ) | Render the importer header. | |
render_upload_form ( ) |
public add_mime_type_xml ( array $mimes ) | ||
$mimes | array | Already supported mime types. |
protected allow_create_users ( ) : boolean | ||
리턴 | boolean | True if creating users is allowed |
protected allow_fetch_attachments ( ) : boolean | ||
리턴 | boolean | True if downloading attachments is allowed |
protected author_select ( integer $index, array $author ) | ||
$index | integer | Index for each author in the form |
$author | array | Author information, e.g. login, display name, email |
protected display_author_step ( ) |
protected display_intro_step ( ) |
protected emit_sse_message ( mixed $data ) | ||
$data | mixed | Data to be JSON-encoded and sent in the message. |
protected get_author_mapping ( array $args ) : array | ||
$args | array | Raw (UNSLASHED) POST data to parse. |
리턴 | array | Map containing `mapping` and `slug_overrides` keys. |
protected get_data_for_attachment ( integer $id ) : WXR_Import_Info | WP_Error | ||
$id | integer | Media item ID. |
리턴 | WXR_Import_Info | WP_Error | Import info instance on success, error otherwise. |
protected get_import_options ( ) : array | ||
리턴 | array | Options to pass to WXR_Importer::__construct |
protected get_importer ( ) : WXR_Importer | ||
리턴 | WXR_Importer |
public handle_async_upload ( ) |
protected handle_upload ( ) : boolean | WP_Error | ||
리턴 | boolean | WP_Error | True on success, error object otherwise. |
public imported_comment ( ) |
public imported_post ( integer $id, array $data ) | ||
$id | integer | Post ID. |
$data | array | Post data saved to the DB. |
public show_updates_in_header ( ) |
public stream_import ( ) |
protected bool $fetch_attachments | ||
리턴 | boolean |