WordPress.org

Make WordPress Core

Ticket #6237: tabs5.r7315.diff

File tabs5.r7315.diff, 8.9 KB (added by hansengel, 10 years ago)
  • wp-app.php

     
    4545endif;
    4646
    4747function wa_posts_where_include_drafts_filter($where) {
    48         $where = str_replace("post_status = 'publish'","post_status = 'publish' OR post_status = 'future' OR post_status = 'draft' OR post_status = 'inherit'", $where);
    49         return $where;
    50 
     48        $where = str_replace("post_status = 'publish'","post_status = 'publish' OR post_status = 'future' OR post_status = 'draft' OR post_status = 'inherit'", $where);
     49        return $where;
    5150}
    5251add_filter('posts_where', 'wa_posts_where_include_drafts_filter');
    5352
     
    170169                $entries_url = attribute_escape($this->get_entries_url());
    171170                $categories_url = attribute_escape($this->get_categories_url());
    172171                $media_url = attribute_escape($this->get_attachments_url());
    173                 foreach ($this->media_content_types as $med) {
    174                   $accepted_media_types = $accepted_media_types . "<accept>" . $med . "</accept>";
    175                 }
     172                foreach ($this->media_content_types as $med) {
     173                        $accepted_media_types = $accepted_media_types . "<accept>" . $med . "</accept>";
     174                }
    176175                $atom_prefix="atom";
    177176                $atom_blogname=get_bloginfo('name');
    178177                $service_doc = <<<EOD
    179178<service xmlns="$this->ATOMPUB_NS" xmlns:$atom_prefix="$this->ATOM_NS">
    180   <workspace>
    181     <$atom_prefix:title>$atom_blogname Workspace</$atom_prefix:title>
    182     <collection href="$entries_url">
    183       <$atom_prefix:title>$atom_blogname Posts</$atom_prefix:title>
    184       <accept>$this->ATOM_CONTENT_TYPE;type=entry</accept>
    185       <categories href="$categories_url" />
    186     </collection>
    187     <collection href="$media_url">
    188       <$atom_prefix:title>$atom_blogname Media</$atom_prefix:title>
    189       $accepted_media_types
    190     </collection>
    191   </workspace>
     179        <workspace>
     180                <$atom_prefix:title>$atom_blogname Workspace</$atom_prefix:title>
     181                <collection href="$entries_url">
     182                        <$atom_prefix:title>$atom_blogname Posts</$atom_prefix:title>
     183                        <accept>$this->ATOM_CONTENT_TYPE;type=entry</accept>
     184                        <categories href="$categories_url" />
     185                </collection>
     186                <collection href="$media_url">
     187                        <$atom_prefix:title>$atom_blogname Media</$atom_prefix:title>
     188                        $accepted_media_types
     189                </collection>
     190        </workspace>
    192191</service>
    193192
    194193EOD;
     
    207206                $categories = "";
    208207                $cats = get_categories("hierarchical=0&hide_empty=0");
    209208                foreach ((array) $cats as $cat) {
    210                         $categories .= "    <category term=\"" . attribute_escape($cat->name) .  "\" />\n";
     209                        $categories .= "        <category term=\"" . attribute_escape($cat->name) .  "\" />\n";
    211210}
    212211                $output = <<<EOD
    213212<app:categories xmlns:app="$this->ATOMPUB_NS"
     
    700699        }
    701700
    702701        function get_attachments($page = 1, $post_type = 'attachment') {
    703             log_app('function',"get_attachments($page, '$post_type')");
    704             $GLOBALS['post_type'] = $post_type;
    705             $feed = $this->get_feed($page, $post_type);
    706             $this->output($feed);
     702                log_app('function',"get_attachments($page, '$post_type')");
     703                $GLOBALS['post_type'] = $post_type;
     704                $feed = $this->get_feed($page, $post_type);
     705                $this->output($feed);
    707706        }
    708707
    709708        function get_feed($page = 1, $post_type = 'post') {
     
    893892                $content = <<<EOD
    894893<!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML 2.0//EN">
    895894<html>
    896   <head>
    897     <title>302 Found</title>
    898   </head>
    899 <body>
    900   <h1>Found</h1>
    901   <p>The document has moved <a href="$escaped_url">here</a>.</p>
    902   </body>
     895        <head>
     896                <title>302 Found</title>
     897        </head>
     898        <body>
     899                <h1>Found</h1>
     900                <p>The document has moved <a href="$escaped_url">here</a>.</p>
     901        </body>
    903902</html>
    904903
    905904EOD;
     
    949948                $content = <<<EOD
    950949<!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML 2.0//EN">
    951950<html>
    952   <head>
    953     <title>401 Unauthorized</title>
    954   </head>
    955 <body>
    956     <h1>401 Unauthorized</h1>
    957     <p>$msg</p>
    958   </body>
     951        <head>
     952                <title>401 Unauthorized</title>
     953        </head>
     954        <body>
     955                <h1>401 Unauthorized</h1>
     956                <p>$msg</p>
     957        </body>
    959958</html>
    960959
    961960EOD;
     
    10981097
    10991098        function rfc3339_str2time($str) {
    11001099
    1101             $match = false;
    1102             if(!preg_match("/(\d{4}-\d{2}-\d{2})T(\d{2}\:\d{2}\:\d{2})\.?\d{0,3}(Z|[+-]+\d{2}\:\d{2})/", $str, $match))
     1100                $match = false;
     1101                if(!preg_match("/(\d{4}-\d{2}-\d{2})T(\d{2}\:\d{2}\:\d{2})\.?\d{0,3}(Z|[+-]+\d{2}\:\d{2})/", $str, $match))
    11031102                        return false;
    11041103
    1105             if($match[3] == 'Z')
     1104                if($match[3] == 'Z')
    11061105                        $match[3] == '+0000';
    11071106
    1108             return strtotime($match[1] . " " . $match[2] . " " . $match[3]);
     1107                return strtotime($match[1] . " " . $match[2] . " " . $match[3]);
    11091108        }
    11101109
    11111110        function get_publish_time($published) {
    11121111
    1113             $pubtime = $this->rfc3339_str2time($published);
     1112                $pubtime = $this->rfc3339_str2time($published);
    11141113
    1115             if(!$pubtime) {
     1114                if(!$pubtime) {
    11161115                        return array(current_time('mysql'),current_time('mysql',1));
    1117             } else {
     1116                } else {
    11181117                        return array(date("Y-m-d H:i:s", $pubtime), gmdate("Y-m-d H:i:s", $pubtime));
    1119             }
     1118                }
    11201119        }
    11211120
    11221121}
  • wp-admin/users.php

     
    396396        if ( get_option('users_can_register') )
    397397                echo '<p>' . sprintf(__('Users can <a href="%1$s">register themselves</a> or you can manually create users here.'), get_option('siteurl').'/wp-register.php') . '</p>';
    398398        else
    399                 echo '<p>' . sprintf(__('Users cannot currently <a href="%1$s">register themselves</a>, but you can manually create users here.'), get_option('siteurl').'/wp-admin/options-general.php#users_can_register') . '</p>';
     399                echo '<p>' . sprintf(__('Users cannot currently <a href="%1$s">register themselves</a>, but you can manually create users here.'), get_option('siteurl').'/wp-admin/options-general.php#users_can_register') . '</p>';
    400400?>
    401401<form action="#add-new-user" method="post" name="adduser" id="adduser" class="add:users:">
    402402<?php wp_nonce_field('add-user') ?>
  • wp-admin/admin.php

     
    44if ( defined('ABSPATH') )
    55        require_once( ABSPATH . 'wp-config.php');
    66else
    7     require_once('../wp-config.php');
     7        require_once('../wp-config.php');
    88
    99if ( get_option('db_version') != $wp_db_version ) {
    1010        wp_redirect(get_option('siteurl') . '/wp-admin/upgrade.php?_wp_http_referer=' . urlencode(stripslashes($_SERVER['REQUEST_URI'])));
  • wp-admin/async-upload.php

     
    77if ( defined('ABSPATH') )
    88        require_once( ABSPATH . 'wp-config.php');
    99else
    10     require_once('../wp-config.php');
     10        require_once('../wp-config.php');
    1111
    1212// Flash often fails to send cookies with the POST or upload, so we need to pass it in GET or POST instead
    1313if ( empty($_COOKIE[AUTH_COOKIE]) && !empty($_REQUEST['auth_cookie']) )
  • wp-admin/link-category.php

     
    3030        $cat_name = get_term_field('name', $cat_ID, 'link_category');
    3131
    3232        // Don't delete the default cats.
    33     if ( $cat_ID == get_option('default_link_category') )
     33        if ( $cat_ID == get_option('default_link_category') )
    3434                wp_die(sprintf(__("Can&#8217;t delete the <strong>%s</strong> category: this is the default one"), $cat_name));
    3535
    3636        wp_delete_term($cat_ID, 'link_category');
  • wp-admin/upload.php

     
    5757} else {
    5858        $post_mime_type_label = _c('Manage Media|manage media header');
    5959        if ( isset($_GET['post_mime_type']) && in_array( $_GET['post_mime_type'], array_keys($post_mime_types) ) )
    60         $post_mime_type_label = $post_mime_types[$_GET['post_mime_type']][1];
     60                $post_mime_type_label = $post_mime_types[$_GET['post_mime_type']][1];
    6161        if ( $post_listing_pageable && !is_archive() && !is_search() )
    6262                $h2_noun = is_paged() ? sprintf(__( 'Previous %s' ), $post_mime_type_label) : sprintf(__('Latest %s'), $post_mime_type_label);
    6363        else
     
    212212
    213213<table class="widefat" style="margin-top: .5em">
    214214<thead>
    215   <tr>
    216     <th scope="col"><?php _e('Comment') ?></th>
    217     <th scope="col"><?php _e('Date') ?></th>
    218     <th scope="col"><?php _e('Actions') ?></th>
    219   </tr>
     215        <tr>
     216                <th scope="col"><?php _e('Comment') ?></th>
     217                <th scope="col"><?php _e('Date') ?></th>
     218                <th scope="col"><?php _e('Actions') ?></th>
     219        </tr>
    220220</thead>
    221221<tbody id="the-comment-list" class="list:comment">
    222222<?php
    223         foreach ($comments as $comment)
    224                 _wp_comment_row( $comment->comment_ID, 'detail', false, false );
     223                foreach ($comments as $comment)
     224                        _wp_comment_row( $comment->comment_ID, 'detail', false, false );
    225225?>
    226226</tbody>
    227227</table>