Changeset 4202
- Timestamp:
- 09/21/2006 08:46:39 PM (18 years ago)
- Location:
- trunk
- Files:
-
- 7 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/wp-admin/admin-functions.php
r4186 r4202 1722 1722 1723 1723 $wp_plugins = array (); 1724 $plugin_loc = 'wp-content/plugins'; 1725 $plugin_root = ABSPATH.$plugin_loc; 1724 $plugin_root = ABSPATH . PLUGINDIR; 1726 1725 1727 1726 // Files in wp-content/plugins directory -
trunk/wp-admin/admin.php
r4183 r4202 53 53 } 54 54 55 if (! file_exists(ABSPATH . "wp-content/plugins/$plugin_page"))55 if (! file_exists(ABSPATH . PLUGINDIR . "/$plugin_page")) 56 56 wp_die(sprintf(__('Cannot load %s.'), htmlentities($plugin_page))); 57 57 … … 61 61 require_once(ABSPATH . '/wp-admin/admin-header.php'); 62 62 63 include(ABSPATH . "wp-content/plugins/$plugin_page");63 include(ABSPATH . PLUGINDIR . "/$plugin_page"); 64 64 } 65 65 -
trunk/wp-admin/menu-header.php
r4144 r4202 13 13 14 14 if ( !empty($submenu[$item[2]]) || current_user_can($item[1]) ) { 15 if ( file_exists(ABSPATH . "wp-content/plugins/{$item[2]}") )15 if ( file_exists(ABSPATH . PLUGINDIR . "/{$item[2]}") ) 16 16 echo "\n\t<li><a href='" . get_option('siteurl') . "/wp-admin/admin.php?page={$item[2]}'$class>{$item[0]}</a></li>"; 17 17 else … … 41 41 $menu_hook = get_plugin_page_hook($item[2], $parent_file); 42 42 43 if (file_exists(ABSPATH . "wp-content/plugins/{$item[2]}") || ! empty($menu_hook)) {43 if (file_exists(ABSPATH . PLUGINDIR . "/{$item[2]}") || ! empty($menu_hook)) { 44 44 if ( 'admin.php' == $pagenow ) 45 45 echo "\n\t<li><a href='" . get_option('siteurl') . "/wp-admin/admin.php?page={$item[2]}'$class>{$item[0]}</a></li>"; -
trunk/wp-admin/plugin-editor.php
r4111 r4202 15 15 16 16 $file = validate_file_to_edit($file, $plugin_files); 17 $real_file = get_real_file_to_edit( "wp-content/plugins/$file");17 $real_file = get_real_file_to_edit( PLUGINDIR . "/$file"); 18 18 19 19 switch($action) { … … 47 47 require_once('admin-header.php'); 48 48 49 update_recently_edited( "wp-content/plugins/$file");49 update_recently_edited(PLUGINDIR . "/$file"); 50 50 51 51 if (!is_file($real_file)) -
trunk/wp-admin/plugins.php
r4144 r4202 10 10 sort($current); 11 11 update_option('active_plugins', $current); 12 include(ABSPATH . 'wp-content/plugins/' . trim( $_GET['plugin'] ));12 include(ABSPATH . PLUGINDIR . '/' . trim( $_GET['plugin'] )); 13 13 do_action('activate_' . trim( $_GET['plugin'] )); 14 14 } … … 43 43 // plugins. 44 44 foreach ($check_plugins as $check_plugin) { 45 if (!file_exists(ABSPATH . 'wp-content/plugins/' . $check_plugin)) {45 if (!file_exists(ABSPATH . PLUGINDIR . '/' . $check_plugin)) { 46 46 $current = get_option('active_plugins'); 47 47 $key = array_search($check_plugin, $current); … … 124 124 ?> 125 125 126 <p><?php _e( 'If something goes wrong with a plugin and you can’t use WordPress, delete or rename that file in the <code>wp-content/plugins</code> directory and it will be automatically deactivated.'); ?></p>126 <p><?php _e(sprintf('If something goes wrong with a plugin and you can’t use WordPress, delete or rename that file in the <code>%s</code> directory and it will be automatically deactivated.', PLUGINDIR)); ?></p> 127 127 128 128 <h2><?php _e('Get More Plugins'); ?></h2> 129 <p><?php _e( 'You can find additional plugins for your site in the <a href="http://wordpress.org/extend/plugins/">WordPress plugin directory</a>. To install a plugin you generally just need to upload the plugin file into your <code>wp-content/plugins</code> directory. Once a plugin is uploaded, you may activate it here.'); ?></p>129 <p><?php _e(sprintf('You can find additional plugins for your site in the <a href="http://wordpress.org/extend/plugins/">WordPress plugin directory</a>. To install a plugin you generally just need to upload the plugin file into your <code>%s</code> directory. Once a plugin is uploaded, you may activate it here.', PLUGINDIR)); ?></p> 130 130 131 131 </div> -
trunk/wp-includes/l10n.php
r3870 r4202 1 1 <?php 2 3 if ( defined('WPLANG') && '' != constant('WPLANG') ) {4 include_once(ABSPATH . 'wp-includes/streams.php');5 include_once(ABSPATH . 'wp-includes/gettext.php');6 }7 8 2 function get_locale() { 9 3 global $locale; … … 76 70 77 71 $locale = get_locale(); 78 $mofile = ABSPATH . "wp-includes/languages/$locale.mo";72 $mofile = ABSPATH . LANGDIR . "/$locale.mo"; 79 73 80 74 load_textdomain('default', $mofile); 81 75 } 82 76 83 function load_plugin_textdomain($domain, $path = 'wp-content/plugins') {77 function load_plugin_textdomain($domain, $path = false) { 84 78 $locale = get_locale(); 79 if ( false === $path ) 80 $path = PLUGINDIR; 85 81 86 82 $mofile = ABSPATH . "$path/$domain-$locale.mo"; -
trunk/wp-settings.php
r4174 r4202 82 82 83 83 define('WPINC', 'wp-includes'); 84 if ( !defined('LANGDIR') ) 85 define('LANGDIR', WPINC . '/languages'); // no leading slash, no trailing slash 86 if ( !defined('PLUGINDIR') ) 87 define('PLUGINDIR', 'wp-content/plugins'); // no leading slash, no trailing slash 84 88 if ( file_exists(ABSPATH . 'wp-content/db.php') ) 85 89 require (ABSPATH . 'wp-content/db.php'); … … 120 124 require (ABSPATH . WPINC . '/plugin.php'); 121 125 require (ABSPATH . WPINC . '/default-filters.php'); 126 if ( defined('WPLANG') && '' != constant('WPLANG') ) { 127 include_once(ABSPATH . WPINC . '/streams.php'); 128 include_once(ABSPATH . WPINC . '/gettext.php'); 129 } 122 130 require_once (ABSPATH . WPINC . '/l10n.php'); 123 131
Note: See TracChangeset
for help on using the changeset viewer.