PluginProbe
Polylang / 3.1
Polylang v3.1
3.8.9 3.8.8 3.8.7 3.8.6 3.8.5 3.8.4 3.8.3 2.7 2.7.0.1 2.7.1 2.7.2 2.7.3 2.7.4 2.8 2.8.1 2.8.2 2.8.3 2.8.4 2.9 2.9.1 2.9.2 3.0 3.0.1 3.0.2 3.0.3 All 233 releases
← All changes | include/class-polylang.php +9 -2 2.93.1 View file →
@@ -127,8 +127,10 @@
127 127 * Defines constants
128 128 * May be overridden by a plugin if set before plugins_loaded, 1
129 129 *
130 130 * @since 1.6
131 + *
132 + * @return void
131 133 */
132 134 public static function define_constants() {
133 135 // Cookie name. no cookie will be used if set to false
134 136 if ( ! defined( 'PLL_COOKIE' ) ) {
@@ -155,8 +157,10 @@
155 157 * Polylang initialization
156 158 * setups models and separate admin and frontend
157 159 *
158 160 * @since 1.2
161 + *
162 + * @return void
159 163 */
160 164 public function init() {
161 165 global $polylang;
162 166
@@ -236,10 +240,13 @@
236 240
237 241 require_once __DIR__ . '/api.php'; // Loads the API
238 242
239 243 // Loads the modules.
240 - foreach ( glob( POLYLANG_DIR . '/modules/*/load.php', GLOB_NOSORT ) as $load_script ) {
241 - require_once $load_script; // phpcs:ignore WordPressVIPMinimum.Files.IncludingFile.UsingVariable
244 + $load_scripts = glob( POLYLANG_DIR . '/modules/*/load.php', GLOB_NOSORT );
245 + if ( is_array( $load_scripts ) ) {
246 + foreach ( $load_scripts as $load_script ) {
247 + require_once $load_script; // phpcs:ignore WordPressVIPMinimum.Files.IncludingFile.UsingVariable
248 + }
242 249 }
243 250
244 251 $polylang->init();
245 252