Ticket #7552: 7552.dashboard-4.2.diff
File 7552.dashboard-4.2.diff, 12.5 KB (added by , 16 years ago) |
---|
-
wp-includes/widgets.php
1581 1581 if ( empty($title) ) 1582 1582 $title = __('Untitled'); 1583 1583 $desc = ''; 1584 $summary = '';1585 1584 if ( isset( $item['description'] ) && is_string( $item['description'] ) ) 1586 $desc = $summary =str_replace(array("\n", "\r"), ' ', attribute_escape(strip_tags(html_entity_decode($item['description'], ENT_QUOTES))));1585 $desc = str_replace(array("\n", "\r"), ' ', attribute_escape(strip_tags(html_entity_decode($item['description'], ENT_QUOTES)))); 1587 1586 elseif ( isset( $item['summary'] ) && is_string( $item['summary'] ) ) 1588 $desc = $summary = str_replace(array("\n", "\r"), ' ', attribute_escape(strip_tags(html_entity_decode($item['summary'], ENT_QUOTES)))); 1587 $desc = str_replace(array("\n", "\r"), ' ', attribute_escape(strip_tags(html_entity_decode($item['summary'], ENT_QUOTES)))); 1588 if ( 360 < strlen( $desc ) ) 1589 $desc = substr( $desc, 0, 360 ) . ' […]'; 1590 $summary = $desc; 1589 1591 1590 1592 if ( $show_summary ) { 1591 1593 $desc = ''; -
wp-includes/script-loader.php
155 155 'good' => __('Medium'), 156 156 'strong' => __('Strong') 157 157 ) ); 158 $scripts->add( 'admin-comments', '/wp-admin/js/edit-comments.js', array('wp-lists', 'jquery-ui-resizable', 'quicktags', 'columns', 'settings-box'), '2008101 4' );158 $scripts->add( 'admin-comments', '/wp-admin/js/edit-comments.js', array('wp-lists', 'jquery-ui-resizable', 'quicktags', 'columns', 'settings-box'), '20081016' ); 159 159 $scripts->localize( 'admin-comments', 'adminCommentsL10n', array( 160 160 'pending' => __('%i% pending'), // must look like: "# blah blah" 161 161 'hotkeys_highlight_first' => isset($_GET['hotkeys_highlight_first']), … … 196 196 'edit' => __('Edit'), 197 197 ) ); 198 198 $scripts->add( 'admin-gallery', '/wp-admin/js/gallery.js', array( 'jquery-ui-sortable' ), '20080709' ); 199 $scripts->add( 'media-upload', '/wp-admin/js/media-upload.js', array( 'thickbox' ), '2008 0723' );199 $scripts->add( 'media-upload', '/wp-admin/js/media-upload.js', array( 'thickbox' ), '20081016' ); 200 200 $scripts->localize( 'upload', 'uploadL10n', array( 201 201 'browseTitle' => attribute_escape(__('Browse your files')), 202 202 'back' => __('« Back'), … … 273 273 274 274 $scripts->add( 'settings-box', '/wp-admin/js/settings-box.js', array( 'jquery' ), '20080925' ); 275 275 276 $scripts->add( 'dashboard', '/wp-admin/js/dashboard.js', array( 'jquery', 'admin-comments', 'postbox', 'settings-box' ), '200810 08' );276 $scripts->add( 'dashboard', '/wp-admin/js/dashboard.js', array( 'jquery', 'admin-comments', 'postbox', 'settings-box' ), '20081016' ); 277 277 278 278 $scripts->add( 'hoverIntent', '/wp-includes/js/hoverIntent.js', array('jquery'), '20070327' ); 279 279 $scripts->add( 'menu', '/wp-admin/js/menu.js', array( 'jquery', 'hoverIntent' ), '20081013' ); … … 321 321 $styles->add( 'global', '/wp-admin/css/global.css', array(), '20081013' ); 322 322 $styles->add( 'media', '/wp-admin/css/media.css', array(), '20080709' ); 323 323 $styles->add( 'widgets', '/wp-admin/css/widgets.css' ); 324 $styles->add( 'dashboard', '/wp-admin/css/dashboard.css', array(), '200810 08' );324 $styles->add( 'dashboard', '/wp-admin/css/dashboard.css', array(), '20081016' ); 325 325 $styles->add( 'install', '/wp-admin/css/install.css', array(), '20080708' ); 326 326 $styles->add( 'theme-editor', '/wp-admin/css/theme-editor.css' ); 327 327 $styles->add( 'press-this', '/wp-admin/css/press-this.css', array(), '20080922' ); -
wp-admin/includes/dashboard.php
28 28 wp_add_dashboard_widget( 'dashboard_recent_comments', __( 'Recent Comments' ), 'wp_dashboard_recent_comments' ); 29 29 30 30 // QuickPress Widget 31 wp_add_dashboard_widget( 'dashboard_quick_press', __( 'QuickPress' ), 'wp_dashboard_quick_press' , 'wp_dashboard_empty_control');31 wp_add_dashboard_widget( 'dashboard_quick_press', __( 'QuickPress' ), 'wp_dashboard_quick_press' ); 32 32 33 33 // Recent Drafts 34 34 wp_add_dashboard_widget( 'dashboard_recent_drafts', __( 'Recent Drafts' ), 'wp_dashboard_recent_drafts' ); … … 184 184 <input type="text" name="post_title" id="title" autocomplete="off" value="<?php echo attribute_escape( $post->post_title ); ?>" /> 185 185 </div> 186 186 187 <h4><label for="quickpress-content"><?php _e('Post') ?></label></h4> 187 <div id="add-media-button" class="alignright"> 188 <a class="thickbox button" href="http://hacek.local/wordpress/wp-admin/media-upload.php?TB_iframe=true" id="add-media-link"><?php _e( 'Insert Media' ); ?></a> 189 </div> 190 191 <h4 id="content-label"><label for="content"><?php _e('Post') ?></label></h4> 188 192 <div class="textarea-wrap"> 189 <textarea name="content" id=" quickpress-content" class="mceEditor" rows="3" cols="15"><?php echo $post->post_content; ?></textarea>193 <textarea name="content" id="content" class="mceEditor" rows="3" cols="15"><?php echo $post->post_content; ?></textarea> 190 194 </div> 191 195 192 196 <h4><label for="tags-input"><?php _e('Tags') ?></label></h4> … … 315 319 $actions['edit'] = "<a href='comment.php?action=editcomment&c={$comment->comment_ID}' title='" . __('Edit comment') . "'>". __('Edit') . '</a>'; 316 320 $actions['spam'] = "<a href='$spam_url' class='delete:the-comment-list:comment-$comment->comment_ID::spam=1 vim-s vim-destructive' title='" . __( 'Mark this comment as spam' ) . "'>" . __( 'Spam' ) . '</a>'; 317 321 $actions['delete'] = "<a href='$delete_url' class='delete:the-comment-list:comment-$comment->comment_ID delete vim-d vim-destructive'>" . __('Delete') . '</a>'; 318 $actions['reply'] = '<a onclick="commentReply.open(\''.$comment->comment_ID.'\',\''.$comment->comment_post_ID.'\');return false;" class="vim-r" title="'.__('Reply to this comment').'" href="#">' . __('Reply') . '</a>'; 322 $actions['quickedit'] = '<a onclick="commentReply.open(\''.$comment->comment_ID.'\',\''.$comment->comment_post_ID.'\',\'edit\');return false;" class="vim-q" title="'.__('Quick Edit').'" href="#">' . __('Quick Edit') . '</a>'; 323 $actions['reply'] = '<a onclick="commentReply.open(\''.$comment->comment_ID.'\',\''.$comment->comment_post_ID.'\');return false;" class="vim-r hide-if-no-js" title="'.__('Reply to this comment').'" href="#">' . __('Reply') . '</a>'; 319 324 320 325 $actions = apply_filters( 'comment_row_actions', $actions, $comment ); 321 326 … … 326 331 ( ( ('approve' == $action || 'unapprove' == $action) && 2 === $i ) || 1 === $i ) ? $sep = '' : $sep = ' | '; 327 332 328 333 // Reply and quickedit need a hide-if-no-js span 329 if ( 'reply' == $action || 'quickedit' == $action)334 if ( 'reply' == $action ) 330 335 $action .= ' hide-if-no-js'; 336 elseif ( 'quickedit' == $action ) 337 $action .= ' hide-if-no-js hide-if-js'; // hah 331 338 332 339 $actions_string .= "<span class='$action'>$sep$link</span>"; 333 340 } … … 361 368 <?php endif; // comment_type ?> 362 369 <blockquote><p><?php comment_excerpt(); ?></p></blockquote> 363 370 <p class="comment-actions"><?php echo $actions_string; ?></p> 371 372 <div id="inline-<?php echo $comment->comment_ID; ?>" class="hidden"> 373 <textarea class="comment"><?php echo $comment->comment_content; ?></textarea> 374 <div class="author-email"><?php echo attribute_escape( $comment->comment_author_email ); ?></div> 375 <div class="author"><?php echo attribute_escape( $comment->comment_author ); ?></div> 376 <div class="author-url"><?php echo attribute_escape( $comment->comment_author_url ); ?></div> 377 <div class="comment_status"><?php echo $comment->comment_approved; ?></div> 378 </div> 379 364 380 </div> 365 381 <?php 366 382 } … … 454 470 */ 455 471 function wp_dashboard_rss_output( $widget_id ) { 456 472 $widgets = get_option( 'dashboard_widget_options' ); 473 echo "<div class='rss-widget'>"; 457 474 wp_widget_rss_output( $widgets[$widget_id] ); 475 echo "</div>"; 458 476 } 459 477 460 478 function wp_dashboard_secondary() { … … 462 480 } 463 481 464 482 function wp_dashboard_secondary_control() { 465 wp_dashboard_rss_control( 'dashboard_secondary' , array( 'show_summary' => false, 'show_author' => false, 'show_date' => false ));483 wp_dashboard_rss_control( 'dashboard_secondary' ); 466 484 } 467 485 468 486 /** … … 476 494 $widgets = get_option( 'dashboard_widget_options' ); 477 495 @extract( @$widgets['dashboard_secondary'], EXTR_SKIP ); 478 496 $rss = @fetch_rss( $url ); 497 479 498 if ( !isset($rss->items) || 0 == count($rss->items) ) 480 499 return false; 481 500 482 echo "<ul id='planetnews'>\n";483 484 501 $rss->items = array_slice($rss->items, 0, $items); 485 foreach ($rss->items as $item ) {486 $title = wp_specialchars($item['title']);487 list($author,$post) = explode( ':', $title, 2 );488 $link = clean_url($item['link']);489 502 490 echo "\t<li><a href='$link'><span class='post'>$post</span><span class='hidden'> - </span><cite>$author</cite></a></li>\n"; 503 if ( 'http://planet.wordpress.org/' == $rss->channel['link'] ) { 504 foreach ( array_keys($rss->items) as $i ) { 505 list($site, $description) = explode( ':', wp_specialchars($rss->items[$i]['title']), 2 ); 506 $rss->items[$i]['dc']['creator'] = trim($site); 507 $rss->items[$i]['title'] = trim($description); 508 } 491 509 } 492 510 493 echo "</ul>\n<br class='clear' />\n"; 511 echo "<div class='rss-widget'>"; 512 wp_widget_rss_output( $rss, $widgets['dashboard_secondary'] ); 513 echo "</div>"; 494 514 } 495 515 496 516 function wp_dashboard_plugins() { … … 605 625 606 626 /* Dashboard Widgets Controls */ 607 627 608 // Temp609 function wp_dashboard_empty_control() {610 echo "This feature isn't enabled in this prototype.";611 }612 613 628 // Calls widget_control callback 614 629 /** 615 630 * Calls widget control callback. -
wp-admin/js/edit-comments.js
89 89 90 90 init : function() { 91 91 this.rows = $('#the-comment-list tr'); 92 if ( !this.rows.size() ) 93 this.rows = $('#the-comment-list > div.comment-item'); 92 94 var row = $('#replyrow'); 93 95 94 96 $('a.cancel', row).click(function() { return commentReply.revert(); }); -
wp-admin/js/dashboard.js
1 var edCanvas; 2 1 3 jQuery( function($) { 2 4 3 5 // close postboxes that should be closed … … 42 44 } ); 43 45 44 46 $('#publish').click( function() { act.val( 'post-quickpress-publish' ); } ); 47 48 edCanvas = jQuery('#content'); 45 49 }; 46 50 quickPressLoad(); 47 51 -
wp-admin/js/media-upload.js
9 9 h = ed.plugins.wpeditimage._do_shcode(h); 10 10 11 11 ed.execCommand('mceInsertContent', false, h); 12 } else 12 } else if ( jQuery.isFunction( 'edInsertContent' ) ) { 13 13 edInsertContent(edCanvas, h); 14 } else { 15 jQuery( edCanvas ).val( jQuery( edCanvas ).val() + h ); 16 } 14 17 15 18 tb_remove(); 16 19 } -
wp-admin/index.php
16 16 17 17 wp_enqueue_script( 'dashboard' ); 18 18 wp_enqueue_script( 'plugin-install' ); 19 wp_enqueue_script( 'media-upload' ); 19 20 wp_admin_css( 'dashboard' ); 20 21 wp_admin_css( 'plugin-install' ); 21 22 add_thickbox(); -
wp-admin/css/dashboard.css
108 108 padding: 0; 109 109 } 110 110 111 /* QuickPress */ 112 113 #quick-press #add-media-button { 114 margin: .5em 0; 115 } 116 117 #quick-press #content-label { 118 margin-top: 1em; 119 } 120 121 #quick-press .textarea-wrap { 122 clear: both; 123 } 124 111 125 /* Recent Drafts */ 112 126 #dashboard_recent_drafts ul { 113 127 margin: 0; … … 115 129 list-style: none; 116 130 } 117 131 118 /* Primary Feed*/132 /* Feeds */ 119 133 120 #dashboard_primary a.rsswidget, #dashboard_plugins h5 { 134 .rss-widget ul { 135 margin: 0; 136 padding: 0; 137 list-style: none; 138 } 139 140 .rss-widget a.rsswidget { 121 141 font-size: 14px; 122 142 } 123 143 124 #dashboard_primaryspan.rss-date {144 .rss-widget span.rss-date { 125 145 font-size: 14px; 126 146 } 127 147 148 .rss-widget cite { 149 display: block; 150 text-align: right; 151 margin: 0 0 1em; 152 padding: 0; 153 } 154 155 .rss-widget cite:before { 156 content: '\2014'; 157 } 158 128 159 /* Plugins */ 129 160 130 161 #dashboard_plugins h5 { 162 font-size: 14px; 131 163 margin: 0; 132 164 display: inline; 133 165 line-height: 1.4em;