upgrader_package_options

過濾鉤子
apply_filters( 'upgrader_package_options', $options )
引數
  • (array) $options { Options used by the upgrader. @type string $package Package for update. @type string $destination Update location. @type bool $clear_destination Clear the destination resource. @type bool $clear_working Clear the working resource. @type bool $abort_if_destination_exists Abort if the Destination directory exists. @type bool $is_multi Whether the upgrader is running multiple times. @type array $hook_extra { Extra hook arguments. @type string $action Type of action. Default 'update'. @type string $type Type of update process. Accepts 'plugin', 'theme', or 'core'. @type bool $bulk Whether the update process is a bulk update. Default true. @type string $plugin Path to the plugin file relative to the plugins directory. @type string $theme The stylesheet or template name of the theme. @type string $language_update_type The language pack update type. Accepts 'plugin', 'theme', or 'core'. @type object $language_update The language pack update offer. } }
    Required:
定義位置
相關勾子
upgrader_pre_installupgrader_post_installupgrader_install_package_resultupdate_optionupgrader_source_selection
相關方法
update_optionpopulate_optionsadd_allowed_optionswp_default_packages_scriptsadd_screen_optionupload_space_setting
引入
4.3.0
棄用
-

upgrader_package_options:這是一個 WordPress 過濾器鉤子,允許您修改在升級過程中傳遞給升級程式的選項。 此鉤子允許您在升級過程開始之前指定其他選項或修改現有選項。

在執行更新前過濾軟體包選項。

參見{@see ‘upgrader_process_complete’}。

Plain text
Copy to clipboard
Open code in new window
EnlighterJS 3 Syntax Highlighter
$options = apply_filters( 'upgrader_package_options', $options );
$options = apply_filters( 'upgrader_package_options', $options );
$options = apply_filters( 'upgrader_package_options', $options );

常見問題

FAQs
檢視更多 >