summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authordonncha <donncha@7be80a69-a1ef-0310-a953-fb0f7c49ff36>2006-02-21 12:59:22 +0000
committerdonncha <donncha@7be80a69-a1ef-0310-a953-fb0f7c49ff36>2006-02-21 12:59:22 +0000
commit433d32693df5a6957c577fde7383c2d8174fc06e (patch)
tree908a0ea48cde229c7aba6d6bb5aee1229c624a04
parent0d11319eaf16b05640c9393ef1be7a3d9c1cd4e9 (diff)
downloadwordpress-mu-433d32693df5a6957c577fde7383c2d8174fc06e.tar.gz
wordpress-mu-433d32693df5a6957c577fde7383c2d8174fc06e.tar.xz
wordpress-mu-433d32693df5a6957c577fde7383c2d8174fc06e.zip
WP Merge
git-svn-id: http://svn.automattic.com/wordpress-mu/trunk@532 7be80a69-a1ef-0310-a953-fb0f7c49ff36
-rw-r--r--wp-inst/wp-admin/admin-functions.php34
-rw-r--r--wp-inst/wp-admin/admin-header.php4
-rw-r--r--wp-inst/wp-admin/edit-comments.php25
-rw-r--r--wp-inst/wp-admin/edit-form-advanced.php2
-rw-r--r--wp-inst/wp-admin/edit-form-comment.php4
-rw-r--r--wp-inst/wp-admin/edit-page-form.php7
-rw-r--r--wp-inst/wp-admin/edit-pages.php34
-rw-r--r--wp-inst/wp-admin/edit.php5
-rw-r--r--wp-inst/wp-admin/menu.php11
-rw-r--r--wp-inst/wp-admin/page-new.php3
-rw-r--r--wp-inst/wp-admin/post.php306
-rw-r--r--wp-inst/wp-includes/classes.php84
-rw-r--r--wp-inst/wp-includes/default-filters.php1
-rw-r--r--wp-inst/wp-includes/functions.php9
-rw-r--r--wp-inst/wp-includes/pluggable-functions.php10
-rw-r--r--wp-inst/wp-includes/template-functions-post.php3
-rw-r--r--wp-inst/wp-settings.php1
17 files changed, 123 insertions, 420 deletions
diff --git a/wp-inst/wp-admin/admin-functions.php b/wp-inst/wp-admin/admin-functions.php
index 81ffe2d..aabf77e 100644
--- a/wp-inst/wp-admin/admin-functions.php
+++ b/wp-inst/wp-admin/admin-functions.php
@@ -643,19 +643,24 @@ function cat_rows($parent = 0, $level = 0, $categories = 0) {
}
}
-function page_rows($parent = 0, $level = 0, $pages = 0) {
+function page_rows($parent = 0, $level = 0, $pages = 0, $hierarchy = true) {
global $wpdb, $class, $post;
+
if (!$pages)
$pages = $wpdb->get_results("SELECT * FROM $wpdb->posts WHERE post_type = 'page' ORDER BY menu_order");
- if ($pages) {
- foreach ($pages as $post) {
- start_wp();
- if ($post->post_parent == $parent) {
- $post->post_title = wp_specialchars($post->post_title);
- $pad = str_repeat('&#8212; ', $level);
- $id = $post->ID;
- $class = ('alternate' == $class) ? '' : 'alternate';
+ if (! $pages)
+ return false;
+
+ foreach ($pages as $post) {
+ setup_postdata($post);
+ if ( $hierarchy && ($post->post_parent != $parent) )
+ continue;
+
+ $post->post_title = wp_specialchars($post->post_title);
+ $pad = str_repeat('&#8212; ', $level);
+ $id = $post->ID;
+ $class = ('alternate' == $class) ? '' : 'alternate';
?>
<tr id='page-<?php echo $id; ?>' class='<?php echo $class; ?>'>
<th scope="row"><?php echo $post->ID; ?></th>
@@ -665,17 +670,12 @@ function page_rows($parent = 0, $level = 0, $pages = 0) {
<td><?php the_author() ?></td>
<td><?php echo mysql2date('Y-m-d g:i a', $post->post_modified); ?></td>
<td><a href="<?php the_permalink(); ?>" rel="permalink" class="edit"><?php _e('View'); ?></a></td>
- <td><?php if ( current_user_can('edit_pages') ) { echo "<a href='post.php?action=edit&amp;post=$id' class='edit'>" . __('Edit') . "</a>"; } ?></td>
- <td><?php if ( current_user_can('edit_pages') ) { echo "<a href='post.php?action=delete&amp;post=$id' class='delete' onclick=\"return deleteSomething( 'page', " . $id . ", '" . sprintf(__("You are about to delete the &quot;%s&quot; page.\\n&quot;OK&quot; to delete, &quot;Cancel&quot; to stop."), wp_specialchars(get_the_title('','',0), 1)) . "' );\">" . __('Delete') . "</a>"; } ?></td>
+ <td><?php if ( current_user_can('edit_page', $id) ) { echo "<a href='page.php?action=edit&amp;post=$id' class='edit'>" . __('Edit') . "</a>"; } ?></td>
+ <td><?php if ( current_user_can('edit_page', $id) ) { echo "<a href='page.php?action=delete&amp;post=$id' class='delete' onclick=\"return deleteSomething( 'page', " . $id . ", '" . sprintf(__("You are about to delete the &quot;%s&quot; page.\\n&quot;OK&quot; to delete, &quot;Cancel&quot; to stop."), wp_specialchars(get_the_title('','',0), 1)) . "' );\">" . __('Delete') . "</a>"; } ?></td>
</tr>
<?php
-
- page_rows($id, $level +1, $pages);
- }
- }
- } else {
- return false;
+ if ( $hierarchy) page_rows($id, $level + 1, $pages);
}
}
diff --git a/wp-inst/wp-admin/admin-header.php b/wp-inst/wp-admin/admin-header.php
index a3cb034..063d539 100644
--- a/wp-inst/wp-admin/admin-header.php
+++ b/wp-inst/wp-admin/admin-header.php
@@ -36,9 +36,9 @@ function addLoadEvent(func) {if ( typeof wpOnload!='function'){wpOnload=func;}el
<script type="text/javascript">
//<![CDATA[
addLoadEvent( function() {
-<?php switch ( $pagenow ) : case 'post.php' : ?>
+<?php switch ( $pagenow ) : case 'post.php' : case 'post-new.php' : ?>
var manager = new dbxManager('postmeta');
-<?php break; case 'page-new.php' : ?>
+<?php break; case 'page.php' : case 'page-new.php' : ?>
var manager = new dbxManager('pagemeta');
<?php break; endswitch; ?>
});
diff --git a/wp-inst/wp-admin/edit-comments.php b/wp-inst/wp-admin/edit-comments.php
index 2a26f1f..0bd09ca 100644
--- a/wp-inst/wp-admin/edit-comments.php
+++ b/wp-inst/wp-admin/edit-comments.php
@@ -103,16 +103,21 @@ if ('view' == $mode) {
<p><?php _e('Posted'); echo ' '; comment_date('M j, g:i A');
if ( current_user_can('edit_post', $comment->comment_post_ID) ) {
- echo " | <a href=\"post.php?action=editcomment&amp;comment=".$comment->comment_ID."\">" . __('Edit Comment') . "</a>";
- echo " | <a href=\"post.php?action=deletecomment&amp;p=".$comment->comment_post_ID."&amp;comment=".$comment->comment_ID."\" onclick=\"return deleteSomething( 'comment', $comment->comment_ID, '" . sprintf(__("You are about to delete this comment by &quot;%s&quot;.\\n&quot;Cancel&quot; to stop, &quot;OK&quot; to delete."), wp_specialchars( $comment->comment_author, 1 )) . "' );\">" . __('Delete Comment') . "</a> ";
- echo " | <a href=\"post.php?action=deletecomment&amp;delete_type=spam&amp;p=".$comment->comment_post_ID."&amp;comment=".$comment->comment_ID."\" onclick=\"return deleteSomething( 'comment-as-spam', $comment->comment_ID, '" . sprintf(__("You are about to mark as spam this comment by &quot;%s&quot;.\\n&quot;Cancel&quot; to stop, &quot;OK&quot; to mark as spam."), wp_specialchars( $comment->comment_author, 1 )) . "' );\">" . __('Mark Comment as Spam') . "</a> ";
+ echo " | <a href=\"comment.php?action=editcomment&amp;comment=".$comment->comment_ID."\">" . __('Edit Comment') . "</a>";
+ echo " | <a href=\"comment.php?action=deletecomment&amp;p=".$comment->comment_post_ID."&amp;comment=".$comment->comment_ID."\" onclick=\"return deleteSomething( 'comment', $comment->comment_ID, '" . sprintf(__("You are about to delete this comment by &quot;%s&quot;.\\n&quot;Cancel&quot; to stop, &quot;OK&quot; to delete."), wp_specialchars( $comment->comment_author, 1 )) . "' );\">" . __('Delete Comment') . "</a> ";
+ echo " | <a href=\"comment.php?action=deletecomment&amp;delete_type=spam&amp;p=".$comment->comment_post_ID."&amp;comment=".$comment->comment_ID."\" onclick=\"return deleteSomething( 'comment-as-spam', $comment->comment_ID, '" . sprintf(__("You are about to mark as spam this comment by &quot;%s&quot;.\\n&quot;Cancel&quot; to stop, &quot;OK&quot; to mark as spam."), wp_specialchars( $comment->comment_author, 1 )) . "' );\">" . __('Mark Comment as Spam') . "</a> ";
} // end if any comments to show
// Get post title
- if ( current_user_can('edit_post', $comment->comment_post_ID) ) {
- $post_title = $wpdb->get_var("SELECT post_title FROM $wpdb->posts WHERE ID = $comment->comment_post_ID");
- $post_title = ('' == $post_title) ? "# $comment->comment_post_ID" : $post_title;
- ?> | <a href="post.php?action=edit&amp;post=<?php echo $comment->comment_post_ID; ?>"><?php printf(__('Edit Post &#8220;%s&#8221;'), stripslashes($post_title)); ?></a>
- <?php } ?>
+ $post = get_post($comment->comment_post_ID);
+ $post_title = $post->post_title;
+ $post_title = ('' == $post_title) ? "# $comment->comment_post_ID" : $post_title;
+ if ( 'page' == $post->post_type ) {
+ if ( current_user_can('edit_page', $comment->comment_post_ID) ) ?>
+ | <a href="page.php?action=edit&amp;post=<?php echo $comment->comment_post_ID; ?>"><?php printf(__('Edit Page &#8220;%s&#8221;'), $post_title); ?></a>
+ <?php } else {
+ if ( current_user_can('edit_post', $comment->comment_post_ID) ) ?>
+ | <a href="post.php?action=edit&amp;post=<?php echo $comment->comment_post_ID; ?>"><?php printf(__('Edit Post &#8220;%s&#8221;'), $post_title); ?></a>
+ <?php } ?>
| <a href="<?php echo get_permalink($comment->comment_post_ID); ?>"><?php _e('View Post') ?></a></p>
</li>
@@ -155,9 +160,9 @@ if ('view' == $mode) {
<td><?php comment_excerpt(); ?></td>
<td><a href="<?php echo get_permalink($comment->comment_post_ID); ?>#comment-<?php comment_ID() ?>" class="edit"><?php _e('View') ?></a></td>
<td><?php if ( current_user_can('edit_post', $comment->comment_post_ID) ) {
- echo "<a href='post.php?action=editcomment&amp;comment=$comment->comment_ID' class='edit'>" . __('Edit') . "</a>"; } ?></td>
+ echo "<a href='comment.php?action=editcomment&amp;comment=$comment->comment_ID' class='edit'>" . __('Edit') . "</a>"; } ?></td>
<td><?php if ( current_user_can('edit_post', $comment->comment_post_ID) ) {
- echo "<a href=\"post.php?action=deletecomment&amp;p=".$comment->comment_post_ID."&amp;comment=".$comment->comment_ID."\" onclick=\"return confirm('" . sprintf(__("You are about to delete this comment by \'%s\'\\n \'Cancel\' to stop, \'OK\' to delete."), $comment->comment_author) . "')\" class='delete'>" . __('Delete') . "</a>"; } ?></td>
+ echo "<a href=\"comment.php?action=deletecomment&amp;p=".$comment->comment_post_ID."&amp;comment=".$comment->comment_ID."\" onclick=\"return confirm('" . sprintf(__("You are about to delete this comment by \'%s\'\\n \'Cancel\' to stop, \'OK\' to delete."), $comment->comment_author) . "')\" class='delete'>" . __('Delete') . "</a>"; } ?></td>
</tr>
<?php
} // end foreach
diff --git a/wp-inst/wp-admin/edit-form-advanced.php b/wp-inst/wp-admin/edit-form-advanced.php
index b804c14..0c8853e 100644
--- a/wp-inst/wp-admin/edit-form-advanced.php
+++ b/wp-inst/wp-admin/edit-form-advanced.php
@@ -102,7 +102,7 @@ addLoadEvent(focusit);
<fieldset class="dbx-box">
<h3 class="dbx-handle"><?php _e('Post Status') ?></h3>
<div class="dbx-content"><?php if ( current_user_can('publish_posts') ) : ?>
-<label for="post_status_publish" class="selectit"><input id="post_status_publish" name="post_status" type="radio" value="publish" <?php checked($post->post_status, 'publish'); ?> /> <?php _e('Published') ?></label>
+<label for="post_status_publish" class="selectit"><input id="post_status_publish" name="post_status" type="radio" value="publish" <?php checked($post->post_status, 'publish'); checked($post->post_status, 'future'); ?> /> <?php _e('Published') ?></label>
<?php endif; ?>
<label for="post_status_draft" class="selectit"><input id="post_status_draft" name="post_status" type="radio" value="draft" <?php checked($post->post_status, 'draft'); ?> /> <?php _e('Draft') ?></label>
<label for="post_status_private" class="selectit"><input id="post_status_private" name="post_status" type="radio" value="private" <?php checked($post->post_status, 'private'); ?> /> <?php _e('Private') ?></label></div>
diff --git a/wp-inst/wp-admin/edit-form-comment.php b/wp-inst/wp-admin/edit-form-comment.php
index fb72058..ac92082 100644
--- a/wp-inst/wp-admin/edit-form-comment.php
+++ b/wp-inst/wp-admin/edit-form-comment.php
@@ -5,7 +5,7 @@ $form_action = 'editedcomment';
$form_extra = "' />\n<input type='hidden' name='comment_ID' value='" . $comment->comment_ID . "' />\n<input type='hidden' name='comment_post_ID' value='".$comment->comment_post_ID;
?>
-<form name="post" action="post.php" method="post" id="post">
+<form name="post" action="comment.php" method="post" id="post">
<div class="wrap">
<input type="hidden" name="user_ID" value="<?php echo $user_ID ?>" />
<input type="hidden" name="action" value='<?php echo $form_action . $form_extra ?>' />
@@ -113,7 +113,7 @@ else
<tr>
<th scope="row"><?php _e('Delete'); ?>:</th>
- <td><p><a class="delete" href="post.php?action=confirmdeletecomment&amp;noredir=true&amp;comment=<?php echo $comment->comment_ID; ?>&amp;p=<?php echo $comment->comment_post_ID; ?>"><?php _e('Delete comment') ?></a></p></td>
+ <td><p><a class="delete" href="comment.php?action=confirmdeletecomment&amp;noredir=true&amp;comment=<?php echo $comment->comment_ID; ?>&amp;p=<?php echo $comment->comment_post_ID; ?>"><?php _e('Delete comment') ?></a></p></td>
</tr>
</table>
diff --git a/wp-inst/wp-admin/edit-page-form.php b/wp-inst/wp-admin/edit-page-form.php
index 2373a8e..e10897a 100644
--- a/wp-inst/wp-admin/edit-page-form.php
+++ b/wp-inst/wp-admin/edit-page-form.php
@@ -20,7 +20,7 @@ $sendto = wp_specialchars( $sendto );
?>
-<form name="post" action="post.php" method="post" id="post">
+<form name="post" action="page.php" method="post" id="post">
<?php
if (isset($mode) && 'bookmarklet' == $mode) {
@@ -58,7 +58,7 @@ addLoadEvent(focusit);
<fieldset class="dbx-box">
<h3 class="dbx-handle"><?php _e('Page Status') ?></h3>
<div class="dbx-content"><?php if ( current_user_can('publish_posts') ) : ?>
-<label for="post_status_publish" class="selectit"><input id="post_status_publish" name="post_status" type="radio" value="publish" <?php checked($post->post_status, 'publish'); ?> /> <?php _e('Published') ?></label>
+<label for="post_status_publish" class="selectit"><input id="post_status_publish" name="post_status" type="radio" value="publish" <?php checked($post->post_status, 'publish'); checked($post->post_status, 'future'); ?> /> <?php _e('Published') ?></label>
<?php endif; ?>
<label for="post_status_draft" class="selectit"><input id="post_status_draft" name="post_status" type="radio" value="draft" <?php checked($post->post_status, 'draft'); ?> /> <?php _e('Draft') ?></label>
<label for="post_status_private" class="selectit"><input id="post_status_private" name="post_status" type="radio" value="private" <?php checked($post->post_status, 'private'); ?> /> <?php _e('Private') ?></label></div>
@@ -226,7 +226,8 @@ if($metadata = has_meta($post_ID)) {
</div>
-<?php if ('edit' == $action) : ?>
+<?php if ('edit' == $action) :
+ if ( current_user_can('delete_page', $post->ID) ) ?>
<input name="deletepost" class="delete" type="submit" id="deletepost" tabindex="10" value="<?php _e('Delete this page') ?>" <?php echo "onclick=\"return confirm('" . sprintf(__("You are about to delete this page \'%s\'\\n \'Cancel\' to stop, \'OK\' to delete."), $wpdb->escape($post->post_title) ) . "')\""; ?> />
<?php endif; ?>
</form>
diff --git a/wp-inst/wp-admin/edit-pages.php b/wp-inst/wp-admin/edit-pages.php
index b3fd214..2e25f53 100644
--- a/wp-inst/wp-admin/edit-pages.php
+++ b/wp-inst/wp-admin/edit-pages.php
@@ -19,13 +19,12 @@ require_once('admin-header.php');
</form>
<?php
+wp('post_type=page&orderby=menu_order&what_to_show=posts&posts_per_page=15&posts_per_archive_page=-1');
-$show_post_type = 'page';
-
-if ( isset($_GET['s']) )
- wp();
+if ( $_GET['s'] )
+ $all = false;
else
- $posts = $wpdb->get_results("SELECT * FROM $wpdb->posts WHERE post_type = 'page'");
+ $all = true;
if ($posts) {
?>
@@ -40,30 +39,17 @@ if ($posts) {
<th scope="col"></th>
</tr>
<?php
-if ( isset($_GET['s']) ) {
-foreach ( $posts as $post ) :
- $class = ('alternate' != $class) ? 'alternate' : ''; ?>
- <tr id='page-<?php echo $post->ID; ?>' class='<?php echo $class; ?>'>
- <th scope="row"><?php echo $post->ID; ?></th>
- <td>
- <?php echo $pad; ?><?php the_title() ?>
- </td>
- <td><?php the_author() ?></td>
- <td><?php echo mysql2date('Y-m-d g:i a', $post->post_modified); ?></td>
- <td><a href="<?php the_permalink(); ?>" rel="permalink" class="edit"><?php _e('View'); ?></a></td>
- <td><?php if ( current_user_can('edit_page', $post->ID) ) { echo "<a href='post.php?action=edit&amp;post=$post->ID' class='edit'>" . __('Edit') . "</a>"; } ?></td>
- <td><?php if ( current_user_can('delete_page', $post->ID) ) { echo "<a href='post.php?action=delete&amp;post=$post->ID' class='delete' onclick=\"return deleteSomething( 'page', " . $id . ", '" . sprintf(__("You are about to delete the &quot;%s&quot; page.\\n&quot;OK&quot; to delete, &quot;Cancel&quot; to stop."), wp_specialchars(get_the_title('','',0), 1)) . "' );\">" . __('Delete') . "</a>"; } ?></td>
- </tr>
-<?php
-endforeach;
-} else {
- page_rows();
-}
+page_rows(0, 0, $posts, $all);
?>
</table>
<div id="ajax-response"></div>
+<div class="navigation">
+<div class="alignleft"><?php next_posts_link(__('&laquo; Previous Entries')) ?></div>
+<div class="alignright"><?php previous_posts_link(__('Next Entries &raquo;')) ?></div>
+</div>
+
<?php
} else {
?>
diff --git a/wp-inst/wp-admin/edit.php b/wp-inst/wp-admin/edit.php
index 1776809..789675d 100644
--- a/wp-inst/wp-admin/edit.php
+++ b/wp-inst/wp-admin/edit.php
@@ -55,11 +55,8 @@ if ($drafts || $other_drafts) {
<div class="wrap">
<h2>
<?php
-$what_to_show = 'posts';
-$posts_per_page = 15;
-$posts_per_archive_page = -1;
-wp();
+wp('what_to_show=posts&posts_per_page=15&posts_per_archive_page=-1');
if ( is_month() ) {
single_month_title(' ');
diff --git a/wp-inst/wp-admin/menu.php b/wp-inst/wp-admin/menu.php
index 2c446e6..5833c8e 100644
--- a/wp-inst/wp-admin/menu.php
+++ b/wp-inst/wp-admin/menu.php
@@ -10,7 +10,7 @@ if( is_array( $menu_perms ) == false )
$menu_perms = array();
$menu[0] = array(__('Dashboard'), 'read', 'index.php');
-$menu[5] = array(__('Write'), 'edit_posts', 'post.php');
+$menu[5] = array(__('Write'), 'edit_posts', 'post-new.php');
$menu[10] = array(__('Manage'), 'edit_posts', 'edit.php');
$menu[20] = array(__('Links'), 'manage_links', 'link-manager.php');
$menu[25] = array(__('Presentation'), 'switch_themes', 'themes.php');
@@ -23,13 +23,8 @@ else
$menu[40] = array(__('Options'), 'manage_options', 'options-general.php');
$menu[45] = array(__('Import'), 'import', 'import.php');
-/*
-if ( get_option('use_fileupload') )
- $menu[50] = array(__('Upload'), 'upload_files', 'upload.php');
-*/
-
-$submenu['post.php'][5] = array(__('Write Post'), 'edit_posts', 'post.php');
-$submenu['post.php'][10] = array(__('Write Page'), 'edit_pages', 'page-new.php');
+$submenu['post-new.php'][5] = array(__('Write Post'), 'edit_posts', 'post-new.php');
+$submenu['post-new.php'][10] = array(__('Write Page'), 'edit_pages', 'page-new.php');
$submenu['edit.php'][5] = array(__('Posts'), 'edit_posts', 'edit.php');
$submenu['edit.php'][10] = array(__('Pages'), 'edit_pages', 'edit-pages.php');
diff --git a/wp-inst/wp-admin/page-new.php b/wp-inst/wp-admin/page-new.php
index ba2ad2c..ead2fd9 100644
--- a/wp-inst/wp-admin/page-new.php
+++ b/wp-inst/wp-admin/page-new.php
@@ -1,7 +1,7 @@
<?php
require_once('admin.php');
$title = __('New Page');
-$parent_file = 'post.php';
+$parent_file = 'post-new.php';
$editing = true;
require_once('admin-header.php');
?>
@@ -17,7 +17,6 @@ if ( current_user_can('edit_pages') ) {
$post = get_default_post_to_edit();
$post->post_type = 'page';
- $post->post_status = 'publish';
include('edit-page-form.php');
}
diff --git a/wp-inst/wp-admin/post.php b/wp-inst/wp-admin/post.php
index 11d46c2..9139584 100644
--- a/wp-inst/wp-admin/post.php
+++ b/wp-inst/wp-admin/post.php
@@ -18,15 +18,8 @@ for ($i=0; $i<count($wpvarstoreset); $i += 1) {
}
}
-if (isset($_POST['deletepost'])) {
+if (isset($_POST['deletepost']))
$action = "delete";
-}
-
-// Fix submenu highlighting for pages.
-if ( isset($_REQUEST['post']) && 'page' == get_post_type($_REQUEST['post']) )
- $submenu_file = 'page-new.php';
-
-$editing = true;
switch($action) {
case 'post':
@@ -43,16 +36,13 @@ case 'post':
$location = 'sidebar.php?a=b';
break;
default:
- $location = 'post.php';
+ $location = 'post-new.php';
break;
}
} else {
- $location = 'post.php?posted=true';
+ $location = 'post-new.php?posted=true';
}
- if ( 'page' == $_POST['post_type'] )
- $location = "page-new.php?saved=true";
-
if ( isset($_POST['save']) )
$location = "post.php?action=edit&post=$post_ID";
@@ -62,20 +52,20 @@ case 'post':
case 'edit':
$title = __('Edit');
-
+ $parent_file = 'edit.php';
+ $submenu_file = 'edit.php';
+ $editing = true;
require_once('admin-header.php');
$post_ID = $p = (int) $_GET['post'];
+ $post = get_post($post_ID);
if ( !current_user_can('edit_post', $post_ID) )
die ( __('You are not allowed to edit this post.') );
$post = get_post_to_edit($post_ID);
- if ($post->post_type == 'page')
- include('edit-page-form.php');
- else
- include('edit-form-advanced.php');
+ include('edit-form-advanced.php');
?>
<div id='preview' class='wrap'>
@@ -131,7 +121,7 @@ case 'delete':
$post = & get_post($post_id);
- if ( !current_user_can('edit_post', $post_id) )
+ if ( !current_user_can('delete_post', $post_id) )
die( __('You are not allowed to delete this post.') );
if ( $post->post_type == 'attachment' ) {
@@ -143,289 +133,15 @@ case 'delete':
}
$sendback = $_SERVER['HTTP_REFERER'];
- if (strstr($sendback, 'post.php')) $sendback = get_settings('siteurl') .'/wp-admin/post.php';
+ if (strstr($sendback, 'post.php')) $sendback = get_settings('siteurl') .'/wp-admin/post-new.php';
elseif (strstr($sendback, 'attachments.php')) $sendback = get_settings('siteurl') .'/wp-admin/attachments.php';
$sendback = preg_replace('|[^a-z0-9-~+_.?#=&;,/:]|i', '', $sendback);
header ('Location: ' . $sendback);
- break;
-
-case 'editcomment':
- $title = __('Edit Comment');
- $parent_file = 'edit.php';
- require_once ('admin-header.php');
-
- get_currentuserinfo();
-
- $comment = (int) $_GET['comment'];
-
- if ( ! $comment = get_comment($comment) )
- die(sprintf(__('Oops, no comment with this ID. <a href="%s">Go back</a>!'), 'javascript:history.go(-1)'));
-
- if ( !current_user_can('edit_post', $comment->comment_post_ID) )
- die( __('You are not allowed to edit comments on this post.') );
-
- $comment = get_comment_to_edit($comment);
-
- include('edit-form-comment.php');
-
- break;
-
-case 'confirmdeletecomment':
-
- require_once('./admin-header.php');
-
- $comment = (int) $_GET['comment'];
- $p = (int) $_GET['p'];
-
- if ( ! $comment = get_comment($comment) )
- die(sprintf(__('Oops, no comment with this ID. <a href="%s">Go back</a>!'), 'edit.php'));
-
- if ( !current_user_can('edit_post', $comment->comment_post_ID) )
- die( __('You are not allowed to delete comments on this post.') );
-
- echo "<div class='wrap'>\n";
- if ( 'spam' == $_GET['delete_type'] )
- echo "<p>" . __('<strong>Caution:</strong> You are about to mark the following comment as spam:') . "</p>\n";
- else
- echo "<p>" . __('<strong>Caution:</strong> You are about to delete the following comment:') . "</p>\n";
- echo "<table border='0'>\n";
- echo "<tr><td>" . __('Author:') . "</td><td>$comment->comment_author</td></tr>\n";
- echo "<tr><td>" . __('E-mail:') . "</td><td>$comment->comment_author_email</td></tr>\n";
- echo "<tr><td>". __('URL:') . "</td><td>$comment->comment_author_url</td></tr>\n";
- echo "<tr><td>". __('Comment:') . "</td><td>$comment->comment_content</td></tr>\n";
- echo "</table>\n";
- echo "<p>" . __('Are you sure you want to do that?') . "</p>\n";
-
- echo "<form action='".get_settings('siteurl')."/wp-admin/post.php' method='get'>\n";
- echo "<input type='hidden' name='action' value='deletecomment' />\n";
- if ( 'spam' == $_GET['delete_type'] )
- echo "<input type='hidden' name='delete_type' value='spam' />\n";
- echo "<input type='hidden' name='p' value='$p' />\n";
- echo "<input type='hidden' name='comment' value='{$comment->comment_ID}' />\n";
- echo "<input type='hidden' name='noredir' value='1' />\n";
- echo "<input type='submit' value='" . __('Yes') . "' />";
- echo "&nbsp;&nbsp;";
- echo "<input type='button' value='" . __('No') . "' onclick=\"self.location='". get_settings('siteurl') ."/wp-admin/edit.php?p=$p&amp;c=1#comments';\" />\n";
- echo "</form>\n";
- echo "</div>\n";
-
- break;
-
-case 'deletecomment':
-
- check_admin_referer();
-
- $comment = (int) $_GET['comment'];
- $p = (int) $_GET['p'];
- if (isset($_GET['noredir'])) {
- $noredir = true;
- } else {
- $noredir = false;
- }
-
- $postdata = get_post($p) or die(sprintf(__('Oops, no post with this ID. <a href="%s">Go back</a>!'), 'edit.php'));
-
- if ( ! $comment = get_comment($comment) )
- die(sprintf(__('Oops, no comment with this ID. <a href="%s">Go back</a>!'), 'post.php'));
-
- if ( !current_user_can('edit_post', $comment->comment_post_ID) )
- die( __('You are not allowed to edit comments on this post.') );
-
- if ( 'spam' == $_GET['delete_type'] )
- wp_set_comment_status($comment->comment_ID, 'spam');
- else
- wp_delete_comment($comment->comment_ID);
-
- if (($_SERVER['HTTP_REFERER'] != "") && (false == $noredir)) {
- header('Location: ' . $_SERVER['HTTP_REFERER']);
- } else {
- header('Location: '. get_settings('siteurl') .'/wp-admin/edit.php?p='.$p.'&c=1#comments');
- }
-
- break;
-
-case 'unapprovecomment':
-
- check_admin_referer();
-
- $comment = (int) $_GET['comment'];
- $p = (int) $_GET['p'];
- if (isset($_GET['noredir'])) {
- $noredir = true;
- } else {
- $noredir = false;
- }
-
- if ( ! $comment = get_comment($comment) )
- die(sprintf(__('Oops, no comment with this ID. <a href="%s">Go back</a>!'), 'edit.php'));
-
- if ( !current_user_can('edit_post', $comment->comment_post_ID) )
- die( __('You are not allowed to edit comments on this post, so you cannot disapprove this comment.') );
-
- wp_set_comment_status($comment->comment_ID, "hold");
-
- if (($_SERVER['HTTP_REFERER'] != "") && (false == $noredir)) {
- header('Location: ' . $_SERVER['HTTP_REFERER']);
- } else {
- header('Location: '. get_settings('siteurl') .'/wp-admin/edit.php?p='.$p.'&c=1#comments');
- }
-
- break;
-
-case 'mailapprovecomment':
-
- $comment = (int) $_GET['comment'];
-
- if ( ! $comment = get_comment($comment) )
- die(sprintf(__('Oops, no comment with this ID. <a href="%s">Go back</a>!'), 'edit.php'));
-
- if ( !current_user_can('edit_post', $comment->comment_post_ID) )
- die( __('You are not allowed to edit comments on this post, so you cannot approve this comment.') );
-
- if ('1' != $comment->comment_approved) {
- wp_set_comment_status($comment->comment_ID, 'approve');
- if (true == get_option('comments_notify'))
- wp_notify_postauthor($comment->comment_ID);
- }
-
- header('Location: ' . get_option('siteurl') . '/wp-admin/moderation.php?approved=1');
-
- break;
-
-case 'approvecomment':
-
- $comment = (int) $_GET['comment'];
- $p = (int) $_GET['p'];
- if (isset($_GET['noredir'])) {
- $noredir = true;
- } else {
- $noredir = false;
- }
-
- if ( ! $comment = get_comment($comment) )
- die(sprintf(__('Oops, no comment with this ID. <a href="%s">Go back</a>!'), 'edit.php'));
-
- if ( !current_user_can('edit_post', $comment->comment_post_ID) )
- die( __('You are not allowed to edit comments on this post, so you cannot approve this comment.') );
-
- wp_set_comment_status($comment->comment_ID, "approve");
- if (get_settings("comments_notify") == true) {
- wp_notify_postauthor($comment->comment_ID);
- }
-
-
- if (($_SERVER['HTTP_REFERER'] != "") && (false == $noredir)) {
- header('Location: ' . $_SERVER['HTTP_REFERER']);
- } else {
- header('Location: '. get_settings('siteurl') .'/wp-admin/edit.php?p='.$p.'&c=1#comments');
- }
-
- break;
-
-case 'editedcomment':
-
- edit_comment();
-
- $referredby = $_POST['referredby'];
- if (!empty($referredby)) {
- header('Location: ' . $referredby);
- } else {
- header ("Location: edit.php?p=$comment_post_ID&c=1#comments");
- }
-
+ exit();
break;
default:
- $title = __('Create New Post');
- require_once ('./admin-header.php');
-?>
-<?php if ( isset($_GET['posted']) ) : ?>
-<div id="message" class="updated fade"><p><?php printf(__('Post saved. <a href="%s">View site &raquo;</a>'), get_bloginfo('home') . '/'); ?></p></div>
-<?php endif; ?>
-<?php
- if ( current_user_can('edit_posts') ) {
- $action = 'post';
- get_currentuserinfo();
- if ( $drafts = get_users_drafts( $user_ID ) ) {
- ?>
- <div class="wrap">
- <p><strong><?php _e('Your Drafts:') ?></strong>
- <?php
- $num_drafts = count($drafts);
- if ( $num_drafts > 15 ) $num_drafts = 15;
- for ( $i = 0; $i < $num_drafts; $i++ ) {
- $draft = $drafts[$i];
- if ( 0 != $i )
- echo ', ';
- $draft->post_title = stripslashes($draft->post_title);
- if ( empty($draft->post_title) )
- $draft->post_title = sprintf(__('Post # %s'), $draft->ID);
- echo "<a href='post.php?action=edit&amp;post=$draft->ID' title='" . __('Edit this draft') . "'>$draft->post_title</a>";
- }
- ?>
- <?php if ( 15 < count($drafts) ) { ?>
- , <a href="edit.php"><?php echo sprintf(__('and %s more'), (count($drafts) - 15) ); ?> &raquo;</a>
- <?php } ?>
- .</p>
- </div>
- <?php
- }
-
- $post = get_default_post_to_edit();
-
- include('edit-form-advanced.php');
-?>
-<div class="wrap">
-<?php echo '<h3>'.__('WordPress bookmarklet').'</h3>
-<p>'.__('Right click on the following link and choose "Add to favorites" to create a posting shortcut.').'</p>'; ?>
-<p>
-
-<?php
-if ($is_NS4 || $is_gecko) {
-?>
-<a href="javascript:if(navigator.userAgent.indexOf('Safari') >= 0){Q=getSelection();}else{Q=document.selection?document.selection.createRange().text:document.getSelection();}location.href='<?php echo get_settings('siteurl') ?>/wp-admin/post.php?text='+encodeURIComponent(Q)+'&amp;popupurl='+encodeURIComponent(location.href)+'&amp;popuptitle='+encodeURIComponent(document.title);"><?php printf(__('Press It - %s'), wp_specialchars(get_settings('blogname'))); ?></a>
-<?php
-} else if ($is_winIE) {
-?>
-<a href="javascript:Q='';if(top.frames.length==0)Q=document.selection.createRange().text;location.href='<?php echo get_settings('siteurl') ?>/wp-admin/post.php?text='+encodeURIComponent(Q)+'&amp;popupurl='+encodeURIComponent(location.href)+'&amp;popuptitle='+encodeURIComponent(document.title);"><?php printf(__('Press it - %s'), get_settings('blogname')); ?></a>
-<script type="text/javascript">
-<!--
-function oneclickbookmarklet(blah) {
-window.open ("profile.php?action=IErightclick", "oneclickbookmarklet", "width=500, height=450, location=0, menubar=0, resizable=0, scrollbars=1, status=1, titlebar=0, toolbar=0, screenX=120, left=120, screenY=120, top=120");
-}
-// -->
-</script>
-<br />
-<br />
-<?php _e('One-click bookmarklet:') ?><br />
-<a href="javascript:oneclickbookmarklet(0);"><?php _e('click here') ?></a>
-<?php
-} else if ($is_opera) {
-?>
-<a href="javascript:location.href='<?php echo get_settings('siteurl'); ?>/wp-admin/post.php?popupurl='+escape(location.href)+'&popuptitle='+escape(document.title);"><?php printf(__('Press it - %s'), get_settings('blogname')); ?></a>
-<?php
-} else if ($is_macIE) {
-?>
-<a href="javascript:Q='';location.href='<?php echo get_settings('siteurl'); ?>/wp-admin/bookmarklet.php?text='+escape(document.getSelection())+'&popupurl='+escape(location.href)+'&popuptitle='+escape(document.title);"><?php printf(__('Press it - %s'), get_settings('blogname')); ?></a>
-<?php
-}
-?>
-</p>
-</div>
-<?php
-} else {
-?>
-<div class="wrap">
-<p><?php printf(__('Since you&#8217;re a newcomer, you&#8217;ll have to wait for an admin to raise your level to 1, in order to be authorized to post.<br />
-You can also <a href="mailto:%s?subject=Promotion?">e-mail the admin</a> to ask for a promotion.<br />
-When you&#8217;re promoted, just reload this page and you&#8217;ll be able to blog. :)'), get_settings('admin_email')); ?>
-</p>
-</div>
-<?php
-}
-
break;
} // end switch
-/* </Edit> */
include('admin-footer.php');
?>
diff --git a/wp-inst/wp-includes/classes.php b/wp-inst/wp-includes/classes.php
index b9a76c9..ba7988a 100644
--- a/wp-inst/wp-includes/classes.php
+++ b/wp-inst/wp-includes/classes.php
@@ -114,14 +114,6 @@ class WP_Query {
$this->is_single = false;
} elseif (!empty($qv['s'])) {
$this->is_search = true;
- switch ($qv['show_post_type']) {
- case 'page' :
- $this->is_page = true;
- break;
- case 'attachment' :
- $this->is_attachment = true;
- break;
- }
} else {
// Look for archive queries. Dates, categories, authors.
@@ -205,10 +197,6 @@ class WP_Query {
if ( ($this->is_date || $this->is_author || $this->is_category)) {
$this->is_archive = true;
}
-
- if ( 'attachment' == $qv['show_post_type'] ) {
- $this->is_attachment = true;
- }
}
if ('' != $qv['feed']) {
@@ -280,6 +268,9 @@ class WP_Query {
$distinct = '';
$join = '';
+ if ( !isset($q['post_type']) )
+ $q['post_type'] = 'post';
+ $post_type = $q['post_type'];
if ( !isset($q['posts_per_page']) || $q['posts_per_page'] == 0 )
$q['posts_per_page'] = get_settings('posts_per_page');
if ( !isset($q['what_to_show']) )
@@ -550,25 +541,26 @@ class WP_Query {
// Order by
if (empty($q['orderby'])) {
- $q['orderby']='date '.$q['order'];
+ $q['orderby'] = 'post_date '.$q['order'];
} else {
// Used to filter values
- $allowed_keys = array('author', 'date', 'category', 'title', 'modified');
+ $allowed_keys = array('author', 'date', 'category', 'title', 'modified', 'menu_order');
$q['orderby'] = urldecode($q['orderby']);
$q['orderby'] = addslashes_gpc($q['orderby']);
$orderby_array = explode(' ',$q['orderby']);
- if (!in_array($orderby_array[0],$allowed_keys)) {
- $orderby_array[0] = 'date';
- }
- $q['orderby'] = $orderby_array[0].' '.$q['order'];
- if (count($orderby_array)>1) {
- for ($i = 1; $i < (count($orderby_array)); $i = $i + 1) {
- // Only allow certain values for safety
- if (in_array($orderby_array[$i],$allowed_keys)) {
- $q['orderby'] .= ',post_'.$orderby_array[$i].' '.$q['order'];
- }
- }
+ if ( empty($orderby_array) )
+ $orderby_array[] = $q['orderby'];
+ $q['orderby'] = '';
+ for ($i = 0; $i < count($orderby_array); $i++) {
+ // Only allow certain values for safety
+ $orderby = $orderby_array[$i];
+ if ( 'menu_order' != $orderby )
+ $orderby = 'post_' . $orderby;
+ if ( in_array($orderby_array[$i], $allowed_keys) )
+ $q['orderby'] .= (($i == 0) ? '' : ',') . "$orderby {$q['order']}";
}
+ if ( empty($q['orderby']) )
+ $q['orderby'] = 'post_date '.$q['order'];
}
//$now = gmdate('Y-m-d H:i:59');
@@ -587,10 +579,10 @@ class WP_Query {
} elseif ($this->is_single) {
$where .= ' AND (post_type = "post")';
} else {
- $where .= ' AND (post_type = "post" AND (post_status = "publish"';
+ $where .= " AND (post_type = '$post_type' AND (post_status = 'publish'";
- if ( $pagenow == 'post.php' || $pagenow == 'edit.php' )
- $where .= " OR post_status = 'future'";
+ if ( is_admin() )
+ $where .= " OR post_status = 'future' OR post_status = 'draft'";
else
$distinct = 'DISTINCT';
@@ -636,8 +628,7 @@ class WP_Query {
$groupby = " $wpdb->posts.ID ";
$groupby = apply_filters('posts_groupby', $groupby);
$join = apply_filters('posts_join_paged', $join);
- $orderby = "post_" . $q['orderby'];
- $orderby = apply_filters('posts_orderby', $orderby);
+ $orderby = apply_filters('posts_orderby', $q['orderby']);
$request = " SELECT $distinct * FROM $wpdb->posts $join WHERE 1=1" . $where . " GROUP BY " . $groupby . " ORDER BY " . $orderby . " $limits";
$this->request = apply_filters('posts_request', $request);
@@ -1448,7 +1439,8 @@ class WP_Rewrite {
class WP {
var $public_query_vars = array('m', 'p', 'posts', 'w', 'cat', 'withcomments', 's', 'search', 'exact', 'sentence', 'debug', 'calendar', 'page', 'paged', 'more', 'tb', 'pb', 'author', 'order', 'orderby', 'year', 'monthnum', 'day', 'hour', 'minute', 'second', 'name', 'category_name', 'feed', 'author_name', 'static', 'pagename', 'page_id', 'error', 'comments_popup', 'attachment', 'attachment_id', 'subpost', 'subpost_id', 'preview');
- var $private_query_vars = array('posts_per_page', 'posts_per_archive_page', 'what_to_show', 'showposts', 'nopaging', 'show_post_type');
+ var $private_query_vars = array('posts_per_page', 'posts_per_archive_page', 'what_to_show', 'showposts', 'nopaging', 'post_type');
+ var $extra_query_vars = array();
var $query_vars;
var $query_string;
@@ -1463,9 +1455,7 @@ class WP {
$this->query_vars = array();
if (! empty($extra_query_vars))
- parse_str($extra_query_vars, $extra_query_vars);
- else
- $extra_query_vars = array();
+ parse_str($extra_query_vars, $this->extra_query_vars);
// Process PATH_INFO, REQUEST_URI, and 404 for permalinks.
@@ -1539,7 +1529,7 @@ class WP {
$this->matched_query = $query;
// Parse the query.
- parse_str($query, $query_vars);
+ parse_str($query, $perma_query_vars);
// If we're processing a 404 request, clear the error var
// since we found something.
@@ -1561,8 +1551,8 @@ class WP {
if (isset($error))
unset($error);
- if ( isset($query_vars) && strstr($_SERVER['PHP_SELF'], 'wp-admin/') )
- unset($query_vars);
+ if ( isset($perma_query_vars) && strstr($_SERVER['PHP_SELF'], 'wp-admin/') )
+ unset($perma_query_vars);
$this->did_permalink = false;
}
@@ -1572,20 +1562,26 @@ class WP {
for ($i=0; $i<count($this->public_query_vars); $i += 1) {
$wpvar = $this->public_query_vars[$i];
- if (isset($extra_query_vars[$wpvar]))
- $this->query_vars[$wpvar] = $extra_query_vars[$wpvar];
+ if (isset($this->extra_query_vars[$wpvar]))
+ $this->query_vars[$wpvar] = $this->extra_query_vars[$wpvar];
elseif (isset($GLOBALS[$wpvar]))
$this->query_vars[$wpvar] = $GLOBALS[$wpvar];
elseif (!empty($_POST[$wpvar]))
$this->query_vars[$wpvar] = $_POST[$wpvar];
elseif (!empty($_GET[$wpvar]))
$this->query_vars[$wpvar] = $_GET[$wpvar];
- elseif (!empty($query_vars[$wpvar]))
- $this->query_vars[$wpvar] = $query_vars[$wpvar];
+ elseif (!empty($perma_query_vars[$wpvar]))
+ $this->query_vars[$wpvar] = $perma_query_vars[$wpvar];
else
$this->query_vars[$wpvar] = '';
}
+ for ($i=0; $i<count($this->private_query_vars); $i += 1) {
+ $wpvar = $this->private_query_vars[$i];
+ if (isset($this->extra_query_vars[$wpvar]))
+ $this->query_vars[$wpvar] = $this->extra_query_vars[$wpvar];
+ }
+
if ( isset($error) )
$this->query_vars['error'] = $error;
}
@@ -1632,15 +1628,15 @@ class WP {
function build_query_string() {
$this->query_string = '';
- foreach ($this->public_query_vars as $wpvar) {
- if (isset($this->query_vars[$wpvar]) && '' != $this->query_vars[$wpvar]) {
+ foreach (array_keys($this->query_vars) as $wpvar) {
+ if ( '' != $this->query_vars[$wpvar] ) {
$this->query_string .= (strlen($this->query_string) < 1) ? '' : '&';
$this->query_string .= $wpvar . '=' . rawurlencode($this->query_vars[$wpvar]);
}
}
foreach ($this->private_query_vars as $wpvar) {
- if (isset($GLOBALS[$wpvar]) && '' != $GLOBALS[$wpvar]) {
+ if (isset($GLOBALS[$wpvar]) && '' != $GLOBALS[$wpvar] && ! isset($this->extra_query_vars[$wpvar]) ) {
$this->query_string .= (strlen($this->query_string) < 1) ? '' : '&';
$this->query_string .= $wpvar . '=' . rawurlencode($GLOBALS[$wpvar]);
}
diff --git a/wp-inst/wp-includes/default-filters.php b/wp-inst/wp-includes/default-filters.php
index 9b9b275..fcf0f3c 100644
--- a/wp-inst/wp-includes/default-filters.php
+++ b/wp-inst/wp-includes/default-filters.php
@@ -88,4 +88,5 @@ add_filter('option_ping_sites', 'privacy_ping_filter');
add_action('wp_head', 'rsd_link');
add_action('publish_future_post', 'wp_publish_post', 10, 1);
add_action('wp_head', 'noindex', 1);
+add_action('init', 'wp_cron');
?>
diff --git a/wp-inst/wp-includes/functions.php b/wp-inst/wp-includes/functions.php
index 3d93ad8..173b632 100644
--- a/wp-inst/wp-includes/functions.php
+++ b/wp-inst/wp-includes/functions.php
@@ -2288,7 +2288,6 @@ function update_usermeta( $user_id, $meta_key, $meta_value ) {
wp_cache_delete($user_id, 'users');
wp_cache_delete($user->user_login, 'userlogins');
wp_cache_delete( md5($user_id . $meta_key), 'usermeta' );
-
return true;
}
@@ -2387,7 +2386,7 @@ function wp_cron() {
return;
foreach ($crons as $timestamp => $cronhooks) {
- if ($timestamp > time()) break;
+ if ($timestamp > current_time( 'timestamp' )) break;
foreach($cronhooks as $hook => $args) {
do_action($hook, $args['args']);
$recurrence = $args['recur'];
@@ -2404,4 +2403,10 @@ function wp_cron() {
}
}
+function privacy_ping_filter( $sites ) {
+ if ( get_option('blog_public') )
+ return $sites;
+ else
+ return '';
+}
?>
diff --git a/wp-inst/wp-includes/pluggable-functions.php b/wp-inst/wp-includes/pluggable-functions.php
index 5100bed..e8c7b30 100644
--- a/wp-inst/wp-includes/pluggable-functions.php
+++ b/wp-inst/wp-includes/pluggable-functions.php
@@ -337,8 +337,8 @@ function wp_notify_postauthor($comment_id, $comment_type='') {
$subject = sprintf( __('[%1$s] Pingback: "%2$s"'), $blogname, $post->post_title );
}
$notify_message .= get_permalink($comment->comment_post_ID) . "#comments\r\n\r\n";
- $notify_message .= sprintf( __('To delete this comment, visit: %s'), get_settings('siteurl').'/wp-admin/post.php?action=confirmdeletecomment&p='.$comment->comment_post_ID."&comment=$comment_id" ) . "\r\n";
- $notify_message .= sprintf( __('To mark this comment as spam, visit: %s'), get_settings('siteurl').'/wp-admin/post.php?action=confirmdeletecomment&delete_type=spam&p='.$comment->comment_post_ID."&comment=$comment_id" ) . "\r\n";
+ $notify_message .= sprintf( __('To delete this comment, visit: %s'), get_settings('siteurl').'/wp-admin/comment.php?action=confirmdeletecomment&p='.$comment->comment_post_ID."&comment=$comment_id" ) . "\r\n";
+ $notify_message .= sprintf( __('To mark this comment as spam, visit: %s'), get_settings('siteurl').'/wp-admin/comment.php?action=confirmdeletecomment&delete_type=spam&p='.$comment->comment_post_ID."&comment=$comment_id" ) . "\r\n";
$admin_email = get_settings('admin_email');
@@ -394,9 +394,9 @@ function wp_notify_moderator($comment_id) {
$notify_message .= sprintf( __('URI : %s'), $comment->comment_author_url ) . "\r\n";
$notify_message .= sprintf( __('Whois : http://ws.arin.net/cgi-bin/whois.pl?queryinput=%s'), $comment->comment_author_IP ) . "\r\n";
$notify_message .= __('Comment: ') . "\r\n" . $comment->comment_content . "\r\n\r\n";
- $notify_message .= sprintf( __('To approve this comment, visit: %s'), get_settings('siteurl').'/wp-admin/post.php?action=mailapprovecomment&p='.$comment->comment_post_ID."&comment=$comment_id" ) . "\r\n";
- $notify_message .= sprintf( __('To delete this comment, visit: %s'), get_settings('siteurl').'/wp-admin/post.php?action=confirmdeletecomment&p='.$comment->comment_post_ID."&comment=$comment_id" ) . "\r\n";
- $notify_message .= sprintf( __('To mark this comment as spam, visit: %s'), get_settings('siteurl').'/wp-admin/post.php?action=confirmdeletecomment&delete_type=spam&p='.$comment->comment_post_ID."&comment=$comment_id" ) . "\r\n";
+ $notify_message .= sprintf( __('To approve this comment, visit: %s'), get_settings('siteurl').'/wp-admin/comment.php?action=mailapprovecomment&p='.$comment->comment_post_ID."&comment=$comment_id" ) . "\r\n";
+ $notify_message .= sprintf( __('To delete this comment, visit: %s'), get_settings('siteurl').'/wp-admin/comment.php?action=confirmdeletecomment&p='.$comment->comment_post_ID."&comment=$comment_id" ) . "\r\n";
+ $notify_message .= sprintf( __('To mark this comment as spam, visit: %s'), get_settings('siteurl').'/wp-admin/comment.php?action=confirmdeletecomment&delete_type=spam&p='.$comment->comment_post_ID."&comment=$comment_id" ) . "\r\n";
$notify_message .= sprintf( __('Currently %s comments are waiting for approval. Please visit the moderation panel:'), $comments_waiting ) . "\r\n";
$notify_message .= get_settings('siteurl') . "/wp-admin/moderation.php\r\n";
diff --git a/wp-inst/wp-includes/template-functions-post.php b/wp-inst/wp-includes/template-functions-post.php
index 1ccfa76..ed06b74 100644
--- a/wp-inst/wp-includes/template-functions-post.php
+++ b/wp-inst/wp-includes/template-functions-post.php
@@ -258,6 +258,9 @@ function the_meta() {
if ( $keys = get_post_custom_keys() ) {
echo "<ul class='post-meta'>\n";
foreach ( $keys as $key ) {
+ $keyt = trim($key);
+ if ( '_' == $keyt{0} )
+ continue;
$values = array_map('trim', get_post_custom_values($key));
$value = implode($values,', ');
echo "<li><span class='post-meta-key'>$key:</span> $value</li>\n";
diff --git a/wp-inst/wp-settings.php b/wp-inst/wp-settings.php
index 7a08048..c908c4d 100644
--- a/wp-inst/wp-settings.php
+++ b/wp-inst/wp-settings.php
@@ -375,7 +375,6 @@ if ( file_exists(TEMPLATEPATH . "/functions.php") )
function shutdown_action_hook() {
do_action('shutdown');
- wp_cron();
wp_cache_close();
}
register_shutdown_function('shutdown_action_hook');