diff options
Diffstat (limited to 'wp-includes')
-rw-r--r-- | wp-includes/category.php | 18 | ||||
-rw-r--r-- | wp-includes/js/autosave.js.php | 8 | ||||
-rw-r--r-- | wp-includes/js/tinymce/plugins/wordpress/editor_plugin.js | 5 | ||||
-rw-r--r-- | wp-includes/script-loader.php | 4 |
4 files changed, 28 insertions, 7 deletions
diff --git a/wp-includes/category.php b/wp-includes/category.php index 3127482..648ef4f 100644 --- a/wp-includes/category.php +++ b/wp-includes/category.php @@ -67,7 +67,7 @@ function &get_categories($args = '') { $exclusions = apply_filters('list_cats_exclusions', $exclusions, $r ); $where .= $exclusions; - if ( $hide_empty ) { + if ( $hide_empty && !$hierarchical ) { if ( 'link' == $type ) $where .= ' AND link_count > 0'; else @@ -103,6 +103,22 @@ function &get_categories($args = '') { if ( $child_of || $hierarchical ) $categories = & _get_cat_children($child_of, $categories); + // Update category counts to include children. + if ( $hierarchical ) { + foreach ( $categories as $k => $category ) { + $progeny = $category->category_count; + if ( $children = _get_cat_children($category->cat_ID, $categories) ) { + foreach ( $children as $child ) + $progeny += $child->category_count; + } + if ( !$progeny && $hide_empty ) + unset($categories[$k]); + else + $categories[$k]->category_count = $progeny; + } + } + reset ( $categories ); + return apply_filters('get_categories', $categories, $r); } diff --git a/wp-includes/js/autosave.js.php b/wp-includes/js/autosave.js.php index cb73ebf..f0c3520 100644 --- a/wp-includes/js/autosave.js.php +++ b/wp-includes/js/autosave.js.php @@ -14,6 +14,8 @@ function autosave_timer() { } function autosave_start_timer() { + var form = $('post'); + autosaveLast = form.post_title.value+form.content.value; setTimeout("autosave_timer()", <?php echo apply_filters('autosave_start_delay', '60000') ?>); } addLoadEvent(autosave_start_timer) @@ -41,7 +43,6 @@ function autosave_update_post_ID() { message = "<?php _e('Saved at '); ?>" + autosave_cur_time(); $('post_ID').name = "post_ID"; $('post_ID').value = res; - $('hiddenaction').value = 'editpost'; // We need new nonces nonceAjax = new sack(); nonceAjax.element = null; @@ -53,7 +54,7 @@ function autosave_update_post_ID() { nonceAjax.onCompletion = autosave_update_nonce; nonceAjax.method = "POST"; nonceAjax.runAJAX(); - + $('hiddenaction').value = 'editpost'; } $('autosave').innerHTML = message; } @@ -84,6 +85,7 @@ function autosave() { if ( typeof tinyMCE == "undefined" || tinyMCE.configs.length < 1 ) { autosaveAjax.setVar("content", form.content.value); } else { + if(tinyMCE.selectedInstance.spellcheckerOn) return; tinyMCE.wpTriggerSave(); autosaveAjax.setVar("content", form.content.value); } @@ -127,4 +129,4 @@ function autosave() { else autosaveAjax.onCompletion = autosave_saved; autosaveAjax.runAJAX(); -}
\ No newline at end of file +} diff --git a/wp-includes/js/tinymce/plugins/wordpress/editor_plugin.js b/wp-includes/js/tinymce/plugins/wordpress/editor_plugin.js index ef5df27..9a118f9 100644 --- a/wp-includes/js/tinymce/plugins/wordpress/editor_plugin.js +++ b/wp-includes/js/tinymce/plugins/wordpress/editor_plugin.js @@ -424,7 +424,10 @@ wpInstTriggerSave = function (skip_cleanup, skip_callback) { } tinyMCE._customCleanup(this, "submit_content_dom", this.contentWindow.document.body); - var htm = skip_cleanup ? this.getBody().innerHTML : tinyMCE._cleanupHTML(this, this.getDoc(), this.settings, this.getBody(), tinyMCE.visualAid, true, true); + tinyMCE.selectedInstance.getWin().oldfocus=tinyMCE.selectedInstance.getWin().focus; + tinyMCE.selectedInstance.getWin().focus=function() {}; + var htm = tinyMCE._cleanupHTML(this, this.getDoc(), this.settings, this.getBody(), tinyMCE.visualAid, true, true); + tinyMCE.selectedInstance.getWin().focus=tinyMCE.selectedInstance.getWin().oldfocus; htm = tinyMCE._customCleanup(this, "submit_content", htm); if (!skip_callback && tinyMCE.settings['save_callback'] != "") diff --git a/wp-includes/script-loader.php b/wp-includes/script-loader.php index 2c677e4..dc6c68e 100644 --- a/wp-includes/script-loader.php +++ b/wp-includes/script-loader.php @@ -15,10 +15,10 @@ class WP_Scripts { $this->add( 'sack', '/wp-includes/js/tw-sack.js', false, '1.6.1' ); $this->add( 'quicktags', '/wp-includes/js/quicktags.js', false, '3517' ); $this->add( 'colorpicker', '/wp-includes/js/colorpicker.js', false, '3517' ); - $this->add( 'tiny_mce', '/wp-includes/js/tinymce/tiny_mce_gzip.php', false, '08112006' ); + $this->add( 'tiny_mce', '/wp-includes/js/tinymce/tiny_mce_gzip.php', false, '08152006' ); $this->add( 'wp_tiny_mce', '/wp-includes/js/tinymce/tiny_mce_config.php', array('tiny_mce'), '04162006' ); $this->add( 'prototype', '/wp-includes/js/prototype.js', false, '1.5.0'); - $this->add( 'autosave', '/wp-includes/js/autosave.js.php', array('prototype', 'sack'), '4086'); + $this->add( 'autosave', '/wp-includes/js/autosave.js.php', array('prototype', 'sack'), '4102'); if ( is_admin() ) { $this->add( 'dbx-admin-key', '/wp-admin/dbx-admin-key-js.php', array('dbx'), '3651' ); $this->add( 'listman', '/wp-admin/list-manipulation-js.php', array('sack', 'fat'), '4042' ); // Make changeset # the correct one |