mirror of
https://github.com/gosticks/wordpress-develop.git
synced 2026-08-16 14:50:29 +00:00
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:
+2
-2
@@ -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');
|
||||
|
||||
Reference in New Issue
Block a user