diff options
| author | donncha <donncha@7be80a69-a1ef-0310-a953-fb0f7c49ff36> | 2005-12-01 15:28:34 +0000 |
|---|---|---|
| committer | donncha <donncha@7be80a69-a1ef-0310-a953-fb0f7c49ff36> | 2005-12-01 15:28:34 +0000 |
| commit | ca460de5458e35b012e643b2af4880312c06d0f6 (patch) | |
| tree | ebe8e430f2a863ae7b6671ea3e51ff1eaee0bb7a | |
| parent | 814b39931c8ff188122ba77b78388b4fbe7008df (diff) | |
| download | wordpress-mu-ca460de5458e35b012e643b2af4880312c06d0f6.tar.gz wordpress-mu-ca460de5458e35b012e643b2af4880312c06d0f6.tar.xz wordpress-mu-ca460de5458e35b012e643b2af4880312c06d0f6.zip | |
WP Merge
git-svn-id: http://svn.automattic.com/wordpress-mu/trunk@454 7be80a69-a1ef-0310-a953-fb0f7c49ff36
| -rw-r--r-- | wp-inst/wp-admin/admin-functions.php | 8 | ||||
| -rw-r--r-- | wp-inst/wp-admin/admin-header.php | 15 | ||||
| -rw-r--r-- | wp-inst/wp-admin/inline-uploading.php | 19 | ||||
| -rw-r--r-- | wp-inst/wp-admin/upgrade-functions.php | 2 | ||||
| -rw-r--r-- | wp-inst/wp-admin/upgrade-schema.php | 1 | ||||
| -rw-r--r-- | wp-inst/wp-content/themes/default/attachment.php | 79 | ||||
| -rw-r--r-- | wp-inst/wp-includes/capabilities.php | 19 | ||||
| -rw-r--r-- | wp-inst/wp-includes/classes.php | 4 | ||||
| -rw-r--r-- | wp-inst/wp-includes/functions-compat.php | 4 | ||||
| -rw-r--r-- | wp-inst/wp-includes/functions-formatting.php | 2 | ||||
| -rw-r--r-- | wp-inst/wp-includes/functions.php | 19 | ||||
| -rw-r--r-- | wp-inst/wp-includes/js/tinymce/plugins/directionality/editor_plugin.js | 83 | ||||
| -rw-r--r-- | wp-inst/wp-includes/js/tinymce/plugins/directionality/images/ltr.gif | bin | 0 -> 155 bytes | |||
| -rw-r--r-- | wp-inst/wp-includes/js/tinymce/plugins/directionality/images/rtl.gif | bin | 0 -> 153 bytes | |||
| -rw-r--r-- | wp-inst/wp-includes/js/tinymce/plugins/directionality/langs/en.js | 6 | ||||
| -rw-r--r-- | wp-inst/wp-includes/version.php | 2 |
16 files changed, 249 insertions, 14 deletions
diff --git a/wp-inst/wp-admin/admin-functions.php b/wp-inst/wp-admin/admin-functions.php index cfce700..d89f5b1 100644 --- a/wp-inst/wp-admin/admin-functions.php +++ b/wp-inst/wp-admin/admin-functions.php @@ -97,6 +97,14 @@ function fix_attachment_links($post_ID) { continue; $id = $id_matches[2]; + + // While we have the attachment ID, let's adopt any orphans. + $attachment = & get_post($id); + if ( ! is_object(get_post($attachment->post_parent)) ) { + $attachment->post_parent = $post_ID; + wp_update_post($attachment); + } + $post_search[$i] = $anchor; $post_replace[$i] = preg_replace("#href=(\"|')[^'\"]*\\1#e", "stripslashes('href=\\1').get_attachment_link($id).stripslashes('\\1')", $anchor); ++$i; diff --git a/wp-inst/wp-admin/admin-header.php b/wp-inst/wp-admin/admin-header.php index 5747ebc..0e42e58 100644 --- a/wp-inst/wp-admin/admin-header.php +++ b/wp-inst/wp-admin/admin-header.php @@ -79,15 +79,20 @@ addLoadEvent(blurry); <script type="text/javascript" src="../wp-includes/js/tw-sack.js"></script> <script type="text/javascript" src="list-manipulation.js"></script> <?php if ( isset( $editing ) ) : ?> -<?php if ( 'true' == get_user_option('rich_editing') ) :?> -<script language="javascript" type="text/javascript" src="../wp-includes/js/tinymce/tiny_mce_gzip.php?index=0&theme=advanced&plugins=wordpress,autosave,wphelp"></script> +<?php if ( $editing && 'true' == get_user_option('rich_editing') ) : +$mce_plugins = apply_filters('mce_plugins', array('wordpress', 'autosave', 'wphelp')); +$mce_plugins = implode($mce_plugins, ','); +$mce_buttons = apply_filters('mce_buttons', array('bold', 'italic', 'strikethrough', 'separator', 'bullist', 'numlist', 'outdent', 'indent', 'separator', 'justifyleft', 'justifycenter', 'justifyright' ,'separator', 'link', 'unlink', 'image', 'emotions', 'wordpress', 'separator', 'undo', 'redo', 'code', 'wphelp')); +$mce_buttons = implode($mce_buttons, ','); +?> +<script language="javascript" type="text/javascript" src="../wp-includes/js/tinymce/tiny_mce_gzip.php?index=0&theme=advanced&plugins=<?php echo $mce_plugins; ?>"></script> <script type="text/javascript"> tinyMCE.init({ mode : "specific_textareas", textarea_trigger : "title", width : "100%", theme : "advanced", - theme_advanced_buttons1 : "bold,italic,strikethrough,separator,bullist,numlist,outdent,indent,separator,justifyleft,justifycenter,justifyright,separator,link,unlink,image,emotions,wordpress,separator,undo,redo,code,wphelp", + theme_advanced_buttons1 : "<?php echo $mce_buttons; ?>", theme_advanced_buttons2 : "", theme_advanced_buttons3 : "", theme_advanced_toolbar_location : "top", @@ -105,8 +110,8 @@ tinyMCE.init({ convert_newlines_to_brs : false, remove_linebreaks : true, save_callback : "wp_save_callback", - valid_elements : "-a[id|href|title|rel],-strong/b,-em/i,-strike,-del,-u,p[class|align],-ol,-ul,-li,br,img[class|src|alt|title|width|height|align],-sub,-sup,-blockquote,-table[border=0|cellspacing|cellpadding|width|height|class|align],tr[class|rowspan|width|height|align|valign],td[dir|class|colspan|rowspan|width|height|align|valign],-div[dir|class|align],-span[class|align],-pre[class],-code[class],-address,-h1[class|align],-h2[class|align],-h3[class|align],-h4[class|align],-h5[class|align],-h6[class|align],hr", - plugins : "wordpress,autosave,wphelp" + valid_elements : "-a[id|href|title|rel],-strong/b,-em/i,-strike,-del,-u,p[class|align|dir],-ol,-ul,-li,br,img[class|src|alt|title|width|height|align],-sub,-sup,-blockquote[dir],-table[border=0|cellspacing|cellpadding|width|height|class|align|dir],tr[class|rowspan|width|height|align|valign|dir],td[dir|class|colspan|rowspan|width|height|align|valign],-div[dir|class|align],-span[class|align],-pre[class],-code[class],-address,-h1[class|align|dir],-h2[class|align|dir],-h3[class|align|dir],-h4[class|align|dir],-h5[class|align|dir],-h6[class|align|dir],hr", + plugins : "<?php echo $mce_plugins; ?>" <?php do_action('mce_options'); ?> }); </script> diff --git a/wp-inst/wp-admin/inline-uploading.php b/wp-inst/wp-admin/inline-uploading.php index 0458dd6..0295200 100644 --- a/wp-inst/wp-admin/inline-uploading.php +++ b/wp-inst/wp-admin/inline-uploading.php @@ -161,6 +161,7 @@ if ( count($attachments) > 0 ) { $__not_linked = __('Not Linked');
$__linked_to_page = __('Linked to Page');
$__linked_to_image = __('Linked to Image');
+ $__linked_to_file = __('Linked to File');
$__using_thumbnail = __('Using Thumbnail');
$__using_original = __('Using Original');
$__no_thumbnail = __('<del>No Thumbnail</del>');
@@ -170,11 +171,13 @@ if ( count($attachments) > 0 ) { $script .= "notlinked = '$__not_linked';
linkedtoimage = '$__linked_to_image';
linkedtopage = '$__linked_to_page';
+linkedtofile = '$__linked_to_file';
usingthumbnail = '$__using_thumbnail';
usingoriginal = '$__using_original';
";
foreach ( $attachments as $key => $attachment ) {
$ID = $attachment['ID'];
+ $href = get_attachment_link($ID);
$meta = get_post_meta($ID, '_wp_attachment_metadata', true);
if (!is_array($meta)) {
$meta = get_post_meta($ID, 'imagedata', true); // Try 1.6 Alpha meta key
@@ -207,7 +210,6 @@ src{$ID}b = '{$image['guid']}'; $xpadding = (128 - $image['uwidth']) / 2;
$ypadding = (96 - $image['uheight']) / 2;
$style .= "#target{$ID} img { padding: {$ypadding}px {$xpadding}px; }\n";
- $href = get_attachment_link($ID);
$script .= "a{$ID}a = '<a id=\"{$ID}\" rel=\"attachment\" class=\"imagelink\" href=\"$href\" onclick=\"doPopup({$ID});return false;\" title=\"{$image['post_title']}\">';
a{$ID}b = '<a class=\"imagelink\" href=\"{$image['guid']}\" onclick=\"doPopup({$ID});return false;\" title=\"{$image['post_title']}\">';
img{$ID}a = '<img id=\"image{$ID}\" src=\"$src\" alt=\"{$image['post_title']}\" $height_width />';
@@ -225,9 +227,13 @@ img{$ID}b = '<img id=\"image{$ID}\" src=\"{$image['guid']}\" alt=\"{$image['post </div>
";
} else {
+ $script .= "a{$ID}a = '<a id=\"{$ID}\" rel=\"attachment\" href=\"$href\" onclick=\"doPopup({$ID});return false;\" title=\"{$attachment['post_title']}\">{$attachment['post_title']}</a>';
+a{$ID}b = '<a id=\"{$ID}\" href=\"{$attachment['guid']}\" onclick=\"doPopup({$ID});return false;\" title=\"{$attachment['post_title']}\">{$attachment['post_title']}</a>';
+";
$html .= "<div id='target{$ID}' class='attwrap left'>
<div id='popup{$ID}' class='popup'>
<div class='filetype'>File Type: ".str_replace('/',"/\n",$attachment['post_mime_type'])."</div>
+ <a id=\"L{$ID}\" onclick=\"toggleOtherLink({$ID});return false;\" href=\"javascript:void()\">$__linked_to_file</a>
{$delete_cancel}
</div>
<div id='div{$ID}' class='otherwrap' onmousedown=\"selectLink({$ID})\" onclick=\"doPopup({$ID});return false;\">
@@ -302,6 +308,17 @@ function toggleLink(n) { ol.innerHTML = notlinked;
}
}
+function toggleOtherLink(n) {
+ od=document.getElementById('div'+n);
+ ol=document.getElementById('L'+n);
+ if ( ol.innerHTML == linkedtofile ) {
+ od.innerHTML = eval('a'+n+'a');
+ ol.innerHTML = linkedtopage;
+ } else {
+ od.innerHTML = eval('a'+n+'b');
+ ol.innerHTML = linkedtofile;
+ }
+}
function toggleImage(n) {
o = document.getElementById('image'+n);
oi = document.getElementById('I'+n);
diff --git a/wp-inst/wp-admin/upgrade-functions.php b/wp-inst/wp-admin/upgrade-functions.php index 0e5982d..5e1187f 100644 --- a/wp-inst/wp-admin/upgrade-functions.php +++ b/wp-inst/wp-admin/upgrade-functions.php @@ -31,7 +31,7 @@ function upgrade_all() { upgrade_130(); } - if ( $wp_current_db_version < 3199 ) + if ( $wp_current_db_version < 3243 ) upgrade_160(); save_mod_rewrite_rules(); diff --git a/wp-inst/wp-admin/upgrade-schema.php b/wp-inst/wp-admin/upgrade-schema.php index 0751f17..9a4899c 100644 --- a/wp-inst/wp-admin/upgrade-schema.php +++ b/wp-inst/wp-admin/upgrade-schema.php @@ -355,6 +355,7 @@ function populate_roles_160() { $role = $wp_roles->get_role('author'); $role->add_cap('upload_files'); $role->add_cap('edit_posts'); + $role->add_cap('edit_published_posts'); $role->add_cap('publish_posts'); $role->add_cap('read'); $role->add_cap('level_2'); diff --git a/wp-inst/wp-content/themes/default/attachment.php b/wp-inst/wp-content/themes/default/attachment.php new file mode 100644 index 0000000..6a31a61 --- /dev/null +++ b/wp-inst/wp-content/themes/default/attachment.php @@ -0,0 +1,79 @@ +<?php get_header(); ?> + + <div id="content" class="widecolumn"> + + <?php if (have_posts()) : while (have_posts()) : the_post(); ?> + + <div class="navigation"> + <div class="alignleft"> </div> + <div class="alignright"> </div> + </div> + <div class="post" id="post-<?php the_ID(); ?>"> + <h2><a href="<?php echo get_permalink($post->post_parent); ?>" rev="attachment"><?php echo get_the_title($post->post_parent); ?></a> » <a href="<?php echo get_permalink() ?>" rel="bookmark" title="Permanent Link: <?php the_title(); ?>"><?php the_title(); ?></a></h2> + <div class="entrytext"> +<?php $type = explode('/', $post->post_mime_type); + switch ( $type[0] ) { + case 'image' : + $meta = get_post_meta($post->ID, '_wp_attachment_metadata', true); + if ($meta['width'] > 450) : ?> + <p><a href="<?php echo $post->guid; ?>" title="<?php echo $post->post_title.': '.$meta['width'].'x'.$meta['height'] ?>"><img class="centered" src="<?php echo $post->guid; ?>" alt="<?php the_title(); ?>" style="width:450px;" /></a></p> +<?php else : ?> + <p><img class="centered" src="<?php echo $post->guid; ?>" alt="<?php the_title(); ?>" /></p> +<?php endif; + break; + default : +?> + <p><a href="<?php echo $post->guid; ?>"><?php echo basename($post->guid); ?></a></p> +<?php + } +?> + <?php the_content('<p class="serif">Read the rest of this entry »</p>'); ?> + + <?php link_pages('<p><strong>Pages:</strong> ', '</p>', 'number'); ?> + + <p class="postmetadata alt"> + <small> + This entry was posted + <?php /* This is commented, because it requires a little adjusting sometimes. + You'll need to download this plugin, and follow the instructions: + http://binarybonsai.com/archives/2004/08/17/time-since-plugin/ */ + /* $entry_datetime = abs(strtotime($post->post_date) - (60*120)); echo time_since($entry_datetime); echo ' ago'; */ ?> + on <?php the_time('l, F jS, Y') ?> at <?php the_time() ?> + and is filed under <?php the_category(', ') ?>. + You can follow any responses to this entry through the <?php comments_rss_link('RSS 2.0'); ?> feed. + + <?php if (('open' == $post-> comment_status) && ('open' == $post->ping_status)) { + // Both Comments and Pings are open ?> + You can <a href="#respond">leave a response</a>, or <a href="<?php trackback_url(true); ?>" rel="trackback">trackback</a> from your own site. + + <?php } elseif (!('open' == $post-> comment_status) && ('open' == $post->ping_status)) { + // Only Pings are Open ?> + Responses are currently closed, but you can <a href="<?php trackback_url(true); ?> " rel="trackback">trackback</a> from your own site. + + <?php } elseif (('open' == $post-> comment_status) && !('open' == $post->ping_status)) { + // Comments are open, Pings are not ?> + You can skip to the end and leave a response. Pinging is currently not allowed. + + <?php } elseif (!('open' == $post-> comment_status) && !('open' == $post->ping_status)) { + // Neither Comments, nor Pings are open ?> + Both comments and pings are currently closed. + + <?php } edit_post_link('Edit this entry.','',''); ?> + + </small> + </p> + + </div> + </div> + + <?php comments_template(); ?> + + <?php endwhile; else: ?> + + <p>Sorry, no attachments matched your criteria.</p> + +<?php endif; ?> + + </div> + +<?php get_footer(); ?> diff --git a/wp-inst/wp-includes/capabilities.php b/wp-inst/wp-includes/capabilities.php index 602a97f..b4dfc0b 100644 --- a/wp-inst/wp-includes/capabilities.php +++ b/wp-inst/wp-includes/capabilities.php @@ -26,8 +26,9 @@ class WP_Roles { if ( isset($this->roles[$role]) ) return; - $this->roles[$role] = array('name' => $display_name, - 'capabilities' => $capabilities); + $this->roles[$role] = array( + 'name' => $display_name, + 'capabilities' => $capabilities); update_option($this->role_key, $this->roles); $this->role_objects[$role] = new WP_Role($role, $capabilities); $this->role_names[$role] = $display_name; @@ -280,13 +281,25 @@ function current_user_can($capability) { return call_user_func_array(array(&$current_user, 'has_cap'), $args); } -// Convenience wrapper around $wp_roles. +// Convenience wrappers around $wp_roles. function get_role($role) { global $wp_roles; return $wp_roles->get_role($role); } +function add_role($role, $display_name, $capabilities = '') { + global $wp_roles; + + return $wp_roles->add_role($role, $display_name, $capabilities = ''); +} + +function remove_role($role) { + global $wp_roles; + + return $wp_roles->remove_role($role); +} + // // These are deprecated. Use current_user_can(). // diff --git a/wp-inst/wp-includes/classes.php b/wp-inst/wp-includes/classes.php index 59de66d..9d3016f 100644 --- a/wp-inst/wp-includes/classes.php +++ b/wp-inst/wp-includes/classes.php @@ -1470,8 +1470,12 @@ class WP { if ( ! empty($pathinfo) && ($wp_rewrite->index != $pathinfo) ) { $request = $pathinfo; } else { + // If the request uri is the index, blank it out so that we don't try to match it against a rule. + if ( $req_uri == $wp_rewrite->index ) + $req_uri = ''; $request = $req_uri; } + $this->request = $request; // Look for matches. diff --git a/wp-inst/wp-includes/functions-compat.php b/wp-inst/wp-includes/functions-compat.php index 89716bc..bc077ab 100644 --- a/wp-inst/wp-includes/functions-compat.php +++ b/wp-inst/wp-includes/functions-compat.php @@ -64,7 +64,7 @@ if (!defined('CASE_UPPER')) { * @link http://php.net/function.array_change_key_case * @author Stephan Schmidt <schst@php.net> * @author Aidan Lister <aidan@php.net> - * @version $Revision: 3198 $ + * @version $Revision: 3245 $ * @since PHP 4.2.0 * @require PHP 4.0.0 (user_error) */ @@ -91,7 +91,7 @@ if (!function_exists('array_change_key_case')) { /* Added in PHP 4.3.0 */ -if( !(function_exists('glob')) ): +if( !function_exists('glob') ): function glob($pattern) { // get pathname (everything up until the last / or \) $path=$output=null; diff --git a/wp-inst/wp-includes/functions-formatting.php b/wp-inst/wp-includes/functions-formatting.php index c179df2..8b959d4 100644 --- a/wp-inst/wp-includes/functions-formatting.php +++ b/wp-inst/wp-includes/functions-formatting.php @@ -994,7 +994,7 @@ function ent2ncr($text) { function wp_richedit_pre($text) { // Filtering a blank results in an annoying <br />\n - if ( empty($text) ) return ''; + if ( empty($text) ) return '<p> </p>'; $output = $text; $output = html_entity_decode($output); // undoes format_to_edit() diff --git a/wp-inst/wp-includes/functions.php b/wp-inst/wp-includes/functions.php index 8921cb5..d53a165 100644 --- a/wp-inst/wp-includes/functions.php +++ b/wp-inst/wp-includes/functions.php @@ -2154,6 +2154,25 @@ function update_usermeta( $user_id, $meta_key, $meta_value ) { // FIXME: Need to delete username keyed cache object. } +function delete_usermeta( $user_id, $meta_key, $meta_value = '' ) { + global $wpdb; + if ( !is_numeric( $user_id ) ) + return false; + $meta_key = preg_replace('|[^a-z0-9_]|i', '', $meta_key); + + if ( is_array($meta_value) || is_object($meta_value) ) + $meta_value = serialize($meta_value); + $meta_value = trim( $meta_value ); + + if ( ! empty($meta_value) ) + $wpdb->query("DELETE FROM $wpdb->usermeta WHERE user_id = '$user_id' AND meta_key = '$meta_key' AND meta_value = '$meta_value'"); + else + $wpdb->query("DELETE FROM $wpdb->usermeta WHERE user_id = '$user_id' AND meta_key = '$meta_key'"); + + wp_cache_delete($user_id, 'users'); + // FIXME: Need to delete username keyed cache object. +} + function register_activation_hook($file, $function) { $file = plugin_basename($file); diff --git a/wp-inst/wp-includes/js/tinymce/plugins/directionality/editor_plugin.js b/wp-inst/wp-includes/js/tinymce/plugins/directionality/editor_plugin.js new file mode 100644 index 0000000..c866b53 --- /dev/null +++ b/wp-inst/wp-includes/js/tinymce/plugins/directionality/editor_plugin.js @@ -0,0 +1,83 @@ +/* Import plugin specific language pack */
+tinyMCE.importPluginLanguagePack('directionality', 'en,sv,fr_ca,zh_cn,cs,da,he,no,de,hu,ru,ru_KOI8-R,ru_UTF-8,es,cy,is,pl');
+
+function TinyMCE_directionality_getInfo() {
+ return {
+ longname : 'Directionality',
+ author : 'Moxiecode Systems',
+ authorurl : 'http://tinymce.moxiecode.com',
+ infourl : 'http://tinymce.moxiecode.com/tinymce/docs/plugin_directionality.html',
+ version : tinyMCE.majorVersion + "." + tinyMCE.minorVersion
+ };
+};
+
+function TinyMCE_directionality_getControlHTML(control_name) {
+ switch (control_name) {
+ case "ltr":
+ var cmd = 'tinyMCE.execInstanceCommand(\'{$editor_id}\',\'mceDirectionLTR\');return false;';
+ return '<a href="javascript:' + cmd + '" onclick="' + cmd + '" target="_self" onmousedown="return false;"><img id="{$editor_id}_ltr" src="{$pluginurl}/images/ltr.gif" title="{$lang_directionality_ltr_desc}" width="20" height="20" class="mceButtonNormal" onmouseover="tinyMCE.switchClass(this,\'mceButtonOver\');" onmouseout="tinyMCE.restoreClass(this);" onmousedown="tinyMCE.restoreAndSwitchClass(this,\'mceButtonDown\');" /></a>'
+ + '<div class="zerosize"><input type="button" accesskey="." onclick="tinyMCE.execInstanceCommand(\'{$editor_id}\',\'mceDirectionLTR\',false);" /></div>';
+
+ case "rtl":
+ var cmd = 'tinyMCE.execInstanceCommand(\'{$editor_id}\',\'mceDirectionRTL\');return false;';
+ return '<a href="javascript:' + cmd + '" onclick="' + cmd + '" target="_self" onmousedown="return false;"><img id="{$editor_id}_rtl" src="{$pluginurl}/images/rtl.gif" title="{$lang_directionality_rtl_desc}" width="20" height="20" class="mceButtonNormal" onmouseover="tinyMCE.switchClass(this,\'mceButtonOver\');" onmouseout="tinyMCE.restoreClass(this);" onmousedown="tinyMCE.restoreAndSwitchClass(this,\'mceButtonDown\');" /></a>'
+ + '<div class="zerosize"><input type="button" accesskey="," onclick="tinyMCE.execInstanceCommand(\'{$editor_id}\',\'mceDirectionRTL\',false);" /></div>';
+ }
+
+ return "";
+}
+
+function TinyMCE_directionality_execCommand(editor_id, element, command, user_interface, value) {
+ // Handle commands
+ switch (command) {
+ case "mceDirectionLTR":
+ var inst = tinyMCE.getInstanceById(editor_id);
+ var elm = tinyMCE.getParentElement(inst.getFocusElement(), "p,div,td,h1,h2,h3,h4,h5,h6,pre,address");
+
+ if (elm)
+ elm.setAttribute("dir", "ltr");
+
+ tinyMCE.triggerNodeChange(false);
+ return true;
+
+ case "mceDirectionRTL":
+ var inst = tinyMCE.getInstanceById(editor_id);
+ var elm = tinyMCE.getParentElement(inst.getFocusElement(), "p,div,td,h1,h2,h3,h4,h5,h6,pre,address");
+
+ if (elm)
+ elm.setAttribute("dir", "rtl");
+
+ tinyMCE.triggerNodeChange(false);
+ return true;
+ }
+
+ // Pass to next handler in chain
+ return false;
+}
+
+function TinyMCE_directionality_handleNodeChange(editor_id, node, undo_index, undo_levels, visual_aid, any_selection) {
+ function getAttrib(elm, name) {
+ return elm.getAttribute(name) ? elm.getAttribute(name) : "";
+ }
+
+ tinyMCE.switchClassSticky(editor_id + '_ltr', 'mceButtonNormal', false);
+ tinyMCE.switchClassSticky(editor_id + '_rtl', 'mceButtonNormal', false);
+
+ if (node == null)
+ return;
+
+ var elm = tinyMCE.getParentElement(node, "p,div,td,h1,h2,h3,h4,h5,h6,pre,address");
+ if (!elm) {
+ tinyMCE.switchClassSticky(editor_id + '_ltr', 'mceButtonDisabled', true);
+ tinyMCE.switchClassSticky(editor_id + '_rtl', 'mceButtonDisabled', true);
+ return;
+ }
+
+ var dir = getAttrib(elm, "dir");
+ if (dir == "ltr" || dir == "")
+ tinyMCE.switchClassSticky(editor_id + '_ltr', 'mceButtonSelected', false);
+ else
+ tinyMCE.switchClassSticky(editor_id + '_rtl', 'mceButtonSelected', false);
+
+ return true;
+}
diff --git a/wp-inst/wp-includes/js/tinymce/plugins/directionality/images/ltr.gif b/wp-inst/wp-includes/js/tinymce/plugins/directionality/images/ltr.gif Binary files differnew file mode 100644 index 0000000..ac8f30c --- /dev/null +++ b/wp-inst/wp-includes/js/tinymce/plugins/directionality/images/ltr.gif diff --git a/wp-inst/wp-includes/js/tinymce/plugins/directionality/images/rtl.gif b/wp-inst/wp-includes/js/tinymce/plugins/directionality/images/rtl.gif Binary files differnew file mode 100644 index 0000000..0348f99 --- /dev/null +++ b/wp-inst/wp-includes/js/tinymce/plugins/directionality/images/rtl.gif diff --git a/wp-inst/wp-includes/js/tinymce/plugins/directionality/langs/en.js b/wp-inst/wp-includes/js/tinymce/plugins/directionality/langs/en.js new file mode 100644 index 0000000..5b392fe --- /dev/null +++ b/wp-inst/wp-includes/js/tinymce/plugins/directionality/langs/en.js @@ -0,0 +1,6 @@ +// UK lang variables
+
+tinyMCE.addToLang('',{
+directionality_ltr_desc : 'Direction left to right (Alt-.)',
+directionality_rtl_desc : 'Direction right to left (Alt-,)'
+});
diff --git a/wp-inst/wp-includes/version.php b/wp-inst/wp-includes/version.php index bc7bcfb..6df6626 100644 --- a/wp-inst/wp-includes/version.php +++ b/wp-inst/wp-includes/version.php @@ -3,6 +3,6 @@ // This just holds the version number, in a separate file so we can bump it without cluttering the SVN $wp_version = 'MU'; // Let's just avoid confusion -$wp_db_version = 3199; +$wp_db_version = 3243; ?> |
