web/wp-content/plugins/exec-php/includes/const.php
author hurons@caf4f556-3d62-0410-8435-a86758001935
Mon, 01 Feb 2010 09:51:57 +0000
branchwordpress
changeset 123 561aa6d282f6
permissions -rw-r--r--
pre production version : ****************************** Template evolution : - css ( so much things) - js ( new navigation tools ...) - lib for php ZIp - function.php (for download LDT and other litle function) - page (header, home, footer, single, search, searchform, post ...) ****************************** New plug in : - wp touch - wp explorer - TextCutter - ultimate-google-analytics - nice titles ****************************** Plug in customization : - related-posts-by-category - posts-of-current-category - order-categories - event-calendar - translation wp explorer - exec-php ****************************** Road map for next version : - cleaning php code put template function to new plugin - cleaning Css code - re organize Js code - all new correction ask
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
123
561aa6d282f6 pre production version :
hurons@caf4f556-3d62-0410-8435-a86758001935
parents:
diff changeset
     1
<?php
561aa6d282f6 pre production version :
hurons@caf4f556-3d62-0410-8435-a86758001935
parents:
diff changeset
     2
561aa6d282f6 pre production version :
hurons@caf4f556-3d62-0410-8435-a86758001935
parents:
diff changeset
     3
// -----------------------------------------------------------------------------
561aa6d282f6 pre production version :
hurons@caf4f556-3d62-0410-8435-a86758001935
parents:
diff changeset
     4
// the ExecPhp_Const function defines plugin wide constants
561aa6d282f6 pre production version :
hurons@caf4f556-3d62-0410-8435-a86758001935
parents:
diff changeset
     5
// -----------------------------------------------------------------------------
561aa6d282f6 pre production version :
hurons@caf4f556-3d62-0410-8435-a86758001935
parents:
diff changeset
     6
561aa6d282f6 pre production version :
hurons@caf4f556-3d62-0410-8435-a86758001935
parents:
diff changeset
     7
if (!class_exists('ExecPhp_Const')) :
561aa6d282f6 pre production version :
hurons@caf4f556-3d62-0410-8435-a86758001935
parents:
diff changeset
     8
561aa6d282f6 pre production version :
hurons@caf4f556-3d62-0410-8435-a86758001935
parents:
diff changeset
     9
define('ExecPhp_VERSION', '4.9');
561aa6d282f6 pre production version :
hurons@caf4f556-3d62-0410-8435-a86758001935
parents:
diff changeset
    10
define('ExecPhp_PLUGIN_ID', 'exec-php');
561aa6d282f6 pre production version :
hurons@caf4f556-3d62-0410-8435-a86758001935
parents:
diff changeset
    11
561aa6d282f6 pre production version :
hurons@caf4f556-3d62-0410-8435-a86758001935
parents:
diff changeset
    12
// relative path of stored plugins to ABSPATH; only required for WP < 2.6
561aa6d282f6 pre production version :
hurons@caf4f556-3d62-0410-8435-a86758001935
parents:
diff changeset
    13
global $wp_version;
561aa6d282f6 pre production version :
hurons@caf4f556-3d62-0410-8435-a86758001935
parents:
diff changeset
    14
if (version_compare($wp_version, '2.6.dev') >= 0)
561aa6d282f6 pre production version :
hurons@caf4f556-3d62-0410-8435-a86758001935
parents:
diff changeset
    15
{
561aa6d282f6 pre production version :
hurons@caf4f556-3d62-0410-8435-a86758001935
parents:
diff changeset
    16
	// relative path of plugin to PLUGINDIR
561aa6d282f6 pre production version :
hurons@caf4f556-3d62-0410-8435-a86758001935
parents:
diff changeset
    17
	$execphp_path = str_replace('\\', '/', dirname(dirname(__FILE__)));
561aa6d282f6 pre production version :
hurons@caf4f556-3d62-0410-8435-a86758001935
parents:
diff changeset
    18
	$execphp_plugin_path = str_replace('\\', '/', WP_PLUGIN_DIR);
561aa6d282f6 pre production version :
hurons@caf4f556-3d62-0410-8435-a86758001935
parents:
diff changeset
    19
	define('ExecPhp_HOMEDIR', trim(str_replace($execphp_plugin_path, '', $execphp_path), '/'));
561aa6d282f6 pre production version :
hurons@caf4f556-3d62-0410-8435-a86758001935
parents:
diff changeset
    20
}
561aa6d282f6 pre production version :
hurons@caf4f556-3d62-0410-8435-a86758001935
parents:
diff changeset
    21
else
561aa6d282f6 pre production version :
hurons@caf4f556-3d62-0410-8435-a86758001935
parents:
diff changeset
    22
{
561aa6d282f6 pre production version :
hurons@caf4f556-3d62-0410-8435-a86758001935
parents:
diff changeset
    23
	// ExecPhp_PLUGINDIR only available for WP < 2.6
561aa6d282f6 pre production version :
hurons@caf4f556-3d62-0410-8435-a86758001935
parents:
diff changeset
    24
	if (defined('PLUGINDIR'))
561aa6d282f6 pre production version :
hurons@caf4f556-3d62-0410-8435-a86758001935
parents:
diff changeset
    25
		define('ExecPhp_PLUGINDIR', PLUGINDIR);
561aa6d282f6 pre production version :
hurons@caf4f556-3d62-0410-8435-a86758001935
parents:
diff changeset
    26
	else
561aa6d282f6 pre production version :
hurons@caf4f556-3d62-0410-8435-a86758001935
parents:
diff changeset
    27
		define('ExecPhp_PLUGINDIR', 'wp-content/plugins');
561aa6d282f6 pre production version :
hurons@caf4f556-3d62-0410-8435-a86758001935
parents:
diff changeset
    28
561aa6d282f6 pre production version :
hurons@caf4f556-3d62-0410-8435-a86758001935
parents:
diff changeset
    29
	// relative path of plugin to PLUGINDIR
561aa6d282f6 pre production version :
hurons@caf4f556-3d62-0410-8435-a86758001935
parents:
diff changeset
    30
	$execphp_path = str_replace('\\', '/', dirname(dirname(__FILE__)));
561aa6d282f6 pre production version :
hurons@caf4f556-3d62-0410-8435-a86758001935
parents:
diff changeset
    31
	$execphp_offset = 0;
561aa6d282f6 pre production version :
hurons@caf4f556-3d62-0410-8435-a86758001935
parents:
diff changeset
    32
	while (($execphp_n = strpos($execphp_path, ExecPhp_PLUGINDIR, $execphp_offset)) !== false)
561aa6d282f6 pre production version :
hurons@caf4f556-3d62-0410-8435-a86758001935
parents:
diff changeset
    33
		$execphp_offset = $execphp_n + 1;
561aa6d282f6 pre production version :
hurons@caf4f556-3d62-0410-8435-a86758001935
parents:
diff changeset
    34
	define('ExecPhp_HOMEDIR', substr($execphp_path, $execphp_offset + strlen(ExecPhp_PLUGINDIR)));
561aa6d282f6 pre production version :
hurons@caf4f556-3d62-0410-8435-a86758001935
parents:
diff changeset
    35
}
561aa6d282f6 pre production version :
hurons@caf4f556-3d62-0410-8435-a86758001935
parents:
diff changeset
    36
561aa6d282f6 pre production version :
hurons@caf4f556-3d62-0410-8435-a86758001935
parents:
diff changeset
    37
if (defined('WP_PLUGIN_DIR'))
561aa6d282f6 pre production version :
hurons@caf4f556-3d62-0410-8435-a86758001935
parents:
diff changeset
    38
	define('ExecPhp_HOME_DIR', WP_PLUGIN_DIR. '/'. ExecPhp_HOMEDIR);
561aa6d282f6 pre production version :
hurons@caf4f556-3d62-0410-8435-a86758001935
parents:
diff changeset
    39
else
561aa6d282f6 pre production version :
hurons@caf4f556-3d62-0410-8435-a86758001935
parents:
diff changeset
    40
	define('ExecPhp_HOME_DIR', ABSPATH. ExecPhp_PLUGINDIR. '/'. ExecPhp_HOMEDIR);
561aa6d282f6 pre production version :
hurons@caf4f556-3d62-0410-8435-a86758001935
parents:
diff changeset
    41
561aa6d282f6 pre production version :
hurons@caf4f556-3d62-0410-8435-a86758001935
parents:
diff changeset
    42
if (defined('WP_PLUGIN_URL'))
561aa6d282f6 pre production version :
hurons@caf4f556-3d62-0410-8435-a86758001935
parents:
diff changeset
    43
	define('ExecPhp_HOME_URL', WP_PLUGIN_URL. '/'. ExecPhp_HOMEDIR);
561aa6d282f6 pre production version :
hurons@caf4f556-3d62-0410-8435-a86758001935
parents:
diff changeset
    44
else
561aa6d282f6 pre production version :
hurons@caf4f556-3d62-0410-8435-a86758001935
parents:
diff changeset
    45
	define('ExecPhp_HOME_URL', get_option('siteurl'). '/'. ExecPhp_PLUGINDIR. '/'. ExecPhp_HOMEDIR);
561aa6d282f6 pre production version :
hurons@caf4f556-3d62-0410-8435-a86758001935
parents:
diff changeset
    46
561aa6d282f6 pre production version :
hurons@caf4f556-3d62-0410-8435-a86758001935
parents:
diff changeset
    47
define('ExecPhp_CAPABILITY_EXECUTE_WIDGETS', 'switch_themes');
561aa6d282f6 pre production version :
hurons@caf4f556-3d62-0410-8435-a86758001935
parents:
diff changeset
    48
define('ExecPhp_CAPABILITY_EXECUTE_ARTICLES', 'exec_php');
561aa6d282f6 pre production version :
hurons@caf4f556-3d62-0410-8435-a86758001935
parents:
diff changeset
    49
define('ExecPhp_CAPABILITY_WRITE_PHP', 'unfiltered_html');
561aa6d282f6 pre production version :
hurons@caf4f556-3d62-0410-8435-a86758001935
parents:
diff changeset
    50
define('ExecPhp_CAPABILITY_EDIT_PLUGINS', 'edit_plugins');
561aa6d282f6 pre production version :
hurons@caf4f556-3d62-0410-8435-a86758001935
parents:
diff changeset
    51
define('ExecPhp_CAPABILITY_EDIT_USERS', 'edit_users');
561aa6d282f6 pre production version :
hurons@caf4f556-3d62-0410-8435-a86758001935
parents:
diff changeset
    52
define('ExecPhp_CAPABILITY_EDIT_OTHERS_POSTS', 'edit_others_posts');
561aa6d282f6 pre production version :
hurons@caf4f556-3d62-0410-8435-a86758001935
parents:
diff changeset
    53
define('ExecPhp_CAPABILITY_EDIT_OTHERS_PAGES', 'edit_others_pages');
561aa6d282f6 pre production version :
hurons@caf4f556-3d62-0410-8435-a86758001935
parents:
diff changeset
    54
define('ExecPhp_CAPABILITY_EDIT_OTHERS_PHP', 'edit_others_php');
561aa6d282f6 pre production version :
hurons@caf4f556-3d62-0410-8435-a86758001935
parents:
diff changeset
    55
561aa6d282f6 pre production version :
hurons@caf4f556-3d62-0410-8435-a86758001935
parents:
diff changeset
    56
define('ExecPhp_STATUS_OKAY', 0);
561aa6d282f6 pre production version :
hurons@caf4f556-3d62-0410-8435-a86758001935
parents:
diff changeset
    57
define('ExecPhp_STATUS_UNINITIALIZED', 1);
561aa6d282f6 pre production version :
hurons@caf4f556-3d62-0410-8435-a86758001935
parents:
diff changeset
    58
define('ExecPhp_STATUS_PLUGIN_VERSION_MISMATCH', 2);
561aa6d282f6 pre production version :
hurons@caf4f556-3d62-0410-8435-a86758001935
parents:
diff changeset
    59
561aa6d282f6 pre production version :
hurons@caf4f556-3d62-0410-8435-a86758001935
parents:
diff changeset
    60
define('ExecPhp_ACTION_REQUEST_USERS', 'execphp_request_users');
561aa6d282f6 pre production version :
hurons@caf4f556-3d62-0410-8435-a86758001935
parents:
diff changeset
    61
define('ExecPhp_REQUEST_FEATURE_SECURITY_HOLE', 'security_hole');
561aa6d282f6 pre production version :
hurons@caf4f556-3d62-0410-8435-a86758001935
parents:
diff changeset
    62
define('ExecPhp_REQUEST_FEATURE_WIDGETS', 'widgets');
561aa6d282f6 pre production version :
hurons@caf4f556-3d62-0410-8435-a86758001935
parents:
diff changeset
    63
define('ExecPhp_REQUEST_FEATURE_EXECUTE_ARTICLES', 'execute_articles');
561aa6d282f6 pre production version :
hurons@caf4f556-3d62-0410-8435-a86758001935
parents:
diff changeset
    64
561aa6d282f6 pre production version :
hurons@caf4f556-3d62-0410-8435-a86758001935
parents:
diff changeset
    65
define('ExecPhp_POST_WIDGET_SUPPORT', 'execphp_widget_support');
561aa6d282f6 pre production version :
hurons@caf4f556-3d62-0410-8435-a86758001935
parents:
diff changeset
    66
define('ExecPhp_POST_WYSIWYG_WARNING', 'execphp_wysiwyg_warning');
561aa6d282f6 pre production version :
hurons@caf4f556-3d62-0410-8435-a86758001935
parents:
diff changeset
    67
561aa6d282f6 pre production version :
hurons@caf4f556-3d62-0410-8435-a86758001935
parents:
diff changeset
    68
define('ExecPhp_ID_CONFIG_FORM', 'execphp-configuration');
561aa6d282f6 pre production version :
hurons@caf4f556-3d62-0410-8435-a86758001935
parents:
diff changeset
    69
define('ExecPhp_ID_INFO_FORM', 'execphp-information');
561aa6d282f6 pre production version :
hurons@caf4f556-3d62-0410-8435-a86758001935
parents:
diff changeset
    70
561aa6d282f6 pre production version :
hurons@caf4f556-3d62-0410-8435-a86758001935
parents:
diff changeset
    71
define('ExecPhp_ID_INFO_SECURITY_HOLE', 'execphp-security-hole');
561aa6d282f6 pre production version :
hurons@caf4f556-3d62-0410-8435-a86758001935
parents:
diff changeset
    72
define('ExecPhp_ID_INFO_WIDGETS', 'execphp-widgets');
561aa6d282f6 pre production version :
hurons@caf4f556-3d62-0410-8435-a86758001935
parents:
diff changeset
    73
define('ExecPhp_ID_INFO_EXECUTE_ARTICLES', 'execphp-execute-articles');
561aa6d282f6 pre production version :
hurons@caf4f556-3d62-0410-8435-a86758001935
parents:
diff changeset
    74
define('ExecPhp_ID_MESSAGE', 'execphp-message');
561aa6d282f6 pre production version :
hurons@caf4f556-3d62-0410-8435-a86758001935
parents:
diff changeset
    75
561aa6d282f6 pre production version :
hurons@caf4f556-3d62-0410-8435-a86758001935
parents:
diff changeset
    76
define('ExecPhp_ID_SCRIPT_COMMON', 'execphp_common');
561aa6d282f6 pre production version :
hurons@caf4f556-3d62-0410-8435-a86758001935
parents:
diff changeset
    77
define('ExecPhp_ID_SCRIPT_ADMIN', 'execphp_admin');
561aa6d282f6 pre production version :
hurons@caf4f556-3d62-0410-8435-a86758001935
parents:
diff changeset
    78
define('ExecPhp_ID_L10N_COMMON', 'execphpCommonL10n');
561aa6d282f6 pre production version :
hurons@caf4f556-3d62-0410-8435-a86758001935
parents:
diff changeset
    79
define('ExecPhp_ID_L10N_ADMIN', 'execphpAdminL10n');
561aa6d282f6 pre production version :
hurons@caf4f556-3d62-0410-8435-a86758001935
parents:
diff changeset
    80
define('ExecPhp_ID_STYLE_ADMIN', 'execphp_admin');
561aa6d282f6 pre production version :
hurons@caf4f556-3d62-0410-8435-a86758001935
parents:
diff changeset
    81
561aa6d282f6 pre production version :
hurons@caf4f556-3d62-0410-8435-a86758001935
parents:
diff changeset
    82
class ExecPhp_Const
561aa6d282f6 pre production version :
hurons@caf4f556-3d62-0410-8435-a86758001935
parents:
diff changeset
    83
{
561aa6d282f6 pre production version :
hurons@caf4f556-3d62-0410-8435-a86758001935
parents:
diff changeset
    84
}
561aa6d282f6 pre production version :
hurons@caf4f556-3d62-0410-8435-a86758001935
parents:
diff changeset
    85
endif;
561aa6d282f6 pre production version :
hurons@caf4f556-3d62-0410-8435-a86758001935
parents:
diff changeset
    86
561aa6d282f6 pre production version :
hurons@caf4f556-3d62-0410-8435-a86758001935
parents:
diff changeset
    87
?>