Make WordPress Core

Changeset 21969


Ignore:
Timestamp:
09/24/2012 01:20:51 PM (12 years ago)
Author:
ryan
Message:

Fix CPT links in Theme Options list. Props SergeyBiryukov, JarretC. fixes #21655

File:
1 edited

Legend:

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

    r21965 r21969  
    175175                    $options[] = "<a href='{$submenu[$item[2]][0][2]}'$class>{$item[0]}</a>";
    176176            } else if ( current_user_can($item[1]) ) {
    177                 if ( file_exists(ABSPATH . 'wp-admin/' . $item[2]) ) {
     177                $menu_file = $item[2];
     178                if ( false !== ( $pos = strpos( $menu_file, '?' ) ) )
     179                    $menu_file = substr( $menu_file, 0, $pos );
     180                if ( file_exists( ABSPATH . "wp-admin/$menu_file" ) ) {
    178181                    $options[] = "<a href='{$item[2]}'$class>{$item[0]}</a>";
    179182                } else {
Note: See TracChangeset for help on using the changeset viewer.