Changeset 6567
- Timestamp:
- 01/06/2008 07:01:32 PM (17 years ago)
- Location:
- trunk
- Files:
-
- 8 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/wp-admin/edit-form-advanced.php
r6544 r6567 51 51 ?> 52 52 53 <input type="hidden" name="user_ID" value="<?php echo (int) $user_ID ?>" />53 <input type="hidden" id="user-id" name="user_ID" value="<?php echo (int) $user_ID ?>" /> 54 54 <input type="hidden" id="hiddenaction" name="action" value="<?php echo $form_action ?>" /> 55 55 <input type="hidden" id="originalaction" name="originalaction" value="<?php echo $form_action ?>" /> -
trunk/wp-admin/edit-form.php
r6081 r6567 7 7 <input type="hidden" name="mode" value="bookmarklet" /> 8 8 <?php endif; ?> 9 <input type="hidden" name="user_ID" value="<?php echo (int) $user_ID ?>" />9 <input type="hidden" id="user-id" name="user_ID" value="<?php echo (int) $user_ID ?>" /> 10 10 <input type="hidden" name="action" value='post' /> 11 11 -
trunk/wp-admin/edit-page-form.php
r6433 r6567 34 34 } 35 35 ?> 36 <input type="hidden" name="user_ID" value="<?php echo $user_ID ?>" />36 <input type="hidden" id="user-id" name="user_ID" value="<?php echo $user_ID ?>" /> 37 37 <input type="hidden" id="hiddenaction" name="action" value='<?php echo $form_action ?>' /> 38 38 <input type="hidden" id="originalaction" name="originalaction" value="<?php echo $form_action ?>" /> -
trunk/wp-admin/wp-admin.css
r6559 r6567 401 401 #postdiv #quicktags { 402 402 padding-right: 6px; 403 }404 405 #postdivrich #quicktags {406 display: none;407 403 } 408 404 -
trunk/wp-includes/general-template.php
r6544 r6567 908 908 } 909 909 910 function wp_default_editor() { 911 $r = user_can_richedit() ? 'tinymce' : 'html'; // defaults 912 if ( $user = wp_get_current_user() ) { // look for cookie 913 if ( isset($_COOKIE['wordpress_editor_' . $user->ID]) && in_array($_COOKIE['wordpress_editor_' . $user->ID], array('tinymce', 'html', 'test') ) ) 914 $r = $_COOKIE['wordpress_editor_' . $user->ID]; 915 } 916 return apply_filters( 'wp_default_editor', $r ); // filter 917 } 918 910 919 function the_editor($content, $id = 'content', $prev_id = 'title') { 911 920 $rows = get_option('default_post_edit_rows'); … … 916 925 917 926 if ( user_can_richedit() ) : 918 add_filter('the_editor_content', 'wp_richedit_pre'); 927 $wp_default_editor = wp_default_editor(); 928 $active = " class='active'"; 929 $inactive = " onclick='switchEditors(\"$id\");'"; 930 931 if ( 'tinymce' == $wp_default_editor ) 932 add_filter('the_editor_content', 'wp_richedit_pre'); 919 933 920 934 // The following line moves the border so that the active button "attaches" to the toolbar. Only IE needs it. … … 926 940 <div id='editor-toolbar' style='display:none;'> 927 941 <div class='zerosize'><input accesskey='e' type='button' onclick='switchEditors("<?php echo $id; ?>")' /></div> 928 <a id='edButtonHTML' class='' onclick='switchEditors("<?php echo $id; ?>")'><?php _e('HTML'); ?></a> 929 <a id='edButtonPreview' class='active'><?php _e('Visual'); ?></a> 930 <div id="media-buttons"> 931 <?php _e('Add media:'); ?> 932 <?php do_action( 'media_buttons'); ?> 933 </div> 942 <a id='edButtonHTML'<?php echo 'html' == $wp_default_editor ? $active : $inactive; ?>><?php _e('HTML'); ?></a> 943 <a id='edButtonPreview'<?php echo 'tinymce' == $wp_default_editor ? $active : $inactive; ?>><?php _e('Visual'); ?></a> 944 945 <div id="media-buttons"> 946 <?php _e('Add media:'); ?> 947 <?php do_action( 'media_buttons'); ?> 948 </div> 934 949 </div> 950 935 951 <script type="text/javascript"> 936 952 // <![CDATA[ … … 940 956 </script> 941 957 942 <?php endif; ?> 958 <?php endif; // user_can_richedit() ?> 959 943 960 <div id="quicktags"> 944 961 <?php wp_print_scripts( 'quicktags' ); ?> 945 962 <script type="text/javascript">edToolbar()</script> 946 963 </div> 964 965 <?php if ( 'html' != $wp_default_editor ) : ?> 947 966 <script type="text/javascript"> 948 967 // <![CDATA[ … … 951 970 // ]]> 952 971 </script> 953 <?php 954 955 $the_editor = apply_filters('the_editor', "<div><textarea class=' mceEditor' $rows cols='40' name='$id' tabindex='2' id='$id'>%s</textarea></div>\n");972 <?php endif; // 'html' != $wp_default_editor 973 974 $the_editor = apply_filters('the_editor', "<div><textarea class='' $rows cols='40' name='$id' tabindex='2' id='$id'>%s</textarea></div>\n"); 956 975 $the_editor_content = apply_filters('the_editor_content', $content); 957 976 -
trunk/wp-includes/js/tinymce/plugins/wordpress/editor_plugin.js
r6547 r6567 524 524 pdr.style.overflow = 'display'; 525 525 } 526 wpSetDefaultEditor( 'html' ); 526 527 } else { 527 528 edToggle(P, H); … … 558 559 pdr.style.overflow = 'display'; 559 560 } 561 wpSetDefaultEditor( 'tinymce' ); 560 562 } 561 563 } … … 567 569 B.onclick = A.onclick; 568 570 A.onclick = null; 571 } 572 573 function wpSetDefaultEditor( editor ) { 574 try { 575 editor = escape( editor.toString() ); 576 } catch(err) { 577 editor = 'tinymce'; 578 } 579 580 var userID = document.getElementById('user-id'); 581 var date = new Date(); 582 date.setTime(date.getTime()+(10*365*24*60*60*1000)); 583 document.cookie = "wordpress_editor_" + userID.value + "=" + editor + "; expires=" + date.toGMTString(); 569 584 } 570 585 -
trunk/wp-includes/js/tinymce/tiny_mce_config.php
r6405 r6567 55 55 ?> 56 56 57 wpEditorInit = function() { 58 // Activate tinyMCE if it's the user's default editor 59 if ( ( 'undefined' == typeof wpTinyMCEConfig ) || 'tinymce' == wpTinyMCEConfig.defaultEditor ) 60 tinyMCE.execCommand("mceAddControl", true, 'content'); 61 }; 62 57 63 initArray = { 58 64 mode : "specific_textareas", 59 65 editor_selector : "mceEditor", 66 oninit : "wpEditorInit", 60 67 width : "100%", 61 68 theme : "advanced", -
trunk/wp-includes/script-loader.php
r6561 r6567 32 32 33 33 // Modify this version when tinyMCE plugins are changed 34 $this->add( 'tiny_mce', '/wp-includes/js/tinymce/tiny_mce_gzip.php', false, '2008010 3' );34 $this->add( 'tiny_mce', '/wp-includes/js/tinymce/tiny_mce_gzip.php', false, '20080105' ); 35 35 36 36 $mce_config = apply_filters('tiny_mce_config_url', '/wp-includes/js/tinymce/tiny_mce_config.php'); 37 $this->add( 'wp_tiny_mce', $mce_config, array('tiny_mce'), '20070528' ); 37 $this->add( 'wp_tiny_mce', $mce_config, array('tiny_mce'), '20080105' ); 38 $this->localize( 'wp_tiny_mce', 'wpTinyMCEConfig', array( 'defaultEditor' => wp_default_editor() ) ); 38 39 39 40 $this->add( 'prototype', '/wp-includes/js/prototype.js', false, '1.6');
Note: See TracChangeset
for help on using the changeset viewer.