From a1aeb4a1f2c104da9776687e475f49a9ccf8e8f4 Mon Sep 17 00:00:00 2001 From: ryan Date: Fri, 17 Apr 2009 05:30:09 +0000 Subject: [PATCH] Use comments_open() and pings_open() in packaged themes. Props coffee2code. fixes #9556 git-svn-id: http://svn.automattic.com/wordpress/trunk@10978 1a063a9b-81f0-0310-95a4-ce76da25c4cd --- wp-admin/plugins.php | 49 +++++++++++--------- wp-admin/wp-admin.css | 8 +++- wp-content/themes/classic/comments-popup.php | 4 +- wp-content/themes/default/comments-popup.php | 4 +- wp-content/themes/default/comments.php | 4 +- wp-content/themes/default/image.php | 8 ++-- wp-content/themes/default/single.php | 8 ++-- 7 files changed, 47 insertions(+), 38 deletions(-) diff --git a/wp-admin/plugins.php b/wp-admin/plugins.php index 9bcae35641..755567c26e 100644 --- a/wp-admin/plugins.php +++ b/wp-admin/plugins.php @@ -249,21 +249,19 @@ function print_plugins_table($plugins, $context = '') { - - - - - + + + + - - - - - + + + + @@ -276,28 +274,35 @@ function print_plugins_table($plugins, $context = '') { '; } foreach ( (array)$plugins as $plugin_file => $plugin_data) { - $action_links = array(); + $actions = array(); if ( 'active' == $context ) - $action_links[] = '' . __('Deactivate') . ''; + $actions[] = '' . __('Deactivate') . ''; else //Inactive or Recently deactivated - $action_links[] = '' . __('Activate') . ''; + $actions[] = '' . __('Activate') . ''; if ( current_user_can('edit_plugins') && is_writable(WP_PLUGIN_DIR . '/' . $plugin_file) ) - $action_links[] = '' . __('Edit') . ''; + $actions[] = '' . __('Edit') . ''; - $action_links = apply_filters( 'plugin_action_links', $action_links, $plugin_file, $plugin_data, $context ); - $action_links = apply_filters( "plugin_action_links_$plugin_file", $action_links, $plugin_file, $plugin_data, $context ); + $actions = apply_filters( 'plugin_action_links', $actions, $plugin_file, $plugin_data, $context ); + $actions = apply_filters( "plugin_action_links_$plugin_file", $actions, $plugin_file, $plugin_data, $context ); + $action_count = count($actions); echo " - + - - '; do_action( 'after_plugin_row', $plugin_file, $plugin_data, $context ); @@ -393,4 +398,4 @@ function print_plugin_actions($context) { \ No newline at end of file +?> diff --git a/wp-admin/wp-admin.css b/wp-admin/wp-admin.css index d17e230d61..b23ccef3a8 100644 --- a/wp-admin/wp-admin.css +++ b/wp-admin/wp-admin.css @@ -1981,15 +1981,19 @@ p.search-box { /* Edit posts */ -td.post-title strong { +td.post-title strong, td.plugin-title strong { display: block; margin-bottom: .2em; } -td.post-title p { +td.post-title p, td.plugin-title p { margin: 6px 0; } +td.plugin-title { + white-space: nowrap; +} + /* Global classes */ .wp-hidden-children .wp-hidden-child, diff --git a/wp-content/themes/classic/comments-popup.php b/wp-content/themes/classic/comments-popup.php index 8902f00165..4e65605953 100644 --- a/wp-content/themes/classic/comments-popup.php +++ b/wp-content/themes/classic/comments-popup.php @@ -30,7 +30,7 @@ while( have_posts()) : the_post();

RSS feed for comments on this post."); ?>

-ping_status) { ?> +

URL to TrackBack this entry is:"); ?>

@@ -58,7 +58,7 @@ if ( post_password_required($commentstatus) ) { // and it doesn't match the coo

-comment_status) { ?> +

HTML allowed:"); ?>

diff --git a/wp-content/themes/default/comments-popup.php b/wp-content/themes/default/comments-popup.php index b54c07f3e4..9828b46a2c 100644 --- a/wp-content/themes/default/comments-popup.php +++ b/wp-content/themes/default/comments-popup.php @@ -29,7 +29,7 @@ while ( have_posts() ) : the_post();

RSS feed for comments on this post.

-ping_status) { ?> +

The URL to TrackBack this entry is:

@@ -57,7 +57,7 @@ if ( post_password_required($post) ) { // and it doesn't match the cookie

No comments yet.

-comment_status) { ?> +

Leave a comment

Line and paragraph breaks automatic, e-mail address never displayed, HTML allowed:

diff --git a/wp-content/themes/default/comments.php b/wp-content/themes/default/comments.php index 2e288e20d7..8f616f7937 100644 --- a/wp-content/themes/default/comments.php +++ b/wp-content/themes/default/comments.php @@ -35,7 +35,7 @@ - comment_status) : ?> + @@ -46,7 +46,7 @@ -comment_status) : ?> +
diff --git a/wp-content/themes/default/image.php b/wp-content/themes/default/image.php index 80dad8ace8..4312630fee 100644 --- a/wp-content/themes/default/image.php +++ b/wp-content/themes/default/image.php @@ -32,19 +32,19 @@ get_header(); You can follow any responses to this entry through the feed. - comment_status) && ('open' == $post->ping_status)) { + You can leave a response, or trackback from your own site. - comment_status) && ('open' == $post->ping_status)) { + Responses are currently closed, but you can trackback from your own site. - comment_status) && !('open' == $post->ping_status)) { + You can skip to the end and leave a response. Pinging is currently not allowed. - comment_status) && !('open' == $post->ping_status)) { + Both comments and pings are currently closed. diff --git a/wp-content/themes/default/single.php b/wp-content/themes/default/single.php index 49d75c0447..c9cb4d82f3 100644 --- a/wp-content/themes/default/single.php +++ b/wp-content/themes/default/single.php @@ -36,19 +36,19 @@ get_header(); and is filed under . You can follow any responses to this entry through the feed. - comment_status) && ('open' == $post->ping_status)) { + You can leave a response, or trackback from your own site. - comment_status) && ('open' == $post->ping_status)) { + Responses are currently closed, but you can trackback from your own site. - comment_status) && !('open' == $post->ping_status)) { + You can skip to the end and leave a response. Pinging is currently not allowed. - comment_status) && !('open' == $post->ping_status)) { + Both comments and pings are currently closed.
{$plugin_data['Title']}{$plugin_data['Title']}"; + $i = 0; + echo '
'; + foreach ( $actions as $action => $link ) { + ++$i; + ( $i == $action_count ) ? $sep = '' : $sep = ' | '; + echo "$link$sep"; + } + echo '
'; + echo "
{$plugin_data['Version']}

{$plugin_data['Description']}

{$plugin_data['Description']}

"; echo '