Changeset 4210
- Timestamp:
- 09/22/06 22:24:50 (2 years ago)
- Files:
-
- trunk/wp-admin/admin-functions.php (modified) (1 diff)
- trunk/wp-admin/comment.php (modified) (1 diff)
- trunk/wp-includes/general-template.php (modified) (2 diffs)
- trunk/wp-includes/js/tinymce/plugins/wordpress/editor_plugin.js (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
trunk/wp-admin/admin-functions.php
r4206 r4210 1964 1964 } 1965 1965 1966 function user_can_richedit() {1967 if ( 'true' != get_user_option('rich_editing') )1968 return false;1969 1970 if ( preg_match('!opera[ /][2-8]|konqueror|safari!i', $_SERVER['HTTP_USER_AGENT']) )1971 return false;1972 1973 return true; // Best guess1974 }1975 1976 1966 function the_attachment_links($id = false) { 1977 1967 $id = (int) $id; trunk/wp-admin/comment.php
r4144 r4210 13 13 case 'editcomment': 14 14 $title = __('Edit Comment'); 15 if ( user_can_richedit() ) 16 wp_enqueue_script( 'wp_tiny_mce' ); 15 17 16 require_once ('admin-header.php'); 18 17 trunk/wp-includes/general-template.php
r4206 r4210 736 736 } 737 737 738 function user_can_richedit() { 739 $can = true; 740 741 if ( 'true' != get_user_option('rich_editing') || preg_match('!opera[ /][2-8]|konqueror|safari!i', $_SERVER['HTTP_USER_AGENT']) ) 742 $can = false; 743 744 return apply_filters('user_can_richedit', $can); 745 } 746 738 747 function the_editor($content, $id = 'content', $prev_id = 'title') { 739 748 $rows = get_option('default_post_edit_rows'); … … 748 757 // The following line moves the border so that the active button "attaches" to the toolbar. Only IE needs it. 749 758 ?> 750 < !--[if IE]><style type="text/css">759 <style type="text/css"> 751 760 #postdivrich table, #postdivrich #quicktags {border-top: none;} 752 761 #quicktags {border-bottom: none; padding-bottom: 2px; margin-bottom: -1px;} 753 762 #edButtons {border-bottom: 1px solid #ccc;} 754 </style> <![endif]-->763 </style> 755 764 <div id='edButtons' style='display:none;'> 756 765 <div class='zerosize'><input accesskey='e' type='button' onclick='switchEditors("<?php echo $id; ?>")' /></div> trunk/wp-includes/js/tinymce/plugins/wordpress/editor_plugin.js
r4206 r4210 474 474 var H = document.getElementById('edButtonHTML'); 475 475 var P = document.getElementById('edButtonPreview'); 476 var pdr = document.getElementById('postdivrich');477 476 var ta = document.getElementById(id); 477 var pdr = ta.parentNode; 478 478 479 479 if ( inst ) { … … 492 492 var table = document.getElementById(inst.editorId + '_parent').getElementsByTagName('table')[0]; 493 493 var y1 = table.offsetTop + table.offsetHeight; 494 495 if ( TinyMCE_AdvancedTheme._getCookie("TinyMCE_" + inst.editorId + "_height") == null ) { 496 var expires = new Date(); 497 expires.setTime(expires.getTime() + 3600000 * 24 * 30); 498 var offset = tinyMCE.isMSIE ? 1 : 2; 499 TinyMCE_AdvancedTheme._setCookie("TinyMCE_" + inst.editorId + "_height", "" + (table.offsetHeight - offset), expires); 500 } 494 501 495 502 // Unload the rich editor
