[wp-cvs] wordpress/wp-admin admin-functions.php, 1.76,
1.77 upgrade-functions.php, 1.86, 1.87
Ryan Boren
rboren at users.sourceforge.net
Sun Jan 30 07:34:06 GMT 2005
Update of /cvsroot/cafelog/wordpress/wp-admin
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv6281
Modified Files:
admin-functions.php upgrade-functions.php
Log Message:
Get the title for pluggable top level admin pages.
Index: admin-functions.php
===================================================================
RCS file: /cvsroot/cafelog/wordpress/wp-admin/admin-functions.php,v
retrieving revision 1.76
retrieving revision 1.77
diff -C2 -d -r1.76 -r1.77
*** admin-functions.php 24 Jan 2005 06:05:44 -0000 1.76
--- admin-functions.php 30 Jan 2005 07:34:03 -0000 1.77
***************
*** 702,705 ****
--- 702,706 ----
function get_admin_page_title() {
global $title;
+ global $menu;
global $submenu;
global $pagenow;
***************
*** 710,722 ****
}
! foreach (array_keys($submenu) as $parent) {
! foreach ($submenu[$parent] as $submenu_array) {
! if (isset($submenu_array[3])) {
! if ($submenu_array[2] == $pagenow) {
! $title = $submenu_array[3];
! return $submenu_array[3];
! } else if (isset($plugin_page) && ($plugin_page == $submenu_array[2])) {
! $title = $submenu_array[3];
! return $submenu_array[3];
}
}
--- 711,738 ----
}
! $parent = get_admin_page_parent();
! if (empty($parent)) {
! foreach ($menu as $menu_array) {
! if (isset($menu_array[3])) {
! if ($menu_array[2] == $pagenow) {
! $title = $menu_array[3];
! return $menu_array[3];
! } else if (isset($plugin_page) && ($plugin_page == $menu_array[2])) {
! $title = $menu_array[3];
! return $menu_array[3];
! }
! }
! }
! } else {
! foreach (array_keys($submenu) as $parent) {
! foreach ($submenu[$parent] as $submenu_array) {
! if (isset($submenu_array[3])) {
! if ($submenu_array[2] == $pagenow) {
! $title = $submenu_array[3];
! return $submenu_array[3];
! } else if (isset($plugin_page) && ($plugin_page == $submenu_array[2])) {
! $title = $submenu_array[3];
! return $submenu_array[3];
! }
}
}
Index: upgrade-functions.php
===================================================================
RCS file: /cvsroot/cafelog/wordpress/wp-admin/upgrade-functions.php,v
retrieving revision 1.86
retrieving revision 1.87
diff -C2 -d -r1.86 -r1.87
*** upgrade-functions.php 15 Jan 2005 00:09:25 -0000 1.86
--- upgrade-functions.php 30 Jan 2005 07:34:03 -0000 1.87
***************
*** 1,5 ****
<?php
! require_once(dirname(__FILE__) . '/upgrade-schema.php');
// Functions to be called in install and upgrade scripts
function upgrade_all() {
--- 1,6 ----
<?php
! require_once(ABSPATH . '/wp-admin/admin-functions.php');
! require_once(ABSPATH . '/wp-admin/upgrade-schema.php');
// Functions to be called in install and upgrade scripts
function upgrade_all() {
***************
*** 9,12 ****
--- 10,14 ----
upgrade_110();
upgrade_130();
+ save_mod_rewrite_rules();
}
***************
*** 528,545 ****
}
- function get_home_path() {
- $home = get_settings('home');
- if ( $home != '' && $home != get_settings('siteurl') ) {
- $home_path = parse_url($home);
- $home_path = $home_root['path'];
- $root = str_replace($_SERVER["PHP_SELF"], '', $_SERVER["SCRIPT_FILENAME"]);
- $home_path = $root . $home_path . "/";
- } else {
- $home_path = ABSPATH;
- }
-
- return $home_path;
- }
-
function make_site_theme_from_oldschool($theme_name, $template) {
$home_path = get_home_path();
--- 530,533 ----
More information about the cvs
mailing list