MC Gallery PRO: Dieses Plugin benötigt PHP 7.0 oder höher.

'; }); } return; } if (defined('MCGALLERY_PRO_VERSION')) { return; } define('MCGALLERY_PRO_VERSION', '2.5.2'); define('MCGALLERY_PRO_DIR', plugin_dir_path(__FILE__)); define('MCGALLERY_PRO_URL', plugin_dir_url(__FILE__)); define('MCGALLERY_TOKEN_TTL', 300); define('MCGALLERY_OPTION_KEY', 'mc_gallery_tokens_store'); function mc_gallery_pro_safe_require($path) { if (!file_exists($path)) { if (is_admin()) { add_action('admin_notices', function() use ($path) { echo '

MC Gallery PRO Fehler: Datei nicht gefunden: ' . esc_html($path) . '.

'; }); } return false; } require_once $path; return true; } function mc_gallery_pro_load_textdomain() { load_plugin_textdomain('mc-multiserver-gallery-pro', false, basename(dirname(__FILE__)) . '/languages'); } add_action('plugins_loaded', 'mc_gallery_pro_load_textdomain'); $core_files = [ 'class-mc-gallery-helpers.php', 'class-mc-gallery-core.php', 'class-mc-gallery-shortcodes.php' ]; if (!is_dir(MCGALLERY_PRO_DIR . 'includes')) { add_action('admin_notices', function() { echo '

MC Gallery PRO Fehler: Der Ordner includes/ fehlt.

'; }); } else { foreach ($core_files as $file) { if (!mc_gallery_pro_safe_require(MCGALLERY_PRO_DIR . 'includes/' . $file)) { return; } } } function mc_gallery_pro_activate_callback() { if (class_exists('MC_Gallery_Core')) { if (!get_option(MC_Gallery_Core::OPTION_THUMB_H)) { update_option(MC_Gallery_Core::OPTION_THUMB_H, 200); } } if (get_option(MCGALLERY_OPTION_KEY) === false) { update_option(MCGALLERY_OPTION_KEY, []); } } register_activation_hook(__FILE__, 'mc_gallery_pro_activate_callback'); function mc_gallery_pro_uninstall_callback() { delete_option(MCGALLERY_OPTION_KEY); if (class_exists('MC_Gallery_Core')) { delete_option(MC_Gallery_Core::OPTION_THUMB_H); } } register_uninstall_hook(__FILE__, 'mc_gallery_pro_uninstall_callback'); if (class_exists('MC_Gallery_Core')) { add_action('plugins_loaded', ['MC_Gallery_Core', 'init']); } if (class_exists('MC_Gallery_Shortcodes')) { add_action('plugins_loaded', ['MC_Gallery_Shortcodes', 'init']); }