Make WordPress Core

Changeset 30139


Ignore:
Timestamp:
11/01/2014 01:49:26 AM (9 years ago)
Author:
wonderboymusic
Message:

In wp_xmlrpc_server->pingback_ping(), remove the internal variable $way each time it is set and not used.

See #30224.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/wp-includes/class-wp-xmlrpc-server.php

    r30138 r30139  
    57085708        $urltest = parse_url($pagelinkedto);
    57095709        if ( $post_ID = url_to_postid($pagelinkedto) ) {
    5710             $way = 'url_to_postid()';
     5710            // $way
    57115711        } elseif ( isset( $urltest['path'] ) && preg_match('#p/[0-9]{1,}#', $urltest['path'], $match) ) {
    57125712            // the path defines the post_ID (archives/p/XXXX)
    57135713            $blah = explode('/', $match[0]);
    57145714            $post_ID = (int) $blah[1];
    5715             $way = 'from the path';
    57165715        } elseif ( isset( $urltest['query'] ) && preg_match('#p=[0-9]{1,}#', $urltest['query'], $match) ) {
    57175716            // the querystring defines the post_ID (?p=XXXX)
    57185717            $blah = explode('=', $match[0]);
    57195718            $post_ID = (int) $blah[1];
    5720             $way = 'from the querystring';
    57215719        } elseif ( isset($urltest['fragment']) ) {
    57225720            // an #anchor is there, it's either...
     
    57245722                // ...an integer #XXXX (simplest case)
    57255723                $post_ID = (int) $urltest['fragment'];
    5726                 $way = 'from the fragment (numeric)';
    57275724            } elseif ( preg_match('/post-[0-9]+/',$urltest['fragment']) ) {
    57285725                // ...a post id in the form 'post-###'
    57295726                $post_ID = preg_replace('/[^0-9]+/', '', $urltest['fragment']);
    5730                 $way = 'from the fragment (post-###)';
    57315727            } elseif ( is_string($urltest['fragment']) ) {
    57325728                // ...or a string #title, a little more complicated
     
    57375733                    return $this->pingback_error( 0, '' );
    57385734                }
    5739                 $way = 'from the fragment (title)';
    57405735            }
    57415736        } else {
Note: See TracChangeset for help on using the changeset viewer.