/** * Initialization function, similar to __construct() * * @since 0.60 * * @return void */ public static function initialize() { MLATest::$wp_3dot5 = version_compare(get_bloginfo('version'), '3.5.0', '>=') && version_compare(get_bloginfo('version'), '3.5.99', '<='); MLATest::$wp_4dot3_plus = version_compare(get_bloginfo('version'), '4.2.99', '>='); /* * This is the earliest effective place to change error_reporting */ MLACore::$original_php_log = ini_get('error_log'); MLACore::$original_php_reporting = sprintf('0x%1$04X', error_reporting()); $php_reporting = trim(MLACore::mla_get_option(MLACoreOptions::MLA_DEBUG_REPLACE_PHP_REPORTING)); if (!empty($php_reporting)) { @error_reporting(0 + $php_reporting); } /* * This is the earliest effective place to localize values in other plugin components */ MLACoreOptions::mla_localize_option_definitions_array(); if (class_exists('MLASettings')) { MLASettings::mla_localize_tablist(); } if (class_exists('MLAQuery')) { MLAQuery::mla_localize_default_columns_array(); } if (class_exists('MLA_Upload_List_Table')) { MLA_Upload_List_Table::mla_localize_default_columns_array(); } if (class_exists('MLA_Upload_Optional_List_Table')) { MLA_Upload_Optional_List_Table::mla_localize_default_columns_array(); } if (class_exists('MLA_View_List_Table')) { MLA_View_List_Table::mla_localize_default_columns_array(); } }
/** * Initialization function, similar to __construct() * * @since 0.60 * * @return void */ public static function initialize() { MLATest::$wp_4dot3_plus = version_compare(get_bloginfo('version'), '4.2.99', '>='); /* * This is the earliest effective place to add E_STRICT to error_reporting */ //error_reporting( E_ALL | E_STRICT | E_DEPRECATED | E_USER_DEPRECATED | E_USER_ERROR | E_USER_WARNING ); //error_reporting( E_ALL | E_STRICT ); }
/** * Initialization function, similar to __construct() * * @since 0.60 * * @return void */ public static function initialize() { MLATest::$wp_3dot5 = version_compare(get_bloginfo('version'), '3.5.0', '>=') && version_compare(get_bloginfo('version'), '3.5.99', '<='); MLATest::$wp_4dot3_plus = version_compare(get_bloginfo('version'), '4.2.99', '>='); /* * This is the earliest effective place to change error_reporting */ //error_reporting( E_ALL | E_STRICT | E_DEPRECATED | E_USER_DEPRECATED | E_USER_ERROR | E_USER_WARNING ); //error_reporting( E_ALL | E_STRICT ); MLA::$original_php_reporting = sprintf('0x%1$04X', error_reporting()); $php_reporting = trim(MLAOptions::mla_get_option(MLAOptions::MLA_DEBUG_REPLACE_PHP_REPORTING)); if (!empty($php_reporting)) { @error_reporting(0 + $php_reporting); } /* * This is the earliest effective place to localize values in other plugin components */ MLAOptions::mla_localize_option_definitions_array(); MLASettings::mla_localize_tablist(); MLA_List_Table::mla_localize_default_columns_array(); MLA_Upload_List_Table::mla_localize_default_columns_array(); MLA_Upload_Optional_List_Table::mla_localize_default_columns_array(); MLA_View_List_Table::mla_localize_default_columns_array(); }
/** * Initialization function, similar to __construct() * * @since 0.60 * * @return void */ public static function initialize() { MLATest::$wordpress_3point5_plus = version_compare(get_bloginfo('version'), '3.5', '>='); }
* * @since 1.14 */ function mla_plugin_loader_reporting_action() { global $mla_plugin_loader_error_messages; echo '<div class="error"><p><strong>' . __('The Media Library Assistant cannot load.', 'media-library-assistant') . '</strong></p>' . "\r\n"; echo "<ul>{$mla_plugin_loader_error_messages}</ul>\r\n"; echo '<p>' . __('You must resolve these conflicts before this plugin can safely load.', 'media-library-assistant') . '</p></div>' . "\r\n"; } /* * Basic library of run-time tests. */ require_once MLA_PLUGIN_PATH . 'tests/class-mla-tests.php'; $mla_plugin_loader_error_messages .= MLATest::min_php_version('5.2'); $mla_plugin_loader_error_messages .= MLATest::min_WordPress_version('3.5.0'); if (!empty($mla_plugin_loader_error_messages)) { add_action('admin_notices', 'mla_plugin_loader_reporting_action'); } else { /* * MLATest is loaded above */ add_action('init', 'MLATest::initialize', 0x7fffffff); /* * Minimum support functions required by all other components */ require_once MLA_PLUGIN_PATH . 'includes/class-mla-core.php'; add_action('plugins_loaded', 'MLACore::mla_plugins_loaded_action', 0x7fffffff); add_action('init', 'MLACore::initialize', 0x7fffffff); /* * Front end posts/pages only need shortcode support; load the interface shims.