Make WordPress Core

Ticket #9031: wp-classes-handle-app.diff

File wp-classes-handle-app.diff, 845 bytes (added by znarfor, 15 years ago)
  • wp-includes/classes.php

     
    194194
    195195                        $this->request = $request;
    196196
     197                        // Remove 'posts' from wp-app requests
     198                        if ($req_uri == 'wp-app.php' && substr($request, 0, 6) === 'posts/') {
     199                                $request = substr($request, 6);
     200                                $match_app_requests = true;
     201                        }
     202                       
    197203                        // Look for matches.
    198204                        $request_match = $request;
    199205                        foreach ( (array) $rewrite as $match => $query) {
    200                                 // Don't try to match against AtomPub calls
    201                                 if ( $req_uri == 'wp-app.php' )
     206                                // Don't try to match against some AtomPub calls
     207                                if ( $req_uri == 'wp-app.php' && empty($match_app_requests) )
    202208                                        break;
    203209
    204210                                // If the requesting file is the anchor of the match, prepend it