X-Git-Url: https://scripts.mit.edu/gitweb/autoinstalls/wordpress.git/blobdiff_plain/9c40b4d36daed9e28e48a5fe9205c32557195a4b..refs/tags/wordpress-2.8.3-scripts:/wp-admin/includes/template.php?ds=sidebyside diff --git a/wp-admin/includes/template.php b/wp-admin/includes/template.php index 13faf106..b47e079d 100644 --- a/wp-admin/includes/template.php +++ b/wp-admin/includes/template.php @@ -1447,6 +1447,8 @@ function _post_row($a_post, $pending_comments, $mode) { if ( current_user_can('edit_post', $post->ID) ) { $actions['edit'] = '' . __('Edit') . ''; $actions['inline hide-if-no-js'] = '' . __('Quick Edit') . ''; + } + if ( current_user_can('delete_post', $post->ID) ) { $actions['delete'] = "ID) . "' onclick=\"if ( confirm('" . esc_js(sprintf( ('draft' == $post->post_status) ? __("You are about to delete this draft '%s'\n 'Cancel' to stop, 'OK' to delete.") : __("You are about to delete this post '%s'\n 'Cancel' to stop, 'OK' to delete."), $post->post_title )) . "') ) { return true;}return false;\">" . __('Delete') . ""; } if ( in_array($post->post_status, array('pending', 'draft')) ) { @@ -1660,6 +1662,8 @@ foreach ($posts_columns as $column_name=>$column_display_name) { if ( current_user_can('edit_page', $page->ID) ) { $actions['edit'] = '' . __('Edit') . ''; $actions['inline'] = '' . __('Quick Edit') . ''; + } + if ( current_user_can('delete_page', $page->ID) ) { $actions['delete'] = "ID) . "' onclick=\"if ( confirm('" . esc_js(sprintf( ('draft' == $page->post_status) ? __("You are about to delete this draft '%s'\n 'Cancel' to stop, 'OK' to delete.") : __("You are about to delete this page '%s'\n 'Cancel' to stop, 'OK' to delete."), $page->post_title )) . "') ) { return true;}return false;\">" . __('Delete') . ""; } if ( in_array($post->post_status, array('pending', 'draft')) ) { @@ -2081,9 +2085,7 @@ function _wp_comment_row( $comment_id, $mode, $comment_status, $checkbox = true, $author_url = get_comment_author_url(); if ( 'http://' == $author_url ) $author_url = ''; - $author_url_display = $author_url; - $author_url_display = str_replace('http://www.', '', $author_url_display); - $author_url_display = str_replace('http://', '', $author_url_display); + $author_url_display = preg_replace('|http://(www\.)?|i', '', $author_url); if ( strlen($author_url_display) > 50 ) $author_url_display = substr($author_url_display, 0, 49) . '...'; @@ -3471,11 +3473,6 @@ function screen_meta($screen) { $_wp_contextual_help[$screen] = $help; } break; - case 'theme-editor': - case 'plugin-editor': - $settings = '

' . __('Enable syntax highlighting') . '' . __('Disable syntax highlighting') . "

\n"; - $show_screen = true; - break; case 'widgets': if ( !isset($_wp_contextual_help['widgets']) ) { $help = widgets_help();