Fix activation error related to server limitations
This commit is contained in:
@@ -3,7 +3,7 @@
|
|||||||
* Plugin Name: SportsPress
|
* Plugin Name: SportsPress
|
||||||
* Plugin URI: http://themeboy.com/sportspress/
|
* Plugin URI: http://themeboy.com/sportspress/
|
||||||
* Description: Manage your club and its players, staff, events, league tables, and player lists.
|
* Description: Manage your club and its players, staff, events, league tables, and player lists.
|
||||||
* Version: 1.7
|
* Version: 1.7.1
|
||||||
* Author: ThemeBoy
|
* Author: ThemeBoy
|
||||||
* Author URI: http://themeboy.com
|
* Author URI: http://themeboy.com
|
||||||
* Requires at least: 3.8
|
* Requires at least: 3.8
|
||||||
@@ -26,14 +26,14 @@ if ( ! class_exists( 'SportsPress' ) ) :
|
|||||||
* Main SportsPress Class
|
* Main SportsPress Class
|
||||||
*
|
*
|
||||||
* @class SportsPress
|
* @class SportsPress
|
||||||
* @version 1.7
|
* @version 1.7.1
|
||||||
*/
|
*/
|
||||||
final class SportsPress {
|
final class SportsPress {
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @var string
|
* @var string
|
||||||
*/
|
*/
|
||||||
public $version = '1.7';
|
public $version = '1.7.1';
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @var SporsPress The single instance of the class
|
* @var SporsPress The single instance of the class
|
||||||
@@ -254,11 +254,16 @@ final class SportsPress {
|
|||||||
* Include core modules.
|
* Include core modules.
|
||||||
*/
|
*/
|
||||||
private function include_modules() {
|
private function include_modules() {
|
||||||
$l1 = glob( $this->plugin_path() . '/modules/sportspress-?*.php', GLOB_NOSORT );
|
$dir = scandir( $this->plugin_path() . '/modules' );
|
||||||
$l2 = glob( $this->plugin_path() . '/modules/sportspress-?*/sportspress-?*.php', GLOB_NOSORT );
|
if ( $dir ) {
|
||||||
$files = array_merge( $l1, $l2 );
|
$path = $this->plugin_path() . '/modules/';
|
||||||
foreach ( $files as $filename ) {
|
foreach ( $dir as $module ) {
|
||||||
include $filename;
|
if ( $path && substr( $module, 0, 1 ) !== '.' ) {
|
||||||
|
if ( is_readable( $path . $module ) ) {
|
||||||
|
include_once( $path . $module );
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user