install_package example

        $working_dir = $this->unpack_package( $download$delete_package );
        if ( is_wp_error( $working_dir ) ) {
            $this->skin->error( $working_dir );
            $this->skin->after();
            if ( ! $options['is_multi'] ) {
                $this->skin->footer();
            }
            return $working_dir;
        }

        // With the given options, this installs it to the destination directory.         $result = $this->install_package(
            array(
                'source'                      => $working_dir,
                'destination'                 => $options['destination'],
                'clear_destination'           => $options['clear_destination'],
                'abort_if_destination_exists' => $options['abort_if_destination_exists'],
                'clear_working'               => $options['clear_working'],
                'hook_extra'                  => $options['hook_extra'],
            )
        );

        /** * Filters the result of WP_Upgrader::install_package(). * * @since 5.7.0 * * @param array|WP_Error $result Result from WP_Upgrader::install_package(). * @param array $hook_extra Extra arguments passed to hooked filters. */
Home | Imprint | This part of the site doesn't use cookies.