Place holder for Favorite Actions dropdown

git-svn-id: http://svn.automattic.com/wordpress/trunk@8985 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
ryan 2008-09-25 23:49:24 +00:00
parent 39b77958fd
commit e356231388
3 changed files with 31 additions and 0 deletions

View File

@ -90,6 +90,8 @@ if ( empty($_GET['mode']) )
else
$mode = attribute_escape($_GET['mode']);
favorite_actions();
if ( isset($_GET['posted']) && $_GET['posted'] ) : $_GET['posted'] = (int) $_GET['posted']; ?>
<div id="message" class="updated fade"><p><strong><?php _e('Your post has been saved.'); ?></strong> <a href="<?php echo get_permalink( $_GET['posted'] ); ?>"><?php _e('View post'); ?></a> | <a href="<?php echo get_edit_post_link( $_GET['posted'] ); ?>"><?php _e('Edit post'); ?></a></p></div>
<?php $_SERVER['REQUEST_URI'] = remove_query_arg(array('posted'), $_SERVER['REQUEST_URI']);

View File

@ -2446,4 +2446,26 @@ function the_post_password() {
global $post;
if ( isset( $post->post_password ) ) echo attribute_escape( $post->post_password );
}
function favorite_actions() {
$actions = array(
'post-new.php' => __('Add New Post'),
'page-new.php' => __('Add New Page'),
);
$actions = apply_filters('favorite_actions', $actions);
echo '<form class="favorites-form" action="" method="get">';
echo '<p id="favorite-actions" class="favorite-actions">';
echo '<select name="favorite-action">';
foreach ( $actions as $action => $label) {
echo "<option value='$action'>";
echo $label;
echo "</option>\n";
}
echo '</select>';
echo '<input type="submit" value="' . __('Go') . '" name="doaction" id="doaction" class="button action" />';
echo '</p>';
echo '</form>';
}
?>

View File

@ -1583,6 +1583,13 @@ p.search-box .button, #widget-search .button {
border-style: solid;
}
p.favorite-actions {
position: absolute;
right: 15px;
top: 52px;
margin: 0;
}
#posts-filter fieldset {
float: left;
margin: 0 1.5ex 1em 0;