summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authordonncha <donncha@7be80a69-a1ef-0310-a953-fb0f7c49ff36>2007-10-26 11:09:56 +0000
committerdonncha <donncha@7be80a69-a1ef-0310-a953-fb0f7c49ff36>2007-10-26 11:09:56 +0000
commit5c276aac16e4d4c7ba2d711dfa20c15f83d8f331 (patch)
tree299fa70f1fa272d58a846fcc6e54dfc0ef48ac25
parentec1ca88f24a92d2a4e3c70f3abc28d0b919f7a06 (diff)
Remove "disable xml-rpc" feature, it's going in a plugin.
Added wpmu_options and update_wpmu_options hooks to add options to wpmu-options.php git-svn-id: http://svn.automattic.com/wordpress-mu/trunk@1132 7be80a69-a1ef-0310-a953-fb0f7c49ff36
-rw-r--r--index-install.php1
-rw-r--r--wp-admin/wpmu-edit.php4
-rw-r--r--wp-admin/wpmu-options.php18
-rw-r--r--wp-includes/wpmu-functions.php15
4 files changed, 8 insertions, 30 deletions
diff --git a/index-install.php b/index-install.php
index fb2a018..d34ff71 100644
--- a/index-install.php
+++ b/index-install.php
@@ -368,7 +368,6 @@ function step3() {
$wpdb->query( "INSERT INTO ".$wpdb->sitemeta." (meta_id, site_id, meta_key, meta_value) VALUES (NULL, 1, 'admin_email', '".$email."')" );
$wpdb->query( "INSERT INTO ".$wpdb->sitemeta." (meta_id, site_id, meta_key, meta_value) VALUES (NULL, 1, 'admin_user_id', '1')" );
$wpdb->query( "INSERT INTO ".$wpdb->sitemeta." (meta_id, site_id, meta_key, meta_value) VALUES (NULL, 1, 'registration', 'none')" );
- $wpdb->query( "INSERT INTO ".$wpdb->sitemeta." (meta_id, site_id, meta_key, meta_value) VALUES (NULL, 1, 'xmlrpc_active', 'yes')" );
$wpdb->query( "INSERT INTO ".$wpdb->site." ( id, domain, path ) VALUES ( NULL, '$domain', '$base' )" );
$wpdb->query( "INSERT INTO " . $wpdb->sitecategories . " ( cat_ID, cat_name, category_nicename, last_updated ) VALUES (1, 'Uncategorized', 'uncategorized', NOW())" );
$wpdb->query( "INSERT INTO " . $wpdb->sitecategories . " ( cat_ID, cat_name, category_nicename, last_updated ) VALUES (2, 'Blogroll', 'blogroll', NOW())" );
diff --git a/wp-admin/wpmu-edit.php b/wp-admin/wpmu-edit.php
index 777fd16..ae9c73d 100644
--- a/wp-admin/wpmu-edit.php
+++ b/wp-admin/wpmu-edit.php
@@ -36,7 +36,6 @@ switch( $_GET['action'] ) {
update_site_option( "illegal_names", $names );
update_site_option( "registration", $_POST['registration'] );
- update_site_option( "xmlrpc_active", $_POST[ 'xmlrpc_active' ] );
update_site_option( "registrationnotification", $_POST['registrationnotification'] );
if( $_POST['limited_email_domains'] != '' ) {
@@ -77,6 +76,9 @@ switch( $_GET['action'] ) {
update_site_option( 'site_admins' , $site_admins );
}
+ // Update more options here
+ do_action( 'update_wpmu_options' );
+
wp_redirect( add_query_arg( "updated", "true", $_SERVER['HTTP_REFERER'] ) );
exit();
break;
diff --git a/wp-admin/wpmu-options.php b/wp-admin/wpmu-options.php
index ab63754..7bfe2bc 100644
--- a/wp-admin/wpmu-options.php
+++ b/wp-admin/wpmu-options.php
@@ -70,19 +70,6 @@ if (isset($_GET['updated'])) {
</td>
</tr>
- <tr valign="top">
- <th scope="row"><?php _e('Enable posting by XMLRPC') ?></th>
- <?php
- if( !get_site_option('xmlrpc_active') )
- update_site_option( 'xmlrpc_active', 'yes' );
- ?>
- <td>
- <input name="xmlrpc_active" type="radio" id="xmlrpc_active1" value='yes' <?php echo get_site_option('xmlrpc_active') == 'yes' ? 'checked="checked"' : ''; ?> /> <?php _e('Yes'); ?><br />
- <input name="xmlrpc_active" type="radio" id="xmlrpc_active2" value='no' <?php echo get_site_option('xmlrpc_active') == 'no' ? 'checked="checked"' : ''; ?> /> <?php _e('No'); ?><br />
- <?php _e('This is an advanced technique for making posts to blogs. It is used by <a href="http://codex.wordpress.org/Weblog_Client">blog clients</a> like Ecto, Flock and Microsoft Live Writer and by Flickr to post pictures to blogs. Unfortunately it is also extensively used by spammers. <em>Disabled by Default</em>') ?>
- </td>
- </tr>
-
<tr valign="top">
<th scope="row"><?php _e('Welcome Email:') ?></th>
<td>
@@ -204,6 +191,11 @@ if (isset($_GET['updated'])) {
?>
</table>
</fieldset>
+
+ <?php
+ // Add more options here
+ do_action( 'wpmu_options' );
+ ?>
<p class="submit">
<input type="submit" name="Submit" value="<?php _e('Update Options') ?>" /></p>
diff --git a/wp-includes/wpmu-functions.php b/wp-includes/wpmu-functions.php
index 40eb75b..14ba2ba 100644
--- a/wp-includes/wpmu-functions.php
+++ b/wp-includes/wpmu-functions.php
@@ -1868,19 +1868,4 @@ function redirect_this_site( $hosts ) {
return array( $current_site->domain );
}
add_filter( 'allowed_redirect_hosts', 'redirect_this_site' );
-
-function is_xmlrpc_active() {
- global $HTTP_RAW_POST_DATA;
- if ($HTTP_RAW_POST_DATA)
- $data = $HTTP_RAW_POST_DATA;
-
- // add this to a blog's options table to enable xmlrpc on that blog
- if( get_option( 'xmlrpc_active' ) == 'yes' )
- return true;
-
- // kill everything but pingbacks if xmlrpc is disabled
- if( defined( 'XMLRPC_REQUEST' ) && strpos( $data, '<methodName>pingback.ping</methodName>' ) === false && (get_option( 'xmlrpc_active' ) == 'no' || get_site_option( 'xmlrpc_active' ) != 'yes' ) )
- die();
-}
-add_action( 'init', 'is_xmlrpc_active' );
?>