Make WordPress Core

Ticket #21866: atom.diff

File atom.diff, 10.6 KB (added by wonderboymusic, 12 years ago)
  • wp-includes/admin-bar.php

     
    730730        global $show_admin_bar, $pagenow;
    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
    736736        // Integrated into the admin.
  • wp-includes/post.php

     
    46704670 * @since 2.3.0
    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
    46784677 */
     
    46814680
    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') )
    46884685                return;
  • wp-includes/pluggable-deprecated.php

     
    168168else :
    169169        _deprecated_function( 'wp_login', '2.5', 'wp_signon()' );
    170170endif;
     171
     172/**
     173 * WordPress AtomPub API implementation.
     174 *
     175 * @since 2.2.0
     176 * @deprecated 3.5.0
     177 *
     178 */
     179if ( ! class_exists( 'wp_atom_server' ) ) {
     180        class wp_atom_server {
     181                public function __call( $name, $arguments ) {
     182                        _deprecated_function( __CLASS__ . '::' . $name, '3.5', 'the Atom Publishing Platform plugin' );
     183                }
     184               
     185                public static function __callStatic( $name, $arguments ) {
     186                        _deprecated_function( __CLASS__ . '::' . $name, '3.5', 'the Atom Publishing Platform plugin' );
     187                }
     188        }
     189}
     190 No newline at end of file
  • wp-includes/functions.php

     
    19101910                $function = apply_filters( 'wp_die_ajax_handler', '_ajax_wp_die_handler' );
    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' );
    19171915
  • wp-includes/rewrite.php

     
    15271527
    15281528                // Old feed files
    15291529                $old_feed_files = array( '.*wp-(atom|rdf|rss|rss2|feed|commentsrss2)\.php$' => $this->index . '?feed=old' );
    1530 
     1530                // Old service files
     1531                $old_service_files = array( '.*wp-app\.php$' => $this->index . '?error=403' );
     1532               
    15311533                // Registration rules
    15321534                $registration_pages = array();
    15331535                if ( is_multisite() && is_main_site() ) {
     
    15851587
    15861588                // Put them together.
    15871589                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);
     1590                        $this->rules = array_merge($this->extra_rules_top, $robots_rewrite, $old_feed_files, $old_service_files, $registration_pages, $root_rewrite, $comments_rewrite, $search_rewrite,  $author_rewrite, $date_rewrite, $page_rewrite, $post_rewrite, $this->extra_rules);
    15891591                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);
     1592                        $this->rules = array_merge($this->extra_rules_top, $robots_rewrite, $old_feed_files, $old_service_files, $registration_pages, $root_rewrite, $comments_rewrite, $search_rewrite,  $author_rewrite, $date_rewrite, $post_rewrite, $page_rewrite, $this->extra_rules);
    15911593
    15921594                do_action_ref_array('generate_rewrite_rules', array(&$this));
    15931595                $this->rules = apply_filters('rewrite_rules_array', $this->rules);
  • wp-includes/class-wp.php

     
    195195                                        $query = $rewrite['$'];
    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.
    201201                                        if ( ! empty($req_uri) && strpos($match, $req_uri) === 0 && $req_uri != $request )
     
    228228
    229229                                // Parse the query.
    230230                                parse_str($query, $perma_query_vars);
    231 
    232                                 // If we're processing a 404 request, clear the error var
    233                                 // since we found something.
    234                                 unset( $_GET['error'] );
    235                                 unset( $error );
     231                               
     232                                if ( '404' == $error ) {
     233                                        // If we're processing a 404 request, clear the error var
     234                                        // since we found something.
     235                                        unset( $_GET['error'] );
     236                                        unset( $error );
     237                                }
    236238                        }
    237239
    238240                        // If req_uri is empty or if it is a request for ourself, unset error.
     
    325327
    326328                if ( is_user_logged_in() )
    327329                        $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');
     330                if ( ! empty( $this->query_vars['error'] ) ) {
     331                        $status = (int) $this->query_vars['error'];
     332                        if ( in_array( $status, array( 403, 500, 502, 503 ) ) ) {
     333                                $exit_required = true;
     334                        } elseif ( 404 === $status ) {
     335                                if ( ! is_user_logged_in() )
     336                                        $headers = array_merge($headers, wp_get_nocache_headers());             
     337                                $headers['Content-Type'] = get_option('html_type') . '; charset=' . get_option('blog_charset');
     338                        }
    333339                } else if ( empty($this->query_vars['feed']) ) {
    334340                        $headers['Content-Type'] = get_option('html_type') . '; charset=' . get_option('blog_charset');
    335341                } else {
  • xmlrpc.php

     
    4242      <api name="Movable Type" blogID="1" preferred="false" apiLink="<?php echo site_url('xmlrpc.php', 'rpc') ?>" />
    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>
    4848</rsd>
  • wp-admin/includes/schema.php

     
    444444
    445445        // 2.6
    446446        'avatar_default' => 'mystery',
    447         'enable_app' => 0,
    448447
    449448        // 2.7
    450449        'large_size_w' => 1024,
     
    542541                '_wp_http_referer', 'Update', 'action', 'rich_editing', 'autosave_interval', 'deactivated_plugins',
    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 )
    548547                delete_option($option);
  • wp-admin/options.php

     
    6464        'media' => array( 'thumbnail_size_w', 'thumbnail_size_h', 'thumbnail_crop', 'medium_size_w', 'medium_size_h', 'large_size_w', 'large_size_h', 'image_default_size', 'image_default_align', 'image_default_link_type', 'embed_autourls', 'embed_size_w', 'embed_size_h' ),
    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
    7070$mail_options = array('mailserver_url', 'mailserver_port', 'mailserver_login', 'mailserver_pass');
  • wp-admin/options-writing.php

     
    168168</table>
    169169<?php } ?>
    170170
     171<?php if ( isset( $GLOBALS['wp_settings_fields']['writing']['remote_publishing'] ) ): ?>
    171172<h3><?php _e('Remote Publishing') ?></h3>
    172173<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>
    173174<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>
    182175<?php do_settings_fields('writing', 'remote_publishing'); ?>
    183176</table>
     177<?php endif ?>
    184178
    185179<?php if ( apply_filters( 'enable_update_services_configuration', true ) ) { ?>
    186180<h3><?php _e('Update Services') ?></h3>