From 65ab0a188e44e42750b77dd80bba1216ad2f3e83 Mon Sep 17 00:00:00 2001 From: Scott Taylor Date: Sat, 1 Nov 2014 01:50:21 +0000 Subject: [PATCH] In `wp_xmlrpc_server->pingback_ping()`, remove the internal variable `$way` each time it is set and not used. See #30224. Built from https://develop.svn.wordpress.org/trunk@30139 git-svn-id: http://core.svn.wordpress.org/trunk@30139 1a063a9b-81f0-0310-95a4-ce76da25c4cd --- wp-includes/class-wp-xmlrpc-server.php | 7 +------ wp-includes/version.php | 2 +- 2 files changed, 2 insertions(+), 7 deletions(-) diff --git a/wp-includes/class-wp-xmlrpc-server.php b/wp-includes/class-wp-xmlrpc-server.php index 248a9e51bd..6e68d0378d 100644 --- a/wp-includes/class-wp-xmlrpc-server.php +++ b/wp-includes/class-wp-xmlrpc-server.php @@ -5707,27 +5707,23 @@ class wp_xmlrpc_server extends IXR_Server { // if so, then let's use it and drop the old code. $urltest = parse_url($pagelinkedto); if ( $post_ID = url_to_postid($pagelinkedto) ) { - $way = 'url_to_postid()'; + // $way } elseif ( isset( $urltest['path'] ) && preg_match('#p/[0-9]{1,}#', $urltest['path'], $match) ) { // the path defines the post_ID (archives/p/XXXX) $blah = explode('/', $match[0]); $post_ID = (int) $blah[1]; - $way = 'from the path'; } elseif ( isset( $urltest['query'] ) && preg_match('#p=[0-9]{1,}#', $urltest['query'], $match) ) { // the querystring defines the post_ID (?p=XXXX) $blah = explode('=', $match[0]); $post_ID = (int) $blah[1]; - $way = 'from the querystring'; } elseif ( isset($urltest['fragment']) ) { // an #anchor is there, it's either... if ( intval($urltest['fragment']) ) { // ...an integer #XXXX (simplest case) $post_ID = (int) $urltest['fragment']; - $way = 'from the fragment (numeric)'; } elseif ( preg_match('/post-[0-9]+/',$urltest['fragment']) ) { // ...a post id in the form 'post-###' $post_ID = preg_replace('/[^0-9]+/', '', $urltest['fragment']); - $way = 'from the fragment (post-###)'; } elseif ( is_string($urltest['fragment']) ) { // ...or a string #title, a little more complicated $title = preg_replace('/[^a-z0-9]/i', '.', $urltest['fragment']); @@ -5736,7 +5732,6 @@ class wp_xmlrpc_server extends IXR_Server { // returning unknown error '0' is better than die()ing return $this->pingback_error( 0, '' ); } - $way = 'from the fragment (title)'; } } else { // TODO: Attempt to extract a post ID from the given URL diff --git a/wp-includes/version.php b/wp-includes/version.php index d6f4aeb5be..1190a8a485 100644 --- a/wp-includes/version.php +++ b/wp-includes/version.php @@ -4,7 +4,7 @@ * * @global string $wp_version */ -$wp_version = '4.1-alpha-30138'; +$wp_version = '4.1-alpha-30139'; /** * Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.