<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN"
"http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head><meta http-equiv="content-type" content="text/html; charset=utf-8" />
<title>[28515] trunk/src/wp-includes/class-wp-xmlrpc-server.php: Add missing access modifiers to methods in `wp_xmlrpc_server`.</title>
</head>
<body>
<style type="text/css"><!--
#msg dl.meta { border: 1px #006 solid; background: #369; padding: 6px; color: #fff; }
#msg dl.meta dt { float: left; width: 6em; font-weight: bold; }
#msg dt:after { content:':';}
#msg dl, #msg dt, #msg ul, #msg li, #header, #footer, #logmsg { font-family: verdana,arial,helvetica,sans-serif; font-size: 10pt; }
#msg dl a { font-weight: bold}
#msg dl a:link { color:#fc3; }
#msg dl a:active { color:#ff0; }
#msg dl a:visited { color:#cc6; }
h3 { font-family: verdana,arial,helvetica,sans-serif; font-size: 10pt; font-weight: bold; }
#msg pre { overflow: auto; background: #ffc; border: 1px #fa0 solid; padding: 6px; }
#logmsg { background: #ffc; border: 1px #fa0 solid; padding: 1em 1em 0 1em; }
#logmsg p, #logmsg pre, #logmsg blockquote { margin: 0 0 1em 0; }
#logmsg p, #logmsg li, #logmsg dt, #logmsg dd { line-height: 14pt; }
#logmsg h1, #logmsg h2, #logmsg h3, #logmsg h4, #logmsg h5, #logmsg h6 { margin: .5em 0; }
#logmsg h1:first-child, #logmsg h2:first-child, #logmsg h3:first-child, #logmsg h4:first-child, #logmsg h5:first-child, #logmsg h6:first-child { margin-top: 0; }
#logmsg ul, #logmsg ol { padding: 0; list-style-position: inside; margin: 0 0 0 1em; }
#logmsg ul { text-indent: -1em; padding-left: 1em; }#logmsg ol { text-indent: -1.5em; padding-left: 1.5em; }
#logmsg > ul, #logmsg > ol { margin: 0 0 1em 0; }
#logmsg pre { background: #eee; padding: 1em; }
#logmsg blockquote { border: 1px solid #fa0; border-left-width: 10px; padding: 1em 1em 0 1em; background: white;}
#logmsg dl { margin: 0; }
#logmsg dt { font-weight: bold; }
#logmsg dd { margin: 0; padding: 0 0 0.5em 0; }
#logmsg dd:before { content:'\00bb';}
#logmsg table { border-spacing: 0px; border-collapse: collapse; border-top: 4px solid #fa0; border-bottom: 1px solid #fa0; background: #fff; }
#logmsg table th { text-align: left; font-weight: normal; padding: 0.2em 0.5em; border-top: 1px dotted #fa0; }
#logmsg table td { text-align: right; border-top: 1px dotted #fa0; padding: 0.2em 0.5em; }
#logmsg table thead th { text-align: center; border-bottom: 1px solid #fa0; }
#logmsg table th.Corner { text-align: left; }
#logmsg hr { border: none 0; border-top: 2px dashed #fa0; height: 1px; }
#header, #footer { color: #fff; background: #636; border: 1px #300 solid; padding: 6px; }
#patch { width: 100%; }
#patch h4 {font-family: verdana,arial,helvetica,sans-serif;font-size:10pt;padding:8px;background:#369;color:#fff;margin:0;}
#patch .propset h4, #patch .binary h4 {margin:0;}
#patch pre {padding:0;line-height:1.2em;margin:0;}
#patch .diff {width:100%;background:#eee;padding: 0 0 10px 0;overflow:auto;}
#patch .propset .diff, #patch .binary .diff {padding:10px 0;}
#patch span {display:block;padding:0 10px;}
#patch .modfile, #patch .addfile, #patch .delfile, #patch .propset, #patch .binary, #patch .copfile {border:1px solid #ccc;margin:10px 0;}
#patch ins {background:#dfd;text-decoration:none;display:block;padding:0 10px;}
#patch del {background:#fdd;text-decoration:none;display:block;padding:0 10px;}
#patch .lines, .info {color:#888;background:#fff;}
--></style>
<div id="msg">
<dl class="meta">
<dt>Revision</dt> <dd><a href="http://core.trac.wordpress.org/changeset/28515">28515</a></dd>
<dt>Author</dt> <dd>wonderboymusic</dd>
<dt>Date</dt> <dd>2014-05-19 06:08:04 +0000 (Mon, 19 May 2014)</dd>
</dl>
<h3>Log Message</h3>
<pre>Add missing access modifiers to methods in `wp_xmlrpc_server`. Add a magic `__call()` method for BC.
See <a href="http://core.trac.wordpress.org/ticket/27881">#27881</a>, <a href="http://core.trac.wordpress.org/ticket/22234">#22234</a>.</pre>
<h3>Modified Paths</h3>
<ul>
<li><a href="#trunksrcwpincludesclasswpxmlrpcserverphp">trunk/src/wp-includes/class-wp-xmlrpc-server.php</a></li>
</ul>
</div>
<div id="patch">
<h3>Diff</h3>
<a id="trunksrcwpincludesclasswpxmlrpcserverphp"></a>
<div class="modfile"><h4>Modified: trunk/src/wp-includes/class-wp-xmlrpc-server.php (28514 => 28515)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/src/wp-includes/class-wp-xmlrpc-server.php 2014-05-19 05:59:07 UTC (rev 28514)
+++ trunk/src/wp-includes/class-wp-xmlrpc-server.php 2014-05-19 06:08:04 UTC (rev 28515)
</span><span class="lines">@@ -33,7 +33,7 @@
</span><span class="cx"> *
</span><span class="cx"> * @return wp_xmlrpc_server
</span><span class="cx"> */
</span><del>- function __construct() {
</del><ins>+ public function __construct() {
</ins><span class="cx"> $this->methods = array(
</span><span class="cx"> // WordPress API
</span><span class="cx"> 'wp.getUsersBlogs' => 'this:wp_getUsersBlogs',
</span><span class="lines">@@ -140,7 +140,19 @@
</span><span class="cx"> $this->methods = apply_filters( 'xmlrpc_methods', $this->methods );
</span><span class="cx"> }
</span><span class="cx">
</span><del>- function serve_request() {
</del><ins>+ /**
+ * Make private/protected methods readable for backwards compatibility
+ *
+ * @since 4.0.0
+ * @param string $name
+ * @param array $arguments
+ * @return mixed
+ */
+ public function __call( $name, $arguments ) {
+ return call_user_func_array( array( $this, $name ), $arguments );
+ }
+
+ public function serve_request() {
</ins><span class="cx"> $this->IXR_Server($this->methods);
</span><span class="cx"> }
</span><span class="cx">
</span><span class="lines">@@ -152,7 +164,7 @@
</span><span class="cx"> * @param array $args Method Parameters.
</span><span class="cx"> * @return string
</span><span class="cx"> */
</span><del>- function sayHello($args) {
</del><ins>+ public function sayHello($args) {
</ins><span class="cx"> return 'Hello!';
</span><span class="cx"> }
</span><span class="cx">
</span><span class="lines">@@ -164,7 +176,7 @@
</span><span class="cx"> * @param array $args Method Parameters.
</span><span class="cx"> * @return int
</span><span class="cx"> */
</span><del>- function addTwoNumbers($args) {
</del><ins>+ public function addTwoNumbers($args) {
</ins><span class="cx"> $number1 = $args[0];
</span><span class="cx"> $number2 = $args[1];
</span><span class="cx"> return $number1 + $number2;
</span><span class="lines">@@ -179,7 +191,7 @@
</span><span class="cx"> * @param string $password User's password.
</span><span class="cx"> * @return mixed WP_User object if authentication passed, false otherwise
</span><span class="cx"> */
</span><del>- function login( $username, $password ) {
</del><ins>+ public function login( $username, $password ) {
</ins><span class="cx"> /*
</span><span class="cx"> * Respect old get_option() filters left for back-compat when the 'enable_xmlrpc'
</span><span class="cx"> * option was deprecated in 3.5.0. Use the 'xmlrpc_enabled' hook instead.
</span><span class="lines">@@ -238,7 +250,7 @@
</span><span class="cx"> * @param string $password User's password.
</span><span class="cx"> * @return bool Whether authentication passed.
</span><span class="cx"> */
</span><del>- function login_pass_ok( $username, $password ) {
</del><ins>+ public function login_pass_ok( $username, $password ) {
</ins><span class="cx"> return (bool) $this->login( $username, $password );
</span><span class="cx"> }
</span><span class="cx">
</span><span class="lines">@@ -250,7 +262,7 @@
</span><span class="cx"> * @param string|array $data Escape single string or array of strings.
</span><span class="cx"> * @return string|array Type matches $data and sanitized for the database.
</span><span class="cx"> */
</span><del>- function escape( &$data ) {
</del><ins>+ public function escape( &$data ) {
</ins><span class="cx"> if ( ! is_array( $data ) )
</span><span class="cx"> return wp_slash( $data );
</span><span class="cx">
</span><span class="lines">@@ -270,7 +282,7 @@
</span><span class="cx"> * @param int $post_id Post ID.
</span><span class="cx"> * @return array Custom fields, if exist.
</span><span class="cx"> */
</span><del>- function get_custom_fields($post_id) {
</del><ins>+ public function get_custom_fields($post_id) {
</ins><span class="cx"> $post_id = (int) $post_id;
</span><span class="cx">
</span><span class="cx"> $custom_fields = array();
</span><span class="lines">@@ -298,7 +310,7 @@
</span><span class="cx"> * @param int $post_id Post ID.
</span><span class="cx"> * @param array $fields Custom fields.
</span><span class="cx"> */
</span><del>- function set_custom_fields($post_id, $fields) {
</del><ins>+ public function set_custom_fields($post_id, $fields) {
</ins><span class="cx"> $post_id = (int) $post_id;
</span><span class="cx">
</span><span class="cx"> foreach ( (array) $fields as $meta ) {
</span><span class="lines">@@ -328,7 +340,7 @@
</span><span class="cx"> *
</span><span class="cx"> * @since 2.6.0
</span><span class="cx"> */
</span><del>- function initialise_blog_option_info() {
</del><ins>+ public function initialise_blog_option_info() {
</ins><span class="cx"> global $wp_version;
</span><span class="cx">
</span><span class="cx"> $this->blog_options = array(
</span><span class="lines">@@ -497,7 +509,7 @@
</span><span class="cx"> * - 'blogName'
</span><span class="cx"> * - 'xmlrpc' - url of xmlrpc endpoint
</span><span class="cx"> */
</span><del>- function wp_getUsersBlogs( $args ) {
</del><ins>+ public function wp_getUsersBlogs( $args ) {
</ins><span class="cx"> // If this isn't on WPMU then just use blogger_getUsersBlogs
</span><span class="cx"> if ( !is_multisite() ) {
</span><span class="cx"> array_unshift( $args, 1 );
</span><span class="lines">@@ -1075,7 +1087,7 @@
</span><span class="cx"> * - any other fields supported by wp_insert_post()
</span><span class="cx"> * @return string post_id
</span><span class="cx"> */
</span><del>- function wp_newPost( $args ) {
</del><ins>+ public function wp_newPost( $args ) {
</ins><span class="cx"> if ( ! $this->minimum_args( $args, 4 ) )
</span><span class="cx"> return $this->error;
</span><span class="cx">
</span><span class="lines">@@ -1369,7 +1381,7 @@
</span><span class="cx"> * - array $content_struct
</span><span class="cx"> * @return true on success
</span><span class="cx"> */
</span><del>- function wp_editPost( $args ) {
</del><ins>+ public function wp_editPost( $args ) {
</ins><span class="cx"> if ( ! $this->minimum_args( $args, 5 ) )
</span><span class="cx"> return $this->error;
</span><span class="cx">
</span><span class="lines">@@ -1432,7 +1444,7 @@
</span><span class="cx"> * - int $post_id
</span><span class="cx"> * @return true on success
</span><span class="cx"> */
</span><del>- function wp_deletePost( $args ) {
</del><ins>+ public function wp_deletePost( $args ) {
</ins><span class="cx"> if ( ! $this->minimum_args( $args, 4 ) )
</span><span class="cx"> return $this->error;
</span><span class="cx">
</span><span class="lines">@@ -1508,7 +1520,7 @@
</span><span class="cx"> * - 'tags'
</span><span class="cx"> * - 'enclosure'
</span><span class="cx"> */
</span><del>- function wp_getPost( $args ) {
</del><ins>+ public function wp_getPost( $args ) {
</ins><span class="cx"> if ( ! $this->minimum_args( $args, 4 ) )
</span><span class="cx"> return $this->error;
</span><span class="cx">
</span><span class="lines">@@ -1574,7 +1586,7 @@
</span><span class="cx"> * - array $fields optional
</span><span class="cx"> * @return array contains a collection of posts.
</span><span class="cx"> */
</span><del>- function wp_getPosts( $args ) {
</del><ins>+ public function wp_getPosts( $args ) {
</ins><span class="cx"> if ( ! $this->minimum_args( $args, 3 ) )
</span><span class="cx"> return $this->error;
</span><span class="cx">
</span><span class="lines">@@ -1671,7 +1683,7 @@
</span><span class="cx"> * - 'slug'
</span><span class="cx"> * @return string term_id
</span><span class="cx"> */
</span><del>- function wp_newTerm( $args ) {
</del><ins>+ public function wp_newTerm( $args ) {
</ins><span class="cx"> if ( ! $this->minimum_args( $args, 4 ) )
</span><span class="cx"> return $this->error;
</span><span class="cx">
</span><span class="lines">@@ -1759,7 +1771,7 @@
</span><span class="cx"> * - 'slug'
</span><span class="cx"> * @return bool True, on success.
</span><span class="cx"> */
</span><del>- function wp_editTerm( $args ) {
</del><ins>+ public function wp_editTerm( $args ) {
</ins><span class="cx"> if ( ! $this->minimum_args( $args, 5 ) )
</span><span class="cx"> return $this->error;
</span><span class="cx">
</span><span class="lines">@@ -1852,7 +1864,7 @@
</span><span class="cx"> * - string $term_id
</span><span class="cx"> * @return boolean|IXR_Error If it suceeded true else a reason why not
</span><span class="cx"> */
</span><del>- function wp_deleteTerm( $args ) {
</del><ins>+ public function wp_deleteTerm( $args ) {
</ins><span class="cx"> if ( ! $this->minimum_args( $args, 5 ) )
</span><span class="cx"> return $this->error;
</span><span class="cx">
</span><span class="lines">@@ -1920,7 +1932,7 @@
</span><span class="cx"> * - 'parent'
</span><span class="cx"> * - 'count'
</span><span class="cx"> */
</span><del>- function wp_getTerm( $args ) {
</del><ins>+ public function wp_getTerm( $args ) {
</ins><span class="cx"> if ( ! $this->minimum_args( $args, 5 ) )
</span><span class="cx"> return $this->error;
</span><span class="cx">
</span><span class="lines">@@ -1974,7 +1986,7 @@
</span><span class="cx"> * - array $filter optional
</span><span class="cx"> * @return array terms
</span><span class="cx"> */
</span><del>- function wp_getTerms( $args ) {
</del><ins>+ public function wp_getTerms( $args ) {
</ins><span class="cx"> if ( ! $this->minimum_args( $args, 4 ) )
</span><span class="cx"> return $this->error;
</span><span class="cx">
</span><span class="lines">@@ -2050,7 +2062,7 @@
</span><span class="cx"> * - string $taxonomy
</span><span class="cx"> * @return array (@see get_taxonomy())
</span><span class="cx"> */
</span><del>- function wp_getTaxonomy( $args ) {
</del><ins>+ public function wp_getTaxonomy( $args ) {
</ins><span class="cx"> if ( ! $this->minimum_args( $args, 4 ) )
</span><span class="cx"> return $this->error;
</span><span class="cx">
</span><span class="lines">@@ -2104,7 +2116,7 @@
</span><span class="cx"> * - string $password
</span><span class="cx"> * @return array taxonomies
</span><span class="cx"> */
</span><del>- function wp_getTaxonomies( $args ) {
</del><ins>+ public function wp_getTaxonomies( $args ) {
</ins><span class="cx"> if ( ! $this->minimum_args( $args, 3 ) )
</span><span class="cx"> return $this->error;
</span><span class="cx">
</span><span class="lines">@@ -2176,7 +2188,7 @@
</span><span class="cx"> * - 'display_name'
</span><span class="cx"> * - 'roles'
</span><span class="cx"> */
</span><del>- function wp_getUser( $args ) {
</del><ins>+ public function wp_getUser( $args ) {
</ins><span class="cx"> if ( ! $this->minimum_args( $args, 4 ) )
</span><span class="cx"> return $this->error;
</span><span class="cx">
</span><span class="lines">@@ -2239,7 +2251,7 @@
</span><span class="cx"> * - array $fields optional
</span><span class="cx"> * @return array users data
</span><span class="cx"> */
</span><del>- function wp_getUsers( $args ) {
</del><ins>+ public function wp_getUsers( $args ) {
</ins><span class="cx"> if ( ! $this->minimum_args( $args, 3 ) )
</span><span class="cx"> return $this->error;
</span><span class="cx">
</span><span class="lines">@@ -2310,7 +2322,7 @@
</span><span class="cx"> * - array $fields optional
</span><span class="cx"> * @return array (@see wp_getUser)
</span><span class="cx"> */
</span><del>- function wp_getProfile( $args ) {
</del><ins>+ public function wp_getProfile( $args ) {
</ins><span class="cx"> if ( ! $this->minimum_args( $args, 3 ) )
</span><span class="cx"> return $this->error;
</span><span class="cx">
</span><span class="lines">@@ -2360,7 +2372,7 @@
</span><span class="cx"> * - 'bio'
</span><span class="cx"> * @return bool True, on success.
</span><span class="cx"> */
</span><del>- function wp_editProfile( $args ) {
</del><ins>+ public function wp_editProfile( $args ) {
</ins><span class="cx"> if ( ! $this->minimum_args( $args, 4 ) )
</span><span class="cx"> return $this->error;
</span><span class="cx">
</span><span class="lines">@@ -2429,7 +2441,7 @@
</span><span class="cx"> * - password
</span><span class="cx"> * @return array
</span><span class="cx"> */
</span><del>- function wp_getPage($args) {
</del><ins>+ public function wp_getPage($args) {
</ins><span class="cx"> $this->escape($args);
</span><span class="cx">
</span><span class="cx"> $blog_id = (int) $args[0];
</span><span class="lines">@@ -2473,7 +2485,7 @@
</span><span class="cx"> * - num_pages
</span><span class="cx"> * @return array
</span><span class="cx"> */
</span><del>- function wp_getPages($args) {
</del><ins>+ public function wp_getPages($args) {
</ins><span class="cx"> $this->escape($args);
</span><span class="cx">
</span><span class="cx"> $blog_id = (int) $args[0];
</span><span class="lines">@@ -2518,7 +2530,7 @@
</span><span class="cx"> * @param array $args Method parameters. See {@link wp_xmlrpc_server::mw_newPost()}
</span><span class="cx"> * @return unknown
</span><span class="cx"> */
</span><del>- function wp_newPage($args) {
</del><ins>+ public function wp_newPage($args) {
</ins><span class="cx"> // Items not escaped here will be escaped in newPost.
</span><span class="cx"> $username = $this->escape($args[1]);
</span><span class="cx"> $password = $this->escape($args[2]);
</span><span class="lines">@@ -2546,7 +2558,7 @@
</span><span class="cx"> * @param array $args Method parameters.
</span><span class="cx"> * @return bool True, if success.
</span><span class="cx"> */
</span><del>- function wp_deletePage($args) {
</del><ins>+ public function wp_deletePage($args) {
</ins><span class="cx"> $this->escape($args);
</span><span class="cx">
</span><span class="cx"> $blog_id = (int) $args[0];
</span><span class="lines">@@ -2596,7 +2608,7 @@
</span><span class="cx"> * @param array $args Method parameters.
</span><span class="cx"> * @return unknown
</span><span class="cx"> */
</span><del>- function wp_editPage($args) {
</del><ins>+ public function wp_editPage($args) {
</ins><span class="cx"> // Items not escaped here will be escaped in editPost.
</span><span class="cx"> $blog_id = (int) $args[0];
</span><span class="cx"> $page_id = (int) $this->escape($args[1]);
</span><span class="lines">@@ -2644,7 +2656,7 @@
</span><span class="cx"> * @param array $args Method parameters.
</span><span class="cx"> * @return unknown
</span><span class="cx"> */
</span><del>- function wp_getPageList($args) {
</del><ins>+ public function wp_getPageList($args) {
</ins><span class="cx"> global $wpdb;
</span><span class="cx">
</span><span class="cx"> $this->escape($args);
</span><span class="lines">@@ -2697,7 +2709,7 @@
</span><span class="cx"> * @param array $args Method parameters.
</span><span class="cx"> * @return array
</span><span class="cx"> */
</span><del>- function wp_getAuthors($args) {
</del><ins>+ public function wp_getAuthors($args) {
</ins><span class="cx">
</span><span class="cx"> $this->escape($args);
</span><span class="cx">
</span><span class="lines">@@ -2734,7 +2746,7 @@
</span><span class="cx"> * @param array $args Method parameters.
</span><span class="cx"> * @return array
</span><span class="cx"> */
</span><del>- function wp_getTags( $args ) {
</del><ins>+ public function wp_getTags( $args ) {
</ins><span class="cx"> $this->escape( $args );
</span><span class="cx">
</span><span class="cx"> $blog_id = (int) $args[0];
</span><span class="lines">@@ -2776,7 +2788,7 @@
</span><span class="cx"> * @param array $args Method parameters.
</span><span class="cx"> * @return int Category ID.
</span><span class="cx"> */
</span><del>- function wp_newCategory($args) {
</del><ins>+ public function wp_newCategory($args) {
</ins><span class="cx"> $this->escape($args);
</span><span class="cx">
</span><span class="cx"> $blog_id = (int) $args[0];
</span><span class="lines">@@ -2846,7 +2858,7 @@
</span><span class="cx"> * @param array $args Method parameters.
</span><span class="cx"> * @return mixed See {@link wp_delete_term()} for return info.
</span><span class="cx"> */
</span><del>- function wp_deleteCategory($args) {
</del><ins>+ public function wp_deleteCategory($args) {
</ins><span class="cx"> $this->escape($args);
</span><span class="cx">
</span><span class="cx"> $blog_id = (int) $args[0];
</span><span class="lines">@@ -2888,7 +2900,7 @@
</span><span class="cx"> * @param array $args Method parameters.
</span><span class="cx"> * @return array
</span><span class="cx"> */
</span><del>- function wp_suggestCategories($args) {
</del><ins>+ public function wp_suggestCategories($args) {
</ins><span class="cx"> $this->escape($args);
</span><span class="cx">
</span><span class="cx"> $blog_id = (int) $args[0];
</span><span class="lines">@@ -2926,7 +2938,7 @@
</span><span class="cx"> * @param array $args Method parameters.
</span><span class="cx"> * @return array
</span><span class="cx"> */
</span><del>- function wp_getComment($args) {
</del><ins>+ public function wp_getComment($args) {
</ins><span class="cx"> $this->escape($args);
</span><span class="cx">
</span><span class="cx"> $blog_id = (int) $args[0];
</span><span class="lines">@@ -2968,7 +2980,7 @@
</span><span class="cx"> * @param array $args Method parameters.
</span><span class="cx"> * @return array. Contains a collection of comments. See {@link wp_xmlrpc_server::wp_getComment()} for a description of each item contents
</span><span class="cx"> */
</span><del>- function wp_getComments($args) {
</del><ins>+ public function wp_getComments($args) {
</ins><span class="cx"> $this->escape($args);
</span><span class="cx">
</span><span class="cx"> $blog_id = (int) $args[0];
</span><span class="lines">@@ -3029,7 +3041,7 @@
</span><span class="cx"> * - comment_id
</span><span class="cx"> * @return mixed {@link wp_delete_comment()}
</span><span class="cx"> */
</span><del>- function wp_deleteComment($args) {
</del><ins>+ public function wp_deleteComment($args) {
</ins><span class="cx"> $this->escape($args);
</span><span class="cx">
</span><span class="cx"> $blog_id = (int) $args[0];
</span><span class="lines">@@ -3093,7 +3105,7 @@
</span><span class="cx"> * - content_struct
</span><span class="cx"> * @return bool True, on success.
</span><span class="cx"> */
</span><del>- function wp_editComment($args) {
</del><ins>+ public function wp_editComment($args) {
</ins><span class="cx"> $this->escape($args);
</span><span class="cx">
</span><span class="cx"> $blog_id = (int) $args[0];
</span><span class="lines">@@ -3177,7 +3189,7 @@
</span><span class="cx"> * @param array $args Method parameters.
</span><span class="cx"> * @return mixed {@link wp_new_comment()}
</span><span class="cx"> */
</span><del>- function wp_newComment($args) {
</del><ins>+ public function wp_newComment($args) {
</ins><span class="cx"> global $wpdb;
</span><span class="cx">
</span><span class="cx"> $this->escape($args);
</span><span class="lines">@@ -3281,7 +3293,7 @@
</span><span class="cx"> * @param array $args Method parameters.
</span><span class="cx"> * @return array
</span><span class="cx"> */
</span><del>- function wp_getCommentStatusList($args) {
</del><ins>+ public function wp_getCommentStatusList($args) {
</ins><span class="cx"> $this->escape( $args );
</span><span class="cx">
</span><span class="cx"> $blog_id = (int) $args[0];
</span><span class="lines">@@ -3308,7 +3320,7 @@
</span><span class="cx"> * @param array $args Method parameters.
</span><span class="cx"> * @return array
</span><span class="cx"> */
</span><del>- function wp_getCommentCount( $args ) {
</del><ins>+ public function wp_getCommentCount( $args ) {
</ins><span class="cx"> $this->escape($args);
</span><span class="cx">
</span><span class="cx"> $blog_id = (int) $args[0];
</span><span class="lines">@@ -3342,7 +3354,7 @@
</span><span class="cx"> * @param array $args Method parameters.
</span><span class="cx"> * @return array
</span><span class="cx"> */
</span><del>- function wp_getPostStatusList( $args ) {
</del><ins>+ public function wp_getPostStatusList( $args ) {
</ins><span class="cx"> $this->escape( $args );
</span><span class="cx">
</span><span class="cx"> $blog_id = (int) $args[0];
</span><span class="lines">@@ -3369,7 +3381,7 @@
</span><span class="cx"> * @param array $args Method parameters.
</span><span class="cx"> * @return array
</span><span class="cx"> */
</span><del>- function wp_getPageStatusList( $args ) {
</del><ins>+ public function wp_getPageStatusList( $args ) {
</ins><span class="cx"> $this->escape( $args );
</span><span class="cx">
</span><span class="cx"> $blog_id = (int) $args[0];
</span><span class="lines">@@ -3396,7 +3408,7 @@
</span><span class="cx"> * @param array $args Method parameters.
</span><span class="cx"> * @return array
</span><span class="cx"> */
</span><del>- function wp_getPageTemplates( $args ) {
</del><ins>+ public function wp_getPageTemplates( $args ) {
</ins><span class="cx"> $this->escape( $args );
</span><span class="cx">
</span><span class="cx"> $blog_id = (int) $args[0];
</span><span class="lines">@@ -3423,7 +3435,7 @@
</span><span class="cx"> * @param array $args Method parameters.
</span><span class="cx"> * @return array
</span><span class="cx"> */
</span><del>- function wp_getOptions( $args ) {
</del><ins>+ public function wp_getOptions( $args ) {
</ins><span class="cx"> $this->escape( $args );
</span><span class="cx">
</span><span class="cx"> $blog_id = (int) $args[0];
</span><span class="lines">@@ -3449,7 +3461,7 @@
</span><span class="cx"> * @param array $options Options to retrieve.
</span><span class="cx"> * @return array
</span><span class="cx"> */
</span><del>- function _getOptions($options) {
</del><ins>+ public function _getOptions($options) {
</ins><span class="cx"> $data = array();
</span><span class="cx"> $can_manage = current_user_can( 'manage_options' );
</span><span class="cx"> foreach ( $options as $option ) {
</span><span class="lines">@@ -3477,7 +3489,7 @@
</span><span class="cx"> * @param array $args Method parameters.
</span><span class="cx"> * @return unknown
</span><span class="cx"> */
</span><del>- function wp_setOptions( $args ) {
</del><ins>+ public function wp_setOptions( $args ) {
</ins><span class="cx"> $this->escape( $args );
</span><span class="cx">
</span><span class="cx"> $blog_id = (int) $args[0];
</span><span class="lines">@@ -3526,7 +3538,7 @@
</span><span class="cx"> * - 'description'
</span><span class="cx"> * - 'metadata'
</span><span class="cx"> */
</span><del>- function wp_getMediaItem($args) {
</del><ins>+ public function wp_getMediaItem($args) {
</ins><span class="cx"> $this->escape($args);
</span><span class="cx">
</span><span class="cx"> $blog_id = (int) $args[0];
</span><span class="lines">@@ -3572,7 +3584,7 @@
</span><span class="cx"> * - filter
</span><span class="cx"> * @return array. Contains a collection of media items. See {@link wp_xmlrpc_server::wp_getMediaItem()} for a description of each item contents
</span><span class="cx"> */
</span><del>- function wp_getMediaLibrary($args) {
</del><ins>+ public function wp_getMediaLibrary($args) {
</ins><span class="cx"> $this->escape($args);
</span><span class="cx">
</span><span class="cx"> $blog_id = (int) $args[0];
</span><span class="lines">@@ -3615,7 +3627,7 @@
</span><span class="cx"> * - password
</span><span class="cx"> * @return array
</span><span class="cx"> */
</span><del>- function wp_getPostFormats( $args ) {
</del><ins>+ public function wp_getPostFormats( $args ) {
</ins><span class="cx"> $this->escape( $args );
</span><span class="cx">
</span><span class="cx"> $blog_id = (int) $args[0];
</span><span class="lines">@@ -3673,7 +3685,7 @@
</span><span class="cx"> * - 'taxonomies'
</span><span class="cx"> * - 'supports'
</span><span class="cx"> */
</span><del>- function wp_getPostType( $args ) {
</del><ins>+ public function wp_getPostType( $args ) {
</ins><span class="cx"> if ( ! $this->minimum_args( $args, 4 ) )
</span><span class="cx"> return $this->error;
</span><span class="cx">
</span><span class="lines">@@ -3729,7 +3741,7 @@
</span><span class="cx"> * - array $fields
</span><span class="cx"> * @return array
</span><span class="cx"> */
</span><del>- function wp_getPostTypes( $args ) {
</del><ins>+ public function wp_getPostTypes( $args ) {
</ins><span class="cx"> if ( ! $this->minimum_args( $args, 3 ) )
</span><span class="cx"> return $this->error;
</span><span class="cx">
</span><span class="lines">@@ -3786,7 +3798,7 @@
</span><span class="cx"> * - array $fields
</span><span class="cx"> * @return array contains a collection of posts.
</span><span class="cx"> */
</span><del>- function wp_getRevisions( $args ) {
</del><ins>+ public function wp_getRevisions( $args ) {
</ins><span class="cx"> if ( ! $this->minimum_args( $args, 4 ) )
</span><span class="cx"> return $this->error;
</span><span class="cx">
</span><span class="lines">@@ -3862,7 +3874,7 @@
</span><span class="cx"> * - int $post_id
</span><span class="cx"> * @return bool false if there was an error restoring, true if success.
</span><span class="cx"> */
</span><del>- function wp_restoreRevision( $args ) {
</del><ins>+ public function wp_restoreRevision( $args ) {
</ins><span class="cx"> if ( ! $this->minimum_args( $args, 3 ) )
</span><span class="cx"> return $this->error;
</span><span class="cx">
</span><span class="lines">@@ -3914,7 +3926,7 @@
</span><span class="cx"> * @param array $args Method parameters.
</span><span class="cx"> * @return array
</span><span class="cx"> */
</span><del>- function blogger_getUsersBlogs($args) {
</del><ins>+ public function blogger_getUsersBlogs($args) {
</ins><span class="cx"> if ( is_multisite() )
</span><span class="cx"> return $this->_multisite_getUsersBlogs($args);
</span><span class="cx">
</span><span class="lines">@@ -3947,7 +3959,7 @@
</span><span class="cx"> *
</span><span class="cx"> * @access protected
</span><span class="cx"> */
</span><del>- function _multisite_getUsersBlogs($args) {
</del><ins>+ protected function _multisite_getUsersBlogs($args) {
</ins><span class="cx"> $current_blog = get_blog_details();
</span><span class="cx">
</span><span class="cx"> $domain = $current_blog->domain;
</span><span class="lines">@@ -3981,7 +3993,7 @@
</span><span class="cx"> * @param array $args Method parameters.
</span><span class="cx"> * @return array
</span><span class="cx"> */
</span><del>- function blogger_getUserInfo($args) {
</del><ins>+ public function blogger_getUserInfo($args) {
</ins><span class="cx">
</span><span class="cx"> $this->escape($args);
</span><span class="cx">
</span><span class="lines">@@ -4016,7 +4028,7 @@
</span><span class="cx"> * @param array $args Method parameters.
</span><span class="cx"> * @return array
</span><span class="cx"> */
</span><del>- function blogger_getPost($args) {
</del><ins>+ public function blogger_getPost($args) {
</ins><span class="cx">
</span><span class="cx"> $this->escape($args);
</span><span class="cx">
</span><span class="lines">@@ -4061,7 +4073,7 @@
</span><span class="cx"> * @param array $args Method parameters.
</span><span class="cx"> * @return array
</span><span class="cx"> */
</span><del>- function blogger_getRecentPosts($args) {
</del><ins>+ public function blogger_getRecentPosts($args) {
</ins><span class="cx">
</span><span class="cx"> $this->escape($args);
</span><span class="cx">
</span><span class="lines">@@ -4124,7 +4136,7 @@
</span><span class="cx"> * @since 1.5.0
</span><span class="cx"> * @deprecated 3.5.0
</span><span class="cx"> */
</span><del>- function blogger_getTemplate($args) {
</del><ins>+ public function blogger_getTemplate($args) {
</ins><span class="cx"> return new IXR_Error( 403, __('Sorry, that file cannot be edited.' ) );
</span><span class="cx"> }
</span><span class="cx">
</span><span class="lines">@@ -4134,7 +4146,7 @@
</span><span class="cx"> * @since 1.5.0
</span><span class="cx"> * @deprecated 3.5.0
</span><span class="cx"> */
</span><del>- function blogger_setTemplate($args) {
</del><ins>+ public function blogger_setTemplate($args) {
</ins><span class="cx"> return new IXR_Error( 403, __('Sorry, that file cannot be edited.' ) );
</span><span class="cx"> }
</span><span class="cx">
</span><span class="lines">@@ -4146,7 +4158,7 @@
</span><span class="cx"> * @param array $args Method parameters.
</span><span class="cx"> * @return int
</span><span class="cx"> */
</span><del>- function blogger_newPost($args) {
</del><ins>+ public function blogger_newPost($args) {
</ins><span class="cx">
</span><span class="cx"> $this->escape($args);
</span><span class="cx">
</span><span class="lines">@@ -4209,7 +4221,7 @@
</span><span class="cx"> * @param array $args Method parameters.
</span><span class="cx"> * @return bool true when done.
</span><span class="cx"> */
</span><del>- function blogger_editPost( $args ) {
</del><ins>+ public function blogger_editPost( $args ) {
</ins><span class="cx">
</span><span class="cx"> $this->escape($args);
</span><span class="cx">
</span><span class="lines">@@ -4277,7 +4289,7 @@
</span><span class="cx"> * @param array $args Method parameters.
</span><span class="cx"> * @return bool True when post is deleted.
</span><span class="cx"> */
</span><del>- function blogger_deletePost($args) {
</del><ins>+ public function blogger_deletePost($args) {
</ins><span class="cx"> $this->escape($args);
</span><span class="cx">
</span><span class="cx"> $post_ID = (int) $args[1];
</span><span class="lines">@@ -4356,7 +4368,7 @@
</span><span class="cx"> * - publish
</span><span class="cx"> * @return int
</span><span class="cx"> */
</span><del>- function mw_newPost($args) {
</del><ins>+ public function mw_newPost($args) {
</ins><span class="cx"> $this->escape($args);
</span><span class="cx">
</span><span class="cx"> $blog_ID = (int) $args[0];
</span><span class="lines">@@ -4636,7 +4648,7 @@
</span><span class="cx"> return strval($post_ID);
</span><span class="cx"> }
</span><span class="cx">
</span><del>- function add_enclosure_if_new( $post_ID, $enclosure ) {
</del><ins>+ public function add_enclosure_if_new( $post_ID, $enclosure ) {
</ins><span class="cx"> if ( is_array( $enclosure ) && isset( $enclosure['url'] ) && isset( $enclosure['length'] ) && isset( $enclosure['type'] ) ) {
</span><span class="cx"> $encstring = $enclosure['url'] . "\n" . $enclosure['length'] . "\n" . $enclosure['type'] . "\n";
</span><span class="cx"> $found = false;
</span><span class="lines">@@ -4662,7 +4674,7 @@
</span><span class="cx"> * @param int $post_ID Post ID.
</span><span class="cx"> * @param string $post_content Post Content for attachment.
</span><span class="cx"> */
</span><del>- function attach_uploads( $post_ID, $post_content ) {
</del><ins>+ public function attach_uploads( $post_ID, $post_content ) {
</ins><span class="cx"> global $wpdb;
</span><span class="cx">
</span><span class="cx"> // find any unattached files
</span><span class="lines">@@ -4683,7 +4695,7 @@
</span><span class="cx"> * @param array $args Method parameters.
</span><span class="cx"> * @return bool True on success.
</span><span class="cx"> */
</span><del>- function mw_editPost($args) {
</del><ins>+ public function mw_editPost($args) {
</ins><span class="cx">
</span><span class="cx"> $this->escape($args);
</span><span class="cx">
</span><span class="lines">@@ -4970,7 +4982,7 @@
</span><span class="cx"> * @param array $args Method parameters.
</span><span class="cx"> * @return array
</span><span class="cx"> */
</span><del>- function mw_getPost($args) {
</del><ins>+ public function mw_getPost($args) {
</ins><span class="cx">
</span><span class="cx"> $this->escape($args);
</span><span class="cx">
</span><span class="lines">@@ -5095,7 +5107,7 @@
</span><span class="cx"> * @param array $args Method parameters.
</span><span class="cx"> * @return array
</span><span class="cx"> */
</span><del>- function mw_getRecentPosts($args) {
</del><ins>+ public function mw_getRecentPosts($args) {
</ins><span class="cx">
</span><span class="cx"> $this->escape($args);
</span><span class="cx">
</span><span class="lines">@@ -5215,7 +5227,7 @@
</span><span class="cx"> * @param array $args Method parameters.
</span><span class="cx"> * @return array
</span><span class="cx"> */
</span><del>- function mw_getCategories($args) {
</del><ins>+ public function mw_getCategories($args) {
</ins><span class="cx">
</span><span class="cx"> $this->escape($args);
</span><span class="cx">
</span><span class="lines">@@ -5263,7 +5275,7 @@
</span><span class="cx"> * @param array $args Method parameters.
</span><span class="cx"> * @return array
</span><span class="cx"> */
</span><del>- function mw_newMediaObject($args) {
</del><ins>+ public function mw_newMediaObject($args) {
</ins><span class="cx"> global $wpdb;
</span><span class="cx">
</span><span class="cx"> $blog_ID = (int) $args[0];
</span><span class="lines">@@ -5377,7 +5389,7 @@
</span><span class="cx"> * @param array $args Method parameters.
</span><span class="cx"> * @return array
</span><span class="cx"> */
</span><del>- function mt_getRecentPostTitles($args) {
</del><ins>+ public function mt_getRecentPostTitles($args) {
</ins><span class="cx">
</span><span class="cx"> $this->escape($args);
</span><span class="cx">
</span><span class="lines">@@ -5438,7 +5450,7 @@
</span><span class="cx"> * @param array $args Method parameters.
</span><span class="cx"> * @return array
</span><span class="cx"> */
</span><del>- function mt_getCategoryList($args) {
</del><ins>+ public function mt_getCategoryList($args) {
</ins><span class="cx">
</span><span class="cx"> $this->escape($args);
</span><span class="cx">
</span><span class="lines">@@ -5477,7 +5489,7 @@
</span><span class="cx"> * @param array $args Method parameters.
</span><span class="cx"> * @return array
</span><span class="cx"> */
</span><del>- function mt_getPostCategories($args) {
</del><ins>+ public function mt_getPostCategories($args) {
</ins><span class="cx">
</span><span class="cx"> $this->escape($args);
</span><span class="cx">
</span><span class="lines">@@ -5521,7 +5533,7 @@
</span><span class="cx"> * @param array $args Method parameters.
</span><span class="cx"> * @return bool True on success.
</span><span class="cx"> */
</span><del>- function mt_setPostCategories($args) {
</del><ins>+ public function mt_setPostCategories($args) {
</ins><span class="cx">
</span><span class="cx"> $this->escape($args);
</span><span class="cx">
</span><span class="lines">@@ -5560,7 +5572,7 @@
</span><span class="cx"> * @param array $args Method parameters.
</span><span class="cx"> * @return array
</span><span class="cx"> */
</span><del>- function mt_supportedMethods($args) {
</del><ins>+ public function mt_supportedMethods($args) {
</ins><span class="cx">
</span><span class="cx"> /** This action is documented in wp-includes/class-wp-xmlrpc-server.php */
</span><span class="cx"> do_action( 'xmlrpc_call', 'mt.supportedMethods' );
</span><span class="lines">@@ -5580,7 +5592,7 @@
</span><span class="cx"> *
</span><span class="cx"> * @param array $args Method parameters.
</span><span class="cx"> */
</span><del>- function mt_supportedTextFilters($args) {
</del><ins>+ public function mt_supportedTextFilters($args) {
</ins><span class="cx"> /** This action is documented in wp-includes/class-wp-xmlrpc-server.php */
</span><span class="cx"> do_action( 'xmlrpc_call', 'mt.supportedTextFilters' );
</span><span class="cx">
</span><span class="lines">@@ -5602,7 +5614,7 @@
</span><span class="cx"> * @param array $args Method parameters.
</span><span class="cx"> * @return mixed
</span><span class="cx"> */
</span><del>- function mt_getTrackbackPings($args) {
</del><ins>+ public function mt_getTrackbackPings($args) {
</ins><span class="cx">
</span><span class="cx"> global $wpdb;
</span><span class="cx">
</span><span class="lines">@@ -5645,7 +5657,7 @@
</span><span class="cx"> * @param array $args Method parameters.
</span><span class="cx"> * @return int
</span><span class="cx"> */
</span><del>- function mt_publishPost($args) {
</del><ins>+ public function mt_publishPost($args) {
</ins><span class="cx">
</span><span class="cx"> $this->escape($args);
</span><span class="cx">
</span><span class="lines">@@ -5690,7 +5702,7 @@
</span><span class="cx"> * @param array $args Method parameters.
</span><span class="cx"> * @return array
</span><span class="cx"> */
</span><del>- function pingback_ping($args) {
</del><ins>+ public function pingback_ping($args) {
</ins><span class="cx"> global $wpdb;
</span><span class="cx">
</span><span class="cx"> /** This action is documented in wp-includes/class-wp-xmlrpc-server.php */
</span><span class="lines">@@ -5903,7 +5915,7 @@
</span><span class="cx"> * @param array $args Method parameters.
</span><span class="cx"> * @return array
</span><span class="cx"> */
</span><del>- function pingback_extensions_getPingbacks($args) {
</del><ins>+ public function pingback_extensions_getPingbacks($args) {
</ins><span class="cx">
</span><span class="cx"> global $wpdb;
</span><span class="cx">
</span></span></pre>
</div>
</div>
</body>
</html>