wordpress / latest / functions / wp_is_file_mod_allowed.html

wp_is_file_mod_allowed( string $context ): bool

Determines whether file modifications are allowed.

Parameters

$context string Required
The usage context.

Return

bool True if file modification is allowed, false otherwise.

Source

File: wp-includes/load.php. View all references

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 );
}

Hooks

Uses

Uses Description

Used By

Used By Description

Changelog

Version Description
4.8.0 Introduced.

© 2003–2022 WordPress Foundation
Licensed under the GNU GPLv2+ License.
https://developer.wordpress.org/reference/functions/wp_is_file_mod_allowed