Changeset 8720
- Timestamp:
- 08/24/2008 06:56:22 AM (16 years ago)
- Location:
- trunk
- Files:
-
- 4 added
- 22 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/wp-admin/admin-ajax.php
r8712 r8720 423 423 ) ); 424 424 } 425 $x->send(); 426 break; 427 case 'replyto-comment' : 428 check_ajax_referer( $action ); 429 430 $comment_post_ID = (int) $_POST['comment_post_ID']; 431 if ( !current_user_can( 'edit_post', $comment_post_ID ) ) 432 die('-1'); 433 434 $status = $wpdb->get_var( $wpdb->prepare("SELECT post_status FROM $wpdb->posts WHERE ID = %d", $comment_post_ID) ); 435 436 if ( empty($status) ) 437 die('1'); 438 elseif ( in_array($status->post_status, array('draft', 'pending') ) ) 439 die( __('Error: you are replying to comment on a draft post.') ); 440 441 $user = wp_get_current_user(); 442 if ( $user->ID ) { 443 $comment_author = $wpdb->escape($user->display_name); 444 $comment_author_email = $wpdb->escape($user->user_email); 445 $comment_author_url = $wpdb->escape($user->user_url); 446 $comment_content = trim($_POST['comment']); 447 if ( current_user_can('unfiltered_html') ) { 448 if ( wp_create_nonce('unfiltered-html-comment_' . $comment_post_ID) != $_POST['_wp_unfiltered_html_comment'] ) { 449 kses_remove_filters(); // start with a clean slate 450 kses_init_filters(); // set up the filters 451 } 452 } 453 } else { 454 die( __('Sorry, you must be logged in to reply to a comment.') ); 455 } 456 457 if ( '' == $comment_content ) 458 die( __('Error: please type a comment.') ); 459 460 $comment_parent = absint($_POST['comment_ID']); 461 $commentdata = compact('comment_post_ID', 'comment_author', 'comment_author_email', 'comment_author_url', 'comment_content', 'comment_type', 'comment_parent', 'user_ID'); 462 463 $comment_id = wp_new_comment( $commentdata ); 464 $comment = get_comment($comment_id); 465 if ( ! $comment ) die('1'); 466 467 $mode = ( isset($_POST['mode']) && 'single' == $_POST['mode'] ) ? 'single' : 'detail'; 468 $position = ( isset($_POST['position']) && (int) $_POST['position']) ? (int) $_POST['position'] : '-1'; 469 $checkbox = ( isset($_POST['checkbox']) && true == $_POST['checkbox'] ) ? 1 : 0; 470 471 if ( get_option('show_avatars') && 'single' != $mode ) 472 add_filter( 'comment_author', 'floated_admin_avatar' ); 473 474 $x = new WP_Ajax_Response(); 475 476 ob_start(); 477 _wp_comment_row( $comment->comment_ID, $mode, false, $checkbox ); 478 $comment_list_item = ob_get_contents(); 479 ob_end_clean(); 480 481 $x->add( array( 482 'what' => 'comment', 483 'id' => $comment->comment_ID, 484 'data' => $comment_list_item, 485 'position' => $position 486 )); 487 425 488 $x->send(); 426 489 break; -
trunk/wp-admin/admin-footer.php
r8697 r8720 11 11 </div><!-- wpbody --> 12 12 </div><!-- wpcontent --> 13 < /div><!-- wpwrap -->13 <br class="clear" /></div><!-- wpwrap --> 14 14 <div id="footer"> 15 15 <p><?php -
trunk/wp-admin/css/colors-classic.css
r8691 r8720 55 55 56 56 li.widget-list-control-item, div.nav, .tablenav, #dashboard-widgets p.dashboard-widget-links, 57 ul.view-switch li.current, .form-table tr, #poststuff h3, 57 ul.view-switch li.current, .form-table tr, #poststuff h3, #replyhandle, 58 58 .login form, h3.info-box-title, #post-status-info { 59 59 background-color: #cfebf7; … … 71 71 #post-body ul#category-tabs li.ui-tabs-selected, .button-secondary, 72 72 #quicktags, #login form .submit input, #post-search .button, 73 #post-search-prep .button {73 #post-search-prep .button, #ed_reply_toolbar { 74 74 background-color: #8ebddc !important; 75 75 } … … 377 377 } 378 378 379 #ed_toolbar input {379 #ed_toolbar input, #ed_reply_toolbar input { 380 380 background: url( ../images/fade-butt.png ) #fff repeat-x 0 -2px; 381 381 } -
trunk/wp-admin/css/colors-fresh.css
r8691 r8720 55 55 56 56 li.widget-list-control-item, div.nav, .tablenav, #dashboard-widgets p.dashboard-widget-links, 57 ul.view-switch li.current, .form-table tr, #poststuff h3, 57 ul.view-switch li.current, .form-table tr, #poststuff h3, #replyhandle, 58 58 .login form, h3.info-box-title, #post-status-info { 59 59 background-color: #eaf3fa; … … 71 71 #post-body ul#category-tabs li.ui-tabs-selected, .button-secondary, 72 72 #quicktags, #login form .submit input, #post-search .button, 73 #post-search-prep .button {73 #post-search-prep .button, #ed_reply_toolbar { 74 74 background-color: #cee1ef !important; 75 75 } … … 366 366 } 367 367 368 #ed_toolbar input {368 #ed_toolbar input, #ed_reply_toolbar input { 369 369 background: url( ../images/fade-butt.png ) #fff repeat-x 0 -2px; 370 370 } -
trunk/wp-admin/edit-comments.php
r8710 r8720 12 12 $title = __('Edit Comments'); 13 13 wp_enqueue_script( 'admin-comments' ); 14 wp_enqueue_script('admin-forms'); 14 wp_enqueue_script( 'admin-forms' ); 15 wp_enqueue_script( 'quicktags' ); 15 16 16 17 if ( !empty( $_REQUEST['delete_comments'] ) && isset($_REQUEST['action']) ) { … … 54 55 require_once('admin-header.php'); 55 56 56 if ( empty($_GET['mode']) ) 57 $mode = 'detail'; 58 else 59 $mode = attribute_escape($_GET['mode']); 60 61 if ( isset($_GET['comment_status']) ) 62 $comment_status = attribute_escape($_GET['comment_status']); 63 else 64 $comment_status = ''; 65 66 if ( isset($_GET['s']) ) 67 $search_dirty = $_GET['s']; 68 else 69 $search_dirty = ''; 57 $mode = ( ! isset($_GET['mode']) || empty($_GET['mode']) ) ? 'detail' : attribute_escape($_GET['mode']); 58 59 $comment_status = isset($_GET['comment_status']) ? attribute_escape($_GET['comment_status']) : ''; 60 61 $search_dirty = ( isset($_GET['s']) ) ? $_GET['s'] : ''; 70 62 $search = attribute_escape( $search_dirty ); 71 63 ?> … … 216 208 <th scope="col" class="comment-column"><?php _e('Comment') ?></th> 217 209 <th scope="col" class="author-column"><?php _e('Author') ?></th> 218 <th scope="col" class="date-column"><?php _e(' CommentSubmitted') ?></th>210 <th scope="col" class="date-column"><?php _e('Submitted') ?></th> 219 211 <th scope="col" class="response-column"><?php _e('In Response To This Post') ?></th> 220 212 </tr> … … 270 262 </div> 271 263 272 <?php include('admin-footer.php'); ?> 264 <?php 265 wp_comment_reply('-1', true, 'detail'); 266 include('admin-footer.php'); ?> -
trunk/wp-admin/edit-form-advanced.php
r8712 r8720 326 326 </table> 327 327 328 329 <?php 330 331 332 328 <?php 333 329 } 334 330 add_meta_box('commentstatusdiv', __('Comments on this Post'), 'post_comment_status_meta_box', 'post', 'normal', 'core'); … … 542 538 </form> 543 539 540 <?php wp_comment_reply(); ?> 541 544 542 <?php if ((isset($post->post_title) && '' == $post->post_title) || (isset($_GET['message']) && 2 > $_GET['message'])) : ?> 545 543 <script type="text/javascript"> -
trunk/wp-admin/edit-pages.php
r8682 r8720 69 69 if ( is_singular() ) 70 70 wp_enqueue_script( 'admin-comments' ); 71 71 72 require_once('admin-header.php'); 72 73 … … 241 242 242 243 <?php 243 244 wp_comment_reply(); 244 245 endif; // comments 245 246 endif; // posts; -
trunk/wp-admin/edit.php
r8694 r8720 54 54 list($post_stati, $avail_post_stati) = wp_edit_posts_query(); 55 55 56 if ( 1 == count($posts) && is_singular() ) 56 if ( 1 == count($posts) && is_singular() ) { 57 57 wp_enqueue_script( 'admin-comments' ); 58 wp_enqueue_script( 'quicktags' ); 59 } 60 58 61 require_once('admin-header.php'); 59 62 … … 268 271 269 272 <?php 270 273 wp_comment_reply(); 271 274 endif; // comments 272 275 endif; // posts; -
trunk/wp-admin/gears-manifest.php
r8618 r8720 136 136 { 137 137 "betaManifestVersion" : 1, 138 "version" : "<?php echo $man_version; ?>_20080 731",138 "version" : "<?php echo $man_version; ?>_20080823", 139 139 "entries" : [ 140 140 <?php echo $defaults; ?> … … 174 174 { "url" : "images/no.png" }, 175 175 { "url" : "images/yes.png" }, 176 { "url" : "images/se.png" }, 176 177 177 178 <?php if ( is_file('../wp-includes/js/tinymce/tiny_mce.js') ) { ?> -
trunk/wp-admin/includes/template.php
r8715 r8720 800 800 801 801 if ( current_user_can('edit_post', $comment->comment_post_ID) ) { 802 $actions['approve'] = "<a href='$approve_url' class='dim:the-comment-list:comment-$comment->comment_ID:unapproved:e7e7d3:e7e7d3:new=approved' title='" . __( 'Approve this comment' ) . "'>" . __( 'Approve' ) . '</a> | ';803 $actions['unapprove'] = "<a href='$unapprove_url' class='dim:the-comment-list:comment-$comment->comment_ID:unapproved:e7e7d3:e7e7d3:new=unapproved' title='" . __( 'Unapprove this comment' ) . "'>" . __( 'Unapprove' ) . '</a> | ';802 $actions['approve'] = "<a href='$approve_url' class='dim:the-comment-list:comment-$comment->comment_ID:unapproved:e7e7d3:e7e7d3:new=approved' title='" . __( 'Approve this comment' ) . "'>" . __( 'Approve' ) . "</a> | "; 803 $actions['unapprove'] = "<a href='$unapprove_url' class='dim:the-comment-list:comment-$comment->comment_ID:unapproved:e7e7d3:e7e7d3:new=unapproved' title='" . __( 'Unapprove this comment' ) . "'>" . __( 'Unapprove' ) . "</a> | "; 804 804 $actions['edit'] = "<a href='comment.php?action=editcomment&c={$comment->comment_ID}' title='" . __('Edit comment') . "'>". __('Edit') . '</a> | '; 805 $actions['flag'] = "<a href='#' class='no-crazy'>Flag for Follow-up</a> | ";806 $actions['spam'] = "<a href='$spam_url' class='delete:the-comment-list:comment-$comment->comment_ID::spam=1' title='" . __( 'Mark this comment as spam' ) . "'>" . __( 'Spam' ) . '</a> | ';805 if ( 'spam' != $the_comment_status ) 806 $actions['spam'] = "<a href='$spam_url' class='delete:the-comment-list:comment-$comment->comment_ID::spam=1' title='" . __( 'Mark this comment as spam' ) . "'>" . __( 'Spam' ) . '</a> | '; 807 807 $actions['delete'] = "<a href='$delete_url' class='delete:the-comment-list:comment-$comment->comment_ID delete'>" . __('Delete') . '</a>'; 808 808 … … 817 817 } 818 818 819 if ( 'spam' == $the_comment_status )820 unset($actions['spam']);819 if ( 'spam' != $the_comment_status ) 820 $actions['reply'] = ' | <a onclick="commentReply.open(\''.$comment->comment_ID.'\',\''.$post->ID.'\',this);return false;" title="'.__('Reply to this comment').'" href="#">' . __('Reply') . '</a>'; 821 821 822 822 $actions = apply_filters( 'comment_row_actions', $actions, $comment ); 823 823 824 824 foreach ( $actions as $action => $link ) 825 echo "<span class='$action'>$link</span> ";825 echo "<span class='$action'>$link</span>\n"; 826 826 } 827 827 ?> … … 842 842 <?php if ( 'single' !== $mode ) : ?> 843 843 <td class="response-column"> 844 "<?php echo $post_link ?>" <?php echo sprintf('(%s comments)', $post->comment_count); ?><br />844 "<?php echo $post_link ?>" <?php echo sprintf('(%s comments)', $post->comment_count); ?><br /> 845 845 <?php echo get_the_time(__('Y/m/d \a\t g:ia')); ?> 846 846 </td> … … 848 848 </tr> 849 849 <?php 850 } 851 852 function wp_comment_reply($position = '1', $checkbox = false, $mode = 'single') { 853 global $current_user; 854 855 // allow plugin to replace the popup content 856 $content = apply_filters( 'wp_comment_reply', '' ); 857 858 if ( ! empty($content) ) { 859 echo $content; 860 return; 861 } 862 ?> 863 <div id="replyerror" style="display:none;"> 864 <img src="images/logo.gif" /> 865 <h3 class="info-box-title"><?php _e('Comment Reply Error'); ?></h3> 866 <p id="replyerrtext"></p> 867 <p class="submit"><button id="close-button" onclick="commentReply.close();" class="button"><?php _e('Close'); ?></button></p> 868 </div> 869 870 <div id="replydiv" style="display:none;"> 871 <p id="replyhandle"><?php _e('Reply'); ?></p> 872 <form action="" method="post" id="replyform"> 873 <input type="hidden" name="user_ID" id="user_ID" value="<?php echo $current_user->ID; ?>" /> 874 <input type="hidden" name="action" value="replyto-comment" /> 875 <input type="hidden" name="comment_ID" id="comment_ID" value="" /> 876 <input type="hidden" name="comment_post_ID" id="comment_post_ID" value="" /> 877 <input type="hidden" name="position" id="position" value="<?php echo $position; ?>" /> 878 <input type="hidden" name="checkbox" id="checkbox" value="<?php echo $checkbox ? 1 : 0; ?>" /> 879 <input type="hidden" name="mode" id="mode" value="<?php echo $mode; ?>" /> 880 <?php wp_nonce_field( 'replyto-comment', '_ajax_nonce', false ); ?> 881 <?php wp_comment_form_unfiltered_html_nonce(); ?> 882 883 <div id="replycontainer"><textarea rows="5" cols="50" name="replycontent" tabindex="10" id="replycontent"></textarea></div> 884 885 <p id="replysubmit"><input type="button" onclick="commentReply.close();" class="button" value="<?php _e('Cancel'); ?>" /> 886 <input type="button" onclick="commentReply.send();" class="button" value="<?php _e('Submit Reply'); ?>" /></p> 887 </form> 888 </div> 889 <?php 850 890 } 851 891 -
trunk/wp-admin/js/edit-comments.js
r8691 r8720 79 79 theList = $('#the-comment-list').wpList( { alt: '', dimAfter: dimAfter, delAfter: delAfter, addColor: 'none' } ); 80 80 81 } ); 81 }); 82 83 (function($){ 84 85 commentReply = { 86 87 open : function(c, p) { 88 var d = $('#comment-'+c).offset(), H = $('#replydiv').height(), top = 200, left = 100, h = 120; 89 90 if ( d && H ) { 91 top = (d.top - H) < 10 ? 10 : d.top - H - 5; 92 left = d.left; 93 } 94 95 $('#replydiv').show(); 96 $('#replydiv #comment_post_ID').val(p); 97 $('#replydiv #comment_ID').val(c); 98 99 $('#replydiv').draggable({ 100 handle : '#replyhandle', 101 containment : '#wpwrap' 102 }); 103 104 $('#replydiv').resizable({ 105 handles : 'se', 106 minHeight : 200, 107 minWidth : 400, 108 containment : '#wpwrap', 109 resize : function(e,o) { 110 h = o.size.height - 80 - $('#ed_reply_qtags').height(); 111 $('#replycontainer').height(h); 112 }, 113 stop : function(e,o) { 114 if ( $.browser.msie ) 115 $('#replycontent').height(h); 116 } 117 }); 118 119 $('.ui-resizable-se').css({ 120 border: '0 none', 121 width: '11px', 122 height: '12px', 123 background: 'transparent url(images/se.png) no-repeat scroll 0 0' 124 }); 125 126 $('#replydiv').css({ 127 'position' : 'absolute', 128 'top' : top, 129 'left' : left 130 }); 131 132 $('#replycontent').focus().keyup(function(e){ 133 if (e.which == 27) commentReply.close(); // close on Escape 134 }); 135 136 // emulate the Safari/Opera scrollIntoView 137 var to = $('#replydiv').offset(); 138 var scr = document.documentElement.scrollTop ? document.documentElement.scrollTop : 0; 139 140 if ( scr - 20 > to.top ) 141 window.scroll(0, to.top - 100); 142 }, 143 144 close : function() { 145 $('#replycontent').val(''); 146 $('#replyerror').hide(); 147 148 $('#replydiv').draggable('destroy').resizable('destroy').css('position','relative'); 149 $('#replydiv').hide(); 150 return false; 151 }, 152 153 send : function() { 154 var post = {}; 155 156 $('#replyform input').each(function() { 157 post[ $(this).attr('name') ] = $(this).val(); 158 }); 159 160 post.comment = $('#replycontent').val(); 161 post.id = post.comment_post_ID; 162 163 $.ajax({ 164 type : 'POST', 165 url : wpListL10n.url, 166 data : post, 167 success : function(x) { commentReply.show(x); }, 168 error : function(r) { commentReply.error(r); } 169 }); 170 }, 171 172 show : function(xml) { 173 174 if ( typeof(xml) == 'string' ) { 175 this.error({'responseText': xml}); 176 return; 177 } 178 179 var r = wpAjax.parseAjaxResponse(xml); 180 if ( r.errors ) 181 this.error({'responseText': wpAjax.broken}); 182 183 r = r.responses[0]; 184 this.close(); 185 // var scr1 = $('#the-comment-list').offset(), scr2 = $('#the-comment-list').height(); 186 187 if ( r.position == -1 ) { 188 // window.scroll(0, scr1.top - 100); // Scroll to the new comment? Seems annoing.. 189 $('#the-comment-list').prepend(r.data); 190 } else { 191 // window.scroll(0, scr1.top + scr2 + 200); 192 $('#the-comment-list').append(r.data); 193 } 194 195 $('#comment-'+r.id) 196 .animate( { backgroundColor:"#CFEBF7" }, 600 ) 197 .animate( { backgroundColor:"transparent" }, 600 ); 198 }, 199 200 error : function(r) { 201 var er = r.statusText; 202 203 if ( r.responseText ) 204 er = r.responseText.replace( /<.[^<>]*?>/g, '' ); 205 206 if ( er ) { 207 var o = $('#replydiv').offset(); 208 $('#replydiv').hide(); 209 210 $('#replyerror').css({ 211 'top' : o.top + 60 + 'px', 212 'left' : o.left + 'px' 213 }).show().draggable(); 214 215 $('#replyerrtext').html(er) 216 $('#close-button').css('outline','none').focus().keyup(function(e) { 217 if (e.which == 27) commentReply.close(); // close on Escape 218 }); 219 } 220 } 221 } 222 223 $(document).ready(function(){ 224 if ( typeof QTags != 'undefined' ) 225 ed_reply = new QTags('ed_reply', 'replycontent', 'replycontainer', 'more'); 226 }); 227 228 })(jQuery); -
trunk/wp-admin/js/editor.js
r8600 r8720 1 1 wpEditorInit = function() { 2 // Activate tinyMCE if it's the user's default editor 3 if ( ( 'undefined' == typeof wpTinyMCEConfig ) || 'tinymce' == wpTinyMCEConfig.defaultEditor ) { 4 document.getElementById('editorcontainer').style.padding = '0px'; 5 tinyMCE.execCommand("mceAddControl", false, "content"); 2 var H; 3 4 // Activate tinyMCE if it's the user's default editor 5 if ( ( 'undefined' == typeof wpTinyMCEConfig ) || 'tinymce' == wpTinyMCEConfig.defaultEditor ) { 6 try { document.getElementById('editorcontainer').style.padding = '0px'; } catch(e){}; 7 try { document.getElementById("quicktags").style.display = "none"; } catch(e){}; 8 tinyMCE.execCommand("mceAddControl", false, "content"); 6 9 } else { 7 var H; 8 if ( H = tinymce.util.Cookie.getHash("TinyMCE_content_size") ) 9 document.getElementById('content').style.height = H.ch - 30 + 'px'; 10 } 10 if ( H = tinymce.util.Cookie.getHash("TinyMCE_content_size") ) 11 try { document.getElementById('content').style.height = H.ch - 30 + 'px'; } catch(e){}; 12 } 11 13 }; 12 14 13 15 switchEditors = { 14 16 15 17 saveCallback : function(el, content, body) { 16 18 17 18 19 20 21 19 document.getElementById(el).style.color = '#fff'; 20 if ( tinyMCE.activeEditor.isHidden() ) 21 content = document.getElementById(el).value; 22 else 23 content = this.pre_wpautop(content); 22 24 23 24 25 return content; 26 }, 25 27 26 27 28 pre_wpautop : function(content) { 29 // We have a TON of cleanup to do. Line breaks are already stripped. 28 30 29 30 31 32 33 31 // Protect pre|script tags 32 content = content.replace(/<(pre|script)[^>]*>[\s\S]+?<\/\1>/g, function(a) { 33 a = a.replace(/<br ?\/?>[\r\n]*/g, '<wp_temp>'); 34 return a.replace(/<\/?p( [^>]*)?>[\r\n]*/g, '<wp_temp>'); 35 }); 34 36 35 36 37 38 37 // Pretty it up for the source editor 38 var blocklist1 = 'blockquote|ul|ol|li|table|thead|tbody|tr|th|td|div|h[1-6]|p'; 39 content = content.replace(new RegExp('\\s*</('+blocklist1+')>\\s*', 'mg'), '</$1>\n'); 40 content = content.replace(new RegExp('\\s*<(('+blocklist1+')[^>]*)>', 'mg'), '\n<$1>'); 39 41 40 41 42 // Mark </p> if it has any attributes. 43 content = content.replace(new RegExp('(<p [^>]+>.*?)</p>', 'mg'), '$1</p#>'); 42 44 43 44 45 // Sepatate <div> containing <p> 46 content = content.replace(new RegExp('<div([^>]*)>\\s*<p>', 'mgi'), '<div$1>\n\n'); 45 47 46 47 48 49 50 48 // Remove <p> and <br /> 49 content = content.replace(new RegExp('\\s*<p>', 'mgi'), ''); 50 content = content.replace(new RegExp('\\s*</p>\\s*', 'mgi'), '\n\n'); 51 content = content.replace(new RegExp('\\n\\s*\\n', 'mgi'), '\n\n'); 52 content = content.replace(new RegExp('\\s*<br ?/?>\\s*', 'gi'), '\n'); 51 53 52 53 54 54 // Fix some block element newline issues 55 content = content.replace(new RegExp('\\s*<div', 'mg'), '\n<div'); 56 content = content.replace(new RegExp('</div>\\s*', 'mg'), '</div>\n'); 55 57 content = content.replace(new RegExp('\\s*\\[caption([^\\[]+)\\[/caption\\]\\s*', 'gi'), '\n\n[caption$1[/caption]\n\n'); 56 58 content = content.replace(new RegExp('caption\\]\\n\\n+\\[caption', 'g'), 'caption]\n\n[caption'); 57 59 58 59 60 61 60 var blocklist2 = 'blockquote|ul|ol|li|table|thead|tr|th|td|h[1-6]|pre'; 61 content = content.replace(new RegExp('\\s*<(('+blocklist2+') ?[^>]*)\\s*>', 'mg'), '\n<$1>'); 62 content = content.replace(new RegExp('\\s*</('+blocklist2+')>\\s*', 'mg'), '</$1>\n'); 63 content = content.replace(new RegExp('<li([^>]*)>', 'g'), '\t<li$1>'); 62 64 63 64 65 66 65 if ( content.indexOf('<object') != -1 ) { 66 content = content.replace(new RegExp('\\s*<param([^>]*)>\\s*', 'mg'), "<param$1>"); 67 content = content.replace(new RegExp('\\s*</embed>\\s*', 'mg'), '</embed>'); 68 } 67 69 68 69 70 70 // Unmark special paragraph closing tags 71 content = content.replace(new RegExp('</p#>', 'g'), '</p>\n'); 72 content = content.replace(new RegExp('\\s*(<p [^>]+>.*</p>)', 'mg'), '\n$1'); 71 73 72 73 74 74 // Trim whitespace 75 content = content.replace(new RegExp('^\\s*', ''), ''); 76 content = content.replace(new RegExp('[\\s\\u00a0]*$', ''), ''); 75 77 76 77 78 // put back the line breaks in pre|script 79 content = content.replace(/<wp_temp>/g, '\n'); 78 80 79 80 81 81 // Hope. 82 return content; 83 }, 82 84 83 84 85 86 87 88 89 85 go : function(id) { 86 var ed = tinyMCE.get(id); 87 var qt = document.getElementById('quicktags'); 88 var H = document.getElementById('edButtonHTML'); 89 var P = document.getElementById('edButtonPreview'); 90 var ta = document.getElementById(id); 91 var ec = document.getElementById('editorcontainer'); 90 92 91 92 93 if ( ! ed || ed.isHidden() ) { 94 ta.style.color = '#fff'; 93 95 94 95 96 this.edToggle(P, H); 97 edCloseAllTags(); // :-( 96 98 97 98 99 99 qt.style.display = 'none'; 100 ec.style.padding = '0px'; 101 ta.style.padding = '0px'; 100 102 101 103 ta.value = this.wpautop(ta.value); 102 104 103 104 105 if ( ed ) ed.show(); 106 else tinyMCE.execCommand("mceAddControl", false, id); 105 107 106 107 108 109 108 this.wpSetDefaultEditor('tinymce'); 109 } else { 110 this.edToggle(H, P); 111 ta.style.height = ed.getContentAreaContainer().offsetHeight + 6 + 'px'; 110 112 111 112 113 ed.hide(); 114 qt.style.display = 'block'; 113 115 114 116 if ( tinymce.isIE6 ) { 115 117 ta.style.width = '98%'; 116 118 ec.style.padding = '0px'; … … 119 121 ta.style.width = '100%'; 120 122 ec.style.padding = '6px'; 121 123 } 122 124 123 124 125 126 125 ta.style.color = ''; 126 this.wpSetDefaultEditor('html'); 127 } 128 }, 127 129 128 129 130 130 edToggle : function(A, B) { 131 A.className = 'active'; 132 B.className = ''; 131 133 132 133 134 134 B.onclick = A.onclick; 135 A.onclick = null; 136 }, 135 137 136 137 138 139 140 141 138 wpSetDefaultEditor : function(editor) { 139 try { 140 editor = escape( editor.toString() ); 141 } catch(err) { 142 editor = 'tinymce'; 143 } 142 144 143 144 145 146 147 145 var userID = document.getElementById('user-id'); 146 var date = new Date(); 147 date.setTime(date.getTime()+(10*365*24*60*60*1000)); 148 document.cookie = "wordpress_editor_" + userID.value + "=" + editor + "; expires=" + date.toGMTString(); 149 }, 148 150 149 150 151 wpautop : function(pee) { 152 var blocklist = 'table|thead|tfoot|caption|colgroup|tbody|tr|td|th|div|dl|dd|dt|ul|ol|li|pre|select|form|blockquote|address|math|p|h[1-6]'; 151 153 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 154 pee = pee + "\n\n"; 155 pee = pee.replace(new RegExp('<br />\\s*<br />', 'gi'), "\n\n"); 156 pee = pee.replace(new RegExp('(<(?:'+blocklist+')[^>]*>)', 'gi'), "\n$1"); 157 pee = pee.replace(new RegExp('(</(?:'+blocklist+')>)', 'gi'), "$1\n\n"); 158 pee = pee.replace(new RegExp("\\r\\n|\\r", 'g'), "\n"); 159 pee = pee.replace(new RegExp("\\n\\s*\\n+", 'g'), "\n\n"); 160 pee = pee.replace(new RegExp('([\\s\\S]+?)\\n\\n', 'mg'), "<p>$1</p>\n"); 161 pee = pee.replace(new RegExp('<p>\\s*?</p>', 'gi'), ''); 162 pee = pee.replace(new RegExp('<p>\\s*(</?(?:'+blocklist+')[^>]*>)\\s*</p>', 'gi'), "$1"); 163 pee = pee.replace(new RegExp("<p>(<li.+?)</p>", 'gi'), "$1"); 164 pee = pee.replace(new RegExp('<p>\\s*<blockquote([^>]*)>', 'gi'), "<blockquote$1><p>"); 165 pee = pee.replace(new RegExp('</blockquote>\\s*</p>', 'gi'), '</p></blockquote>'); 166 pee = pee.replace(new RegExp('<p>\\s*(</?(?:'+blocklist+')[^>]*>)', 'gi'), "$1"); 167 pee = pee.replace(new RegExp('(</?(?:'+blocklist+')[^>]*>)\\s*</p>', 'gi'), "$1"); 168 pee = pee.replace(new RegExp('\\s*\\n', 'gi'), "<br />\n"); 169 pee = pee.replace(new RegExp('(</?(?:'+blocklist+')[^>]*>)\\s*<br />', 'gi'), "$1"); 170 pee = pee.replace(new RegExp('<br />(\\s*</?(?:p|li|div|dl|dd|dt|th|pre|td|ul|ol)>)', 'gi'), '$1'); 171 pee = pee.replace(new RegExp('(?:<p>|<br ?/?>)*\\s*\\[caption([^\\[]+)\\[/caption\\]\\s*(?:</p>|<br ?/?>)*', 'gi'), '[caption$1[/caption]'); 172 // pee = pee.replace(new RegExp('^((?: )*)\\s', 'mg'), '$1 '); 171 173 172 173 174 // Fix the pre|script tags 175 pee = pee.replace(/<(pre|script)[^>]*>[\s\S]+?<\/\1>/g, function(a) { 174 176 a = a.replace(/<br ?\/?>[\r\n]*/g, '\n'); 175 177 return a.replace(/<\/?p( [^>]*)?>[\r\n]*/g, '\n'); 176 178 }); 177 179 178 179 180 return pee; 181 } 180 182 } -
trunk/wp-admin/post.php
r8691 r8720 131 131 wp_enqueue_script('media-upload'); 132 132 wp_enqueue_script('word-count'); 133 wp_enqueue_script( 'admin-comments' ); 133 134 134 135 if ( current_user_can('edit_post', $post_ID) ) { -
trunk/wp-admin/upload.php
r8682 r8720 10 10 require_once('admin.php'); 11 11 add_thickbox(); 12 wp_enqueue_script('media-upload'); 12 wp_enqueue_script( 'media-upload' ); 13 wp_enqueue_script( 'quicktags' ); 13 14 14 15 if (!current_user_can('upload_files')) … … 264 265 </div> 265 266 266 <?php include('admin-footer.php'); ?> 267 <?php 268 wp_comment_reply(); 269 include('admin-footer.php'); 270 ?> -
trunk/wp-admin/wp-admin.css
r8700 r8720 321 321 } 322 322 323 #ed_toolbar input { 323 #ed_toolbar input, 324 #ed_reply_toolbar input { 324 325 margin: 3px 2px 2px; 325 326 padding: 2px 4px; … … 328 329 } 329 330 330 #quicktags #ed_strong { 331 #quicktags #ed_strong, 332 #ed_reply_toolbar #ed_reply_strong { 331 333 font-weight: bold; 332 334 } 333 335 334 #quicktags #ed_link { 336 #quicktags #ed_link, 337 #ed_reply_toolbar #ed_reply_link { 335 338 text-decoration: underline; 336 339 } 337 340 338 #quicktags #ed_del { 341 #quicktags #ed_del, 342 #ed_reply_toolbar #ed_reply_del { 339 343 text-decoration: line-through; 340 344 } 341 345 342 #quicktags #ed_em { 346 #quicktags #ed_em, 347 #ed_reply_toolbar #ed_reply_em { 343 348 font-style: italic; 344 349 } 345 350 346 #quicktags #ed_code { 351 #quicktags #ed_code, 352 #ed_reply_toolbar #ed_reply_code { 347 353 font-family: "Courier New", Courier, mono; 348 354 font-size: 1.1em; … … 503 509 } 504 510 511 .comment-column p { 512 margin-top: 0; 513 } 514 505 515 .comment-column { 506 516 width: 50%; 507 }508 509 .comment-column p {510 margin-top: 0;511 517 } 512 518 … … 1761 1767 line-height: 2; 1762 1768 margin: 0; 1763 padding: 0 7px; 1769 padding: 4px 8px; 1770 font: 18px Georgia, "Times New Roman", Times, serif; 1764 1771 } 1765 1772 … … 1810 1817 } 1811 1818 1812 1813 /* fixed bottom bar */1814 .postarea h3 label {1815 1816 }1817 1818 #footer {1819 z-index: -1;1820 }1821 1822 #fixedbar {1823 bottom:0pt;1824 height:80px;1825 position:fixed;1826 width:100%;1827 z-index: 100;1828 }1829 1830 #fixedbar #submitpost {1831 1832 }1833 1834 #fixedbar .submit {1835 padding-top: 10px;1836 }1837 1838 #fixedbar .button {1839 border: none;1840 -moz-border-radius: 6px;1841 -khtml-border-radius: 6px;1842 -webkit-border-radius: 6px;1843 border-radius: 6px;1844 }1845 1846 #fixedbar .button:hover {1847 background: #fff;1848 }1849 1850 #fixedbar #publish {1851 font-weight:bold;1852 width:160px;1853 }1854 1855 #fixedbar #save-post {1856 width:80px;1857 font-weight:normal;1858 }1859 1860 #fixedbar .submitbox {1861 padding: 14px 18px;1862 border-left: 1px solid #aaa;1863 width: 690px;1864 }1865 1866 #fixedbar #post-time-info,1867 #fixedbar #comment-time-info {1868 margin-top: 16px;1869 }1870 1871 #fixedbar #timestampdiv input,1872 #fixedbar #timestampdiv select {1873 background-color:#464646;1874 border:1px solid #777777;1875 color:#CCCCCC;1876 padding:2px;1877 }1878 1879 #fixedbar-wrap {1880 width: 100%;1881 }1882 1883 #preview-link {1884 text-align: right;1885 }1886 1887 #preview-link a {1888 padding-right:10px;1889 }1890 1891 1819 p#post-search-prep { 1892 margin: 0pt;1893 position: absolute;1894 right: 20px;1895 top: 50px;1820 margin: 0; 1821 position: absolute; 1822 right: 20px; 1823 top: 50px; 1896 1824 } 1897 1825 … … 1916 1844 1917 1845 /* media popup 0819 */ 1918 1919 1846 #sidemenu { 1920 1847 margin: -30px 15px 0 315px; … … 2001 1928 width:200px; 2002 1929 } 1930 1931 /* reply to comments */ 1932 #replydiv { 1933 width: 700px; 1934 border-color: #EBEBEB #CCCCCC #CCCCCC #EBEBEB; 1935 border-width: 1px; 1936 border-style: solid; 1937 padding: 2px; 1938 background-color: #fff; 1939 left: 20px; 1940 top: 300px; 1941 } 1942 1943 #replydiv #editorcontainer { 1944 border: 0 none; 1945 } 1946 1947 #replysubmit { 1948 margin: 0; 1949 padding: 3px 5px; 1950 background-color: #EAF3FA; 1951 border-top: 1px solid #ddd; 1952 } 1953 1954 #replydiv #editor-toolbar { 1955 display: none; 1956 } 1957 1958 #replydiv #replyhandle { 1959 cursor: move; 1960 margin: 0; 1961 font-size: 14px; 1962 font-weight: bold; 1963 padding: 7px; 1964 } 1965 1966 #replycontainer { 1967 padding: 6px; 1968 border: 0 none; 1969 height: 100%; 1970 overflow: hidden; 1971 } 1972 1973 #replycontent { 1974 resize: none; 1975 margin: 0; 1976 width: 100%; 1977 height: 100%; 1978 padding: 0; 1979 line-height: 150%; 1980 border: 0 none; 1981 outline: none; 1982 } 1983 1984 #ed_reply_toolbar { 1985 margin: 0; 1986 padding: 2px 4px; 1987 } 1988 1989 #replyerror { 1990 border: 5px solid #ddd; 1991 background-color: #f8f8f8; 1992 position: absolute; 1993 padding: 15px 15px 10px; 1994 width: 500px; 1995 z-index: 1000; 1996 display: none; 1997 } 1998 1999 #replyerror img { 2000 float: right; 2001 margin: 15px; 2002 } 2003 2004 #replyerror p.submit { 2005 padding: 10px 0 0; 2006 } 2007 2008 #replyerror .error { 2009 margin: 15px 0 0; 2010 } -
trunk/wp-comments-post.php
r8149 r8720 67 67 wp_die( __('Error: please type a comment.') ); 68 68 69 $commentdata = compact('comment_post_ID', 'comment_author', 'comment_author_email', 'comment_author_url', 'comment_content', 'comment_type', 'user_ID'); 69 $comment_parent = isset($_POST['comment_parent']) ? absint($_POST['comment_parent']) : 0; 70 71 $commentdata = compact('comment_post_ID', 'comment_author', 'comment_author_email', 'comment_author_url', 'comment_content', 'comment_type', 'comment_parent', 'user_ID'); 70 72 71 73 $comment_id = wp_new_comment( $commentdata ); -
trunk/wp-includes/comment.php
r8622 r8720 392 392 $dupe .= "OR comment_author_email = '$comment_author_email' "; 393 393 $dupe .= ") AND comment_content = '$comment_content' LIMIT 1"; 394 if ( $wpdb->get_var($dupe) ) 394 if ( $wpdb->get_var($dupe) ) { 395 if ( defined('DOING_AJAX') ) 396 die( __('Duplicate comment detected; it looks as though you\'ve already said that!') ); 397 395 398 wp_die( __('Duplicate comment detected; it looks as though you\'ve already said that!') ); 399 } 396 400 397 401 do_action( 'check_comment_flood', $comment_author_IP, $comment_author_email, $comment_date_gmt ); … … 444 448 if ( $flood_die ) { 445 449 do_action('comment_flood_trigger', $time_lastcomment, $time_newcomment); 450 451 if ( defined('DOING_AJAX') ) 452 die( __('You are posting comments too quickly. Slow down.') ); 453 446 454 wp_die( __('You are posting comments too quickly. Slow down.') ); 447 455 } … … 753 761 $commentdata['comment_post_ID'] = (int) $commentdata['comment_post_ID']; 754 762 $commentdata['user_ID'] = (int) $commentdata['user_ID']; 763 764 $commentdata['comment_parent'] = absint($commentdata['comment_parent']); 765 $parent_status = ( 0 < $commentdata['comment_parent'] ) ? wp_get_comment_status($commentdata['comment_parent']) : ''; 766 $commentdata['comment_parent'] = ( 'approved' == $parent_status || 'unapproved' == $parent_status ) ? $commentdata['comment_parent'] : 0; 755 767 756 768 $commentdata['comment_author_IP'] = preg_replace( '/[^0-9a-fA-F:., ]/', '',$_SERVER['REMOTE_ADDR'] ); -
trunk/wp-includes/general-template.php
r8691 r8720 956 956 $rows = "rows='$rows'"; ?> 957 957 <div id="editor-toolbar"> 958 <?php if ( user_can_richedit() ) {958 <?php if ( user_can_richedit() && $media_buttons ) { 959 959 $wp_default_editor = wp_default_editor(); ?> 960 960 <div class="zerosize"><input accesskey="e" type="button" onclick="switchEditors.go('<?php echo $id; ?>')" /></div> … … 968 968 <a id="edButtonPreview" onclick="switchEditors.go('<?php echo $id; ?>');"><?php _e('Visual'); ?></a> 969 969 <?php } 970 } 970 } else 971 add_filter('the_editor_content', 'wp_htmledit_pre'); 971 972 972 973 /* if ( $media_buttons ) { ?> … … 982 983 </div> 983 984 984 <?php if ( 'html' != $wp_default_editor ) : ?> 985 <script type="text/javascript"> 986 // <![CDATA[ 987 if ( typeof tinyMCE != "undefined" ) 988 document.getElementById("quicktags").style.display="none"; 989 // ]]> 990 </script> 991 <?php endif; // 'html' != $wp_default_editor 992 993 $the_editor = apply_filters('the_editor', "<div id='editorcontainer'><textarea class='' $rows cols='40' name='$id' tabindex='$tab_index' id='$id'>%s</textarea></div>\n"); 985 <?php $the_editor = apply_filters('the_editor', "<div id='editorcontainer'><textarea $rows cols='40' name='$id' tabindex='$tab_index' id='$id'>%s</textarea></div>\n"); 994 986 $the_editor_content = apply_filters('the_editor_content', $content); 995 987 … … 997 989 998 990 ?> 999 1000 1001 1002 <?php if ( $prev_id && user_can_richedit() ) :?>1003 1004 1005 1006 1007 1008 1009 1010 1011 1012 1013 1014 1015 1016 1017 1018 1019 1020 <?php endif;?>1021 1022 1023 991 <script type="text/javascript"> 992 // <![CDATA[ 993 edCanvas = document.getElementById('<?php echo $id; ?>'); 994 <?php if ( user_can_richedit() && $prev_id ) { ?> 995 // If tinyMCE is defined. 996 if ( typeof tinyMCE != 'undefined' ) { 997 // This code is meant to allow tabbing from Title to Post (TinyMCE). 998 document.getElementById('<?php echo $prev_id; ?>').onkeydown = function (e) { 999 e = e || window.event; 1000 if (e.keyCode == 9 && !e.shiftKey && !e.controlKey && !e.altKey) { 1001 if ( tinyMCE.activeEditor ) { 1002 if ( (jQuery("#post_ID").val() < 1) && (jQuery("#title").val().length > 0) ) { autosave(); } 1003 e = null; 1004 if ( tinyMCE.activeEditor.isHidden() ) return true; 1005 tinyMCE.activeEditor.focus(); 1006 return false; 1007 } 1008 return true; 1009 } 1010 } 1011 } 1012 <?php } ?> 1013 // ]]> 1014 </script> 1015 <?php 1024 1016 } 1025 1017 -
trunk/wp-includes/js/quicktags.js
r7130 r8720 388 388 } 389 389 } 390 391 392 // Allow multiple instances. 393 // Name = unique value, id = textarea id, container = container div. 394 // Can disable some buttons by passing comma delimited string as 4th param. 395 var QTags = function(name, id, container, disabled) { 396 var t = this; 397 398 t.Buttons = []; 399 t.Links = []; 400 t.OpenTags = []; 401 t.Canvas = document.getElementById(id); 402 403 disabled = ( typeof disabled != 'undefined' ) ? ','+disabled+',' : ''; 404 405 t.edShowButton = function(button, i) { 406 if ( disabled && (disabled.indexOf(','+button.display+',') != -1) ) 407 return ''; 408 else if ( button.id == name+'_img' ) 409 return '<input type="button" id="' + button.id + '" accesskey="' + button.access + '" class="ed_button" onclick="edInsertImage('+name+'.Canvas);" value="' + button.display + '" />'; 410 else if (button.id == name+'_link') 411 return '<input type="button" id="' + button.id + '" accesskey="' + button.access + '" class="ed_button" onclick="'+name+'.edInsertLink('+i+');" value="'+button.display+'" />'; 412 else 413 return '<input type="button" id="' + button.id + '" accesskey="'+button.access+'" class="ed_button" onclick="'+name+'.edInsertTag('+i+');" value="'+button.display+'" />'; 414 }; 415 416 t.edAddTag = function(button) { 417 if ( t.Buttons[button].tagEnd != '' ) { 418 t.OpenTags[t.OpenTags.length] = button; 419 document.getElementById(t.Buttons[button].id).value = '/' + document.getElementById(t.Buttons[button].id).value; 420 } 421 }; 422 423 t.edRemoveTag = function(button) { 424 for ( var i = 0; i < t.OpenTags.length; i++ ) { 425 if ( t.OpenTags[i] == button ) { 426 t.OpenTags.splice(i, 1); 427 document.getElementById(t.Buttons[button].id).value = document.getElementById(t.Buttons[button].id).value.replace('/', ''); 428 } 429 } 430 }; 431 432 t.edCheckOpenTags = function(button) { 433 var tag = 0; 434 for ( var i = 0; i < t.OpenTags.length; i++ ) { 435 if ( t.OpenTags[i] == button ) 436 tag++; 437 } 438 if ( tag > 0 ) return true; // tag found 439 else return false; // tag not found 440 }; 441 442 this.edCloseAllTags = function() { 443 var count = t.OpenTags.length; 444 for ( var o = 0; o < count; o++ ) 445 t.edInsertTag(t.OpenTags[t.OpenTags.length - 1]); 446 }; 447 448 this.edQuickLink = function(i, thisSelect) { 449 if ( i > -1 ) { 450 var newWin = ''; 451 if ( Links[i].newWin == 1 ) { 452 newWin = ' target="_blank"'; 453 } 454 var tempStr = '<a href="' + Links[i].URL + '"' + newWin + '>' 455 + Links[i].display 456 + '</a>'; 457 thisSelect.selectedIndex = 0; 458 edInsertContent(t.Canvas, tempStr); 459 } else { 460 thisSelect.selectedIndex = 0; 461 } 462 }; 463 464 // insertion code 465 t.edInsertTag = function(i) { 466 //IE support 467 if ( document.selection ) { 468 t.Canvas.focus(); 469 sel = document.selection.createRange(); 470 if ( sel.text.length > 0 ) { 471 sel.text = t.Buttons[i].tagStart + sel.text + t.Buttons[i].tagEnd; 472 } else { 473 if ( ! t.edCheckOpenTags(i) || t.Buttons[i].tagEnd == '' ) { 474 sel.text = t.Buttons[i].tagStart; 475 t.edAddTag(i); 476 } else { 477 sel.text = t.Buttons[i].tagEnd; 478 t.edRemoveTag(i); 479 } 480 } 481 t.Canvas.focus(); 482 } else if ( t.Canvas.selectionStart || t.Canvas.selectionStart == '0' ) { //MOZILLA/NETSCAPE support 483 var startPos = t.Canvas.selectionStart; 484 var endPos = t.Canvas.selectionEnd; 485 var cursorPos = endPos; 486 var scrollTop = t.Canvas.scrollTop; 487 488 if ( startPos != endPos ) { 489 t.Canvas.value = t.Canvas.value.substring(0, startPos) 490 + t.Buttons[i].tagStart 491 + t.Canvas.value.substring(startPos, endPos) 492 + t.Buttons[i].tagEnd 493 + t.Canvas.value.substring(endPos, t.Canvas.value.length); 494 cursorPos += t.Buttons[i].tagStart.length + t.Buttons[i].tagEnd.length; 495 } else { 496 if ( !t.edCheckOpenTags(i) || t.Buttons[i].tagEnd == '' ) { 497 t.Canvas.value = t.Canvas.value.substring(0, startPos) 498 + t.Buttons[i].tagStart 499 + t.Canvas.value.substring(endPos, t.Canvas.value.length); 500 t.edAddTag(i); 501 cursorPos = startPos + t.Buttons[i].tagStart.length; 502 } else { 503 t.Canvas.value = t.Canvas.value.substring(0, startPos) 504 + t.Buttons[i].tagEnd 505 + t.Canvas.value.substring(endPos, t.Canvas.value.length); 506 t.edRemoveTag(i); 507 cursorPos = startPos + t.Buttons[i].tagEnd.length; 508 } 509 } 510 t.Canvas.focus(); 511 t.Canvas.selectionStart = cursorPos; 512 t.Canvas.selectionEnd = cursorPos; 513 t.Canvas.scrollTop = scrollTop; 514 } else { 515 if ( ! t.edCheckOpenTags(i) || t.Buttons[i].tagEnd == '' ) { 516 t.Canvas.value += Buttons[i].tagStart; 517 t.edAddTag(i); 518 } else { 519 t.Canvas.value += Buttons[i].tagEnd; 520 t.edRemoveTag(i); 521 } 522 t.Canvas.focus(); 523 } 524 }; 525 526 this.edInsertLink = function(i, defaultValue) { 527 if ( ! defaultValue ) 528 defaultValue = 'http://'; 529 530 if ( ! t.edCheckOpenTags(i) ) { 531 var URL = prompt(quicktagsL10n.enterURL, defaultValue); 532 if ( URL ) { 533 t.Buttons[i].tagStart = '<a href="' + URL + '">'; 534 t.edInsertTag(i); 535 } 536 } else { 537 t.edInsertTag(i); 538 } 539 }; 540 541 this.edInsertImage = function() { 542 var myValue = prompt(quicktagsL10n.enterImageURL, 'http://'); 543 if ( myValue ) { 544 myValue = '<img src="' 545 + myValue 546 + '" alt="' + prompt(quicktagsL10n.enterImageDescription, '') 547 + '" />'; 548 edInsertContent(t.Canvas, myValue); 549 } 550 }; 551 552 t.Buttons[t.Buttons.length] = new edButton(name+'_strong','b','<strong>','</strong>','b'); 553 t.Buttons[t.Buttons.length] = new edButton(name+'_em','i','<em>','</em>','i'); 554 t.Buttons[t.Buttons.length] = new edButton(name+'_link','link','','</a>','a'); // special case 555 t.Buttons[t.Buttons.length] = new edButton(name+'_block','b-quote','\n\n<blockquote>','</blockquote>\n\n','q'); 556 t.Buttons[t.Buttons.length] = new edButton(name+'_del','del','<del datetime="' + datetime + '">','</del>','d'); 557 t.Buttons[t.Buttons.length] = new edButton(name+'_ins','ins','<ins datetime="' + datetime + '">','</ins>','s'); 558 t.Buttons[t.Buttons.length] = new edButton(name+'_img','img','','','m',-1); // special case 559 t.Buttons[t.Buttons.length] = new edButton(name+'_ul','ul','<ul>\n','</ul>\n\n','u'); 560 t.Buttons[t.Buttons.length] = new edButton(name+'_ol','ol','<ol>\n','</ol>\n\n','o'); 561 t.Buttons[t.Buttons.length] = new edButton(name+'_li','li','\t<li>','</li>\n','l'); 562 t.Buttons[t.Buttons.length] = new edButton(name+'_code','code','<code>','</code>','c'); 563 t.Buttons[t.Buttons.length] = new edButton(name+'_more','more','<!--more-->','','t',-1); 564 // t.Buttons[t.Buttons.length] = new edButton(name+'_next','page','<!--nextpage-->','','p',-1); 565 566 var tb = document.createElement('div'); 567 tb.id = name+'_qtags'; 568 569 var html = '<div id="'+name+'_toolbar">'; 570 for (var i = 0; i < t.Buttons.length; i++) 571 html += t.edShowButton(t.Buttons[i], i); 572 573 html += '<input type="button" id="'+name+'_ed_spell" class="ed_button" onclick="edSpell('+name+'.Canvas);" title="' + quicktagsL10n.dictionaryLookup + '" value="' + quicktagsL10n.lookup + '" />'; 574 html += '<input type="button" id="'+name+'_ed_close" class="ed_button" onclick="'+name+'.edCloseAllTags();" title="' + quicktagsL10n.closeAllOpenTags + '" value="' + quicktagsL10n.closeTags + '" /></div>'; 575 576 tb.innerHTML = html; 577 var cont = document.getElementById(container); 578 cont.parentNode.insertBefore(tb, cont); 579 580 }; -
trunk/wp-includes/script-loader.php
r8691 r8720 16 16 $scripts->add( 'sack', '/wp-includes/js/tw-sack.js', false, '1.6.1' ); 17 17 18 $scripts->add( 'quicktags', '/wp-includes/js/quicktags.js', false, ' 3958' );18 $scripts->add( 'quicktags', '/wp-includes/js/quicktags.js', false, '20080823' ); 19 19 $scripts->localize( 'quicktags', 'quicktagsL10n', array( 20 20 'quickLinks' => __('(Quick Links)'), … … 35 35 $scripts->add( 'editor', false, $visual_editor, '20080321' ); 36 36 37 $scripts->add( 'editor_functions', '/wp-admin/js/editor.js', false, '20080 710' );37 $scripts->add( 'editor_functions', '/wp-admin/js/editor.js', false, '20080823' ); 38 38 39 39 // Modify this version when tinyMCE plugins are changed. … … 104 104 $scripts->add( 'jquery-ui-tabs', '/wp-includes/js/jquery/ui.tabs.js', array('jquery-ui-core'), '1.5.2' ); 105 105 $scripts->add( 'jquery-ui-sortable', '/wp-includes/js/jquery/ui.sortable.js', array('jquery-ui-core'), '1.5.2' ); 106 $scripts->add( 'jquery-ui-draggable', '/wp-includes/js/jquery/ui.draggable.js', array('jquery-ui-core'), '1.5.2' ); 107 $scripts->add( 'jquery-ui-resizable', '/wp-includes/js/jquery/ui.resizable.js', array('jquery-ui-core'), '1.5.2' ); 108 $scripts->add( 'jquery-ui-dialog', '/wp-includes/js/jquery/ui.dialog.js', array('jquery-ui-resizable', 'jquery-ui-draggable'), '1.5.2' ); 106 109 107 110 if ( is_admin() ) { … … 121 124 'strong' => __('Strong') 122 125 ) ); 123 $scripts->add( 'admin-comments', '/wp-admin/js/edit-comments.js', array('wp-lists' ), '20080311' );126 $scripts->add( 'admin-comments', '/wp-admin/js/edit-comments.js', array('wp-lists', 'jquery-ui-draggable', 'jquery-ui-resizable'), '20080821' ); 124 127 $scripts->localize( 'admin-comments', 'adminCommentsL10n', array( 125 128 'pending' => __('%i% pending') // must look like: "# blah blah" -
trunk/xmlrpc.php
r8698 r8720 1089 1089 } 1090 1090 } 1091 1092 $comment['comment_parent'] = isset($content_struct['comment_parent']) ? absint($content_struct['comment_parent']) : 0; 1091 1093 1092 1094 $comment['comment_content'] = $content_struct['content'];
Note: See TracChangeset
for help on using the changeset viewer.