-
Notifications
You must be signed in to change notification settings - Fork 13
/
Copy pathgecka-submenu.php
54 lines (43 loc) · 1.86 KB
/
gecka-submenu.php
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
<?php
/*
Plugin Name: Gecka Submenu
Plugin URI: http://gecka-apps.com/wordpress-plugins/geka-submenu/
Description: Enhances the worpdress nav menu system
Version: 0.5.3
Author: Gecka
Author URI: http://gecka-apps.com
Licence: GPL2
*/
/* Copyright 2010 Gecka SARL (email: [email protected]). All rights reserved
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License, version 2, as
published by the Free Software Foundation.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
*/
// require PHP 5
function gksm_activation_check(){
if (version_compare(PHP_VERSION, '5.0.0', '<')) {
deactivate_plugins( basename(dirname(__FILE__)) . '/' . basename(__FILE__) ); // Deactivate ourself
wp_die("Sorry, Gecka Submenu requires PHP 5 or higher. Ask your host how to enable PHP 5 as the default on your servers.");
}
update_option( 'gecka-submenu-pro-notice', '1');
}
register_activation_hook(__FILE__, 'gksm_activation_check');
define('GKSM_PATH' , WP_PLUGIN_DIR . "/" . plugin_basename(dirname(__FILE__)) );
define('GKSM_URL' , WP_PLUGIN_URL . "/" . plugin_basename(dirname(__FILE__)) );
//needed global vars for widget usage
$GKSM_ID = $GKSM_MENUID = null;
require GKSM_PATH . '/gecka-submenu.class.php';
// Instantiate the class
if (class_exists('Gecka_Submenu')) {
if (!isset($GkSm)) {
include GKSM_PATH . '/models/Submenu.php';
$GkSm = new Gecka_Submenu();
}
}