Permalink
Browse files

release new version, with xmlrpc support

  • Loading branch information...
1 parent a69633d commit 83b2091e8e746ebb7fb9f813a7cd3ccc3c1868fb @bueltge committed Sep 22, 2013
Showing with 10 additions and 8 deletions.
  1. +10 −8 remove-comments-absolute.php
@@ -6,8 +6,8 @@
* Domain Path: /languages
* Description: Deactivate comments functions and remove areas absolutely from the WordPress install
* Author: Frank Bültge
- * Version: 1.1.2
- * Licence: GPLv3
+ * Version: 1.1.3
+ * License: GPLv3
* Author URI: http://bueltge.de/
*/
@@ -490,11 +490,11 @@ public function remove_theme_string( $translation, $text, $domain ) {
* Replace comment related XML_RPC methods.
*
* @access public
- * @since
+ * @since 09/21/2013
* @return array
*/
public function xmlrpc_replace_methods( $methods ) {
-
+
$comment_methods = array(
'wp.getCommentCount',
'wp.getComment',
@@ -506,22 +506,24 @@ public function xmlrpc_replace_methods( $methods ) {
);
foreach( $comment_methods as $method_name ) {
- if ( isset( $methods[$method_name] ) ) {
+
+ if ( isset( $methods[$method_name] ) )
$methods[$method_name] = array( $this, 'xmlrpc_placeholder_method' );
- }
+
}
-
+
return $methods;
}
/**
* XML_RPC placeholder method.
*
* @access public
- * @since
+ * @since 09/21/2013
* @return object
*/
public function xmlrpc_placeholder_method() {
+
return new IXR_Error( 403, __( 'Comments are disabled on this site.', 'remove_comments_absolute' ) );
}

0 comments on commit 83b2091

Please sign in to comment.