PluginProbe
Visual Composer Website Builder / 45.16.4
Visual Composer Website Builder v45.16.4
45.16.4 45.16.3 45.16.2 45.16.1 45.2-beta.1 45.2-beta.2 45.2.0 45.3-beta.1 45.3.0 45.4-beta.1 45.4.0 45.4.1 45.4.1-beta.2 45.5-beta.1 45.5.0 45.6-beta.1 45.6.0 45.7-beta.1 45.7.0 45.8-beta.1 45.8.0 45.9.0 trunk 45.0 45.0-beta.1 All 42 releases
← All changes | visualcomposer/Requirements.php +25 -1 45.3-beta.1 → 45.16.4 View file →
@@ -52,9 +52,9 @@
52 52 * @return array
53 53 */
54 54 public function getCoreChecksMessage()
55 55 {
56 - $messages = [];
56 + $messages = array();
57 57
58 58 //TODO: Return VCV_REQUIRED_PHP_VERSION after few releases
59 59 if (!self::checkVersion(7.4, PHP_VERSION)) {
60 60 $messages[] = sprintf('PHP version %s or greater is required', 7.4);
@@ -72,8 +72,11 @@
72 72 }
73 73 if (!function_exists('zlib_decode')) {
74 74 $messages[] = 'The zip extension must be loaded zlib_decode() is not defined';
75 75 }
76 + if (!$this->checkFileSystemStatus()) {
77 + $messages[] = 'Wordpress file system should be enabled, try to define FS_METHOD constant in wp-config.php or check your server filesystem configurations';
78 + }
76 79
77 80 return $messages;
78 81 }
79 82
@@ -104,6 +107,27 @@
104 107 return false;
105 108 }
106 109
107 110 return true;
111 + }
112 +
113 + /**
114 + * Get filesystem status.
115 + *
116 + * @return false
117 + */
118 + public function checkFileSystemStatus()
119 + {
120 + // @codingStandardsIgnoreLine
121 + global $wp_filesystem;
122 +
123 + $status = true;
124 + // @codingStandardsIgnoreLine
125 + if (!$wp_filesystem || !is_object($wp_filesystem)) {
126 + require_once(ABSPATH . '/wp-admin/includes/file.php');
127 + $status = WP_Filesystem(false, false, true);
128 + }
129 +
130 + // @codingStandardsIgnoreLine
131 + return $status ? $wp_filesystem : false;
108 132 }
109 133 }