WordPress.org

Make WordPress Core

Changeset 21818


Ignore:
Timestamp:
09/11/2012 08:11:39 PM (7 years ago)
Author:
nacin
Message:

Remove AtomPub from core.

DB version is bumped to generate the new wp-app rewrite rule and remove the old enable_app option.

props wonderboymusic.
fixes #21509.

Location:
trunk
Files:
2 deleted
12 edited

Legend:

Unmodified
Added
Removed
  • trunk/wp-admin/includes/schema.php

    r21804 r21818  
    445445    // 2.6
    446446    'avatar_default' => 'mystery',
    447     'enable_app' => 0,
    448447
    449448    // 2.7
     
    543542        'can_compress_scripts', 'page_uris', 'update_core', 'update_plugins', 'update_themes', 'doing_cron',
    544543        'random_seed', 'rss_excerpt_length', 'secret', 'use_linksupdate', 'default_comment_status_page',
    545         'wporg_popular_tags', 'what_to_show', 'rss_language', 'language', 'enable_xmlrpc',
     544        'wporg_popular_tags', 'what_to_show', 'rss_language', 'language', 'enable_xmlrpc', 'enable_app',
    546545    );
    547546    foreach ( $unusedoptions as $option )
  • trunk/wp-admin/includes/upgrade.php

    r21811 r21818  
    995995    if ( $wp_current_db_version < 8000 )
    996996        populate_roles_260();
    997 
    998     if ( $wp_current_db_version < 8201 ) {
    999         update_option('enable_app', 1);
    1000     }
    1001997}
    1002998
  • trunk/wp-admin/options-writing.php

    r21804 r21818  
    122122<?php endif; ?>
    123123
    124 <?php do_settings_fields('writing', 'default'); ?>
     124<?php
     125do_settings_fields('writing', 'default');
     126do_settings_fields('writing', 'remote_publishing'); // A deprecated section.
     127?>
    125128</table>
    126129
     
    169172<?php } ?>
    170173
    171 <h3><?php _e('Remote Publishing') ?></h3>
    172 <p><?php printf(__('To post to WordPress from a desktop blogging client or remote website that uses the Atom Publishing Protocol or one of the XML-RPC publishing interfaces you must enable them below.')) ?></p>
    173 <table class="form-table">
    174 <tr valign="top">
    175 <th scope="row"><?php _e('Atom Publishing Protocol') ?></th>
    176 <td><fieldset><legend class="screen-reader-text"><span><?php _e('Atom Publishing Protocol') ?></span></legend>
    177 <label for="enable_app">
    178 <input name="enable_app" type="checkbox" id="enable_app" value="1" <?php checked('1', get_option('enable_app')); ?> />
    179 <?php _e('Enable the Atom Publishing Protocol.') ?></label><br />
    180 </fieldset></td>
    181 </tr>
    182 <?php do_settings_fields('writing', 'remote_publishing'); ?>
    183 </table>
    184 
    185174<?php if ( apply_filters( 'enable_update_services_configuration', true ) ) { ?>
    186175<h3><?php _e('Update Services') ?></h3>
  • trunk/wp-admin/options.php

    r21804 r21818  
    6565    'privacy' => array( 'blog_public' ),
    6666    'reading' => array( 'posts_per_page', 'posts_per_rss', 'rss_use_excerpt', 'blog_charset', 'show_on_front', 'page_on_front', 'page_for_posts' ),
    67     'writing' => array( 'default_post_edit_rows', 'use_smilies', 'default_category', 'default_email_category', 'use_balanceTags', 'default_link_category', 'default_post_format', 'enable_app' ),
     67    'writing' => array( 'default_post_edit_rows', 'use_smilies', 'default_category', 'default_email_category', 'use_balanceTags', 'default_link_category', 'default_post_format' ),
    6868    'options' => array( '' ) );
    6969
  • trunk/wp-includes/admin-bar.php

    r21735 r21818  
    731731
    732732    // For all these types of requests, we never want an admin bar.
    733     if ( defined('XMLRPC_REQUEST') || defined('APP_REQUEST') || defined('DOING_AJAX') || defined('IFRAME_REQUEST') )
     733    if ( defined('XMLRPC_REQUEST') || defined('DOING_AJAX') || defined('IFRAME_REQUEST') )
    734734        return false;
    735735
  • trunk/wp-includes/class-wp.php

    r21208 r21818  
    196196                    $matches = array('');
    197197                }
    198             } else if ( $req_uri != 'wp-app.php' ) {
     198            } else {
    199199                foreach ( (array) $rewrite as $match => $query ) {
    200200                    // If the requesting file is the anchor of the match, prepend it to the path info.
     
    230230                parse_str($query, $perma_query_vars);
    231231
    232                 // If we're processing a 404 request, clear the error var
    233                 // since we found something.
    234                 unset( $_GET['error'] );
    235                 unset( $error );
     232                // If we're processing a 404 request, clear the error var since we found something.
     233                if ( '404' == $error )
     234                    unset( $error, $_GET['error'] );
    236235            }
    237236
    238237            // If req_uri is empty or if it is a request for ourself, unset error.
    239238            if ( empty($request) || $req_uri == $self || strpos($_SERVER['PHP_SELF'], 'wp-admin/') !== false ) {
    240                 unset( $_GET['error'] );
    241                 unset( $error );
     239                unset( $error, $_GET['error'] );
    242240
    243241                if ( isset($perma_query_vars) && strpos($_SERVER['PHP_SELF'], 'wp-admin/') !== false )
     
    326324        if ( is_user_logged_in() )
    327325            $headers = array_merge($headers, wp_get_nocache_headers());
    328         if ( !empty($this->query_vars['error']) && '404' == $this->query_vars['error'] ) {
    329             $status = 404;
    330             if ( !is_user_logged_in() )
    331                 $headers = array_merge($headers, wp_get_nocache_headers());
    332             $headers['Content-Type'] = get_option('html_type') . '; charset=' . get_option('blog_charset');
     326        if ( ! empty( $this->query_vars['error'] ) ) {
     327            $status = (int) $this->query_vars['error'];
     328            if ( 404 === $status ) {
     329                if ( ! is_user_logged_in() )
     330                    $headers = array_merge($headers, wp_get_nocache_headers());
     331                $headers['Content-Type'] = get_option('html_type') . '; charset=' . get_option('blog_charset');
     332            } elseif ( in_array( $status, array( 403, 500, 502, 503 ) ) ) {
     333                $exit_required = true;
     334            }
    333335        } else if ( empty($this->query_vars['feed']) ) {
    334336            $headers['Content-Type'] = get_option('html_type') . '; charset=' . get_option('blog_charset');
  • trunk/wp-includes/functions.php

    r21797 r21818  
    19111911    elseif ( defined( 'XMLRPC_REQUEST' ) && XMLRPC_REQUEST )
    19121912        $function = apply_filters( 'wp_die_xmlrpc_handler', '_xmlrpc_wp_die_handler' );
    1913     elseif ( defined( 'APP_REQUEST' ) && APP_REQUEST )
    1914         $function = apply_filters( 'wp_die_app_handler', '_scalar_wp_die_handler' );
    19151913    else
    19161914        $function = apply_filters( 'wp_die_handler', '_default_wp_die_handler' );
  • trunk/wp-includes/pluggable-deprecated.php

    r18514 r21818  
    169169    _deprecated_function( 'wp_login', '2.5', 'wp_signon()' );
    170170endif;
     171
     172/**
     173 * WordPress AtomPub API implementation.
     174 *
     175 * Originally stored in wp-app.php, and later wp-includes/class-wp-atom-server.php.
     176 * It is kept here in case a plugin directly referred to the class.
     177 *
     178 * @since 2.2.0
     179 * @deprecated 3.5.0
     180 * @link http://wordpress.org/extend/plugins/atom-publishing-protocol/
     181 */
     182if ( ! class_exists( 'wp_atom_server' ) ) {
     183    class wp_atom_server {
     184        public function __call( $name, $arguments ) {
     185            _deprecated_function( __CLASS__ . '::' . $name, '3.5', 'the Atom Publishing Platform plugin' );
     186        }
     187
     188        public static function __callStatic( $name, $arguments ) {
     189            _deprecated_function( __CLASS__ . '::' . $name, '3.5', 'the Atom Publishing Platform plugin' );
     190        }
     191    }
     192}
  • trunk/wp-includes/post.php

    r21792 r21818  
    46714671 * @access private
    46724672 * @uses $wpdb
    4673  * @uses XMLRPC_REQUEST and APP_REQUEST constants.
     4673 * @uses XMLRPC_REQUEST constant.
    46744674 * @uses do_action() Calls 'xmlprc_publish_post' on post ID if XMLRPC_REQUEST is defined.
    4675  * @uses do_action() Calls 'app_publish_post' on post ID if APP_REQUEST is defined.
    46764675 *
    46774676 * @param int $post_id The ID in the database table of the post being published
     
    46824681    if ( defined('XMLRPC_REQUEST') )
    46834682        do_action('xmlrpc_publish_post', $post_id);
    4684     if ( defined('APP_REQUEST') )
    4685         do_action('app_publish_post', $post_id);
    46864683
    46874684    if ( defined('WP_IMPORTING') )
  • trunk/wp-includes/rewrite.php

    r21810 r21818  
    15261526        $robots_rewrite = ( empty( $home_path['path'] ) || '/' == $home_path['path'] ) ? array( 'robots\.txt$' => $this->index . '?robots=1' ) : array();
    15271527
    1528         // Old feed files
    1529         $old_feed_files = array( '.*wp-(atom|rdf|rss|rss2|feed|commentsrss2)\.php$' => $this->index . '?feed=old' );
     1528        // Old feed and service files
     1529        $deprecated_files = array(
     1530            '.*wp-(atom|rdf|rss|rss2|feed|commentsrss2)\.php$' => $this->index . '?feed=old',
     1531            '.*wp-app\.php$' => $this->index . '?error=403',
     1532        );
    15301533
    15311534        // Registration rules
     
    15861589        // Put them together.
    15871590        if ( $this->use_verbose_page_rules )
    1588             $this->rules = array_merge($this->extra_rules_top, $robots_rewrite, $old_feed_files, $registration_pages, $root_rewrite, $comments_rewrite, $search_rewrite,  $author_rewrite, $date_rewrite, $page_rewrite, $post_rewrite, $this->extra_rules);
     1591            $this->rules = array_merge($this->extra_rules_top, $robots_rewrite, $deprecated_files, $old_service_files, $registration_pages, $root_rewrite, $comments_rewrite, $search_rewrite,  $author_rewrite, $date_rewrite, $page_rewrite, $post_rewrite, $this->extra_rules);
    15891592        else
    1590             $this->rules = array_merge($this->extra_rules_top, $robots_rewrite, $old_feed_files, $registration_pages, $root_rewrite, $comments_rewrite, $search_rewrite,  $author_rewrite, $date_rewrite, $post_rewrite, $page_rewrite, $this->extra_rules);
     1593            $this->rules = array_merge($this->extra_rules_top, $robots_rewrite, $deprecated_files, $old_service_files, $registration_pages, $root_rewrite, $comments_rewrite, $search_rewrite,  $author_rewrite, $date_rewrite, $post_rewrite, $page_rewrite, $this->extra_rules);
    15911594
    15921595        do_action_ref_array('generate_rewrite_rules', array(&$this));
  • trunk/wp-includes/version.php

    r21811 r21818  
    1212 * @global int $wp_db_version
    1313 */
    14 $wp_db_version = 21811;
     14$wp_db_version = 21818;
    1515
    1616/**
  • trunk/xmlrpc.php

    r19935 r21818  
    4343      <api name="MetaWeblog" blogID="1" preferred="false" apiLink="<?php echo site_url('xmlrpc.php', 'rpc') ?>" />
    4444      <api name="Blogger" blogID="1" preferred="false" apiLink="<?php echo site_url('xmlrpc.php', 'rpc') ?>" />
    45       <api name="Atom" blogID="" preferred="false" apiLink="<?php echo site_url('wp-app.php/service', 'rpc') ?>" />
     45      <?php do_action( 'xmlrpc_rsd_apis' ); ?>
    4646    </apis>
    4747  </service>
Note: See TracChangeset for help on using the changeset viewer.