Changeset 1336
- Timestamp:
- 06/24/08 17:00:10 (4 months ago)
- Files:
-
- trunk/wp-admin/admin-header.php (modified) (1 diff)
- trunk/wp-admin/categories.php (modified) (3 diffs)
- trunk/wp-admin/css/dashboard-rtl.css (modified) (2 diffs)
- trunk/wp-admin/css/press-this.css (modified) (3 diffs)
- trunk/wp-admin/edit-category-form.php (modified) (1 diff)
- trunk/wp-admin/edit-form-advanced.php (modified) (1 diff)
- trunk/wp-admin/edit-pages.php (modified) (3 diffs)
- trunk/wp-admin/gears-manifest.php (modified) (4 diffs)
- trunk/wp-admin/images/loading-publish.gif (added)
- trunk/wp-admin/import/wp-cat2tag.php (modified) (12 diffs)
- trunk/wp-admin/includes/dashboard.php (modified) (2 diffs)
- trunk/wp-admin/includes/file.php (modified) (2 diffs)
- trunk/wp-admin/includes/media.php (modified) (3 diffs)
- trunk/wp-admin/includes/plugin.php (modified) (3 diffs)
- trunk/wp-admin/includes/schema.php (modified) (1 diff)
- trunk/wp-admin/includes/template.php (modified) (6 diffs)
- trunk/wp-admin/includes/upgrade.php (modified) (2 diffs)
- trunk/wp-admin/index.php (modified) (3 diffs)
- trunk/wp-admin/js/post.js (modified) (1 diff)
- trunk/wp-admin/options-writing.php (modified) (1 diff)
- trunk/wp-admin/options.php (modified) (1 diff)
- trunk/wp-admin/plugins.php (modified) (7 diffs)
- trunk/wp-admin/press-this.php (modified) (19 diffs)
- trunk/wp-admin/revision.php (modified) (1 diff)
- trunk/wp-admin/rtl.css (modified) (1 diff)
- trunk/wp-admin/user-edit.php (modified) (5 diffs)
- trunk/wp-admin/wp-admin.css (modified) (1 diff)
- trunk/wp-comments-post.php (modified) (1 diff)
- trunk/wp-includes/atomlib.php (modified) (2 diffs)
- trunk/wp-includes/author-template.php (modified) (1 diff)
- trunk/wp-includes/bookmark-template.php (modified) (3 diffs)
- trunk/wp-includes/category-template.php (modified) (1 diff)
- trunk/wp-includes/category.php (modified) (12 diffs)
- trunk/wp-includes/class-IXR.php (modified) (10 diffs)
- trunk/wp-includes/class-phpass.php (modified) (2 diffs)
- trunk/wp-includes/class-phpmailer.php (modified) (1 diff)
- trunk/wp-includes/class-pop3.php (modified) (1 diff)
- trunk/wp-includes/class-smtp.php (modified) (5 diffs)
- trunk/wp-includes/class-snoopy.php (modified) (2 diffs)
- trunk/wp-includes/classes.php (modified) (4 diffs)
- trunk/wp-includes/comment-template.php (modified) (39 diffs)
- trunk/wp-includes/comment.php (modified) (38 diffs)
- trunk/wp-includes/functions.php (modified) (39 diffs)
- trunk/wp-includes/js/autosave.js (modified) (4 diffs)
- trunk/wp-includes/js/thickbox/thickbox.css (modified) (1 diff)
- trunk/wp-includes/js/tinymce/langs/wp-langs.php (modified) (2 diffs)
- trunk/wp-includes/js/tinymce/plugins/fullscreen/fullscreen.htm (modified) (5 diffs)
- trunk/wp-includes/js/tinymce/plugins/inlinepopups/template.htm (modified) (1 diff)
- trunk/wp-includes/js/tinymce/plugins/media/editor_plugin.js (modified) (1 diff)
- trunk/wp-includes/js/tinymce/plugins/media/media.htm (modified) (1 diff)
- trunk/wp-includes/js/tinymce/plugins/paste/blank.htm (modified) (1 diff)
- trunk/wp-includes/js/tinymce/plugins/paste/pastetext.htm (modified) (1 diff)
- trunk/wp-includes/js/tinymce/plugins/paste/pasteword.htm (modified) (1 diff)
- trunk/wp-includes/js/tinymce/plugins/wordpress/editor_plugin.js (modified) (3 diffs)
- trunk/wp-includes/js/tinymce/plugins/wpeditimage/css/editimage-rtl.css (added)
- trunk/wp-includes/js/tinymce/plugins/wpeditimage/css/editimage.css (modified) (9 diffs)
- trunk/wp-includes/js/tinymce/plugins/wpeditimage/editimage.html (modified) (12 diffs)
- trunk/wp-includes/js/tinymce/plugins/wpeditimage/editor_plugin.js (modified) (3 diffs)
- trunk/wp-includes/js/tinymce/plugins/wpeditimage/js/editimage.js (modified) (17 diffs)
- trunk/wp-includes/js/tinymce/themes/advanced/about.htm (modified) (1 diff)
- trunk/wp-includes/js/tinymce/themes/advanced/anchor.htm (modified) (1 diff)
- trunk/wp-includes/js/tinymce/themes/advanced/charmap.htm (modified) (1 diff)
- trunk/wp-includes/js/tinymce/themes/advanced/color_picker.htm (modified) (1 diff)
- trunk/wp-includes/js/tinymce/themes/advanced/image.htm (modified) (1 diff)
- trunk/wp-includes/js/tinymce/themes/advanced/link.htm (modified) (1 diff)
- trunk/wp-includes/js/tinymce/themes/advanced/skins/wp_theme/content.css (modified) (1 diff)
- trunk/wp-includes/js/tinymce/themes/advanced/source_editor.htm (modified) (1 diff)
- trunk/wp-includes/js/tinymce/tiny_mce.js (modified) (1 diff)
- trunk/wp-includes/js/tinymce/tiny_mce_config.php (modified) (2 diffs)
- trunk/wp-includes/js/tinymce/utils/editable_selects.js (modified) (3 diffs)
- trunk/wp-includes/js/tinymce/wp-mce-help.php (modified) (1 diff)
- trunk/wp-includes/link-template.php (modified) (1 diff)
- trunk/wp-includes/pluggable.php (modified) (45 diffs)
- trunk/wp-includes/post.php (modified) (5 diffs)
- trunk/wp-includes/rewrite.php (modified) (1 diff)
- trunk/wp-includes/script-loader.php (modified) (4 diffs)
- trunk/wp-includes/streams.php (modified) (1 diff)
- trunk/wp-includes/taxonomy.php (modified) (44 diffs)
- trunk/wp-includes/version.php (modified) (2 diffs)
- trunk/wp-includes/widgets.php (modified) (1 diff)
- trunk/wp-includes/wp-db.php (modified) (31 diffs)
- trunk/wp-load.php (modified) (2 diffs)
- trunk/wp-settings.php (modified) (3 diffs)
- trunk/xmlrpc.php (modified) (7 diffs)
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
trunk/wp-admin/admin-header.php
r1328 r1336 112 112 <?php } ?> 113 113 114 <div id="user_info"><p><?php printf(__('Howdy, <a href="%1$s">%2$s</a>!'), 'profile.php', $user_identity) ?> | <a href="<?php echo site_url('wp-login.php?action=logout', 'login') ?>" title="<?php _e('Log Out') ?>"><?php _e('Log Out'); ?></a> | <?php _e('<a href="http://codex.wordpress.org/">Help</a>') ?> | <?php _e('<a href="http://wordpress.org/support/">Forums</a>') ?> | <?php if ( $gears_compat ) { ?><span id="gears-menu"><a href="#" onclick="wpGears.message(1);return false;"><?php _e('Speed up!') ?></a></span><?php } ?></p></div>114 <div id="user_info"><p><?php printf(__('Howdy, <a href="%1$s">%2$s</a>!'), 'profile.php', $user_identity) ?> | <a href="<?php echo site_url('wp-login.php?action=logout', 'login') ?>" title="<?php _e('Log Out') ?>"><?php _e('Log Out'); ?></a> | <?php _e('<a href="http://codex.wordpress.org/">Help</a>') ?> | <?php _e('<a href="http://wordpress.org/support/">Forums</a>'); if ( $gears_compat ) { ?> | <span id="gears-menu"><a href="#" onclick="wpGears.message(1);return false;"><?php _e('Speed up!') ?></a></span><?php } ?></p></div> 115 115 116 116 <?php trunk/wp-admin/categories.php
r1328 r1336 135 135 136 136 <div class="tablenav"> 137 138 <?php 139 $pagenum = absint( $_GET['pagenum'] ); 140 if ( empty($pagenum) ) 141 $pagenum = 1; 142 if( !$catsperpage || $catsperpage < 0 ) 143 $catsperpage = 20; 144 145 $page_links = paginate_links( array( 146 'base' => add_query_arg( 'pagenum', '%#%' ), 147 'format' => '', 148 'total' => ceil(wp_count_terms('category') / $catsperpage), 149 'current' => $pagenum 150 )); 151 152 if ( $page_links ) 153 echo "<div class='tablenav-pages'>$page_links</div>"; 154 ?> 137 155 138 156 <div class="alignleft"> … … 157 175 <tbody id="the-list" class="list:cat"> 158 176 <?php 159 cat_rows( );177 cat_rows(0, 0, 0, $pagenum, $catsperpage); 160 178 ?> 161 179 </tbody> … … 164 182 165 183 <div class="tablenav"> 184 185 <?php 186 if ( $page_links ) 187 echo "<div class='tablenav-pages'>$page_links</div>"; 188 ?> 166 189 <br class="clear" /> 167 190 </div> trunk/wp-admin/css/dashboard-rtl.css
r1218 r1336 12 12 float: left; 13 13 margin: 1px 0 0 6px; 14 } 15 16 div.dashboard-widget-holder { 17 float: right; 14 18 } 15 19 … … 57 61 margin:0 0 0.2em 0.5em; 58 62 } 63 #dashboard_secondary div.dashboard-widget-content ul li { 64 float: right; 65 } 59 66 #dashboard_secondary div.dashboard-widget-content ul li a { 60 67 border-right:0 none; trunk/wp-admin/css/press-this.css
r1328 r1336 112 112 font-size: 11px; 113 113 } 114 #newtag { padding: 3px; }114 #newtag { width: 60%; padding: 3px; } 115 115 116 116 #wphead { … … 295 295 } 296 296 297 #img_container a { 298 display: block; 299 width: 79px; 300 height: 79px; 301 float: left; 302 } 297 303 #img_container img { 298 304 width: 75px; 299 305 height: 75px; 306 border: 0px; 300 307 padding: 2px; 301 308 background-color: #f4f4f4; 302 margin-right: 7px;303 margin-bottom: 7px;304 309 cursor: pointer; 305 310 } 311 #img_container a, #img_container a:link, #img_container a:visited { 312 border: 2px solid #ccc; 313 margin: 0 4px 4px 0; 314 } 315 #img_container a:hover, #img_container a:active { 316 border: 2px solid #000; 317 } 306 318 .submit { 307 -moz-border-radius-bottomleft: 3px;308 -khtml-border-bottom-left-radius: 3px;309 -webkit-border-bottom-left-radius: 3px;310 border-bottom-left-radius: 3px;311 -moz-border-radius-bottomright: 3px;312 -khtml-border-bottom-right-radius: 3px;313 -webkit-border-bottom-right-radius: 3px;314 border-bottom-right-radius: 3px;315 margin: 0;316 padding: 0;319 -moz-border-radius-bottomleft: 3px; 320 -khtml-border-bottom-left-radius: 3px; 321 -webkit-border-bottom-left-radius: 3px; 322 border-bottom-left-radius: 3px; 323 -moz-border-radius-bottomright: 3px; 324 -khtml-border-bottom-right-radius: 3px; 325 -webkit-border-bottom-right-radius: 3px; 326 border-bottom-right-radius: 3px; 327 margin: 0; 328 padding: 0; 317 329 } 318 330 .submitbox { … … 450 462 padding-bottom: 2px; 451 463 } 464 465 #photo_directions { 466 margin-top: .25em; 467 display: block; 468 position: relative; 469 } 470 #photo_directions span { 471 display: block; 472 position: absolute; 473 top: 0; 474 right: 3px; 475 } 476 #photo_saving { 477 margin-bottom: 8px; 478 } 479 480 #post_status { 481 margin-left: 10px; 482 margin-bottom: 1em; 483 display: block; 484 } 485 486 #footer { 487 height: 65px; 488 display: block; 489 width: 640px; 490 padding: 10px 0 0 60px; 491 margin: 0; 492 position: absolute; 493 bottom: 0; 494 font-size: 12px; 495 } 496 497 #footer p { 498 margin: 0; 499 padding: 7px 0; 500 } 501 502 #footer p a { 503 text-decoration: none; 504 } 505 506 #footer p a:hover { 507 text-decoration: underline; trunk/wp-admin/edit-category-form.php
r1328 r1336 33 33 <th scope="row" valign="top"><label for="category_parent"><?php _e('Category Parent') ?></label></th> 34 34 <td> 35 <?php wp_dropdown_categories( 'hide_empty=0&name=category_parent&orderby=name&selected=' . $category->parent . '&hierarchical=1&show_option_none=' . __('None')); ?><br />35 <?php wp_dropdown_categories(array('hide_empty' => 0, 'name' => 'category_parent', 'orderby' => 'name', 'selected' => $category->parent, 'hierarchical' => true, 'show_option_none' => __('None'))); ?><br /> 36 36 <?php _e('Categories, unlike tags, can have a hierarchy. You might have a Jazz category, and under that have children categories for Bebop and Big Band. Totally optional.'); ?> 37 37 </td> trunk/wp-admin/edit-form-advanced.php
r1328 r1336 23 23 $form_extra = "<input type='hidden' id='post_ID' name='post_ID' value='$post_ID' />"; 24 24 $autosave = wp_get_post_autosave( $post_id ); 25 if ( $autosave && mysql2date( 'U', $autosave->post_modified_gmt ) > mysql2date( 'U', $post->post_modified_gmt ) ) 26 $notice = sprintf( $notices[1], get_edit_post_link( $autosave->ID ) ); 25 26 // Detect if there exists an autosave newer than the post and if that autosave is different than the post 27 if ( $autosave && mysql2date( 'U', $autosave->post_modified_gmt ) > mysql2date( 'U', $post->post_modified_gmt ) ) { 28 foreach ( _wp_post_revision_fields() as $autosave_field => $_autosave_field ) { 29 if ( wp_text_diff( $autosave->$autosave_field, $post->$autosave_field ) ) { 30 $notice = sprintf( $notices[1], get_edit_post_link( $autosave->ID ) ); 31 break; 32 } 33 } 34 unset($autosave_field, $_autosave_field); 35 } 27 36 } 28 37 trunk/wp-admin/edit-pages.php
r1328 r1336 118 118 119 119 <div class="tablenav"> 120 121 <?php 122 $pagenum = absint( $_GET['pagenum'] ); 123 if ( empty($pagenum) ) 124 $pagenum = 1; 125 if( !$per_page || $pre_page < 0 ) 126 $per_page = 20; 127 128 $num_pages = ceil(count($posts) / $per_page); 129 $page_links = paginate_links( array( 130 'base' => add_query_arg( 'pagenum', '%#%' ), 131 'format' => '', 132 'total' => $num_pages, 133 'current' => $pagenum 134 )); 135 136 if ( $page_links ) 137 echo "<div class='tablenav-pages'>$page_links</div>"; 138 ?> 120 139 121 140 <div class="alignleft"> … … 152 171 </thead> 153 172 <tbody> 154 <?php page_rows($posts ); ?>173 <?php page_rows($posts, $pagenum, $per_page); ?> 155 174 </tbody> 156 175 </table> … … 170 189 171 190 <div class="tablenav"> 191 <?php 192 if ( $page_links ) 193 echo "<div class='tablenav-pages'>$page_links</div>"; 194 ?> 172 195 <br class="clear" /> 173 196 </div> trunk/wp-admin/gears-manifest.php
r1328 r1336 26 26 wp_default_styles($wp_styles); 27 27 28 $get_lang = file_exists( ABSPATH . '/wp-config.php') ? file( ABSPATH . '/wp-config.php' ) : file( dirname(ABSPATH) . '/wp-config.php' );29 30 if ( is_array($get_lang) ) {31 foreach ( $get_lang as $val ) {32 if ( strpos( $val, "'WPLANG'" ) !== false ) {33 eval( $val );34 break;35 }36 }37 }38 39 if ( defined('WPLANG') && '' != WPLANG ) {40 if ( file_exists(ABSPATH . '/wp-content/languages') && @is_dir(ABSPATH . '/wp-content/languages') )41 $langdir = '/wp-content/languages/';42 else43 $langdir = '/wp-includes/languages/';44 45 $locale_file = ABSPATH . $langdir . WPLANG . '.php';46 if ( is_readable($locale_file) )47 include_once($locale_file);48 }49 50 $rtl = ( isset($text_direction) && 'rtl' == $text_direction ) ? true : false;51 52 28 $defaults = $man_version = ''; 53 29 foreach ( $wp_scripts->registered as $script ) { … … 67 43 $defaults .= '{ "url" : "' . $src . '?ver=' . $ver . '" },' . "\n"; 68 44 69 if ( $rtl &&isset($style->extra['rtl']) && $style->extra['rtl'] ) {45 if ( isset($style->extra['rtl']) && $style->extra['rtl'] ) { 70 46 if ( is_bool( $style->extra['rtl'] ) ) 71 47 $rtl_href = str_replace( '.css', '-rtl.css', $src ); … … 88 64 { 89 65 "betaManifestVersion" : 1, 90 "version" : "<?php echo $man_version; ?>_200806 06",66 "version" : "<?php echo $man_version; ?>_20080622", 91 67 "entries" : [ 92 68 <?php echo $defaults; ?> … … 136 112 { "url" : "../wp-includes/js/swfupload/swfupload_f9.swf" }, 137 113 138 { "url" : "../wp-includes/js/tinymce/tiny_mce_popup.js?ver=3 091" },139 { "url" : "../wp-includes/js/tinymce/utils/mctabs.js?ver=3 091" },140 { "url" : "../wp-includes/js/tinymce/utils/validate.js?ver=3 091" },141 { "url" : "../wp-includes/js/tinymce/utils/form_utils.js?ver=3 091" },142 { "url" : "../wp-includes/js/tinymce/utils/editable_selects.js?ver=3 091" },143 { "url" : "../wp-includes/js/tinymce/plugins/paste/js/pasteword.js?ver=3 091" },144 { "url" : "../wp-includes/js/tinymce/plugins/paste/js/pastetext.js?ver=3 091" },145 { "url" : "../wp-includes/js/tinymce/plugins/media/js/media.js?ver=3 091" },146 { "url" : "../wp-includes/js/tinymce/themes/advanced/js/color_picker.js?ver=3 091" },147 { "url" : "../wp-includes/js/tinymce/themes/advanced/js/charmap.js?ver=3 091" },148 { "url" : "../wp-includes/js/tinymce/themes/advanced/js/image.js?ver=3 091" },149 { "url" : "../wp-includes/js/tinymce/themes/advanced/js/link.js?ver=3 091" },150 { "url" : "../wp-includes/js/tinymce/themes/advanced/js/source_editor.js?ver=3 091" },151 { "url" : "../wp-includes/js/tinymce/themes/advanced/js/anchor.js?ver=3 091" },152 { "url" : "../wp-includes/js/tinymce/plugins/wpeditimage/js/editimage.js?ver=3 091" },114 { "url" : "../wp-includes/js/tinymce/tiny_mce_popup.js?ver=3101" }, 115 { "url" : "../wp-includes/js/tinymce/utils/mctabs.js?ver=3101" }, 116 { "url" : "../wp-includes/js/tinymce/utils/validate.js?ver=3101" }, 117 { "url" : "../wp-includes/js/tinymce/utils/form_utils.js?ver=3101" }, 118 { "url" : "../wp-includes/js/tinymce/utils/editable_selects.js?ver=3101" }, 119 { "url" : "../wp-includes/js/tinymce/plugins/paste/js/pasteword.js?ver=3101" }, 120 { "url" : "../wp-includes/js/tinymce/plugins/paste/js/pastetext.js?ver=3101" }, 121 { "url" : "../wp-includes/js/tinymce/plugins/media/js/media.js?ver=3101" }, 122 { "url" : "../wp-includes/js/tinymce/themes/advanced/js/color_picker.js?ver=3101" }, 123 { "url" : "../wp-includes/js/tinymce/themes/advanced/js/charmap.js?ver=3101" }, 124 { "url" : "../wp-includes/js/tinymce/themes/advanced/js/image.js?ver=3101" }, 125 { "url" : "../wp-includes/js/tinymce/themes/advanced/js/link.js?ver=3101" }, 126 { "url" : "../wp-includes/js/tinymce/themes/advanced/js/source_editor.js?ver=3101" }, 127 { "url" : "../wp-includes/js/tinymce/themes/advanced/js/anchor.js?ver=3101" }, 128 { "url" : "../wp-includes/js/tinymce/plugins/wpeditimage/js/editimage.js?ver=3101" }, 153 129 154 { "url" : "../wp-includes/js/tinymce/themes/advanced/source_editor.htm?ver=3 091" },155 { "url" : "../wp-includes/js/tinymce/themes/advanced/anchor.htm?ver=3 091" },156 { "url" : "../wp-includes/js/tinymce/themes/advanced/image.htm?ver=3 091" },157 { "url" : "../wp-includes/js/tinymce/themes/advanced/link.htm?ver=3 091" },158 { "url" : "../wp-includes/js/tinymce/themes/advanced/color_picker.htm?ver=3 091" },159 { "url" : "../wp-includes/js/tinymce/themes/advanced/charmap.htm?ver=3 091" },160 { "url" : "../wp-includes/js/tinymce/plugins/media/media.htm?ver=3 091" },161 { "url" : "../wp-includes/js/tinymce/plugins/paste/pasteword.htm?ver=3 091" },162 { "url" : "../wp-includes/js/tinymce/plugins/paste/blank.htm?ver=3 091" },163 { "url" : "../wp-includes/js/tinymce/plugins/paste/pastetext.htm?ver=3 091" },164 { "url" : "../wp-includes/js/tinymce/plugins/fullscreen/fullscreen.htm?ver=3 091" },165 { "url" : "../wp-includes/js/tinymce/plugins/inlinepopups/template.htm?ver=3 091" },166 { "url" : "../wp-includes/js/tinymce/plugins/wpeditimage/editimage.html?ver=3 091" },167 { "url" : "../wp-includes/js/tinymce/wp-mce-help.php?ver=3 091" },130 { "url" : "../wp-includes/js/tinymce/themes/advanced/source_editor.htm?ver=3101" }, 131 { "url" : "../wp-includes/js/tinymce/themes/advanced/anchor.htm?ver=3101" }, 132 { "url" : "../wp-includes/js/tinymce/themes/advanced/image.htm?ver=3101" }, 133 { "url" : "../wp-includes/js/tinymce/themes/advanced/link.htm?ver=3101" }, 134 { "url" : "../wp-includes/js/tinymce/themes/advanced/color_picker.htm?ver=3101" }, 135 { "url" : "../wp-includes/js/tinymce/themes/advanced/charmap.htm?ver=3101" }, 136 { "url" : "../wp-includes/js/tinymce/plugins/media/media.htm?ver=3101" }, 137 { "url" : "../wp-includes/js/tinymce/plugins/paste/pasteword.htm?ver=3101" }, 138 { "url" : "../wp-includes/js/tinymce/plugins/paste/blank.htm?ver=3101" }, 139 { "url" : "../wp-includes/js/tinymce/plugins/paste/pastetext.htm?ver=3101" }, 140 { "url" : "../wp-includes/js/tinymce/plugins/fullscreen/fullscreen.htm?ver=3101" }, 141 { "url" : "../wp-includes/js/tinymce/plugins/inlinepopups/template.htm?ver=3101" }, 142 { "url" : "../wp-includes/js/tinymce/plugins/wpeditimage/editimage.html?ver=3101" }, 143 { "url" : "../wp-includes/js/tinymce/wp-mce-help.php?ver=3101" }, 168 144 169 { "url" : "../wp-includes/js/tinymce/themes/advanced/skins/wp_theme/ui.css?ver=3091" }, 170 { "url" : "../wp-includes/js/tinymce/themes/advanced/skins/wp_theme/content.css?ver=3091" }, 171 { "url" : "../wp-includes/js/tinymce/themes/advanced/skins/wp_theme/dialog.css?ver=3091" }, 172 { "url" : "../wp-includes/js/tinymce/plugins/inlinepopups/skins/clearlooks2/window.css?ver=3091" }, 173 { "url" : "../wp-includes/js/tinymce/plugins/spellchecker/css/content.css?ver=3091" }, 174 { "url" : "../wp-includes/js/tinymce/plugins/wordpress/css/content.css?ver=3091" }, 175 { "url" : "../wp-includes/js/tinymce/plugins/media/css/content.css?ver=3091" }, 176 { "url" : "../wp-includes/js/tinymce/plugins/media/css/media.css?ver=3091" }, 177 { "url" : "../wp-includes/js/tinymce/plugins/paste/css/pasteword.css?ver=3091" }, 178 { "url" : "../wp-includes/js/tinymce/plugins/paste/css/blank.css?ver=3091" }, 179 { "url" : "../wp-includes/js/tinymce/plugins/wpeditimage/css/editimage.css?ver=3091" }, 180 { "url" : "../wp-includes/js/tinymce/wordpress.css?ver=3091" }, 145 { "url" : "../wp-includes/js/tinymce/themes/advanced/skins/wp_theme/ui.css?ver=3101" }, 146 { "url" : "../wp-includes/js/tinymce/themes/advanced/skins/wp_theme/content.css?ver=3101" }, 147 { "url" : "../wp-includes/js/tinymce/themes/advanced/skins/wp_theme/dialog.css?ver=3101" }, 148 { "url" : "../wp-includes/js/tinymce/plugins/inlinepopups/skins/clearlooks2/window.css?ver=3101" }, 149 { "url" : "../wp-includes/js/tinymce/plugins/spellchecker/css/content.css?ver=3101" }, 150 { "url" : "../wp-includes/js/tinymce/plugins/wordpress/css/content.css?ver=3101" }, 151 { "url" : "../wp-includes/js/tinymce/plugins/media/css/content.css?ver=3101" }, 152 { "url" : "../wp-includes/js/tinymce/plugins/media/css/media.css?ver=3101" }, 153 { "url" : "../wp-includes/js/tinymce/plugins/paste/css/pasteword.css?ver=3101" }, 154 { "url" : "../wp-includes/js/tinymce/plugins/paste/css/blank.css?ver=3101" }, 155 { "url" : "../wp-includes/js/tinymce/plugins/wpeditimage/css/editimage.css?ver=3101" }, 156 { "url" : "../wp-includes/js/tinymce/plugins/wpeditimage/css/editimage-rtl.css?ver=3101" }, 157 { "url" : "../wp-includes/js/tinymce/wordpress.css?ver=3101" }, 181 158 182 159 { "url" : "../wp-includes/js/tinymce/themes/advanced/img/icons.gif" }, trunk/wp-admin/import/wp-cat2tag.php
r1328 r1336 25 25 26 26 function populate_cats() { 27 global $wpdb;28 27 29 28 $categories = get_categories('get=all'); 30 29 foreach ( $categories as $category ) { 31 30 $this->all_categories[] = $category; 32 if ( tag_exists( $wpdb->escape($category->name)) )31 if ( is_term( $category->slug, 'post_tag' ) ) 33 32 $this->hybrids_ids[] = $category->term_id; 34 33 } … … 36 35 37 36 function populate_tags() { 38 global $wpdb;39 37 40 38 $tags = get_terms( array('post_tag'), 'get=all' ); 41 39 foreach ( $tags as $tag ) { 42 40 $this->all_tags[] = $tag; 43 if ( $this->_category_exists($tag->term_id) )41 if ( is_term( $tag->slug, 'category' ) ) 44 42 $this->hybrids_ids[] = $tag->term_id; 45 43 } … … 53 51 54 52 if ( $cat_num > 0 ) { 55 echo '<h2> Convert Categories (' . $cat_num . ') to Tags.</h2>';53 echo '<h2>' . sprintf( __ngettext( 'Convert Category to Tag.', 'Convert Categories (%d) to Tags.', $cat_num ), $cat_num ) . '</h2>'; 56 54 echo '<div class="narrow">'; 57 55 echo '<p>' . __('Hey there. Here you can selectively converts existing categories to tags. To get started, check the categories you wish to be converted, then click the Convert button.') . '</p>'; … … 59 57 60 58 $this->categories_form(); 61 } elseif ( $hyb_num > 0 ) {62 echo '<p>' . __('You have no categories that can be converted. However some of your categories are both a tag and a category.') . '</p>';63 59 } else { 64 60 echo '<p>'.__('You have no categories to convert!').'</p>'; … … 93 89 94 90 <form name="catlist" id="catlist" action="admin.php?import=wp-cat2tag&step=2" method="post"> 95 <p><input type="button" class="button-secondary" value="<?php _e('Check All'); ?>" onclick="this.value=check_all_rows()" >91 <p><input type="button" class="button-secondary" value="<?php _e('Check All'); ?>" onclick="this.value=check_all_rows()" /> 96 92 <?php wp_nonce_field('import-cat2tag'); ?></p> 97 93 <ul style="list-style:none"> 98 <?php 99 $hier = _get_term_hierarchy('category');94 95 <?php $hier = _get_term_hierarchy('category'); 100 96 101 97 foreach ($this->all_categories as $category) { 102 98 $category = sanitize_term( $category, 'category', 'display' ); 103 99 104 if ( (int) $category->parent == 0 ) { 105 if ( in_array( intval($category->term_id), $this->hybrids_ids ) ) { 106 ?> 107 <li style="color:#777;padding-left:1.3em;"><?php echo $category->name . ' (' . $category->count . ') *'; ?></li> 108 <?php 109 } else { 110 ?> 100 if ( (int) $category->parent == 0 ) { ?> 101 111 102 <li><label><input type="checkbox" name="cats_to_convert[]" value="<?php echo intval($category->term_id); ?>" /> <?php echo $category->name . ' (' . $category->count . ')'; ?></label><?php 112 103 113 if ( isset($hier[$category->term_id]) ) 114 $this->_category_children($category, $hier); 115 ?></li> 116 <?php 117 } 118 } 119 } 120 ?> 104 if ( in_array( intval($category->term_id), $this->hybrids_ids ) ) 105 echo ' <a href="#note"> * </a>'; 106 107 if ( isset($hier[$category->term_id]) ) 108 $this->_category_children($category, $hier); ?></li> 109 <?php } 110 } ?> 121 111 </ul> 122 112 123 <?php 124 if ( ! empty($this->hybrids_ids) ) { 125 echo '<p>' . __('* This category is also a tag. It cannot be convert again.') . '</p>'; 126 } 127 ?> 113 <?php if ( ! empty($this->hybrids_ids) ) 114 echo '<p><a name="note"></a>' . __('* This category is also a tag. Converting it will add that tag to all posts that are currently in the category.') . '</p>'; ?> 115 128 116 <p class="submit"><input type="submit" name="submit" class="button" value="<?php _e('Convert Categories to Tags'); ?>" /></p> 129 117 </form> 130 118 131 <?php 132 } 119 <?php } 133 120 134 121 function tags_tab() { … … 139 126 140 127 if ( $tags_num > 0 ) { 141 echo '<h2> Convert Tags (' . $tags_num . ') to Categories.</h2>';128 echo '<h2>' . sprintf( __ngettext( 'Convert Tag to Category.', 'Convert Tags (%d) to Categories.', $tags_num ), $tags_num ) . '</h2>'; 142 129 echo '<div class="narrow">'; 143 130 echo '<p>' . __('Here you can selectively converts existing tags to categories. To get started, check the tags you wish to be converted, then click the Convert button.') . '</p>'; 144 131 echo '<p>' . __('The newly created categories will still be associated with the same posts.') . '</p></div>'; 145 146 132 147 133 $this->tags_form(); 148 } elseif ( $hyb_num > 0 ) {149 echo '<p>' . __('You have no tags that can be converted. However some of your tags are both a tag and a category.') . '</p>';150 134 } else { 151 135 echo '<p>'.__('You have no tags to convert!').'</p>'; … … 180 164 181 165 <form name="taglist" id="taglist" action="admin.php?import=wp-cat2tag&step=4" method="post"> 182 <p><input type="button" class="button-secondary" value="<?php _e('Check All'); ?>" onclick="this.value=check_all_tagrows()" >166 <p><input type="button" class="button-secondary" value="<?php _e('Check All'); ?>" onclick="this.value=check_all_tagrows()" /> 183 167 <?php wp_nonce_field('import-cat2tag'); ?></p> 184 168 <ul style="list-style:none"> 185 <?php 186 foreach ( $this->all_tags as $tag ) { 187 if ( in_array( intval($tag->term_id), $this->hybrids_ids ) ) { 188 ?> 189 <li style="color:#777;padding-left:1.3em;"><?php echo attribute_escape($tag->name) . ' (' . $tag->count . ') *'; ?></li> 190 <?php 191 } else { 192 ?> 193 <li><label><input type="checkbox" name="tags_to_convert[]" value="<?php echo intval($tag->term_id); ?>" /> <?php echo attribute_escape($tag->name) . ' (' . $tag->count . ')'; ?></label></li> 194 195 <?php 196 } 197 } 198 ?> 169 170 <?php foreach ( $this->all_tags as $tag ) { ?> 171 <li><label><input type="checkbox" name="tags_to_convert[]" value="<?php echo intval($tag->term_id); ?>" /> <?php echo attribute_escape($tag->name) . ' (' . $tag->count . ')'; ?></label><?php if ( in_array( intval($tag->term_id), $this->hybrids_ids ) ) echo ' <a href="#note"> * </a>'; ?></li> 172 173 <?php } ?> 199 174 </ul> 200 175 201 <?php 202 if ( ! empty($this->hybrids_ids) ) 203 echo '<p>' . __('* This tag is also a category. It cannot be converted again.') . '</p>'; 204 ?> 176 <?php if ( ! empty($this->hybrids_ids) ) 177 echo '<p><a name="note"></a>' . __('* This tag is also a category. When converted, all posts associated with the tag will also be in the category.') . '</p>'; ?> 205 178 206 179 <p class="submit"><input type="submit" name="submit_tags" class="button" value="<?php _e('Convert Tags to Categories'); ?>" /></p> 207 180 </form> 208 181 209 <?php 210 } 211 212 function _category_children($parent, $hier) { 213 ?> 182 <?php } 183 184 function _category_children($parent, $hier) { ?> 214 185 215 186 <ul style="list-style:none"> 216 <?php 217 foreach ($hier[$parent->term_id] as $child_id) { 218 $child =& get_category($child_id); 219 220 if ( in_array( intval($child->term_id), $this->hybrids_ids ) ) { 221 ?> 222 <li style="color:#777;padding-left:1.3em;"><?php echo $child->name . ' (' . $child->count . ') *'; ?></li> 223 <?php 224 } else { 225 ?> 226 <li><label><input type="checkbox" name="cats_to_convert[]" value="<?php echo intval($child->term_id); ?>" /> <?php echo $child->name . ' (' . $child->count . ')'; ?></label> 227 <?php 187 <?php foreach ($hier[$parent->term_id] as $child_id) { 188 $child =& get_category($child_id); ?> 189 <li><label><input type="checkbox" name="cats_to_convert[]" value="<?php echo intval($child->term_id); ?>" /> <?php echo $child->name . ' (' . $child->count . ')'; ?></label><?php 190 191 if ( in_array( intval($child->term_id), $this->hybrids_ids ) ) 192 echo ' <a href="#note"> * </a>'; 228 193 229 194 if ( isset($hier[$child->term_id]) ) 230 $this->_category_children($child, $hier); 231 ?> </li> 232 <?php 233 } 234 } 235 ?> 236 </ul> 237 <?php 195 $this->_category_children($child, $hier); ?></li> 196 <?php } ?> 197 </ul><?php 238 198 } 239 199 … … 253 213 global $wpdb; 254 214 255 if ( (!isset($_POST['cats_to_convert']) || !is_array($_POST['cats_to_convert'])) && empty($this->categories_to_convert)) { 256 echo '<div class="narrow">';257 echo '<p>' . sprintf(__('Uh, oh. Something didn’t work. Please <a href="%s">try again</a>.'), 'admin.php?import=wp-cat2tag') . '</p>';258 echo '</div>';259 return;215 if ( (!isset($_POST['cats_to_convert']) || !is_array($_POST['cats_to_convert'])) && empty($this->categories_to_convert)) { ?> 216 <div class="narrow"> 217 <p><?php printf(__('Uh, oh. Something didn’t work. Please <a href="%s">try again</a>.'), 'admin.php?import=wp-cat2tag'); ?></p> 218 </div> 219 <?php return; 260 220 } 261 221 262 222 if ( empty($this->categories_to_convert) ) 263 223 $this->categories_to_convert = $_POST['cats_to_convert']; 224 264 225 $hier = _get_term_hierarchy('category'); 226 $hybrid_cats = $clear_parents = $parents = false; 227 $clean_term_cache = $clean_cat_cache = array(); 228 $default_cat = get_option('default_category'); 265 229 266 230 echo '<ul>'; … … 269 233 $cat_id = (int) $cat_id; 270 234 271 echo '<li>' . sprintf(__('Converting category #%s ... '), $cat_id); 272 273 if (!$this->_category_exists($cat_id)) { 274 _e('Category doesn\'t exist!'); 235 if ( ! $this->_category_exists($cat_id) ) { 236 echo '<li>' . sprintf( __('Category %s doesn\'t exist!'), $cat_id ) . "</li>\n"; 275 237 } else { 276 238 $category =& get_category($cat_id); 277 278 if ( tag_exists($wpdb->escape($category->name)) ) { 279 _e('Category is already a tag.'); 280 echo '</li>'; 239 echo '<li>' . sprintf(__('Converting category <strong>%s</strong> ... '), $category->name); 240 241 // If the category is the default, leave category in place and create tag. 242 if ( $default_cat == $category->term_id ) { 243 244 if ( ! ($id = is_term( $category->slug, 'post_tag' ) ) ) 245 $id = wp_insert_term($category->name, 'post_tag', array('slug' => $category->slug)); 246 247 $id = $id['term_taxonomy_id']; 248 $posts = get_objects_in_term($category->term_id, 'category'); 249 $term_order = 0; 250 251 foreach ( $posts as $post ) { 252 $values[] = $wpdb->prepare( "(%d, %d, %d)", $post, $id, $term_order); 253 clean_post_cache($post); 254 } 255 256 if ( $values ) { 257 $wpdb->query("INSERT INTO $wpdb->term_relationships (object_id, term_taxonomy_id, term_order) VALUES " . join(',', $values) . " ON DUPLICATE KEY UPDATE term_order = VALUES(term_order)"); 258 259 $wpdb->query( $wpdb->prepare("UPDATE $wpdb->term_taxonomy SET count = %d WHERE term_id = %d AND taxonomy = 'post_tag'", $category->count, $category->term_id) ); 260 } 261 262 echo __('Converted successfully.') . "</li>\n"; 281 263 continue; 282 264 } 283 284 // If the category is the default, leave category in place and create tag. 285 if ( get_option('default_category') == $category->term_id ) { 286 $id = wp_insert_term($category->name, 'post_tag', array('slug' => $category->slug)); 287 $id = $id['term_taxonomy_id']; 288 $posts = get_objects_in_term($category->term_id, 'category'); 289 foreach ( $posts as $post ) { 290 if ( !$wpdb->get_var( $wpdb->prepare("SELECT object_id FROM $wpdb->term_relationships WHERE object_id = %d AND term_taxonomy_id = %d", $post, $id) ) ) 291 $wpdb->query( $wpdb->prepare("INSERT INTO $wpdb->term_relationships (object_id, term_taxonomy_id) VALUES (%d, %d)", $post, $id) ); 265 266 // if tag already exists, add it to all posts in the category 267 if ( $tag_ttid = $wpdb->get_var( $wpdb->prepare("SELECT term_taxonomy_id FROM $wpdb->term_taxonomy WHERE term_id = %d AND taxonomy = 'post_tag'", $category->term_id) ) ) { 268 $objects_ids = get_objects_in_term($category->term_id, 'category'); 269 $tag_ttid = (int) $tag_ttid; 270 $term_order = 0; 271 272 foreach ( $objects_ids as $object_id ) 273 $values[] = $wpdb->prepare( "(%d, %d, %d)", $object_id, $tag_ttid, $term_order); 274 275 &nbs
