Ticket #25824: 25824.4.diff
File 25824.4.diff, 82.2 KB (added by , 10 years ago) |
---|
-
wp-includes/default-widgets.php
904 904 if ( $link == '' ) { 905 905 echo "<li>$title{$date}{$summary}{$author}</li>"; 906 906 } else { 907 echo "<li>< a class='rsswidget' href='$link' title='$desc'>$title</a>{$date}{$summary}{$author}</li>";907 echo "<li><div class='rss-title-row'><a class='rsswidget' href='$link' title='$desc'>$title</a>{$date}</div>{$summary}{$author}</li>"; 908 908 } 909 909 } 910 910 echo '</ul>'; -
wp-admin/includes/ajax-actions.php
234 234 require_once ABSPATH . 'wp-admin/includes/dashboard.php'; 235 235 236 236 switch ( $_GET['widget'] ) { 237 case 'dashboard_ incoming_links' :238 wp_dashboard_ incoming_links();237 case 'dashboard_rss' : 238 wp_dashboard_rss(); 239 239 break; 240 case 'dashboard_primary' :241 wp_dashboard_primary();242 break;243 case 'dashboard_secondary' :244 wp_dashboard_secondary();245 break;246 case 'dashboard_plugins' :247 wp_dashboard_plugins();248 break;249 240 } 250 241 wp_die(); 251 242 } -
wp-admin/includes/dashboard.php
37 37 38 38 // Right Now 39 39 if ( is_blog_admin() && current_user_can('edit_posts') ) 40 wp_add_dashboard_widget( 'dashboard_right_now', __( 'Right Now' ), 'wp_dashboard_right_now' );40 add_meta_box( 'dash-right-now', 'Site Content', 'dashboard_new_right_now', 'dashboard', 'normal', 'high' ); 41 41 42 42 if ( is_network_admin() ) 43 43 wp_add_dashboard_widget( 'network_dashboard_right_now', __( 'Right Now' ), 'wp_network_dashboard_right_now' ); 44 44 45 // Recent Comments Widget 46 if ( is_blog_admin() && current_user_can('moderate_comments') ) { 47 if ( !isset( $widget_options['dashboard_recent_comments'] ) || !isset( $widget_options['dashboard_recent_comments']['items'] ) ) { 48 $update = true; 49 $widget_options['dashboard_recent_comments'] = array( 50 'items' => 5, 51 ); 52 } 53 $recent_comments_title = __( 'Recent Comments' ); 54 wp_add_dashboard_widget( 'dashboard_recent_comments', $recent_comments_title, 'wp_dashboard_recent_comments', 'wp_dashboard_recent_comments_control' ); 55 } 45 // Activity Widget 46 add_meta_box( 'dashboard_activity', __( 'Activity' ), 'wp_dashboard_activity', 'dashboard', 'normal', 'high' ); 56 47 57 // Incoming Links Widget58 if ( is_blog_admin() && current_user_can('publish_posts') ) {59 if ( !isset( $widget_options['dashboard_incoming_links'] ) || !isset( $widget_options['dashboard_incoming_links']['home'] ) || $widget_options['dashboard_incoming_links']['home'] != get_option('home') ) {60 $update = true;61 $num_items = isset($widget_options['dashboard_incoming_links']['items']) ? $widget_options['dashboard_incoming_links']['items'] : 10;62 $widget_options['dashboard_incoming_links'] = array(63 'home' => get_option('home'),64 'link' => apply_filters( 'dashboard_incoming_links_link', 'http://blogsearch.google.com/blogsearch?scoring=d&partner=wordpress&q=link:' . trailingslashit( get_option('home') ) ),65 'url' => isset($widget_options['dashboard_incoming_links']['url']) ? apply_filters( 'dashboard_incoming_links_feed', $widget_options['dashboard_incoming_links']['url'] ) : apply_filters( 'dashboard_incoming_links_feed', 'http://blogsearch.google.com/blogsearch_feeds?scoring=d&ie=utf-8&num=' . $num_items . '&output=rss&partner=wordpress&q=link:' . trailingslashit( get_option('home') ) ),66 'items' => $num_items,67 'show_date' => isset($widget_options['dashboard_incoming_links']['show_date']) ? $widget_options['dashboard_incoming_links']['show_date'] : false68 );69 }70 wp_add_dashboard_widget( 'dashboard_incoming_links', __( 'Incoming Links' ), 'wp_dashboard_incoming_links', 'wp_dashboard_incoming_links_control' );71 }72 73 // WP Plugins Widget74 if ( ( ! is_multisite() && is_blog_admin() && current_user_can( 'install_plugins' ) ) || ( is_network_admin() && current_user_can( 'manage_network_plugins' ) && current_user_can( 'install_plugins' ) ) )75 wp_add_dashboard_widget( 'dashboard_plugins', __( 'Plugins' ), 'wp_dashboard_plugins' );76 77 48 // QuickPress Widget 78 if ( is_blog_admin() && current_user_can('edit_posts') ) 79 wp_add_dashboard_widget( 'dashboard_quick_press', __( 'QuickPress' ), 'wp_dashboard_quick_press' ); 49 if ( is_blog_admin() && current_user_can( 'edit_posts' ) ) 50 add_meta_box( 'dashboard_quick_draft', __( 'Quick Draft' ), 'wp_dashboard_quick_draft', 'dashboard', 'side', 'high' ); 51 52 // WordPress News 53 add_meta_box( 'dashboard_rss', __( 'WordPress News' ), 'wp_dashboard_rss', 'dashboard', 'side', 'low' ); 80 54 81 // Recent Drafts82 if ( is_blog_admin() && current_user_can('edit_posts') )83 wp_add_dashboard_widget( 'dashboard_recent_drafts', __('Recent Drafts'), 'wp_dashboard_recent_drafts' );84 85 // Primary feed (Dev Blog) Widget86 if ( !isset( $widget_options['dashboard_primary'] ) ) {87 $update = true;88 $widget_options['dashboard_primary'] = array(89 'link' => apply_filters( 'dashboard_primary_link', __( 'http://wordpress.org/news/' ) ),90 'url' => apply_filters( 'dashboard_primary_feed', __( 'http://wordpress.org/news/feed/' ) ),91 'title' => apply_filters( 'dashboard_primary_title', __( 'WordPress Blog' ) ),92 'items' => 2,93 'show_summary' => 1,94 'show_author' => 0,95 'show_date' => 1,96 );97 }98 wp_add_dashboard_widget( 'dashboard_primary', $widget_options['dashboard_primary']['title'], 'wp_dashboard_primary', 'wp_dashboard_primary_control' );99 100 // Secondary Feed (Planet) Widget101 if ( !isset( $widget_options['dashboard_secondary'] ) ) {102 $update = true;103 $widget_options['dashboard_secondary'] = array(104 'link' => apply_filters( 'dashboard_secondary_link', __( 'http://planet.wordpress.org/' ) ),105 'url' => apply_filters( 'dashboard_secondary_feed', __( 'http://planet.wordpress.org/feed/' ) ),106 'title' => apply_filters( 'dashboard_secondary_title', __( 'Other WordPress News' ) ),107 'items' => 5,108 'show_summary' => 0,109 'show_author' => 0,110 'show_date' => 0,111 );112 }113 wp_add_dashboard_widget( 'dashboard_secondary', $widget_options['dashboard_secondary']['title'], 'wp_dashboard_secondary', 'wp_dashboard_secondary_control' );114 115 55 // Hook to register new widgets 116 56 // Filter widget order 117 57 if ( is_network_admin() ) { … … 165 105 } 166 106 167 107 if ( is_blog_admin () ) 168 $side_widgets = array('dashboard_quick_ press', 'dashboard_recent_drafts', 'dashboard_primary', 'dashboard_secondary');108 $side_widgets = array('dashboard_quick_draft'); 169 109 else if (is_network_admin() ) 170 $side_widgets = array( 'dashboard_primary', 'dashboard_secondary');110 $side_widgets = array(); 171 111 else 172 112 $side_widgets = array(); 173 113 … … 224 164 225 165 /* Dashboard Widgets */ 226 166 227 function wp_dashboard_right_now() { 228 global $wp_registered_sidebars; 229 230 $num_posts = wp_count_posts( 'post' ); 231 $num_pages = wp_count_posts( 'page' ); 232 233 $num_cats = wp_count_terms('category'); 234 235 $num_tags = wp_count_terms('post_tag'); 236 237 $num_comm = wp_count_comments(); 238 239 echo "\n\t".'<div class="table table_content">'; 240 echo "\n\t".'<p class="sub">' . __('Content') . '</p>'."\n\t".'<table>'; 241 echo "\n\t".'<tr class="first">'; 242 243 // Posts 244 $num = number_format_i18n( $num_posts->publish ); 245 $text = _n( 'Post', 'Posts', intval($num_posts->publish) ); 246 if ( current_user_can( 'edit_posts' ) ) { 247 $num = "<a href='edit.php'>$num</a>"; 248 $text = "<a href='edit.php'>$text</a>"; 249 } 250 echo '<td class="first b b-posts">' . $num . '</td>'; 251 echo '<td class="t posts">' . $text . '</td>'; 252 253 echo '</tr><tr>'; 254 /* TODO: Show status breakdown on hover 255 if ( $can_edit_pages && !empty($num_pages->publish) ) { // how many pages is not exposed in feeds. Don't show if !current_user_can 256 $post_type_texts[] = '<a href="edit-pages.php">'.sprintf( _n( '%s page', '%s pages', $num_pages->publish ), number_format_i18n( $num_pages->publish ) ).'</a>'; 257 } 258 if ( $can_edit_posts && !empty($num_posts->draft) ) { 259 $post_type_texts[] = '<a href="edit.php?post_status=draft">'.sprintf( _n( '%s draft', '%s drafts', $num_posts->draft ), number_format_i18n( $num_posts->draft ) ).'</a>'; 260 } 261 if ( $can_edit_posts && !empty($num_posts->future) ) { 262 $post_type_texts[] = '<a href="edit.php?post_status=future">'.sprintf( _n( '%s scheduled post', '%s scheduled posts', $num_posts->future ), number_format_i18n( $num_posts->future ) ).'</a>'; 263 } 264 if ( current_user_can('publish_posts') && !empty($num_posts->pending) ) { 265 $pending_text = sprintf( _n( 'There is <a href="%1$s">%2$s post</a> pending your review.', 'There are <a href="%1$s">%2$s posts</a> pending your review.', $num_posts->pending ), 'edit.php?post_status=pending', number_format_i18n( $num_posts->pending ) ); 266 } else { 267 $pending_text = ''; 268 } 269 */ 270 271 // Pages 272 $num = number_format_i18n( $num_pages->publish ); 273 $text = _n( 'Page', 'Pages', $num_pages->publish ); 274 if ( current_user_can( 'edit_pages' ) ) { 275 $num = "<a href='edit.php?post_type=page'>$num</a>"; 276 $text = "<a href='edit.php?post_type=page'>$text</a>"; 277 } 278 echo '<td class="first b b_pages">' . $num . '</td>'; 279 echo '<td class="t pages">' . $text . '</td>'; 280 281 echo '</tr><tr>'; 282 283 // Categories 284 $num = number_format_i18n( $num_cats ); 285 $text = _n( 'Category', 'Categories', $num_cats ); 286 if ( current_user_can( 'manage_categories' ) ) { 287 $num = "<a href='edit-tags.php?taxonomy=category'>$num</a>"; 288 $text = "<a href='edit-tags.php?taxonomy=category'>$text</a>"; 289 } 290 echo '<td class="first b b-cats">' . $num . '</td>'; 291 echo '<td class="t cats">' . $text . '</td>'; 292 293 echo '</tr><tr>'; 294 295 // Tags 296 $num = number_format_i18n( $num_tags ); 297 $text = _n( 'Tag', 'Tags', $num_tags ); 298 if ( current_user_can( 'manage_categories' ) ) { 299 $num = "<a href='edit-tags.php'>$num</a>"; 300 $text = "<a href='edit-tags.php'>$text</a>"; 301 } 302 echo '<td class="first b b-tags">' . $num . '</td>'; 303 echo '<td class="t tags">' . $text . '</td>'; 304 305 echo "</tr>"; 306 do_action('right_now_content_table_end'); 307 echo "\n\t</table>\n\t</div>"; 308 309 echo "\n\t".'<div class="table table_discussion">'; 310 echo "\n\t".'<p class="sub">' . __('Discussion') . '</p>'."\n\t".'<table>'; 311 echo "\n\t".'<tr class="first">'; 312 313 // Total Comments 314 $num = '<span class="total-count">' . number_format_i18n($num_comm->total_comments) . '</span>'; 315 $text = _n( 'Comment', 'Comments', $num_comm->total_comments ); 316 if ( current_user_can( 'moderate_comments' ) ) { 317 $num = '<a href="edit-comments.php">' . $num . '</a>'; 318 $text = '<a href="edit-comments.php">' . $text . '</a>'; 319 } 320 echo '<td class="b b-comments">' . $num . '</td>'; 321 echo '<td class="last t comments">' . $text . '</td>'; 322 323 echo '</tr><tr>'; 324 325 // Approved Comments 326 $num = '<span class="approved-count">' . number_format_i18n($num_comm->approved) . '</span>'; 327 $text = _nx( 'Approved', 'Approved', $num_comm->approved, 'Right Now' ); 328 if ( current_user_can( 'moderate_comments' ) ) { 329 $num = "<a href='edit-comments.php?comment_status=approved'>$num</a>"; 330 $text = "<a class='approved' href='edit-comments.php?comment_status=approved'>$text</a>"; 331 } 332 echo '<td class="b b_approved">' . $num . '</td>'; 333 echo '<td class="last t">' . $text . '</td>'; 334 335 echo "</tr>\n\t<tr>"; 336 337 // Pending Comments 338 $num = '<span class="pending-count">' . number_format_i18n($num_comm->moderated) . '</span>'; 339 $text = _n( 'Pending', 'Pending', $num_comm->moderated ); 340 if ( current_user_can( 'moderate_comments' ) ) { 341 $num = "<a href='edit-comments.php?comment_status=moderated'>$num</a>"; 342 $text = "<a class='waiting' href='edit-comments.php?comment_status=moderated'>$text</a>"; 343 } 344 echo '<td class="b b-waiting">' . $num . '</td>'; 345 echo '<td class="last t">' . $text . '</td>'; 346 347 echo "</tr>\n\t<tr>"; 348 349 // Spam Comments 350 $num = number_format_i18n($num_comm->spam); 351 $text = _nx( 'Spam', 'Spam', $num_comm->spam, 'comment' ); 352 if ( current_user_can( 'moderate_comments' ) ) { 353 $num = "<a href='edit-comments.php?comment_status=spam'><span class='spam-count'>$num</span></a>"; 354 $text = "<a class='spam' href='edit-comments.php?comment_status=spam'>$text</a>"; 355 } 356 echo '<td class="b b-spam">' . $num . '</td>'; 357 echo '<td class="last t">' . $text . '</td>'; 358 359 echo "</tr>"; 360 do_action('right_now_table_end'); 361 do_action('right_now_discussion_table_end'); 362 echo "\n\t</table>\n\t</div>"; 363 364 echo "\n\t".'<div class="versions">'; 167 function dashboard_new_right_now() { 365 168 $theme = wp_get_theme(); 366 367 echo "\n\t<p>"; 368 369 if ( $theme->errors() ) { 370 if ( ! is_multisite() || is_super_admin() ) 371 echo '<span class="error-message">' . sprintf( __( 'ERROR: %s' ), $theme->errors()->get_error_message() ) . '</span>'; 372 } elseif ( ! empty($wp_registered_sidebars) ) { 373 $sidebars_widgets = wp_get_sidebars_widgets(); 374 $num_widgets = 0; 375 foreach ( (array) $sidebars_widgets as $k => $v ) { 376 if ( 'wp_inactive_widgets' == $k || 'orphaned_widgets' == substr( $k, 0, 16 ) ) 377 continue; 378 if ( is_array($v) ) 379 $num_widgets = $num_widgets + count($v); 169 if ( current_user_can( 'switch_themes' ) ) 170 $theme_name = sprintf( '<a href="themes.php">%1$s</a>', $theme->display('Name') ); 171 else 172 $theme_name = $theme->display('Name'); 173 ?> 174 <div class="main"> 175 <ul> 176 <?php 177 do_action( 'rightnow_list_start' ); 178 // Using show_in_nav_menus as my arg for grabbing what post types should show, is there better? 179 $post_types = get_post_types( array( 'show_in_nav_menus' => true ), 'objects' ); 180 $post_types = (array) apply_filters( 'rightnow_post_types', $post_types ); 181 foreach ( $post_types as $post_type => $post_type_obj ){ 182 $num_posts = wp_count_posts( $post_type ); 183 if ( $num_posts && $num_posts->publish ) { 184 printf( 185 '<li class="%1$s-count"><a href="edit.php?post_type=%1$s">%2$s %3$s</a></li>', 186 $post_type, 187 number_format_i18n( $num_posts->publish ), 188 $post_type_obj->label 189 ); 380 190 } 381 $num = number_format_i18n( $num_widgets ); 382 383 $switch_themes = $theme->display('Name'); 384 if ( current_user_can( 'switch_themes') ) 385 $switch_themes = '<a href="themes.php">' . $switch_themes . '</a>'; 386 if ( current_user_can( 'edit_theme_options' ) ) { 387 printf(_n('Theme <span class="b">%1$s</span> with <span class="b"><a href="widgets.php">%2$s Widget</a></span>', 'Theme <span class="b">%1$s</span> with <span class="b"><a href="widgets.php">%2$s Widgets</a></span>', $num_widgets), $switch_themes, $num); 388 } else { 389 printf(_n('Theme <span class="b">%1$s</span> with <span class="b">%2$s Widget</span>', 'Theme <span class="b">%1$s</span> with <span class="b">%2$s Widgets</span>', $num_widgets), $switch_themes, $num); 191 } 192 // Comments 193 $num_comm = wp_count_comments(); 194 if ( $num_comm && $num_comm->total_comments ) { 195 $text = _n( 'comment', 'comments', $num_comm->total_comments ); 196 printf( 197 '<li class="comment-count"><a href="edit-comments.php">%1$s %2$s</a></li>', 198 number_format_i18n( $num_comm->total_comments ), 199 $text 200 ); 201 if ( $num_comm->moderated ) { 202 $text = _n( 'in moderation', 'in moderation', $num_comm->total_comments ); 203 printf( 204 '<li class="comment-mod-count"><a href="edit-comments.php?comment_status=moderated">%1$s %2$s</a></li>', 205 number_format_i18n( $num_comm->moderated ), 206 $text 207 ); 390 208 } 391 } else {392 if ( current_user_can( 'switch_themes' ) )393 printf( __('Theme <span class="b"><a href="themes.php">%1$s</a></span>'), $theme->display('Name') );394 else395 printf( __('Theme <span class="b">%1$s</span>'), $theme->display('Name') );396 209 } 397 echo '</p>'; 210 do_action( 'rightnow_list_end' ); 211 ?> 212 </ul> 213 <p><?php printf( __( 'WordPress %1$s running %2$s theme.' ), get_bloginfo( 'version', 'display' ), $theme_name ); ?></p> 214 </div> 398 215 399 // Check if search engines are asked not to index this site. 400 if ( !is_network_admin() && !is_user_admin() && current_user_can('manage_options') && '1' != get_option('blog_public') ) { 401 $title = apply_filters('privacy_on_link_title', __('Your site is asking search engines not to index its content') ); 402 $content = apply_filters('privacy_on_link_text', __('Search Engines Discouraged') ); 403 404 echo "<p><a href='options-reading.php' title='$title'>$content</a></p>"; 405 } 406 407 update_right_now_message(); 408 409 echo "\n\t".'<br class="clear" /></div>'; 216 <?php 217 // activity_box_end has a core action, but only prints content when multisite. 218 // Using an output buffer is the only way to really check if anything's displayed here. 219 ob_start(); 410 220 do_action( 'rightnow_end' ); 411 221 do_action( 'activity_box_end' ); 222 $actions = ob_get_clean(); 223 224 if ( !empty( $actions ) ) : ?> 225 <div class="sub"> 226 <?php echo $actions; ?> 227 </div> 228 <?php endif; 412 229 } 413 230 414 231 function wp_network_dashboard_right_now() { … … 458 275 do_action( 'mu_activity_box_end' ); 459 276 } 460 277 461 function wp_dashboard_quick_press() { 278 /** 279 * The Quick Draft widget display and creation of drafts 280 * 281 * 282 * 283 * @since 3.8.0 284 * 285 */ 286 function wp_dashboard_quick_draft( $error_msg=false ) { 462 287 global $post_ID; 463 288 464 $drafts = false;465 if ( 'post' === strtolower( $_SERVER['REQUEST_METHOD'] ) && isset( $_POST['action'] ) && 0 === strpos( $_POST['action'], 'post-quickpress' ) && (int) $_POST['post_ID'] ) {466 $view = get_permalink( $_POST['post_ID'] );467 $edit = esc_url( get_edit_post_link( $_POST['post_ID'] ) );468 if ( 'post-quickpress-publish' == $_POST['action'] ) {469 if ( current_user_can('publish_posts') )470 printf( '<div class="updated"><p>' . __( 'Post published. <a href="%s">View post</a> | <a href="%s">Edit post</a>' ) . '</p></div>', esc_url( $view ), $edit );471 else472 printf( '<div class="updated"><p>' . __( 'Post submitted. <a href="%s">Preview post</a> | <a href="%s">Edit post</a>' ) . '</p></div>', esc_url( add_query_arg( 'preview', 1, $view ) ), $edit );473 } else {474 printf( '<div class="updated"><p>' . __( 'Draft saved. <a href="%s">Preview post</a> | <a href="%s">Edit post</a>' ) . '</p></div>', esc_url( add_query_arg( 'preview', 1, $view ) ), $edit );475 $drafts_query = new WP_Query( array(476 'post_type' => 'post',477 'post_status' => 'draft',478 'author' => $GLOBALS['current_user']->ID,479 'posts_per_page' => 1,480 'orderby' => 'modified',481 'order' => 'DESC'482 ) );483 484 if ( $drafts_query->posts )485 $drafts =& $drafts_query->posts;486 }487 printf('<p class="easy-blogging">' . __('You can also try %s, easy blogging from anywhere on the Web.') . '</p>', '<a href="' . esc_url( admin_url( 'tools.php' ) ) . '">' . __('Press This') . '</a>' );488 $_REQUEST = array(); // hack for get_default_post_to_edit()489 }490 491 289 /* Check if a new auto-draft (= no new post_ID) is needed or if the old can be used */ 492 290 $last_post_id = (int) get_user_option( 'dashboard_quick_press_last_post_id' ); // Get the last post_ID 493 291 if ( $last_post_id ) { 494 292 $post = get_post( $last_post_id ); 495 293 if ( empty( $post ) || $post->post_status != 'auto-draft' ) { // auto-draft doesn't exists anymore 496 $post = get_default_post_to_edit( 'post', true);294 $post = get_default_post_to_edit( 'post', true ); 497 295 update_user_option( get_current_user_id(), 'dashboard_quick_press_last_post_id', (int) $post->ID ); // Save post_ID 498 296 } else { 499 297 $post->post_title = ''; // Remove the auto draft title … … 507 305 } 508 306 509 307 $post_ID = (int) $post->ID; 510 511 $media_settings = array( 512 'id' => $post->ID, 513 'nonce' => wp_create_nonce( 'update-post_' . $post->ID ), 514 ); 515 516 if ( current_theme_supports( 'post-thumbnails', $post->post_type ) && post_type_supports( $post->post_type, 'thumbnail' ) ) { 517 $featured_image_id = get_post_meta( $post->ID, '_thumbnail_id', true ); 518 $media_settings['featuredImageId'] = $featured_image_id ? $featured_image_id : -1; 519 } 308 309 do_action( 'dashboard_quickdraft_beginning', $post ); 520 310 ?> 521 311 522 <form name="post" action="<?php echo esc_url( admin_url( 'post.php' ) ); ?>" method="post" id="quick-press"> 312 <form name="post" action="<?php echo esc_url( admin_url( 'post.php' ) ); ?>" method="post" id="quick-press" class="initial-form"> 313 314 <?php if ($error_msg) : ?> 315 <div class="error"><?php _e( $error_msg ); ?></div> 316 <?php endif; ?> 317 523 318 <div class="input-text-wrap" id="title-wrap"> 524 <label class="screen-reader-text prompt" for="title" id="title-prompt-text"><?php _e( 'Enter title here'); ?></label>525 <input type="text" name="post_title" id="title" autocomplete="off" value="<?php echo esc_attr( $post->post_title ); ?>"/>319 <label class="screen-reader-text prompt" for="title" id="title-prompt-text"><?php _e( "What's on your mind?" ); ?></label> 320 <input type="text" name="post_title" id="title" autocomplete="off" /> 526 321 </div> 527 322 528 < ?php if ( current_user_can( 'upload_files' ) ) : ?>529 <div id="wp-content-wrap" class="wp-editor-wrap hide-if-no-js wp-media-buttons">530 < ?php do_action( 'media_buttons', 'content' ); ?>323 <div class="textarea-wrap" id="description-wrap"> 324 <label class="screen-reader-text prompt" for="content" id="content-prompt-text"><?php _e( 'Enter a description' ); ?></label> 325 <textarea name="content" id="content" class="mceEditor" rows="3" cols="15"></textarea> 531 326 </div> 532 <?php endif; ?>533 327 534 <div class="textarea-wrap">535 <label class="screen-reader-text" for="content"><?php _e( 'Content' ); ?></label>536 <textarea name="content" id="content" class="mceEditor" rows="3" cols="15"><?php echo esc_textarea( $post->post_content ); ?></textarea>537 </div>538 539 <script type="text/javascript">540 edCanvas = document.getElementById('content');541 edInsertContent = null;542 <?php if ( $_POST ) : ?>543 wp.media.editor.remove('content');544 wp.media.view.settings.post = <?php echo json_encode( $media_settings ); // big juicy hack. ?>;545 wp.media.editor.add('content');546 <?php endif; ?>547 </script>548 549 <div class="input-text-wrap" id="tags-input-wrap">550 <label class="screen-reader-text prompt" for="tags-input" id="tags-input-prompt-text"><?php _e( 'Tags (separate with commas)' ); ?></label>551 <input type="text" name="tags_input" id="tags-input" value="<?php echo get_tags_to_edit( $post->ID ); ?>" />552 </div>553 554 328 <p class="submit"> 555 <span id="publishing-action"> 556 <input type="submit" name="publish" id="publish" accesskey="p" class="button-primary" value="<?php current_user_can('publish_posts') ? esc_attr_e('Publish') : esc_attr_e('Submit for Review'); ?>" /> 557 <span class="spinner"></span> 558 </span> 559 <input type="hidden" name="action" id="quickpost-action" value="post-quickpress-save" /> 329 <input type="hidden" name="action" id="quickpost-action" value="post-quickdraft-save" /> 560 330 <input type="hidden" name="post_ID" value="<?php echo $post_ID; ?>" /> 561 331 <input type="hidden" name="post_type" value="post" /> 562 <?php wp_nonce_field('add-post'); ?> 563 <?php submit_button( __( 'Save Draft' ), 'button', 'save', false, array( 'id' => 'save-post' ) ); ?> 564 <input type="reset" value="<?php esc_attr_e( 'Reset' ); ?>" class="button" /> 332 <?php wp_nonce_field( 'add-post' ); ?> 333 <?php submit_button( __( 'Save Draft' ), 'primary', 'save', false, array( 'id' => 'save-post' ) ); ?> 565 334 <br class="clear" /> 566 335 </p> 567 336 568 337 </form> 569 338 570 339 <?php 571 if ( $drafts ) 572 wp_dashboard_recent_drafts( $drafts ); 340 wp_dashboard_recent_quickdrafts(); 341 342 do_action( 'dashboard_quickdraft_end' ); 573 343 } 574 344 575 function wp_dashboard_recent_drafts( $drafts = false ) { 576 if ( !$drafts ) { 577 $drafts_query = new WP_Query( array( 578 'post_type' => 'post', 579 'post_status' => 'draft', 580 'author' => $GLOBALS['current_user']->ID, 581 'posts_per_page' => 5, 582 'orderby' => 'modified', 583 'order' => 'DESC' 584 ) ); 585 $drafts =& $drafts_query->posts; 586 } 345 /** 346 * Show `Recent Drafts` below Quick Draft form 347 * 348 * 349 * 350 * @since 3.8.0 351 * 352 */ 353 function wp_dashboard_recent_quickdrafts() { 587 354 355 $query_args = array( 356 'post_type' => 'post', 357 'post_status' => 'draft', 358 'author' => $GLOBALS['current_user']->ID, 359 'posts_per_page' => 4, 360 'orderby' => 'modified', 361 'order' => 'DESC' 362 ); 363 $query_args = apply_filters( 'dash_recent_quickdrafts_query_args', $query_args ); 364 $drafts_query = new WP_Query( $query_args ); 365 $drafts =& $drafts_query->posts; 366 367 588 368 if ( $drafts && is_array( $drafts ) ) { 589 369 $list = array(); 370 $draft_count = 0; 590 371 foreach ( $drafts as $draft ) { 372 if ( 3 == $draft_count ) 373 break; 374 375 $draft_count++; 376 591 377 $url = get_edit_post_link( $draft->ID ); 592 378 $title = _draft_or_post_title( $draft->ID ); 593 $item = "<h4><a href='$url' title='" . sprintf( __( 'Edit “%s”' ), esc_attr( $title ) ) . "'>" . esc_html($title) . "</a> <abbr title='" . get_the_time(__('Y/m/d g:i:s A'), $draft) . "'>" . get_the_time( get_option( 'date_format' ), $draft ) . '</abbr></h4>';379 $item = '<div class="draft-title"><a href="' . $url . '" title="' . sprintf( __( 'Edit “%s”' ), esc_attr( $title ) ) . '">' . esc_html( $title ) . '</a> <time datetime="' . get_the_time( 'c', $draft) . '">' . get_the_time( get_option( 'date_format' ), $draft ) . '</time></div>'; 594 380 if ( $the_content = wp_trim_words( $draft->post_content, 10 ) ) 595 381 $item .= '<p>' . $the_content . '</p>'; 596 382 $list[] = $item; 597 383 } 384 385 do_action( 'dashboard_quickdraft_drafts_list', $drafts ); 598 386 ?> 599 <ul> 600 <li><?php echo join( "</li>\n<li>", $list ); ?></li> 601 </ul> 602 <p class="textright"><a href="edit.php?post_status=draft" ><?php _e('View all'); ?></a></p> 603 <?php 604 } else { 605 _e('There are no drafts at the moment'); 606 } 387 <div class="drafts"> 388 <?php if ( 3 < count($drafts) ) { ?> 389 <p class="view-all"><a href="edit.php?post_status=draft" ><?php _e( 'View all' ); ?></a></p> 390 <?php } ?> 391 <h4><?php _e('Drafts'); ?></h4> 392 <ul id="draft-list"> 393 <li><?php echo join( "</li>\n<li>", $list ); ?></li> 394 </ul> 395 </div> 396 <?php } 607 397 } 608 398 609 /**610 * Display recent comments dashboard widget content.611 *612 * @since 2.5.0613 */614 function wp_dashboard_recent_comments() {615 global $wpdb;616 617 // Select all comment types and filter out spam later for better query performance.618 $comments = array();619 $start = 0;620 621 $widgets = get_option( 'dashboard_widget_options' );622 $total_items = isset( $widgets['dashboard_recent_comments'] ) && isset( $widgets['dashboard_recent_comments']['items'] )623 ? absint( $widgets['dashboard_recent_comments']['items'] ) : 5;624 625 $comments_query = array( 'number' => $total_items * 5, 'offset' => 0 );626 if ( ! current_user_can( 'edit_posts' ) )627 $comments_query['status'] = 'approve';628 629 while ( count( $comments ) < $total_items && $possible = get_comments( $comments_query ) ) {630 foreach ( $possible as $comment ) {631 if ( ! current_user_can( 'read_post', $comment->comment_post_ID ) )632 continue;633 $comments[] = $comment;634 if ( count( $comments ) == $total_items )635 break 2;636 }637 $comments_query['offset'] += $comments_query['number'];638 $comments_query['number'] = $total_items * 10;639 }640 641 if ( $comments ) {642 echo '<div id="the-comment-list" data-wp-lists="list:comment">';643 foreach ( $comments as $comment )644 _wp_dashboard_recent_comments_row( $comment );645 echo '</div>';646 647 if ( current_user_can('edit_posts') )648 _get_list_table('WP_Comments_List_Table')->views();649 650 wp_comment_reply( -1, false, 'dashboard', false );651 wp_comment_trashnotice();652 } else {653 echo '<p>' . __( 'No comments yet.' ) . '</p>';654 }655 }656 657 399 function _wp_dashboard_recent_comments_row( &$comment, $show_date = true ) { 658 400 $GLOBALS['comment'] =& $comment; 659 401 … … 748 490 } 749 491 750 492 /** 751 * The recent comments dashboard widget control.493 * callback function for `Activity` widget 752 494 * 753 * @since 3.0.0 495 * 496 * 497 * @since 3.8.0 498 * 754 499 */ 755 function wp_dashboard_recent_comments_control() { 756 if ( !$widget_options = get_option( 'dashboard_widget_options' ) ) 757 $widget_options = array(); 500 function wp_dashboard_activity() { 758 501 759 if ( !isset($widget_options['dashboard_recent_comments']) ) 760 $widget_options['dashboard_recent_comments'] = array(); 502 echo '<div id="activity-widget">'; 761 503 762 if ( 'POST' == $_SERVER['REQUEST_METHOD'] && isset($_POST['widget-recent-comments']) ) { 763 $number = absint( $_POST['widget-recent-comments']['items'] ); 764 $widget_options['dashboard_recent_comments']['items'] = $number; 765 update_option( 'dashboard_widget_options', $widget_options ); 504 do_action( 'dashboard_activity_beginning' ); 505 506 $future_posts = dashboard_show_published_posts( array( 507 'display' => 2, 508 'max' => 5, 509 'status' => 'future', 510 'order' => 'ASC', 511 'title' => __( 'Publishing Soon' ), 512 'id' => 'future-posts', 513 ) ); 514 $recent_posts = dashboard_show_published_posts( array( 515 'display' => 2, 516 'max' => 5, 517 'status' => 'publish', 518 'order' => 'DESC', 519 'title' => __( 'Recently Published' ), 520 'id' => 'published-posts', 521 ) ); 522 523 do_action( 'dashboard_activity_middle' ); 524 525 $recent_comments = dashboard_comments(); 526 527 if ( !$future_posts && !$recent_posts && !$recent_comments ) { 528 echo '<div class="no-activity">'; 529 echo '<p class="smiley"></p>'; 530 echo '<p>' . __( 'No activity yet!' ) . '</p>'; 531 echo '</div>'; 766 532 } 533 534 do_action( 'dashboard_activity_end' ); 767 535 768 $number = isset( $widget_options['dashboard_recent_comments']['items'] ) ? (int) $widget_options['dashboard_recent_comments']['items'] : ''; 769 770 echo '<p><label for="comments-number">' . __('Number of comments to show:') . '</label>'; 771 echo '<input id="comments-number" name="widget-recent-comments[items]" type="text" value="' . $number . '" size="3" /></p>'; 536 echo '</div>'; 772 537 } 773 538 774 function wp_dashboard_incoming_links() {775 wp_dashboard_cached_rss_widget( 'dashboard_incoming_links', 'wp_dashboard_incoming_links_output' );776 }777 778 539 /** 779 * Display incoming links dashboard widget content.540 * Generates `Publishing Soon` and `Recently Published` sections 780 541 * 781 * @since 2.5.0 542 * 543 * 544 * @since 3.8.0 545 * 782 546 */ 783 function wp_dashboard_incoming_links_output() { 784 $widgets = get_option( 'dashboard_widget_options' ); 785 @extract( @$widgets['dashboard_incoming_links'], EXTR_SKIP ); 786 $rss = fetch_feed( $url ); 547 function dashboard_show_published_posts( $args ) { 787 548 788 if ( is_wp_error($rss) ) { 789 if ( is_admin() || current_user_can('manage_options') ) { 790 echo '<p>'; 791 printf(__('<strong>RSS Error</strong>: %s'), $rss->get_error_message()); 792 echo '</p>'; 793 } 794 return; 795 } 549 $query_args = array( 550 'post_type' => 'post', 551 'post_status' => $args['status'], 552 'orderby' => 'date', 553 'order' => $args['order'], 554 'posts_per_page' => intval( $args['max'] ), 555 'no_found_rows' => true, 556 'cache_results' => false 557 ); 558 $query_args = apply_filters( 'dash_show_published_posts_query_args', $query_args ); 559 $posts = new WP_Query( $query_args ); 796 560 797 if ( !$rss->get_item_quantity() ) { 798 echo '<p>' . __('This dashboard widget queries <a href="http://blogsearch.google.com/">Google Blog Search</a> so that when another blog links to your site it will show up here. It has found no incoming links… yet. It’s okay — there is no rush.') . "</p>\n"; 799 $rss->__destruct(); 800 unset($rss); 801 return; 802 } 561 if ( $posts->have_posts() ) { 803 562 804 echo "<ul>\n";563 echo '<div id="' . $args['id'] . '" class="activity-block">'; 805 564 806 if ( !isset($items) ) 807 $items = 10; 808 809 foreach ( $rss->get_items(0, $items) as $item ) { 810 $publisher = ''; 811 $site_link = ''; 812 $link = ''; 813 $content = ''; 814 $date = ''; 815 $link = esc_url( strip_tags( $item->get_link() ) ); 816 817 $author = $item->get_author(); 818 if ( $author ) { 819 $site_link = esc_url( strip_tags( $author->get_link() ) ); 820 821 if ( !$publisher = esc_html( strip_tags( $author->get_name() ) ) ) 822 $publisher = __( 'Somebody' ); 823 } else { 824 $publisher = __( 'Somebody' ); 565 if ( $posts->post_count > $args['display'] ) { 566 echo '<small class="show-more"><a href="#">' . sprintf( __( 'See %s more…'), $posts->post_count - intval( $args['display'] ) ) . '</a></small>'; 825 567 } 826 if ( $site_link )827 $publisher = "<a href='$site_link'>$publisher</a>";828 else829 $publisher = "<strong>$publisher</strong>";830 568 831 $content = $item->get_content(); 832 $content = wp_html_excerpt( $content, 50, ' …' ); 569 echo '<h4>' . $args['title'] . '</h4>'; 833 570 834 if ( $link ) 835 /* translators: incoming links feed, %1$s is other person, %3$s is content */ 836 $text = __( '%1$s linked here <a href="%2$s">saying</a>, "%3$s"' ); 837 else 838 /* translators: incoming links feed, %1$s is other person, %3$s is content */ 839 $text = __( '%1$s linked here saying, "%3$s"' ); 571 echo '<ul>'; 840 572 841 if ( !empty( $show_date ) ) { 842 if ( $link ) 843 /* translators: incoming links feed, %1$s is other person, %3$s is content, %4$s is the date */ 844 $text = __( '%1$s linked here <a href="%2$s">saying</a>, "%3$s" on %4$s' ); 845 else 846 /* translators: incoming links feed, %1$s is other person, %3$s is content, %4$s is the date */ 847 $text = __( '%1$s linked here saying, "%3$s" on %4$s' ); 848 $date = esc_html( strip_tags( $item->get_date() ) ); 849 $date = strtotime( $date ); 850 $date = gmdate( get_option( 'date_format' ), $date ); 573 $i = 0; 574 while ( $posts->have_posts() ) { 575 $posts->the_post(); 576 printf( 577 '<li%s><span>%s, %s</span> <a href="%s">%s</a></li>', 578 ( $i >= intval ( $args['display'] ) ? ' class="hidden"' : '' ), 579 dashboard_relative_date( get_the_time( 'U' ) ), 580 get_the_time(), 581 get_edit_post_link(), 582 get_the_title() 583 ); 584 $i++; 851 585 } 852 586 853 echo "\t<li>" . sprintf( $text, $publisher, $link, $content, $date ) . "</li>\n"; 587 echo '</ul>'; 588 echo '</div>'; 589 590 } else { 591 return false; 854 592 } 855 593 856 echo "</ul>\n"; 857 $rss->__destruct(); 858 unset($rss); 859 } 594 wp_reset_postdata(); 860 595 861 function wp_dashboard_incoming_links_control() { 862 wp_dashboard_rss_control( 'dashboard_incoming_links', array( 'title' => false, 'show_summary' => false, 'show_author' => false ) ); 596 return true; 863 597 } 864 598 865 function wp_dashboard_primary() {866 wp_dashboard_cached_rss_widget( 'dashboard_primary', 'wp_dashboard_rss_output' );867 }868 869 function wp_dashboard_primary_control() {870 wp_dashboard_rss_control( 'dashboard_primary' );871 }872 873 599 /** 874 * Display primary dashboard RSS widget feed.600 * Show `Comments` section 875 601 * 876 * @since 2.5.0877 602 * 878 * @param string $widget_id879 */880 function wp_dashboard_rss_output( $widget_id ) {881 $widgets = get_option( 'dashboard_widget_options' );882 echo '<div class="rss-widget">';883 wp_widget_rss_output( $widgets[$widget_id] );884 echo "</div>";885 }886 887 function wp_dashboard_secondary() {888 wp_dashboard_cached_rss_widget( 'dashboard_secondary', 'wp_dashboard_secondary_output' );889 }890 891 function wp_dashboard_secondary_control() {892 wp_dashboard_rss_control( 'dashboard_secondary' );893 }894 895 /**896 * Display secondary dashboard RSS widget feed.897 603 * 898 * @since 2.5.0604 * @since 3.8.0 899 605 * 900 * @return unknown901 606 */ 902 function wp_dashboard_secondary_output() { 903 $widgets = get_option( 'dashboard_widget_options' ); 904 @extract( @$widgets['dashboard_secondary'], EXTR_SKIP ); 905 $rss = @fetch_feed( $url ); 607 function dashboard_comments( $total_items = 5 ) { 608 global $wpdb; 906 609 907 if ( is_wp_error($rss) ) { 908 if ( is_admin() || current_user_can('manage_options') ) { 909 echo '<div class="rss-widget"><p>'; 910 printf(__('<strong>RSS Error</strong>: %s'), $rss->get_error_message()); 911 echo '</p></div>'; 610 // Select all comment types and filter out spam later for better query performance. 611 $comments = array(); 612 $start = 0; 613 614 $comments_query = array( 615 'number' => $total_items * 5, 616 'offset' => 0 617 ); 618 if ( ! current_user_can( 'edit_posts' ) ) 619 $comments_query['status'] = 'approve'; 620 621 while ( count( $comments ) < $total_items && $possible = get_comments( $comments_query ) ) { 622 foreach ( $possible as $comment ) { 623 if ( ! current_user_can( 'read_post', $comment->comment_post_ID ) ) 624 continue; 625 $comments[] = $comment; 626 if ( count( $comments ) == $total_items ) 627 break 2; 912 628 } 913 } elseif ( !$rss->get_item_quantity() ) { 914 $rss->__destruct(); 915 unset($rss); 916 return false; 917 } else { 918 echo '<div class="rss-widget">'; 919 wp_widget_rss_output( $rss, $widgets['dashboard_secondary'] ); 629 $comments_query['offset'] += $comments_query['number']; 630 $comments_query['number'] = $total_items * 10; 631 } 632 633 634 635 if ( $comments ) { 636 echo '<div id="latest-comments" class="activity-block">'; 637 echo '<h4>' . __( 'Comments' ) . '</h4>'; 638 639 echo '<div id="the-comment-list" data-wp-lists="list:comment">'; 640 foreach ( $comments as $comment ) 641 _wp_dashboard_recent_comments_row( $comment ); 920 642 echo '</div>'; 921 $rss->__destruct(); 922 unset($rss); 643 644 if ( current_user_can('edit_posts') ) 645 _get_list_table('WP_Comments_List_Table')->views(); 646 647 wp_comment_reply( -1, false, 'dashboard', false ); 648 wp_comment_trashnotice(); 649 650 echo '</div>'; 651 } else { 652 return false; 923 653 } 654 return true; 924 655 } 925 656 926 function wp_dashboard_plugins() {927 wp_dashboard_cached_rss_widget( 'dashboard_plugins', 'wp_dashboard_plugins_output', array(928 'http://wordpress.org/plugins/rss/browse/popular/',929 'http://wordpress.org/plugins/rss/browse/new/'930 ) );931 }932 933 657 /** 934 * Display plugins most popular, newest plugins, and recently updated widget text.658 * return relative date for given timestamp 935 659 * 936 * @since 2.5.0 660 * 661 * 662 * @since 3.8.0 663 * 937 664 */ 938 function wp_dashboard_plugins_output() { 939 $popular = fetch_feed( 'http://wordpress.org/plugins/rss/browse/popular/' ); 940 $new = fetch_feed( 'http://wordpress.org/plugins/rss/browse/new/' ); 665 function dashboard_relative_date( $time ) { 941 666 942 if ( false === $plugin_slugs = get_transient( 'plugin_slugs' ) ) { 943 $plugin_slugs = array_keys( get_plugins() ); 944 set_transient( 'plugin_slugs', $plugin_slugs, DAY_IN_SECONDS ); 945 } 667 $diff = floor( ( $time - time() ) / DAY_IN_SECONDS ); 946 668 947 foreach ( array( 'popular' => __('Most Popular'), 'new' => __('Newest Plugins') ) as $feed => $label ) { 948 if ( is_wp_error($$feed) || !$$feed->get_item_quantity() ) 949 continue; 669 if ( $diff == 0 ) 670 return __( 'Today' ); 950 671 951 $items = $$feed->get_items(0, 5); 672 if ( $diff == 1 ) 673 return __( 'Tomorrow' ); 952 674 953 // Pick a random, non-installed plugin 954 while ( true ) { 955 // Abort this foreach loop iteration if there's no plugins left of this type 956 if ( 0 == count($items) ) 957 continue 2; 675 return date( 'M jS', $time); 958 676 959 $item_key = array_rand($items);960 $item = $items[$item_key];961 962 list($link, $frag) = explode( '#', $item->get_link() );963 964 $link = esc_url($link);965 if ( preg_match( '|/([^/]+?)/?$|', $link, $matches ) )966 $slug = $matches[1];967 else {968 unset( $items[$item_key] );969 continue;970 }971 972 // Is this random plugin's slug already installed? If so, try again.973 reset( $plugin_slugs );974 foreach ( $plugin_slugs as $plugin_slug ) {975 if ( $slug == substr( $plugin_slug, 0, strlen( $slug ) ) ) {976 unset( $items[$item_key] );977 continue 2;978 }979 }980 981 // If we get to this point, then the random plugin isn't installed and we can stop the while().982 break;983 }984 985 // Eliminate some common badly formed plugin descriptions986 while ( ( null !== $item_key = array_rand($items) ) && false !== strpos( $items[$item_key]->get_description(), 'Plugin Name:' ) )987 unset($items[$item_key]);988 989 if ( !isset($items[$item_key]) )990 continue;991 992 $title = esc_html( $item->get_title() );993 994 $description = esc_html( strip_tags(@html_entity_decode($item->get_description(), ENT_QUOTES, get_option('blog_charset'))) );995 996 $ilink = wp_nonce_url('plugin-install.php?tab=plugin-information&plugin=' . $slug, 'install-plugin_' . $slug) .997 '&TB_iframe=true&width=600&height=800';998 999 echo "<h4>$label</h4>\n";1000 echo "<h5><a href='$link'>$title</a></h5> <span>(<a href='$ilink' class='thickbox' title='$title'>" . __( 'Install' ) . "</a>)</span>\n";1001 echo "<p>$description</p>\n";1002 1003 $$feed->__destruct();1004 unset($$feed);1005 }1006 677 } 1007 678 1008 679 /** … … 1074 745 } 1075 746 1076 747 /** 1077 * The RSS dashboard widget control.748 * Returns default WordPress News feeds 1078 749 * 1079 * Sets up $args to be used as input to wp_widget_rss_form(). Handles POST data1080 * from RSS-type widgets.1081 750 * 1082 * @since 2.5.01083 751 * 1084 * @ param string $widget_id1085 * @param array $form_inputs752 * @since 3.8.0 753 * 1086 754 */ 1087 function wp_dashboard_rss_control( $widget_id, $form_inputs = array() ) { 1088 if ( !$widget_options = get_option( 'dashboard_widget_options' ) ) 755 function wp_dashboard_default_feeds() { 756 return array( 757 'news' => array( 758 'link' => apply_filters( 'dashboard_primary_link', __( 'http://wordpress.org/news/' ) ), 759 'url' => apply_filters( 'dashboard_primary_feed', __( 'http://wordpress.org/news/feed/' ) ), 760 'title' => '', 761 'items' => 1, 762 'show_summary' => 1, 763 'show_author' => 0, 764 'show_date' => 1, 765 ), 766 'planet' => array( 767 'link' => apply_filters( 'dashboard_secondary_link', __( 'http://planet.wordpress.org/' ) ), 768 'url' => apply_filters( 'dashboard_secondary_feed', __( 'http://planet.wordpress.org/feed/' ) ), 769 'title' => '', 770 'items' => 3, 771 'show_summary' => 0, 772 'show_author' => 0, 773 'show_date' => 0, 774 ), 775 'plugins' => array( 776 'link' => '', 777 'url' => array( 778 'popular' => 'http://wordpress.org/plugins/rss/browse/popular/' 779 ), 780 'title' => '', 781 'items' => 1, 782 'show_summary' => 0, 783 'show_author' => 0, 784 'show_date' => 0, 785 ) 786 ); 787 } 788 789 /** 790 * Check for cached feeds 791 * 792 * 793 * 794 * @since 3.8.0 795 * 796 */ 797 function wp_dashboard_rss() { 798 $default_feeds = wp_dashboard_default_feeds(); 799 800 $widget_options = get_option( 'dashboard_widget_options' ); 801 802 if ( !$widget_options || !is_array($widget_options) ) 1089 803 $widget_options = array(); 1090 804 1091 if ( !isset($widget_options[$widget_id]) ) 1092 $widget_options[$widget_id] = array(); 805 //if ( ! isset( $widget_options['dashboard_rss'] ) ) { 806 $widget_options['dashboard_rss'] = $default_feeds; 807 update_option( 'dashboard_widget_options', $widget_options ); 808 //} 1093 809 1094 $number = 1; // Hack to use wp_widget_rss_form() 1095 $widget_options[$widget_id]['number'] = $number; 810 foreach( $default_feeds as $key => $value ) { 811 $default_urls[] = $value['url']; 812 } 813 814 $cache_key = 'dash_' . md5( 'dashboard_rss' ); 815 delete_transient( $cache_key ); 816 817 do_action( 'dashboard_news_beginning' ); 1096 818 1097 if ( 'POST' == $_SERVER['REQUEST_METHOD'] && isset($_POST['widget-rss'][$number]) ) { 1098 $_POST['widget-rss'][$number] = wp_unslash( $_POST['widget-rss'][$number] ); 1099 $widget_options[$widget_id] = wp_widget_rss_process( $_POST['widget-rss'][$number] ); 1100 $widget_options[$widget_id]['number'] = $number; 1101 // title is optional. If black, fill it if possible 1102 if ( !$widget_options[$widget_id]['title'] && isset($_POST['widget-rss'][$number]['title']) ) { 1103 $rss = fetch_feed($widget_options[$widget_id]['url']); 1104 if ( is_wp_error($rss) ) { 1105 $widget_options[$widget_id]['title'] = htmlentities(__('Unknown Feed')); 1106 } else { 1107 $widget_options[$widget_id]['title'] = htmlentities(strip_tags($rss->get_title())); 1108 $rss->__destruct(); 1109 unset($rss); 819 wp_dashboard_cached_rss_widget( 'dashboard_rss', 'wp_dashboard_news_output', $default_urls ); 820 821 do_action( 'dashboard_news_end' ); 822 } 823 824 /** 825 * Display news feeds 826 * 827 * 828 * 829 * @since 3.8.0 830 * 831 */ 832 function wp_dashboard_news_output() { 833 $widgets = get_option( 'dashboard_widget_options' ); 834 835 foreach( $widgets['dashboard_rss'] as $type => $args ) { 836 $args['type'] = $type; 837 echo '<div class="rss-widget">'; 838 wp_widget_news_output( $args['url'], $args ); 839 echo "</div>"; 840 } 841 } 842 843 /** 844 * Generate code for each news feed 845 * 846 * 847 * 848 * @since 3.8.0 849 * 850 */ 851 function wp_widget_news_output( $rss, $args = array() ) { 852 853 // Regular RSS feeds 854 if ( isset( $args['type'] ) && 'plugins' != $args['type'] ) 855 return wp_widget_rss_output( $rss, $args ); 856 857 // Plugin feeds plus link to install them 858 if ( ! is_multisite() && current_user_can( 'install_plugins' ) ) { 859 $popular = fetch_feed( $args['url']['popular'] ); 860 861 if ( false === $plugin_slugs = get_transient( 'plugin_slugs' ) ) { 862 $plugin_slugs = array_keys( get_plugins() ); 863 set_transient( 'plugin_slugs', $plugin_slugs, DAY_IN_SECONDS ); 864 } 865 866 echo '<ul>'; 867 868 foreach ( array( 869 'popular' => __( 'Popular Plugin' ) 870 ) as $feed => $label ) { 871 if ( is_wp_error($$feed) || !$$feed->get_item_quantity() ) 872 continue; 873 874 $items = $$feed->get_items(0, 5); 875 876 // Pick a random, non-installed plugin 877 while ( true ) { 878 // Abort this foreach loop iteration if there's no plugins left of this type 879 if ( 0 == count($items) ) 880 continue 2; 881 882 $item_key = array_rand($items); 883 $item = $items[$item_key]; 884 885 list($link, $frag) = explode( '#', $item->get_link() ); 886 887 $link = esc_url($link); 888 if ( preg_match( '|/([^/]+?)/?$|', $link, $matches ) ) 889 $slug = $matches[1]; 890 else { 891 unset( $items[$item_key] ); 892 continue; 893 } 894 895 // Is this random plugin's slug already installed? If so, try again. 896 reset( $plugin_slugs ); 897 foreach ( $plugin_slugs as $plugin_slug ) { 898 if ( $slug == substr( $plugin_slug, 0, strlen( $slug ) ) ) { 899 unset( $items[$item_key] ); 900 continue 2; 901 } 902 } 903 904 // If we get to this point, then the random plugin isn't installed and we can stop the while(). 905 break; 1110 906 } 907 908 // Eliminate some common badly formed plugin descriptions 909 while ( ( null !== $item_key = array_rand($items) ) && false !== strpos( $items[$item_key]->get_description(), 'Plugin Name:' ) ) 910 unset($items[$item_key]); 911 912 if ( !isset($items[$item_key]) ) 913 continue; 914 915 $title = esc_html( $item->get_title() ); 916 917 $description = esc_html( strip_tags( @html_entity_decode( $item->get_description(), ENT_QUOTES, get_option( 'blog_charset' ) ) ) ); 918 919 $ilink = wp_nonce_url('plugin-install.php?tab=plugin-information&plugin=' . $slug, 'install-plugin_' . $slug) . '&TB_iframe=true&width=600&height=800'; 920 921 echo "<li class='dashboard-news-plugin'><span>$label:</span> <a href='$link' class='dashboard-news-plugin-link'>$title</a></h5> <span>(<a href='$ilink' class='thickbox' title='$title'>" . __( 'Install' ) . "</a>)</span></li>"; 922 923 $$feed->__destruct(); 924 unset( $$feed ); 1111 925 } 1112 update_option( 'dashboard_widget_options', $widget_options ); 1113 $cache_key = 'dash_' . md5( $widget_id ); 1114 delete_transient( $cache_key ); 926 927 echo '</ul>'; 1115 928 } 1116 1117 wp_widget_rss_form( $widget_options[$widget_id], $form_inputs );1118 929 } 1119 930 1120 931 /** … … 1127 938 * @return bool True if not multisite, user can't upload files, or the space check option is disabled. 1128 939 */ 1129 940 function wp_dashboard_quota() { 1130 if ( !is_multisite() || !current_user_can( 'upload_files') || get_site_option( 'upload_space_check_disabled' ) )941 if ( !is_multisite() || !current_user_can( 'upload_files' ) || get_site_option( 'upload_space_check_disabled' ) ) 1131 942 return true; 1132 943 1133 944 $quota = get_space_allowed(); … … 1137 948 $percentused = '100'; 1138 949 else 1139 950 $percentused = ( $used / $quota ) * 100; 1140 $used_c olor = ( $percentused >= 70 ) ? ' spam' : '';951 $used_class = ( $percentused >= 70 ) ? ' warning' : ''; 1141 952 $used = round( $used, 2 ); 1142 953 $percentused = number_format( $percentused ); 1143 954 1144 955 ?> 1145 <p class="sub musub"><?php _e( 'Storage Space' ); ?></p> 1146 <div class="table table_content musubtable"> 1147 <table> 1148 <tr class="first"> 1149 <td class="first b b-posts"><?php printf( __( '<a href="%1$s" title="Manage Uploads" class="musublink">%2$sMB</a>' ), esc_url( admin_url( 'upload.php' ) ), number_format_i18n( $quota ) ); ?></td> 1150 <td class="t posts"><?php _e( 'Space Allowed' ); ?></td> 1151 </tr> 1152 </table> 956 <h4 class="mu-storage"><?php _e( 'Storage Space' ); ?></h4> 957 <div class="mu-storage"> 958 <ul> 959 <li class="storage-count"> 960 <?php printf( 961 '<a href="%1$s" title="%3$s">%2$sMB %4$s</a>', 962 esc_url( admin_url( 'upload.php' ) ), 963 number_format_i18n( $quota ), 964 __( 'Manage Uploads' ), 965 __( 'Space Allowed' ) 966 ); ?> 967 </li><li class="storage-count <?php echo $used_class; ?>"> 968 <?php printf( 969 '<a href="%1$s" title="%4$s" class="musublink">%2$sMB (%3$s%%) %5$s</a>', 970 esc_url( admin_url( 'upload.php' ) ), 971 number_format_i18n( $used, 2 ), 972 $percentused, 973 __( 'Manage Uploads' ), 974 __( 'Space Used' ) 975 ); ?> 976 </li> 977 </ul> 1153 978 </div> 1154 <div class="table table_discussion musubtable">1155 <table>1156 <tr class="first">1157 <td class="b b-comments"><?php printf( __( '<a href="%1$s" title="Manage Uploads" class="musublink">%2$sMB (%3$s%%)</a>' ), esc_url( admin_url( 'upload.php' ) ), number_format_i18n( $used, 2 ), $percentused ); ?></td>1158 <td class="last t comments<?php echo $used_color;?>"><?php _e( 'Space Used' );?></td>1159 </tr>1160 </table>1161 </div>1162 <br class="clear" />1163 979 <?php 1164 980 } 1165 981 add_action( 'activity_box_end', 'wp_dashboard_quota' ); -
wp-admin/includes/deprecated.php
730 730 */ 731 731 function wp_dashboard_quick_press_output() { 732 732 _deprecated_function( __FUNCTION__, '3.2', 'wp_dashboard_quick_press()' ); 733 wp_dashboard_quick_ press();733 wp_dashboard_quick_draft(); 734 734 } 735 735 736 736 /** -
wp-admin/post.php
66 66 $location = add_query_arg( 'message', 3, wp_get_referer() ); 67 67 $location = explode('#', $location); 68 68 $location = $location[0] . '#postcustom'; 69 } elseif ( 'post-quickpress-save-cont' == $_POST['action'] ) {70 $location = "post.php?action=edit&post=$post_id&message=7";71 69 } else { 72 70 $location = add_query_arg( 'message', 4, get_edit_post_link( $post_id, 'url' ) ); 73 71 } … … 96 94 } 97 95 98 96 switch($action) { 97 case 'post-quickdraft-save': 98 // Check nonce and capabilities 99 $nonce = $_REQUEST['_wpnonce']; 100 $error_msg = false; 101 if ( ! wp_verify_nonce( $nonce, 'add-post' ) ) 102 $error_msg = 'Unable to submit this form, please refresh and try again.'; 103 104 if ( ! current_user_can( 'edit_posts' ) ) 105 $error_msg = "Oops, you don't have access to add new drafts."; 106 107 if ( $error_msg ) 108 return wp_dashboard_quick_draft( $error_msg ); 109 110 $post = get_post( $_REQUEST['post_ID'] ); 111 check_admin_referer( 'add-' . $post->post_type ); 112 edit_post(); 113 // output the quickdraft dashboard widget 114 require_once(ABSPATH . 'wp-admin/includes/dashboard.php'); 115 wp_dashboard_quick_draft(); 116 exit; 117 break; 118 99 119 case 'postajaxpost': 100 120 case 'post': 101 case 'post-quickpress-publish': 102 case 'post-quickpress-save': 103 check_admin_referer('add-' . $post_type); 121 // Check nonce and capabilities 122 $nonce = $_REQUEST['_wpnonce']; 123 $error_msg = false; 124 if ( ! wp_verify_nonce( $nonce, 'add-post' ) ) 125 $error_msg = 'Unable to submit this form, please refresh and try again.'; 126 127 if ( ! current_user_can( 'edit_posts' ) ) 128 $error_msg = "Oops, you don't have access to add new drafts."; 104 129 105 if ( 'post-quickpress-publish' == $action ) 106 $_POST['publish'] = 'publish'; // tell write_post() to publish 130 $post_id = 'postajaxpost' == $action ? edit_post() : write_post(); 107 131 108 if ( 'post-quickpress-publish' == $action || 'post-quickpress-save' == $action ) {109 $_POST['comment_status'] = get_option('default_comment_status');110 $_POST['ping_status'] = get_option('default_ping_status');111 $post_id = edit_post();112 } else {113 $post_id = 'postajaxpost' == $action ? edit_post() : write_post();114 }115 116 if ( 0 === strpos( $action, 'post-quickpress' ) ) {117 $_POST['post_ID'] = $post_id;118 // output the quickpress dashboard widget119 require_once(ABSPATH . 'wp-admin/includes/dashboard.php');120 wp_dashboard_quick_press();121 exit;122 }123 124 132 redirect_post($post_id); 125 133 exit(); 126 134 break; -
wp-admin/js/dashboard.js
29 29 30 30 // These widgets are sometimes populated via ajax 31 31 ajaxWidgets = [ 32 'dashboard_incoming_links', 33 'dashboard_primary', 34 'dashboard_secondary', 35 'dashboard_plugins' 32 'dashboard_rss' 36 33 ]; 37 34 38 35 ajaxPopulateWidgets = function(el) { … … 61 58 ajaxPopulateWidgets(); 62 59 63 60 postboxes.add_postbox_toggles(pagenow, { pbshow: ajaxPopulateWidgets } ); 64 61 65 62 /* QuickPress */ 66 63 quickPressLoad = function() { 67 64 var act = $('#quickpost-action'), t; 68 65 t = $('#quick-press').submit( function() { 69 $('#dashboard_quick_ press#publishing-action .spinner').show();66 $('#dashboard_quick_draft #publishing-action .spinner').show(); 70 67 $('#quick-press .submit input[type="submit"], #quick-press .submit input[type="reset"]').prop('disabled', true); 71 68 72 if ( 'post' == act.val() ) { 73 act.val( 'post-quickpress-publish' ); 69 $.post( t.attr( 'action' ), t.serializeArray(), function( data ) { 70 // Replace the form, and prepend the published post. 71 $('#dashboard_quick_draft .inside').html( data ); 72 $('#quick-press').removeClass('initial-form'); 73 quickPressLoad(); 74 highlightLatestPost(); 75 $('#title').focus(); 76 }); 77 78 function highlightLatestPost () { 79 var latestPost = $('#draft-list li').first(); 80 latestPost.css('background', '#fffbe5'); 81 setTimeout(function () { 82 latestPost.css('background', 'none'); 83 }, 1000); 74 84 } 75 76 $('#dashboard_quick_press div.inside').load( t.attr( 'action' ), t.serializeArray(), function() { 77 $('#dashboard_quick_press #publishing-action .spinner').hide(); 78 $('#quick-press .submit input[type="submit"], #quick-press .submit input[type="reset"]').prop('disabled', false); 79 $('#dashboard_quick_press ul').next('p').remove(); 80 $('#dashboard_quick_press ul').find('li').each( function() { 81 $('#dashboard_recent_drafts ul').prepend( this ); 82 } ).end().remove(); 83 quickPressLoad(); 84 } ); 85 85 86 return false; 86 87 } ); 87 88 88 89 $('#publish').click( function() { act.val( 'post-quickpress-publish' ); } ); 89 90 90 $('#title, #tags-input ').each( function() {91 $('#title, #tags-input, #content').each( function() { 91 92 var input = $(this), prompt = $('#' + this.id + '-prompt-text'); 92 93 93 94 if ( '' === this.value ) … … 109 110 }); 110 111 111 112 $('#quick-press').on( 'click focusin', function() { 113 $(this).addClass("quickpress-open"); 114 $("#description-wrap, p.submit").slideDown(200); 112 115 wpActiveEditor = 'content'; 113 116 }); 114 117 }; 115 118 quickPressLoad(); 119 120 // Activity Widget 121 $( '.show-more a' ).on( 'click', function(e) { 122 $( this ).fadeOut().closest('.activity-block').find( 'li.hidden' ).fadeIn().removeClass( 'hidden' ); 123 e.preventDefault(); 124 }) 125 126 // Dashboard columns 127 jQuery(document).ready(function ($) { 128 // Update main column count on load 129 updateColumnCount(); 130 }); 131 132 jQuery(window).resize( _.debounce( function(){ 133 updateColumnCount(); 134 }, 30) ); 135 136 function updateColumnCount() { 137 var cols = 1, 138 windowWidth = parseInt(jQuery(window).width()); 139 if (799 < windowWidth && 1299 > windowWidth) 140 cols = 2; 141 if (1300 < windowWidth && 1799 > windowWidth) 142 cols = 3; 143 if (1800 < windowWidth) 144 cols = 4; 145 jQuery('.metabox-holder').attr('class', jQuery('.metabox-holder').attr('class').replace(/columns-\d+/, 'columns-' + cols)); 146 } 116 147 117 148 } ); -
wp-admin/js/plugin-install.js
27 27 28 28 $(window).resize(function(){ tb_position(); }); 29 29 30 $(' #dashboard_plugins,.plugins').on( 'click', 'a.thickbox', function() {30 $('.plugins').on( 'click', 'a.thickbox', function() { 31 31 tb_click.call(this); 32 32 33 33 $('#TB_title').css({'background-color':'#222','color':'#cfcfcf'}); -
wp-admin/index.php
29 29 $title = __('Dashboard'); 30 30 $parent_file = 'index.php'; 31 31 32 if ( is_user_admin() )33 add_screen_option('layout_columns', array('max' => 4, 'default' => 1) );34 else35 add_screen_option('layout_columns', array('max' => 4, 'default' => 2) );36 37 32 $help = '<p>' . __( 'Welcome to your WordPress Dashboard! This is the screen you will see when you log in to your site, and gives you access to all the site management features of WordPress. You can get help for any screen by clicking the Help tab in the upper corner.' ) . '</p>'; 38 33 39 34 // Not using chaining here, so as to be parseable by PHP4. … … 47 42 48 43 // Help tabs 49 44 50 $help = '<p>' . __( 'The left-hand navigation menu provides links to all of the WordPress administration screens, with submenu items displayed on hover. You can minimize this menu to a narrow icon strip by clicking on the Collapse Menu arrow at the bottom.') . '</p>';51 $help .= '<p>' . __( 'Links in the Toolbar at the top of the screen connect your dashboard and the front end of your site, and provide access to your profile and helpful WordPress information.') . '</p>';52 45 $help = '<p>' . __( 'The left-hand navigation menu provides links to all of the WordPress administration screens, with submenu items displayed on hover. You can minimize this menu to a narrow icon strip by clicking on the Collapse Menu arrow at the bottom.' ) . '</p>'; 46 $help .= '<p>' . __( 'Links in the Toolbar at the top of the screen connect your dashboard and the front end of your site, and provide access to your profile and helpful WordPress information.' ) . '</p>'; 47 53 48 $screen->add_help_tab( array( 54 49 'id' => 'help-navigation', 55 'title' => __( 'Navigation'),50 'title' => __( 'Navigation' ), 56 51 'content' => $help, 57 52 ) ); 58 53 59 $help = '<p>' . __( 'You can use the following controls to arrange your Dashboard screen to suit your workflow. This is true on most other administration screens as well.') . '</p>';60 $help .= '<p>' . __( '<strong>Screen Options</strong> - Use the Screen Options tab to choose which Dashboard boxes to show, and how many columns to display.') . '</p>';61 $help .= '<p>' . __( '<strong>Drag and Drop</strong> - To rearrange the boxes, drag and drop by clicking on the title bar of the selected box and releasing when you see a gray dotted-line rectangle appear in the location you want to place the box.') . '</p>';62 $help .= '<p>' . __( '<strong>Box Controls</strong> - Click the title bar of the box to expand or collapse it. In addition, some boxes have configurable content, and will show a “Configure” link in the title bar if you hover over it.') . '</p>';54 $help = '<p>' . __( 'You can use the following controls to arrange your Dashboard screen to suit your workflow. This is true on most other administration screens as well.' ) . '</p>'; 55 $help .= '<p>' . __( '<strong>Screen Options</strong> - Use the Screen Options tab to choose which Dashboard boxes to show.' ) . '</p>'; 56 $help .= '<p>' . __( '<strong>Drag and Drop</strong> - To rearrange the boxes, drag and drop by clicking on the title bar of the selected box and releasing when you see a gray dotted-line rectangle appear in the location you want to place the box.' ) . '</p>'; 57 $help .= '<p>' . __( '<strong>Box Controls</strong> - Click the title bar of the box to expand or collapse it. In addition, some boxes have configurable content, and will show a “Configure” link in the title bar if you hover over it.' ) . '</p>'; 63 58 64 59 $screen->add_help_tab( array( 65 60 'id' => 'help-layout', 66 'title' => __( 'Layout'),61 'title' => __( 'Layout' ), 67 62 'content' => $help, 68 63 ) ); 69 64 70 $help = '<p>' . __( 'The boxes on your Dashboard screen are:') . '</p>';65 $help = '<p>' . __( 'The boxes on your Dashboard screen are:' ) . '</p>'; 71 66 if ( current_user_can( 'edit_posts' ) ) 72 $help .= '<p>' . __('<strong>Right Now</strong> - Displays a summary of the content on your site and identifies which theme and version of WordPress you are using.') . '</p>'; 73 if ( current_user_can( 'moderate_comments' ) ) 74 $help .= '<p>' . __('<strong>Recent Comments</strong> - Shows the most recent comments on your posts (configurable, up to 30) and allows you to moderate them.') . '</p>'; 75 if ( current_user_can( 'publish_posts' ) ) 76 $help .= '<p>' . __('<strong>Incoming Links</strong> - Shows links to your site found by Google Blog Search.') . '</p>'; 77 if ( current_user_can( get_post_type_object( 'post' )->cap->create_posts ) ) { 78 $help .= '<p>' . __('<strong>QuickPress</strong> - Allows you to create a new post and either publish it or save it as a draft.') . '</p>'; 79 $help .= '<p>' . __('<strong>Recent Drafts</strong> - Displays links to the 5 most recent draft posts you’ve started.') . '</p>'; 80 } 81 $help .= '<p>' . __('<strong>WordPress Blog</strong> - Latest news from the official WordPress project.') . '</p>'; 82 $help .= '<p>' . __('<strong>Other WordPress News</strong> - Shows the <a href="http://planet.wordpress.org" target="_blank">WordPress Planet</a> feed. You can configure it to show a different feed of your choosing.') . '</p>'; 67 $help .= '<p>' . __( '<strong>Site Content</strong> - Displays a summary of the content on your site and identifies which theme and version of WordPress you are using.' ) . '</p>'; 68 $help .= '<p>' . __( '<strong>Activity</strong> - Shows the upcoming scheduled posts, recently published posts, and the most recent comments on your posts and allows you to moderate them.' ) . '</p>'; 69 if ( is_blog_admin() && current_user_can( 'edit_posts' ) ) 70 $help .= '<p>' . __( "<strong>Quick Draft</strong> - Allows you to create a new post and save it as a draft. Also displays links to the 5 most recent draft posts you've started." ) . '</p>'; 83 71 if ( ! is_multisite() && current_user_can( 'install_plugins' ) ) 84 $help .= '<p>' . __('<strong>Plugins</strong> - Features the most popular, newest, and recently updated plugins from the WordPress.org Plugin Directory.') . '</p>'; 72 $help .= '<p>' . __( '<strong>WordPress News</strong> - Latest news from the official WordPress project, the <a href="http://planet.wordpress.org/">WordPress Planet</a>, and popular and recent plugins.' ) . '</p>'; 73 else 74 $help .= '<p>' . __( '<strong>WordPress News</strong> - Latest news from the official WordPress project, the <a href="http://planet.wordpress.org/">WordPress Planet</a>.' ) . '</p>'; 85 75 if ( current_user_can( 'edit_theme_options' ) ) 86 $help .= '<p>' . __( '<strong>Welcome</strong> - Shows links for some of the most common tasks when setting up a new site.') . '</p>';87 76 $help .= '<p>' . __( '<strong>Welcome</strong> - Shows links for some of the most common tasks when setting up a new site.' ) . '</p>'; 77 88 78 $screen->add_help_tab( array( 89 79 'id' => 'help-content', 90 'title' => __( 'Content'),80 'title' => __( 'Content' ), 91 81 'content' => $help, 92 82 ) ); 93 83 94 84 unset( $help ); 95 85 96 86 $screen->set_help_sidebar( 97 87 '<p><strong>' . __( 'For more information:' ) . '</strong></p>' . 98 88 '<p>' . __( '<a href="http://codex.wordpress.org/Dashboard_Screen" target="_blank">Documentation on Dashboard</a>' ) . '</p>' . 99 89 '<p>' . __( '<a href="http://wordpress.org/support/" target="_blank">Support Forums</a>' ) . '</p>' 100 90 ); 101 91 102 include ( ABSPATH . 'wp-admin/admin-header.php');92 include ( ABSPATH . 'wp-admin/admin-header.php' ); 103 93 104 $today = current_time( 'mysql', 1);94 $today = current_time( 'mysql', 1 ); 105 95 ?> 106 96 107 97 <div class="wrap"> 108 <?php screen_icon(); ?>109 <h2><?php echo esc_html( $title ); ?></h2>98 <?php screen_icon(); ?> 99 <h2><?php echo esc_html( $title ); ?></h2> 110 100 111 <?php if ( has_action( 'welcome_panel' ) && current_user_can( 'edit_theme_options' ) ) :101 <?php if ( has_action( 'welcome_panel' ) && current_user_can( 'edit_theme_options' ) ) : 112 102 $classes = 'welcome-panel'; 113 103 114 104 $option = get_user_meta( get_current_user_id(), 'show_welcome_panel', true ); … … 117 107 if ( $hide ) 118 108 $classes .= ' hidden'; ?> 119 109 120 121 110 <div id="welcome-panel" class="<?php echo esc_attr( $classes ); ?>"> 111 <?php wp_nonce_field( 'welcome-panel-nonce', 'welcomepanelnonce', false ); ?> 122 112 <a class="welcome-panel-close" href="<?php echo esc_url( admin_url( '?welcome=0' ) ); ?>"><?php _e( 'Dismiss' ); ?></a> 123 113 <?php 124 114 /** … … 129 119 * 130 120 * @since 3.5.0 131 121 */ 132 do_action( 'welcome_panel' ); 122 do_action( 'welcome_panel' ); 133 123 ?> 134 124 </div> 135 <?php endif; ?>125 <?php endif; ?> 136 126 137 <div id="dashboard-widgets-wrap"> 127 <div id="dashboard-widgets-wrap"> 128 <?php wp_dashboard(); ?> 129 </div><!-- dashboard-widgets-wrap --> 138 130 139 <?php wp_dashboard(); ?>140 141 <div class="clear"></div>142 </div><!-- dashboard-widgets-wrap -->143 144 131 </div><!-- wrap --> 145 132 146 <?php require(ABSPATH . 'wp-admin/admin-footer.php'); ?> 133 <?php require( ABSPATH . 'wp-admin/admin-footer.php' ); ?> 134 No newline at end of file -
wp-admin/css/ie.css
141 141 overflow: visible; 142 142 } 143 143 144 #dashboard-widgets #dashboard_quick_press form p.submit #publish {145 float: none;146 }147 148 144 #dashboard-widgets h3 a { 149 145 height: 14px; 150 146 line-height: 14px; -
wp-admin/css/colors-fresh.css
126 126 border-right-color: #eee; 127 127 } 128 128 129 #dashboard_right_now .t,130 #dashboard_right_now .b {131 color: #777;132 }133 134 129 #the-comment-list .comment-item p.row-actions, 135 #dashboard_recent_comments .subsubsub,136 130 .plugins .row-actions-visible, 137 131 .row-actions { 138 132 color: #ddd; … … 552 546 color: #2ea2cc; 553 547 } 554 548 555 #the-comment-list .comment-item, 556 #dashboard-widgets #dashboard_quick_press form p.submit { 549 #the-comment-list .comment-item { 557 550 border: none; 558 551 } 559 552 … … 580 573 table.widefat span.delete a, 581 574 table.widefat span.trash a, 582 575 table.widefat span.spam a, 583 #dashboard_recent_comments .delete a,584 #dashboard_recent_comments .trash a,585 #dashboard_recent_comments .spam a,586 576 .plugins a.delete, 587 577 #all-plugins-table .plugins a.delete, 588 578 #search-plugins-table .plugins a.delete, … … 596 586 table.widefat span.delete a:hover, 597 587 table.widefat span.trash a:hover, 598 588 table.widefat span.spam a:hover, 599 #dashboard_recent_comments .delete a:hover,600 #dashboard_recent_comments .trash a:hover,601 #dashboard_recent_comments .spam a:hover,602 589 .plugins a.delete:hover, 603 590 #all-plugins-table .plugins a.delete:hover, 604 591 #search-plugins-table .plugins a.delete:hover, … … 771 758 border-color: #666; 772 759 } 773 760 774 #dashboard_secondary div.dashboard-widget-content ul li a {775 background-color: #f9f9f9;776 }777 778 761 input.readonly, textarea.readonly { 779 762 background-color: #ddd; 780 763 } … … 929 912 } 930 913 931 914 #the-comment-list .unapproved th, 932 #the-comment-list .unapproved td, 933 #dashboard_recent_comments #the-comment-list .unapproved { 915 #the-comment-list .unapproved td { 934 916 background-color: #fefaf7; 935 917 } 936 918 937 #the-comment-list .unapproved th.check-column, 938 #dashboard_recent_comments #the-comment-list .unapproved { 919 #the-comment-list .unapproved th.check-column { 939 920 border-left: 4px solid #d54e21; 940 921 } 941 922 942 #dashboard_recent_comments #the-comment-list .unapproved .avatar {943 margin-left: -4px;944 }945 946 923 #the-comment-list .approve a { 947 924 color: #006505; 948 925 } … … 1038 1015 1039 1016 .postbox h3, 1040 1017 #namediv h3, 1041 #submitdiv h3, 1042 #dashboard_recent_comments .comment { 1018 #submitdiv h3 { 1043 1019 color: #555; 1044 1020 border-bottom: 1px solid #eeeeee; 1045 1021 } … … 1165 1141 .widget-control-remove:hover, 1166 1142 table.widefat .delete a:hover, 1167 1143 table.widefat .trash a:hover, 1168 table.widefat .spam a:hover, 1169 #dashboard_recent_comments .delete a:hover, 1170 #dashboard_recent_comments .trash a:hover 1171 #dashboard_recent_comments .spam a:hover { 1144 table.widefat .spam a:hover { 1172 1145 color: #f00; 1173 1146 } 1174 1147 … … 2197 2170 border-right: 4px solid #d54e21; 2198 2171 } 2199 2172 2200 .rtl #the-comment-list .unapproved th.check-column, 2201 .rtl #dashboard_recent_comments #the-comment-list .unapproved { 2173 .rtl #the-comment-list .unapproved th.check-column { 2202 2174 border-left: none; 2203 2175 border-right: 4px solid #d54e21; 2204 2176 } 2205 2206 .rtl #dashboard_recent_comments #the-comment-list .unapproved .avatar {2207 margin-left: 10px;2208 margin-right: -4px;2209 } -
wp-admin/css/wp-admin.css
905 905 906 906 div.sidebar-name h3, 907 907 #menu-management .nav-tab, 908 #dashboard_plugins h5,909 908 a.rsswidget, 910 909 #dashboard_right_now td.b, 911 910 #dashboard-widgets h4, … … 2440 2439 min-height: 250px; 2441 2440 } 2442 2441 2442 #dashboard-widgets .postbox-container { 2443 width: 25%; 2444 } 2445 2446 #dashboard-widgets-wrap .columns-3 #postbox-container-4 .empty-container { 2447 border: none !important; 2448 } 2449 2450 #dashboard-widgets-wrap { 2451 overflow: hidden; 2452 } 2453 2443 2454 /* one column on the dash */ 2444 2455 @media only screen and (max-width: 799px) { 2445 2456 #wpbody-content #dashboard-widgets .postbox-container { … … 2454 2465 } 2455 2466 2456 2467 /* two columns on the dash, but keep the setting if one is selected */ 2457 @media only screen and (min-width: 800px) and (max-width: 1 200px) {2468 @media only screen and (min-width: 800px) and (max-width: 1399px) { 2458 2469 #wpbody-content #dashboard-widgets .postbox-container { 2459 2470 width: 49.5%; 2460 2471 } … … 2495 2506 } 2496 2507 } 2497 2508 2509 /* three columns on the dash */ 2510 @media only screen and (min-width: 1400px) and (max-width: 1800px) { 2511 #wpbody-content #dashboard-widgets .postbox-container { 2512 width: 33.5%; 2513 } 2514 2515 #wpbody-content #dashboard-widgets #postbox-container-1 { 2516 width: 33%; 2517 } 2518 2519 #wpbody-content #dashboard-widgets #postbox-container-3, 2520 #wpbody-content #dashboard-widgets #postbox-container-4 { 2521 float: right; 2522 } 2523 2524 #dashboard-widgets #postbox-container-4 .empty-container { 2525 border: 0 none; 2526 height: 0; 2527 min-height: 0; 2528 } 2529 } 2530 2498 2531 /* one column on the post write/edit screen */ 2499 2532 @media only screen and (max-width: 850px) { 2500 2533 #poststuff { … … 2636 2669 margin: 0 8px; 2637 2670 } 2638 2671 2639 #dashboard_recent_comments div.undo {2640 margin: 0 -12px;2641 padding: 6px 12px;2642 font-size: 11px;2643 }2644 2645 #dashboard_recent_comments div.undo .avatar {2646 float: left;2647 }2648 2649 #dashboard_recent_comments div.undo div {2650 min-height: 20px;2651 }2652 2653 2672 #the-comment-list td.comment p.comment-author { 2654 2673 margin-top: 0; 2655 2674 margin-left: 0; … … 2837 2856 list-style-type: none; 2838 2857 } 2839 2858 2859 /* Dashboard WordPress news */ 2860 2861 #dashboard_rss .inside { 2862 margin: 0; 2863 padding: 0; 2864 } 2865 2866 #dashboard_rss .widget-loading, 2867 #dashboard_rss .dashboard-widget-control-form { 2868 padding: 12px 12px 0; 2869 } 2870 2871 body #dashboard-widgets .postbox form .submit { 2872 margin: 0; 2873 } 2874 2875 .dashboard-widget-control-form { 2876 overflow: hidden; 2877 } 2878 2879 .dashboard-widget-control-form p { 2880 margin-top: 0; 2881 } 2882 2883 .rssSummary { 2884 color: #999; 2885 margin-top: 4px; 2886 } 2887 2888 .rss-widget { 2889 border-bottom: 1px solid #eee; 2890 font-size: 13px; 2891 padding: 8px 12px 12px; 2892 } 2893 2894 .rss-widget:last-child { 2895 border-bottom: none; 2896 padding-bottom: 0; 2897 } 2898 2899 .rss-widget a { 2900 font-weight: normal; 2901 } 2902 2903 .rss-widget span, 2904 .rss-widget span.rss-date { 2905 color: #bbb; 2906 } 2907 2908 .rss-widget span.rss-date { 2909 margin-left: 12px; 2910 } 2911 2912 .rss-widget ul li { 2913 margin-bottom: 8px; 2914 } 2915 2916 /* Dashboard right now */ 2917 2918 #dash-right-now ul { 2919 margin: 0; 2920 overflow: hidden; 2921 } 2922 2923 #dash-right-now li { 2924 width: 50%; 2925 float: left; 2926 margin-bottom: 10px; 2927 } 2928 2929 #dash-right-now .inside { 2930 margin-bottom: 0; 2931 overflow: hidden; 2932 padding: 0; 2933 } 2934 2935 #dash-right-now .main { 2936 padding: 0 12px; 2937 } 2938 2939 #dash-right-now .main p { 2940 margin: 0; 2941 } 2942 2943 .mu-storage { 2944 overflow: hidden; 2945 } 2946 2947 /* Dashboard right now - Colors */ 2948 2949 #dash-right-now li a:before { 2950 color: #888; 2951 } 2952 2953 #dash-right-now .sub { 2954 color: #bfbbbb; 2955 background: #f5f5f5; 2956 border-top-color: #dedede; 2957 padding: 12px 12px 6px 12px; 2958 border-top: 1px solid; 2959 } 2960 2961 #dash-right-now .sub h4 { 2962 color: #555; 2963 } 2964 2965 #dash-right-now .sub p { 2966 margin: 0 0 .5em; 2967 font-size: 11px; 2968 } 2969 2970 #dash-right-now .warning a:before { 2971 color: #d54e21; 2972 } 2973 2974 /* Dashboard right now - Icons */ 2975 #dash-right-now li a:before { 2976 content: '\f159'; 2977 font: normal 20px/1 'dashicons'; 2978 speak: none; 2979 display: block; 2980 float: left; 2981 margin: 0 5px 0 0; 2982 padding: 0; 2983 text-indent: 0; 2984 text-align: center; 2985 position: relative; 2986 -webkit-font-smoothing: antialiased; 2987 text-decoration: none !important; 2988 } 2989 2990 #dash-right-now .page-count a:before { 2991 content: '\f105'; 2992 } 2993 2994 #dash-right-now .post-count a:before { 2995 content: '\f109'; 2996 } 2997 2998 #dash-right-now .comment-count a:before { 2999 content: '\f101'; 3000 } 3001 3002 #dash-right-now .comment-mod-count a:before { 3003 content: '\f125'; 3004 } 3005 3006 #dash-right-now .storage-count a:before { 3007 content: '\f104'; 3008 } 3009 3010 #dash-right-now .storage-count.warning a:before { 3011 content: '\f153'; 3012 } 3013 3014 /* Dashboard Quick Draft */ 3015 3016 #dashboard_quick_draft div.updated { 3017 margin-bottom: 10px; 3018 border: 1px solid #eee; 3019 border-width: 1px 1px 1px 0; 3020 } 3021 3022 #dashboard_quick_draft form { 3023 padding: 0 12px 1px 12px; 3024 overflow: hidden; 3025 } 3026 3027 #dashboard_quick_draft .drafts, 3028 #dashboard_quick_draft .easy-blogging { 3029 padding: 8px 12px 0; 3030 } 3031 3032 #dashboard-widgets .postbox .inside { 3033 margin: 10px 0; 3034 padding: 0; 3035 } 3036 3037 /* Dashboard Quick Draft - Form styling */ 3038 3039 input#save-post { 3040 float: right; 3041 } 3042 3043 form.initial-form label.prompt { 3044 font-style: italic; 3045 } 3046 3047 form.initial-form input#title { 3048 height: 3em; 3049 } 3050 3051 form.initial-form.quickpress-open label.prompt { 3052 font-style: normal; 3053 } 3054 3055 form.initial-form.quickpress-open input#title { 3056 height: auto; 3057 } 3058 3059 #dashboard_quick_draft input, 3060 #dashboard_quick_draft textarea { 3061 box-sizing: border-box; 3062 -moz-box-sizing:border-box; 3063 -webkit-box-sizing:border-box; 3064 margin: 0; 3065 } 3066 3067 #dashboard_quick_draft textarea { 3068 resize: vertical; 3069 } 3070 3071 #dashboard-widgets .postbox form .submit { 3072 margin: -39px 0; 3073 float: right; 3074 } 3075 3076 #description-wrap { 3077 margin-top: 12px; 3078 } 3079 3080 #title-wrap #title-prompt-text, 3081 .textarea-wrap #content-prompt-text { 3082 color: #BBB; 3083 } 3084 3085 #title-wrap #title-prompt-text { 3086 font-size: 1.1em; 3087 padding: 7px 8px; 3088 } 3089 3090 .initial-form #description-wrap, 3091 .initial-form p.submit { 3092 display: none; 3093 } 3094 3095 .input-text-wrap, 3096 .textarea-wrap { 3097 position: relative; 3098 } 3099 3100 .input-text-wrap .prompt, 3101 .textarea-wrap .prompt { 3102 position: absolute; 3103 } 3104 3105 .textarea-wrap #content-prompt-text { 3106 font-size: 1.1em; 3107 padding: 7px 8px; 3108 } 3109 3110 .textarea-wrap textarea#content { 3111 margin: 0 0 8px; 3112 padding: 6px 7px; 3113 } 3114 3115 /* Dashboard Quick Draft - Drafts list */ 3116 3117 #dashboard_quick_draft .drafts { 3118 border-top: 1px solid #eee; 3119 margin-top: 12px; 3120 } 3121 3122 #dashboard_quick_draft .drafts abbr { 3123 border: none; 3124 } 3125 3126 #dashboard_quick_draft .drafts h4 { 3127 margin: 0 0 8px 0; 3128 font-weight: normal; 3129 } 3130 3131 #dashboard_quick_draft .drafts .view-all { 3132 float: right; 3133 margin-top: 0; 3134 } 3135 3136 #dashboard_rss a.rsswidget { 3137 font-weight: normal; 3138 } 3139 3140 #draft-list { 3141 margin: 0; 3142 } 3143 3144 #draft-list li { 3145 margin-bottom: 1em; 3146 } 3147 #draft-list li time { 3148 color: #bbb; 3149 } 3150 3151 #draft-list p { 3152 margin: 0; 3153 } 3154 3155 #draft-list .draft-title { 3156 overflow: hidden; 3157 } 3158 3159 #draft-list .draft-title a, 3160 #draft-list .draft-title time { 3161 float: left; 3162 margin: 0 5px 0 0; 3163 } 3164 3165 /* Dashboard activity widget */ 3166 3167 #dashboard-widgets #dashboard_activity h4 { 3168 margin: 0 0 8px 12px; 3169 font-weight: normal; 3170 } 3171 3172 #dashboard-widgets #dashboard_activity h4.comment-meta { 3173 margin: 0; 3174 } 3175 3176 #dashboard_activity h4.comment-meta { 3177 overflow: hidden; 3178 text-overflow: ellipsis; 3179 white-space: nowrap; 3180 margin-bottom: 4px; 3181 } 3182 3183 #dashboard_activity ul { 3184 padding: 0 12px; 3185 } 3186 3187 #dashboard_activity .comment-meta span.approve:before { 3188 content: '\f227'; 3189 font: 20px/.5 "dashicons"; 3190 margin-left: 12px; 3191 vertical-align: middle; 3192 position: relative; 3193 top: -1px; 3194 margin-right: 2px; 3195 } 3196 3197 #dashboard_activity .inside { 3198 padding: 0; 3199 margin: 0; 3200 } 3201 3202 #dashboard_activity .no-activity { 3203 overflow: hidden; 3204 padding: 0 12px 12px; 3205 text-align: center; 3206 } 3207 3208 #dashboard_activity .no-activity p { 3209 color: #999; 3210 font-size: 16px; 3211 } 3212 3213 #dashboard_activity .no-activity .smiley { 3214 margin-top: 0; 3215 } 3216 3217 #dashboard_activity .no-activity .smiley:before { 3218 content: '\f328'; 3219 font: normal 120px/1 'dashicons'; 3220 speak: none; 3221 display: block; 3222 margin: 0 5px 0 0; 3223 padding: 0; 3224 text-indent: 0; 3225 text-align: center; 3226 position: relative; 3227 -webkit-font-smoothing: antialiased; 3228 text-decoration: none !important; 3229 } 3230 3231 #dashboard_activity .subsubsub { 3232 float: none; 3233 border-top: 1px solid #eeeeee; 3234 margin-top: 0; 3235 padding: 8px 12px 0 12px; 3236 } 3237 3238 #future-posts .show-more, 3239 #published-posts .show-more { 3240 float: right; 3241 } 3242 3243 #future-posts ul, 3244 #published-posts ul { 3245 clear: both; 3246 margin-bottom: 0; 3247 } 3248 3249 #future-posts li, 3250 #published-posts li { 3251 overflow: hidden; 3252 margin-bottom: 8px; 3253 } 3254 3255 #future-posts ul span, 3256 #published-posts ul span { 3257 color: #bbb; 3258 float: left; 3259 margin-right: 8px; 3260 min-width: 150px; 3261 } 3262 3263 .activity-block { 3264 border-bottom: 1px solid #eee; 3265 overflow: hidden; 3266 padding: 8px 0 0; 3267 } 3268 3269 .activity-block:last-child { 3270 border-bottom: none; 3271 } 3272 3273 .activity-block .subsubsub li { 3274 color: #ddd; 3275 } 3276 3277 /* Dashboard activity widget - Comments */ 3278 3279 #the-comment-list tr.undo, #the-comment-list div.undo { 3280 background: none; 3281 padding: 6px 0; 3282 } 3283 3284 #the-comment-list .alternate, 3285 #the-comment-list .alt { 3286 background: none; 3287 } 3288 3289 #the-comment-list .comment { 3290 background: #f5f5f5; 3291 padding: 12px; 3292 position: relative; 3293 border-top: 1px solid #eeeeee; 3294 } 3295 3296 #the-comment-list img { 3297 position: absolute; 3298 left: 13px; 3299 top: 13px; 3300 } 3301 3302 #the-comment-list .dashboard-comment-wrap { 3303 padding-left: 63px; 3304 } 3305 3306 #the-comment-list .dashboard-comment-wrap blockquote { 3307 margin: 1em 0; 3308 } 3309 3310 #the-comment-list .comment-item h4 { 3311 font-size: 13px; 3312 color: #999; 3313 } 3314 3315 #the-comment-list .comment-item p.row-actions { 3316 margin: 4px 0 0 0; 3317 } 3318 3319 #the-comment-list .comment-item:first-child { 3320 border-top: 1px solid #eeeeee; 3321 } 3322 3323 #the-comment-list .unapproved { 3324 background: #f7fcfe; 3325 } 3326 3327 #the-comment-list .unapproved:before { 3328 content: ""; 3329 display: block; 3330 position: absolute; 3331 left: 0; 3332 top: 0; 3333 bottom: 0; 3334 background: #d54e21; 3335 width: 4px; 3336 } 3337 3338 /* Browse happy box */ 3339 3340 #dashboard-widgets #dashboard_browser_nag.postbox .inside { 3341 margin: 10px; 3342 } 3343 2840 3344 @media screen and (max-width: 870px) { 2841 3345 .welcome-panel .welcome-panel-column, 2842 3346 .welcome-panel .welcome-panel-column:first-child { … … 7662 8166 } 7663 8167 7664 8168 /* Recent Comments */ 7665 #dashboard_recent_comments h3 {7666 margin-bottom: 0;7667 }7668 8169 7669 #dashboard_recent_comments .inside { 7670 margin-top: 0; 7671 } 7672 7673 #dashboard_recent_comments .comment-meta .approve { 7674 font-family: "Open Sans", sans-serif; 7675 font-size: 13px; 7676 line-height: 1; 7677 margin: 0 10px; 7678 } 7679 7680 #dashboard_recent_comments .subsubsub { 7681 float: none; 7682 white-space: normal; 7683 } 7684 7685 #the-comment-list { 8170 #latest-comments #the-comment-list { 7686 8171 position: relative; 7687 8172 } 7688 8173 7689 # the-comment-list .comment-item {8174 #activity-widget #latest-comments #the-comment-list .comment-item { 7690 8175 padding: 1em 12px; 7691 border-top: 1px solid ;8176 border-top: 1px solid #eee; 7692 8177 } 7693 8178 7694 # the-comment-list .pingback {8179 #latest-comments #the-comment-list .pingback { 7695 8180 padding-left: 12px !important; 7696 8181 } 7697 8182 7698 #the-comment-list .comment-item, 7699 #the-comment-list #replyrow { 7700 margin: 0 -12px; 7701 } 7702 7703 #the-comment-list .comment-item:first-child { 8183 #latest-comments #the-comment-list .comment-item:first-child { 7704 8184 border-top: none; 7705 8185 } 7706 8186 7707 #the-comment-list .comment-item .avatar { 7708 float: left; 7709 margin: 0 10px 5px 0; 7710 } 7711 7712 #the-comment-list .comment-item h4 { 8187 #latest-comments #the-comment-list .comment-item h4 { 7713 8188 line-height: 1.5em; 7714 8189 margin-top: 0; 7715 8190 color: #999; 7716 8191 } 7717 8192 7718 # the-comment-list .comment-item h4 cite {8193 #latest-comments #the-comment-list .comment-item h4 cite { 7719 8194 font-style: normal; 7720 8195 font-weight: normal; 7721 8196 } 7722 8197 7723 # the-comment-list .comment-item blockquote,7724 # the-comment-list .comment-item blockquote p {8198 #latest-comments #the-comment-list .comment-item blockquote, 8199 #latest-comments #the-comment-list .comment-item blockquote p { 7725 8200 margin: 0; 7726 8201 padding: 0; 7727 8202 display: inline; 7728 8203 } 7729 8204 7730 #dashboard_recent_comments #the-comment-list .trackback blockquote, 7731 #dashboard_recent_comments #the-comment-list .pingback blockquote { 7732 display: block; 7733 } 7734 7735 #the-comment-list .comment-item p.row-actions { 8205 #latest-comments #the-comment-list .comment-item p.row-actions { 7736 8206 margin: 3px 0 0; 7737 8207 padding: 0; 7738 8208 font-size: 13px; 7739 8209 } 7740 8210 7741 /* QuickPress */ 7742 #header-logo { 7743 display: none; 7744 } 8211 /* QuickDraft */ 7745 8212 7746 #site-heading:before { 7747 top: 3px; 7748 position: relative; 7749 display: inline-block; 7750 font: normal 18px/1 'dashicons'; 7751 speak: none; 7752 color: #727272; 7753 content: '\f120'; 7754 -webkit-font-smoothing: antialiased; 7755 -moz-osx-font-smoothing: grayscale; 7756 } 7757 .no-js #dashboard_quick_press { 7758 display: none; 7759 } 7760 7761 #dashboard_quick_press .easy-blogging { 7762 padding: 0 8px; 7763 text-align: left; 7764 } 7765 7766 #dashboard_quick_press .input-text-wrap { 7767 position: relative; 7768 } 7769 7770 #dashboard_quick_press .prompt { 7771 color: #bbb; 7772 position: absolute; 7773 } 7774 7775 #dashboard_quick_press div.updated { 7776 padding: 0 5px; 7777 } 7778 7779 #title-wrap label, 7780 #tags-input-wrap label { 8213 #title-wrap label { 7781 8214 cursor: text; 7782 8215 } 7783 8216 … … 7788 8221 outline: none; 7789 8222 } 7790 8223 7791 #tags-input-wrap #tags-input {7792 outline: none;7793 padding: 3px 6px;7794 }7795 7796 8224 #title-wrap #title-prompt-text { 7797 font-size: 1.3em;7798 padding: 5px 8px;7799 }7800 7801 #tags-input-wrap #tags-input-prompt-text {7802 8225 font-size: 1em; 7803 8226 padding: 5px 8px; 7804 8227 } 7805 8228 7806 #dashboard_quick_press .input-text-wrap,7807 #dashboard_quick_press .textarea-wrap {7808 margin: 0 0 .7em 0;7809 }7810 7811 #dashboard_quick_press .input-text-wrap {7812 margin-right: 1px;7813 }7814 7815 #dashboard_quick_press .textarea-wrap {7816 margin-left: 1px;7817 }7818 7819 #dashboard_quick_press .wp-media-buttons {7820 margin: 0 0 2px 1px;7821 padding: 0;7822 }7823 7824 #dashboard_quick_press .wp-media-buttons a {7825 color: #777;7826 margin-bottom: 0;7827 }7828 7829 #dashboard-widgets #dashboard_quick_press form p.submit input {7830 float: left;7831 }7832 7833 #dashboard-widgets #dashboard_quick_press form p.submit #save-post {7834 margin: 0 0.7em 0 1px;7835 }7836 7837 #dashboard-widgets #dashboard_quick_press form p.submit #publish {7838 float: right;7839 }7840 7841 #dashboard-widgets #dashboard_quick_press form p.submit .spinner {7842 vertical-align: middle;7843 margin: 4px 6px 0 0;7844 }7845 7846 /* Recent Drafts */7847 #dashboard_recent_drafts ul,7848 #dashboard_recent_drafts p {7849 margin: 0;7850 padding: 0;7851 word-wrap: break-word;7852 }7853 7854 #dashboard_recent_drafts ul {7855 list-style: none;7856 }7857 7858 #dashboard_recent_drafts ul li {7859 margin-bottom: 1em;7860 }7861 7862 #dashboard_recent_drafts h4 {7863 line-height: 1.7em;7864 word-wrap: break-word;7865 }7866 7867 #dashboard_recent_drafts h4 abbr {7868 font-weight: normal;7869 font-family: "Open Sans", sans-serif;7870 font-size: 12px;7871 color: #999;7872 margin-left: 3px;7873 }7874 7875 8229 /* Feeds */ 7876 8230 .rss-widget ul { 7877 8231 margin: 0; … … 7907 8261 content: '\2014'; 7908 8262 } 7909 8263 7910 /* Plugins */7911 #dashboard_plugins h4 {7912 line-height: 1.7em;7913 }7914 7915 #dashboard_plugins h5 {7916 font-weight: normal;7917 font-size: 13px;7918 margin: 0;7919 display: inline;7920 line-height: 1.4em;7921 }7922 7923 #dashboard_plugins h5 a {7924 line-height: 1.4em;7925 }7926 7927 #dashboard_plugins .inside span {7928 font-size: 12px;7929 padding-left: 5px;7930 }7931 7932 #dashboard_plugins p {7933 margin: 0.3em 0 1.4em;7934 line-height: 1.4em;7935 }7936 7937 8264 .dashboard-comment-wrap { 7938 8265 overflow: hidden; 7939 8266 word-wrap: break-word;