Use strpos instead of strstr where ever possible, for speed. Props rob1n. fixes #3920

git-svn-id: https://develop.svn.wordpress.org/trunk@4990 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
Mark Jaquith
2007-03-07 05:29:15 +00:00
parent 5b1ff4fbd5
commit 56368548ad
26 changed files with 82 additions and 84 deletions
+2 -2
View File
@@ -6,11 +6,11 @@
// The URL of the item's file
$menu[0] = array(__('Dashboard'), 'read', 'index.php');
if ( strstr($_SERVER['REQUEST_URI'], 'edit-pages.php') )
if (strpos($_SERVER['REQUEST_URI'], 'edit-pages.php') !== false)
$menu[5] = array(__('Write'), 'edit_pages', 'page-new.php');
else
$menu[5] = array(__('Write'), 'edit_posts', 'post-new.php');
if ( strstr($_SERVER['REQUEST_URI'], 'page-new.php') )
if (strpos($_SERVER['REQUEST_URI'], 'page-new.php') !== false)
$menu[10] = array(__('Manage'), 'edit_pages', 'edit-pages.php');
else
$menu[10] = array(__('Manage'), 'edit_posts', 'edit.php');