PluginProbe
NETSENSAI Shield / trunk
NETSENSAI Shield vtrunk
1.6.1 trunk 1.1 1.2 1.3 1.4 1.4.1 1.4.2 1.4.3 1.4.5 1.4.6 1.4.7 1.4.8 1.4.9 1.6.0
← All changes | includes/disable_file_editor.php +24 -24 1.2trunk View file →
@@ -1,24 +1,24 @@
1 -<?php
2 -// Exit if accessed directly.
3 -if ( ! defined( 'ABSPATH' ) ) {
4 - exit;
5 -}
6 -
7 -/**
8 - * Disable the built-in file editor in WordPress.
9 - *
10 - * This function disables the theme and plugin file editors in the WordPress dashboard
11 - * if the 'ns_shield_file_editor' option is enabled. Note that installing and deleting plugins remain allowed.
12 - *
13 - * @return void
14 - */
15 -function ns_shield_disable_file_editor() {
16 - if ( get_option( 'ns_shield_file_editor' ) ) {
17 - // Disable file editing if not already defined.
18 - if ( ! defined( 'DISALLOW_FILE_EDIT' ) ) {
19 - define( 'DISALLOW_FILE_EDIT', true );
20 - }
21 - }
22 -}
23 -add_action( 'init', 'ns_shield_disable_file_editor' );
24 -
1 +<?php
2 +// Exit if accessed directly.
3 +if ( ! defined( 'ABSPATH' ) ) {
4 + exit;
5 +}
6 +
7 +/**
8 + * Disable the built-in file editor in WordPress.
9 + *
10 + * This function disables the theme and plugin file editors in the WordPress dashboard
11 + * if the 'ns_shield_file_editor' option is enabled. Note that installing and deleting plugins remain allowed.
12 + *
13 + * @return void
14 + */
15 +function ns_shield_disable_file_editor() {
16 + if ( get_option( 'ns_shield_file_editor' ) ) {
17 + // Disable file editing if not already defined.
18 + if ( ! defined( 'DISALLOW_FILE_EDIT' ) ) {
19 + define( 'DISALLOW_FILE_EDIT', true );
20 + }
21 + }
22 +}
23 +add_action( 'init', 'ns_shield_disable_file_editor' );
24 +