mirror of
https://github.com/gosticks/wordpress-develop.git
synced 2026-12-06 20:58:55 +00:00
Add some filtering. Props jhodgdon. see #4516
git-svn-id: https://develop.svn.wordpress.org/trunk@5998 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
@@ -286,7 +286,7 @@ if ( current_user_can('edit_post', $comment->comment_post_ID) ) {
|
||||
}
|
||||
echo " | <a href=\"" . wp_nonce_url("comment.php?action=deletecomment&dt=spam&p=" . $comment->comment_post_ID . "&c=" . $comment->comment_ID, 'delete-comment_' . $comment->comment_ID) . "\" onclick=\"return deleteSomething( 'comment-as-spam', $comment->comment_ID, '" . js_escape(sprintf(__("You are about to mark as spam this comment by '%s'.\n'Cancel' to stop, 'OK' to mark as spam."), $comment->comment_author)) . "', theCommentList );\">" . __('Spam') . "</a> ";
|
||||
}
|
||||
$post = get_post($comment->comment_post_ID);
|
||||
$post = get_post($comment->comment_post_ID, OBJECT, 'display');
|
||||
$post_title = wp_specialchars( $post->post_title, 'double' );
|
||||
$post_title = ('' == $post_title) ? "# $comment->comment_post_ID" : $post_title;
|
||||
?>
|
||||
|
||||
@@ -33,6 +33,7 @@ include('admin-header.php');
|
||||
<?php
|
||||
$categories = get_categories('get=all');
|
||||
foreach ($categories as $category) :
|
||||
$category = sanitize_category($category);
|
||||
if ($category->term_id == get_option('default_category')) $selected = " selected='selected'";
|
||||
else $selected = '';
|
||||
echo "\n\t<option value='$category->term_id' $selected>$category->name</option>";
|
||||
@@ -44,8 +45,9 @@ endforeach;
|
||||
<th scope="row"><?php _e('Default link category:') ?></th>
|
||||
<td><select name="default_link_category" id="default_link_category">
|
||||
<?php
|
||||
$categories = get_terms('link_category', 'get=all');
|
||||
foreach ($categories as $category) :
|
||||
$link_categories = get_terms('link_category', 'get=all');
|
||||
foreach ($link_categories as $category) :
|
||||
$category = sanitize_term($category, 'link_category');
|
||||
if ($category->term_id == get_option('default_link_category')) $selected = " selected='selected'";
|
||||
else $selected = '';
|
||||
echo "\n\t<option value='$category->term_id' $selected>$category->name</option>";
|
||||
@@ -83,6 +85,7 @@ endforeach;
|
||||
<?php
|
||||
//Alreay have $categories from default_category
|
||||
foreach ($categories as $category) :
|
||||
$category = sanitize_category($category);
|
||||
if ($category->cat_ID == get_option('default_email_category')) $selected = " selected='selected'";
|
||||
else $selected = '';
|
||||
echo "\n\t<option value='$category->cat_ID' $selected>$category->cat_name</option>";
|
||||
|
||||
Reference in New Issue
Block a user