PluginProbe
My WP Customize Admin/Frontend / 1.3.2
My WP Customize Admin/Frontend v1.3.2
1.27.4 1.27.3 trunk 1.0 1.1 1.1.1 1.1.2 1.1.3 1.1.4 1.1.5 1.1.6 1.10 1.10.1 1.10.2 1.11 1.12 1.12.1 1.12.2 1.13 1.13.1 1.13.2 1.14 1.15.0 1.16 1.17.0 All 76 releases
my-wp / controller / modules / mywp.controller.module.site.general.php

mywp.controller.module.site.general.php in My WP Customize Admin/Frontend 1.3.2, at controller/modules/mywp.controller.module.site.general.php

79 lines 1.2 KB
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
1 <?php
2
3 if ( ! defined( 'ABSPATH' ) ) {
4 exit;
5 }
6
7 if( ! class_exists( 'MywpControllerAbstractModule' ) ) {
8 return false;
9 }
10
11 if ( ! class_exists( 'MywpControllerModuleSiteGeneral' ) ) :
12
13 final class MywpControllerModuleSiteGeneral extends MywpControllerAbstractModule {
14
15 static protected $network = true;
16
17 static protected $id = 'site_general';
18
19 public static function mywp_controller_initial_data( $initial_data ) {
20
21 $initial_data['disable_file_edit'] = '';
22
23 return $initial_data;
24
25 }
26
27 public static function mywp_controller_default_data( $default_data ) {
28
29 $default_data['disable_file_edit'] = false;
30
31 return $default_data;
32
33 }
34
35 protected static function after_init() {
36
37 if( ! self::is_do_controller() ) {
38
39 return false;
40
41 }
42
43 self::disable_file_edit();
44
45 }
46
47 private static function disable_file_edit() {
48
49 if( ! self::is_do_function( __FUNCTION__ ) ) {
50
51 return false;
52
53 }
54
55 $setting_data = self::get_setting_data();
56
57 if( empty( $setting_data['disable_file_edit'] ) ) {
58
59 return false;
60
61 }
62
63 if( ! defined( 'DISALLOW_FILE_EDIT' ) ) {
64
65 define( 'DISALLOW_FILE_EDIT' , true );
66
67 }
68
69 self::after_do_function( __FUNCTION__ );
70
71 }
72
73 }
74
75
76 MywpControllerModuleSiteGeneral::init();
77
78 endif;
79