WP_Import::dispatch PHP Метод

dispatch() публичный Метод

Manages the three separate stages of the WXR import process
public dispatch ( )
        function dispatch()
        {
            $this->header();
            $step = empty($_GET['step']) ? 0 : (int) $_GET['step'];
            switch ($step) {
                case 0:
                    $this->greet();
                    break;
                case 1:
                    check_admin_referer('import-upload');
                    if ($this->handle_upload()) {
                        $this->import_options();
                    }
                    break;
                case 2:
                    check_admin_referer('import-wordpress');
                    $this->fetch_attachments = !empty($_POST['fetch_attachments']) && $this->allow_fetch_attachments();
                    $this->id = (int) $_POST['import_id'];
                    $file = get_attached_file($this->id);
                    set_time_limit(0);
                    $this->import($file);
                    break;
            }
            $this->footer();
        }