WordPress.org

Make WordPress Core


Ignore:
Timestamp:
03/07/2007 05:29:15 AM (14 years ago)
Author:
markjaquith
Message:

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

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/wp-admin/menu.php

    r4953 r4990  
    77$menu[0] = array(__('Dashboard'), 'read', 'index.php');
    88
    9 if ( strstr($_SERVER['REQUEST_URI'], 'edit-pages.php') )
     9if (strpos($_SERVER['REQUEST_URI'], 'edit-pages.php') !== false)
    1010    $menu[5] = array(__('Write'), 'edit_pages', 'page-new.php');
    1111else
    1212    $menu[5] = array(__('Write'), 'edit_posts', 'post-new.php');
    13 if ( strstr($_SERVER['REQUEST_URI'], 'page-new.php') )
     13if (strpos($_SERVER['REQUEST_URI'], 'page-new.php') !== false)
    1414    $menu[10] = array(__('Manage'), 'edit_pages', 'edit-pages.php');
    1515else
Note: See TracChangeset for help on using the changeset viewer.