wpseek.com
WordPress开发者和主题制作者的搜索引擎
wp_is_ini_value_changeable › WordPress Function
Since4.6.0
已弃用n/a
› wp_is_ini_value_changeable ( $setting )
| 参数: |
|
| 链接: | |
| 返回: |
|
| 定义在: |
|
| 文档: |
Determines whether a PHP ini value is changeable at runtime.
Related Functions: wp_revisions_enabled, wp_is_valid_icon_name, wp_is_fatal_error_handler_enabled, _wp_sidebars_changed, wp_is_writable
源码
function wp_is_ini_value_changeable( $setting ) {
static $ini_all;
if ( ! isset( $ini_all ) ) {
$ini_all = false;
// Sometimes `ini_get_all()` is disabled via the `disable_functions` option for "security purposes".
if ( function_exists( 'ini_get_all' ) ) {
$ini_all = ini_get_all();
}
}
if ( isset( $ini_all[ $setting ]['access'] )
&& ( INI_ALL === $ini_all[ $setting ]['access'] || INI_USER === $ini_all[ $setting ]['access'] )
) {
return true;
}
// If we were unable to retrieve the details, fail gracefully to assume it's changeable.
if ( ! is_array( $ini_all ) ) {
return true;
}
return false;
}