wp_is_file_mod_allowed

函数
wp_is_file_mod_allowed ( $context )
参数
  • (string) $context The usage context.
    Required:
返回值
  • (bool) True if file modification is allowed, false otherwise.
定义位置
相关方法
wp_json_file_decodewp_kses_allowed_htmlwp_is_maintenance_modewp_is_recovery_modewp_is_site_initialized
引入
4.8.0
弃用
-

Determines whether file modifications are allowed.

function wp_is_file_mod_allowed( $context ) {
	/**
	 * Filters whether file modifications are allowed.
	 *
	 * @since 4.8.0
	 *
	 * @param bool   $file_mod_allowed Whether file modifications are allowed.
	 * @param string $context          The usage context.
	 */
	return apply_filters( 'file_mod_allowed', ! defined( 'DISALLOW_FILE_MODS' ) || ! DISALLOW_FILE_MODS, $context );
}