file_mod_allowed

過濾鉤子
apply_filters( 'file_mod_allowed', ! defined( 'DISALLOW_FILE_MODS' )
引數
  • (bool) $file_mod_allowed Whether file modifications are allowed.
    Required:
  • (string) $context The usage context.
    Required:
定義位置
相關勾子
get_space_allowedfilesystem_method_filesite_allowed_themesnetwork_allowed_themesprofile_update
相關方法
wp_is_file_mod_allowedapache_mod_loadedget_space_allowedremove_allowed_optionsrest_send_allow_headeris_blog_installed
引入
4.8.0
棄用
-

file_mod_allowed是一個過濾器鉤子,允許開發者改變WordPress在修改檔案時的預設行為。預設情況下,檔案修改是允許的,但這個鉤子可以用來阻止檔案修改,返回false。

過濾是否允許修改檔案。

Plain text
Copy to clipboard
Open code in new window
EnlighterJS 3 Syntax Highlighter
return apply_filters( 'file_mod_allowed', ! defined( 'DISALLOW_FILE_MODS' ) || ! DISALLOW_FILE_MODS, $context );
return apply_filters( 'file_mod_allowed', ! defined( 'DISALLOW_FILE_MODS' ) || ! DISALLOW_FILE_MODS, $context );
return apply_filters( 'file_mod_allowed', ! defined( 'DISALLOW_FILE_MODS' ) || ! DISALLOW_FILE_MODS, $context );

常見問題

FAQs
檢視更多 >