<body>
<h1 id="logo" style="text-align: center">
<img alt="WordPress" src="wp-admin/images/wordpress-logo.png" />
- <br /> Version 2.9.1
+ <br /> Version 2.9.2
</h1>
<p style="text-align: center">Semantic Personal Publishing Platform</p>
<h1>Upgrading</h1>
<p>Before you upgrade anything, make sure you have backup copies of any files you may have modified such as <code>index.php</code>.</p>
-<h2>Upgrading from any previous WordPress to 2.9.1:</h2>
+<h2>Upgrading from any previous WordPress to 2.9.2:</h2>
<ol>
<li>Delete your old WP files, saving ones you've modified.</li>
<li>Upload the new files.</li>
<table class="form-table">
<tr class="form-field form-required">
<th scope="row" valign="top"><label for="cat_name"><?php _e('Category Name') ?></label></th>
- <td><input name="cat_name" id="cat_name" type="text" value="<?php echo esc_attr($category->name); ?>" size="40" aria-required="true" /><br />
+ <td><input name="cat_name" id="cat_name" type="text" value="<?php echo esc_attr($category->name); ?>" size="40" aria-required="true" /></td>
</tr>
<tr class="form-field">
<th scope="row" valign="top"><label for="category_nicename"><?php _e('Category Slug') ?></label></th>
$admin_page_hooks[$file] = sanitize_title( $menu_title );
$hookname = get_plugin_page_hookname( $file, '' );
- if (!empty ( $function ) && !empty ( $hookname ))
+ if (!empty ( $function ) && !empty ( $hookname ) && current_user_can( $access_level ) )
add_action( $hookname, $function );
if ( empty($icon_url) ) {
$mysql_version = $wpdb->db_version();
$required_php_version = '4.3';
$required_mysql_version = '4.1.2';
- $wp_version = '2.9.1';
+ $wp_version = '2.9.2';
$php_compat = version_compare( $php_version, $required_php_version, '>=' );
$mysql_compat = version_compare( $mysql_version, $required_mysql_version, '>=' ) || file_exists( WP_CONTENT_DIR . '/db.php' );
// Remove menus that have no accessible submenus and require privs that the user does not have.
// Run re-parent loop again.
foreach ( $menu as $id => $data ) {
+ if ( ! current_user_can($data[1]) )
+ $_wp_menu_nopriv[$data[2]] = true;
+
// If submenu is empty...
if ( empty($submenu[$data[2]]) ) {
// And user doesn't have privs, remove menu.
- if ( ! current_user_can($data[1]) ) {
- $_wp_menu_nopriv[$data[2]] = true;
+ if ( isset( $_wp_menu_nopriv[$data[2]] ) ) {
unset($menu[$id]);
}
}
} elseif ( !comments_open($comment_post_ID) ) {
do_action('comment_closed', $comment_post_ID);
wp_die( __('Sorry, comments are closed for this item.') );
-} elseif ( in_array($status->post_status, array('draft', 'pending') ) ) {
+} elseif ( in_array($status->post_status, array('draft', 'future', 'pending') ) ) {
do_action('comment_on_draft', $comment_post_ID);
exit;
} elseif ( 'trash' == $status->post_status ) {
do_action('comment_on_trash', $comment_post_ID);
exit;
+} elseif ( post_password_required($comment_post_ID) ) {
+ do_action('comment_on_password_protected', $comment_post_ID);
+ exit;
} else {
do_action('pre_comment_on_post', $comment_post_ID);
}
* @since 2.9.0
*/
function _search_terms_tidy($t) {
- return trim($t, "\"\'\n\r ");
+ return trim($t, "\"'\n\r ");
}
?>
* @return string|bool False on failure.
*/
function decompress( $compressed, $length = null ) {
- $decompressed = WP_Http_Encoding::compatible_gzinflate( $compressed );
- if ( false !== $decompressed )
+ if ( false !== ( $decompressed = @gzinflate( $compressed ) ) )
return $decompressed;
- $decompressed = gzuncompress( $compressed );
+ if ( false !== ( $decompressed = WP_Http_Encoding::compatible_gzinflate( $compressed ) ) )
+ return $decompressed;
- if ( false !== $decompressed )
+ if ( false !== ( $decompressed = @gzuncompress( $compressed ) ) )
return $decompressed;
if ( function_exists('gzdecode') ) {
- $decompressed = gzdecode( $compressed );
+ $decompressed = @gzdecode( $compressed );
if ( false !== $decompressed )
return $decompressed;
if ( is_array( $headers ) ) {
if ( array_key_exists('content-encoding', $headers) && ! empty( $headers['content-encoding'] ) )
return true;
- } else if( is_string( $headers ) ) {
+ } else if ( is_string( $headers ) ) {
return ( stripos($headers, 'content-encoding:') !== false );
}
// User must be logged in to view unpublished posts.
$this->posts = array();
} else {
- if (in_array($status, array('draft', 'pending')) ) {
+ if (in_array($status, array('draft', 'pending', 'trash')) ) {
// User must have edit permissions on the draft to preview.
if (! current_user_can("edit_$post_type_cap", $this->posts[0]->ID)) {
$this->posts = array();
*
* @global string $wp_version
*/
-$wp_version = '2.9.1';
+$wp_version = '2.9.2';
/**
* Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.