From 11be8dc178e77d0b46189bbd8e33a216a9b90942 Mon Sep 17 00:00:00 2001 From: "Edward Z. Yang" Date: Fri, 20 Nov 2009 20:46:13 -0500 Subject: [PATCH] Wordpress 2.7.1 Signed-off-by: Edward Z. Yang --- license.txt | 5 +- readme.html | 4 +- wp-admin/admin-ajax.php | 437 ++- wp-admin/admin-footer.php | 28 +- wp-admin/admin-functions.php | 15 +- wp-admin/admin-header.php | 174 +- wp-admin/admin-post.php | 10 +- wp-admin/admin.php | 38 +- wp-admin/async-upload.php | 23 +- wp-admin/categories.php | 188 +- wp-admin/comment.php | 26 +- wp-admin/css/colors-classic-rtl.css | 80 +- wp-admin/css/colors-classic.css | 1353 +++++-- wp-admin/css/colors-fresh-rtl.css | 83 +- wp-admin/css/colors-fresh.css | 1323 +++++-- wp-admin/css/dashboard-rtl.css | 115 +- wp-admin/css/dashboard.css | 452 ++- wp-admin/css/farbtastic-rtl.css | 7 + wp-admin/css/farbtastic.css | 32 + wp-admin/css/global-rtl.css | 75 +- wp-admin/css/global.css | 399 +- wp-admin/css/ie-rtl.css | 108 +- wp-admin/css/ie.css | 279 +- wp-admin/css/install-rtl.css | 29 +- wp-admin/css/install.css | 103 +- wp-admin/css/login-rtl.css | 31 +- wp-admin/css/login.css | 77 +- wp-admin/css/media-rtl.css | 65 +- wp-admin/css/media.css | 177 +- wp-admin/css/plugin-install-rtl.css | 43 + wp-admin/css/plugin-install.css | 149 + wp-admin/css/press-this-ie-rtl.css | 3 - wp-admin/css/press-this-ie.css | 7 - wp-admin/css/press-this-rtl.css | 130 +- wp-admin/css/press-this.css | 608 ++-- wp-admin/css/theme-editor-rtl.css | 9 +- wp-admin/css/theme-editor.css | 10 +- wp-admin/css/upload-rtl.css | 12 - wp-admin/css/widgets-rtl.css | 30 +- wp-admin/css/widgets.css | 25 +- wp-admin/custom-header.php | 292 +- wp-admin/edit-attachment-rows.php | 160 +- wp-admin/edit-category-form.php | 61 +- wp-admin/edit-comments.php | 363 +- wp-admin/edit-form-advanced.php | 646 ++-- wp-admin/edit-form-comment.php | 143 +- wp-admin/edit-form.php | 69 - wp-admin/edit-link-categories.php | 204 +- wp-admin/edit-link-category-form.php | 49 +- wp-admin/edit-link-form.php | 258 +- wp-admin/edit-page-form.php | 571 ++- wp-admin/edit-pages.php | 322 +- wp-admin/edit-post-rows.php | 219 +- wp-admin/edit-tag-form.php | 43 +- wp-admin/edit-tags.php | 173 +- wp-admin/edit.php | 317 +- wp-admin/export.php | 20 +- wp-admin/gears-manifest.php | 248 +- wp-admin/images/archive-link.png | Bin 0 -> 133 bytes wp-admin/images/blue-grad.png | Bin 0 -> 242 bytes wp-admin/images/browse-happy.gif | Bin 4398 -> 2730 bytes wp-admin/images/bubble_bg-rtl.gif | Bin 0 -> 400 bytes wp-admin/images/button-grad-active.png | Bin 0 -> 284 bytes wp-admin/images/button-grad.png | Bin 0 -> 243 bytes wp-admin/images/comment-pill.gif | Bin 72 -> 0 bytes wp-admin/images/comment-stalk-classic.gif | Bin 1100 -> 0 bytes wp-admin/images/comment-stalk-fresh.gif | Bin 1067 -> 0 bytes wp-admin/images/comment-stalk-rtl.gif | Bin 1064 -> 0 bytes wp-admin/images/ed-bg.gif | Bin 0 -> 190 bytes wp-admin/images/fav-arrow-rtl.gif | Bin 0 -> 422 bytes wp-admin/images/fav-arrow.gif | Bin 0 -> 334 bytes wp-admin/images/fav-top.png | Bin 0 -> 160 bytes wp-admin/images/fav.png | Bin 0 -> 214 bytes wp-admin/images/gear.png | Bin 16742 -> 0 bytes wp-admin/images/generic.png | Bin 0 -> 3580 bytes wp-admin/images/gray-grad.png | Bin 0 -> 213 bytes wp-admin/images/icons32-vs.png | Bin 0 -> 17261 bytes wp-admin/images/icons32.png | Bin 0 -> 12233 bytes wp-admin/images/list-vs.png | Bin 0 -> 1151 bytes wp-admin/images/list.png | Bin 0 -> 1104 bytes wp-admin/images/loading-publish.gif | Bin 1849 -> 1849 bytes wp-admin/images/logo-ghost.png | Bin 880 -> 559 bytes wp-admin/images/logo-login.gif | Bin 3184 -> 4816 bytes wp-admin/images/logo.gif | Bin 1238 -> 1289 bytes wp-admin/images/marker.png | Bin 0 -> 652 bytes wp-admin/images/mask.png | Bin 0 -> 2020 bytes wp-admin/images/media-button-gallery.gif | Bin 72 -> 0 bytes wp-admin/images/media-buttons.gif | Bin 723 -> 0 bytes wp-admin/images/menu-arrows.gif | Bin 0 -> 330 bytes wp-admin/images/menu-bits-rtl.gif | Bin 0 -> 1300 bytes wp-admin/images/menu-bits.gif | Bin 0 -> 1194 bytes wp-admin/images/menu-dark-rtl.gif | Bin 0 -> 950 bytes wp-admin/images/menu-dark.gif | Bin 0 -> 245 bytes wp-admin/images/menu-vs.png | Bin 0 -> 14054 bytes wp-admin/images/menu.png | Bin 0 -> 11599 bytes wp-admin/images/resize.gif | Bin 0 -> 71 bytes wp-admin/images/screen-options-left.gif | Bin 0 -> 640 bytes wp-admin/images/screen-options-right-up.gif | Bin 0 -> 278 bytes wp-admin/images/screen-options-right.gif | Bin 0 -> 276 bytes wp-admin/images/se.png | Bin 0 -> 127 bytes wp-admin/images/star.gif | Bin 0 -> 109 bytes wp-admin/images/tab.png | Bin 1006 -> 0 bytes wp-admin/images/tail.gif | Bin 98 -> 0 bytes wp-admin/images/wheel.png | Bin 0 -> 11733 bytes wp-admin/images/white-grad-active.png | Bin 0 -> 223 bytes wp-admin/images/white-grad.png | Bin 0 -> 210 bytes wp-admin/images/wp-logo.gif | Bin 0 -> 1096 bytes wp-admin/import.php | 15 +- wp-admin/import/blogger.php | 76 +- wp-admin/import/blogware.php | 24 +- wp-admin/import/btt.php | 21 +- wp-admin/import/dotclear.php | 113 +- wp-admin/import/greymatter.php | 22 +- wp-admin/import/jkw.php | 20 +- wp-admin/import/livejournal.php | 20 +- wp-admin/import/mt.php | 75 +- wp-admin/{link-import.php => import/opml.php} | 37 +- wp-admin/import/rss.php | 20 +- wp-admin/import/stp.php | 21 +- wp-admin/import/textpattern.php | 46 +- wp-admin/import/utw.php | 24 +- wp-admin/import/wordpress.php | 75 +- wp-admin/import/wp-cat2tag.php | 26 +- wp-admin/includes/admin.php | 36 +- wp-admin/includes/bookmark.php | 201 +- wp-admin/includes/class-ftp-pure.php | 15 + wp-admin/includes/class-ftp-sockets.php | 14 + wp-admin/includes/class-ftp.php | 63 +- wp-admin/includes/class-pclzip.php | 105 +- .../includes/class-wp-filesystem-base.php | 222 +- .../includes/class-wp-filesystem-direct.php | 18 +- .../includes/class-wp-filesystem-ftpext.php | 69 +- .../class-wp-filesystem-ftpsockets.php | 69 +- .../includes/class-wp-filesystem-ssh2.php | 507 +++ wp-admin/includes/comment.php | 57 +- wp-admin/includes/dashboard.php | 835 +++-- wp-admin/includes/export.php | 84 +- wp-admin/includes/file.php | 438 ++- wp-admin/includes/image.php | 190 +- wp-admin/includes/import.php | 40 + wp-admin/includes/media.php | 829 ++++- wp-admin/includes/misc.php | 96 +- wp-admin/includes/plugin-install.php | 894 +++++ wp-admin/includes/plugin.php | 639 +++- wp-admin/includes/post.php | 900 ++++- wp-admin/includes/schema.php | 131 +- wp-admin/includes/taxonomy.php | 93 +- wp-admin/includes/template.php | 2978 +++++++++++++-- wp-admin/includes/theme.php | 37 +- wp-admin/includes/update-core.php | 263 ++ wp-admin/includes/update.php | 345 +- wp-admin/includes/upgrade.php | 309 +- wp-admin/includes/user.php | 370 +- wp-admin/includes/widgets.php | 77 +- wp-admin/index-extra.php | 22 +- wp-admin/index.php | 137 +- wp-admin/install-helper.php | 223 +- wp-admin/install.php | 32 +- wp-admin/js/categories.js | 16 +- wp-admin/js/comment.js | 53 +- wp-admin/js/common.js | 406 ++- wp-admin/js/dashboard.js | 52 + wp-admin/js/edit-comments.js | 372 +- wp-admin/js/editor.js | 318 +- wp-admin/js/farbtastic.js | 333 ++ wp-admin/js/forms.js | 26 - wp-admin/js/gallery.js | 147 + wp-admin/js/inline-edit-post.js | 266 ++ wp-admin/js/inline-edit-tax.js | 152 + wp-admin/js/link.js | 12 +- wp-admin/js/media-upload.js | 19 +- wp-admin/js/page.js | 212 +- wp-admin/js/password-strength-meter.js | 91 +- wp-admin/js/plugin-install.js | 51 + wp-admin/js/post.js | 316 +- wp-admin/js/postbox.js | 118 +- wp-admin/js/revisions-js.php | 4 +- wp-admin/js/slug.js | 2 +- wp-admin/js/tags.js | 13 +- wp-admin/js/upload.js | 330 -- wp-admin/js/users.js | 6 +- wp-admin/js/widgets.js | 14 + wp-admin/js/word-count.js | 4 +- wp-admin/js/wp-gears.js | 28 +- wp-admin/link-add.php | 22 +- wp-admin/link-category.php | 17 +- wp-admin/link-manager.php | 187 +- wp-admin/link-parse-opml.php | 44 +- wp-admin/link.php | 24 +- wp-admin/media-new.php | 14 + wp-admin/media-upload.php | 112 +- wp-admin/media.php | 29 +- wp-admin/menu-header.php | 281 +- wp-admin/menu.php | 229 +- wp-admin/moderation.php | 8 + wp-admin/options-discussion.php | 90 +- wp-admin/options-general.php | 156 +- wp-admin/options-head.php | 14 +- wp-admin/options-media.php | 75 + wp-admin/options-misc.php | 71 +- wp-admin/options-permalink.php | 37 +- wp-admin/options-privacy.php | 23 +- wp-admin/options-reading.php | 31 +- wp-admin/options-writing.php | 76 +- wp-admin/options.php | 81 +- wp-admin/page-new.php | 25 +- wp-admin/page.php | 70 +- wp-admin/plugin-editor.php | 24 +- wp-admin/plugin-install.php | 74 + wp-admin/plugins.php | 190 +- wp-admin/post-new.php | 26 +- wp-admin/post.php | 94 +- wp-admin/press-this.php | 741 ++-- wp-admin/profile.php | 15 + wp-admin/revision.php | 15 +- wp-admin/rtl.css | 622 ++-- wp-admin/setup-config.php | 43 +- wp-admin/sidebar.php | 142 +- wp-admin/theme-editor.php | 55 +- wp-admin/themes.php | 77 +- wp-admin/tools.php | 93 + wp-admin/update-core.php | 230 ++ wp-admin/update-links.php | 68 +- wp-admin/update.php | 206 +- wp-admin/upgrade-functions.php | 10 +- wp-admin/upgrade.php | 32 +- wp-admin/upload.php | 453 ++- wp-admin/user-edit.php | 181 +- wp-admin/user-new.php | 143 + wp-admin/users.php | 273 +- wp-admin/widgets.php | 49 +- wp-admin/wp-admin.css | 2860 +++++++++++---- wp-app.php | 533 ++- wp-atom.php | 17 +- wp-comments-post.php | 16 +- wp-commentsrss2.php | 19 +- wp-config-sample.php | 79 +- wp-content/plugins/akismet/akismet.php | 69 +- wp-content/plugins/hello.php | 31 +- wp-content/themes/classic/comments-popup.php | 32 +- wp-content/themes/classic/comments.php | 14 +- wp-content/themes/classic/footer.php | 6 + wp-content/themes/classic/functions.php | 14 +- wp-content/themes/classic/header.php | 8 +- wp-content/themes/classic/index.php | 6 +- wp-content/themes/classic/rtl.css | 10 + wp-content/themes/classic/sidebar.php | 7 +- wp-content/themes/default/404.php | 9 +- wp-content/themes/default/archive.php | 34 +- wp-content/themes/default/archives.php | 6 +- wp-content/themes/default/comments-popup.php | 30 +- wp-content/themes/default/comments.php | 73 +- wp-content/themes/default/footer.php | 6 + wp-content/themes/default/functions.php | 10 +- wp-content/themes/default/header.php | 11 +- wp-content/themes/default/image.php | 11 +- .../themes/default/images/header-img.php | 5 + wp-content/themes/default/index.php | 12 +- wp-content/themes/default/links.php | 5 + wp-content/themes/default/page.php | 8 +- wp-content/themes/default/search.php | 12 +- wp-content/themes/default/searchform.php | 6 - wp-content/themes/default/sidebar.php | 8 +- wp-content/themes/default/single.php | 11 +- wp-content/themes/default/style.css | 47 +- wp-cron.php | 38 +- wp-feed.php | 22 +- wp-includes/author-template.php | 8 +- wp-includes/bookmark-template.php | 30 +- wp-includes/bookmark.php | 72 +- wp-includes/cache.php | 52 +- wp-includes/canonical.php | 195 +- wp-includes/capabilities.php | 815 ++++- wp-includes/category-template.php | 761 +++- wp-includes/category.php | 122 +- wp-includes/class-IXR.php | 38 +- wp-includes/class-phpass.php | 2 +- wp-includes/class-phpmailer.php | 3225 +++++++++-------- wp-includes/class-pop3.php | 7 +- wp-includes/class-smtp.php | 1855 +++++----- wp-includes/class-snoopy.php | 72 +- wp-includes/class.wp-dependencies.php | 20 +- wp-includes/class.wp-scripts.php | 23 +- wp-includes/class.wp-styles.php | 18 +- wp-includes/classes.php | 931 ++++- wp-includes/comment-template.php | 682 +++- wp-includes/comment.php | 749 ++-- wp-includes/compat.php | 19 + wp-includes/cron.php | 234 +- wp-includes/default-filters.php | 8 +- wp-includes/deprecated.php | 143 +- wp-includes/feed-atom-comments.php | 24 +- wp-includes/feed-rss2-comments.php | 17 +- wp-includes/feed-rss2.php | 3 + wp-includes/feed.php | 52 +- wp-includes/formatting.php | 1211 ++++++- wp-includes/functions.php | 1029 ++++-- wp-includes/functions.wp-scripts.php | 38 +- wp-includes/functions.wp-styles.php | 36 +- wp-includes/general-template.php | 1004 ++++- wp-includes/http.php | 1254 +++++++ wp-includes/images/audio.png | Bin 574 -> 0 bytes wp-includes/images/css.png | Bin 533 -> 0 bytes wp-includes/images/default.png | Bin 479 -> 0 bytes wp-includes/images/doc.png | Bin 1535 -> 0 bytes wp-includes/images/exe.png | Bin 194 -> 0 bytes wp-includes/images/html.png | Bin 537 -> 0 bytes wp-includes/images/js.png | Bin 517 -> 0 bytes wp-includes/images/pdf.png | Bin 1424 -> 0 bytes wp-includes/images/swf.png | Bin 1542 -> 0 bytes wp-includes/images/tar.png | Bin 1280 -> 0 bytes wp-includes/images/text.png | Bin 1559 -> 0 bytes wp-includes/images/upload.png | Bin 0 -> 896 bytes wp-includes/images/video.png | Bin 596 -> 0 bytes wp-includes/images/zip.png | Bin 1270 -> 0 bytes wp-includes/js/autosave.js | 65 +- wp-includes/js/comment-reply.js | 48 + wp-includes/js/hoverIntent.js | 128 + wp-includes/js/jquery/jquery.hotkeys.js | 128 + wp-includes/js/jquery/jquery.table-hotkeys.js | 93 + wp-includes/js/jquery/ui.core.js | 2 +- wp-includes/js/jquery/ui.dialog.js | 1 + wp-includes/js/jquery/ui.draggable.js | 1 + wp-includes/js/jquery/ui.resizable.js | 1 + wp-includes/js/jquery/ui.sortable.js | 3 +- wp-includes/js/jquery/ui.tabs.js | 2 +- wp-includes/js/quicktags.js | 193 + wp-includes/js/swfupload/handlers.js | 56 +- .../js/swfupload/plugins/swfupload.cookies.js | 41 +- .../js/swfupload/plugins/swfupload.queue.js | 63 +- .../swfupload/plugins/swfupload.swfobject.js | 110 + wp-includes/js/swfupload/swfupload.js | 1406 ++++--- wp-includes/js/swfupload/swfupload.swf | Bin 0 -> 11931 bytes wp-includes/js/thickbox/thickbox.css | 13 +- wp-includes/js/thickbox/thickbox.js | 3 +- wp-includes/js/tinymce/langs/wp-langs-en.js | 431 +++ wp-includes/js/tinymce/langs/wp-langs.php | 20 +- .../js/tinymce/plugins/autosave/readme.txt | 1 - .../plugins/fullscreen/editor_plugin.js | 2 +- .../tinymce/plugins/fullscreen/fullscreen.htm | 2 +- .../plugins/inlinepopups/editor_plugin.js | 2 +- .../tinymce/plugins/inlinepopups/template.htm | 2 +- .../js/tinymce/plugins/media/editor_plugin.js | 2 +- .../js/tinymce/plugins/media/js/media.js | 8 +- .../js/tinymce/plugins/media/media.htm | 14 +- .../js/tinymce/plugins/paste/blank.htm | 2 +- .../js/tinymce/plugins/paste/editor_plugin.js | 2 +- .../js/tinymce/plugins/paste/pastetext.htm | 6 +- .../js/tinymce/plugins/paste/pasteword.htm | 6 +- .../tinymce/plugins/safari/editor_plugin.js | 2 +- .../spellchecker/classes/EnchantSpell.php | 67 + .../spellchecker/classes/GoogleSpell.php | 1 + .../plugins/spellchecker/classes/PSpell.php | 1 + .../spellchecker/classes/PSpellShell.php | 7 +- .../spellchecker/classes/SpellChecker.php | 3 +- .../tinymce/plugins/spellchecker/config.php | 7 + .../plugins/spellchecker/editor_plugin.js | 6 +- .../js/tinymce/plugins/spellchecker/rpc.php | 39 +- .../plugins/wordpress/editor_plugin.js | 14 +- .../plugins/wpeditimage/css/editimage.css | 138 +- .../plugins/wpeditimage/editimage.html | 10 +- .../plugins/wpeditimage/editor_plugin.js | 27 +- .../plugins/wpgallery/editor_plugin.js | 174 + .../tinymce/plugins/wpgallery/img/delete.png | Bin 0 -> 1638 bytes .../js/tinymce/plugins/wpgallery/img/edit.png | Bin 0 -> 1799 bytes .../tinymce/plugins/wpgallery/img/gallery.png | Bin 0 -> 27676 bytes .../js/tinymce/plugins/wpgallery/img/t.gif | Bin 0 -> 43 bytes .../js/tinymce/themes/advanced/about.htm | 6 +- .../js/tinymce/themes/advanced/anchor.htm | 4 +- .../js/tinymce/themes/advanced/charmap.htm | 4 +- .../tinymce/themes/advanced/color_picker.htm | 6 +- .../themes/advanced/editor_template.js | 2 +- .../js/tinymce/themes/advanced/image.htm | 8 +- .../js/tinymce/themes/advanced/js/about.js | 2 +- .../js/tinymce/themes/advanced/js/image.js | 2 +- .../js/tinymce/themes/advanced/link.htm | 10 +- .../themes/advanced/skins/default/dialog.css | 2 +- .../themes/advanced/skins/default/ui.css | 13 +- .../themes/advanced/skins/o2k7/dialog.css | 2 +- .../tinymce/themes/advanced/skins/o2k7/ui.css | 12 +- .../themes/advanced/skins/o2k7/ui_black.css | 8 +- .../themes/advanced/skins/o2k7/ui_silver.css | 2 +- .../themes/advanced/skins/wp_theme/dialog.css | 46 +- .../advanced/skins/wp_theme/img/butt2.png | Bin 545 -> 212 bytes .../themes/advanced/skins/wp_theme/ui.css | 38 +- .../tinymce/themes/advanced/source_editor.htm | 4 +- wp-includes/js/tinymce/tiny_mce.js | 2 +- wp-includes/js/tinymce/tiny_mce_config.php | 331 -- wp-includes/js/tinymce/tiny_mce_ext.js | 35 - wp-includes/js/tinymce/tiny_mce_popup.js | 37 +- wp-includes/js/tinymce/wordpress.css | 14 +- wp-includes/js/tinymce/wp-mce-help.php | 68 +- wp-includes/js/wp-ajax-response.js | 2 +- wp-includes/js/wp-lists.js | 4 +- wp-includes/kses.php | 279 +- wp-includes/l10n.php | 180 +- wp-includes/link-template.php | 817 ++++- wp-includes/locale.php | 6 +- wp-includes/media.php | 330 +- wp-includes/pluggable.php | 267 +- wp-includes/plugin.php | 219 +- wp-includes/post-template.php | 618 +++- wp-includes/post.php | 1592 ++++---- wp-includes/query.php | 1054 +++++- wp-includes/registration.php | 75 +- wp-includes/rewrite.php | 980 ++++- wp-includes/rss.php | 113 +- wp-includes/script-loader.php | 349 +- wp-includes/shortcodes.php | 10 +- wp-includes/taxonomy.php | 436 ++- wp-includes/theme.php | 596 ++- wp-includes/update.php | 255 +- wp-includes/user.php | 280 +- wp-includes/vars.php | 11 +- wp-includes/version.php | 4 +- wp-includes/widgets.php | 679 +++- wp-includes/wlwmanifest.xml | 1 + wp-includes/wp-db.php | 82 +- wp-includes/wp-diff.php | 187 +- wp-load.php | 2 +- wp-login.php | 100 +- wp-mail.php | 129 +- wp-rdf.php | 19 +- wp-rss.php | 19 +- wp-rss2.php | 17 +- wp-settings.php | 108 +- xmlrpc.php | 990 ++++- 427 files changed, 49290 insertions(+), 16191 deletions(-) create mode 100644 wp-admin/css/farbtastic-rtl.css create mode 100644 wp-admin/css/farbtastic.css create mode 100644 wp-admin/css/plugin-install-rtl.css create mode 100644 wp-admin/css/plugin-install.css delete mode 100644 wp-admin/css/press-this-ie-rtl.css delete mode 100644 wp-admin/css/press-this-ie.css delete mode 100644 wp-admin/css/upload-rtl.css delete mode 100644 wp-admin/edit-form.php create mode 100644 wp-admin/images/archive-link.png create mode 100644 wp-admin/images/blue-grad.png create mode 100644 wp-admin/images/bubble_bg-rtl.gif create mode 100644 wp-admin/images/button-grad-active.png create mode 100644 wp-admin/images/button-grad.png delete mode 100644 wp-admin/images/comment-pill.gif delete mode 100644 wp-admin/images/comment-stalk-classic.gif delete mode 100644 wp-admin/images/comment-stalk-fresh.gif delete mode 100644 wp-admin/images/comment-stalk-rtl.gif create mode 100644 wp-admin/images/ed-bg.gif create mode 100644 wp-admin/images/fav-arrow-rtl.gif create mode 100644 wp-admin/images/fav-arrow.gif create mode 100644 wp-admin/images/fav-top.png create mode 100644 wp-admin/images/fav.png delete mode 100644 wp-admin/images/gear.png create mode 100644 wp-admin/images/generic.png create mode 100644 wp-admin/images/gray-grad.png create mode 100644 wp-admin/images/icons32-vs.png create mode 100644 wp-admin/images/icons32.png create mode 100644 wp-admin/images/list-vs.png create mode 100644 wp-admin/images/list.png create mode 100644 wp-admin/images/marker.png create mode 100644 wp-admin/images/mask.png delete mode 100644 wp-admin/images/media-button-gallery.gif delete mode 100644 wp-admin/images/media-buttons.gif create mode 100644 wp-admin/images/menu-arrows.gif create mode 100644 wp-admin/images/menu-bits-rtl.gif create mode 100644 wp-admin/images/menu-bits.gif create mode 100644 wp-admin/images/menu-dark-rtl.gif create mode 100644 wp-admin/images/menu-dark.gif create mode 100644 wp-admin/images/menu-vs.png create mode 100644 wp-admin/images/menu.png create mode 100644 wp-admin/images/resize.gif create mode 100644 wp-admin/images/screen-options-left.gif create mode 100644 wp-admin/images/screen-options-right-up.gif create mode 100644 wp-admin/images/screen-options-right.gif create mode 100644 wp-admin/images/se.png create mode 100644 wp-admin/images/star.gif delete mode 100644 wp-admin/images/tab.png delete mode 100644 wp-admin/images/tail.gif create mode 100644 wp-admin/images/wheel.png create mode 100644 wp-admin/images/white-grad-active.png create mode 100644 wp-admin/images/white-grad.png create mode 100644 wp-admin/images/wp-logo.gif rename wp-admin/{link-import.php => import/opml.php} (82%) create mode 100644 wp-admin/includes/class-wp-filesystem-ssh2.php create mode 100644 wp-admin/includes/plugin-install.php create mode 100644 wp-admin/includes/update-core.php create mode 100644 wp-admin/js/dashboard.js create mode 100644 wp-admin/js/farbtastic.js delete mode 100644 wp-admin/js/forms.js create mode 100644 wp-admin/js/inline-edit-post.js create mode 100644 wp-admin/js/inline-edit-tax.js create mode 100644 wp-admin/js/plugin-install.js delete mode 100644 wp-admin/js/upload.js create mode 100644 wp-admin/media-new.php create mode 100644 wp-admin/options-media.php create mode 100644 wp-admin/plugin-install.php create mode 100644 wp-admin/tools.php create mode 100644 wp-admin/update-core.php create mode 100644 wp-admin/user-new.php delete mode 100644 wp-content/themes/default/searchform.php create mode 100644 wp-includes/http.php delete mode 100644 wp-includes/images/audio.png delete mode 100644 wp-includes/images/css.png delete mode 100644 wp-includes/images/default.png delete mode 100644 wp-includes/images/doc.png delete mode 100644 wp-includes/images/exe.png delete mode 100644 wp-includes/images/html.png delete mode 100644 wp-includes/images/js.png delete mode 100644 wp-includes/images/pdf.png delete mode 100644 wp-includes/images/swf.png delete mode 100644 wp-includes/images/tar.png delete mode 100644 wp-includes/images/text.png create mode 100644 wp-includes/images/upload.png delete mode 100644 wp-includes/images/video.png delete mode 100644 wp-includes/images/zip.png create mode 100644 wp-includes/js/comment-reply.js create mode 100644 wp-includes/js/hoverIntent.js create mode 100644 wp-includes/js/jquery/jquery.hotkeys.js create mode 100644 wp-includes/js/jquery/jquery.table-hotkeys.js create mode 100644 wp-includes/js/jquery/ui.dialog.js create mode 100644 wp-includes/js/jquery/ui.draggable.js create mode 100644 wp-includes/js/jquery/ui.resizable.js create mode 100644 wp-includes/js/swfupload/plugins/swfupload.swfobject.js create mode 100644 wp-includes/js/swfupload/swfupload.swf create mode 100644 wp-includes/js/tinymce/langs/wp-langs-en.js delete mode 100644 wp-includes/js/tinymce/plugins/autosave/readme.txt create mode 100644 wp-includes/js/tinymce/plugins/spellchecker/classes/EnchantSpell.php create mode 100644 wp-includes/js/tinymce/plugins/wpgallery/editor_plugin.js create mode 100644 wp-includes/js/tinymce/plugins/wpgallery/img/delete.png create mode 100644 wp-includes/js/tinymce/plugins/wpgallery/img/edit.png create mode 100644 wp-includes/js/tinymce/plugins/wpgallery/img/gallery.png create mode 100644 wp-includes/js/tinymce/plugins/wpgallery/img/t.gif delete mode 100644 wp-includes/js/tinymce/tiny_mce_config.php delete mode 100644 wp-includes/js/tinymce/tiny_mce_ext.js diff --git a/license.txt b/license.txt index b5fcfa6e..d31195ab 100644 --- a/license.txt +++ b/license.txt @@ -1,8 +1,9 @@ GNU GENERAL PUBLIC LICENSE Version 2, June 1991 - Copyright (C) 1989, 1991 Free Software Foundation, Inc. - 675 Mass Ave, Cambridge, MA 02139, USA + Copyright (C) 1989, 1991 Free Software Foundation, Inc. + 51 Franklin St, Fifth Floor, Boston, MA 02110, USA + Everyone is permitted to copy and distribute verbatim copies of this license document, but changing it is not allowed. diff --git a/readme.html b/readme.html index 45fd3f88..5f8c13df 100644 --- a/readme.html +++ b/readme.html @@ -8,7 +8,7 @@

WordPress -
Version 2.6.1 +
Version 2.7

Semantic Personal Publishing Platform

@@ -29,7 +29,7 @@

Upgrading

Before you upgrade anything, make sure you have backup copies of any files you may have modified such as index.php.

-

Upgrading from any previous WordPress to 2.6.1:

+

Upgrading from any previous WordPress to 2.7:

  1. Delete your old WP files, saving ones you've modified.
  2. Upload the new files.
  3. diff --git a/wp-admin/admin-ajax.php b/wp-admin/admin-ajax.php index 44859351..b72ff61d 100644 --- a/wp-admin/admin-ajax.php +++ b/wp-admin/admin-ajax.php @@ -1,29 +1,67 @@ ALERT: You are logged out! Could not save draft. Please log in again.'), wp_login_url() ); + $x = new WP_Ajax_Response( array( + 'what' => 'autosave', + 'id' => $id, + 'data' => $message + ) ); + $x->send(); + } + die('-1'); +} -if ( isset($_GET['action']) && 'ajax-tag-search' == $_GET['action'] ) { +if ( isset( $_GET['action'] ) ) : +switch ( $action = $_GET['action'] ) : +case 'ajax-tag-search' : if ( !current_user_can( 'manage_categories' ) ) die('-1'); $s = $_GET['q']; // is this slashed already? - if ( strstr( $s, ',' ) ) { - $s = explode( ',', $s ); - $s = $s[count( $s ) - 1]; + if ( false !== strpos( $s, ',' ) ) { + $s = explode( ',', $s ); + $s = $s[count( $s ) - 1]; } $s = trim( $s ); if ( strlen( $s ) < 2 ) - die; // require 2 chars for matching - $results = $wpdb->get_col( "SELECT name FROM $wpdb->terms WHERE name LIKE ('%". $s . "%')" ); + die; // require 2 chars for matching + $results = $wpdb->get_col( "SELECT t.name FROM $wpdb->term_taxonomy AS tt INNER JOIN $wpdb->terms AS t ON tt.term_id = t.term_id WHERE tt.taxonomy = 'post_tag' AND t.name LIKE ('%". $s . "%')" ); echo join( $results, "\n" ); die; -} + break; +default : + do_action( 'wp_ajax_' . $_GET['action'] ); + die('0'); + break; +endswitch; +endif; $id = isset($_POST['id'])? (int) $_POST['id'] : 0; switch ( $action = $_POST['action'] ) : @@ -170,7 +208,7 @@ case 'dim-comment' : if ( $_POST['new'] == $current ) die('1'); - if ( 'unapproved' == $current ) { + if ( in_array( $current, array( 'unapproved', 'spam' ) ) ) { check_ajax_referer( "approve-comment_$id" ); if ( wp_set_comment_status( $comment->comment_ID, 'approve' ) ) die('1'); @@ -278,7 +316,7 @@ case 'add-cat' : // From Manage->Categories ) ); $x->send(); } - + $cat = wp_insert_category( $_POST, true ); if ( is_wp_error($cat) ) { @@ -305,6 +343,7 @@ case 'add-cat' : // From Manage->Categories $x = new WP_Ajax_Response( array( 'what' => 'cat', 'id' => $cat->term_id, + 'position' => -1, 'data' => _cat_row( $cat, $level, $cat_full_name ), 'supplemental' => array('name' => $cat_full_name, 'show-link' => sprintf(__( 'Category %s added' ), "cat-$cat->term_id", $cat_full_name)) ) ); @@ -340,6 +379,7 @@ case 'add-link-cat' : // From Blogroll -> Categories $x = new WP_Ajax_Response( array( 'what' => 'link-cat', 'id' => $term_id, + 'position' => -1, 'data' => $link_cat ) ); $x->send(); @@ -376,11 +416,38 @@ case 'add-tag' : // From Manage->Tags $x = new WP_Ajax_Response( array( 'what' => 'tag', 'id' => $tag->term_id, + 'position' => '-1', 'data' => _tag_row( $tag ), 'supplemental' => array('name' => $tag_full_name, 'show-link' => sprintf(__( 'Tag %s added' ), "tag-$tag->term_id", $tag_full_name)) ) ); $x->send(); break; +case 'get-tagcloud' : + if ( !current_user_can( 'manage_categories' ) ) + die('-1'); + + $tags = get_tags( array( 'number' => 45, 'orderby' => 'count', 'order' => 'DESC' ) ); + + if ( empty( $tags ) ) + die( __('No tags found!') ); + + if ( is_wp_error($tags) ) + die($tags->get_error_message()); + + foreach ( $tags as $key => $tag ) { + $tags[ $key ]->link = '#'; + $tags[ $key ]->id = $tag->term_id; + } + + $return = wp_generate_tag_cloud( $tags ); + + if ( empty($return) ) + die('0'); + + echo $return; + + exit; + break; case 'add-comment' : check_ajax_referer( $action ); if ( !current_user_can( 'edit_post', $id ) ) @@ -389,8 +456,9 @@ case 'add-comment' : $start = isset($_POST['page']) ? intval($_POST['page']) * 25 - 1: 24; $status = isset($_POST['comment_status']) ? $_POST['comment_status'] : false; $mode = isset($_POST['mode']) ? $_POST['mode'] : 'detail'; - - list($comments, $total) = _wp_get_comment_list( $status, $search, $start, 1 ); + $p = isset($_POST['p']) ? $_POST['p'] : 0; + $comment_type = isset($_POST['comment_type']) ? $_POST['comment_type'] : ''; + list($comments, $total) = _wp_get_comment_list( $status, $search, $start, 1, $p, $comment_type ); if ( get_option('show_avatars') ) add_filter( 'comment_author', 'floated_admin_avatar' ); @@ -401,7 +469,7 @@ case 'add-comment' : foreach ( (array) $comments as $comment ) { get_comment( $comment ); ob_start(); - _wp_comment_row( $comment->comment_ID, $mode, $status ); + _wp_comment_row( $comment->comment_ID, $mode, $status, true, true ); $comment_list_item = ob_get_contents(); ob_end_clean(); $x->add( array( @@ -410,6 +478,142 @@ case 'add-comment' : 'data' => $comment_list_item ) ); } + $x->send(); + break; +case 'get-comments' : + check_ajax_referer( $action ); + + $post_ID = (int) $_POST['post_ID']; + if ( !current_user_can( 'edit_post', $post_ID ) ) + die('-1'); + + $start = isset($_POST['start']) ? intval($_POST['start']) : 0; + $num = isset($_POST['num']) ? intval($_POST['num']) : 10; + + list($comments, $total) = _wp_get_comment_list( false, false, $start, $num, $post_ID ); + + if ( !$comments ) + die('1'); + + $comment_list_item = ''; + $x = new WP_Ajax_Response(); + foreach ( (array) $comments as $comment ) { + get_comment( $comment ); + ob_start(); + _wp_comment_row( $comment->comment_ID, 'single', false, false ); + $comment_list_item .= ob_get_contents(); + ob_end_clean(); + } + $x->add( array( + 'what' => 'comments', + 'data' => $comment_list_item + ) ); + $x->send(); + break; +case 'replyto-comment' : + check_ajax_referer( $action ); + + $comment_post_ID = (int) $_POST['comment_post_ID']; + if ( !current_user_can( 'edit_post', $comment_post_ID ) ) + die('-1'); + + $status = $wpdb->get_var( $wpdb->prepare("SELECT post_status FROM $wpdb->posts WHERE ID = %d", $comment_post_ID) ); + + if ( empty($status) ) + die('1'); + elseif ( in_array($status, array('draft', 'pending') ) ) + die( __('Error: you are replying to a comment on a draft post.') ); + + $user = wp_get_current_user(); + if ( $user->ID ) { + $comment_author = $wpdb->escape($user->display_name); + $comment_author_email = $wpdb->escape($user->user_email); + $comment_author_url = $wpdb->escape($user->user_url); + $comment_content = trim($_POST['content']); + if ( current_user_can('unfiltered_html') ) { + if ( wp_create_nonce('unfiltered-html-comment_' . $comment_post_ID) != $_POST['_wp_unfiltered_html_comment'] ) { + kses_remove_filters(); // start with a clean slate + kses_init_filters(); // set up the filters + } + } + } else { + die( __('Sorry, you must be logged in to reply to a comment.') ); + } + + if ( '' == $comment_content ) + die( __('Error: please type a comment.') ); + + $comment_parent = absint($_POST['comment_ID']); + $commentdata = compact('comment_post_ID', 'comment_author', 'comment_author_email', 'comment_author_url', 'comment_content', 'comment_type', 'comment_parent', 'user_ID'); + + $comment_id = wp_new_comment( $commentdata ); + $comment = get_comment($comment_id); + if ( ! $comment ) die('1'); + + $modes = array( 'single', 'detail', 'dashboard' ); + $mode = isset($_POST['mode']) && in_array( $_POST['mode'], $modes ) ? $_POST['mode'] : 'detail'; + $position = ( isset($_POST['position']) && (int) $_POST['position']) ? (int) $_POST['position'] : '-1'; + $checkbox = ( isset($_POST['checkbox']) && true == $_POST['checkbox'] ) ? 1 : 0; + + if ( get_option('show_avatars') && 'single' != $mode ) + add_filter( 'comment_author', 'floated_admin_avatar' ); + + $x = new WP_Ajax_Response(); + + ob_start(); + if ( 'dashboard' == $mode ) { + require_once( ABSPATH . 'wp-admin/includes/dashboard.php' ); + _wp_dashboard_recent_comments_row( $comment, false ); + } else { + _wp_comment_row( $comment->comment_ID, $mode, false, $checkbox ); + } + $comment_list_item = ob_get_contents(); + ob_end_clean(); + + $x->add( array( + 'what' => 'comment', + 'id' => $comment->comment_ID, + 'data' => $comment_list_item, + 'position' => $position + )); + + $x->send(); + break; +case 'edit-comment' : + check_ajax_referer( 'replyto-comment' ); + + $comment_post_ID = (int) $_POST['comment_post_ID']; + if ( ! current_user_can( 'edit_post', $comment_post_ID ) ) + die('-1'); + + if ( '' == $_POST['content'] ) + die( __('Error: please type a comment.') ); + + $comment_id = (int) $_POST['comment_ID']; + $_POST['comment_status'] = $_POST['status']; + edit_comment(); + + $mode = ( isset($_POST['mode']) && 'single' == $_POST['mode'] ) ? 'single' : 'detail'; + $position = ( isset($_POST['position']) && (int) $_POST['position']) ? (int) $_POST['position'] : '-1'; + $checkbox = ( isset($_POST['checkbox']) && true == $_POST['checkbox'] ) ? 1 : 0; + + if ( get_option('show_avatars') && 'single' != $mode ) + add_filter( 'comment_author', 'floated_admin_avatar' ); + + $x = new WP_Ajax_Response(); + + ob_start(); + _wp_comment_row( $comment_id, $mode, true, $checkbox ); + $comment_list_item = ob_get_contents(); + ob_end_clean(); + + $x->add( array( + 'what' => 'edit_comment', + 'id' => $comment->comment_ID, + 'data' => $comment_list_item, + 'position' => $position + )); + $x->send(); break; case 'add-meta' : @@ -519,7 +723,7 @@ case 'autosave' : // The name of this action is hardcoded in edit_post() $do_lock = true; $data = ''; - $message = sprintf( __('Draft Saved at %s.'), date( __('g:i:s a'), current_time( 'timestamp', true ) ) ); + $message = sprintf( __('Draft Saved at %s.'), date_i18n( __('g:i:s a') ) ); $supplemental = array(); @@ -616,13 +820,29 @@ case 'closed-postboxes' : check_ajax_referer( 'closedpostboxes', 'closedpostboxesnonce' ); $closed = isset( $_POST['closed'] )? $_POST['closed'] : ''; $closed = explode( ',', $_POST['closed'] ); + $hidden = isset( $_POST['hidden'] )? $_POST['hidden'] : ''; + $hidden = explode( ',', $_POST['hidden'] ); + $page = isset( $_POST['page'] )? $_POST['page'] : ''; + if ( !preg_match( '/^[a-z-_]+$/', $page ) ) { + die(-1); + } + $current_user = wp_get_current_user(); + if ( is_array($closed) ) + update_usermeta($current_user->ID, 'closedpostboxes_'.$page, $closed); + if ( is_array($hidden) ) + update_usermeta($current_user->ID, 'meta-box-hidden_'.$page, $hidden); +break; +case 'hidden-columns' : + check_ajax_referer( 'hiddencolumns', 'hiddencolumnsnonce' ); + $hidden = isset( $_POST['hidden'] )? $_POST['hidden'] : ''; + $hidden = explode( ',', $_POST['hidden'] ); $page = isset( $_POST['page'] )? $_POST['page'] : ''; - if ( !preg_match( '/^[a-z-]+$/', $page ) ) { + if ( !preg_match( '/^[a-z-_]+$/', $page ) ) { die(-1); } - if (!is_array($closed)) break; $current_user = wp_get_current_user(); - update_usermeta($current_user->ID, 'closedpostboxes_'.$page, $closed); + if ( is_array($hidden) ) + update_usermeta($current_user->ID, "manage-$page-columns-hidden", $hidden); break; case 'get-permalink': check_ajax_referer( 'getpermalink', 'getpermalinknonce' ); @@ -636,6 +856,189 @@ case 'sample-permalink': $slug = isset($_POST['new_slug'])? $_POST['new_slug'] : ''; die(get_sample_permalink_html($post_id, $title, $slug)); break; +case 'inline-save': + check_ajax_referer( 'inlineeditnonce', '_inline_edit' ); + + if ( ! isset($_POST['post_ID']) || ! ( $post_ID = (int) $_POST['post_ID'] ) ) + exit; + + if ( 'page' == $_POST['post_type'] ) { + if ( ! current_user_can( 'edit_page', $post_ID ) ) + die( __('You are not allowed to edit this page.') ); + } else { + if ( ! current_user_can( 'edit_post', $post_ID ) ) + die( __('You are not allowed to edit this post.') ); + } + + if ( $last = wp_check_post_lock( $post_ID ) ) { + $last_user = get_userdata( $last ); + $last_user_name = $last_user ? $last_user->display_name : __( 'Someone' ); + printf( $_POST['post_type'] == 'page' ? __( 'Saving is disabled: %s is currently editing this page.' ) : __( 'Saving is disabled: %s is currently editing this post.' ), wp_specialchars( $last_user_name ) ); + exit; + } + + $data = &$_POST; + $post = get_post( $post_ID, ARRAY_A ); + $data['content'] = $post['post_content']; + $data['excerpt'] = $post['post_excerpt']; + + // rename + $data['user_ID'] = $GLOBALS['user_ID']; + + if ( isset($data['post_parent']) ) + $data['parent_id'] = $data['post_parent']; + + // status + if ( isset($data['keep_private']) && 'private' == $data['keep_private'] ) + $data['post_status'] = 'private'; + else + $data['post_status'] = $data['_status']; + + if ( empty($data['comment_status']) ) + $data['comment_status'] = 'closed'; + if ( empty($data['ping_status']) ) + $data['ping_status'] = 'closed'; + + // update the post + $_POST = $data; + edit_post(); + + $post = array(); + if ( 'page' == $_POST['post_type'] ) { + $post[] = get_post($_POST['post_ID']); + page_rows($post); + } elseif ( 'post' == $_POST['post_type'] ) { + $mode = $_POST['post_view']; + $post[] = get_post($_POST['post_ID']); + post_rows($post); + } + + exit; + break; +case 'inline-save-tax': + check_ajax_referer( 'taxinlineeditnonce', '_inline_edit' ); + + if ( ! current_user_can('manage_categories') ) + die( __('Cheatin’ uh?') ); + + if ( ! isset($_POST['tax_ID']) || ! ( $id = (int) $_POST['tax_ID'] ) ) + die(-1); + + switch ($_POST['tax_type']) { + case 'cat' : + $data = array(); + $data['cat_ID'] = $id; + $data['cat_name'] = $_POST['name']; + $data['category_nicename'] = $_POST['slug']; + if ( isset($_POST['parent']) && (int) $_POST['parent'] > 0 ) + $data['category_parent'] = $_POST['parent']; + + $cat = get_category($id, ARRAY_A); + $data['category_description'] = $cat['category_description']; + + $updated = wp_update_category($data); + + if ( $updated && !is_wp_error($updated) ) + echo _cat_row( $updated, 0 ); + else + die( __('Category not updated.') ); + + break; + case 'link-cat' : + $updated = wp_update_term($id, 'link_category', $_POST); + + if ( $updated && !is_wp_error($updated) ) + echo link_cat_row($updated['term_id']); + else + die( __('Category not updated.') ); + + break; + case 'tag' : + $updated = wp_update_term($id, 'post_tag', $_POST); + if ( $updated && !is_wp_error($updated) ) { + $tag = get_term( $updated['term_id'], 'post_tag' ); + if ( !$tag || is_wp_error( $tag ) ) + die( __('Tag not updated.') ); + + echo _tag_row($tag); + } else { + die( __('Tag not updated.') ); + } + + break; + } + + exit; + break; +case 'meta-box-order': + check_ajax_referer( 'meta-box-order' ); + update_user_option( $GLOBALS['current_user']->ID, "meta-box-order_$_POST[page]", $_POST['order'] ); + die('1'); + break; +case 'find_posts': + check_ajax_referer( 'find-posts' ); + + if ( empty($_POST['ps']) ) + exit; + + $what = isset($_POST['pages']) ? 'page' : 'post'; + $s = stripslashes($_POST['ps']); + preg_match_all('/".*?("|$)|((?<=[\\s",+])|^)[^\\s",+]+/', $s, $matches); + $search_terms = array_map(create_function('$a', 'return trim($a, "\\"\'\\n\\r ");'), $matches[0]); + + $searchand = $search = ''; + foreach( (array) $search_terms as $term) { + $term = addslashes_gpc($term); + $search .= "{$searchand}(($wpdb->posts.post_title LIKE '%{$term}%') OR ($wpdb->posts.post_content LIKE '%{$term}%'))"; + $searchand = ' AND '; + } + $term = $wpdb->escape($s); + if ( count($search_terms) > 1 && $search_terms[0] != $s ) + $search .= " OR ($wpdb->posts.post_title LIKE '%{$term}%') OR ($wpdb->posts.post_content LIKE '%{$term}%')"; + + $posts = $wpdb->get_results( "SELECT ID, post_title, post_status, post_date FROM $wpdb->posts WHERE post_type = '$what' AND $search ORDER BY post_date_gmt DESC LIMIT 50" ); + + if ( ! $posts ) + exit( __('No posts found.') ); + + $html = ''; + foreach ( $posts as $post ) { + + switch ( $post->post_status ) { + case 'publish' : + case 'private' : + $stat = __('Published'); + break; + case 'future' : + $stat = __('Scheduled'); + break; + case 'pending' : + $stat = __('Pending Review'); + break; + case 'draft' : + $stat = __('Unpublished'); + break; + } + + if ( '0000-00-00 00:00:00' == $post->post_date ) { + $time = ''; + } else { + $time = mysql2date(__('Y/m/d'), $post->post_date); + } + + $html .= ''; + $html .= ''."\n\n"; + } + $html .= '

    '.__('Title').''.__('Time').''.__('Status').'
    '.wp_specialchars($time, true).''.wp_specialchars($stat, true).'
    '; + + $x = new WP_Ajax_Response(); + $x->add( array( + 'what' => $what, + 'data' => $html + )); + $x->send(); + + break; default : do_action( 'wp_ajax_' . $_POST['action'] ); die('0'); diff --git a/wp-admin/admin-footer.php b/wp-admin/admin-footer.php index d5f129f3..87d953fa 100644 --- a/wp-admin/admin-footer.php +++ b/wp-admin/admin-footer.php @@ -1,14 +1,28 @@ - - + + +
    +
    +
    + - + \ No newline at end of file diff --git a/wp-admin/admin-functions.php b/wp-admin/admin-functions.php index 4a0d327b..b8c84fda 100644 --- a/wp-admin/admin-functions.php +++ b/wp-admin/admin-functions.php @@ -1,5 +1,16 @@ +?> \ No newline at end of file diff --git a/wp-admin/admin-header.php b/wp-admin/admin-header.php index 54fdea48..33e88732 100644 --- a/wp-admin/admin-header.php +++ b/wp-admin/admin-header.php @@ -1,33 +1,23 @@ > -<?php bloginfo('name') ?> › <?php echo wp_specialchars( strip_tags( $title ) ); ?> — WordPress +<?php bloginfo('name') ?> › <?php echo $title; ?> — WordPress // - - - +if ( $is_iphone ) { ?> + + +
    - 30 ) + $title_class = 'class="long-title"'; +} else { + if ( strlen($blog_name) > 30 ) + $title_class = 'class="long-title"'; +} ?> - + +

    >

    + +
    +
    +

    %2$s'), 'profile.php', $user_identity) ?> + | +

    +
    + + +
    +
    + + + -

    %2$s!'), 'profile.php', $user_identity) ?> | | Help') ?> | Forums'); if ( ! $is_opera ) { ?> |

    +
    + +
    -
    diff --git a/wp-admin/admin-post.php b/wp-admin/admin-post.php index f45fc62e..55c7d9f3 100644 --- a/wp-admin/admin-post.php +++ b/wp-admin/admin-post.php @@ -1,5 +1,13 @@ flush_rules(); + exit(); } else { do_action("load-$pagenow"); diff --git a/wp-admin/async-upload.php b/wp-admin/async-upload.php index 18b81041..8ee85fc1 100644 --- a/wp-admin/async-upload.php +++ b/wp-admin/async-upload.php @@ -1,8 +1,10 @@ false, 'delete' => false )); + } else { + echo get_media_item($id); + } exit; } @@ -46,4 +53,4 @@ else { echo apply_filters("async_upload_{$type}", $id); } -?> +?> \ No newline at end of file diff --git a/wp-admin/categories.php b/wp-admin/categories.php index d2e8fb37..e7042480 100644 --- a/wp-admin/categories.php +++ b/wp-admin/categories.php @@ -1,12 +1,19 @@ - -

    +
    + +

    ' . __('Search results for “%s”') . '', wp_specialchars( stripslashes($_GET['s']) ) ); ?> +

    + + +

    -
    -
    - -

    add new)'), '#addcat') ?>

    - -

    - - -

    - - + +

    - +

    +
    + +
    +
    +
    add_query_arg( 'pagenum', '%#%' ), 'format' => '', + 'prev_text' => __('«'), + 'next_text' => __('»'), 'total' => ceil(wp_count_terms('category') / $catsperpage), 'current' => $pagenum )); @@ -153,56 +178,135 @@ if ( $page_links ) echo "
    $page_links
    "; ?> -
    - +
    + +

    -
    +
    - +
    - - - - + + + + + + + +
    -
    - $page_links
    "; ?> -
    + +
    + + +
    -
    +
    - -
    + + +

    Note:
    Deleting a category does not delete the posts in that category. Instead, posts that were only assigned to the deleted category are set to the category %s.'), apply_filters('the_category', get_catname(get_option('default_category')))) ?>

    category to tag converter.'), 'admin.php?import=wp-cat2tag') ?>

    - +
    +
    + +
    +
    + + +parent = 0; do_action('add_category_form_pre', $category); ?> + +
    +

    +
    +
    + + + +
    + + +

    +
    + +
    + + +

    +
    + +
    + + 0, 'name' => 'category_parent', 'orderby' => 'name', 'selected' => $category->parent, 'hierarchical' => true, 'show_option_none' => __('None'))); ?> +

    +
    + +
    + + +

    +
    + +

    + +
    - + + +
    +
    + +
    +
    + +

    $msg

    "; include('admin-footer.php'); die; @@ -21,7 +34,6 @@ case 'editcomment' : $title = __('Edit Comment'); wp_enqueue_script('comment'); - require_once('admin-header.php'); $comment_id = absint( $_GET['c'] ); @@ -111,7 +123,7 @@ if ( 'spam' == $_GET['dt'] ) { - + comment_content; ?> @@ -171,7 +183,7 @@ case 'unapprovecomment' : if ( '' != wp_get_referer() && false == $noredir ) wp_redirect( wp_get_referer() ); else - wp_redirect( admin_url('edit.php?p=' . absint( $comment->comment_post_ID ) . '#comments') ); + wp_redirect( admin_url('edit-comments.php?p=' . absint( $comment->comment_post_ID ) . '#comments') ); exit(); break; @@ -196,7 +208,7 @@ case 'approvecomment' : if ( '' != wp_get_referer() && false == $noredir ) wp_redirect( wp_get_referer() ); else - wp_redirect( admin_url('edit.php?p=' . absint( $comment->comment_post_ID ) . '#comments') ); + wp_redirect( admin_url('edit-comments.php?p=' . absint( $comment->comment_post_ID ) . '#comments') ); exit(); break; @@ -210,7 +222,7 @@ case 'editedcomment' : edit_comment(); - $location = ( empty( $_POST['referredby'] ) ? "edit.php?p=$comment_post_id" : $_POST['referredby'] ) . '#comment-' . $comment_id; + $location = ( empty( $_POST['referredby'] ) ? "edit-comments.php?p=$comment_post_id" : $_POST['referredby'] ) . '#comment-' . $comment_id; $location = apply_filters( 'comment_edit_redirect', $location, $comment_id ); wp_redirect( $location ); @@ -225,4 +237,4 @@ default: include('admin-footer.php'); -?> +?> \ No newline at end of file diff --git a/wp-admin/css/colors-classic-rtl.css b/wp-admin/css/colors-classic-rtl.css index 4c6f3271..4a550afd 100644 --- a/wp-admin/css/colors-classic-rtl.css +++ b/wp-admin/css/colors-classic-rtl.css @@ -1,24 +1,80 @@ -.post-com-count { -} -#adminmenu li a #awaiting-mod, #sidemenu li a #update-plugins { - background-image: url(../images/comment-stalk-rtl.gif); - background-position:right bottom; -} -#footer { - background-position:99% 10px; -} -#poststuff .closed .togbox, #poststuff .togbox { - background-image: url(../images/toggle-arrow-rtl.gif) !important; -} .bar { border-right-color: transparent; border-left-color: #99d; } + .plugins .togl { border-right-color: transparent; border-left-color: #ccc; } + +.post-com-count { + background-image: url(../images/bubble_bg-rtl.gif); +} +.tablenav .tablenav-pages a { + background: #eee url('../images/menu-bits-rtl.gif') repeat-x scroll right -379px; +} #upload-menu li.current { border-right-color: transparent; border-left-color: #448abd; } + +#adminmenu .wp-submenu .current a.current { + background: transparent url(../images/menu-bits-rtl.gif) no-repeat scroll right -289px; +} + +#adminmenu li.wp-menu-separator { + background: transparent url(../images/menu-arrows.gif) no-repeat scroll right -34px; +} + +.folded #adminmenu li.wp-menu-separator { + background: transparent url(../images/menu-arrows.gif) no-repeat scroll left 5px; +} + +#adminmenu li.wp-has-current-submenu .wp-menu-toggle, +#adminmenu li.wp-has-current-submenu:hover .wp-menu-toggle { + background: transparent url(../images/menu-bits-rtl.gif) repeat-x scroll right -207px; +} + +#adminmenu .wp-has-current-submenu ul li a.current { + background: url(../images/menu-dark-rtl.gif) top right no-repeat !important; +} + +#adminmenu li.wp-has-current-submenu a.wp-has-current-submenu, +#adminmenu .menu-top .current { + background: url(../images/menu-bits-rtl.gif) top right repeat-x; +} + +#adminmenu li.wp-has-current-submenu ul li a { + background: url(../images/menu-dark-rtl.gif) bottom right no-repeat !important; +} + +#adminmenu li.wp-has-current-submenu.wp-menu-open .wp-menu-toggle, #adminmenu li.wp-has-current-submenu:hover .wp-menu-toggle { + background: transparent url(../images/menu-bits-rtl.gif) no-repeat right -207px; +} + +#adminmenu .wp-has-submenu:hover .wp-menu-toggle, +#adminmenu .wp-menu-open .wp-menu-toggle { + background: transparent url(../images/menu-bits-rtl.gif) repeat-x scroll right -109px; +} + +#adminmenu a.wp-has-submenu { + background: #f1f1f1 url(../images/menu-bits-rtl.gif) repeat-x scroll right -379px; +} + +#adminmenu .wp-submenu a { + background: #FFFFFF url(../images/menu-bits-rtl.gif) no-repeat scroll right -310px; +} + +#adminmenu li.current a, +#adminmenu .wp-submenu a:hover { + background: transparent url(../images/menu-bits-rtl.gif) no-repeat scroll right -289px; +} + +#adminmenu li.wp-has-current-submenu a.wp-has-submenu { + background: #b5b5b5 url(../images/menu-bits-rtl.gif) repeat-x scroll right top; +} + +.meta-box-sortables .postbox:hover .handlediv { + background: transparent url(../images/menu-bits-rtl.gif) no-repeat scroll right -111px; +} diff --git a/wp-admin/css/colors-classic.css b/wp-admin/css/colors-classic.css index 65d0f383..49ba5f8f 100644 --- a/wp-admin/css/colors-classic.css +++ b/wp-admin/css/colors-classic.css @@ -1,9 +1,27 @@ +html { + background-color: #F5FCFD; +} + +.find-box-search { + border-color: #dfdfdf; + background-color: #f1f1f1; +} + +.find-box { + background-color: #f1f1f1; +} + +.find-box-inside { + background-color: #fff; +} + a.page-numbers:hover { border-color: #999; } -body, .form-table .pre { - background-color: #fff; +body, +#wpbody, +.form-table .pre { color: #333; } @@ -11,51 +29,118 @@ body > #upload-menu { border-bottom-color: #fff; } -div#current-widgets, #postcustomstuff table, #your-profile fieldset, a.page-numbers, #rightnow, div.dashboard-widget, .widefat { +kbd, code { + background: #eaeaea; +} + +div#current-widgets, +#postcustomstuff table, +#your-profile fieldset, +#rightnow, +div.dashboard-widget, +#dashboard-widgets p.dashboard-widget-links, +#replyrow #ed_reply_toolbar input { border-color: #ccc; } +#poststuff .inside label.spam { + color: red; +} + +#poststuff .inside label.waiting { + color: orange; +} + +#poststuff .inside label.approved { + color: green; +} + +#postcustomstuff table { + border-color: #dfdfdf; + background-color: #F9F9F9; +} + +#postcustomstuff thead th { + background-color: #F1F1F1; +} + +#postcustomstuff table input, +#postcustomstuff table textarea { + border-color: #dfdfdf; + background-color: #fff; +} + +.widefat { + border-color: #BBD8E7; + background-color: #fff; +} + div.dashboard-widget-error { background-color: #c43; } div.dashboard-widget-notice { - background-color: #F0F6FB; + background-color: #cfe1ef; } -div.dashboard-widget-submit, ul.widget-control-list div.widget-control-actions { +div.dashboard-widget-submit, +ul.widget-control-list div.widget-control-actions { border-top-color: #ccc; } -input.disabled, textarea.disabled { - background-color: #ccc; +div.ui-tabs-panel { + border-color: #f1f1f1; +} + +ul#category-tabs li.ui-tabs-selected { + background-color: #f1f1f1; } -#user_info a:hover, li.widget-list-control-item h4.widget-title a:hover, .submit a, #dashmenu a:hover, #footer a, #upload-menu li a.upload-tab-link, li.widget-list-control-item h4.widget-title a, +input.disabled, +textarea.disabled { + background-color: #ccc; +} +/* #upload-menu li a.upload-tab-link, */ +li.widget-list-control-item h4.widget-title a:hover, +li.widget-list-control-item h4.widget-title a, #dragHelper li.widget-list-control-item h4.widget-title a, -#draghelper li.widget-list-control-item h4.widget-title a:visited, .login #backtoblog a:hover { +#draghelper li.widget-list-control-item h4.widget-title a:visited, +.login #backtoblog a:hover, +#plugin-information .action-button a, +#plugin-information .action-button a:hover, +#plugin-information .action-button a:visited { color: #fff; } -ul#category-tabs li.ui-tabs-selected, li.widget-list-control-item, div.nav, .tablenav, .submitbox, h3.dashboard-widget-title, h3.dashboard-widget-title span, h3.dashboard-widget-title small, ul.view-switch li.current, .form-table tr, #poststuff h3, .login form, h3.info-box-title { - background-color: #cfebf7; +li.widget-list-control-item div.widget-control { + background-color: #fff; + border-color: #dfdfdf; } -div.ui-tabs-panel { - border-color: #cfebf7; +.metabox-holder .postbox h3, +#poststuff .postbox h3, +#poststuff .stuffbox h3 { + background: #dfdfdf url("../images/blue-grad.png") repeat-x left top; + text-shadow: #fff 0 1px 0; +} + +.form-table th, +.form-wrap label { + color: #222; + text-shadow: #fff 0 1px 0; +} + +.setting-description, .form-wrap p { + color: #666; } select { background-color: #fff; - border-color: #ddd; + border-color: #8CBDD5; } strong .post-com-count span { - background-color: #2583ad; -} - -.button-secondary, #login form .submit input { - background-color: #8ebddc !important; + background-color: #21759b; } ul#widget-list li.widget-list-item h4.widget-title { @@ -67,10 +152,14 @@ ul#widget-list li.widget-list-item h4.widget-title { background-color: #ccf3fa; } -.ac_match, .subsubsub a.current, h2 { +.ac_match, .subsubsub a.current { color: #000; } +.wrap h2 { + color: #093E56; +} + .ac_over { background-color: #f0f0b8; } @@ -84,13 +173,13 @@ ul#widget-list li.widget-list-item h4.widget-title { color: #101010; } -.alternate { - background-color: #f9f9f9; +.alternate, .alt { + background-color: #EDFBFC; } .available-theme a.screenshot { background-color: #f1f1f1; - border-color: #ccc; + border-color: #ddd; } .bar { @@ -98,8 +187,11 @@ ul#widget-list li.widget-list-item h4.widget-title { border-right-color: #99d; } -.describe { - border-top-color: #d0d0d0; +#media-upload { + background: #fff; +} +#media-upload .slidetoggle { + border-top-color: #dfdfdf; } .error, #login #login_error { @@ -119,44 +211,45 @@ ul#widget-list li.widget-list-item h4.widget-title { border-color: #c00 !important; } -.form-table input, .form-table textarea { - border-color: #c6d9e9; -} - -.form-table td, .form-table th { - border-bottom-color: #fff; +.form-table input, +.form-table textarea, +.search-input, +.form-field input, +.form-field textarea, +.submit { + border-color: #8CBDD5; } .highlight { - background-color: #cfebf7; + background-color: #e4f2fd; color: #d54e21; } -.howto, .nonessential, #sidemenu, #edit-slug-box, .form-input-tip, #dashboard_primary span.rss-date, .subsubsub, #dashboard_secondary div.dashboard-widget-content ul li a cite { - color: #999; -} - -#dashmenu a, #user_info a { - color: #88b4d7; +.howto, +.nonessential, +#edit-slug-box, +.form-input-tip, +.rss-widget span.rss-date, +.subsubsub { + color: #666; } .media-item { - border-bottom-color: #d0d0d0; + border-bottom-color: #dfdfdf; } -.media-upload-form label.form-help, td.help { - color: #9a9a9a; +#wpbody-content #media-items .describe { + border-top-color: #dfdfdf; } -.page-numbers { - background-color: #fff; - border-color: #fff; +.describe input[type="text"], +.describe textarea { + border-color: #dfdfdf; } -.page-numbers.current { - background-color: #328ab2; - border-color: #328ab2; - color: #fff; +.media-upload-form label.form-help, +td.help { + color: #9a9a9a; } .post-com-count { @@ -186,46 +279,100 @@ ul#widget-list li.widget-list-item h4.widget-title { color: #666; } -.submit input, .button, .button-secondary, #login form .submit input, div.dashboard-widget-submit input, #edit-slug-buttons a.save { - background-color: #e5e5e5; - color: #07273e; - border-color: #a3a3a3; +.button, +.button-secondary, +.submit input, +input[type=button], +input[type=submit] { + border-color: #8CBDD5; + color: #093E56; } -.button[disabled], .button:disabled { - background-color: #999; +.button:hover, +.button-secondary:hover, +.submit input:hover, +input[type=button]:hover, +input[type=submit]:hover { + color: #000; + border-color: #21759B; } -.tablenav .button-secondary { - border-color: #5396c5; +.button, +.submit input, +.button-secondary { + background: #f2f2f2 url(../images/white-grad.png) repeat-x scroll left top; } -.submit input:hover, .button:hover, #edit-slug-buttons a.save:hover { - border-color: #535353; +.button:active, +.submit input:active, +.button-secondary:active { + background: #eee url(../images/white-grad-active.png) repeat-x scroll left top; } -.submit input:hover, .button:hover, .button-secondary:hover, #wphead #viewsite a:hover, #submenu a.current, #submenu a:hover, .submitbox #previewview a:hover, #the-comment-list .comment a:hover, #rightnow a:hover, a:hover, .subsubsub a:hover, .subsubsub a.current:hover, #login form .submit input:hover, div.dashboard-widget-submit input:hover, #edit-slug-buttons a.save:hover, #media-upload a.del-link:hover { +.button-primary, +.submit .button-primary, +#login form .submit input { + border-color: #298cba !important; + font-weight: bold; + color: #FFF !important; + background: #21759B url(../images/button-grad.png) repeat-x scroll left top; +} + +.button-primary:active, +#login form .submit input:active { + background: #21759b url(../images/button-grad-active.png) repeat-x scroll left top !important; +} + +.button[disabled], +.button:disabled, +.button-secondary[disabled], +.button-secondary:disabled, +a.button.disabled { + color: #ccc !important; + border-color: #ccc; +} + +.button-primary[disabled], +.button-primary:disabled { + color: #2fa0d5 !important; +} + +a:active, +a:focus { color: #d54e21; } -#adminmenu a:hover, #sidemenu a:hover, .ui-tabs-nav a:hover { - color: #97c4d8; +a:hover, +#wphead #viewsite a:hover, +#adminmenu a:hover, +#adminmenu ul.wp-submenu a:hover, +#the-comment-list .comment a:hover, +#rightnow a:hover, +.subsubsub a:hover, +.subsubsub a.current:hover, +#login form .submit input:hover, +div.dashboard-widget-submit input:hover, +#media-upload a.del-link:hover, +.ui-tabs-nav a:hover { + color: #d54e21; } -.button-secondary:hover, #login form .submit input:hover { - border-color: #328ab2; - background-color: #a6d2e5 !important; +#the-comment-list .comment-item, +#dashboard-widgets #dashboard_quick_press form p.submit { + border-color: #dfdfdf; } -.submitbox #autosave .error, ul.view-switch li.current a { - color: #333; +.button-primary:hover, +#login form .submit input:hover { + border-color: #13455b !important; + color: #EAF2FA !important; } -.submitbox #previewview { - background-color: #5488af; +#side-info-column #category-tabs .ui-tabs-selected a { + color: #333; } -.submitbox #previewview a, #rightnow .rbutton { +#rightnow .rbutton { background-color: #ebebeb; color: #264761; } @@ -235,8 +382,9 @@ ul#widget-list li.widget-list-item h4.widget-title { color: #ccc; } -.submitbox .submitdelete { - border-bottom-color: #999; +.submitbox .submitdelete, a.delete { + color: #f00; + border-bottom-color: #f00; } .submitbox .submitdelete:hover, @@ -246,94 +394,136 @@ ul#widget-list li.widget-list-item h4.widget-title { border-bottom-color: #f00; } +#normal-sortables .submitbox .submitdelete:hover { + color: #000; + background-color: #f00; + border-bottom-color: #f00; +} + .tablenav .dots { - background-color: #cfebf7; - border-color: #cfebf7; + border-color: transparent; } -.tablenav .next, .tablenav .prev{ - background-color: #cfebf7; - border-bottom-color: #cfebf7; - border-color: #cfebf7; - color: #2583ad; +.tablenav .next, +.tablenav .prev { + border-color: transparent; + color: #21759b; } -.tablenav .next:hover, .tablenav .prev:hover { - border-bottom-color: #d54e21; - border-color: #cfebf7; +.tablenav .next:hover, +.tablenav .prev:hover { + border-color: transparent; color: #d54e21; } -.updated, .login #login_error, .login .message { +.updated, +.login #login_error, +.login .message { background-color: #ffffe0; border-color: #e6db55; } -.updated a { - border-bottom-color: #2583ad; +a.page-numbers { + border-bottom-color: #B8D3E2; } -.widefat td, .widefat th, div#available-widgets-filter, ul#widget-list li.widget-list-item, .commentlist li { +div#available-widgets-filter, +ul#widget-list li.widget-list-item, +.commentlist li { border-bottom-color: #ccc; } -.widefat thead, .thead { - background-color: #464646; - color: #d7d7d7; +.widefat td, +.widefat th { + border-bottom-color: #BBD8E7; } -.widget-control-save, .widget-control-remove { - background-color: #83b4d5; - color: #246; +.widefat th { + text-shadow: rgba(255,255,255,0.8) 0 1px 0; } -.wrap h2 { - border-bottom-color: #dadada; - color: #5a5a5a; +.widefat thead tr th, +.widefat tfoot tr th, +h3.dashboard-widget-title, +h3.dashboard-widget-title span, +h3.dashboard-widget-title small, +.find-box-head { + color: #333; + background: #dfdfdf url(../images/blue-grad.png) repeat-x scroll left top; } -#poststuff #edButtonPreview, #poststuff #edButtonHTML, #the-comment-list p.comment-author strong a, #media-upload a.del-link, #media-upload a.delete, a { - color: #2e7ca0; +h3.dashboard-widget-title small a { + color: #d7d7d7; } -#adminmenu a, .ui-tabs-nav a { - color: #cfebf6; +h3.dashboard-widget-title small a:hover { + color: #fff; } -#submenu a { - color: #2782af +#adminmenu a, +#poststuff #edButtonPreview, +#poststuff #edButtonHTML, +#the-comment-list p.comment-author strong a, +#media-upload a.del-link, +#media-upload a.delete, +.ui-tabs-nav a, a { + color: #1C6280; } + /* Because we don't want visited on these links */ -#adminmenu a.current, #sidemenu a.current, body.press-this .ui-tabs-selected a, body.press-this .ui-tabs-selected a:hover { +body.press-this .ui-tabs-selected a, +body.press-this .ui-tabs-selected a:hover { background-color: #fff; - border-color: #07273e; + border-color: #c6d9e9; border-bottom-color: #fff; color: #d54e21; - font-weight: bold; } -#adminmenu li a #awaiting-mod, #sidemenu li a #update-plugins { - background-image: url(../images/comment-stalk-classic.gif); -} - -#adminmenu li a #awaiting-mod span, #sidemenu li a #update-plugins span { +#adminmenu #awaiting-mod, +#adminmenu .update-plugins, +#sidemenu a .update-plugins, +#rightnow .reallynow, +#plugin-information .action-button { background-color: #d54e21; color: #fff; } -#rightnow .reallynow { - background-color: #114973; +#adminmenu li a:hover #awaiting-mod, +#adminmenu li a:hover .update-plugins, +#sidemenu li a:hover .update-plugins { + background-color: #264761; color: #fff; } +#adminmenu li.current a #awaiting-mod, +#adminmenu li.current a .update-plugins, +#adminmenu li.wp-has-current-submenu a .update-plugins, +#adminmenu li.wp-has-current-submenu a .update-plugins { + background-color: #ddd; + color: #000; + text-shadow: none; + -moz-box-shadow: rgba(0,0,0,0.2) 0px -1px 0px; + -khtml-box-shadow: rgba(0,0,0,0.2) 0px -1px 0px; + -webkit-box-shadow: rgba(0,0,0,0.2) 0px -1px 0px; + box-shadow: rgba(0,0,0,0.2) 0px -1px 0px; +} + +#adminmenu li.current a:hover #awaiting-mod, +#adminmenu li.current a:hover .update-plugins, +#adminmenu li.wp-has-current-submenu a:hover #awaiting-mod, +#adminmenu li.wp-has-current-submenu a:hover .update-plugins { + background-color: #264761; + color: #fff; +} -#adminmenu li a:hover #awaiting-mod span, #sidemenu li a:hover #update-plugins span { - background-color: #07273E; +div#media-upload-header { + background-color: #f9f9f9; + border-bottom-color: #dfdfdf; } -#adminmenu, div#media-upload-header { - background-color: #14568a; - border-bottom-color: #07273e; +div#plugin-information-header { + background-color: #e4f2fd; + border-bottom-color: #c6d9e9; } #currenttheme img { @@ -348,108 +538,136 @@ ul#widget-list li.widget-list-item h4.widget-title { background-color: #f9f9f9; } -input.readonly { +input.readonly, textarea.readonly { background-color: #ddd; } -#dashmenu a.current { - background-color: #14568a; - color: #cfebf6; -} - -#dragHelper h4.widget-title, li.widget-list-control-item h4, #dragHelper li.widget-list-control-item h4 { +#dragHelper h4.widget-title, +li.widget-list-control-item h4, +#dragHelper li.widget-list-control-item h4 { background-color: #2683ae; color: #fff; } -#ed_toolbar input { - background: url( ../images/fade-butt.png ) #fff repeat-x 0 -2px; +#ed_toolbar input, +#ed_reply_toolbar input { + background: #fff url("../images/fade-butt.png") repeat-x 0 -2px; } #editable-post-name { background-color: #fffbcc; } -#edit-slug-box strong, .login #nav a { +#edit-slug-box strong, +.tablenav .displaying-num, +#submitted-on { color: #777; } -#edit-slug-buttons a.save { - background-color: #ebebeb; +.login #nav a { + color: #21759b !important; +} + +.login #nav a:hover { + color: #d54e21 !important; } -#footer { - background: url(../images/logo-ghost.png) #464646 no-repeat 20px 10px; +#footer, +#footer-upgrade { + background: #073447; color: #999; } #media-items { - border-color: #c0c0c0; + border-color: #dfdfdf; } #pass-strength-result { - background-color: #e3e3e3; - border-color: #000; + background-color: #eee; + border-color: #ddd !important; } #pass-strength-result.bad { - background-color: #ffeff7; - border-color: #c69; + background-color: #ffb78c; + border-color: #ff853c !important; } #pass-strength-result.good { - background-color: #effff4; - border-color: #66cc87; + background-color: #ffec8b; + border-color: #fc0 !important; } #pass-strength-result.short { - background-color: #e3e3e3; + background-color: #ffa0a0; + border-color: #f04040 !important; } #pass-strength-result.strong { - background-color: #59ef86; - border-color: #319f52; + background-color: #c3ff88; + border-color: #8dff1c !important; } -.checkbox, .side-info, #your-profile #rich_editing { +.checkbox, +.side-info, +#your-profile #rich_editing { background-color: #fff; } -.plugins .active { - background-color: #BBEEBB; +.plugins .active, +.plugins .active th, +.plugins .active td { + background-color: #e7f7d3; } -.plugins .togl { - border-right-color: #ccc; +#the-comment-list .unapproved, +#the-comment-list .unapproved th, +#the-comment-list .unapproved td { + background-color: #ffffe0; } -#the-comment-list .unapproved { - background-color: #ffffe0; +#the-comment-list .approve a { + color: #006505; +} + +#the-comment-list .unapprove a { + color: #d98500; +} + +#the-comment-list .delete a { + color: #bc0b0b; } .plugins tr { background-color: #fff; } -#poststuff #editor-toolbar .active { - background-color: #83b4d5; - color: #333; +.metabox-holder .postbox, +#poststuff .postbox, +#titlediv, +#poststuff .postarea, +#poststuff .stuffbox, +.postbox input[type="text"], +.postbox textarea, +.stuffbox input[type="text"], +.stuffbox textarea { + border-color: #BBD8E7; } -#poststuff .closed .togbox { - background-color: #2583ad; - background-image: url(../images/toggle-arrow.gif); +.metabox-holder .postbox, +#poststuff .postbox { + background-color: #FFF; } -#poststuff .postbox, #titlediv, #poststuff .postarea, #poststuff .stuffbox { - border-color: #ebebeb; - border-right-color: #ccc; - border-bottom-color: #ccc; +.ui-sortable .postbox h3 { + color: #093E56; +} + +.ui-sortable .postbox h3:hover { + color: #000; } -#poststuff .togbox { - background-color: #b2b2b2; - background-image: url(../images/toggle-arrow.gif); +.curtime #timestamp { + background-image: url(../images/date-button.gif); } #quicktags #ed_link { @@ -464,26 +682,16 @@ input.readonly { color: #448abd; } -#sidemenu a { - background-color: #14568a; - border-bottom-color: #07273e; - border-top-color: #14568a; - color: #cfebf6; -} - -#tagchecklist span a { +#tagchecklist span a, +#bulk-titles div a { background: url(../images/xit.gif) no-repeat; } -#tagchecklist span a:hover { +#tagchecklist span a:hover, +#bulk-titles div a:hover { background: url(../images/xit.gif) no-repeat -10px 0; } -#the-comment-list .comment a { - border-bottom-color: #ababab; - color: #666; -} - #update-nag, .plugin-update { background-color: #fffeeb; border-bottom-color: #ccc; @@ -491,159 +699,185 @@ input.readonly { color: #555; } -#upload-files a.file-link { - background-color: #d1e2ef; +.login #backtoblog a { + color: #ccc; } -#upload-file-view a img { - border-bottom-color: #69c; +#wphead { + background-color: #073447; } -#upload-menu li #current-tab-nav, #upload-file { - background-color: #f9fcfe; +body.login { + border-top-color: #093E56; } -#upload-menu li span a.page-numbers { - color: #00019b; +#wphead h1 a { + color: #fff; } -#upload-menu li.current { - border-right-color: #448abd; - color: #000; +#login form input { + color: #555; } -#upload-menu li.current a.upload-tab-link, #upload-menu li a:hover { - background-color: #f9fcfe; - color: #000; +#wphead h1 a:hover { + text-decoration: underline; } -#upload-menu, #upload-menu li { - border-top-color: #247fab; +#user_info { + color: #999; } -#user_info, .login #backtoblog a { +#user_info a:link, #user_info a:visited, #footer a:link, #footer a:visited { color: #ccc; + text-decoration: none; } -#wphead { - background-color: #14568a; +#user_info a:hover, #footer a:hover { + color: #fff; + text-decoration: underline !important; } -#wphead, body.login { - border-top-color: #07273e; +#user_info a:active, #footer a:active { + color: #ccc !important; } -#wphead #viewsite a { - background-color: #5488af; - color: #cfebf7; - border-color: #0b3d64; +div#media-upload-error, +.file-error, +abbr.required, +.widget-control-remove:hover, +.delete a:hover { + color: #f00; } -#wphead #viewsite a:hover { - color: #07273e; +#media-upload a.delete { + color: #888; } -#wphead h1, #dashmenu a.current:hover { - color: #cfebf6; +/* editors */ +#quicktags { + border-color: #dfdfdf; + background-color: #dfdfdf; } -div#media-upload-error, .file-error, abbr.required, .widget-control-remove:hover, .delete:hover { - color: #f00; +#ed_toolbar input { + border-color: #C3C3C3; +} + +#ed_toolbar input:hover { + border-color: #aaa; + background: #ddd; +} + +#poststuff .wp_themeSkin .mceStatusbar { + border-color: #EDEDED; +} + +#poststuff #edButtonPreview, +#poststuff #edButtonHTML { + background-color: #f1f1f1; + border-color: #dfdfdf; + color: #999; +} + +#poststuff #editor-toolbar .active { + border-bottom-color: #e9e9e9; + background-color: #e9e9e9; + color: #333; } /* TinyMCE */ +#post-status-info { + background-color: #EDEDED; +} + .wp_themeSkin *, -.wp_themeSkin a:hover, -.wp_themeSkin a:link, -.wp_themeSkin a:visited, +.wp_themeSkin a:hover, +.wp_themeSkin a:link, +.wp_themeSkin a:visited, .wp_themeSkin a:active { color: #000; } /* Containers */ -.wp_themeSkin table, #wp_editbtns { - background: #83B4D5; -} - .wp_themeSkin iframe { background: #fff; } /* Layout */ .wp_themeSkin .mceStatusbar { - color:#000; - background-color: #eaf3fa; + color: #000; + background-color: #f5f5f5; } /* Button */ -.wp_themeSkin .mceButton { +.wp_themeSkin .mceButton { background-color: #e9e8e8; - border-color: #83B4D5; + border-color: #B2B2B2; } .wp_themeSkin a.mceButtonEnabled:hover, -.wp_themeSkin a.mceButtonActive, +.wp_themeSkin a.mceButtonActive, .wp_themeSkin a.mceButtonSelected { - background-color: #d6d8da; - border-color: #7789ba !important; + background-color: #d5d5d5; + border-color: #777 !important; } .wp_themeSkin .mceButtonDisabled { - border-color: #83B4D5 !important; + border-color: #ccc !important; } /* ListBox */ .wp_themeSkin .mceListBox .mceText, .wp_themeSkin .mceListBox .mceOpen { - border-color: #83B4D5; - background-color: #e9e8e8; + border-color: #B2B2B2; + background-color: #d5d5d5; } -.wp_themeSkin table.mceListBoxEnabled:hover .mceOpen, +.wp_themeSkin table.mceListBoxEnabled:hover .mceOpen, .wp_themeSkin .mceListBoxHover .mceOpen, .wp_themeSkin .mceListBoxSelected .mceOpen, .wp_themeSkin .mceListBoxSelected .mceText { - border-color: #7789ba !important; - background-color: #d6d8da; + border-color: #777 !important; + background-color: #d5d5d5; } -.wp_themeSkin table.mceListBoxEnabled:hover .mceText, +.wp_themeSkin table.mceListBoxEnabled:hover .mceText, .wp_themeSkin .mceListBoxHover .mceText { - border-color: #7789ba !important; + border-color: #777 !important; } .wp_themeSkin select.mceListBox { - border-color: #b3c7e1; + border-color: #B2B2B2; background-color: #fff; } /* SplitButton */ -.wp_themeSkin .mceSplitButton a.mceAction, +.wp_themeSkin .mceSplitButton a.mceAction, .wp_themeSkin .mceSplitButton a.mceOpen { - background-color: #e9e8e8; - border-color: #83B4D5; + background-color: #e8e8e8; + border-color: #B2B2B2; } .wp_themeSkin .mceSplitButton a.mceOpen:hover, .wp_themeSkin .mceSplitButtonSelected a.mceOpen, .wp_themeSkin table.mceSplitButtonEnabled:hover a.mceAction, .wp_themeSkin .mceSplitButton a.mceAction:hover { - background-color: #d6d8da; - border-color: #7789ba !important; -} + background-color: #d5d5d5; + border-color: #777 !important; +} .wp_themeSkin .mceSplitButtonActive { - background-color: #d6d8da; + background-color: #B2B2B2; } /* ColorSplitButton */ .wp_themeSkin div.mceColorSplitMenu table { - background-color: #ebeaeb; - border-color: #808080; + background-color: #ebebeb; + border-color: #B2B2B2; } .wp_themeSkin .mceColorSplitMenu a { - border-color: #808080; + border-color: #B2B2B2; } .wp_themeSkin .mceColorSplitMenu a.mceMoreColors { @@ -669,18 +903,18 @@ div#media-upload-error, .file-error, abbr.required, .widget-control-remove:hover } .wp_themeSkin .mceMenu .mceText { - color: #000; + color: #000; } .wp_themeSkin .mceMenu .mceMenuItemEnabled a:hover, -.wp_themeSkin .mceMenu .mceMenuItemActive, #quicktags { - background-color: #83B4D5; +.wp_themeSkin .mceMenu .mceMenuItemActive { + background-color: #f5f5f5; } .wp_themeSkin td.mceMenuItemSeparator { background-color: #aaa; } .wp_themeSkin .mceMenuItemTitle a { - background-color: #ccc; + background-color: #ccc; border-bottom-color: #aaa; } .wp_themeSkin .mceMenuItemTitle span.mceText { @@ -690,23 +924,80 @@ div#media-upload-error, .file-error, abbr.required, .widget-control-remove:hover color: #888; } -/* pop-up */ -.clearlooks2 .mceTop .mceLeft, .clearlooks2 .mceTop .mceRight { - background-color: #cee1ef; - border-color: #c6d9e9; +.wp_themeSkin tr.mceFirst td.mceToolbar { + background-color: #dfdfdf; + border-color: #dfdfdf; } -.clearlooks2 .mceFocus .mceTop .mceLeft, .clearlooks2 .mceFocus .mceTop .mceRight { - background-color: #5488AF; - border-color: #464646; +.wp-admin #mceModalBlocker { + background: #000; } -#editorcontainer { - border-color: #ccc; +.wp-admin .clearlooks2 .mceFocus .mceTop .mceLeft { + background: #444444; + border-left: 1px solid #999; + border-top: 1px solid #999; + -moz-border-radius: 4px 0 0 0; + -webkit-border-top-left-radius: 4px; + -khtml-border-top-left-radius: 4px; + border-top-left-radius: 4px; } -#poststuff #titlewrap { - border-color: #ccc; +.wp-admin .clearlooks2 .mceFocus .mceTop .mceRight { + background: #444444; + border-right: 1px solid #999; + border-top: 1px solid #999; + border-top-right-radius: 4px; + -khtml-border-top-right-radius: 4px; + -webkit-border-top-right-radius: 4px; + -moz-border-radius: 0 4px 0 0; +} + +.wp-admin .clearlooks2 .mceMiddle .mceLeft { + background: #f1f1f1; + border-left: 1px solid #999; +} + +.wp-admin .clearlooks2 .mceMiddle .mceRight { + background: #f1f1f1; + border-right: 1px solid #999; +} + +.wp-admin .clearlooks2 .mceBottom { + background: #f1f1f1; + border-bottom: 1px solid #999; +} + +.wp-admin .clearlooks2 .mceBottom .mceLeft { + background: #f1f1f1; + border-bottom: 1px solid #999; + border-left: 1px solid #999; +} + +.wp-admin .clearlooks2 .mceBottom .mceCenter { + background: #f1f1f1; + border-bottom: 1px solid #999; +} + +.wp-admin .clearlooks2 .mceBottom .mceRight { + background: #f1f1f1; + border-bottom: 1px solid #999; + border-right: 1px solid #999; +} + +.wp-admin .clearlooks2 .mceFocus .mceTop span { + color: #e5e5e5; +} +/* end TinyMCE */ + +#editorcontainer, +#post-status-info, +#titlediv #title { + border-color: #dfdfdf; +} + +#titlediv #title { + background-color: #fff; } #tTips p#tTips_inside { @@ -714,8 +1005,223 @@ div#media-upload-error, .file-error, abbr.required, .widget-control-remove:hover color: #333; } -/* Diff */ +#timestampdiv input, +#namediv input, +#tagsdiv #the-tagcloud { + border-color: #ddd; +} + +/* menu */ +#adminmenu * { + border-color: #BBD8E7; +} + +#adminmenu li.wp-menu-separator { + background: transparent url(../images/menu-arrows.gif) no-repeat scroll left 5px; +} + +.folded #adminmenu li.wp-menu-separator { + background: transparent url(../images/menu-arrows.gif) no-repeat scroll right -34px; +} + +#adminmenu li.wp-has-current-submenu.wp-menu-open .wp-menu-toggle, +#adminmenu li.wp-has-current-submenu:hover .wp-menu-toggle { + background: transparent url(../images/menu-bits.gif) no-repeat scroll left -207px; +} + +#adminmenu .wp-has-submenu:hover .wp-menu-toggle, +#adminmenu .wp-menu-open .wp-menu-toggle { + background: transparent url(../images/menu-bits.gif) no-repeat scroll left -109px; +} + +#adminmenu a.menu-top { + background: #EAF3FA url(../images/menu-bits.gif) repeat-x scroll left -379px; +} + +#adminmenu .wp-submenu a { + background: #FFFFFF url(../images/menu-bits.gif) no-repeat scroll 0 -310px; +} + +#adminmenu .wp-has-current-submenu ul li a { + background: none; +} + +#adminmenu .wp-has-current-submenu ul li a.current { + background: url(../images/menu-dark.gif) top left no-repeat !important; +} + +#adminmenu li.wp-has-current-submenu a.wp-has-current-submenu, +#adminmenu .menu-top .current { + background: #6d6d6d url(../images/menu-bits.gif) top left repeat-x; + border-color: #6d6d6d; + color: #fff; + text-shadow: rgba(0,0,0,0.4) 0px -1px 0px; +} + +#adminmenu li.wp-has-current-submenu .wp-submenu, +#adminmenu li.wp-has-current-submenu ul li a { + border-color: #aaa !important; +} + +#adminmenu li.wp-has-current-submenu ul li a { + background: url(../images/menu-dark.gif) bottom left no-repeat !important; +} + +#adminmenu li.wp-has-current-submenu ul { + border-bottom-color: #aaa; +} + +#adminmenu li.menu-top .current:hover { + border-color: #B5B5B5; +} + +#adminmenu .wp-submenu .current a.current { + background: transparent url(../images/menu-bits.gif) no-repeat scroll 0 -289px; +} + +#adminmenu .wp-submenu a:hover { + background-color: #EAF2FA !important; + color: #333 !important; +} + +#adminmenu .wp-submenu li.current, +#adminmenu .wp-submenu li.current a, +#adminmenu .wp-submenu li.current a:hover { + color: #333; + background-color: #f5f5f5; + background-image: none; + border-color: #e3e3e3; + text-shadow: rgba(255,255,255,1) 0px 1px 0px; +} + +#adminmenu .wp-submenu ul { + background-color: #fff; +} + +.folded #adminmenu li.menu-top, +#adminmenu .wp-submenu .wp-submenu-head { + background-color: #EAF2FA; +} + +.folded #adminmenu li.wp-has-current-submenu, +.folded #adminmenu li.menu-top.current { + background-color: #BBD8E7; +} + +#adminmenu .wp-has-current-submenu .wp-submenu .wp-submenu-head { + background-color: #BBD8E7; + border-color: #8CBDD5; +} + +#adminmenu div.wp-submenu { + background-color: transparent; +} + +/* menu icons */ +#adminmenu #menu-dashboard div.wp-menu-image { + background: transparent url("../images/menu-vs.png") no-repeat scroll -61px -33px; +} + +#adminmenu #menu-dashboard:hover div.wp-menu-image, +#adminmenu #menu-dashboard.wp-has-current-submenu div.wp-menu-image, +#adminmenu #menu-dashboard.current div.wp-menu-image { + background: transparent url("../images/menu-vs.png") no-repeat scroll -61px -1px; +} + +#adminmenu #menu-posts div.wp-menu-image { + background: transparent url("../images/menu-vs.png") no-repeat scroll -272px -33px; +} + +#adminmenu #menu-posts:hover div.wp-menu-image, +#adminmenu #menu-posts.wp-has-current-submenu div.wp-menu-image { + background: transparent url("../images/menu-vs.png") no-repeat scroll -272px -1px; +} + +#adminmenu #menu-media div.wp-menu-image { + background: transparent url("../images/menu-vs.png") no-repeat scroll -121px -33px; +} + +#adminmenu #menu-media:hover div.wp-menu-image, +#adminmenu #menu-media.wp-has-current-submenu div.wp-menu-image { + background: transparent url("../images/menu-vs.png") no-repeat scroll -121px -1px; +} + +#adminmenu #menu-links div.wp-menu-image { + background: transparent url("../images/menu-vs.png") no-repeat scroll -91px -33px; +} + +#adminmenu #menu-links:hover div.wp-menu-image, +#adminmenu #menu-links.wp-has-current-submenu div.wp-menu-image { + background: transparent url("../images/menu-vs.png") no-repeat scroll -91px -1px; +} + +#adminmenu #menu-pages div.wp-menu-image { + background: transparent url("../images/menu-vs.png") no-repeat scroll -151px -33px; +} + +#adminmenu #menu-pages:hover div.wp-menu-image, +#adminmenu #menu-pages.wp-has-current-submenu div.wp-menu-image { + background: transparent url("../images/menu-vs.png") no-repeat scroll -151px -1px; +} + +#adminmenu #menu-comments div.wp-menu-image { + background: transparent url("../images/menu-vs.png") no-repeat scroll -31px -33px; +} + +#adminmenu #menu-comments:hover div.wp-menu-image, +#adminmenu #menu-comments.wp-has-current-submenu div.wp-menu-image, +#adminmenu #menu-comments.current div.wp-menu-image { + background: transparent url("../images/menu-vs.png") no-repeat scroll -31px -1px; +} + +#adminmenu #menu-appearance div.wp-menu-image { + background: transparent url("../images/menu-vs.png") no-repeat scroll -1px -33px; +} + +#adminmenu #menu-appearance:hover div.wp-menu-image, +#adminmenu #menu-appearance.wp-has-current-submenu div.wp-menu-image { + background: transparent url("../images/menu-vs.png") no-repeat scroll -1px -1px; +} + +#adminmenu #menu-plugins div.wp-menu-image { + background: transparent url("../images/menu-vs.png") no-repeat scroll -181px -33px; +} + +#adminmenu #menu-plugins:hover div.wp-menu-image, +#adminmenu #menu-plugins.wp-has-current-submenu div.wp-menu-image { + background: transparent url("../images/menu-vs.png") no-repeat scroll -181px -1px; +} + +#adminmenu #menu-users div.wp-menu-image { + background: transparent url("../images/menu-vs.png") no-repeat scroll -301px -33px; +} + +#adminmenu #menu-users:hover div.wp-menu-image, +#adminmenu #menu-users.wp-has-current-submenu div.wp-menu-image { + background: transparent url("../images/menu-vs.png") no-repeat scroll -301px -1px; +} + +#adminmenu #menu-tools div.wp-menu-image { + background: transparent url("../images/menu-vs.png") no-repeat scroll -211px -33px; +} + +#adminmenu #menu-tools:hover div.wp-menu-image, +#adminmenu #menu-tools.wp-has-current-submenu div.wp-menu-image { + background: transparent url("../images/menu-vs.png") no-repeat scroll -211px -1px; +} + +#adminmenu #menu-settings div.wp-menu-image { + background: transparent url("../images/menu-vs.png") no-repeat scroll -241px -33px; +} + +#adminmenu #menu-settings:hover div.wp-menu-image, +#adminmenu #menu-settings.wp-has-current-submenu div.wp-menu-image { + background: transparent url("../images/menu-vs.png") no-repeat scroll -241px -1px; +} +/* end menu */ + +/* Diff */ table.diff .diff-deletedline { background-color: #ffdddd; } @@ -728,3 +1234,344 @@ table.diff .diff-addedline { table.diff .diff-addedline ins { background-color: #99ff99; } + +#att-info { + background-color: #E4F2FD; +} + +/* edit image */ +#sidemenu a { + background-color: #f9f9f9; + border-color: #f9f9f9; + border-bottom-color: #dfdfdf; +} + +#sidemenu a.current { + background-color: #fff; + border-color: #dfdfdf #dfdfdf #fff; + color: #D54E21; +} + + +#screen-options-wrap, +#contextual-help-wrap { + background-color: #f1f1f1; + border-color: #dfdfdf; +} + +#screen-meta-links a.show-settings { + color: #606060; +} + +#screen-meta-links a.show-settings:hover { + color: #000; +} + +#replysubmit { + background-color: #f1f1f1; + border-top-color: #ddd; +} + +#replyerror { + border-color: #ddd; + background-color: #f9f9f9; +} + +#edithead, +#replyhead { + background-color: #f1f1f1; +} + +#ed_reply_toolbar { + background-color: #e9e9e9; +} + +/* table vim shortcuts */ +.vim-current { + background-color: #E4F2FD !important; +} + +/* Install Plugins */ +.star-average, +.star.star-rating { + background-color: #fc0; +} + +div.star.select:hover { + background-color: #d00; +} + +#plugin-information .fyi ul { + background-color: #eaf3fa; +} + +#plugin-information .fyi h2.mainheader { + background-color: #cee1ef; +} + +#plugin-information pre, +#plugin-information code { + background-color: #ededff; +} + +#plugin-information pre { + border: 1px solid #ccc; +} + +/* inline editor */ +.inline-edit-row fieldset input[type="text"], +.inline-edit-row fieldset textarea, +#bulk-titles, +#replyrow input { + border-color: #ddd; +} + +.inline-editor div.title { + background-color: #EAF3FA; +} + +.inline-editor ul.cat-checklist { + background-color: #FFFFFF; + border-color: #ddd; +} + +.inline-edit-row p.submit { + background-color: #f1f1f1; +} + +.inline-editor .categories .catshow, +.inline-editor .categories .cathide { + color: #21759b; +} + +.inline-editor .quick-edit-save { + background-color: #f1f1f1; +} + +#replyrow #ed_reply_toolbar input:hover { + border-color: #aaa; + background: #ddd; +} + +fieldset.inline-edit-col-right .inline-edit-col { + border-color: #dfdfdf; +} + +.attention { + color: #D54E21; +} + +.meta-box-sortables .postbox:hover .handlediv { + background: transparent url(../images/menu-bits.gif) no-repeat scroll left -111px; +} + +#major-publishing-actions { + background: #eaf2fa; +} + +.tablenav .tablenav-pages { + color: #555; +} + +.tablenav .tablenav-pages a { + border-color: #e3e3e3; + background: #eee url('../images/menu-bits.gif') repeat-x scroll left -379px; +} + +.tablenav .tablenav-pages a:hover { + color: #d54e21; + border-color: #d54321; +} + +.tablenav .tablenav-pages a:active { + color: #fff !important; +} + +.tablenav .tablenav-pages .current { + background: #dfdfdf; + border-color: #d3d3d3; +} + +#availablethemes, +#availablethemes td { + border-color: #ddd; +} + +#current-theme img { + border-color: #999; +} + +#TB_window #TB_title a.tb-theme-preview-link, +#TB_window #TB_title a.tb-theme-preview-link:visited { + color: #999; +} + +#TB_window #TB_title a.tb-theme-preview-link:hover, +#TB_window #TB_title a.tb-theme-preview-link:focus { + color: #ccc; +} + +.misc-pub-section { + border-bottom-color: #eee; +} + +#minor-publishing { + border-bottom-color: #ddd; +} + +#post-body .misc-pub-section { + border-right-color: #eee; +} + +.post-com-count span { + background-color: #bbb; +} + +.form-table .color-palette td { + border-color: #fff; +} + +.sortable-placeholder { + border-color: #bbb; + background-color: #f5f5f5; +} + +#post-body ul#category-tabs li.ui-tabs-selected a { + color: #333; +} + +#wp_editimgbtn, +#wp_delimgbtn, +#wp_editgallery, +#wp_delgallery { + border-color: #999; + background-color: #eee; +} + +#wp_editimgbtn:hover, +#wp_delimgbtn:hover, +#wp_editgallery:hover, +#wp_delgallery:hover { + border-color: #555; + background-color: #ccc; +} + +#favorite-first { + background: #797979 url(../images/fav.png) repeat-x 0 center; + border-color: #777 !important; + border-bottom-color: #666 !important; +} + +#favorite-inside { + border-color: #797979; + background-color: #797979; +} + +#favorite-toggle { + background: transparent url(../images/fav-arrow.gif) no-repeat 0 -4px; +} + +#favorite-actions a { + color: #ddd; +} + +#favorite-actions a:hover { + color: #fff; +} + +#favorite-inside a:hover { + text-decoration: underline; +} + +#favorite-actions .slide-down { + border-bottom-color: #626262; +} + +.submit input, +.button, +.button-primary, +.button-secondary, +.button-highlighted, +#postcustomstuff .submit input { + text-shadow: rgba(255,255,255,1) 0 1px 0; +} + +.button-primary, +.submit .button-primary { + text-shadow: rgba(0,0,0,0.3) 0 -1px 0; +} + +#screen-meta a.show-settings { + background-color: transparent; + text-shadow: rgba(255,255,255,0.7) 0 1px 0; +} + +#icon-edit, +#icon-post { + background: transparent url(../images/icons32-vs.png) no-repeat -552px -5px; +} + +#icon-index { + background: transparent url(../images/icons32-vs.png) no-repeat -137px -5px; +} + +#icon-upload { + background: transparent url(../images/icons32-vs.png) no-repeat -251px -5px; +} + +#icon-link-manager, +#icon-link, +#icon-link-category { + background: transparent url(../images/icons32-vs.png) no-repeat -190px -5px; +} + +#icon-edit-pages, +#icon-page { + background: transparent url(../images/icons32-vs.png) no-repeat -312px -5px; +} + +#icon-edit-comments { + background: transparent url(../images/icons32-vs.png) no-repeat -72px -5px; +} + +#icon-themes { + background: transparent url(../images/icons32-vs.png) no-repeat -11px -5px; +} + +#icon-plugins { + background: transparent url(../images/icons32-vs.png) no-repeat -370px -5px; +} + +#icon-users, +#icon-user-edit { + background: transparent url(../images/icons32-vs.png) no-repeat -600px -5px; +} + +#icon-tools, +#icon-admin { + background: transparent url(../images/icons32-vs.png) no-repeat -432px -5px; +} + +#icon-options-general { + background: transparent url(../images/icons32-vs.png) no-repeat -492px -5px; +} + +.view-switch #view-switch-list { + background: transparent url(../images/list-vs.png) no-repeat 0 0; +} + +.view-switch #view-switch-list.current { + background: transparent url(../images/list-vs.png) no-repeat -40px 0; +} + +.view-switch #view-switch-excerpt { + background: transparent url(../images/list-vs.png) no-repeat -20px 0; +} + +.view-switch #view-switch-excerpt.current { + background: transparent url(../images/list-vs.png) no-repeat -60px 0; +} + +#header-logo { + background: transparent url(../images/wp-logo.gif) no-repeat scroll center center; +} diff --git a/wp-admin/css/colors-fresh-rtl.css b/wp-admin/css/colors-fresh-rtl.css index d7b7afbb..b6d88bb2 100644 --- a/wp-admin/css/colors-fresh-rtl.css +++ b/wp-admin/css/colors-fresh-rtl.css @@ -2,23 +2,82 @@ border-right-color: transparent; border-left-color: #99d; } -.post-com-count { -} -#adminmenu li a #awaiting-mod, #sidemenu li a #update-plugins { - background-image: url(../images/comment-stalk-rtl.gif); - background-position:right bottom; -} -#footer { - background-position:99% 10px; -} + .plugins .togl { border-right-color: transparent; border-left-color: #ccc; } -#poststuff .closed .togbox, #poststuff .togbox { - background-image: url(../images/toggle-arrow-rtl.gif); + +.post-com-count { + background-image: url(../images/bubble_bg-rtl.gif); +} +.tablenav .tablenav-pages a { + background: #eee url('../images/menu-bits-rtl.gif') repeat-x scroll right -379px; } #upload-menu li.current { - border-right-color:transparent; + border-right-color: transparent; border-left-color: #448abd; } + +#adminmenu .wp-submenu .current a.current { + background: transparent url(../images/menu-bits-rtl.gif) no-repeat scroll right -289px; +} + +#adminmenu li.wp-menu-separator { + background: transparent url(../images/menu-arrows.gif) no-repeat scroll right -34px; +} + +.folded #adminmenu li.wp-menu-separator { + background: transparent url(../images/menu-arrows.gif) no-repeat scroll left 5px; +} + +#adminmenu li.wp-has-current-submenu .wp-menu-toggle, +#adminmenu li.wp-has-current-submenu:hover .wp-menu-toggle { + background: transparent url(../images/menu-bits-rtl.gif) repeat-x scroll right -207px; +} + +#adminmenu .wp-has-current-submenu ul li a.current { + background: url(../images/menu-dark-rtl.gif) top right no-repeat !important; +} + +#adminmenu li.wp-has-current-submenu a.wp-has-current-submenu, +#adminmenu .menu-top .current { + background: url(../images/menu-bits-rtl.gif) top right repeat-x; +} + +#adminmenu li.wp-has-current-submenu ul li a { + background: url(../images/menu-dark-rtl.gif) bottom right no-repeat !important; +} + +#adminmenu li.wp-has-current-submenu.wp-menu-open .wp-menu-toggle, #adminmenu li.wp-has-current-submenu:hover .wp-menu-toggle { + background: transparent url(../images/menu-bits-rtl.gif) no-repeat right -207px; +} + +#adminmenu .wp-has-submenu:hover .wp-menu-toggle, +#adminmenu .wp-menu-open .wp-menu-toggle { + background: transparent url(../images/menu-bits-rtl.gif) repeat-x scroll right -109px; +} + +#adminmenu a.wp-has-submenu { + background: #f1f1f1 url(../images/menu-bits-rtl.gif) repeat-x scroll right -379px; +} + +#adminmenu .wp-submenu a { + background: #FFFFFF url(../images/menu-bits-rtl.gif) no-repeat scroll right -310px; +} + +#adminmenu li.current a, +#adminmenu .wp-submenu a:hover { + background: transparent url(../images/menu-bits-rtl.gif) no-repeat scroll right -289px; +} + +#adminmenu li.wp-has-current-submenu a.wp-has-submenu { + background: #b5b5b5 url(../images/menu-bits-rtl.gif) repeat-x scroll right top; +} + +.meta-box-sortables .postbox:hover .handlediv { + background: transparent url(../images/menu-bits-rtl.gif) no-repeat scroll right -111px; +} +#favorite-toggle { + background: transparent url(../images/fav-arrow-rtl.gif) no-repeat right -4px; +} diff --git a/wp-admin/css/colors-fresh.css b/wp-admin/css/colors-fresh.css index 09e0c582..2a42c712 100644 --- a/wp-admin/css/colors-fresh.css +++ b/wp-admin/css/colors-fresh.css @@ -1,9 +1,27 @@ +html { + background-color: #f9f9f9; +} + +.find-box-search { + border-color: #dfdfdf; + background-color: #f1f1f1; +} + +.find-box { + background-color: #f1f1f1; +} + +.find-box-inside { + background-color: #fff; +} + a.page-numbers:hover { border-color: #999; } -body, .form-table .pre { - background-color: #fff; +body, +#wpbody, +.form-table .pre { color: #333; } @@ -11,10 +29,52 @@ body > #upload-menu { border-bottom-color: #fff; } -div#current-widgets, #postcustomstuff table, #your-profile fieldset, a.page-numbers, #rightnow, div.dashboard-widget, .widefat { +kbd, code { + background: #eaeaea; +} + +div#current-widgets, +#postcustomstuff table, +#your-profile fieldset, +#rightnow, +div.dashboard-widget, +#dashboard-widgets p.dashboard-widget-links, +#replyrow #ed_reply_toolbar input { border-color: #ccc; } +#poststuff .inside label.spam { + color: red; +} + +#poststuff .inside label.waiting { + color: orange; +} + +#poststuff .inside label.approved { + color: green; +} + +#postcustomstuff table { + border-color: #dfdfdf; + background-color: #F9F9F9; +} + +#postcustomstuff thead th { + background-color: #F1F1F1; +} + +#postcustomstuff table input, +#postcustomstuff table textarea { + border-color: #dfdfdf; + background-color: #fff; +} + +.widefat { + border-color: #dfdfdf; + background-color: #fff; +} + div.dashboard-widget-error { background-color: #c43; } @@ -23,26 +83,55 @@ div.dashboard-widget-notice { background-color: #cfe1ef; } -div.dashboard-widget-submit, ul.widget-control-list div.widget-control-actions { +div.dashboard-widget-submit, +ul.widget-control-list div.widget-control-actions { border-top-color: #ccc; } div.ui-tabs-panel { - border-color: #cee1ef; + border-color: #f1f1f1; } -input.disabled, textarea.disabled { - background-color: #ccc; +ul#category-tabs li.ui-tabs-selected { + background-color: #f1f1f1; } -#user_info a:hover, li.widget-list-control-item h4.widget-title a:hover, .submit a, #dashmenu a:hover, #footer a, #upload-menu li a.upload-tab-link, li.widget-list-control-item h4.widget-title a, +input.disabled, +textarea.disabled { + background-color: #ccc; +} +/* #upload-menu li a.upload-tab-link, */ +li.widget-list-control-item h4.widget-title a:hover, +li.widget-list-control-item h4.widget-title a, #dragHelper li.widget-list-control-item h4.widget-title a, -#draghelper li.widget-list-control-item h4.widget-title a:visited, .login #backtoblog a:hover { +#draghelper li.widget-list-control-item h4.widget-title a:visited, +.login #backtoblog a:hover, +#plugin-information .action-button a, +#plugin-information .action-button a:hover, +#plugin-information .action-button a:visited { color: #fff; } -li.widget-list-control-item, div.nav, .tablenav, .submitbox, h3.dashboard-widget-title, h3.dashboard-widget-title span, h3.dashboard-widget-title small, ul.view-switch li.current, .form-table tr, #poststuff h3, .login form, h3.info-box-title { - background-color: #eaf3fa; +li.widget-list-control-item div.widget-control { + background-color: #fff; + border-color: #dfdfdf; +} + +.metabox-holder .postbox h3, +#poststuff .postbox h3, +#poststuff .stuffbox h3 { + background: #dfdfdf url("../images/gray-grad.png") repeat-x left top; + text-shadow: #fff 0 1px 0; +} + +.form-table th, +.form-wrap label { + color: #222; + text-shadow: #fff 0 1px 0; +} + +.setting-description, .form-wrap p { + color: #666; } select { @@ -51,11 +140,7 @@ select { } strong .post-com-count span { - background-color: #2583ad; -} - -ul#category-tabs li.ui-tabs-selected, .button-secondary, #quicktags, #login form .submit input { - background-color: #cee1ef !important; + background-color: #21759b; } ul#widget-list li.widget-list-item h4.widget-title { @@ -67,10 +152,14 @@ ul#widget-list li.widget-list-item h4.widget-title { background-color: #ccf3fa; } -.ac_match, .subsubsub a.current, h2 { +.ac_match, .subsubsub a.current { color: #000; } +.wrap h2 { + color: #464646; +} + .ac_over { background-color: #f0f0b8; } @@ -84,13 +173,13 @@ ul#widget-list li.widget-list-item h4.widget-title { color: #101010; } -.alternate { +.alternate, .alt { background-color: #f9f9f9; } .available-theme a.screenshot { background-color: #f1f1f1; - border-color: #ccc; + border-color: #ddd; } .bar { @@ -98,8 +187,11 @@ ul#widget-list li.widget-list-item h4.widget-title { border-right-color: #99d; } -.describe { - border-top-color: #d0d0d0; +#media-upload { + background: #fff; +} +#media-upload .slidetoggle { + border-top-color: #dfdfdf; } .error, #login #login_error { @@ -119,12 +211,13 @@ ul#widget-list li.widget-list-item h4.widget-title { border-color: #c00 !important; } -.form-table input, .form-table textarea { - border-color: #c6d9e9; -} - -.form-table td, .form-table th { - border-bottom-color: #fff; +.form-table input, +.form-table textarea, +.search-input, +.form-field input, +.form-field textarea, +.submit { + border-color: #DFDFDF; } .highlight { @@ -132,27 +225,31 @@ ul#widget-list li.widget-list-item h4.widget-title { color: #d54e21; } -#user_info, .howto, .nonessential, #dashmenu a, #sidemenu, #edit-slug-box, .form-input-tip, #dashboard_primary span.rss-date, .subsubsub, #dashboard_secondary div.dashboard-widget-content ul li a cite { - color: #999; +.howto, +.nonessential, +#edit-slug-box, +.form-input-tip, +.rss-widget span.rss-date, +.subsubsub { + color: #666; } .media-item { - border-bottom-color: #d0d0d0; + border-bottom-color: #dfdfdf; } -.media-upload-form label.form-help, td.help { - color: #9a9a9a; +#wpbody-content #media-items .describe { + border-top-color: #dfdfdf; } -.page-numbers { - background-color: #fff; - border-color: #fff; +.describe input[type="text"], +.describe textarea { + border-color: #dfdfdf; } -.page-numbers.current { - background-color: #328ab2; - border-color: #328ab2; - color: #fff; +.media-upload-form label.form-help, +td.help { + color: #9a9a9a; } .post-com-count { @@ -182,37 +279,100 @@ ul#widget-list li.widget-list-item h4.widget-title { color: #666; } -.submit input, .button, .button-secondary, #login form .submit input, div.dashboard-widget-submit input, #edit-slug-buttons a.save { - background-color: #e5e5e5; - color: #246; - border-color: #80b5d0; +.button, +.button-secondary, +.submit input, +input[type=button], +input[type=submit] { + border-color: #bbb; + color: #464646; +} + +.button:hover, +.button-secondary:hover, +.submit input:hover, +input[type=button]:hover, +input[type=submit]:hover { + color: #000; + border-color: #666; +} + +.button, +.submit input, +.button-secondary { + background: #f2f2f2 url(../images/white-grad.png) repeat-x scroll left top; +} + +.button:active, +.submit input:active, +.button-secondary:active { + background: #eee url(../images/white-grad-active.png) repeat-x scroll left top; +} + +.button-primary, +.submit .button-primary, +#login form .submit input { + border-color: #298cba !important; + font-weight: bold; + color: #FFF !important; + background: #21759B url(../images/button-grad.png) repeat-x scroll left top; +} + +.button-primary:active, +#login form .submit input:active { + background: #21759b url(../images/button-grad-active.png) repeat-x scroll left top !important; } -.button[disabled], .button:disabled { - background-color: #999; +.button[disabled], +.button:disabled, +.button-secondary[disabled], +.button-secondary:disabled, +a.button.disabled { + color: #ccc !important; + border-color: #ccc; } -.submit input:hover, .button:hover, #edit-slug-buttons a.save:hover { - border-color: #535353; +.button-primary[disabled], +.button-primary:disabled { + color: #2fa0d5 !important; } -.submit input:hover, .button:hover, .button-secondary:hover, #wphead #viewsite a:hover, #adminmenu a:hover, #sidemenu a:hover, #submenu a.current, #submenu a:hover, .submitbox #previewview a:hover, #the-comment-list .comment a:hover, #rightnow a:hover, a:hover, .subsubsub a:hover, .subsubsub a.current:hover, #login form .submit input:hover, div.dashboard-widget-submit input:hover, #edit-slug-buttons a.save:hover, #media-upload a.delete:hover, #media-upload a.del-link:hover, .ui-tabs-nav a:hover { +a:active, +a:focus { color: #d54e21; } -.button-secondary:hover, #login form .submit input:hover { - border-color: #328ab2; +a:hover, +#wphead #viewsite a:hover, +#adminmenu a:hover, +#adminmenu ul.wp-submenu a:hover, +#the-comment-list .comment a:hover, +#rightnow a:hover, +.subsubsub a:hover, +.subsubsub a.current:hover, +#login form .submit input:hover, +div.dashboard-widget-submit input:hover, +#media-upload a.del-link:hover, +.ui-tabs-nav a:hover { + color: #d54e21; } -.submitbox #autosave .error, ul.view-switch li.current a { - color: #333; +#the-comment-list .comment-item, +#dashboard-widgets #dashboard_quick_press form p.submit { + border-color: #dfdfdf; } -.submitbox #previewview { - background-color: #2683ae; +.button-primary:hover, +#login form .submit input:hover { + border-color: #13455b !important; + color: #EAF2FA !important; +} + +#side-info-column #category-tabs .ui-tabs-selected a { + color: #333; } -.submitbox #previewview a, #rightnow .rbutton { +#rightnow .rbutton { background-color: #ebebeb; color: #264761; } @@ -222,8 +382,9 @@ ul#widget-list li.widget-list-item h4.widget-title { color: #ccc; } -.submitbox .submitdelete { - border-bottom-color: #999; +.submitbox .submitdelete, a.delete { + color: #f00; + border-bottom-color: #f00; } .submitbox .submitdelete:hover, @@ -233,78 +394,134 @@ ul#widget-list li.widget-list-item h4.widget-title { border-bottom-color: #f00; } +#normal-sortables .submitbox .submitdelete:hover { + color: #000; + background-color: #f00; + border-bottom-color: #f00; +} + .tablenav .dots { - background-color: #e4f2fd; - border-color: #e4f2fd; + border-color: transparent; } -.tablenav .next, .tablenav .prev{ - background-color: #e4f2fd; - border-bottom-color: #2583ad; - border-color: #e4f2fd; - color: #2583ad; +.tablenav .next, +.tablenav .prev { + border-color: transparent; + color: #21759b; } -.tablenav .next:hover, .tablenav .prev:hover { - border-bottom-color: #d54e21; - border-color: #e4f2fd; +.tablenav .next:hover, +.tablenav .prev:hover { + border-color: transparent; color: #d54e21; } -.updated, .login #login_error, .login .message { +.updated, +.login #login_error, +.login .message { background-color: #ffffe0; border-color: #e6db55; } -.updated a { - border-bottom-color: #2583ad; +a.page-numbers { + border-bottom-color: #B8D3E2; } -.widefat td, .widefat th, div#available-widgets-filter, ul#widget-list li.widget-list-item, .commentlist li { +div#available-widgets-filter, +ul#widget-list li.widget-list-item, +.commentlist li { border-bottom-color: #ccc; } -.widefat thead, .thead { - background-color: #464646; - color: #d7d7d7; +.widefat td, +.widefat th { + border-color: #dfdfdf; } -.widget-control-save, .widget-control-remove { - background-color: #cee1ef; - color: #246; +.widefat th { + text-shadow: rgba(255,255,255,0.8) 0 1px 0; } -.wrap h2 { - border-bottom-color: #dadada; - color: #666; +.widefat thead tr th, +.widefat tfoot tr th, +h3.dashboard-widget-title, +h3.dashboard-widget-title span, +h3.dashboard-widget-title small, +.find-box-head { + color: #333; + background: #dfdfdf url(../images/gray-grad.png) repeat-x scroll left top; } -#adminmenu a, #submenu a, #poststuff #edButtonPreview, #poststuff #edButtonHTML, #the-comment-list p.comment-author strong a, #media-upload a.del-link, #media-upload a.delete, .ui-tabs-nav a, a { - color: #2583ad; +h3.dashboard-widget-title small a { + color: #d7d7d7; +} + +h3.dashboard-widget-title small a:hover { + color: #fff; +} + +#adminmenu a, +#poststuff #edButtonPreview, +#poststuff #edButtonHTML, +#the-comment-list p.comment-author strong a, +#media-upload a.del-link, +#media-upload a.delete, +.ui-tabs-nav a, a { + color: #21759b; } /* Because we don't want visited on these links */ -#adminmenu a.current, #sidemenu a.current, body.press-this .ui-tabs-selected a, body.press-this .ui-tabs-selected a:hover { +body.press-this .ui-tabs-selected a, +body.press-this .ui-tabs-selected a:hover { background-color: #fff; border-color: #c6d9e9; border-bottom-color: #fff; color: #d54e21; } -#adminmenu li a #awaiting-mod, #sidemenu li a #update-plugins { - background-image: url(../images/comment-stalk-fresh.gif); +#adminmenu #awaiting-mod, +#adminmenu .update-plugins, +#sidemenu a .update-plugins, +#rightnow .reallynow, +#plugin-information .action-button { + background-color: #d54e21; + color: #fff; } -#adminmenu li a #awaiting-mod span, #sidemenu li a #update-plugins span, #rightnow .reallynow { - background-color: #d54e21; +#adminmenu li a:hover #awaiting-mod, +#adminmenu li a:hover .update-plugins, +#sidemenu li a:hover .update-plugins { + background-color: #264761; color: #fff; } -#adminmenu li a:hover #awaiting-mod span, #sidemenu li a:hover #update-plugins span { +#adminmenu li.current a #awaiting-mod, +#adminmenu li.current a .update-plugins, +#adminmenu li.wp-has-current-submenu a .update-plugins, +#adminmenu li.wp-has-current-submenu a .update-plugins { + background-color: #ddd; + color: #000; + text-shadow: none; + -moz-box-shadow: rgba(0,0,0,0.2) 0px -1px 0px; + -khtml-box-shadow: rgba(0,0,0,0.2) 0px -1px 0px; + -webkit-box-shadow: rgba(0,0,0,0.2) 0px -1px 0px; + box-shadow: rgba(0,0,0,0.2) 0px -1px 0px; +} + +#adminmenu li.current a:hover #awaiting-mod, +#adminmenu li.current a:hover .update-plugins, +#adminmenu li.wp-has-current-submenu a:hover #awaiting-mod, +#adminmenu li.wp-has-current-submenu a:hover .update-plugins { background-color: #264761; + color: #fff; } -#adminmenu, div#media-upload-header { +div#media-upload-header { + background-color: #f9f9f9; + border-bottom-color: #dfdfdf; +} + +div#plugin-information-header { background-color: #e4f2fd; border-bottom-color: #c6d9e9; } @@ -321,104 +538,136 @@ ul#widget-list li.widget-list-item h4.widget-title { background-color: #f9f9f9; } -input.readonly { +input.readonly, textarea.readonly { background-color: #ddd; } -#dashmenu a.current { - background-color: #e4f2fd; - color: #555; -} - -#dragHelper h4.widget-title, li.widget-list-control-item h4, #dragHelper li.widget-list-control-item h4 { +#dragHelper h4.widget-title, +li.widget-list-control-item h4, +#dragHelper li.widget-list-control-item h4 { background-color: #2683ae; color: #fff; } -#ed_toolbar input { - background: url( ../images/fade-butt.png ) #fff repeat-x 0 -2px; +#ed_toolbar input, +#ed_reply_toolbar input { + background: #fff url("../images/fade-butt.png") repeat-x 0 -2px; } #editable-post-name { background-color: #fffbcc; } -#edit-slug-box strong, .login #nav a { +#edit-slug-box strong, +.tablenav .displaying-num, +#submitted-on { color: #777; } -#footer { - background: url(../images/logo-ghost.png) #464646 no-repeat 20px 10px; +.login #nav a { + color: #21759b !important; +} + +.login #nav a:hover { + color: #d54e21 !important; +} + +#footer, +#footer-upgrade { + background: #464646; color: #999; } #media-items { - border-color: #c0c0c0; + border-color: #dfdfdf; } #pass-strength-result { - background-color: #e3e3e3; - border-color: #000; + background-color: #eee; + border-color: #ddd !important; } #pass-strength-result.bad { - background-color: #ffeff7; - border-color: #c69; + background-color: #ffb78c; + border-color: #ff853c !important; } #pass-strength-result.good { - background-color: #effff4; - border-color: #66cc87; + background-color: #ffec8b; + border-color: #fc0 !important; } #pass-strength-result.short { - background-color: #e3e3e3; + background-color: #ffa0a0; + border-color: #f04040 !important; } #pass-strength-result.strong { - background-color: #59ef86; - border-color: #319f52; + background-color: #c3ff88; + border-color: #8dff1c !important; } -.checkbox, .side-info, #your-profile #rich_editing { +.checkbox, +.side-info, +#your-profile #rich_editing { background-color: #fff; } -.plugins .active { +.plugins .active, +.plugins .active th, +.plugins .active td { background-color: #e7f7d3; } -.plugins .togl { - border-right-color: #ccc; +#the-comment-list .unapproved, +#the-comment-list .unapproved th, +#the-comment-list .unapproved td { + background-color: #ffffe0; } -#the-comment-list .unapproved { - background-color: #ffffe0; +#the-comment-list .approve a { + color: #006505; +} + +#the-comment-list .unapprove a { + color: #d98500; +} + +#the-comment-list .delete a { + color: #bc0b0b; } .plugins tr { background-color: #fff; } -#poststuff #editor-toolbar .active { - background-color: #cee1ef; - color: #333; +.metabox-holder .postbox, +#poststuff .postbox, +#titlediv, +#poststuff .postarea, +#poststuff .stuffbox, +.postbox input[type="text"], +.postbox textarea, +.stuffbox input[type="text"], +.stuffbox textarea { + border-color: #dfdfdf; } -#poststuff .closed .togbox { - background-color: #2583ad; - background-image: url(../images/toggle-arrow.gif); +.metabox-holder .postbox, +#poststuff .postbox { + background-color: #FFF; } -#poststuff .postbox, #titlediv, #poststuff .postarea, #poststuff .stuffbox { - border-color: #ebebeb; - border-right-color: #ccc; - border-bottom-color: #ccc; +.ui-sortable .postbox h3 { + color: #464646; } -#poststuff .togbox { - background-color: #b2b2b2; - background-image: url(../images/toggle-arrow.gif); +.ui-sortable .postbox h3:hover { + color: #000; +} + +.curtime #timestamp { + background-image: url(../images/date-button.gif); } #quicktags #ed_link { @@ -433,25 +682,16 @@ input.readonly { color: #448abd; } -#sidemenu a { - background-color: #e4f2fd; - border-bottom-color: #c6d9e9; - border-top-color: #e4f2fd; -} - -#tagchecklist span a { +#tagchecklist span a, +#bulk-titles div a { background: url(../images/xit.gif) no-repeat; } -#tagchecklist span a:hover { +#tagchecklist span a:hover, +#bulk-titles div a:hover { background: url(../images/xit.gif) no-repeat -10px 0; } -#the-comment-list .comment a { - border-bottom-color: #ababab; - color: #666; -} - #update-nag, .plugin-update { background-color: #fffeeb; border-bottom-color: #ccc; @@ -459,163 +699,185 @@ input.readonly { color: #555; } -#upload-files a.file-link { - background-color: #d1e2ef; +.login #backtoblog a { + color: #ccc; } -#upload-file-view a img { - border-bottom-color: #69c; +#wphead { + background-color: #464646; } -#upload-menu li #current-tab-nav, #upload-file { - background-color: #f9fcfe; +body.login { + border-top-color: #464646; } -#upload-menu li span a.page-numbers { - color: #00019b; +#wphead h1 a { + color: #fff; } -#upload-menu li.current { - border-right-color: #448abd; - color: #000; +#login form input { + color: #555; } -#upload-menu li.current a.upload-tab-link, #upload-menu li a:hover { - background-color: #f9fcfe; - color: #000; +#wphead h1 a:hover { + text-decoration: underline; } -#upload-menu, #upload-menu li { - border-top-color: #247fab; +#user_info { + color: #999; } -.login #backtoblog a, .curtime, #user_info a { +#user_info a:link, #user_info a:visited, #footer a:link, #footer a:visited { color: #ccc; + text-decoration: none; } -#wphead { - background-color: #e4f2fd; +#user_info a:hover, #footer a:hover { + color: #fff; + text-decoration: underline !important; } -#wphead, body.login { - border-top-color: #464646; +#user_info a:active, #footer a:active { + color: #ccc !important; } -#wphead #viewsite a { - background-color: #c6d9e9; - color: #246; - border-color: #80b5d0; +div#media-upload-error, +.file-error, +abbr.required, +.widget-control-remove:hover, +.delete a:hover { + color: #f00; } -#wphead #viewsite a:hover { - border-color: #328ab2; +#media-upload a.delete { + color: #888; } -#wphead h1, #dashmenu a.current:hover, #login form input { - color: #555; +/* editors */ +#quicktags { + border-color: #dfdfdf; + background-color: #dfdfdf; } -div#media-upload-error, .file-error, abbr.required, .widget-control-remove:hover, .delete:hover { - color: #f00; +#ed_toolbar input { + border-color: #C3C3C3; } -#media-upload a.delete { - color: #888; +#ed_toolbar input:hover { + border-color: #aaa; + background: #ddd; +} + +#poststuff .wp_themeSkin .mceStatusbar { + border-color: #EDEDED; +} + +#poststuff #edButtonPreview, +#poststuff #edButtonHTML { + background-color: #f1f1f1; + border-color: #dfdfdf; + color: #999; +} + +#poststuff #editor-toolbar .active { + border-bottom-color: #e9e9e9; + background-color: #e9e9e9; + color: #333; } /* TinyMCE */ +#post-status-info { + background-color: #EDEDED; +} + .wp_themeSkin *, -.wp_themeSkin a:hover, -.wp_themeSkin a:link, -.wp_themeSkin a:visited, +.wp_themeSkin a:hover, +.wp_themeSkin a:link, +.wp_themeSkin a:visited, .wp_themeSkin a:active { color: #000; } /* Containers */ -.wp_themeSkin table, #wp_editbtns { - background: #cee1ef; -} - .wp_themeSkin iframe { background: #fff; } /* Layout */ .wp_themeSkin .mceStatusbar { - color:#000; - background-color: #eaf3fa; + color: #000; + background-color: #f5f5f5; } /* Button */ -.wp_themeSkin .mceButton { +.wp_themeSkin .mceButton { background-color: #e9e8e8; - border-color: #abc0fb; + border-color: #B2B2B2; } .wp_themeSkin a.mceButtonEnabled:hover, -.wp_themeSkin a.mceButtonActive, +.wp_themeSkin a.mceButtonActive, .wp_themeSkin a.mceButtonSelected { - background-color: #d6d8da; - border-color: #7789ba !important; + background-color: #d5d5d5; + border-color: #777 !important; } .wp_themeSkin .mceButtonDisabled { - border-color: #bdd !important; + border-color: #ccc !important; } /* ListBox */ .wp_themeSkin .mceListBox .mceText, .wp_themeSkin .mceListBox .mceOpen { - border-color: #abc0fb; - background-color: #e9e8e8; + border-color: #B2B2B2; + background-color: #d5d5d5; } -.wp_themeSkin table.mceListBoxEnabled:hover .mceOpen, +.wp_themeSkin table.mceListBoxEnabled:hover .mceOpen, .wp_themeSkin .mceListBoxHover .mceOpen, .wp_themeSkin .mceListBoxSelected .mceOpen, .wp_themeSkin .mceListBoxSelected .mceText { - border-color: #7789ba !important; - background-color: #d6d8da; + border-color: #777 !important; + background-color: #d5d5d5; } -.wp_themeSkin table.mceListBoxEnabled:hover .mceText, +.wp_themeSkin table.mceListBoxEnabled:hover .mceText, .wp_themeSkin .mceListBoxHover .mceText { - border-color: #7789ba !important; + border-color: #777 !important; } .wp_themeSkin select.mceListBox { - border-color: #b3c7e1; + border-color: #B2B2B2; background-color: #fff; } /* SplitButton */ -.wp_themeSkin .mceSplitButton a.mceAction, +.wp_themeSkin .mceSplitButton a.mceAction, .wp_themeSkin .mceSplitButton a.mceOpen { - background-color: #e9e8e8; - border-color: #abc0fb; + background-color: #e8e8e8; + border-color: #B2B2B2; } .wp_themeSkin .mceSplitButton a.mceOpen:hover, .wp_themeSkin .mceSplitButtonSelected a.mceOpen, .wp_themeSkin table.mceSplitButtonEnabled:hover a.mceAction, .wp_themeSkin .mceSplitButton a.mceAction:hover { - background-color: #d6d8da; - border-color: #7789ba !important; -} + background-color: #d5d5d5; + border-color: #777 !important; +} .wp_themeSkin .mceSplitButtonActive { - background-color: #d6d8da; + background-color: #B2B2B2; } /* ColorSplitButton */ .wp_themeSkin div.mceColorSplitMenu table { - background-color: #ebeaeb; - border-color: #808080; + background-color: #ebebeb; + border-color: #B2B2B2; } .wp_themeSkin .mceColorSplitMenu a { - border-color: #808080; + border-color: #B2B2B2; } .wp_themeSkin .mceColorSplitMenu a.mceMoreColors { @@ -641,18 +903,18 @@ div#media-upload-error, .file-error, abbr.required, .widget-control-remove:hover } .wp_themeSkin .mceMenu .mceText { - color: #000; + color: #000; } .wp_themeSkin .mceMenu .mceMenuItemEnabled a:hover, .wp_themeSkin .mceMenu .mceMenuItemActive { - background-color: #CEE1EF; + background-color: #f5f5f5; } .wp_themeSkin td.mceMenuItemSeparator { background-color: #aaa; } .wp_themeSkin .mceMenuItemTitle a { - background-color: #ccc; + background-color: #ccc; border-bottom-color: #aaa; } .wp_themeSkin .mceMenuItemTitle span.mceText { @@ -662,27 +924,80 @@ div#media-upload-error, .file-error, abbr.required, .widget-control-remove:hover color: #888; } -/* pop-up */ -.clearlooks2 .mceTop .mceLeft, .clearlooks2 .mceTop .mceRight { - background-color: #cee1ef; - border-color: #c6d9e9; +.wp_themeSkin tr.mceFirst td.mceToolbar { + background-color: #dfdfdf; + border-color: #dfdfdf; } -.clearlooks2 .mceFocus .mceTop .mceLeft, .clearlooks2 .mceFocus .mceTop .mceRight { - background-color: #2683ae; - border-color: #464646; +.wp-admin #mceModalBlocker { + background: #000; } -#editorcontainer { - border-color: #ccc; +.wp-admin .clearlooks2 .mceFocus .mceTop .mceLeft { + background: #444444; + border-left: 1px solid #999; + border-top: 1px solid #999; + -moz-border-radius: 4px 0 0 0; + -webkit-border-top-left-radius: 4px; + -khtml-border-top-left-radius: 4px; + border-top-left-radius: 4px; } -#poststuff #titlewrap { - border-color: #ccc; +.wp-admin .clearlooks2 .mceFocus .mceTop .mceRight { + background: #444444; + border-right: 1px solid #999; + border-top: 1px solid #999; + border-top-right-radius: 4px; + -khtml-border-top-right-radius: 4px; + -webkit-border-top-right-radius: 4px; + -moz-border-radius: 0 4px 0 0; } -.curtime { - color: #666; +.wp-admin .clearlooks2 .mceMiddle .mceLeft { + background: #f1f1f1; + border-left: 1px solid #999; +} + +.wp-admin .clearlooks2 .mceMiddle .mceRight { + background: #f1f1f1; + border-right: 1px solid #999; +} + +.wp-admin .clearlooks2 .mceBottom { + background: #f1f1f1; + border-bottom: 1px solid #999; +} + +.wp-admin .clearlooks2 .mceBottom .mceLeft { + background: #f1f1f1; + border-bottom: 1px solid #999; + border-left: 1px solid #999; +} + +.wp-admin .clearlooks2 .mceBottom .mceCenter { + background: #f1f1f1; + border-bottom: 1px solid #999; +} + +.wp-admin .clearlooks2 .mceBottom .mceRight { + background: #f1f1f1; + border-bottom: 1px solid #999; + border-right: 1px solid #999; +} + +.wp-admin .clearlooks2 .mceFocus .mceTop span { + color: #e5e5e5; +} +/* end TinyMCE */ + +#editorcontainer, +#post-status-info, +#titlediv #title { + border-color: #dfdfdf; +} + +#titlediv #title { + background-color: #fff; } #tTips p#tTips_inside { @@ -690,8 +1005,223 @@ div#media-upload-error, .file-error, abbr.required, .widget-control-remove:hover color: #333; } -/* Diff */ +#timestampdiv input, +#namediv input, +#tagsdiv #the-tagcloud { + border-color: #ddd; +} + +/* menu */ +#adminmenu * { + border-color: #e3e3e3; +} + +#adminmenu li.wp-menu-separator { + background: transparent url(../images/menu-arrows.gif) no-repeat scroll left 5px; +} + +.folded #adminmenu li.wp-menu-separator { + background: transparent url(../images/menu-arrows.gif) no-repeat scroll right -34px; +} + +#adminmenu li.wp-has-current-submenu.wp-menu-open .wp-menu-toggle, +#adminmenu li.wp-has-current-submenu:hover .wp-menu-toggle { + background: transparent url(../images/menu-bits.gif) no-repeat scroll left -207px; +} + +#adminmenu .wp-has-submenu:hover .wp-menu-toggle, +#adminmenu .wp-menu-open .wp-menu-toggle { + background: transparent url(../images/menu-bits.gif) no-repeat scroll left -109px; +} + +#adminmenu a.menu-top { + background: #f1f1f1 url(../images/menu-bits.gif) repeat-x scroll left -379px; +} + +#adminmenu .wp-submenu a { + background: #FFFFFF url(../images/menu-bits.gif) no-repeat scroll 0 -310px; +} + +#adminmenu .wp-has-current-submenu ul li a { + background: none; +} + +#adminmenu .wp-has-current-submenu ul li a.current { + background: url(../images/menu-dark.gif) top left no-repeat !important; +} + +#adminmenu li.wp-has-current-submenu a.wp-has-current-submenu, +#adminmenu .menu-top .current { + background: #6d6d6d url(../images/menu-bits.gif) top left repeat-x; + border-color: #6d6d6d; + color: #fff; + text-shadow: rgba(0,0,0,0.4) 0px -1px 0px; +} + +#adminmenu li.wp-has-current-submenu .wp-submenu, +#adminmenu li.wp-has-current-submenu ul li a { + border-color: #aaa !important; +} + +#adminmenu li.wp-has-current-submenu ul li a { + background: url(../images/menu-dark.gif) bottom left no-repeat !important; +} + +#adminmenu li.wp-has-current-submenu ul { + border-bottom-color: #aaa; +} + +#adminmenu li.menu-top .current:hover { + border-color: #B5B5B5; +} + +#adminmenu .wp-submenu .current a.current { + background: transparent url(../images/menu-bits.gif) no-repeat scroll 0 -289px; +} + +#adminmenu .wp-submenu a:hover { + background-color: #EAF2FA !important; + color: #333 !important; +} + +#adminmenu .wp-submenu li.current, +#adminmenu .wp-submenu li.current a, +#adminmenu .wp-submenu li.current a:hover { + color: #333; + background-color: #f5f5f5; + background-image: none; + border-color: #e3e3e3; + text-shadow: rgba(255,255,255,1) 0px 1px 0px; +} + +#adminmenu .wp-submenu ul { + background-color: #fff; +} + +.folded #adminmenu li.menu-top, +#adminmenu .wp-submenu .wp-submenu-head { + background-color: #F1F1F1; +} + +.folded #adminmenu li.wp-has-current-submenu, +.folded #adminmenu li.menu-top.current { + background-color: #e6e6e6; +} + +#adminmenu .wp-has-current-submenu .wp-submenu .wp-submenu-head { + background-color: #EAEAEA; + border-color: #aaa; +} + +#adminmenu div.wp-submenu { + background-color: transparent; +} + +/* menu icons */ +#adminmenu #menu-dashboard div.wp-menu-image { + background: transparent url("../images/menu.png") no-repeat scroll -61px -33px; +} + +#adminmenu #menu-dashboard:hover div.wp-menu-image, +#adminmenu #menu-dashboard.wp-has-current-submenu div.wp-menu-image, +#adminmenu #menu-dashboard.current div.wp-menu-image { + background: transparent url("../images/menu.png") no-repeat scroll -61px -1px; +} + +#adminmenu #menu-posts div.wp-menu-image { + background: transparent url("../images/menu.png") no-repeat scroll -272px -33px; +} + +#adminmenu #menu-posts:hover div.wp-menu-image, +#adminmenu #menu-posts.wp-has-current-submenu div.wp-menu-image { + background: transparent url("../images/menu.png") no-repeat scroll -272px -1px; +} + +#adminmenu #menu-media div.wp-menu-image { + background: transparent url("../images/menu.png") no-repeat scroll -121px -33px; +} + +#adminmenu #menu-media:hover div.wp-menu-image, +#adminmenu #menu-media.wp-has-current-submenu div.wp-menu-image { + background: transparent url("../images/menu.png") no-repeat scroll -121px -1px; +} + +#adminmenu #menu-links div.wp-menu-image { + background: transparent url("../images/menu.png") no-repeat scroll -91px -33px; +} + +#adminmenu #menu-links:hover div.wp-menu-image, +#adminmenu #menu-links.wp-has-current-submenu div.wp-menu-image { + background: transparent url("../images/menu.png") no-repeat scroll -91px -1px; +} + +#adminmenu #menu-pages div.wp-menu-image { + background: transparent url("../images/menu.png") no-repeat scroll -151px -33px; +} + +#adminmenu #menu-pages:hover div.wp-menu-image, +#adminmenu #menu-pages.wp-has-current-submenu div.wp-menu-image { + background: transparent url("../images/menu.png") no-repeat scroll -151px -1px; +} + +#adminmenu #menu-comments div.wp-menu-image { + background: transparent url("../images/menu.png") no-repeat scroll -31px -33px; +} + +#adminmenu #menu-comments:hover div.wp-menu-image, +#adminmenu #menu-comments.wp-has-current-submenu div.wp-menu-image, +#adminmenu #menu-comments.current div.wp-menu-image { + background: transparent url("../images/menu.png") no-repeat scroll -31px -1px; +} + +#adminmenu #menu-appearance div.wp-menu-image { + background: transparent url("../images/menu.png") no-repeat scroll -1px -33px; +} + +#adminmenu #menu-appearance:hover div.wp-menu-image, +#adminmenu #menu-appearance.wp-has-current-submenu div.wp-menu-image { + background: transparent url("../images/menu.png") no-repeat scroll -1px -1px; +} + +#adminmenu #menu-plugins div.wp-menu-image { + background: transparent url("../images/menu.png") no-repeat scroll -181px -33px; +} + +#adminmenu #menu-plugins:hover div.wp-menu-image, +#adminmenu #menu-plugins.wp-has-current-submenu div.wp-menu-image { + background: transparent url("../images/menu.png") no-repeat scroll -181px -1px; +} + +#adminmenu #menu-users div.wp-menu-image { + background: transparent url("../images/menu.png") no-repeat scroll -301px -33px; +} + +#adminmenu #menu-users:hover div.wp-menu-image, +#adminmenu #menu-users.wp-has-current-submenu div.wp-menu-image { + background: transparent url("../images/menu.png") no-repeat scroll -301px -1px; +} + +#adminmenu #menu-tools div.wp-menu-image { + background: transparent url("../images/menu.png") no-repeat scroll -211px -33px; +} + +#adminmenu #menu-tools:hover div.wp-menu-image, +#adminmenu #menu-tools.wp-has-current-submenu div.wp-menu-image { + background: transparent url("../images/menu.png") no-repeat scroll -211px -1px; +} + +#adminmenu #menu-settings div.wp-menu-image { + background: transparent url("../images/menu.png") no-repeat scroll -241px -33px; +} + +#adminmenu #menu-settings:hover div.wp-menu-image, +#adminmenu #menu-settings.wp-has-current-submenu div.wp-menu-image { + background: transparent url("../images/menu.png") no-repeat scroll -241px -1px; +} +/* end menu */ + +/* Diff */ table.diff .diff-deletedline { background-color: #ffdddd; } @@ -704,3 +1234,344 @@ table.diff .diff-addedline { table.diff .diff-addedline ins { background-color: #99ff99; } + +#att-info { + background-color: #E4F2FD; +} + +/* edit image */ +#sidemenu a { + background-color: #f9f9f9; + border-color: #f9f9f9; + border-bottom-color: #dfdfdf; +} + +#sidemenu a.current { + background-color: #fff; + border-color: #dfdfdf #dfdfdf #fff; + color: #D54E21; +} + + +#screen-options-wrap, +#contextual-help-wrap { + background-color: #f1f1f1; + border-color: #dfdfdf; +} + +#screen-meta-links a.show-settings { + color: #606060; +} + +#screen-meta-links a.show-settings:hover { + color: #000; +} + +#replysubmit { + background-color: #f1f1f1; + border-top-color: #ddd; +} + +#replyerror { + border-color: #ddd; + background-color: #f9f9f9; +} + +#edithead, +#replyhead { + background-color: #f1f1f1; +} + +#ed_reply_toolbar { + background-color: #e9e9e9; +} + +/* table vim shortcuts */ +.vim-current { + background-color: #E4F2FD !important; +} + +/* Install Plugins */ +.star-average, +.star.star-rating { + background-color: #fc0; +} + +div.star.select:hover { + background-color: #d00; +} + +#plugin-information .fyi ul { + background-color: #eaf3fa; +} + +#plugin-information .fyi h2.mainheader { + background-color: #cee1ef; +} + +#plugin-information pre, +#plugin-information code { + background-color: #ededff; +} + +#plugin-information pre { + border: 1px solid #ccc; +} + +/* inline editor */ +.inline-edit-row fieldset input[type="text"], +.inline-edit-row fieldset textarea, +#bulk-titles, +#replyrow input { + border-color: #ddd; +} + +.inline-editor div.title { + background-color: #EAF3FA; +} + +.inline-editor ul.cat-checklist { + background-color: #FFFFFF; + border-color: #ddd; +} + +.inline-edit-row p.submit { + background-color: #f1f1f1; +} + +.inline-editor .categories .catshow, +.inline-editor .categories .cathide { + color: #21759b; +} + +.inline-editor .quick-edit-save { + background-color: #f1f1f1; +} + +#replyrow #ed_reply_toolbar input:hover { + border-color: #aaa; + background: #ddd; +} + +fieldset.inline-edit-col-right .inline-edit-col { + border-color: #dfdfdf; +} + +.attention { + color: #D54E21; +} + +.meta-box-sortables .postbox:hover .handlediv { + background: transparent url(../images/menu-bits.gif) no-repeat scroll left -111px; +} + +#major-publishing-actions { + background: #eaf2fa; +} + +.tablenav .tablenav-pages { + color: #555; +} + +.tablenav .tablenav-pages a { + border-color: #e3e3e3; + background: #eee url('../images/menu-bits.gif') repeat-x scroll left -379px; +} + +.tablenav .tablenav-pages a:hover { + color: #d54e21; + border-color: #d54321; +} + +.tablenav .tablenav-pages a:active { + color: #fff !important; +} + +.tablenav .tablenav-pages .current { + background: #dfdfdf; + border-color: #d3d3d3; +} + +#availablethemes, +#availablethemes td { + border-color: #ddd; +} + +#current-theme img { + border-color: #999; +} + +#TB_window #TB_title a.tb-theme-preview-link, +#TB_window #TB_title a.tb-theme-preview-link:visited { + color: #999; +} + +#TB_window #TB_title a.tb-theme-preview-link:hover, +#TB_window #TB_title a.tb-theme-preview-link:focus { + color: #ccc; +} + +.misc-pub-section { + border-bottom-color: #eee; +} + +#minor-publishing { + border-bottom-color: #ddd; +} + +#post-body .misc-pub-section { + border-right-color: #eee; +} + +.post-com-count span { + background-color: #bbb; +} + +.form-table .color-palette td { + border-color: #fff; +} + +.sortable-placeholder { + border-color: #bbb; + background-color: #f5f5f5; +} + +#post-body ul#category-tabs li.ui-tabs-selected a { + color: #333; +} + +#wp_editimgbtn, +#wp_delimgbtn, +#wp_editgallery, +#wp_delgallery { + border-color: #999; + background-color: #eee; +} + +#wp_editimgbtn:hover, +#wp_delimgbtn:hover, +#wp_editgallery:hover, +#wp_delgallery:hover { + border-color: #555; + background-color: #ccc; +} + +#favorite-first { + background: #797979 url(../images/fav.png) repeat-x left center; + border-color: #777 !important; + border-bottom-color: #666 !important; +} + +#favorite-inside { + border-color: #797979; + background-color: #797979; +} + +#favorite-toggle { + background: transparent url(../images/fav-arrow.gif) no-repeat 0 -4px; +} + +#favorite-actions a { + color: #ddd; +} + +#favorite-actions a:hover { + color: #fff; +} + +#favorite-inside a:hover { + text-decoration: underline; +} + +#favorite-actions .slide-down { + border-bottom-color: #626262; +} + +.submit input, +.button, +.button-primary, +.button-secondary, +.button-highlighted, +#postcustomstuff .submit input { + text-shadow: rgba(255,255,255,1) 0 1px 0; +} + +.button-primary, +.submit .button-primary { + text-shadow: rgba(0,0,0,0.3) 0 -1px 0; +} + +#screen-meta a.show-settings { + background-color: transparent; + text-shadow: rgba(255,255,255,0.7) 0 1px 0; +} + +#icon-edit, +#icon-post { + background: transparent url(../images/icons32.png) no-repeat -552px -5px; +} + +#icon-index { + background: transparent url(../images/icons32.png) no-repeat -137px -5px; +} + +#icon-upload { + background: transparent url(../images/icons32.png) no-repeat -251px -5px; +} + +#icon-link-manager, +#icon-link, +#icon-link-category { + background: transparent url(../images/icons32.png) no-repeat -190px -5px; +} + +#icon-edit-pages, +#icon-page { + background: transparent url(../images/icons32.png) no-repeat -312px -5px; +} + +#icon-edit-comments { + background: transparent url(../images/icons32.png) no-repeat -72px -5px; +} + +#icon-themes { + background: transparent url(../images/icons32.png) no-repeat -11px -5px; +} + +#icon-plugins { + background: transparent url(../images/icons32.png) no-repeat -370px -5px; +} + +#icon-users, +#icon-user-edit { + background: transparent url(../images/icons32.png) no-repeat -600px -5px; +} + +#icon-tools, +#icon-admin { + background: transparent url(../images/icons32.png) no-repeat -432px -5px; +} + +#icon-options-general { + background: transparent url(../images/icons32.png) no-repeat -492px -5px; +} + +.view-switch #view-switch-list { + background: transparent url(../images/list.png) no-repeat 0 0; +} + +.view-switch #view-switch-list.current { + background: transparent url(../images/list.png) no-repeat -40px 0; +} + +.view-switch #view-switch-excerpt { + background: transparent url(../images/list.png) no-repeat -20px 0; +} + +.view-switch #view-switch-excerpt.current { + background: transparent url(../images/list.png) no-repeat -60px 0; +} + +#header-logo { + background: transparent url(../images/wp-logo.gif) no-repeat scroll center center; +} diff --git a/wp-admin/css/dashboard-rtl.css b/wp-admin/css/dashboard-rtl.css index 3c4fd61a..60a97baf 100644 --- a/wp-admin/css/dashboard-rtl.css +++ b/wp-admin/css/dashboard-rtl.css @@ -1,62 +1,93 @@ -/* Right Now */ -#rightnow { - margin-right:0; - margin-left: 7px; +#dashboard-widgets-wrap .has-sidebar { + margin-right: 0; + margin-left: -51%; } -#rightnow .reallynow span { - text-align: right; - float: right; +#dashboard-widgets-wrap .has-sidebar .has-sidebar-content { + margin-right: 0; + margin-left: 51%; +} +.view-all { + right: auto; + left: 0; } -#rightnow .reallynow a { +#dashboard_right_now p.sub, #dashboard-widgets h4, #dashboard_quick_press h4, a.rsswidget, #dashboard_plugins h4, #dashboard_plugins h5, #dashboard_recent_comments .comment-meta .approve { + font-family: Tahoma, Arial; +} +#dashboard_right_now td.b { + padding-right: 0; + padding-left: 6px; text-align: left; + font-family: Tahoma, Arial; +} +#dashboard_right_now .t { + padding-right: 0; + padding-left: 12px; +} +#dashboard_right_now .versions a { + font-family: Tahoma, Arial; +} +#dashboard_right_now a.button { float: left; - margin: 1px 0 0 6px; + clear: left; } -/* Widgets */ -div#dashboard-widgets-wrap { - margin-right:0; - margin-left:-13px; +#dashboard-widgets h3 .postbox-title-action { + right: auto; + left: 30px; } -div.dashboard-widget-holder { - float:right; +#the-comment-list .pingback { + padding-left: 0 !important; + padding-right: 9px !important; } -div.dashboard-widget { - margin-right:0; - margin-left: 20px; +/* Recent Comments */ +#the-comment-list .comment-item { + padding: 1em 70px 1em 10px; } -h3.dashboard-widget-title span { - text-align: right; +#the-comment-list .comment-item .avatar { float: right; + margin-left: 0; + margin-right: -60px; } -h3.dashboard-widget-title small { +/* Feeds */ +.rss-widget cite { text-align: left; - float:left; -} -div.dashboard-widget-submit input { - font-family: Tahoma; } -div.dashboard-widget-content ul, div.dashboard-widget-content ol, div.dashboard-widget-content dl { - padding-left:0; - padding-right:15px; +.rss-widget span.rss-date { + font-family: Tahoma, Arial; + margin-left: 0; + margin-right: 3px; } -#dashboard_secondary div.dashboard-widget-content ul li { - float:right; +/* QuickPress */ +#dashboard_quick_press h4 { + float: right; + text-align: left; } -#dashboard_secondary div.dashboard-widget-content ul li .post { - font-family:arial; +#dashboard_quick_press h4 label { + margin-right: 0; + margin-left: 10px; } -#dashboard_secondary div.dashboard-widget-content ul li a { - border-right:0 none; - border-left: 1px solid #dadada; - height:110px; +#dashboard_quick_press .input-text-wrap, #dashboard_quick_press .textarea-wrap { + margin: 0 5em 1em 0; } -#dashboard_secondary div.dashboard-widget-content ul li a cite { - font-family: Tahoma; +#dashboard_quick_press #media-buttons { + margin: 0 5em .5em 0; + padding: 0 10px 0 0; } -#dashboard-widgets .widget_rss ul li span.rss-date { - float:right; +#dashboard-widgets #dashboard_quick_press form p.submit { + margin-left: 0; + margin-right: 4.6em; } -#dashboard-widgets .widget_rss ul li a { +#dashboard-widgets #dashboard_quick_press form p.submit input { float: right; - margin: 0 0 .2em .5em; +} +#dashboard-widgets #dashboard_quick_press form p.submit #save-post { + margin: 0 10px 0 1em; +} +#dashboard-widgets #dashboard_quick_press form p.submit #publish { + float: left; +} +/* Recent Drafts */ +#dashboard_recent_drafts h4 abbr { + font-family: Tahoma, Arial; + margin-left:0; + margin-right: 3px; } diff --git a/wp-admin/css/dashboard.css b/wp-admin/css/dashboard.css index eb07f86b..fcadcf99 100644 --- a/wp-admin/css/dashboard.css +++ b/wp-admin/css/dashboard.css @@ -1,282 +1,396 @@ -/* Right Now */ +.postbox p, .postbox ul, .postbox ol, .postbox blockquote, #wp-version-message { font-size: 11px; } + +.edit-box { + display: none; +} + +h3:hover .edit-box { + display: inline; +} -#rightnow { +form .input-text-wrap { + border-style: solid; border-width: 1px; + padding: 2px 3px; + border-color: #ccc; +} + +#dashboard-widgets form .input-text-wrap input { + border: 0 none; + outline: none; + margin: 0; + padding: 0; + width: 99%; + color: #333; +} + +form .textarea-wrap { border-style: solid; + border-width: 1px; padding: 2px; - margin-top: 10px; - margin-right: 7px; + border-color: #ccc; } -#rightnow .reallynow { - padding: 6px; - font-size: 15px; - line-height: 2; +#dashboard-widgets form .textarea-wrap textarea { + border: 0 none; + padding: 0; + outline: none; + width: 99%; + -moz-box-sizing: border-box; + -webkit-box-sizing: border-box; + box-sizing: border-box; +} + +#dashboard-widgets .postbox form .submit { + float: none; + margin: .5em 0 0; + padding: 0; + border: none; +} + +#dashboard-widgets-wrap #dashboard-widgets .postbox form .submit input { margin: 0; } -#rightnow .rbutton { - font-weight: normal; - padding: 6px; - border-bottom: none; - -moz-border-radius: 2px; - -khtml-border-radius: 2px; - -webkit-border-radius: 2px; - border-radius: 2px; - text-decoration: none; +#dashboard-widgets-wrap #dashboard-widgets .postbox form .submit #publish { + min-width: 0; } -#rightnow .reallynow span { - display: block; - text-align: left; - float: left; - padding: 0 6px; +#dashboard-widgets-wrap .has-sidebar { + margin-right: -51%; } -#rightnow .reallynow a { - display: block; - text-align: right; - float: right; - padding: 0 6px; - font-size: 14px; - margin: 1px 6px 0 0; +#dashboard-widgets-wrap .inner-sidebar { + width: 49%; } -#rightnow .youhave { - font-size: 14px; - padding: 10px; +#dashboard-widgets-wrap .has-sidebar .has-sidebar-content { + margin-right: 51%; } -#rightnow h3, #rightnow p { - padding: 0 10px; +div.postbox div.inside { + margin: 10px; + position: relative; } -#rightnow a { - font-weight: bold; +#dashboard-widgets a { + text-decoration: none; } -/* Widgets */ +#dashboard-widgets h3 a { + text-decoration: underline; +} -div#dashboard-widgets-wrap { - margin-top: -20px; - margin-right: -13px; /* 20 (div.dashboard-widget margin-right) - 7 (#rightnow margin-right) */ +#dashboard-widgets h3 .postbox-title-action { + position: absolute; + right: 30px; + padding: 0; } -div#dashboard-widgets { - width: 100%; +#dashboard-widgets h4 { + font-family: Georgia, "Times New Roman", "Bitstream Charter", Times, serif; + font-size: 13px; + margin: 0 0 .2em; + padding: 0; } -div.dashboard-widget-holder { - margin-top: 20px; - width: 50%; - float: left; +/* Right Now */ + +#dashboard_right_now p.sub, +#dashboard_right_now .table, #dashboard_right_now .versions { + margin: -12px; +} + +#dashboard_right_now .inside { + font-size: 12px; } -div.dashboard-widget-holder.third { - width: 33.3%; +#dashboard_right_now p.sub { + font-style: italic; + font-family: Georgia, "Times New Roman", "Bitstream Charter", Times, serif; + padding: 5px 10px 15px; + color: #777; + font-size: 13px; } -div.dashboard-widget-holder.fourth { - width: 25%; +#dashboard_right_now .table { + background: #f9f9f9; + border-top: #ececec 1px solid; + border-bottom: #ececec 1px solid; + margin: 0 -9px 10px; + padding: 0 10px; } -div.dashboard-widget-holder.full { +#dashboard_right_now table { width: 100%; } -div.dashboard-widget-holder.double div.dashboard-widget { - height: 54em; - padding-bottom: 28px /* lame */ +#dashboard_right_now table td { + border-top: #ececec 1px solid; + padding: 3px 0; + white-space: nowrap; } -div.dashboard-widget { - position: relative; - margin-right: 20px; - border-width: 1px; - border-style: solid; - padding: 2px; - height: 27em; - overflow: auto; - font-size: 11px; +#dashboard_right_now table tr.first td { + border-top: none; } -h3.dashboard-widget-title { - margin: 0; - padding: 0 7px; +#dashboard_right_now td.b { + padding-right: 6px; + text-align: right; + font-family: Georgia, "Times New Roman", "Bitstream Charter", Times, serif; font-size: 14px; - line-height: 2; } -h3.dashboard-widget-title span { - display: block; - text-align: left; - float: left; +#dashboard_right_now td.b a { + font-size: 18px; } -h3.dashboard-widget-title small { - display: block; - text-align: right; - float: right; - font-size: 75%; - line-height: 2.67; /* math: it works, bitches */ +#dashboard_right_now td.b a:hover { + color: #d54e21; } -h3.dashboard-widget-title img.rss-icon { - vertical-align: middle; - margin: .5em 0; +#dashboard_right_now .t { + font-size: 12px; + padding-right: 12px; + padding-top: 6px; + color: #777; } -div.dashboard-widget-notice { - padding: 0 14px; - font-size: 1.2em; - line-height: 2; +#dashboard_right_now td.first, +#dashboard_right_now td.last { + width: 1px; } -div.dashboard-widget-error { - padding: 0 20px; - font-size: 1.2em; - line-height: 2; +#dashboard_right_now .spam { + color: red; } -div.dashboard-widget-content { - padding: 10px 15px; +#dashboard_right_now .waiting { + color: orange; } -div.dashboard-widget-submit { - border-top: 1px solid #ccc; - padding: 1em 0 0 0; - margin: 10px 0 0 0; +#dashboard_right_now .approved { + color: green; } -div.dashboard-widget-submit input { - font-family: "Lucida Grande", "Lucida Sans Unicode", Tahoma, Verdana, sans-serif; - padding: 4px 6px; - border: none; - font-size: 13px; - -moz-border-radius: 3px; - -khtml-border-radius: 3px; - -webkit-border-radius: 3px; - border-radius: 3px; - cursor: pointer; - text-decoration: none; + +#dashboard_right_now .versions { + padding: 6px 10px 12px; } -div.dashboard-widget-content ul, div.dashboard-widget-content ol, div.dashboard-widget-content dl { - margin: 0; - text-indent: 0; - padding-left: 15px; +#dashboard_right_now .versions .b { + font-weight: bold; +} + +#dashboard_right_now a.button { + float: right; + clear: right; + position: relative; + top: -5px; } -div.dashboard-widget-content li { - margin: .5em 0 1em; + +/* Recent Comments */ + +#dashboard_recent_comments h3 { + margin-bottom: 0; } -div.dashboard-widget-content blockquote { - margin: -1em 0; +#dashboard_recent_comments .inside { + margin-top: 0; } -div#dashboard_recent_comments p { - font-size: 14px; +#dashboard_recent_comments .comment-meta .approve { + font-style: italic; + font-family: "Lucida Grande", Verdana, Arial, "Bitstream Vera Sans", sans-serif; + font-size: 10px; } -div.dashboard-widget-content p.comment-meta { - font-size: 11px !important; +#the-comment-list { + position: relative; } -#dashboard_secondary div.dashboard-widget { - height: auto; +#the-comment-list .comment-item { + padding: 1em 10px 1em 70px; + border-top: 1px solid; } -#dashboard_secondary div.dashboard-widget-content ul { - list-style: none; - padding: 0; +#the-comment-list .pingback { + padding-left: 9px !important; } -#dashboard_secondary div.dashboard-widget-content ul li { - display: block; - width: 19.95%; - padding-bottom: 10px; - margin: 0; +#the-comment-list .comment-item, +#the-comment-list #replyrow { + margin: 0 -10px; +} + +#the-comment-list .comment-item:first-child { + border-top: none; +} + +#the-comment-list .comment-item .avatar { float: left; - font-size: 95%; + margin-left: -60px; } -#dashboard_secondary div.dashboard-widget-content { - margin: 10px 5px; - padding: 0; +#the-comment-list .comment-item h4 { + line-height: 1.4; + margin-top: -.2em; + font-weight: normal; + color: #999; } -#dashboard_secondary div.dashboard-widget-content ul li .post { - display:block; - font-family:Georgia,"Times New Roman",Times,serif; - font-size:18px; - line-height: 1.2em; - height:90px; - overflow:hidden; +#the-comment-list .comment-item h4 cite { + font-style: normal; + font-weight: normal; } -#dashboard_secondary div.dashboard-widget-content ul li a { - display: block; - height:100%; - overflow:hidden; - margin: 5px 10px; - text-decoration: none; - padding: .5em; - border-right: 1px solid #dadada; - border-bottom: 1px solid #dadada; +#the-comment-list .comment-item blockquote, +#the-comment-list .comment-item blockquote p { + margin: 0; + padding: 0; + display: inline; } -#dashboard_secondary div.dashboard-widget-content ul li a cite { +#dashboard_recent_comments #the-comment-list .trackback blockquote, +#dashboard_recent_comments #the-comment-list .pingback blockquote { display: block; - font-family: "Lucida Sans", "Lucida Grande", "Lucida Sans Unicode", Tahoma, Verdana, sans-serif; } -#dashboard-widgets .widget_rss ul { - list-style: none; +#the-comment-list .comment-item p.row-actions { + margin: 3px 0 0; padding: 0; + font-size: 10px; } -#dashboard-widgets .widget_rss ul li { +/* QuickPress */ + +#dashboard_quick_press h4 { + font-family: "Lucida Grande", Verdana, Arial, "Bitstream Vera Sans", sans-serif; + float: left; + width: 5.5em; clear: both; + font-weight: normal; + text-align: right; + padding-top: 5px; + font-size: 12px; +} + +#dashboard_quick_press h4 label { + margin-right: 10px; } -#dashboard-widgets .widget_rss ul li span.rss-date { +#dashboard_quick_press .input-text-wrap, +#dashboard_quick_press .textarea-wrap { + margin: 0 0 1em 5em; +} + +#dashboard_quick_press #media-buttons { + margin: 0 0 .5em 5em; + padding: 0 0 0 10px; + font-size: 11px; +} + +#dashboard_quick_press #media-buttons a { + vertical-align: bottom; +} + +#dashboard-widgets #dashboard_quick_press form p.submit { + margin-left: 4.6em; +} + +#dashboard-widgets #dashboard_quick_press form p.submit input { float: left; +} + +#dashboard-widgets #dashboard_quick_press form p.submit #save-post { + margin: 0 1em 0 10px; +} + +#dashboard-widgets #dashboard_quick_press form p.submit #publish { + float: right; +} + +/* Recent Drafts */ +#dashboard_recent_drafts ul { + margin: 0; + padding: 0; + list-style: none; +} + +#dashboard_recent_drafts ul li { + margin-bottom: 0.6em; +} + +#dashboard_recent_drafts h4 { + font-weight: normal; +} + +#dashboard_recent_drafts h4 abbr { + font-family: "Lucida Grande", Verdana, Arial, "Bitstream Vera Sans", sans-serif; + font-size: 11px; + color: #999; + margin-left: 3px; +} + +#dashboard_recent_drafts p { margin: 0; + padding: 0; } -#dashboard-widgets .widget_rss ul li a { - float: left; - margin: 0 .5em .2em 0; - font-weight: bold; +/* Feeds */ + +.rss-widget ul { + margin: 0; + padding: 0; + list-style: none; } -#dashboard-widgets .widget_rss ul li div { - clear: both; +a.rsswidget { + font-size: 13px; + font-family: Georgia, "Times New Roman", "Bitstream Charter", Times, serif; + line-height: 1.7em; +} + +.rss-widget ul li { line-height: 1.5em; + margin-bottom: 12px; } -#dashboard_primary a.rsswidget, #dashboard_plugins h5 { - font-size: 14px; +.rss-widget span.rss-date { + margin-left: 3px; } -#dashboard_primary span.rss-date { - font-size: 14px; +.rss-widget cite { + display: block; + text-align: right; + margin: 0 0 1em; + padding: 0; } +.rss-widget cite:before { + content: '\2014'; +} + +/* Plugins */ + #dashboard_plugins h4 { - font-size: 1em; - margin: 0 0 .1em; + font-family: "Lucida Grande", Verdana, Arial, "Bitstream Vera Sans", sans-serif; } #dashboard_plugins h5 { + font-family: Georgia, "Times New Roman", "Bitstream Charter", Times, serif; + font-size: 13px !important; margin: 0; display: inline; line-height: 1.4em; } -#dashboard_plugins p { - margin: 0 0 1em; - line-height: 1.5em; +#dashboard_plugins h5 a { + font-weight: normal; + line-height: 1.7em; } -.widget-loading { +#dashboard_plugins p { + margin: 0 0 1.4em; + line-height: 1.4em; } diff --git a/wp-admin/css/farbtastic-rtl.css b/wp-admin/css/farbtastic-rtl.css new file mode 100644 index 00000000..81f1c9e5 --- /dev/null +++ b/wp-admin/css/farbtastic-rtl.css @@ -0,0 +1,7 @@ +.farbtastic .color, .farbtastic .overlay { + left: 0; + right: 47px; +} +.farbtastic .marker { + margin: -8px -8px 0 0; +} diff --git a/wp-admin/css/farbtastic.css b/wp-admin/css/farbtastic.css new file mode 100644 index 00000000..71ad3c13 --- /dev/null +++ b/wp-admin/css/farbtastic.css @@ -0,0 +1,32 @@ +.farbtastic { + position: relative; +} +.farbtastic * { + position: absolute; + cursor: crosshair; +} +.farbtastic, .farbtastic .wheel { + width: 195px; + height: 195px; +} +.farbtastic .color, .farbtastic .overlay { + top: 47px; + left: 47px; + width: 101px; + height: 101px; +} +.farbtastic .wheel { + background: url(../images/wheel.png) no-repeat; + width: 195px; + height: 195px; +} +.farbtastic .overlay { + background: url(../images/mask.png) no-repeat; +} +.farbtastic .marker { + width: 17px; + height: 17px; + margin: -8px 0 0 -8px; + overflow: hidden; + background: url(../images/marker.png) no-repeat; +} \ No newline at end of file diff --git a/wp-admin/css/global-rtl.css b/wp-admin/css/global-rtl.css index c1dfe5e8..0526d9d2 100644 --- a/wp-admin/css/global-rtl.css +++ b/wp-admin/css/global-rtl.css @@ -1,31 +1,74 @@ -body, td { - font-family: Tahoma; +/* 2 column liquid layout */ +#adminmenu { + float: right; + clear: right; + margin-right:-160px; + margin-left: 5px; } -textarea, input, select { - font-family: Tahoma; +div.folded #adminmenu { + margin-left: 0; + margin-right: -45px; } -h1, h2, h3 { - font-family:arial; +/* inner 2 column liquid layout */ +.inner-sidebar { + float: left; + clear: left; } -.widefat td { - padding: 7px 10px 9px 15px; +.has-sidebar { + float: right; + clear: right; + margin-right: 0; + margin-left: -340px; +} +.has-sidebar .has-sidebar-content { + margin-right: 0; + margin-left: 305px; +} +#wpbody { + margin-left:0; + margin-right: 175px; +} +.folded #wpbody { + margin-left: 0; + margin-right: 60px; +} +#wpbody-content { + float: right; +} +/* 2 columns main area */ +#col-right { + float: left; + clear: left; +} +.wrap { + margin: 0 5px 0 15px; +} +/* styles for use by people extending the WordPress interface */ +body, td, textarea, input, select { + font-family: Tahoma, arial; +} +.alignleft { + float: right; +} +.alignright { + float: left; +} +.subsubsub { + float: right; } .widefat th { - padding: 9px 10px 6px 15px; text-align: right; } .widefat th input { margin: 0 8px 0 0; } -.widefat .check-column { - text-align: left; -} .wrap h2 { - font-family:arial; - margin: 5px -4px 0 0; - padding-right:0; - padding-left: 280px; + font-family: arial; + padding: 14px 0 3px 15px; } .wrap h2.long-header { padding-left: 0; } +.updated, .error { + clear: both; +} diff --git a/wp-admin/css/global.css b/wp-admin/css/global.css index 295adea8..d9c91a34 100644 --- a/wp-admin/css/global.css +++ b/wp-admin/css/global.css @@ -1,40 +1,244 @@ -/* styles for use by people extending the WordPress interface */ +/* http://meyerweb.com/eric/tools/css/reset/ */ +/* v1.0 | 20080212 */ + +html, body, div, span, applet, object, iframe, +h1, h2, h3, h4, h5, h6, p, blockquote, pre, +a, abbr, acronym, address, big, cite, code, +del, dfn, em, font, img, ins, kbd, q, s, samp, +small, strike, strong, sub, sup, tt, var, +b, u, i, center, +dl, dt, dd, ol, ul, li, +fieldset, form, label, legend, +table, caption, tbody, tfoot, thead, tr, th, td { + margin: 0; + padding: 0; + border: 0; + outline: 0; +/* font-size: 100%; + vertical-align: baseline; */ + background: transparent; +} +body { + line-height: 1; +} +ol, ul { + list-style: none; +} +blockquote, q { + quotes: none; +} +blockquote:before, blockquote:after, +q:before, q:after { + content: ''; + content: none; +} +/* remember to define focus styles! */ +/* +:focus { + outline: 0; +} +*/ +/* remember to highlight inserts somehow! */ +ins { + text-decoration: none; +} +del { + text-decoration: line-through; +} -body { +/* tables still need 'cellspacing="0"' in the markup */ +/* +table { + border-collapse: collapse; + border-spacing: 0; +} +*/ +/* end reset css */ + + +/* 2 column liquid layout */ +#wpwrap { + height: auto; + min-height: 100%; + width: 100%; +} + +#wpcontent { + height: 100%; + padding-bottom: 50px; +} + +#wpbody { + clear: both; + margin-left: 175px; +} + +.folded #wpbody { + margin-left: 60px; +} + +#wpbody-content { + float: left; + width: 100%; +} + +#adminmenu { + float: left; + clear: left; + width: 145px; + margin-top: 15px; + margin-right: 5px; + margin-bottom: 15px; + margin-left: -160px; + position: relative; + padding: 0; + list-style: none; +} + +.folded #adminmenu { + margin-left: -45px; +} + +.folded #adminmenu, +.folded #adminmenu li.menu-top { + width: 28px; +} + +#footer { + clear: both; + position: relative; + width: 100%; +} + +/* inner 2 column liquid layout */ + +.inner-sidebar { + float: right; + clear: right; + width: 280px; + position: relative; +} + +.has-sidebar { + float: left; + clear: left; + width: 100%; + margin-right: -340px; +} + +.has-sidebar .has-sidebar-content { + margin-right: 305px; +} + +/* 2 columns main area */ + +#col-container { + overflow: hidden; + padding: 0; margin: 0; +} + +#col-left { padding: 0; + margin: 0; + overflow: hidden; + width: 39%; +} + +#col-right { + float: right; + clear: right; + overflow: hidden; + padding: 0; + margin: 0; + width: 59%; +} + +/* utility classes */ +.alignleft { + float: left; +} + +.alignright { + float: right; +} + +.textleft { + text-align: left; } -body, td { - font: 13px "Lucida Grande", "Lucida Sans Unicode", Tahoma, Verdana, sans-serif; +.textright { + text-align: right; } -form, label input { margin: 0; padding: 0; } +.clear { + clear: both; +} -img { border: 0; } +.hidden, +.closed .inside, +.hide-if-no-js { + display: none; +} -label { cursor: pointer; } +/* include margin and padding in the width calculation of input and textarea */ +input[type="text"], +textarea { + -moz-box-sizing: border-box; + -webkit-box-sizing: border-box; + -ms-box-sizing: border-box; /* ie8 only */ + box-sizing: border-box; +} + +input[type="checkbox"], +input[type="radio"] { + vertical-align: text-top; +} -li, dd { margin-bottom: 6px; } +/* styles for use by people extending the WordPress interface */ +html, +body { + height: 100%; +} -p, li, dl, dd, dt { line-height: 140%; } +body, +td { + font: 13px "Lucida Grande", Verdana, Arial, "Bitstream Vera Sans", sans-serif; +} -textarea, input, select { - font: 13px Verdana, Arial, Helvetica, sans-serif; - margin: 1px; - padding: 3px; +p { + margin: 1em 0; } -.alignleft { float: left; } -.alignright { float: right; } +blockquote { + margin: 1em; +} -.textleft { text-align: left; } -.textright { text-align: right; } +label { + cursor: pointer; +} -.clear { clear: both; height: 2px; } +li, +dd { + margin-bottom: 6px; +} -.hidden { display: none; } +p, +li, +dl, +dd, +dt { + line-height: 140%; +} + +textarea, +input, +select { + font: 13px/19px "Lucida Grande", Verdana, Arial, "Bitstream Vera Sans", sans-serif; + margin: 1px; + padding: 3px; +} h1 { display: block; @@ -79,50 +283,105 @@ h6 { .subsubsub { list-style: none; - margin: 14px 0 8px 0; + margin: 8px 0 5px; padding: 0; white-space: nowrap; - font-size: 12px; + font-size: 11px; + float: left; } -.subsubsub a { line-height: 200%; padding: 3px; text-decoration: none; } +.subsubsub a { + line-height: 2; + padding: .2em; + text-decoration: none; +} -.subsubsub a.current { font-weight: bold; background: none; border: none;} +.subsubsub a .count, .subsubsub a.current .count { + color: #999; + font-weight: normal; +} -.subsubsub li { display: inline; margin: 0; padding: 0; } +.subsubsub a.current { + font-weight: bold; + background: none; + border: none; +} + +.subsubsub li { + display: inline; + margin: 0; + padding: 0; +} .widefat { border-width: 1px; border-style: solid; - border-collapse: collapse; + border-collapse: separate; + border-spacing: 0; width: 100%; clear: both; margin: 0; + -moz-border-radius: 4px; + -khtml-border-radius: 4px; + -webkit-border-radius: 4px; + border-radius: 4px; } -.widefat a { - text-decoration: none; +.widefat * { + word-wrap: break-word; } -.widefat abbr { - white-space: nowrap; +.widefat a { + text-decoration: none; } -.widefat td, .widefat th { +.widefat td, +.widefat th { border-bottom-width: 1px; border-bottom-style: solid; - border-bottom-color: #ccc; font-size: 11px; vertical-align: text-top; } .widefat td { - padding: 7px 15px 9px 10px; + padding: 7px 7px 5px; vertical-align: top; } +.widefat thead tr th:first { + -moz-border-radius-topleft: 4px; + -webkit-border-top-left-radius: 4px; + -khtml-border-top-left-radius: 4px; + border-top-left-radius: 4px; +} + +.widefat thead tr th:last { + -moz-border-radius-topright: 4px; + -webkit-border-top-right-radius: 4px; + -khtml-border-top-right-radius: 4px; + border-top-right-radius: 4px; +} + +.widefat tfoot tr th:first { + -moz-border-radius-bottomleft: 4px; + -webkit-border-bottom-left-radius: 4px; + -khtml-border-bottom-left-radius: 4px; + border-bottom-left-radius: 4px; +} + +.widefat tfoot tr th:last { + -moz-border-radius-bottomright: 4px; + -webkit-border-bottom-right-radius: 4px; + -khtml-border-bottom-right-radius: 4px; + border-bottom-right-radius: 4px; +} + +.widefat td p { + font-size: 11px; +} + .widefat th { - padding: 9px 15px 6px 10px; + padding: 7px 7px 8px; text-align: left; line-height: 1.3em; } @@ -130,69 +389,65 @@ h6 { .widefat th input { margin: 0 0 0 8px; padding: 0; + vertical-align: text-top; } .widefat .check-column { - text-align: right; - width: 1.5em; + width: 2.2em; padding: 0; } .widefat tbody th.check-column { - padding: 8px 0 22px; -} -/* -th.check-column + th, th.check-column + td { - padding-left: 5px; + padding: 7px 0 22px; } -*/ -.widefat .num { + +.widefat .num, +.column-comments, +.column-links, +.column-posts, +.column-parent { text-align: center; } -.wrap, .updated, .error { - margin: 0; - margin-left: 15px; - margin-right: 15px; - padding: 0; - max-width: 980px; +.widefat th#comments { + vertical-align: middle; } -.updated, .error { +.wrap { + margin: 0 15px 0 5px; +} + +.updated, +.error { border-width: 1px; border-style: solid; padding: 0 0.6em; - max-width: 950px; - margin-bottom: 1em; -} - -.updated p, .error p { - margin: 0.6em 0; + margin: 5px 15px 2px; + -moz-border-radius: 3px; + -khtml-border-radius: 3px; + -webkit-border-radius: 3px; + border-radius: 3px; } -.wrap .updated, .wrap .error { - margin: auto 0 0; +.updated p, +.error p { + margin: 0.5em 0; + line-height: 1; + padding: 2px; } -.updated a, .error a { - text-decoration: underline; -} - -.updated a { - text-decoration: none; - padding-bottom: 2px; +.wrap .updated, +.wrap .error { + margin: 5px 0; } .wrap h2 { - border-bottom-width: 1px; - border-bottom-style: solid; - clear: both; - font: 24px Georgia, "Times New Roman", Times, serif; - margin: 5px 0 0 -4px; - padding: 0; - padding-bottom: 7px; - padding-right: 280px; + font: italic normal normal 24px/29px Georgia, "Times New Roman", "Bitstream Charter", Times, serif; + margin: 0; + padding: 14px 15px 3px 0; + line-height: 35px; + text-shadow: rgba(255,255,255,1) 0px 1px 0px; } .wrap h2.long-header { diff --git a/wp-admin/css/ie-rtl.css b/wp-admin/css/ie-rtl.css index 1aa7cdb7..f66409e1 100644 --- a/wp-admin/css/ie-rtl.css +++ b/wp-admin/css/ie-rtl.css @@ -1,73 +1,91 @@ -#poststuff .postbox h3 { - padding-left:0; - padding-right: 23px; +* html #wpcontent #adminmenu .wp-has-submenu .wp-menu-toggle { + background: url(../images/menu-bits-rtl.gif) no-repeat scroll right -109px; } -* html #poststuff .postarea, * html #poststuff #titlediv { + +* html #wpcontent #adminmenu li.wp-has-current-submenu .wp-menu-toggle { + background: url(../images/menu-bits-rtl.gif) no-repeat scroll right -206px; +} +* html #adminmenu { margin-left:0; - margin-right: 3%; + margin-right: -80px; +} +* html div.folded #adminmenu { + margin-left: 0; + margin-right: -22px; +} +#wpcontent #adminmenu .wp-submenu li.wp-submenu-head { + padding: 3px 10px 4px 4px; +} +.inline-edit-row fieldset label span.title { + float: right; +} +.inline-edit-row fieldset label span.input-text-wrap { + margin-right: 0; +} +p.search-box { + float: left; } * html #poststuff h2 { margin-right: 0; } #bh { - padding-right:0; - padding-left: 15px; + margin: 7px 10px 0 0; + float: left; +} +#user_info + div#favorite-actions { + right: auto; + left: 15px; +} +#wphead-info { + float: left; } +/* without this dashboard widgets appear in one column for some screen widths */ div#dashboard-widgets { - padding-right:0; + padding-right: 0; padding-left: 1px; } #tagchecklist span a { margin: 4px -9px 0 0; } -#poststuff .togbox { - margin-left:0; - margin-right: -19px; -} .widefat th input { margin: 0 5px 0 0; } /* ---------- add by navid */ -#dashmenu { /* fix top right bottom in admin */ - direction:ltr; -} -#sidemenu a { /* fix left admin buttom ex. plugins, options */ - float:left; +#TB_window { + width: 670px; + position: absolute; + top: 50%; + left: 50%; + margin-right: 335px !important; } -.wrap h2 { - margin:5px 4px 0 0; +#dashboard_plugins { + direction: ltr; } -#editor-toolbar {/* fix hover in media uploader icon */ - direction:ltr; +#dashboard_plugins h3.hndle { + direction: rtl; } -#TB_window { /* fix theme preview */ - left:2%; +#dashboard_incoming_links ul li, +#dashboard_secondary ul li, +#dashboard_primary ul li, +p.row-actions { + width: 100%; } -/* fix widget page */ -form#widgets-filter { - position:static; +#favorite-inside { + position: absolute; + right:0; } -#widget-search { - display:none; +#post-status-info { + height: 25px; } -/* fix manage comment page */ -ul.view-switch li { - float:left; +#screen-meta { + position: static; } -form#posts-filter { - position:static; +p.submit { /* quick edit and reply in edit-comments.php */ + height:22px; } -#post-search { - display:none; +.inner-sidebar { /* fix edit single comment */ + position: static; } -#submenu { - margin-right: 20px; +form#widgets-filter { /* fix widget page */ + position: static; } -/* Fixes for media-upload window */ -/* Center media-upload panel on screen */ -#TB_window { - width: 670px; - position: absolute; - top: 50%; - left: 50%; - margin-right: 335px !important; } diff --git a/wp-admin/css/ie.css b/wp-admin/css/ie.css index e4d03554..c6c03106 100644 --- a/wp-admin/css/ie.css +++ b/wp-admin/css/ie.css @@ -1,14 +1,44 @@ /* Fixes for IE bugs */ -#poststuff .postbox h3 { - padding-left: 23px; +input.button, +input.button-secondary, +input.button-highlighted { + padding: 0; +} + +#minor-publishing-actions input, +#major-publishing-actions input, +#minor-publishing-actions .preview { + min-width: auto; + padding-left: 0; + padding-right: 0; +} + +#wpbody-content .postbox { + border: 1px solid #dfdfdf; +} + +#wpbody-content .postbox h3 { + margin-bottom: -1px; } -#submenu li a.current { - background:none; - border:none; +* html #side-info-column { + height: auto; } +* html #wpbody-content #screen-options-link-wrap { + display: inline-block; + width: 150px; + text-align: center; +} + +* html #wpbody-content #contextual-help-link-wrap { + display: inline-block; + width: 100px; + text-align: center; +} + +/* * html body.minwidth { _width: expression(document.documentElement.clientWidth < 810 ? "808px" : "99.9%"); } @@ -16,34 +46,229 @@ * html #wpbody { _width: expression(document.documentElement.clientWidth > 982 ? "980px" : "99.9%"); } +*/ -* html #poststuff .postarea, * html #poststuff #titlediv { - width: 95%; - margin-left: 3%; +* html #adminmenu { + margin-left: -80px; +} + +* html div.folded #adminmenu { + margin-left: -22px; +} + +* html #wpcontent #adminmenu li.menu-top { + display: inline; + padding: 0; + margin: 0; +} + +#wpcontent.folded #adminmenu li.menu-top { + display: block; +} + +ul#adminmenu { + z-index: 99; +} + +#adminmenu li.menu-top a.menu-top { + min-width: auto; + width: auto; +} + +#wpcontent #adminmenu li.wp-has-current-submenu a.wp-has-submenu { + font-style: normal; +} + +* html #wpcontent #adminmenu .wp-menu-open .wp-menu-toggle { + background: none; +} + +* html #wpcontent #adminmenu .wp-has-submenu .wp-menu-toggle { + background: url(../images/menu-bits.gif) no-repeat scroll left -109px; +} + +* html #wpcontent #adminmenu li.wp-has-current-submenu .wp-menu-toggle { + background: url(../images/menu-bits.gif) no-repeat scroll left -206px; +} + +* html #adminmenu div.wp-menu-image { + height: 29px; +} + +#wpcontent #adminmenu .wp-submenu li { + padding: 0; +} + +#adminmenu, +.wp-submenu, +.wp-submenu li, +.wp-menu-toggle { + zoom: 100%; +} + +#wpcontent.folded #adminmenu li.wp-menu-separator { + width: 28px; +} + +#wpcontent #adminmenu .wp-submenu li.wp-submenu-head { + padding: 3px 4px 4px 10px; + zoom: 100%; +} + +#wpcontent.folded #adminmenu .menu-top { + height: 30px; +} + +.folded #adminmenu .wp-submenu { + margin: -1px 0 0 0; +} + +#template, +#template div, +#editcat, +#addcat { + zoom: 100%; } .submitbox { margin-top: 10px; } -* html div.widget-liquid-left-holder, * html div.widget-liquid-right { +/* Inline Editor */ +#wpbody-content .quick-edit-row-post .inline-edit-col-left { + width: 39%; +} + +#wpbody-content .inline-edit-row-post .inline-edit-col-center { + width: 19%; +} + +#wpbody-content .quick-edit-row-page .inline-edit-col-left { + width: 49%; +} + +#wpbody-content .bulk-edit-row .inline-edit-col-left { + width: 29%; +} + +.inline-edit-row p.submit { + zoom: 100%; +} + +.inline-edit-row fieldset label span.title { + display: block; + float: left; + width: 5em; +} + +.inline-edit-row fieldset label span.input-text-wrap { + margin-left: 0; + zoom: 100%; +} + +#wpbody-content .inline-edit-row fieldset label span.input-text-wrap input { + line-height: 130%; +} + +#wpbody-content .inline-edit-row .input-text-wrap input { + width: 95%; +} + +#wpbody-content .inline-edit-row .input-text-wrap input.inline-edit-password-input { + width: 8em; +} +/* end Inline Editor */ + +input { + line-height: 1; +} + +* html .row-actions { + visibility: visible; +} + +#dashboard-widgets h3 a { + height: 20px; + line-height: 20px; +} + +#the-comment-list .comment-item, +ul#widget-list li.widget-list-item { + zoom: 100%; +} + +#wphead-info { + float: right; +} + +#titlediv #title { + width: 98%; +} + +a.button { + line-height: 1.4em; + margin: 1px; +} + +* html div.widget-liquid-left-holder, +* html div.widget-liquid-right { display: block; position: relative; } -#wpwrap, #wpcontent, #post, #wrap, #postdivrich, #postdiv, #poststuff, #titlediv, #post-body, #editorcontainer, .tablenav, .widget-control-list, li.widget-list-control-item, #dragHelper, li.widget-list-control-item h4, .widget-sortable, .widget-control-actions { +#screen-options-wrap { + overflow: hidden; +} + +#favorite-actions { + z-index: 12; +} + +#favorite-inside, +#favorite-inside a, +.favorite-action { + zoom: 100%; +} + +#post-status-info, +#wpwrap, +#wpcontent, +#post, +#wrap, +#postdivrich, +#postdiv, +#poststuff, +.metabox-holder, +#titlediv, +#post-body, +#editorcontainer, +.tablenav, +.widget-control-list, +li.widget-list-control-item, +#dragHelper, +li.widget-list-control-item h4, +.widget-sortable, +.widget-control-actions, +#tagchecklist, +#col-container, +#col-left, +#col-right { display: block; zoom: 100%; } +p.search-box { + position: static; + float: right; + margin: -3px 0 4px; +} + * html #editorcontainer { padding: 0; } -* html #editorcontainer #content { - position: relative; +#editorcontainer #content { overflow: auto; - padding: 6px; margin: auto; width: 98%; } @@ -52,7 +277,8 @@ form#template div { width: 100%; } -#ed_toolbar input { +#ed_toolbar input, +#ed_reply_toolbar input { overflow: visible; padding: 0 4px; } @@ -66,7 +292,8 @@ form#template div { } #bh { - padding-right: 15px; + margin: 7px 10px 0 0; + float: right; } /* without this dashboard widgets appear in one column for some screen widths */ @@ -74,11 +301,6 @@ div#dashboard-widgets { padding-right: 1px; } -#tagchecklist { - display: block; - zoom: 100%; -} - #tagchecklist span, #tagchecklist span a { display: inline-block; display: block; @@ -88,10 +310,6 @@ div#dashboard-widgets { margin: 4px 0 0 -9px; } -#poststuff .togbox { - margin-left: -19px; -} - .tablenav .button-secondary, .nav .button-secondary { padding: 0 1px; vertical-align: middle; @@ -104,23 +322,10 @@ div#dashboard-widgets { margin-top: 2px; } -.tablenav-pages .page-numbers { - display: inline-block; -} - -.tablenav-pages { - display: block; - margin-top: -3px; -} - table.ie-fixed { table-layout: fixed; } -#post-search .button, #widget-search .button { - padding: 1px; -} - .widefat tr, .widefat th { margin-bottom: 0; border-spacing: 0; diff --git a/wp-admin/css/install-rtl.css b/wp-admin/css/install-rtl.css index efef9612..f44484f7 100644 --- a/wp-admin/css/install-rtl.css +++ b/wp-admin/css/install-rtl.css @@ -1,27 +1,16 @@ body { - font-family: Tahoma; + font-family: Tahoma, arial; } -/* Half the page disapears on IE6 */ -* html body { - width: 700px; - position: absolute; - left: 50%; - margin-right: 350px; -} -ul, ol { - padding: 5px 22px 5px 5px; -} -.step, th { - text-align:right; +h1 { + font-family: arial; + margin: 5px -4px 0 0; } -.submit input, .button, .button-secondary { - font-family: Tahoma; +ul, ol { padding: 5px 22px 5px 5px; } +.step, th { text-align: right; } +.submit input, .button, .button-secondary { + font-family: Tahoma, arial; margin-right:0; } .form-table th { - text-align:right; -} -h1 { - font-family:arial; - margin: 5px -4px 0 0; + text-align: right; } diff --git a/wp-admin/css/install.css b/wp-admin/css/install.css index cfa03253..6be5ba75 100644 --- a/wp-admin/css/install.css +++ b/wp-admin/css/install.css @@ -1,78 +1,83 @@ -html { background: #f1f1f1; } +html { background: #f7f7f7; } body { background: #fff; color: #333; - font-family: "Lucida Grande", "Lucida Sans Unicode", Tahoma, Verdana, sans-serif; + font-family: "Lucida Grande", Verdana, Arial, "Bitstream Vera Sans", sans-serif; margin: 2em auto 0 auto; width: 700px; padding: 1em 2em; - -moz-border-radius: 12px; - -khtml-border-radius: 12px; - -webkit-border-radius: 12px; - border-radius: 12px; + -moz-border-radius: 11px; + -khtml-border-radius: 11px; + -webkit-border-radius: 11px; + border-radius: 11px; + border: 1px solid #dfdfdf; } a { color: #2583ad; text-decoration: none; } a:hover { color: #d54e21; } - h1 { - font-size: 18px; - margin-bottom: 0; + border-bottom: 1px solid #dadada; + clear: both; + color: #666; + font: 24px Georgia, "Times New Roman", Times, serif; + margin: 5px 0 0 -4px; + padding: 0; + padding-bottom: 7px; } h2 { font-size: 16px; } p, li { padding-bottom: 2px; - font-size: 13px; + font-size: 12px; line-height: 18px; } -code { - font-size: 13px; -} +code { font-size: 13px; } ul, ol { padding: 5px 5px 5px 22px; } -#logo { margin: 6px 0 14px 0px; border-bottom: none;} +#logo { margin: 6px 0 14px 0; border-bottom: none;} .step { margin: 20px 0 15px; } -.step input { - font-size: 18px; -} - -a.button { - font-size: 18px; -} - .step, th { text-align: left; padding: 0; } .submit input, .button, .button-secondary { - font-family: "Lucida Grande", "Lucida Sans Unicode", Tahoma, Verdana, sans-serif; - padding: 5px 7px 7px; - border: 1px solid #a3a3a3; - margin-left: 0; - -moz-border-radius: 3px; - -khtml-border-radius: 3px; - -webkit-border-radius: 3px; - border-radius: 3px; - color: #246; - background: #e5e5e5; + font-family: "Lucida Grande", Verdana, Arial, "Bitstream Vera Sans", sans-serif; + text-decoration: none; + font-size: 14px !important; + line-height: 16px; + padding: 6px 12px; + cursor: pointer; + border: 1px solid #bbb; + color: #464646; + -moz-border-radius: 15px; + -khtml-border-radius: 15px; + -webkit-border-radius: 15px; + border-radius: 15px; + -moz-box-sizing: content-box; + -webkit-box-sizing: content-box; + -khtml-box-sizing: content-box; + box-sizing: content-box; +} + +.button:hover, .button-secondary:hover, .submit input:hover { + color: #000; + border-color: #666; } -.button-secondary { - background: #cee1ef; +.button, .submit input, .button-secondary { + background: #f2f2f2 url(../images/white-grad.png) repeat-x scroll left top; } -.submit input:hover, .button:hover, .button-secondary:hover { - color: #d54e21; - border-color: #535353; +.button:active, .submit input:active, .button-secondary:active { + background: #eee url(../images/white-grad-active.png) repeat-x scroll left top; } .form-table { @@ -98,7 +103,7 @@ a.button { } .form-table tr { - background: #eaf3fa; + background: #f3f3f3; } .form-table code { @@ -117,26 +122,12 @@ a.button { padding: 2px; } -h1 { - border-bottom: 1px solid #dadada; - clear: both; - color: #666666; - font: 24px Georgia, "Times New Roman", Times, serif; - margin: 5px 0 0 -4px; - padding: 0; - padding-bottom: 7px; -} - -#error-page { - margin-top: 50px; -} +#error-page { margin-top: 50px; } #error-page p { - font-size: 14px; - line-height: 16px; + font-size: 12px; + line-height: 18px; margin: 25px 0 20px; } -#error-page code { - font-size: 15px; -} \ No newline at end of file +#error-page code { font-family: Consolas, Monaco, Courier, monospace; } diff --git a/wp-admin/css/login-rtl.css b/wp-admin/css/login-rtl.css index daefbacb..4a5c5f0a 100644 --- a/wp-admin/css/login-rtl.css +++ b/wp-admin/css/login-rtl.css @@ -1,37 +1,30 @@ body { - font-family: Tahoma; + font-family: Tahoma, arial; } form { - margin-left:0; margin-right: 8px; + margin-left: 0; } form .forgetmenot { - float:right; + float: right; } -#login form .submit input { - font-family: Tahoma; -} -form .submit { - float:left; +#login form .submit input { + font-family: Tahoma, arial; } +form .submit { float: left; } #backtoblog a { - left:auto; - right:15px; + left: auto; + right: 15px; } #login_error, .message { margin: 0 8px 16px 0; } -#nav { - margin:0 8px 0 0; -} +#nav { margin: 0 8px 0 0; } #user_pass, #user_login, #user_email { - margin-right:0; margin-left: 6px; + margin-right: 0; + direction:ltr; } h1 a { - text-decoration:none; -} -/* ltr input */ -#user_login, #user_pass { - direction:ltr; + text-decoration: none; } diff --git a/wp-admin/css/login.css b/wp-admin/css/login.css index 92f10bca..9f806e79 100644 --- a/wp-admin/css/login.css +++ b/wp-admin/css/login.css @@ -3,35 +3,56 @@ body { border-top-width: 30px; border-top-style: solid; - font: 12px "Lucida Grande", "Lucida Sans Unicode", Tahoma, Verdana, sans-serif; + font: 11px "Lucida Grande", Verdana, Arial, "Bitstream Vera Sans", sans-serif; } form { margin-left: 8px; padding: 16px 16px 40px 16px; - font-weight: bold; - -moz-border-radius: 5px; - -khtml-border-radius: 5px; - -webkit-border-radius: 5px; + font-weight: normal; + -moz-border-radius: 11px; + -khtml-border-radius: 11px; + -webkit-border-radius: 11px; border-radius: 5px; + background: #fff; + border: 1px solid #e5e5e5; + -moz-box-shadow: rgba(200,200,200,1) 0 4px 18px; + -webkit-box-shadow: rgba(200,200,200,1) 0 4px 18px; + -khtml-box-shadow: rgba(200,200,200,1) 0 4px 18px; + box-shadow: rgba(200,200,200,1) 0 4px 18px; } -form .forgetmenot { font-weight: normal; float: left; margin-bottom: 0;} +form .forgetmenot { font-weight: normal; float: left; margin-bottom: 0; } #login form .submit input { - font-family: "Lucida Grande", "Lucida Sans Unicode", Tahoma, Verdana, sans-serif; - padding: 3px 5px; + font-family: "Lucida Grande", Verdana, Arial, "Bitstream Vera Sans", sans-serif; + padding: 3px 10px; border: none; - font-size: 13px; + font-size: 12px; border-width: 1px; border-style: solid; - -moz-border-radius: 3px; - -khtml-border-radius: 3px; - -webkit-border-radius: 3px; - border-radius: 3px; - cursor: default; - text-decoration: none; - margin-top: -6px; + -moz-border-radius: 11px; + -khtml-border-radius: 11px; + -webkit-border-radius: 11px; + border-radius: 11px; + cursor: pointer; + text-decoration: none; + margin-top: -3px; + text-shadow: rgba(0,0,0,0.3) 0 -1px 0; +} + +#login form p { + margin-bottom: 0; +} + +label { + color: #777; + font-size: 13px; +} + +form .forgetmenot label { + font-size: 11px; + line-height: 19px; } form .submit { float: right; } @@ -39,15 +60,19 @@ form .submit { float: right; } form p { margin-bottom: 24px; } h1 a { - background: url(../images/logo-login.gif) no-repeat; - width: 292px; - height: 66px; + background: url(../images/logo-login.gif) no-repeat top center; + width: 326px; + height: 67px; text-indent: -9999px; overflow: hidden; padding-bottom: 15px; display: block; } +#nav { + text-shadow: rgba(255,255,255,1) 0 1px 0; +} + #backtoblog a { position: absolute; top: 7px; @@ -55,20 +80,28 @@ h1 a { text-decoration: none; } -#login { width: 292px; margin: 7em auto; } +#login { width: 320px; margin: 7em auto; } #login_error, .message { margin: 0 0 16px 8px; border-width: 1px; border-style: solid; padding: 12px; + -moz-border-radius: 3px; + -khtml-border-radius: 3px; + -webkit-border-radius: 3px; + border-radius: 3px; } #nav { margin: 0 0 0 8px; padding: 16px; } #user_pass, #user_login, #user_email { - font-size: 20px; + font-size: 24px; width: 97%; padding: 3px; + margin-top: 2px; margin-right: 6px; -} \ No newline at end of file + margin-bottom: 16px; + border: 1px solid #e5e5e5; + background: #fbfbfb; +} diff --git a/wp-admin/css/media-rtl.css b/wp-admin/css/media-rtl.css index b23ad0e8..5aeab26f 100644 --- a/wp-admin/css/media-rtl.css +++ b/wp-admin/css/media-rtl.css @@ -1,66 +1,93 @@ body#media-upload ul#sidemenu { - left:auto; - right:0; - width: 620px; + left: auto; + right: 0; } #search-filter { - text-align:left; + text-align: left; } +/* specific to the image upload form */ .align .field label { padding: 0 28px 0 0; margin: 0 0 0 1em; } .image-align-none-label, .image-align-left-label, .image-align-center-label, .image-align-right-label { - background-position:center right; + background-position: center right; +} +tr.image-size div.image-size-item { + float: right; } tr.image-size label { - margin: 0 0 0 1em; + margin: 0 1em 0 0; } .filename.original { float: right; } .crunching { text-align: left; - margin-right:0; + margin-right: 0; margin-left: 5px; } button.dismiss { - right:auto; - left:5px; + right: auto; + left: 5px; } .file-error { margin: 0 50px 5px 0; } .progress { - left:auto; - right:0; + left: auto; + right: 0; +} +.describe td { + padding: 0 0 0 5px; } .bar { - border-right-width:0; + border-right-width: 0; border-left-width: 3px; + border-right-style: none; border-left-style: solid; } .media-item .pinkynail { - float:right; + float: right; } -.describe-toggle-on, .describe-toggle-off { +.describe-toggle-on, +.describe-toggle-off { float: left; - margin-right:0; + margin-right: 0; margin-left: 20px; } /* Specific to Uploader */ - #media-upload .media-upload-form p { margin: 0 0 1em 1em; } .filename { float: right; - margin-left:0; + margin-left: 0; margin-right: 10px; } #media-upload .describe th.label { - text-align:right; + text-align: right; } .menu_order { - float:left; + float: left; +} +.media-upload-form label.form-help, td.help, #media-upload p.help, #media-upload label.help { + font-family: Tahoma, Arial; +} +#gallery-settings #basic th.label { + padding: 5px 0 5px 5px; +} +#gallery-settings .title, h3.media-title { + font-family: Tahoma, Arial; +} +#gallery-settings .describe th.label { + text-align: right; +} +#gallery-settings label, +#gallery-settings legend { + margin-right: 0; + margin-left: 15px; +} +#gallery-settings .align .field label { + margin: 0 0 0 1.5em; } diff --git a/wp-admin/css/media.css b/wp-admin/css/media.css index d04866af..7c082700 100644 --- a/wp-admin/css/media.css +++ b/wp-admin/css/media.css @@ -29,17 +29,21 @@ form { text-align: right; } -.media-upload-form label, .media-upload-form legend { - display:block; +.media-upload-form label, +.media-upload-form legend { + display: block; font-weight: bold; font-size: 13px; margin-bottom: 0.5em; margin: 0 0 0.5em 0; } -th { position: relative; } +th { + position: relative; +} .media-upload-form label.form-help, td.help { + font-family: "Lucida Grande", "Bitstream Vera Sans", Verdana, Arial, sans-serif; font-style: italic; font-weight: normal; } @@ -63,6 +67,7 @@ th { position: relative; } padding: 0 0 0 28px; margin: 0 1em 0 0; } + .image-align-none-label { background: url(../images/align-none.png) no-repeat center left; } @@ -79,14 +84,21 @@ th { position: relative; } background: url(../images/align-right.png) no-repeat center left; } -#flash-upload-ui, .insert-gallery { - display: none; +tr.image-size td { + width: 460px; +} + +tr.image-size div.image-size-item { + float: left; + width: 25%; + margin: 0; } tr.image-size label { display: inline; - margin: 0 1em 0 0; + margin: 0 0 0 1em; } + .pinkynail { max-width: 40px; max-height: 40px; @@ -95,38 +107,49 @@ tr.image-size label { .filename.original { float: left; } + .crunching { display: block; line-height: 32px; text-align: right; margin-right: 5px; } + button.dismiss { position: absolute; - top: 5px; + top: 7px; right: 5px; z-index: 4; + width: 8em; } + .file-error { - margin: 0 0 5px 50px; + float: left; font-weight: bold; + padding: 10px; } .progress { position: absolute; - top: 0px; - left: 0px; + top: 0; + left: 0; width: 623px; height: 36px; } + .bar { - width: 0px; + width: 0; height: 100%; border-right-width: 3px; border-right-style: solid; } -#library-form .progress, #gallery-form .progress { +#library-form .progress, +#gallery-form .progress, +#flash-upload-ui, +.insert-gallery, +.describe.startopen, +.describe.startclosed { display: none; } @@ -134,6 +157,7 @@ button.dismiss { max-width: 128px; max-height: 128px; } + .media-item .pinkynail { float: left; margin: 2px; @@ -144,7 +168,9 @@ button.dismiss { thead.media-item-info tr { background-color: transparent; } -thead.media-item-info th, thead.media-item-info td { + +thead.media-item-info th, +thead.media-item-info td { border: none; margin: 0; } @@ -153,41 +179,46 @@ thead.media-item-info th, thead.media-item-info td { border: 8px solid #fff; } -.describe.startopen, .describe.startclosed { - display: none; -} abbr.required { text-decoration: none; border: none; } + .describe label { display: inline; } + .describe td { vertical-align: middle; + padding: 0 5px 0 0; } + .describe td.A1 { width: 132px; } -.describe input[type="text"], .describe textarea { + +.describe input[type="text"], +.describe textarea { width: 460px; + border-width: 1px; + border-style: solid; } -.describe-toggle-on, .describe-toggle-off { + +.describe-toggle-on, +.describe-toggle-off { display: block; line-height: 36px; float: right; margin-right: 20px; } + .describe-toggle-off { display: none; } -.clickmask { -} - .hidden { - height: 0px; - width: 0px; + height: 0; + width: 0; overflow: hidden; border: none; } @@ -202,13 +233,17 @@ abbr.required { padding: 1em 0; } -#media-upload p.help { +#media-upload p.help, +#media-upload label.help { + font-family: "Lucida Grande", "Bitstream Vera Sans", Verdana, Arial, sans-serif; font-style: italic; font-weight: normal; } + #media-upload tr.image-size td.field { text-align: center; } + #media-upload #media-items { border-width: 1px; border-style: solid; @@ -235,21 +270,29 @@ abbr.required { overflow: hidden; max-width: 430px; } + #media-upload .describe { - border-top-width: 1px; - border-top-style: solid; padding: 5px; width: 100%; clear: both; cursor: default; } + +#media-upload .slidetoggle { + border-top-width: 1px; + border-top-style: solid; +} + #media-upload .describe th.label { padding-top: .5em; text-align: left; + min-width: 120px; } + #media-upload tr.align td.field { text-align: center; } + #media-upload tr.image-size { margin-bottom: 1em; height: 3em; @@ -264,10 +307,11 @@ abbr.required { } #filter .tablenav select { - border-style:solid; - border-width:1px; - padding:2px; - vertical-align:top; + border-style: solid; + border-width: 1px; + padding: 2px; + vertical-align: top; + width: auto; } #media-upload a.delete, @@ -287,7 +331,7 @@ abbr.required { } .menu_order_input { - border: 1px solid #DDDDDD; + border: 1px solid #ddd; font-size: 10px; padding: 1px; width: 23px; @@ -301,8 +345,8 @@ abbr.required { } #media-upload th.order-head { - width: 25%; - text-align: center; + width: 25%; + text-align: center; } #media-upload .widefat { @@ -313,3 +357,70 @@ abbr.required { .sorthelper { z-index: -1; } + +#gallery-settings th.label { + width: 160px; +} + +#gallery-settings #basic th.label { + padding: 5px 5px 5px 0; +} + +#gallery-settings .title { + clear: both; + padding: 0 0 3px; + border-bottom-style: solid; + border-bottom-width: 1px; + font-family: Georgia,"Times New Roman",Times,serif; + font-size: 1.6em; + border-bottom-color: #DADADA; + color: #5A5A5A; +} + +h3.media-title { + color: #5A5A5A; + font-family: Georgia,"Times New Roman",Times,serif; + font-size: 1.6em; + font-weight: normal; +} + +#gallery-settings .describe td { + vertical-align: middle; + height: 3.5em; +} + +#gallery-settings .describe th.label { + padding-top: .5em; + text-align: left; +} + +#gallery-settings .describe { + padding: 5px; + width: 615px; + clear: both; + cursor: default; +} + +#gallery-settings .describe select { + width: 15em; + border: 1px solid #dfdfdf; +} + +#gallery-settings label, +#gallery-settings legend { + font-size: 13px; + color: #464646; + margin-right: 15px; +} + +#gallery-settings .align .field label { + margin: 0 1.5em 0 0; +} + +#gallery-settings p.ml-submit { + border-top: 1px solid #dfdfdf; +} + +#gallery-settings select#columns { + width: 6em; +} diff --git a/wp-admin/css/plugin-install-rtl.css b/wp-admin/css/plugin-install-rtl.css new file mode 100644 index 00000000..9a6dd11d --- /dev/null +++ b/wp-admin/css/plugin-install-rtl.css @@ -0,0 +1,43 @@ +div.star { + left: auto; + right: 0; + letter-spacing: 0; +} +.star img, div.star a, div.star a:hover, div.star a:visited { + right: auto; + left: 0; +} +#plugin-information ul#sidemenu { + left: auto; + right: 0; +} +#plugin-information h2 { + margin-right: 0; + margin-left: 200px; +} +#plugin-information .fyi { + margin-left: 5px; + margin-right: 20px; +} +#plugin-information .fyi h2 { + margin-left: 0; +} +#plugin-information .fyi ul { + padding: 10px 7px 10px 5px; +} +#plugin-information #section-screenshots li p { + padding-left: 0; + padding-right: 20px; +} +#plugin-information .updated, +#plugin-information pre { + margin-right: 0; + margin-left: 215px; +} +#plugin-information .updated, #plugin-information .error { + clear: none; + direction: rtl; +} +#section-description { + direction: ltr; +} diff --git a/wp-admin/css/plugin-install.css b/wp-admin/css/plugin-install.css new file mode 100644 index 00000000..2441840b --- /dev/null +++ b/wp-admin/css/plugin-install.css @@ -0,0 +1,149 @@ +/* NOTE: the following CSS rules(.star*) are taken more or less straight from the bbPress rating plugin. */ +div.star-holder { + position: relative; + height: 19px; + width: 100px; + font-size: 19px; +} + +div.star { + height: 100%; + position: absolute; + top: 0; + left: 0; + background-color: transparent; + letter-spacing: 1ex; + border: none; +} + +.star1 { width: 20%; } +.star2 { width: 40%; } +.star3 { width: 60%; } +.star4 { width: 80%; } +.star5 { width: 100%; } + +.star img, div.star a, div.star a:hover, div.star a:visited { + display: block; + position: absolute; + right: 0; + border: none; + text-decoration: none; +} + +div.star img { + width: 19px; + height: 19px; + border-left: 1px solid #fff; + border-right: 1px solid #fff; +} + +/* Start custom CSS */ +/* Header on thickbox */ +#plugin-information-header { + margin: 0; + padding: 0 5px; + font-weight: bold; + position: relative; + border-bottom-width: 1px; + border-bottom-style: solid; + height: 2.5em; +} +#plugin-information ul#sidemenu { + font-weight: normal; + margin: 0 5px; + position: absolute; + left: 0; + bottom: -1px; +} + +/* Install sidemenu */ +#plugin-information p.action-button { + width: 100%; + padding-bottom: 0; + margin-bottom: 0; + margin-top: 10px; + -moz-border-radius: 3px 0 0 3px; + -webkit-border-top-left-radius: 3px; + -khtml-border-top-left-radius: 3px; + border-top-left-radius: 3px; + -webkit-border-bottom-left-radius: 3px; + -khtml-border-bottom-left-radius: 3px; + border-top-bottom-radius: 3px; +} + +#plugin-information .action-button a { + text-align: center; + font-weight: bold; + text-decoration: none; + display: block; + line-height: 2em; +} + +#plugin-information h2 { + clear: none !important; + margin-right: 200px; +} + +#plugin-information .fyi { + margin-left: 10px; + margin-bottom: 50px; + width: 210px; +} + +#plugin-information .fyi h2 { + font-size: 0.9em; + margin-bottom: 0; + margin-right: 0; +} + +#plugin-information .fyi h2.mainheader { + padding: 5px; + -moz-border-radius-topleft: 3px; + -webkit-border-top-left-radius: 3px; + -khtml-border-top-left-radius: 3px; + border-top-left-radius: 3px; +} + +#plugin-information .fyi ul { + padding: 10px 5px 10px 7px; + margin: 0; + list-style: none; + -moz-border-radius-bottomleft: 3px; + -webkit-border-bottom-left-radius: 3px; + -khtml-border-bottom-left-radius: 3px; + border-top-bottom-radius: 3px; +} + +#plugin-information .fyi li { + margin-right: 0; +} + +#plugin-information #section-holder { + padding: 10px; +} + +#plugin-information .section ul, +#plugin-information .section ol { + margin-left: 16px; + list-style-type: square; + list-style-image: none; +} + +#plugin-information #section-screenshots li img { + vertical-align: text-top; +} + +#plugin-information #section-screenshots li p { + font-style: italic; + padding-left: 20px; + padding-bottom: 2em; +} + +#plugin-information .updated, +#plugin-information pre { + margin-right: 215px; +} + +#plugin-information pre { + padding: 7px; +} \ No newline at end of file diff --git a/wp-admin/css/press-this-ie-rtl.css b/wp-admin/css/press-this-ie-rtl.css deleted file mode 100644 index 912e0e29..00000000 --- a/wp-admin/css/press-this-ie-rtl.css +++ /dev/null @@ -1,3 +0,0 @@ -.ui-tabs-nav { - margin-right: 0; -} diff --git a/wp-admin/css/press-this-ie.css b/wp-admin/css/press-this-ie.css deleted file mode 100644 index e9667c1c..00000000 --- a/wp-admin/css/press-this-ie.css +++ /dev/null @@ -1,7 +0,0 @@ -#posting { - position: static !important; -} - .ui-tabs-nav { - margin-left: 0; - border: 0 !important; -} diff --git a/wp-admin/css/press-this-rtl.css b/wp-admin/css/press-this-rtl.css index f75d7ec4..b15e8455 100644 --- a/wp-admin/css/press-this-rtl.css +++ b/wp-admin/css/press-this-rtl.css @@ -1,98 +1,106 @@ body { - font-family: Tahoma; + font-family: Tahoma, Arial; } -.ui-tabs-nav { - padding-left:0; - padding-right:8px; -} -.ui-tabs-nav li { +#poststuff #edButtonPreview, +#poststuff #edButtonHTML { + margin: 0px 0 0 5px; float: right; } -.button { - font-family: Tahoma; - margin-left:0; - margin-right: 5px; +/* Editor/Main Column */ +div#poststuff { + padding-left: 0; + padding-right: 10px; } -#wphead #viewsite { - margin-left:0; - margin-right: 10px; +.posting { + margin-right: 0; + margin-left: 228px; + left:auto; + right: 0; } -#viewsite { - right:auto; - left: 8px; +#side-info-column { + float: left; + right: auto; + left: 0; + margin-right: 0; + margin-left: 10px; } -#wphead #viewsite a { - font-family: Tahoma; +#side-info-column .sleeve { + padding-left: 0; + padding-right: 10px; } -h1 { - right:auto; - left:0; +h3.tb { + margin-left: 0; + margin-right: 5px; } -div#posting { - padding-left:0; - padding-right: 16px; +#actions { + float: left; } -#photo_directions span { - right:auto; - left:3px; +#extra_fields #actions { + right: auto; + left: 4px; } -#img_container a { - float:right; +#actions li { + float: right; + margin-right: 0; + margin-left: 10px; +} +#extra_fields .button { + margin-right: 0; + margin-left: 5px; } -#img_container a, #img_container a:link, #img_container a:visited { - margin:0 0 4px 4px; +/* Photo Styles */ +#img_container a { + float: right; } -div#categories { - right:auto; - left:16px; +#category-add input, #category-add select { + font-family: Tahoma, Arial; } -div#categories h2 { - margin: .5em 1em .5em 0; +#categorydiv ul.categorychecklist ul { + margin-left: 0; + margin-right: 18px; } +/* Tags */ #tagsdiv #newtag { - margin-right:0; - margin-left: 5px; -} -#jaxtag { - padding-left:0; - padding-right: 1em; + margin-right: 0; + margin-left: 5px; } -#tagchecklist { - padding-left:0; - padding-right: 1em; +#tagadd { + margin-left: 0; + margin-right: 3px; } #tagchecklist span { - margin-right: 10px; margin-left: .5em; + margin-right: 10px; float: right; } #tagchecklist span a { - margin: 6px -9px 0pt 0; + margin: 6px -9px 0 0; float: right; } -.submitbox { - float: left; -} -.submitbox .submit input { - text-align:right; +#content { + margin-left: 0; + margin-right: 1%; } -.video_split #extra_fields { - float:right; -} -.video_split .editor_area { - float: left; +.submit input, +.button, +.button-primary, +.button-secondary, +.button-highlighted, +#postcustomstuff .submit input { + font-family: tahoma; } .ac_results li { - text-align:right; + text-align: right; } #TB_ajaxContent #options { - right:auto; - left:25px; + right: auto; + left: 25px; } #post_status { - margin-left:0; + margin-left: 0; margin-right: 10px; } +/* Footer */ #footer { padding: 10px 60px 0 0; } diff --git a/wp-admin/css/press-this.css b/wp-admin/css/press-this.css index daf60baf..6a4fbc1c 100644 --- a/wp-admin/css/press-this.css +++ b/wp-admin/css/press-this.css @@ -1,235 +1,238 @@ body { - font: 13px "Lucida Grande", "Lucida Sans Unicode", Tahoma, Verdana, sans-serif; + font: 13px "Lucida Grande", "Bitstream Vera Sans", Verdana, Arial, sans-serif; color: #333; - margin: 0px; - padding: 0px; + margin: 0; + padding: 0; } -img { border: 0; } -/* Tabs */ -@media projection , screen { - .ui-tabs-hide { - display: none; - } +img { + border: none; } -@media print { - .ui-tabs-nav { - display: none; - } +/* Header */ +#wphead { + border-top: none; + padding-top: 4px; + background: #444 !important; } -.ui-tabs-nav { - list-style: none; - border-bottom: 1px solid #C6D9E9; - padding-left: 8px; - margin-bottom: .5em; - margin-top: -2em; +#poststuff #edButtonPreview, +#poststuff #edButtonHTML { + -moz-border-radius-bottomleft: 0; + -moz-border-radius-bottomright: 0; + -moz-border-radius-topleft: 3px; + -moz-border-radius-topright: 3px; + -khtml-border-radius-bottomleft: 0; + -khtml-border-radius-bottomright: 0; + -khtml-border-radius-topleft: 3px; + -khtml-border-radius-topright: 3px; + -webkit-border-radius-bottomleft: 0; + -webkit-border-radius-bottomright: 0; + -webkit-border-radius-topleft: 3px; + -webkit-border-radius-topright: 3px; + border-radius-bottomleft: 0; + border-radius-bottomright: 0; + border-radius-topleft: 3px; + border-radius-topright: 3px; + border-style: solid; + border-width: 1px; + cursor: pointer; + display: block; + height: 18px; + margin: 0px 5px 0 0; + padding: 0px 5px 0px; + background-color: #E9E9E9; + border-bottom-color: #E9E9E9; + color: #333333; + font-size: 10px; + line-height: 18px; + float: left; } -/* Additional IE specific bug fixes... */ -* html .ui-tabs-nav { /* auto clear, @ IE 6 & IE 7 Quirks Mode */ - display: inline-block; +.howto { + margin-top: 2px; + margin-bottom: 3px; + font-size: 11px; + font-style: italic; + display: block; } -* :first-child+html .ui-tabs-nav { - /* @ IE 7 Standards Mode - do not group selectors, otherwise IE 6 will ignore complete rule (because of the unknown + combinator)... */ - display: inline-block; +input.text { + outline-color: -moz-use-text-color; + outline-style: none; + outline-width: medium; + width: 100%; } -.ui-tabs-nav:after { - /* clearing without presentational markup, IE gets extra treatment */ - display: block; - clear: both; - content: " "; +#message { + -moz-border-radius: 6px; + -khtml-border-radius: 6px; + -webkit-border-radius: 6px; + border-radius: 6px; } -.ui-tabs-nav li { - float: left; - margin: 0; - height: 2em; - line-height: 2em; +/* Editor/Main Column */ +div#poststuff { + padding-left: 10px; + margin-top: 10px; } -.ui-tabs-nav a,.ui-tabs-nav a span { - display: block; +div.zerosize { + border: 0 none; + height: 0; + margin: 0; + overflow: hidden; + padding: 0; + position: absolute; + width: 0; } -.ui-tabs-nav a { - margin: 1px 0 0; - /* position: relative makes opacity fail for disabled tab in IE */ - padding-left: 0; - color: #27537a; - font-weight: bold; - line-height: 2em; - text-align: center; - text-decoration: none; - white-space: nowrap; /* required in IE 6 */ - outline: 0; /* prevent dotted border in Firefox */ - padding: 0 1em; +#poststuff #edButtonPreview.active, +#poststuff #edButtonHTML.active { + display: none; } -.ui-tabs-nav .ui-tabs-selected a { +.posting { + margin-right: 228px; position: relative; - top: 1px; - z-index: 2; - margin-top: 0; - -moz-border-radius-topleft: 4px; - -moz-border-radius-topright: 4px; - -webkit-border-top-left-radius: 4px; - -webkit-border-top-right-radius: 4px; - border-style: solid; - border-width: 1px; - background: white; - border-bottom-width: 2px; - margin-top: -2px; + left: 0; } -.ui-tabs-nav a:hover,.ui-tabs-nav a:focus,.ui-tabs-nav a:active, -.ui-tabs-nav .ui-tabs-selected a:link,.ui-tabs-nav .ui-tabs-selected a:visited { - cursor: pointer; +#side-info-column { + float: right; + width: 218px; + position: absolute; + right: 0; + margin-right: 10px; } -/* Header */ -#wphead { - border-top: none; - height: 2em; - padding-top: 8px; +#side-info-column .sleeve { + padding-left: 10px; } -.button { - font-family: "Lucida Grande", "Lucida Sans Unicode", Tahoma, Verdana, sans-serif; - padding: 3px 5px; - font-size: 12px; - line-height: 1.5em; - border-width: 1px; - border-style: solid; - -moz-border-radius: 3px; - -khtml-border-radius: 3px; - -webkit-border-radius: 3px; - border-radius: 3px; - cursor: pointer; - margin-left: 5px; - text-decoration: none; +#poststuff .inside { + font-size: 11px; + margin: 0 12px 12px; } -.howto { - font-size: 11px; - font-style: italic; - display: block; +#poststuff h2, #poststuff h3 { + font-size: 14px; + font-weight: bold; + padding: 7px; + margin: 0 0 10px; + background: #dfdfdf url("../images/gray-grad.png") repeat-x left top; + font-size: 12px; + font-weight: bold; + line-height: 1; + margin: 0 0 10px; + padding: 7px 9px; + text-shadow: 0 1px 0 #FFFFFF; } -#wphead #viewsite { - position: absolute; - margin-top: 12px; - margin-left: 10px; +h3.tb { + text-shadow: 0 1px 0 #FFFFFF; + font-weight: bold; + font-size: 12px; + margin-left: 5px; } -#viewsite { - position: relative; - right: 8px; - top: 6px; - margin: 0 !important; +#TB_window { + border: 1px solid #333; + -moz-border-radius: 6px; + -khtml-border-radius: 6px; + -webkit-border-radius: 6px; + border-radius: 6px; } -#wphead #viewsite a { - font: 12px "Lucida Grande", "Lucida Sans Unicode", Tahoma, Verdana, sans-serif; - padding: 3px 4px; - display: block; - letter-spacing: normal; +.metabox-holder .postbox, +.postbox, +.stuffbox { + margin-bottom: 10px; border-width: 1px; border-style: solid; - -moz-border-radius: 3px; - -khtml-border-radius: 3px; - -webkit-border-radius: 3px; - border-radius: 3px; - text-decoration: none; + line-height: 1; + -moz-border-radius: 6px; + -khtml-border-radius: 6px; + -webkit-border-radius: 6px; + border-radius: 6px; + border-color: #DFDFDF; } -#previewview { - padding-top: 8px !important; - padding-bottom: 8px !important; -} - -h1 { - font-size: .75em; - line-height: 2.666em; - top: .5em; - right: 0; - margin: 0 !important; - padding: 0 !important; - width: 236px; - background: none; +.titlediv { + border-color: #DFDFDF; } -input.text { - border: 0pt none; - outline-color: -moz-use-text-color; - outline-style: none; - outline-width: medium; - padding: 0pt; - width: 100%; +#title, .tbtitle { + -moz-border-radius: 6px; + -khtml-border-radius: 6px; + -webkit-border-radius: 6px; + border-radius: 6px; border-style: solid; - color: #333333; -} - -/* Editor/Main Column */ - -div#container { - margin: 0; - min-width: 500px; + border-width: 1px; + font-size: 1.7em; + outline: none; + padding: 3px 4px; + border-color: #DFDFDF; } -div#container form { - margin: 0px; - padding: 0px; +.tbtitle { + font-size: 12px; + padding: 3px; } -div#posting { - padding-left: 16px; - position: absolute; - z-index: 1; - width: 66%; +#title { + width: 98%; } -#post_title { - width: 99%; +.postbox h2 { + background-image: url(../images/postbox-bg.gif); + background-position: left top; + background-repeat: repeat-x; + background-color: #DFDFDF; } -.titlewrap { +.editor-container { + -moz-border-radius: 6px; + -khtml-border-radius: 6px; + -webkit-border-radius: 6px; + border-radius: 6px; + border-collapse: separate; border-style: solid; border-width: 1px; - padding: 2px 3px; - border-color: #CCCCCC; + border-color: #DFDFDF; } -div#posting h2 { - margin: .5em 0 .25em 0; - font-size: 12px; - padding: 3px; - background: ; +.postdivrich { + position: relative; + padding-top: 25px; } -.editor-container { - border-width: 1px; - border-color: #ccc; - border-style: solid; - margin-bottom: 1em; +#actions { + clear: both; + float: right; + margin-top: -19px; + position: relative; +} +#extra_fields #actions { + clear: both; + position: absolute; + right: 4px; + top: 6px; + margin: 0; } -/* Photo Styles */ - -#photo_directions { - margin-top: .25em; - display: block; - position: relative; +#actions li { + float: left; + list-style: none; + margin-right: 10px; +} +#extra_fields .button { + margin-right: 5px; } -#photo_directions span { - display: block; - position: absolute; - top: 0; - right: 3px; +/* Photo Styles */ +.photolist { + margin-top: -10px; } #photo_saving { @@ -239,77 +242,162 @@ div#posting h2 { #img_container { background-color: #fff; + height: 101px; + width: 100%; +} + +#extra_fields { + margin-top: 10px; + position: relative; +} + +#extra_fields .postbox { + margin-bottom: 5px; +} + +#extra_fields .titlewrap { + padding: 0; overflow: auto; height: 100px; } +#img_container { + position: relative; +} + #img_container a { display: block; - width: 79px; - height: 79px; float: left; + overflow: hidden; + vertical-align: center; +} + +#img_container img, #img_container a { + width: 68px; + height: 68px; } #img_container img { - width: 75px; - height: 75px; - border: 0px; - padding: 2px; + width: 68px; + height: 68px; + border: none; background-color: #f4f4f4; cursor: pointer; } -#img_container a, #img_container a:link, #img_container a:visited { - border: 2px solid #ccc; - margin: 0 4px 4px 0; -} -#img_container a:hover, #img_container a:active { - border: 2px solid #000; + +#img_container a, +#img_container a:link, +#img_container a:visited { + border: 1px solid #ccc; + display: block; + position: relative; +} + +#img_container a:hover, +#img_container a:active { + border-color: #000; + z-index: 1000; + border-width: 2px; + margin: -1px; +} + +/* Video */ +#embed-code { + width: 100%; + height: 98px; } /* Submit Column */ +#viewsite { + padding: 0; + margin: 0 0 20px 0; + font-size: 10px; + clear: both; +} -div#categories { - font-size: 85%; - position: absolute; - top: 50px; - right: 16px; - width: 27%; - z-index: 2; +#viewsite .button { + margin: 0 0 0px 0; + display: block; } -div#categories h2 { - color: #333; +.wp-hidden-children .wp-hidden-child { + display: none; +} + +#category-adder { + padding: 4px 0; +} + +#category-adder h4 { + margin: 0 0 8px; +} + +#category-add input { + width: 94%; + font-family: Verdana, Arial, Helvetica, sans-serif; + font-size: 13px; + margin: 1px; + padding: 3px; +} + +#category-add select { + width: 70%; + -x-system-font: none; + border-style: solid; + border-width: 1px; + font-family: "Lucida Grande", "Bitstream Vera Sans", Verdana, Arial, sans-serif; font-size: 12px; - margin: .5em 0 .5em 1em; - padding: 0; + height: 2em; + line-height: 20px; + padding: 2px; + margin: 1px; + vertical-align: top; } -#categories-all { - overflow: auto; - padding: 0 1em 1em 1em; - height: 15em; +#category-add input#category-add-sumbit { + width: auto; } -#categories ul { +/* Categories */ +#categorydiv ul, #linkcategorydiv ul { list-style: none; padding: 0; margin: 0; } +#categorydiv ul.categorychecklist ul { + margin-left: 18px; +} + +#categorydiv div.ui-tabs-panel { + height: 150px; + overflow: auto; +} + +ul.categorychecklist li { + margin: 0; + padding: 0; + line-height: 19px; +} + +/* Tags */ #tagsdiv #newtag { padding: 3px; margin-right: 5px; - width: 16em; + width: 16em; } #jaxtag { clear: both; - padding-left: 1em; margin: 0; } +#tagadd { + margin-left: 3px; +} + #tagchecklist { - padding-left: 1em; + margin-top: 3px; margin-bottom: 1em; font-size: 12px; overflow: auto; @@ -332,7 +420,7 @@ div#categories h2 { } #tagchecklist span a { - margin: 6px 0pt 0pt -9px; + margin: 6px 0 0 -9px; cursor: pointer; width: 10px; height: 10px; @@ -342,68 +430,44 @@ div#categories h2 { overflow: hidden; position: absolute; } -.submit { - -moz-border-radius-bottomleft: 3px; - -khtml-border-bottom-left-radius: 3px; - -webkit-border-bottom-left-radius: 3px; - border-bottom-left-radius: 3px; - -moz-border-radius-bottomright: 3px; - -khtml-border-bottom-right-radius: 3px; - -webkit-border-bottom-right-radius: 3px; - border-bottom-right-radius: 3px; - margin: 0; - padding: 10px; -} -.submitbox { - width: 100%; - float: right; -} -.submitbox .submit a:hover { - border-bottom-width: 1px; - border-bottom-style: solid; +#content { + width: 96% !important; + margin-left: 1%; + margin-bottom: 10px; + border: 1px solid #f1f1f1; } -.submitbox .submit input { - border: none; - text-align: left; - padding: 6px 4px; - font-size: 12px; - margin: 2px; - -moz-border-radius: 3px; - -khtml-border-radius: 3px; - -webkit-border-radius: 3px; - border-radius: 3px; - cursor: pointer; -} +/* Submit */ -.submitbox #previewview { - padding: 15px 10px; - -moz-border-radius-topleft: 3px; - -khtml-border-top-left-radius: 3px; - -webkit-border-top-left-radius: 3px; - border-top-left-radius: 3px; - -moz-border-radius-topright: 3px; - -khtml-border-top-right-radius: 3px; - -webkit-border-top-right-radius: 3px; - border-top-right-radius: 3px; +#saving { + display: inline; } -/* Video Styles */ -.video_split #extra_fields { - width: 27%; - height: 300px; - float: left; +.submit input, +.button, +.button-primary, +.button-secondary, +.button-highlighted, +#postcustomstuff .submit input { + font-family: "Lucida Grande", "Bitstream Vera Sans", Verdana, Arial, sans-serif; + text-decoration: none; + font-size: 11px !important; + line-height: 16px; + padding: 2px 8px; + cursor: pointer; + border-width: 1px; + border-style: solid; + -moz-border-radius: 11px; + -khtml-border-radius: 11px; + -webkit-border-radius: 11px; + border-radius: 11px; } -#embed_code { - border: 0; - width: 99%; - height: 200px; -} -.video_split .editor_area { - width: 70%; - float: right; +.button-primary { + background: #21759B url(../images/button-grad.png) repeat-x scroll left top; + border-color: #21759B; + color: #FFFFFF; } .ac_results { @@ -431,45 +495,32 @@ div#categories h2 { text-decoration: underline; } -.photolist { - display: none; -} - -#extra_fields small { - display: block; - margin-top: .5em; - padding-bottom: .25em; -} - #TB_ajaxContent #options { position: absolute; top: 20px; right: 25px; padding: 5px; } + #TB_ajaxContent h3 { margin-bottom: .25em; } .updated { - margin: 0; - margin-left: 15px; - margin-right: 15px; + margin: 10px 0; padding: 0; - max-width: 980px; border-width: 1px; border-style: solid; - padding: 0 0.6em; - max-width: 950px; - margin-top: 1em; - margin-bottom: 1em; + width: 99%; } -.updated p, .error p { +.updated p, +.error p { margin: 0.6em 0; + padding: 0 0.6em; } -.updated a, .error a { +.error a { text-decoration: underline; } @@ -485,7 +536,6 @@ div#categories h2 { } /* Footer */ - #footer { height: 65px; display: block; @@ -505,12 +555,10 @@ div#categories h2 { #footer p a { text-decoration: none; } - #footer p a:hover { text-decoration: underline; } - /* Utility Classes */ .centered { text-align: center; @@ -518,4 +566,4 @@ div#categories h2 { .hidden { display: none; -} \ No newline at end of file +} diff --git a/wp-admin/css/theme-editor-rtl.css b/wp-admin/css/theme-editor-rtl.css index 7b9f31bb..d06a26c0 100644 --- a/wp-admin/css/theme-editor-rtl.css +++ b/wp-admin/css/theme-editor-rtl.css @@ -1,15 +1,12 @@ -#template textarea { - font-family:monospace; -} #templateside { - float:left; + float: left; } #themeselector { - padding-right:0; + padding-right: 0; padding-left: 5px; float: left; } div.tablenav { - margin-right:0; + margin-right: 0; margin-left: 210px; } diff --git a/wp-admin/css/theme-editor.css b/wp-admin/css/theme-editor.css index 2c59e97b..486f5c19 100644 --- a/wp-admin/css/theme-editor.css +++ b/wp-admin/css/theme-editor.css @@ -1,5 +1,5 @@ #template textarea { - font-family: 'Courier New', Courier, monospace; + font-family: Consolas, Monaco, Courier, monospace; font-size: 12px; width: 97%; } @@ -11,7 +11,6 @@ #templateside { float: right; width: 190px; - margin-top:-3.4em; } #templateside h3, #postcustomstuff p.submit { @@ -23,7 +22,7 @@ h3#bordertitle { } #templateside h4 { - margin-bottom: 0px; + margin-bottom: 0; } #templateside ol, #templateside ul { @@ -33,7 +32,7 @@ h3#bordertitle { } #templateside ol li, #templateside ul li { - margin: 1px 0px; + margin: 1px 0; } #themeselector { @@ -41,6 +40,7 @@ h3#bordertitle { float: right; position: relative; bottom: 25px; + top:20px; } #themeselector select { @@ -58,7 +58,7 @@ h3#bordertitle { div.bordertitle h2 { border: none; - padding-bottom: 0px; + padding-bottom: 0; } div.tablenav { diff --git a/wp-admin/css/upload-rtl.css b/wp-admin/css/upload-rtl.css deleted file mode 100644 index dc13a4b9..00000000 --- a/wp-admin/css/upload-rtl.css +++ /dev/null @@ -1,12 +0,0 @@ -html { - direction: ltr; - } -#uploadoptions, table { - direction: rtl; - } -td { - padding: 1px 6px 0; - } -.submit { - text-align: left; - } \ No newline at end of file diff --git a/wp-admin/css/widgets-rtl.css b/wp-admin/css/widgets-rtl.css index 70838cd4..8d0fc3aa 100644 --- a/wp-admin/css/widgets-rtl.css +++ b/wp-admin/css/widgets-rtl.css @@ -1,45 +1,27 @@ -/* 2 column liquid layout */ -div.widget-liquid-left-holder { - float: right; - clear: right; - margin-right:0; - margin-left: -310px; -} -div.widget-liquid-left { - margin-right:0; - margin-left: 320px; -} -div.widget-liquid-right { - float: left; - clear: left; -} -p#widget-search { - right:auto; - left:0; -} h4.widget-title span { float: right; } h4.widget-title a { float: left; - margin-left:0; + margin-left: 0; margin-right: 1em; } ul#widget-list li.widget-list-item h4.widget-title { - float:right; + float: right; } ul#widget-list li.widget-list-item div.widget-description { margin: 0 200px 0 0; padding: 0 4em 0 0; } -.widget-control-save, .widget-control-remove { - margin-right:0; +.widget-control-save, +.widget-control-remove { + margin-right: 0; margin-left: 8px; float: right; } li.widget-list-control-item h4.widget-title a, #dragHelper li.widget-list-control-item h4.widget-title a, #draghelper li.widget-list-control-item h4.widget-title a:visited { - right:auto; + right: auto; left: 1em; } diff --git a/wp-admin/css/widgets.css b/wp-admin/css/widgets.css index f21f22a1..41db0b33 100644 --- a/wp-admin/css/widgets.css +++ b/wp-admin/css/widgets.css @@ -27,13 +27,6 @@ div#available-widgets-filter { border-bottom-style: solid; } -p#widget-search { - position: absolute; - right: 0; - top: 0; - margin: 0; -} - ul#widget-list { list-style: none; margin: 0; @@ -112,8 +105,8 @@ li.widget-list-control-item { border-radius: 3px; } -li.widget-list-control-item h4, -#dragHelper li.widget-list-control-item h4, +li.widget-list-control-item h4, +#dragHelper li.widget-list-control-item h4, li.widget-sortable h4 { margin: 0; cursor: move; @@ -126,12 +119,8 @@ li.widget-sortable h4 { border-radius: 3px; } -.widget-control-save, .widget-control-remove { - padding: 3px 5px; - -moz-border-radius: 3px; - -khtml-border-radius: 3px; - -webkit-border-radius: 3px; - border-radius: 3px; +.widget-control-save, +.widget-control-remove { margin-right: 8px; float: left; text-decoration: none; @@ -149,6 +138,8 @@ li.widget-list-control-item h4.widget-title a:hover { } li.widget-list-control-item div.widget-control { + border-width: 0 1px 1px; + border-style: none solid solid; display: none; padding: 15px; font-size: 11px; @@ -161,8 +152,6 @@ li.widget-list-control-item div.widget-control p { } ul.widget-control-list div.widget-control-actions { - border-top-width: 1px; - border-top-style: solid; padding: 0.5em 0 0; } @@ -173,7 +162,7 @@ ul.widget-control-list div.widget-control-actions { div#current-widgets { padding-top: 1em; - border-width: 1px; + border-width: 1px 0 0; border-style: solid none none; } diff --git a/wp-admin/custom-header.php b/wp-admin/custom-header.php index b1f583d1..bd78e8a9 100644 --- a/wp-admin/custom-header.php +++ b/wp-admin/custom-header.php @@ -1,36 +1,105 @@ admin_header_callback = $admin_header_callback; } + /** + * Setup the hooks for the Custom Header admin page. + * + * @since unknown + */ function init() { $page = add_theme_page(__('Custom Image Header'), __('Custom Image Header'), 'edit_themes', 'custom-header', array(&$this, 'admin_page')); add_action("admin_print_scripts-$page", array(&$this, 'js_includes')); + add_action("admin_print_styles-$page", array(&$this, 'css_includes')); add_action("admin_head-$page", array(&$this, 'take_action'), 50); add_action("admin_head-$page", array(&$this, 'js'), 50); add_action("admin_head-$page", $this->admin_header_callback, 51); } + /** + * Get the current step. + * + * @since unknown + * + * @return int Current step + */ function step() { - $step = (int) @$_GET['step']; + if ( ! isset( $_GET['step'] ) ) + return 1; + + $step = (int) $_GET['step']; if ( $step < 1 || 3 < $step ) $step = 1; + return $step; } + /** + * Setup the enqueue for the JavaScript files. + * + * @since unknown + */ function js_includes() { $step = $this->step(); + if ( 1 == $step ) - wp_enqueue_script('colorpicker'); - elseif ( 2 == $step ) + wp_enqueue_script('farbtastic'); + elseif ( 2 == $step ) wp_enqueue_script('cropper'); } + /** + * Setup the enqueue for the CSS files + * + * @since 2.7 + */ + function css_includes() { + $step = $this->step(); + + if ( 1 == $step ) { + wp_enqueue_style('farbtastic'); + } + } + + /** + * Execute custom header modification. + * + * @since unknown + */ function take_action() { if ( isset( $_POST['textcolor'] ) ) { check_admin_referer('custom-header'); @@ -48,6 +117,11 @@ class Custom_Image_Header { } } + /** + * Execute Javascript depending on step. + * + * @since unknown + */ function js() { $step = $this->step(); if ( 1 == $step ) @@ -56,123 +130,134 @@ class Custom_Image_Header { $this->js_2(); } + /** + * Display Javascript based on Step 1. + * + * @since unknown + */ function js_1() { ?>
    @@ -181,6 +266,7 @@ Event.observe( window, 'load', hide_text );
    +

    @@ -191,12 +277,12 @@ Event.observe( window, 'load', hide_text );
    - +
    - +

    @@ -226,6 +312,11 @@ Event.observe( window, 'load', hide_text ); } + /** + * Display second step of custom header image page. + * + * @since unknown + */ function step_2() { check_admin_referer('custom-header'); $overrides = array('test_form' => false); @@ -298,6 +389,11 @@ Event.observe( window, 'load', hide_text ); 1 ) { @@ -339,6 +435,11 @@ Event.observe( window, 'load', hide_text ); return $this->finished(); } + /** + * Display last step of custom header image page. + * + * @since unknown + */ function finished() { ?>
    @@ -350,6 +451,11 @@ Event.observe( window, 'load', hide_text ); step(); if ( 1 == $step ) diff --git a/wp-admin/edit-attachment-rows.php b/wp-admin/edit-attachment-rows.php index 78361e30..42cd3df0 100644 --- a/wp-admin/edit-attachment-rows.php +++ b/wp-admin/edit-attachment-rows.php @@ -1,69 +1,127 @@ - - - - + - $column_display_name) { - if ( 'cb' === $post_column_key ) - $class = ' class="check-column"'; - elseif ( 'comments' === $post_column_key ) - $class = ' class="num"'; - else - $class = ''; -?> - - +if ( ! defined('ABSPATH') ) die(); +if ( have_posts() ) { ?> +
    >
    + + + + + + + + + + ID == $post->post_author ? 'self' : 'other' ); -$att_title = get_the_title(); -if ( empty($att_title) ) - $att_title = __('(no title)'); +$att_title = _draft_or_post_title(); ?> - post_status ); ?>' valign="top"> + post_status ); ?>' valign="top"> $column_display_name ) { + $class = "class=\"$column_name column-$column_name\""; -foreach($posts_columns as $column_name=>$column_display_name) { + $style = ''; + if ( in_array($column_name, $hidden) ) + $style = ' style="display:none;"'; + + $attributes = "$class$style"; switch($column_name) { case 'cb': ?> - + - + - +

    + ID) ) + $actions['edit'] = '' . __('Edit') . ''; + if ( current_user_can('delete_post', $post->ID) ) + $actions['delete'] = "ID) . "' onclick=\"if ( confirm('" . js_escape(sprintf( ('draft' == $post->post_status) ? __("You are about to delete this attachment '%s'\n 'Cancel' to stop, 'OK' to delete.") : __("You are about to delete this attachment '%s'\n 'Cancel' to stop, 'OK' to delete."), $post->post_title )) . "') ) { return true;}return false;\">" . __('Delete') . ""; + $actions['view'] = '' . __('View') . ''; + $action_count = count($actions); + $i = 0; + echo '

    '; + foreach ( $actions as $action => $link ) { + ++$i; + ( $i == $action_count ) ? $sep = '' : $sep = ' | '; + echo "$link$sep"; + } + echo '
    '; + ?>

    + + + + - + $column_display_name) { } else { $t_time = get_the_time(__('Y/m/d g:i:s A')); $m_time = $post->post_date; - $time = get_post_time( 'G', true ); + $time = get_post_time( 'G', true, $post ); if ( ( abs($t_diff = time() - $time) ) < 86400 ) { if ( $t_diff < 0 ) $h_time = sprintf( __('%s from now'), human_time_diff( $time ) ); @@ -84,38 +142,36 @@ foreach($posts_columns as $column_name=>$column_display_name) { } } ?> - + post_parent > 0 ) { if ( get_post($post->post_parent) ) { - $parent_title = get_the_title($post->post_parent); - if ( !empty($parent_title) ) - $title = $parent_title; + $title =_draft_or_post_title($post->post_parent); } ?> - + - + - + - + - - - - + + +
    ID, array(80, 60), false, true); ?>>ID, array(80, 60), true ) ) { +?> + + "> + + + + ">
    +
    >">
    ID))); ?> - ID); ?> -
    >>slug'> " . wp_specialchars(sanitize_term_field('name', $c->name, $c->term_id, 'post_tag', 'display')) . ""; + echo join( ', ', $out ); + } else { + _e('No Tags'); + } + ?> post_excerpt : ''; ?>>post_excerpt : ''; ?> > >,  
    +
    >
    ID ); $pending_phrase = sprintf( __('%s pending'), number_format( $left ) ); if ( $left ) echo ''; - comments_number("" . __('0') . '', "" . __('1') . '', "" . __('%') . ''); + comments_number("" . __('0') . '', "" . __('1') . '', "" . __('%') . ''); if ( $left ) echo ''; ?> @@ -123,30 +179,32 @@ foreach($posts_columns as $column_name=>$column_display_name) { -
    > + "> | + + >
    + + +

    + - - + diff --git a/wp-admin/edit-category-form.php b/wp-admin/edit-category-form.php index f32cfd4f..d84f30f9 100644 --- a/wp-admin/edit-category-form.php +++ b/wp-admin/edit-category-form.php @@ -1,28 +1,51 @@ '; - $action = 'editedcat'; - $nonce_action = 'update-category_' . $cat_ID; - do_action('edit_category_form_pre', $category); -} else { - $heading = __('Add Category'); - $submit_text = __('Add Category'); - $form = '
    '; - $action = 'addcat'; - $nonce_action = 'add-category'; - do_action('add_category_form_pre', $category); +/** + * Edit category form for inclusion in administration panels. + * + * @package WordPress + * @subpackage Administration + */ + +/** + * @var object + */ +if ( ! isset( $category ) ) + $category = (object) array(); + +/** + * @ignore + * @since 2.7 + * @internal Used to prevent errors in page when no category is being edited. + * + * @param object $category + */ +function _fill_empty_category(&$category) { + if ( ! isset( $category->name ) ) + $category->name = ''; + + if ( ! isset( $category->slug ) ) + $category->slug = ''; + + if ( ! isset( $category->parent ) ) + $category->parent = ''; + + if ( ! isset( $category->description ) ) + $category->description = ''; } + +do_action('edit_category_form_pre', $category); + +_fill_empty_category($category); ?>
    -

    + +

    - - + + - + @@ -47,7 +70,7 @@ if ( ! empty($cat_ID) ) {
    -

    +

    diff --git a/wp-admin/edit-comments.php b/wp-admin/edit-comments.php index 62fb2df6..43eecffc 100644 --- a/wp-admin/edit-comments.php +++ b/wp-admin/edit-comments.php @@ -1,35 +1,67 @@ escape( $_REQUEST['pagegen_timestamp'] ); + if ( current_user_can('moderate_comments')) { + $deleted_spam = $wpdb->query( "DELETE FROM $wpdb->comments WHERE comment_approved = 'spam' AND '$delete_time' > comment_date_gmt" ); + } else { + $deleted_spam = 0; + } + $redirect_to = 'edit-comments.php?comment_status=spam&deleted=' . (int) $deleted_spam; + if ( $post_id ) + $redirect_to = add_query_arg( 'p', absint( $post_id ), $redirect_to ); + wp_redirect( $redirect_to ); +} elseif ( isset($_REQUEST['delete_comments']) && isset($_REQUEST['action']) && ( -1 != $_REQUEST['action'] || -1 != $_REQUEST['action2'] ) ) { check_admin_referer('bulk-comments'); + $doaction = ( -1 != $_REQUEST['action'] ) ? $_REQUEST['action'] : $_REQUEST['action2']; + + $deleted = $approved = $unapproved = $spammed = 0; + foreach ( (array) $_REQUEST['delete_comments'] as $comment_id) : // Check the permissions on each + $comment_id = (int) $comment_id; + $_post_id = (int) $wpdb->get_var( $wpdb->prepare( "SELECT comment_post_ID FROM $wpdb->comments WHERE comment_ID = %d", $comment_id) ); - $comments_deleted = $comments_approved = $comments_unapproved = $comments_spammed = 0; - foreach ($_REQUEST['delete_comments'] as $comment) : // Check the permissions on each - $comment = (int) $comment; - $post_id = (int) $wpdb->get_var( $wpdb->prepare( "SELECT comment_post_ID FROM $wpdb->comments WHERE comment_ID = %d", $comment) ); - if ( !current_user_can('edit_post', $post_id) ) + if ( !current_user_can('edit_post', $_post_id) ) continue; - if ( !empty( $_REQUEST['spamit'] ) ) { - wp_set_comment_status($comment, 'spam'); - $comments_spammed++; - } elseif ( !empty( $_REQUEST['deleteit'] ) ) { - wp_set_comment_status($comment, 'delete'); - $comments_deleted++; - } elseif ( !empty( $_REQUEST['approveit'] ) ) { - wp_set_comment_status($comment, 'approve'); - $comments_approved++; - } elseif ( !empty( $_REQUEST['unapproveit'] ) ) { - wp_set_comment_status($comment, 'hold'); - $comments_unapproved++; + + switch( $doaction ) { + case 'markspam' : + wp_set_comment_status($comment_id, 'spam'); + $spammed++; + break; + case 'delete' : + wp_set_comment_status($comment_id, 'delete'); + $deleted++; + break; + case 'approve' : + wp_set_comment_status($comment_id, 'approve'); + $approved++; + break; + case 'unapprove' : + wp_set_comment_status($comment_id, 'hold'); + $unapproved++; + break; } endforeach; - $redirect_to = basename( __FILE__ ) . '?deleted=' . $comments_deleted . '&approved=' . $comments_approved . '&spam=' . $comments_spammed . '&unapproved=' . $comments_unapproved; + + $redirect_to = 'edit-comments.php?deleted=' . $deleted . '&approved=' . $approved . '&spam=' . $spammed . '&unapproved=' . $unapproved; + if ( $post_id ) + $redirect_to = add_query_arg( 'p', absint( $post_id ), $redirect_to ); if ( isset($_REQUEST['apage']) ) $redirect_to = add_query_arg( 'apage', absint($_REQUEST['apage']), $redirect_to ); if ( !empty($_REQUEST['mode']) ) @@ -39,29 +71,34 @@ if ( !empty( $_REQUEST['delete_comments'] ) ) { if ( !empty($_REQUEST['s']) ) $redirect_to = add_query_arg('s', $_REQUEST['s'], $redirect_to); wp_redirect( $redirect_to ); -} elseif ( !empty($_GET['_wp_http_referer']) ) { - wp_redirect(remove_query_arg(array('_wp_http_referer', '_wpnonce'), stripslashes($_SERVER['REQUEST_URI']))); +} elseif ( isset($_GET['_wp_http_referer']) && ! empty($_GET['_wp_http_referer']) ) { + wp_redirect( remove_query_arg( array('_wp_http_referer', '_wpnonce'), stripslashes($_SERVER['REQUEST_URI']) ) ); exit; } +if ( $post_id ) + $title = sprintf(__('Edit Comments on “%s”'), wp_html_excerpt(_draft_or_post_title($post_id), 50)); +else + $title = __('Edit Comments'); + require_once('admin-header.php'); -if ( empty($_GET['mode']) ) - $mode = 'detail'; -else - $mode = attribute_escape($_GET['mode']); +$mode = ( ! isset($_GET['mode']) || empty($_GET['mode']) ) ? 'detail' : attribute_escape($_GET['mode']); -if ( isset($_GET['comment_status']) ) - $comment_status = attribute_escape($_GET['comment_status']); -else - $comment_status = ''; +$comment_status = !empty($_GET['comment_status']) ? attribute_escape($_GET['comment_status']) : ''; + +$comment_type = !empty($_GET['comment_type']) ? attribute_escape($_GET['comment_type']) : ''; + +$search_dirty = ( isset($_GET['s']) ) ? $_GET['s'] : ''; +$search = attribute_escape( $search_dirty ); ?> + +
    + +

    ' . sprintf( __( 'Search results for “%s”' ), wp_html_excerpt( wp_specialchars( stripslashes( $_GET['s'] ) ), 50 ) ) . '' ); ?> +

    -if ( isset($_GET['s']) ) - $search_dirty = $_GET['s']; -else - $search_dirty = ''; -$search = attribute_escape( $search_dirty ); -?> -
    -
    -

    +
      sprintf(__ngettext('Awaiting Moderation (%s)', 'Awaiting Moderation (%s)', number_format_i18n($num_comments->moderated) ), "" . number_format_i18n($num_comments->moderated) . ""), 'approved' => _c('Approved|plural')); +$num_comments = ( $post_id ) ? wp_count_comments( $post_id ) : wp_count_comments(); +//, number_format_i18n($num_comments->moderated) ), "" . number_format_i18n($num_comments->moderated) . ""), +//, number_format_i18n($num_comments->spam) ), "" . number_format_i18n($num_comments->spam) . "") +$stati = array( + 'all' => __ngettext_noop('All', 'All'), // singular not used + 'moderated' => __ngettext_noop('Pending (%s)', 'Pending (%s)'), + 'approved' => __ngettext_noop('Approved', 'Approved'), // singular not used + 'spam' => __ngettext_noop('Spam (%s)', 'Spam (%s)') + ); $class = ( '' === $comment_status ) ? ' class="current"' : ''; -$status_links[] = "
    • ".__('Show All Comments').""; +// $status_links[] = "
    • " . __( 'All' ) . ''; +$link = 'edit-comments.php'; +if ( !empty($comment_type) && 'all' != $comment_type ) + $link = add_query_arg( 'comment_type', $comment_type, $link ); foreach ( $stati as $status => $label ) { $class = ''; - if ( $status == $comment_status ) + if ( str_replace( 'all', '', $status ) == $comment_status ) $class = ' class="current"'; - - $status_links[] = "
    • " . $label . ''; + if ( !isset( $num_comments->$status ) ) + $num_comments->$status = 10; + if ( 'all' != $status ) + $link = add_query_arg( 'comment_status', $status, $link ); + if ( $post_id ) + $link = add_query_arg( 'p', absint( $post_id ), $link ); + /* + // I toyed with this, but decided against it. Leaving it in here in case anyone thinks it is a good idea. ~ Mark + if ( !empty( $_GET['s'] ) ) + $link = add_query_arg( 's', attribute_escape( stripslashes( $_GET['s'] ) ), $link ); + */ + $status_links[] = "
    • " . sprintf( + __ngettext( $label[0], $label[1], $num_comments->$status ), + number_format_i18n( $num_comments->$status ) + ) . ''; } $status_links = apply_filters( 'comment_status_links', $status_links ); -echo implode(' |
    • ', $status_links) . ''; +echo implode( " |\n", $status_links) . ''; unset($status_links); ?>
    -

    - - +

    - - -
    - -
      -
    • >
    • -
    • >
    • -
    - comment_post_ID; +} +$_comment_pending_count_temp = (array) get_pending_comments_num($_comment_post_ids); +foreach ( (array) $_comment_post_ids as $_cpid ) + $_comment_pending_count[$_cpid] = isset( $_comment_pending_count_temp[$_cpid] ) ? $_comment_pending_count_temp[$_cpid] : 0; +if ( empty($_comment_pending_count) ) + $_comment_pending_count = array(); $comments = array_slice($_comments, 0, $comments_per_page); $extra_comments = array_slice($_comments, $comments_per_page); @@ -151,54 +209,100 @@ $extra_comments = array_slice($_comments, $comments_per_page); $page_links = paginate_links( array( 'base' => add_query_arg( 'apage', '%#%' ), 'format' => '', + 'prev_text' => __('«'), + 'next_text' => __('»'), 'total' => ceil($total / $comments_per_page), 'current' => $page )); ?> -
    + + + + + +
    -$page_links
    "; -?> + +
    ' . __( 'Displaying %s–%s of %s' ) . '%s', + number_format_i18n( $start + 1 ), + number_format_i18n( min( $page * $comments_per_page, $total ) ), + number_format_i18n( $total ), + $page_links +); echo $page_links_text; ?>
    + -
    - - +
    + - - + + - - + + + + + + + +\n"; ?> + + + - + + + +

    -
    - - +
    + + +
    - - - - - - + + + + + + + + + +
    +
    +$page_links_text
    "; +?> + +
    + + + + + + + +
    + +
    +
    +
    - -

    - -

    - -

    - -

    - -
    -$page_links
    "; -?> -
    -
    + +

    + + + +

    + + +
    - + + + diff --git a/wp-admin/edit-form-advanced.php b/wp-admin/edit-form-advanced.php index 983bc27d..904b9831 100644 --- a/wp-admin/edit-form-advanced.php +++ b/wp-admin/edit-form-advanced.php @@ -1,12 +1,31 @@ go back.' ), attribute_escape( stripslashes( $_GET['_wp_original_http_referer'] ) ) ); +$messages[1] = sprintf( __( 'Post updated. Continue editing below or go back.' ), attribute_escape( stripslashes( ( isset( $_GET['_wp_original_http_referer'] ) ? $_GET['_wp_original_http_referer'] : '') ) ) ); $messages[2] = __('Custom field updated.'); $messages[3] = __('Custom field deleted.'); $messages[4] = __('Post updated.'); +$messages[6] = sprintf(__('Post published. View post'), get_permalink($post_ID)); +$messages[7] = __('Post saved.'); +$messages[8] = sprintf(__('Post submitted. Preview post'), add_query_arg( 'preview', 'true', get_permalink($post_ID) ) ); if ( isset($_GET['revision']) ) $messages[5] = sprintf( __('Post restored to revision from %s'), wp_post_revision_title( (int) $_GET['revision'], false ) ); @@ -14,21 +33,20 @@ if ( isset($_GET['revision']) ) $notice = false; $notices[1] = __( 'There is an autosave of this post that is more recent than the version below. View the autosave.' ); -if ( !isset($post_ID) || 0 == $post_ID ) { +if ( 0 == $post_ID ) { $form_action = 'post'; $temp_ID = -1 * time(); // don't change this formula without looking at wp_write_post() $form_extra = ""; $autosave = false; } else { - $post_ID = (int) $post_ID; $form_action = 'editpost'; $form_extra = ""; - $autosave = wp_get_post_autosave( $post_id ); + $autosave = wp_get_post_autosave( $post_ID ); // Detect if there exists an autosave newer than the post and if that autosave is different than the post if ( $autosave && mysql2date( 'U', $autosave->post_modified_gmt ) > mysql2date( 'U', $post->post_modified_gmt ) ) { foreach ( _wp_post_revision_fields() as $autosave_field => $_autosave_field ) { - if ( wp_text_diff( $autosave->$autosave_field, $post->$autosave_field ) ) { + if ( normalize_whitespace( $autosave->$autosave_field ) != normalize_whitespace( $post->$autosave_field ) ) { $notice = sprintf( $notices[1], get_edit_post_link( $autosave->ID ) ); break; } @@ -37,215 +55,235 @@ if ( !isset($post_ID) || 0 == $post_ID ) { } } +// All meta boxes should be defined and added before the first do_meta_boxes() call (or potentially during the do_meta_boxes action). + +/** + * Display post submit form fields. + * + * @since 2.7.0 + * + * @param object $post + */ +function post_submit_meta_box($post) { + global $action; + + $can_publish = current_user_can('publish_posts'); ?> - -

    - - -

    - +
    -
    - - - +
    -
    -

    - +
    + +
    -if ( !isset($post_ID) || 0 == $post_ID) - wp_nonce_field('add-post'); -else - wp_nonce_field('update-post_' . $post_ID); +
    +
    +post_status && 'future' != $post->post_status && 'pending' != $post->post_status ) { ?> +post_status ) { ?>style="display:none" type="submit" name="save" id="save-post" value="" tabindex="4" class="button button-highlighted" /> +post_status && $can_publish ) { ?> + + +
    -$form_pingback = ''; +
    +post_status ? clean_url(get_permalink($post->ID)) : clean_url(apply_filters('preview_post_link', add_query_arg('preview', 'true', get_permalink($post->ID)))); ?> -$form_prevstatus = ''; + + +
    + +
    +
    -$saveasdraft = ''; +
    +
    + +post_status ) { + case 'private': + _e('Privately Published'); + break; + case 'publish': + _e('Published'); + break; + case 'future': + _e('Scheduled'); + break; + case 'pending': + _e('Pending Review'); + break; + case 'draft': + _e('Draft'); + break; +} ?> + +post_status || 'private' == $post->post_status || $can_publish ) { ?> +post_status ) { ?>style="display:none;" class="edit-post-status hide-if-no-js" tabindex='4'> - - - - - - - -post_status ) wp_original_referer_field(true, 'previous'); ?> +
    + + + + +
    - + +
    + +
    + post_status ) { + $post->post_password = ''; + $visibility = 'private'; + $visibility_trans = __('Private'); +} elseif ( !empty( $post->post_password ) ) { + $visibility = 'password'; + $visibility_trans = __('Password protected'); +} elseif ( is_sticky( $post->ID ) ) { + $visibility = 'public'; + $visibility_trans = __('Public, Sticky'); +} else { + $visibility = 'public'; + $visibility_trans = __('Public'); +} -
    +?> -
    +
    + +ID), true); ?> /> + -
    -post_status ) { ?> - - - - -
    -
    + />
    +ID), true); ?> tabindex="4" />
    + />
    +
    + />
    -

    - + +

    +
    + + +
    + - -

    - ID ) { if ( 'future' == $post->post_status ) { // scheduled for publishing at a future date - $stamp = __('Scheduled for:
    %1$s at %2$s'); - } else if ( 'publish' == $post->post_status ) { // already published - $stamp = __('Published on:
    %1$s at %2$s'); - } else if ( '0000-00-00 00:00:00' == $post->post_date ) { // draft, 1 or more saves, no date specified - $stamp = __('Publish immediately'); + $stamp = __('Scheduled for: %1$s'); + } else if ( 'publish' == $post->post_status || 'private' == $post->post_status ) { // already published + $stamp = __('Published on: %1$s'); + } else if ( '0000-00-00 00:00:00' == $post->post_date_gmt ) { // draft, 1 or more saves, no date specified + $stamp = __('Publish immediately'); + } else if ( time() < strtotime( $post->post_date_gmt . ' +0000' ) ) { // draft, 1 or more saves, future date specified + $stamp = __('Schedule for: %1$s'); } else { // draft, 1 or more saves, date specified - $stamp = __('Publish on:
    %1$s at %2$s'); + $stamp = __('Publish on: %1$s'); } - $date = mysql2date(get_option('date_format'), $post->post_date); - $time = mysql2date(get_option('time_format'), $post->post_date); + $date = date_i18n( $datef, strtotime( $post->post_date ) ); } else { // draft (no saves, and thus no date specified) - $stamp = __('Publish immediately'); - $date = mysql2date(get_option('date_format'), current_time('mysql')); - $time = mysql2date(get_option('time_format'), current_time('mysql')); + $stamp = __('Publish immediately'); + $date = date_i18n( $datef, strtotime( current_time('mysql') ) ); } ?> - -

    - -
    + +
    + + + +
    +
    +
    +
    -

    - +

    + + + +
    +post_status, array('publish', 'future', 'private') ) || 0 == $post->ID ) { ?> - + post_date_gmt) && time() < strtotime( $post->post_date_gmt . ' +0000' ) ) : ?> + + + + + + - + + -post_status) ? __("You are about to delete this draft '%s'\n 'Cancel' to stop, 'OK' to delete.") : __("You are about to delete this post '%s'\n 'Cancel' to stop, 'OK' to delete."), $post->post_title )) . "') ) { return true;}return false;\">" . __('Delete post') . ""; -?> -
    - -display_name ), mysql2date(get_option('date_format'), $post->post_modified), mysql2date(get_option('time_format'), $post->post_modified)); -} else { - printf(__('Last edited on %1$s at %2$s'), mysql2date(get_option('date_format'), $post->post_modified), mysql2date(get_option('time_format'), $post->post_modified)); -} -?> -
    - - - -

    - -
    -
    - -
      - -
    • - -
    • -
    • -
    • -
    • -
    • - -
    - -
    -

    -
    - - -
    - -
    -
    -

    -
    - -
    -
    -ID); ?> -
    -ID) && ! empty($sample_permalink_html) ) : - echo $sample_permalink_html; -endif; ?> -
    + + + +
    +
    - -
    -

    -post_content); ?> - - - -
    - - -

    + -
    -

    -

    - - 0, 'name' => 'newcat_parent', 'orderby' => 'name', 'hierarchical' => 1, 'show_option_none' => __('Parent category'), 'tab_index' => 3 ) ); ?> - - - -

    -
    -
    • -
    • +
    + + +
    +

    +

    + + 0, 'name' => 'newcat_parent', 'orderby' => 'name', 'hierarchical' => 1, 'show_option_none' => __('Parent category'), 'tab_index' => 3 ) ); ?> + + + +

    +
    - - - - - -

    - +

    + +

    +

    +

    +

    use them in your template'); ?>

    to_ping) ) .'" />'; + $form_trackback = 'to_ping) ) .'" />'; if ('' != $post->pinged) { $pings = '

    '. __('Already pinged:') . '

      '; $already_pinged = explode("\n", trim($post->pinged)); @@ -291,67 +368,108 @@ function post_trackback_meta_box($post) { } ?> -


      ()

      +


      ()

      pingbacks, no other action necessary.'); ?>

      - +
      ID); list_meta($metadata); +meta_form(); ?> - -
      - -

      use in your theme.'); ?>

      -

      -

      -

      trackbacks and pingbacks.'); ?>

      +

      +
      + +

      get_var($wpdb->prepare("SELECT count(1) FROM $wpdb->comments WHERE comment_post_ID = '%d' AND ( comment_approved = '0' OR comment_approved = '1')", $post_ID)); -function post_password_meta_box($post) { + if ( !$post_ID || $post_ID < 0 || 1 > $total ) + return; + +wp_nonce_field( 'get-comments', 'add_comment_nonce', false ); ?> -

      -

      + + + + + + + + + + + +

      + + post_status && !current_user_can( 'publish_posts' ) ) ) + add_meta_box('slugdiv', __('Post Slug'), 'post_slug_meta_box', 'post', 'normal', 'core'); $authors = get_editable_user_ids( $current_user->id ); // TODO: ROLE SYSTEM if ( $post->post_author && !in_array($post->post_author, $authors) ) $authors[] = $post->post_author; if ( $authors && count( $authors ) > 1 ) : +/** + * Display form field with list of authors. + * + * @since 2.6.0 + * + * @param object $post + */ function post_author_meta_box($post) { global $current_user, $user_ID; $authors = get_editable_user_ids( $current_user->id ); // TODO: ROLE SYSTEM @@ -361,26 +479,144 @@ function post_author_meta_box($post) { $authors, 'name' => 'post_author_override', 'selected' => empty($post->ID) ? $user_ID : $post->post_author) ); ?> + + + + + +
      + +

      + +

      + + +

      + + + + + + + + + + + +post_status ) wp_original_referer_field(true, 'previous'); ?> + + + +
      + +
      + + + + +
      + +
      +
      +
      +
      + +
      +
      +ID); ?> +post_status && !current_user_can( 'publish_posts' ) ) ) { ?> +
      +ID) && ! empty($sample_permalink_html) ) : + echo $sample_permalink_html; +endif; ?> +
      +
      +
      + +post_content); ?> + +
      + + +   +'; + if ( $last_id = get_post_meta($post_ID, '_edit_last', true) ) { + $last_user = get_userdata($last_id); + printf(__('Last edited by %1$s on %2$s at %3$s'), wp_specialchars( $last_user->display_name ), mysql2date(get_option('date_format'), $post->post_modified), mysql2date(get_option('time_format'), $post->post_modified)); + } else { + printf(__('Last edited on %1$s at %2$s'), mysql2date(get_option('date_format'), $post->post_modified), mysql2date(get_option('time_format'), $post->post_modified)); + } + echo ''; + } +?> + +
      +
      + + + + + + +
      + + +
      +
      +
      +
      +
      + + post_title) && '' == $post->post_title) || (isset($_GET['message']) && 2 > $_GET['message'])) : ?> - - - -

      (Separate multiple URLs with spaces.)'), 'http://wordpress.org/docs/reference/post/#trackback'); echo '
      '; ?> -

      - -

      - - - - - - -'; - } ?> - -

      - - - -
    - - - -
    diff --git a/wp-admin/edit-link-categories.php b/wp-admin/edit-link-categories.php index c7a5e9d9..3636635c 100644 --- a/wp-admin/edit-link-categories.php +++ b/wp-admin/edit-link-categories.php @@ -1,43 +1,54 @@ %s category: this is the default one"), $cat_name)); + if ( 'delete' == $doaction ) { + foreach( (array) $_GET['delete'] as $cat_ID ) { + $cat_name = get_term_field('name', $cat_ID, 'link_category'); + $default_cat_id = get_option('default_link_category'); - wp_delete_term($cat_ID, 'link_category', array('default' => $default_cat_id)); - } + // Don't delete the default cats. + if ( $cat_ID == $default_cat_id ) + wp_die(sprintf(__("Can’t delete the %s category: this is the default one"), $cat_name)); - $location = 'edit-link-categories.php'; - if ( $referer = wp_get_referer() ) { - if ( false !== strpos($referer, 'edit-link-categories.php') ) - $location = $referer; - } + wp_delete_term($cat_ID, 'link_category', array('default' => $default_cat_id)); + } + + $location = 'edit-link-categories.php'; + if ( $referer = wp_get_referer() ) { + if ( false !== strpos($referer, 'edit-link-categories.php') ) + $location = $referer; + } - $location = add_query_arg('message', 6, $location); - wp_redirect($location); - exit(); -} elseif ( !empty($_GET['_wp_http_referer']) ) { - wp_redirect(remove_query_arg(array('_wp_http_referer', '_wpnonce'), stripslashes($_SERVER['REQUEST_URI']))); + $location = add_query_arg('message', 6, $location); + wp_redirect($location); + exit(); + } +} elseif ( isset($_GET['_wp_http_referer']) && ! empty($_GET['_wp_http_referer']) ) { + wp_redirect( remove_query_arg( array('_wp_http_referer', '_wpnonce'), stripslashes($_SERVER['REQUEST_URI']) ) ); exit; } $title = __('Link Categories'); -$parent_file = 'edit.php'; -wp_enqueue_script( 'admin-categories' ); -wp_enqueue_script('admin-forms'); +wp_enqueue_script('admin-categories'); +if ( current_user_can('manage_categories') ) + wp_enqueue_script('inline-edit-tax'); require_once ('admin-header.php'); @@ -46,42 +57,48 @@ $messages[2] = __('Category deleted.'); $messages[3] = __('Category updated.'); $messages[4] = __('Category not added.'); $messages[5] = __('Category not updated.'); -$messages[6] = __('Categories deleted.'); +$messages[6] = __('Categories deleted.'); ?> + +
    + +

    ' . __('Search results for “%s”') . '', wp_specialchars( stripslashes($_GET['s']) ) ); ?> +

    -if (isset($_GET['message'])) : ?> -

    + +

    -
    - -
    - -

    add new)'), '#addcat') ?>

    - -

    - - -

    - - + +

    - +

    +
    + +
    +
    +
    add_query_arg( 'pagenum', '%#%' ), 'format' => '', + 'prev_text' => __('«'), + 'next_text' => __('»'), 'total' => ceil(wp_count_terms('link_category') / $catsperpage), 'current' => $pagenum )); @@ -90,25 +107,33 @@ if ( $page_links ) echo "
    $page_links
    "; ?> -
    - +
    + +

    -
    +
    - +
    - - - - + + + + + + + +
    -
    - $page_links
    "; ?> + +
    + + +
    +

    + +
    +

    Note:
    Deleting a category does not delete the links in that category. Instead, links that were only assigned to the deleted category are set to the category %s.'), get_term_field('name', get_option('default_link_category'), 'link_category')) ?>

    - -
    -

    Note:
    Deleting a category does not delete the links in that category. Instead, links that were only assigned to the deleted category are set to the category %s.'), get_term_field('name', get_option('default_link_category'), 'link_category')) ?>

    + +
    +
    + +
    +
    + +parent = 0; do_action('add_link_category_form_pre', $category); ?> + +
    +

    +
    +
    + + + +
    + +
    - +
    + + +

    +
    - +
    + + +
    +

    + +
    +
    + + + +
    +
    + +
    +
    + + + + diff --git a/wp-admin/edit-link-category-form.php b/wp-admin/edit-link-category-form.php index 81a686be..3a420c3c 100644 --- a/wp-admin/edit-link-category-form.php +++ b/wp-admin/edit-link-category-form.php @@ -1,23 +1,60 @@ ' . __('Edit Link Category') . ''; + $submit_text = __('Update Category'); $form = '
    '; $action = 'editedcat'; $nonce_action = 'update-link-category_' . $cat_ID; do_action('edit_link_category_form_pre', $category); } else { - $heading = __('Add Category'); + $heading = '

    ' . __('Add Link Category') . '

    '; $submit_text = __('Add Category'); $form = ''; $action = 'addcat'; $nonce_action = 'add-link-category'; do_action('add_link_category_form_pre', $category); } + +/** + * @ignore + * @since 2.7 + * @internal Used to prevent errors in page when no category is being edited. + * + * @param object $category + */ +function _fill_empty_link_category(&$category) { + if ( ! isset( $category->name ) ) + $category->name = ''; + + if ( ! isset( $category->slug ) ) + $category->slug = ''; + + if ( ! isset( $category->description ) ) + $category->description = ''; +} + +_fill_empty_link_category($category); ?>
    -

    + +
    @@ -30,7 +67,7 @@ if ( ! empty($cat_ID) ) { - +
    @@ -38,7 +75,7 @@ if ( ! empty($cat_ID) ) { -

    +

    diff --git a/wp-admin/edit-link-form.php b/wp-admin/edit-link-form.php index 48b95ccf..189a8b7e 100644 --- a/wp-admin/edit-link-form.php +++ b/wp-admin/edit-link-form.php @@ -1,20 +1,36 @@ Links / Edit Link' ), 'link-manager.php' ); + $submit_text = __('Update Link'); $form = '
'; @@ -224,10 +265,10 @@ class MT_Import { if ( 0 != count($post->categories) ) { wp_create_categories($post->categories, $post_id); } - + // Add tags or keywords if ( 1 < strlen($post->post_keywords) ) { - // Keywords exist. + // Keywords exist. printf(__('
Adding tags %s...'), stripslashes($post->post_keywords)); wp_add_post_tags($post_id, $post->post_keywords); } @@ -273,7 +314,7 @@ class MT_Import { function process_posts() { global $wpdb; - $handle = fopen($this->file, 'r'); + $handle = $this->fopen($this->file, 'r'); if ( $handle == null ) return false; @@ -286,7 +327,7 @@ class MT_Import { echo "
    "; - while ( $line = fgets($handle) ) { + while ( $line = $this->fgets($handle) ) { $line = trim($line); if ( '-----' == $line ) { @@ -397,8 +438,10 @@ class MT_Import { $ping->comment_author = $blog; } else { // Processing multi-line field, check context. - - $line .= "\n"; + + if( !empty($line) ) + $line .= "\n"; + if ( 'body' == $context ) { $post->post_content .= $line; } else if ( 'extended' == $context ) { @@ -415,6 +458,8 @@ class MT_Import { } } + $this->fclose($handle); + echo '
'; wp_import_cleanup($this->id); diff --git a/wp-admin/link-import.php b/wp-admin/import/opml.php similarity index 82% rename from wp-admin/link-import.php rename to wp-admin/import/opml.php index a2d6e4d5..8148acf6 100644 --- a/wp-admin/link-import.php +++ b/wp-admin/import/opml.php @@ -1,11 +1,22 @@ + * @author Mike Little + * @package WordPress + * @subpackage Administration + */ + +/** Load WordPress Administration Bootstrap */ +$parent_file = 'tools.php'; +$submenu_file = 'import.php'; $title = __('Import Blogroll'); +class OPML_Import { + + function dispatch() { + global $wpdb, $user_ID; $step = $_POST['step']; if (!$step) $step = 0; ?> @@ -20,9 +31,9 @@ switch ($step) { ?>
- +

-
+

@@ -91,6 +102,7 @@ foreach ($categories as $category) { $blogrolling = false; } + global $opml, $updated_timestamp, $all_links, $map, $names, $urls, $targets, $descriptions, $feeds; if ( isset($opml_url) && $opml_url != '' ) { if ( $blogrolling === true ) { $opml = wp_remote_fopen($opml_url); @@ -98,6 +110,7 @@ foreach ($categories as $category) { $opml = file_get_contents($opml_url); } + /** Load OPML Parser */ include_once('link-parse-opml.php'); $link_count = count($names); @@ -130,7 +143,13 @@ if ( ! $blogrolling ) break; } // end case 1 } // end switch + } -include('admin-footer.php'); + function OPML_Import() {} +} -?> \ No newline at end of file +$opml_importer = new OPML_Import(); + +register_importer('opml', __('Blogroll'), __('Import links in OPML format.'), array(&$opml_importer, 'dispatch')); + +?> diff --git a/wp-admin/import/rss.php b/wp-admin/import/rss.php index 60a44900..832396f5 100644 --- a/wp-admin/import/rss.php +++ b/wp-admin/import/rss.php @@ -1,5 +1,20 @@ '; + screen_icon(); echo '

'.__('Import RSS').'

'; } @@ -87,7 +103,7 @@ class RSS_Import { } // Clean up content - $post_content = preg_replace('|<(/?[A-Z]+)|e', "'<' . strtolower('$1')", $post_content); + $post_content = preg_replace_callback('|<(/?[A-Z]+)|', create_function('$match', 'return "<" . strtolower($match[1]);'), $post_content); $post_content = str_replace('
', '
', $post_content); $post_content = str_replace('
', '
', $post_content); diff --git a/wp-admin/import/stp.php b/wp-admin/import/stp.php index 53b339a0..54c501f8 100644 --- a/wp-admin/import/stp.php +++ b/wp-admin/import/stp.php @@ -1,7 +1,22 @@ '; + screen_icon(); echo '

'.__('Import Simple Tagging').'

'; echo '

'.__('Steps may take a few minutes depending on the size of your database. Please be patient.').'

'; } @@ -18,7 +33,7 @@ class STP_Import { echo '

'.__('Don’t be stupid - backup your database before proceeding!').'

'; echo ''; wp_nonce_field('import-stp'); - echo '

'; + echo '

'; echo '
'; echo '
'; } @@ -78,7 +93,7 @@ class STP_Import { echo '
'; wp_nonce_field('import-stp'); - echo '

'; + echo '

'; echo '
'; echo '
'; } @@ -94,7 +109,7 @@ class STP_Import { echo '

' . sprintf( __ngettext('Done! %s tag was added!', 'Done! %s tags were added!', $tags_added), $tags_added ) . '

'; echo '
'; wp_nonce_field('import-stp'); - echo '

'; + echo '

'; echo '
'; echo ''; } diff --git a/wp-admin/import/textpattern.php b/wp-admin/import/textpattern.php index bbddc08d..413f0331 100644 --- a/wp-admin/import/textpattern.php +++ b/wp-admin/import/textpattern.php @@ -1,10 +1,22 @@ '; + screen_icon(); echo '

'.__('Import Textpattern').'

'; echo '

'.__('Steps may take a few minutes depending on the size of your database. Please be patient.').'

'; } @@ -46,7 +70,7 @@ class Textpattern_Import { echo '
'; wp_nonce_field('import-textpattern'); $this->db_form(); - echo '

'; + echo '

'; echo '
'; echo ''; } @@ -481,7 +505,7 @@ class Textpattern_Import { echo '
'; wp_nonce_field('import-textpattern'); - printf('', attribute_escape(__('Import Users'))); + printf('

', attribute_escape(__('Import Users'))); echo '
'; } @@ -494,7 +518,7 @@ class Textpattern_Import { echo '
'; wp_nonce_field('import-textpattern'); - printf('', attribute_escape(__('Import Posts'))); + printf('

', attribute_escape(__('Import Posts'))); echo '
'; } @@ -508,7 +532,7 @@ class Textpattern_Import { echo '
'; wp_nonce_field('import-textpattern'); - printf('', attribute_escape(__('Import Comments'))); + printf('

', attribute_escape(__('Import Comments'))); echo '
'; } @@ -520,7 +544,7 @@ class Textpattern_Import { echo '
'; wp_nonce_field('import-textpattern'); - printf('', attribute_escape(__('Import Links'))); + printf('

', attribute_escape(__('Import Links'))); echo '
'; } @@ -533,7 +557,7 @@ class Textpattern_Import { echo '
'; wp_nonce_field('import-textpattern'); - printf('', attribute_escape(__('Finish'))); + printf('

', attribute_escape(__('Finish'))); echo '
'; } @@ -670,5 +694,7 @@ class Textpattern_Import { } $txp_import = new Textpattern_Import(); + register_importer('textpattern', __('Textpattern'), __('Import categories, users, posts, comments, and links from a Textpattern blog.'), array ($txp_import, 'dispatch')); + ?> diff --git a/wp-admin/import/utw.php b/wp-admin/import/utw.php index 759809ec..7478fe46 100644 --- a/wp-admin/import/utw.php +++ b/wp-admin/import/utw.php @@ -1,9 +1,23 @@ '; + screen_icon(); echo '

'.__('Import Ultimate Tag Warrior').'

'; echo '

'.__('Steps may take a few minutes depending on the size of your database. Please be patient.').'

'; } @@ -19,7 +33,7 @@ class UTW_Import { echo '

'.__('To accommodate larger databases for those tag-crazy authors out there, we have made this into an easy 5-step program to help you kick that nasty UTW habit. Just keep clicking along and we will let you know when you are in the clear!').'

'; echo '

'.__('Don’t be stupid - backup your database before proceeding!').'

'; echo '
'; - echo '

'; + echo '

'; echo '
'; echo ''; } @@ -106,7 +120,7 @@ class UTW_Import { echo '
'; wp_nonce_field('import-utw'); - echo '

'; + echo '

'; echo '
'; echo ''; } @@ -142,7 +156,7 @@ class UTW_Import { echo '
'; wp_nonce_field('import-utw'); - echo '

'; + echo '

'; echo '
'; echo ''; @@ -161,7 +175,7 @@ class UTW_Import { echo '
'; wp_nonce_field('import-utw'); - echo '

'; + echo '

'; echo '
'; echo ''; diff --git a/wp-admin/import/wordpress.php b/wp-admin/import/wordpress.php index 5271abe0..762ccb3f 100644 --- a/wp-admin/import/wordpress.php +++ b/wp-admin/import/wordpress.php @@ -1,5 +1,19 @@ '; + screen_icon(); echo '

'.__('Import WordPress').'

'; } @@ -35,7 +50,7 @@ class WP_Import { function greet() { echo '
'; - echo '

'.__('Howdy! Upload your WordPress eXtended RSS (WXR) file and we’ll import the posts, comments, custom fields, and categories into this blog.').'

'; + echo '

'.__('Howdy! Upload your WordPress eXtended RSS (WXR) file and we’ll import the posts, pages, comments, custom fields, categories, and tags into this blog.').'

'; echo '

'.__('Choose a WordPress WXR file to upload, then click Upload file and import.').'

'; wp_import_upload_form("admin.php?import=wordpress&step=1"); echo '
'; @@ -92,6 +107,11 @@ class WP_Import { if ( !$is_wxr_file && preg_match('|xmlns:wp="http://wordpress[.]org/export/\d+[.]\d+/"|', $importline) ) $is_wxr_file = true; + if ( false !== strpos($importline, '') ) { + preg_match('|(.*?)|is', $importline, $url); + $this->base_url = $url[1]; + continue; + } if ( false !== strpos($importline, '') ) { preg_match('|(.*?)|is', $importline, $category); $this->categories[] = $category[1]; @@ -178,6 +198,7 @@ class WP_Import { function wp_authors_form() { ?> +

admins entries.'); ?>

get_wp_authors(); - echo '
    '; echo '
    '; wp_nonce_field('import-wordpress'); + echo '
      '; $j = -1; foreach ($authors as $author) { ++ $j; @@ -201,6 +222,7 @@ class WP_Import { if ( $this->allow_fetch_attachments() ) { ?>
    +

    @@ -210,7 +232,9 @@ class WP_Import { '.'
    '; + echo '

    '; + echo ''.'
    '; + echo '

    '; echo '
    '; } @@ -218,7 +242,7 @@ class WP_Import { function users_form($n, $author) { if ( $this->allow_create_users() ) { - printf('
    '); + printf('
    '); } else { echo __('Map to existing').'
    '; @@ -320,7 +344,6 @@ class WP_Import { } function process_posts() { - $i = -1; echo '
      '; $this->get_entries(array(&$this, 'process_post')); @@ -339,7 +362,7 @@ class WP_Import { $post_ID = (int) $this->get_tag( $post, 'wp:post_id' ); if ( $post_ID && !empty($this->post_ids_processed[$post_ID]) ) // Processed already return 0; - + set_time_limit( 60 ); // There are only ever one of these @@ -358,12 +381,12 @@ class WP_Import { $post_author = $this->get_tag( $post, 'dc:creator' ); $post_excerpt = $this->get_tag( $post, 'excerpt:encoded' ); - $post_excerpt = preg_replace('|<(/?[A-Z]+)|e', "'<' . strtolower('$1')", $post_excerpt); + $post_excerpt = preg_replace_callback('|<(/?[A-Z]+)|', create_function('$match', 'return "<" . strtolower($match[1]);'), $post_excerpt); $post_excerpt = str_replace('
      ', '
      ', $post_excerpt); $post_excerpt = str_replace('
      ', '
      ', $post_excerpt); $post_content = $this->get_tag( $post, 'content:encoded' ); - $post_content = preg_replace('|<(/?[A-Z]+)|e', "'<' . strtolower('$1')", $post_content); + $post_content = preg_replace_callback('|<(/?[A-Z]+)|', create_function('$match', 'return "<" . strtolower($match[1]);'), $post_content); $post_content = str_replace('
      ', '
      ', $post_content); $post_content = str_replace('
      ', '
      ', $post_content); @@ -390,6 +413,7 @@ class WP_Import { if ( $post_exists ) { echo '
    1. '; printf(__('Post %s already exists.'), stripslashes($post_title)); + $comment_post_ID = $post_id = $post_exists; } else { // If it has parent, process parent first. @@ -410,6 +434,7 @@ class WP_Import { $post_author = $this->checkauthor($post_author); //just so that if a post already exists, new users are not created by checkauthor $postdata = compact('post_author', 'post_date', 'post_date_gmt', 'post_content', 'post_excerpt', 'post_title', 'post_status', 'post_name', 'comment_status', 'ping_status', 'guid', 'post_parent', 'menu_order', 'post_type', 'post_password'); + $postdata['import_id'] = $post_ID; if ($post_type == 'attachment') { $remote_url = $this->get_tag( $post, 'wp:attachment_url' ); if ( !$remote_url ) @@ -436,6 +461,8 @@ class WP_Import { if (count($categories) > 0) { $post_cats = array(); foreach ($categories as $category) { + if ( '' == $category ) + continue; $slug = sanitize_term_field('slug', $category, 0, 'category', 'db'); $cat = get_term_by('slug', $slug, 'category'); $cat_ID = 0; @@ -444,6 +471,8 @@ class WP_Import { if ($cat_ID == 0) { $category = $wpdb->escape($category); $cat_ID = wp_insert_category(array('cat_name' => $category)); + if ( is_wp_error($cat_ID) ) + continue; } $post_cats[] = $cat_ID; } @@ -454,6 +483,8 @@ class WP_Import { if (count($tags) > 0) { $post_tags = array(); foreach ($tags as $tag) { + if ( '' == $tag ) + continue; $slug = sanitize_term_field('slug', $tag, 0, 'post_tag', 'db'); $tag_obj = get_term_by('slug', $slug, 'post_tag'); $tag_id = 0; @@ -462,6 +493,8 @@ class WP_Import { if ( $tag_id == 0 ) { $tag = $wpdb->escape($tag); $tag_id = wp_insert_term($tag, 'post_tag'); + if ( is_wp_error($tag_id) ) + continue; $tag_id = $tag_id['term_id']; } $post_tags[] = intval($tag_id); @@ -525,6 +558,11 @@ class WP_Import { function process_attachment($postdata, $remote_url) { if ($this->fetch_attachments and $remote_url) { printf( __('Importing attachment %s... '), htmlspecialchars($remote_url) ); + + // If the URL is absolute, but does not contain http, upload it assuming the base_site_url variable + if ( preg_match('/^\/[\w\W]+$/', $remote_url) ) + $remote_url = rtrim($this->base_url,'/').$remote_url; + $upload = $this->fetch_remote_file($postdata, $remote_url); if ( is_wp_error($upload) ) { printf( __('Remote file error: %s'), htmlspecialchars($upload->get_error_message()) ); @@ -579,10 +617,16 @@ class WP_Import { // fetch the remote url and write it to the placeholder file $headers = wp_get_http($url, $upload['file']); + //Request failed + if ( ! $headers ) { + @unlink($upload['file']); + return new WP_Error( 'import_file_error', __('Remote server did not respond') ); + } + // make sure the fetch was successful if ( $headers['response'] != '200' ) { @unlink($upload['file']); - return new WP_Error( 'import_file_error', sprintf(__('Remote file returned error response %d'), intval($headers['response'])) ); + return new WP_Error( 'import_file_error', sprintf(__('Remote file returned error response %1$d %2$s'), $headers['response'], get_status_header_desc($headers['response']) ) ); } elseif ( isset($headers['content-length']) && filesize($upload['file']) != $headers['content-length'] ) { @unlink($upload['file']); @@ -691,10 +735,12 @@ class WP_Import { $this->import_start(); $this->get_authors_from_post(); + wp_suspend_cache_invalidation(true); $this->get_entries(); $this->process_categories(); $this->process_tags(); $result = $this->process_posts(); + wp_suspend_cache_invalidation(false); $this->backfill_parents(); $this->backfill_attachment_urls(); $this->import_end(); @@ -746,8 +792,15 @@ class WP_Import { } } +/** + * Register WordPress Importer + * + * @since unknown + * @var WP_Import + * @name $wp_import + */ $wp_import = new WP_Import(); -register_importer('wordpress', 'WordPress', __('Import posts, comments, custom fields, pages, and categories from a WordPress export file.'), array ($wp_import, 'dispatch')); +register_importer('wordpress', 'WordPress', __('Import posts, pages, comments, custom fields, categories, and tags from a WordPress export file.'), array ($wp_import, 'dispatch')); ?> diff --git a/wp-admin/import/wp-cat2tag.php b/wp-admin/import/wp-cat2tag.php index ff6da0d5..90098ee2 100644 --- a/wp-admin/import/wp-cat2tag.php +++ b/wp-admin/import/wp-cat2tag.php @@ -1,5 +1,19 @@ '; if ( $cat_num > 0 ) { + screen_icon(); echo '

      ' . sprintf( __ngettext( 'Convert Category to Tag.', 'Convert Categories (%d) to Tags.', $cat_num ), $cat_num ) . '

      '; echo '
    2. '; if ( $tags_num > 0 ) { + screen_icon(); echo '

      ' . sprintf( __ngettext( 'Convert Tag to Category.', 'Convert Tags (%d) to Categories.', $tags_num ), $tags_num ) . '

      '; echo '
      '; echo '

      ' . __('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.') . '

      '; @@ -243,7 +259,7 @@ function check_all_tagrows() { if ( ! ($id = is_term( $category->slug, 'post_tag' ) ) ) $id = wp_insert_term($category->name, 'post_tag', array('slug' => $category->slug)); - + $id = $id['term_taxonomy_id']; $posts = get_objects_in_term($category->term_id, 'category'); $term_order = 0; @@ -252,7 +268,7 @@ function check_all_tagrows() { $values[] = $wpdb->prepare( "(%d, %d, %d)", $post, $id, $term_order); clean_post_cache($post); } - + if ( $values ) { $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)"); @@ -262,7 +278,7 @@ function check_all_tagrows() { echo __('Converted successfully.') . "\n"; continue; } - + // if tag already exists, add it to all posts in the category 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) ) ) { $objects_ids = get_objects_in_term($category->term_id, 'category'); diff --git a/wp-admin/includes/admin.php b/wp-admin/includes/admin.php index 9bd25136..a75a1993 100644 --- a/wp-admin/includes/admin.php +++ b/wp-admin/includes/admin.php @@ -1,20 +1,54 @@ +?> \ No newline at end of file diff --git a/wp-admin/includes/bookmark.php b/wp-admin/includes/bookmark.php index 697a71c4..a0077a10 100644 --- a/wp-admin/includes/bookmark.php +++ b/wp-admin/includes/bookmark.php @@ -1,9 +1,30 @@ link_url = clean_url( $_GET['linkurl']); @@ -40,137 +68,206 @@ function get_default_link_to_edit() { return $link; } -function wp_delete_link($link_id) { +/** + * {@internal Missing Short Description}} + * + * @since unknown + * + * @param unknown_type $link_id + * @return unknown + */ +function wp_delete_link( $link_id ) { global $wpdb; - do_action('delete_link', $link_id); + do_action( 'delete_link', $link_id ); + + wp_delete_object_term_relationships( $link_id, 'link_category' ); - wp_delete_object_term_relationships($link_id, 'link_category'); + $wpdb->query( $wpdb->prepare( "DELETE FROM $wpdb->links WHERE link_id = %d", $link_id ) ); - $wpdb->query( $wpdb->prepare("DELETE FROM $wpdb->links WHERE link_id = %d", $link_id) ); + do_action( 'deleted_link', $link_id ); - do_action('deleted_link', $link_id); + clean_bookmark_cache( $link_id ); return true; } -function wp_get_link_cats($link_id = 0) { +/** + * {@internal Missing Short Description}} + * + * @since unknown + * + * @param unknown_type $link_id + * @return unknown + */ +function wp_get_link_cats( $link_id = 0 ) { - $cats = wp_get_object_terms($link_id, 'link_category', 'fields=ids'); + $cats = wp_get_object_terms( $link_id, 'link_category', 'fields=ids' ); - return array_unique($cats); + return array_unique( $cats ); } +/** + * {@internal Missing Short Description}} + * + * @since unknown + * + * @param unknown_type $link_id + * @return unknown + */ function get_link_to_edit( $link_id ) { return get_bookmark( $link_id, OBJECT, 'edit' ); } -function wp_insert_link($linkdata) { +/** + * {@internal Missing Short Description}} + * + * @since unknown + * + * @param unknown_type $linkdata + * @return unknown + */ +function wp_insert_link( $linkdata, $wp_error = false ) { global $wpdb, $current_user; - $defaults = array('link_id' => 0, 'link_name' => '', 'link_url' => '', 'link_rating' => 0 ); + $defaults = array( 'link_id' => 0, 'link_name' => '', 'link_url' => '', 'link_rating' => 0 ); - $linkdata = wp_parse_args($linkdata, $defaults); - $linkdata = sanitize_bookmark($linkdata, 'db'); + $linkdata = wp_parse_args( $linkdata, $defaults ); + $linkdata = sanitize_bookmark( $linkdata, 'db' ); - extract(stripslashes_deep($linkdata), EXTR_SKIP); + extract( stripslashes_deep( $linkdata ), EXTR_SKIP ); $update = false; - if ( !empty($link_id) ) + if ( !empty( $link_id ) ) $update = true; - if ( trim( $link_name ) == '' ) - return 0; + if ( trim( $link_name ) == '' ) { + if ( trim( $link_url ) != '' ) { + $link_name = $link_url; + } else { + return 0; + } + } if ( trim( $link_url ) == '' ) return 0; - if ( empty($link_rating) ) + if ( empty( $link_rating ) ) $link_rating = 0; - if ( empty($link_image) ) + if ( empty( $link_image ) ) $link_image = ''; - if ( empty($link_target) ) + if ( empty( $link_target ) ) $link_target = ''; - if ( empty($link_visible) ) + if ( empty( $link_visible ) ) $link_visible = 'Y'; - if ( empty($link_owner) ) + if ( empty( $link_owner ) ) $link_owner = $current_user->id; - if ( empty($link_notes) ) + if ( empty( $link_notes ) ) $link_notes = ''; - if ( empty($link_description) ) + if ( empty( $link_description ) ) $link_description = ''; - if ( empty($link_rss) ) + if ( empty( $link_rss ) ) $link_rss = ''; - if ( empty($link_rel) ) + if ( empty( $link_rel ) ) $link_rel = ''; // Make sure we set a valid category - if (0 == count($link_category) || !is_array($link_category)) { - $link_category = array(get_option('default_link_category')); + if ( ! isset( $link_category ) ||0 == count( $link_category ) || !is_array( $link_category ) ) { + $link_category = array( get_option( 'default_link_category' ) ); } if ( $update ) { - $wpdb->query( $wpdb->prepare("UPDATE $wpdb->links SET link_url = %s, - link_name = %s, link_image = %s, link_target = %s, - link_visible = %s, link_description = %s, link_rating = %s, + if ( false === $wpdb->query( $wpdb->prepare( "UPDATE $wpdb->links SET link_url = %s, + link_name = %s, link_image = %s, link_target = %s, + link_visible = %s, link_description = %s, link_rating = %s, link_rel = %s, link_notes = %s, link_rss = %s - WHERE link_id = %s", $link_url, $link_name, $link_image, $link_target, $link_visible, $link_description, $link_rating, $link_rel, $link_notes, $link_rss, $link_id) ); + WHERE link_id = %s", $link_url, $link_name, $link_image, $link_target, $link_visible, $link_description, $link_rating, $link_rel, $link_notes, $link_rss, $link_id ) ) ) { + if ( $wp_error ) + return new WP_Error( 'db_update_error', __( 'Could not update link in the database' ), $wpdb->last_error ); + else + return 0; + } } else { - $wpdb->query( $wpdb->prepare("INSERT INTO $wpdb->links (link_url, link_name, link_image, link_target, link_description, link_visible, link_owner, link_rating, link_rel, link_notes, link_rss) VALUES(%s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s)", - $link_url,$link_name, $link_image, $link_target, $link_description, $link_visible, $link_owner, $link_rating, $link_rel, $link_notes, $link_rss) ); + if ( false === $wpdb->query( $wpdb->prepare( "INSERT INTO $wpdb->links (link_url, link_name, link_image, link_target, link_description, link_visible, link_owner, link_rating, link_rel, link_notes, link_rss) VALUES(%s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s)", + $link_url,$link_name, $link_image, $link_target, $link_description, $link_visible, $link_owner, $link_rating, $link_rel, $link_notes, $link_rss ) ) ) { + if ( $wp_error ) + return new WP_Error( 'db_insert_error', __( 'Could not insert link into the database' ), $wpdb->last_error ); + else + return 0; + } $link_id = (int) $wpdb->insert_id; } - wp_set_link_cats($link_id, $link_category); + wp_set_link_cats( $link_id, $link_category ); if ( $update ) - do_action('edit_link', $link_id); + do_action( 'edit_link', $link_id ); else - do_action('add_link', $link_id); + do_action( 'add_link', $link_id ); + + clean_bookmark_cache( $link_id ); return $link_id; } -function wp_set_link_cats($link_id = 0, $link_categories = array()) { +/** + * {@internal Missing Short Description}} + * + * @since unknown + * + * @param unknown_type $link_id + * @param unknown_type $link_categories + */ +function wp_set_link_cats( $link_id = 0, $link_categories = array() ) { // If $link_categories isn't already an array, make it one: - if (!is_array($link_categories) || 0 == count($link_categories)) - $link_categories = array(get_option('default_link_category')); + if ( !is_array( $link_categories ) || 0 == count( $link_categories ) ) + $link_categories = array( get_option( 'default_link_category' ) ); + + $link_categories = array_map( 'intval', $link_categories ); + $link_categories = array_unique( $link_categories ); - $link_categories = array_map('intval', $link_categories); - $link_categories = array_unique($link_categories); + wp_set_object_terms( $link_id, $link_categories, 'link_category' ); - wp_set_object_terms($link_id, $link_categories, 'link_category'); + clean_bookmark_cache( $link_id ); } // wp_set_link_cats() -function wp_update_link($linkdata) { +/** + * {@internal Missing Short Description}} + * + * @since unknown + * + * @param unknown_type $linkdata + * @return unknown + */ +function wp_update_link( $linkdata ) { $link_id = (int) $linkdata['link_id']; - $link = get_link($link_id, ARRAY_A); + $link = get_link( $link_id, ARRAY_A ); // Escape data pulled from DB. - $link = add_magic_quotes($link); + $link = add_magic_quotes( $link ); // Passed link category list overwrites existing category list if not empty. - if ( isset($linkdata['link_category']) && is_array($linkdata['link_category']) - && 0 != count($linkdata['link_category']) ) + if ( isset( $linkdata['link_category'] ) && is_array( $linkdata['link_category'] ) + && 0 != count( $linkdata['link_category'] ) ) $link_cats = $linkdata['link_category']; else $link_cats = $link['link_category']; // Merge old and new fields with new fields overwriting old ones. - $linkdata = array_merge($link, $linkdata); + $linkdata = array_merge( $link, $linkdata ); $linkdata['link_category'] = $link_cats; - return wp_insert_link($linkdata); + return wp_insert_link( $linkdata ); } -?> \ No newline at end of file +?> diff --git a/wp-admin/includes/class-ftp-pure.php b/wp-admin/includes/class-ftp-pure.php index 5ef92bfd..c947f448 100644 --- a/wp-admin/includes/class-ftp-pure.php +++ b/wp-admin/includes/class-ftp-pure.php @@ -11,6 +11,20 @@ * @link http://www.phpclasses.org/browse/package/1743.html Site * @license LGPL License http://www.opensource.org/licenses/lgpl-license.html */ + +/** + * FTP implementation using fsockopen to connect. + * + * @package PemFTP + * @subpackage Pure + * @since 2.5 + * + * @version 1.0 + * @copyright Alexey Dotsenko + * @author Alexey Dotsenko + * @link http://www.phpclasses.org/browse/package/1743.html Site + * @license LGPL License http://www.opensource.org/licenses/lgpl-license.html + */ class ftp extends ftp_base { function ftp($verb=FALSE, $le=FALSE) { @@ -172,4 +186,5 @@ class ftp extends ftp_base { } } } + ?> diff --git a/wp-admin/includes/class-ftp-sockets.php b/wp-admin/includes/class-ftp-sockets.php index 99b40505..4026dd0b 100644 --- a/wp-admin/includes/class-ftp-sockets.php +++ b/wp-admin/includes/class-ftp-sockets.php @@ -11,6 +11,20 @@ * @link http://www.phpclasses.org/browse/package/1743.html Site * @license LGPL License http://www.opensource.org/licenses/lgpl-license.html */ + +/** + * Socket Based FTP implementation + * + * @package PemFTP + * @subpackage Socket + * @since 2.5 + * + * @version 1.0 + * @copyright Alexey Dotsenko + * @author Alexey Dotsenko + * @link http://www.phpclasses.org/browse/package/1743.html Site + * @license LGPL License http://www.opensource.org/licenses/lgpl-license.html + */ class ftp extends ftp_base { function ftp($verb=FALSE, $le=FALSE) { diff --git a/wp-admin/includes/class-ftp.php b/wp-admin/includes/class-ftp.php index c10526bd..0bf25e9c 100644 --- a/wp-admin/includes/class-ftp.php +++ b/wp-admin/includes/class-ftp.php @@ -11,15 +11,75 @@ * @link http://www.phpclasses.org/browse/package/1743.html Site * @license LGPL License http://www.opensource.org/licenses/lgpl-license.html */ + +/** + * Defines the newline characters, if not defined already. + * + * This can be redefined. + * + * @since 2.5 + * @var string + */ if(!defined('CRLF')) define('CRLF',"\r\n"); + +/** + * Sets whatever to autodetect ASCII mode. + * + * This can be redefined. + * + * @since 2.5 + * @var int + */ if(!defined("FTP_AUTOASCII")) define("FTP_AUTOASCII", -1); + +/** + * + * This can be redefined. + * @since 2.5 + * @var int + */ if(!defined("FTP_BINARY")) define("FTP_BINARY", 1); + +/** + * + * This can be redefined. + * @since 2.5 + * @var int + */ if(!defined("FTP_ASCII")) define("FTP_ASCII", 0); -if(!defined('FTP_FORCE')) define('FTP_FORCE', TRUE); + +/** + * Whether to force FTP. + * + * This can be redefined. + * + * @since 2.5 + * @var bool + */ +if(!defined('FTP_FORCE')) define('FTP_FORCE', true); + +/** + * @since 2.5 + * @var string + */ define('FTP_OS_Unix','u'); + +/** + * @since 2.5 + * @var string + */ define('FTP_OS_Windows','w'); + +/** + * @since 2.5 + * @var string + */ define('FTP_OS_Mac','m'); +/** + * PemFTP base class + * + */ class ftp_base { /* Public variables */ var $LocalEcho; @@ -838,5 +898,6 @@ if (!extension_loaded('sockets')) { $prefix = (PHP_SHLIB_SUFFIX == 'dll') ? 'php_' : ''; if(!@dl($prefix . 'sockets.' . PHP_SHLIB_SUFFIX)) $mod_sockets=FALSE; } + require_once "class-ftp-".($mod_sockets?"sockets":"pure").".php"; ?> diff --git a/wp-admin/includes/class-pclzip.php b/wp-admin/includes/class-pclzip.php index b4907444..fcc5351c 100644 --- a/wp-admin/includes/class-pclzip.php +++ b/wp-admin/includes/class-pclzip.php @@ -1,51 +1,60 @@ define( 'PCLZIP_SEPARATOR', ' ' ); + * Recommanded values for smart separation of filenames. + */ +define( 'PCLZIP_SEPARATOR', ',' ); + +/** + * Error configuration + * + * 0 : PclZip Class integrated error handling + * 1 : PclError external library error handling. By enabling this you must + * ensure that you have included PclError library. + * [2,...] : reserved for future use + */ +define( 'PCLZIP_ERROR_EXTERNAL', 0 ); // ----- Optional static temporary directory // By default temporary files are generated in the script current @@ -137,7 +146,7 @@ define( 'PCLZIP_CB_POST_EXTRACT', 78002 ); define( 'PCLZIP_CB_PRE_ADD', 78003 ); define( 'PCLZIP_CB_POST_ADD', 78004 ); - /* For futur use + /* For future use define( 'PCLZIP_CB_PRE_LIST', 78005 ); define( 'PCLZIP_CB_POST_LIST', 78006 ); define( 'PCLZIP_CB_PRE_DELETE', 78007 ); diff --git a/wp-admin/includes/class-wp-filesystem-base.php b/wp-admin/includes/class-wp-filesystem-base.php index 820703e4..eefdd1c2 100644 --- a/wp-admin/includes/class-wp-filesystem-base.php +++ b/wp-admin/includes/class-wp-filesystem-base.php @@ -1,41 +1,150 @@ method, 'ftp') !== false ) + if ( defined('FTP_BASE') && strpos($this->method, 'ftp') !== false ) return FTP_BASE; - return $this->find_folder(ABSPATH); + $folder = $this->find_folder(ABSPATH); + //Perhaps the FTP folder is rooted at the WordPress install, Check for wp-includes folder in root, Could have some false positives, but rare. + if ( ! $folder && $this->is_dir('/wp-includes') ) + $folder = '/'; + return $folder; } + /** + * Returns the path on the remote filesystem of WP_CONTENT_DIR + * + * @since 2.7 + * @access public + * @return string The location of the remote path. + */ function wp_content_dir() { - if ( defined('FTP_CONTENT_DIR') && strpos($this->method, 'ftp') !== false ) + if ( defined('FTP_CONTENT_DIR') && strpos($this->method, 'ftp') !== false ) return FTP_CONTENT_DIR; return $this->find_folder(WP_CONTENT_DIR); } + /** + * Returns the path on the remote filesystem of WP_PLUGIN_DIR + * + * @since 2.7 + * @access public + * + * @return string The location of the remote path. + */ function wp_plugins_dir() { - if ( defined('FTP_PLUGIN_DIR') && strpos($this->method, 'ftp') !== false ) + if ( defined('FTP_PLUGIN_DIR') && strpos($this->method, 'ftp') !== false ) return FTP_PLUGIN_DIR; return $this->find_folder(WP_PLUGIN_DIR); } + /** + * Returns the path on the remote filesystem of the Themes Directory + * + * @since 2.7 + * @access public + * + * @return string The location of the remote path. + */ function wp_themes_dir() { return $this->wp_content_dir() . '/themes'; } - //Back compat: use abspath() or wp_*_dir + + /** + * Locates a folder on the remote filesystem. + * + * Deprecated; use WP_Filesystem::abspath() or WP_Filesystem::wp_*_dir() methods instead. + * + * @since 2.5 + * @deprecated 2.7 + * @access public + * + * @param string $base The folder to start searching from + * @param bool $echo True to display debug information + * @return string The location of the remote path. + */ function find_base_dir($base = '.', $echo = false) { + _deprecated_function(__FUNCTION__, '2.7', 'WP_Filesystem::abspath() or WP_Filesystem::wp_*_dir()' ); $this->verbose = $echo; return $this->abspath(); } - //Back compat: use ::abspath() or ::wp_*_dir + /** + * Locates a folder on the remote filesystem. + * + * Deprecated; use WP_Filesystem::abspath() or WP_Filesystem::wp_*_dir() methods instead. + * + * @since 2.5 + * @deprecated 2.7 + * @access public + * + * @param string $base The folder to start searching from + * @param bool $echo True to display debug information + * @return string The location of the remote path. + */ function get_base_dir($base = '.', $echo = false) { + _deprecated_function(__FUNCTION__, '2.7', 'WP_Filesystem::abspath() or WP_Filesystem::wp_*_dir()' ); $this->verbose = $echo; return $this->abspath(); } - + + /** + * Locates a folder on the remote filesystem. + * + * Assumes that on Windows systems, Stripping off the Drive letter is OK + * Sanitizes \\ to / in windows filepaths. + * + * @since 2.7 + * @access public + * + * @param string $folder the folder to locate + * @return string The location of the remote path. + */ function find_folder($folder) { - $folder = str_replace('\\', '/', $folder); //Windows Sanitiation + + $folder = preg_replace('|^([a-z]{1}):|i', '', $folder); //Strip out windows driveletter if its there. + $folder = str_replace('\\', '/', $folder); //Windows path sanitiation + if ( isset($this->cache[ $folder ] ) ) return $this->cache[ $folder ]; @@ -47,26 +156,37 @@ class WP_Filesystem_Base{ $this->cache[ $folder ] = $return; return $return; } - - // Assumes $folder is windows sanitized; - // Assumes that the drive letter is safe to be stripped off, Should not be a problem for windows servers. + + /** + * Locates a folder on the remote filesystem. + * + * Expects Windows sanitized path + * + * @since 2.7 + * @access private + * + * @param string $folder the folder to locate + * @param string $base the folder to start searching from + * @param bool $loop if the function has recursed, Internal use only + * @return string The location of the remote path. + */ function search_for_folder($folder, $base = '.', $loop = false ) { if ( empty( $base ) || '.' == $base ) $base = trailingslashit($this->cwd()); - - $folder = preg_replace('|^([a-z]{1}):|i', '', $folder); //Strip out windows driveletter if its there. - + + $folder = untrailingslashit($folder); + $folder_parts = explode('/', $folder); $last_path = $folder_parts[ count($folder_parts) - 1 ]; - + $files = $this->dirlist( $base ); - + foreach ( $folder_parts as $key ) { if ( $key == $last_path ) continue; //We want this to be caught by the next code block. - //Working from /home/ to /user/ to /wordpress/ see if that file exists within the current folder, - // If its found, change into it and follow through looking for it. + //Working from /home/ to /user/ to /wordpress/ see if that file exists within the current folder, + // If its found, change into it and follow through looking for it. // If it cant find WordPress down that route, it'll continue onto the next folder level, and see if that matches, and so on. // If it reaches the end, and still cant find it, it'll return false for the entire function. if( isset($files[ $key ]) ){ @@ -78,7 +198,7 @@ class WP_Filesystem_Base{ return $ret; } } - + //Only check this as a last resort, to prevent locating the incorrect install. All above proceeedures will fail quickly if this is the right branch to take. if(isset( $files[ $last_path ] ) ) { if( $this->verbose ) @@ -88,13 +208,23 @@ class WP_Filesystem_Base{ if( $loop ) return false;//Prevent tihs function looping again. //As an extra last resort, Change back to / if the folder wasnt found. This comes into effect when the CWD is /home/user/ but WP is at /var/www/.... mainly dedicated setups. - return $this->search_for_folder($folder, '/', true); - + return $this->search_for_folder($folder, '/', true); + } - - //Common Helper functions. + + /** + * Returns the *nix style file permissions for a file + * + * From the PHP documentation page for fileperms() + * + * @link http://docs.php.net/fileperms + * @since 2.5 + * @access public + * + * @param string $file string filename + * @return int octal representation of permissions + */ function gethchmod($file){ - //From the PHP.net page for ...? $perms = $this->getchmod($file); if (($perms & 0xC000) == 0xC000) // Socket $info = 's'; @@ -135,24 +265,52 @@ class WP_Filesystem_Base{ (($perms & 0x0200) ? 'T' : '-')); return $info; } + + /** + * Converts *nix style file permissions to a octal number. + * + * Converts '-rw-r--r--' to 0644 + * From "info at rvgate dot nl"'s comment on the PHP documentation for chmod() + * + * @link http://docs.php.net/manual/en/function.chmod.php#49614 + * @since 2.5 + * @access public + * + * @param string $mode string *nix style file permission + * @return int octal representation + */ function getnumchmodfromh($mode) { - $realmode = ""; - $legal = array("", "w", "r", "x", "-"); - $attarray = preg_split("//", $mode); + $realmode = ''; + $legal = array('', 'w', 'r', 'x', '-'); + $attarray = preg_split('//', $mode); for($i=0; $i < count($attarray); $i++) if($key = array_search($attarray[$i], $legal)) $realmode .= $legal[$key]; - + $mode = str_pad($realmode, 9, '-'); $trans = array('-'=>'0', 'r'=>'4', 'w'=>'2', 'x'=>'1'); $mode = strtr($mode,$trans); - + $newmode = ''; $newmode .= $mode[0] + $mode[1] + $mode[2]; $newmode .= $mode[3] + $mode[4] + $mode[5]; $newmode .= $mode[6] + $mode[7] + $mode[8]; return $newmode; } + + /** + * Determines if the string provided contains binary characters. + * + * @since 2.7 + * @access private + * + * @param string $text String to test against + * @return bool true if string is binary, false otherwise + */ + function is_binary( $text ) { + return (bool) preg_match('|[^\x20-\x7E]|', $text); //chr(32)..chr(127) + } } + ?> diff --git a/wp-admin/includes/class-wp-filesystem-direct.php b/wp-admin/includes/class-wp-filesystem-direct.php index 77a75826..4801b5f8 100644 --- a/wp-admin/includes/class-wp-filesystem-direct.php +++ b/wp-admin/includes/class-wp-filesystem-direct.php @@ -1,5 +1,19 @@ read()) ) { $struc = array(); $struc['name'] = $entry; diff --git a/wp-admin/includes/class-wp-filesystem-ftpext.php b/wp-admin/includes/class-wp-filesystem-ftpext.php index 20699351..a2805da8 100644 --- a/wp-admin/includes/class-wp-filesystem-ftpext.php +++ b/wp-admin/includes/class-wp-filesystem-ftpext.php @@ -1,5 +1,20 @@ FTP_ASCII, - 'css'=>FTP_ASCII, - 'txt'=>FTP_ASCII, - 'js'=>FTP_ASCII, - 'html'=>FTP_ASCII, - 'htm'=>FTP_ASCII, - 'xml'=>FTP_ASCII, - - 'jpg'=>FTP_BINARY, - 'png'=>FTP_BINARY, - 'gif'=>FTP_BINARY, - 'bmp'=>FTP_BINARY - ); - function WP_Filesystem_FTPext($opt='') { $this->method = 'ftpext'; $this->errors = new WP_Error(); @@ -57,7 +57,11 @@ class WP_Filesystem_FTPext extends WP_Filesystem_Base{ else $this->options['password'] = $opt['password']; - $this->options['ssl'] = ( !empty($opt['ssl']) ); + $this->options['ssl'] = false; + if ( isset($opt['ssl']) ) + $this->options['ssl'] = ( !empty($opt['ssl']) ); + elseif ( isset( $opt['connection_type']) ) + $this->options['ssl'] = ( 'ftps' == $opt['connection_type'] ); } function connect() { @@ -76,28 +80,33 @@ class WP_Filesystem_FTPext extends WP_Filesystem_Base{ return false; } + //Set the Connection to use Passive FTP + @ftp_pasv( $this->link, true ); + return true; } function setDefaultPermissions($perm) { $this->permission = $perm; } - + function get_contents($file, $type = '', $resumepos = 0 ){ - if( empty($type) ){ - $extension = substr(strrchr($file, "."), 1); - $type = isset($this->filetypes[ $extension ]) ? $this->filetypes[ $extension ] : FTP_ASCII; - } + if( empty($type) ) + $type = FTP_BINARY; + $temp = tmpfile(); if ( ! $temp ) return false; + if( ! @ftp_fget($this->link, $temp, $file, $type, $resumepos) ) return false; + fseek($temp, 0); //Skip back to the start of the file being written to $contents = ''; - while (!feof($temp)) { + + while ( ! feof($temp) ) $contents .= fread($temp, 8192); - } + fclose($temp); return $contents; } @@ -105,21 +114,23 @@ class WP_Filesystem_FTPext extends WP_Filesystem_Base{ return explode("\n", $this->get_contents($file)); } function put_contents($file, $contents, $type = '' ) { - if( empty($type) ) { - $extension = substr(strrchr($file, "."), 1); - $type = isset($this->filetypes[ $extension ]) ? $this->filetypes[ $extension ] : FTP_ASCII; - } + if( empty($type) ) + $type = $this->is_binary($contents) ? FTP_BINARY : FTP_ASCII; + $temp = tmpfile(); if ( ! $temp ) return false; + fwrite($temp, $contents); fseek($temp, 0); //Skip back to the start of the file being written to + $ret = @ftp_fput($this->link, $file, $temp, $type); + fclose($temp); return $ret; } function cwd() { - $cwd = ftp_pwd($this->link); + $cwd = @ftp_pwd($this->link); if( $cwd ) $cwd = trailingslashit($cwd); return $cwd; diff --git a/wp-admin/includes/class-wp-filesystem-ftpsockets.php b/wp-admin/includes/class-wp-filesystem-ftpsockets.php index 3b6cdcc8..d5ee3f97 100644 --- a/wp-admin/includes/class-wp-filesystem-ftpsockets.php +++ b/wp-admin/includes/class-wp-filesystem-ftpsockets.php @@ -1,4 +1,19 @@ FTP_ASCII, - 'css' => FTP_ASCII, - 'txt' => FTP_ASCII, - 'js' => FTP_ASCII, - 'html'=> FTP_ASCII, - 'htm' => FTP_ASCII, - 'xml' => FTP_ASCII, - - 'jpg' => FTP_BINARY, - 'png' => FTP_BINARY, - 'gif' => FTP_BINARY, - 'bmp' => FTP_BINARY - ); - - function WP_Filesystem_ftpsockets($opt='') { + function WP_Filesystem_ftpsockets($opt = '') { $this->method = 'ftpsockets'; $this->errors = new WP_Error(); @@ -86,51 +86,57 @@ class WP_Filesystem_ftpsockets extends WP_Filesystem_Base { $this->permission = $perm; } - function get_contents($file, $type = '', $resumepos = 0){ + function get_contents($file, $type = '', $resumepos = 0) { if( ! $this->exists($file) ) return false; - if( empty($type) ){ - $extension = substr(strrchr($file, '.'), 1); - $type = isset($this->filetypes[ $extension ]) ? $this->filetypes[ $extension ] : FTP_AUTOASCII; - } + if( empty($type) ) + $type = FTP_AUTOASCII; $this->ftp->SetType($type); + $temp = wp_tempnam( $file ); + if ( ! $temphandle = fopen($temp, 'w+') ) return false; + if ( ! $this->ftp->fget($temphandle, $file) ) { fclose($temphandle); unlink($temp); return ''; //Blank document, File does exist, Its just blank. } + fseek($temphandle, 0); //Skip back to the start of the file being written to $contents = ''; + while ( ! feof($temphandle) ) $contents .= fread($temphandle, 8192); + fclose($temphandle); unlink($temp); return $contents; } - function get_contents_array($file){ + function get_contents_array($file) { return explode("\n", $this->get_contents($file) ); } function put_contents($file, $contents, $type = '' ) { - if( empty($type) ){ - $extension = substr(strrchr($file, '.'), 1); - $type = isset($this->filetypes[ $extension ]) ? $this->filetypes[ $extension ] : FTP_AUTOASCII; - } + if( empty($type) ) + $type = $this->is_binary($contents) ? FTP_BINARY : FTP_ASCII; + $this->ftp->SetType($type); $temp = wp_tempnam( $file ); if ( ! $temphandle = fopen($temp, 'w+') ){ - unlink($temp); + unlink($temp); return false; } + fwrite($temphandle, $contents); fseek($temphandle, 0); //Skip back to the start of the file being written to + $ret = $this->ftp->fput($file, $temphandle); + fclose($temphandle); unlink($temp); return $ret; @@ -146,12 +152,12 @@ class WP_Filesystem_ftpsockets extends WP_Filesystem_Base { function chdir($file) { return $this->ftp->chdir($file); } - + function chgrp($file, $group, $recursive = false ) { return false; } - function chmod($file, $mode = false, $recursive = false ){ + function chmod($file, $mode = false, $recursive = false ) { if( ! $mode ) $mode = $this->permission; if( ! $mode ) @@ -251,7 +257,7 @@ class WP_Filesystem_ftpsockets extends WP_Filesystem_Base { return $this->ftp->filesize($file); } - function touch($file, $time = 0, $atime = 0 ){ + function touch($file, $time = 0, $atime = 0 ) { return false; } @@ -311,8 +317,9 @@ class WP_Filesystem_ftpsockets extends WP_Filesystem_Base { return $ret; } - function __destruct(){ + function __destruct() { $this->ftp->quit(); } } + ?> diff --git a/wp-admin/includes/class-wp-filesystem-ssh2.php b/wp-admin/includes/class-wp-filesystem-ssh2.php new file mode 100644 index 00000000..6da852d7 --- /dev/null +++ b/wp-admin/includes/class-wp-filesystem-ssh2.php @@ -0,0 +1,507 @@ +method = 'ssh2'; + $this->errors = new WP_Error(); + + //Check if possible to use ssh2 functions. + if ( ! extension_loaded('ssh2') ) { + $this->errors->add('no_ssh2_ext', __('The ssh2 PHP extension is not available')); + return false; + } + + // Set defaults: + if ( empty($opt['port']) ) + $this->options['port'] = 22; + else + $this->options['port'] = $opt['port']; + + if ( empty($opt['hostname']) ) + $this->errors->add('empty_hostname', __('SSH2 hostname is required')); + else + $this->options['hostname'] = $opt['hostname']; + + if ( isset($opt['base']) && ! empty($opt['base']) ) + $this->wp_base = $opt['base']; + + // Check if the options provided are OK. + if ( empty ($opt['username']) ) + $this->errors->add('empty_username', __('SSH2 username is required')); + else + $this->options['username'] = $opt['username']; + + if ( ( !empty ($opt['public_key']) ) && ( !empty ($opt['private_key']) ) ) { + $this->options['public_key'] = $opt['public_key']; + $this->options['private_key'] = $opt['private_key']; + + $this->options['hostkey'] = array("hostkey" => "ssh-rsa"); + + $this->keys = true; + } + + + if ( empty ($opt['password']) ) { + if ( !$this->keys ) // password can be blank if we are using keys + $this->errors->add('empty_password', __('SSH2 password is required')); + } else { + $this->options['password'] = $opt['password']; + } + + } + + function connect() { + $this->debug("connect();"); + + if ( ! $this->keys ) { + $this->link = @ssh2_connect($this->options['hostname'], $this->options['port']); + } else { + $this->link = @ssh2_connect($this->options['hostname'], $this->options['port'], $this->options['hostkey']); + } + + if ( ! $this->link ) { + $this->errors->add('connect', sprintf(__('Failed to connect to SSH2 Server %1$s:%2$s'), $this->options['hostname'], $this->options['port'])); + return false; + } + + if ( !$this->keys ) { + if ( ! @ssh2_auth_password($this->link, $this->options['username'], $this->options['password']) ) { + $this->errors->add('auth', sprintf(__('Username/Password incorrect for %s'), $this->options['username'])); + return false; + } + } else { + if ( ! @ssh2_auth_pubkey_file($this->link, $this->options['username'], $this->options['public_key'], $this->options['private_key'], $this->options['password'] ) ) { + $this->errors->add('auth', sprintf(__('Public and Private keys incorrent for %s'), $this->options['username'])); + return false; + } + } + + $this->sftp_link = ssh2_sftp($this->link); + + return true; + } + + function run_command($link, $command, $returnbool = false) { + $this->debug("run_command();"); + if(!($stream = @ssh2_exec( $link, $command . "; echo \"__COMMAND_FINISHED__\";"))) { + $this->errors->add('command', sprintf(__('Unable to perform command: %s'), $command)); + } else { + stream_set_blocking( $stream, true ); + $time_start = time(); + $data = null; + while( true ) { + if (strpos($data,"__COMMAND_FINISHED__") !== false){ + break; // the command has finshed! + } + if( (time()-$time_start) > $this->timeout ){ + $this->errors->add('command', sprintf(__('Connection to the server has timeout after %s seconds.'), $this->timeout)); + unset($this->link); + unset($this->sftp_link); // close connections + return false; + } + while( $buf = fread( $stream, strlen($stream) ) ) + $data .= $buf; + } + fclose($stream); + $data = trim(str_replace("__COMMAND_FINISHED__", "", $data)); + if (($returnbool) && ( (int) $data )) { + return true; + } elseif (($returnbool) && (! (int) $data )) { + return false; + } else { + return $data; + } + } + return false; + } + + function debug($text) + { + if ($this->debugtest) + { + echo "
      " . $text . "
      "; + } + } + + function setDefaultPermissions($perm) { + $this->debug("setDefaultPermissions();"); + if ( $perm ) + $this->permission = $perm; + } + + function get_contents($file, $type = '', $resumepos = 0 ) { + $this->debug("get_contents();"); + $tempfile = wp_tempnam( $file ); + if ( ! $tempfile ) + return false; + if( ! ssh2_scp_recv($this->link, $file, $tempfile) ) + return false; + $contents = file_get_contents($tempfile); + unlink($tempfile); + return $contents; + } + + function get_contents_array($file) { + $this->debug("get_contents_array();"); + return explode("\n", $this->get_contents($file)); + } + + function put_contents($file, $contents, $type = '' ) { + $this->debug("put_contents($file);"); + $tempfile = wp_tempnam( $file ); + $temp = fopen($tempfile, 'w'); + if ( ! $temp ) + return false; + fwrite($temp, $contents); + fclose($temp); + $ret = ssh2_scp_send($this->link, $tempfile, $file, $this->permission); + unlink($tempfile); + return $ret; + } + + function cwd() { + $this->debug("cwd();"); + $cwd = $this->run_command($this->link, 'pwd'); + if( $cwd ) + $cwd = trailingslashit($cwd); + return $cwd; + } + + function chdir($dir) { + $this->debug("chdir();"); + return $this->run_command($this->link, 'cd ' . $dir, true); + } + + function chgrp($file, $group, $recursive = false ) { + $this->debug("chgrp();"); + if ( ! $this->exists($file) ) + return false; + if ( ! $recursive || ! $this->is_dir($file) ) + return $this->run_command($this->link, sprintf('chgrp %o %s', $mode, $file), true); + return $this->run_command($this->link, sprintf('chgrp -R %o %s', $mode, $file), true); + } + + function chmod($file, $mode = false, $recursive = false) { + $this->debug("chmod();"); + if( ! $mode ) + $mode = $this->permission; + if( ! $mode ) + return false; + if ( ! $this->exists($file) ) + return false; + if ( ! $recursive || ! $this->is_dir($file) ) + return $this->run_command($this->link, sprintf('chmod %o %s', $mode, $file), true); + return $this->run_command($this->link, sprintf('chmod -R %o %s', $mode, $file), true); + } + + function chown($file, $owner, $recursive = false ) { + $this->debug("chown();"); + if ( ! $this->exists($file) ) + return false; + if ( ! $recursive || ! $this->is_dir($file) ) + return $this->run_command($this->link, sprintf('chown %o %s', $mode, $file), true); + return $this->run_command($this->link, sprintf('chown -R %o %s', $mode, $file), true); + } + + function owner($file) { + $this->debug("owner();"); + $dir = $this->dirlist($file); + return $dir[$file]['owner']; + } + + function getchmod($file) { + $this->debug("getchmod();"); + $dir = $this->dirlist($file); + return $dir[$file]['permsn']; + } + + function group($file) { + $this->debug("group();"); + $dir = $this->dirlist($file); + return $dir[$file]['group']; + } + + function copy($source, $destination, $overwrite = false ) { + $this->debug("copy();"); + if( ! $overwrite && $this->exists($destination) ) + return false; + $content = $this->get_contents($source); + if( false === $content) + return false; + return $this->put_contents($destination, $content); + } + + function move($source, $destination, $overwrite = false) { + $this->debug("move();"); + return @ssh2_sftp_rename($this->link, $source, $destination); + } + + function delete($file, $recursive = false) { + $this->debug("delete();"); + if ( $this->is_file($file) ) + return ssh2_sftp_unlink($this->sftp_link, $file); + if ( ! $recursive ) + return ssh2_sftp_rmdir($this->sftp_link, $file); + $filelist = $this->dirlist($file); + if ( is_array($filelist) ) { + foreach ( $filelist as $filename => $fileinfo) { + $this->delete($file . '/' . $filename, $recursive); + } + } + return ssh2_sftp_rmdir($this->sftp_link, $file); + } + + function exists($file) { + $this->debug("exists();"); + return $this->run_command($this->link, sprintf('ls -lad %s', $file), true); + } + + function is_file($file) { + $this->debug("is_file();"); + //DO NOT RELY ON dirlist()! + $list = $this->run_command($this->link, sprintf('ls -lad %s', $file)); + $list = $this->parselisting($list); + if ( ! $list ) + return false; + else + return ( !$list['isdir'] && !$list['islink'] ); //ie. not a file or link, yet exists, must be file. + } + + function is_dir($path) { + $this->debug("is_dir();"); + //DO NOT RELY ON dirlist()! + $list = $this->parselisting($this->run_command($this->link, sprintf('ls -lad %s', untrailingslashit($path)))); + if ( ! $list ) + return false; + else + return $list['isdir']; + } + + function is_readable($file) { + //Not implmented. + } + + function is_writable($file) { + //Not implmented. + } + + function atime($file) { + //Not implmented. + } + + function mtime($file) { + //Not implmented. + } + + function size($file) { + //Not implmented. + } + + function touch($file, $time = 0, $atime = 0) { + //Not implmented. + } + + function mkdir($path, $chmod = null, $chown = false, $chgrp = false) { + $this->debug("mkdir();"); + $path = untrailingslashit($path); + if( ! ssh2_sftp_mkdir($this->sftp_link, $path, $chmod, true) ) + return false; + if( $chown ) + $this->chown($path, $chown); + if( $chgrp ) + $this->chgrp($path, $chgrp); + return true; + } + + function rmdir($path, $recursive = false) { + $this->debug("rmdir();"); + return $this->delete($path, $recursive); + } + + function parselisting($line) { + $this->debug("parselisting();"); + $is_windows = ($this->OS_remote == FTP_OS_Windows); + if ($is_windows && preg_match("/([0-9]{2})-([0-9]{2})-([0-9]{2}) +([0-9]{2}):([0-9]{2})(AM|PM) +([0-9]+|) +(.+)/", $line, $lucifer)) { + $b = array(); + if ($lucifer[3]<70) { $lucifer[3] +=2000; } else { $lucifer[3]+=1900; } // 4digit year fix + $b['isdir'] = ($lucifer[7]==""); + if ( $b['isdir'] ) + $b['type'] = 'd'; + else + $b['type'] = 'f'; + $b['size'] = $lucifer[7]; + $b['month'] = $lucifer[1]; + $b['day'] = $lucifer[2]; + $b['year'] = $lucifer[3]; + $b['hour'] = $lucifer[4]; + $b['minute'] = $lucifer[5]; + $b['time'] = @mktime($lucifer[4]+(strcasecmp($lucifer[6],"PM")==0?12:0),$lucifer[5],0,$lucifer[1],$lucifer[2],$lucifer[3]); + $b['am/pm'] = $lucifer[6]; + $b['name'] = $lucifer[8]; + } else if (!$is_windows && $lucifer=preg_split("/[ ]/",$line,9,PREG_SPLIT_NO_EMPTY)) { + //echo $line."\n"; + $lcount=count($lucifer); + if ($lcount<8) return ''; + $b = array(); + $b['isdir'] = $lucifer[0]{0} === "d"; + $b['islink'] = $lucifer[0]{0} === "l"; + if ( $b['isdir'] ) + $b['type'] = 'd'; + elseif ( $b['islink'] ) + $b['type'] = 'l'; + else + $b['type'] = 'f'; + $b['perms'] = $lucifer[0]; + $b['number'] = $lucifer[1]; + $b['owner'] = $lucifer[2]; + $b['group'] = $lucifer[3]; + $b['size'] = $lucifer[4]; + if ($lcount==8) { + sscanf($lucifer[5],"%d-%d-%d",$b['year'],$b['month'],$b['day']); + sscanf($lucifer[6],"%d:%d",$b['hour'],$b['minute']); + $b['time'] = @mktime($b['hour'],$b['minute'],0,$b['month'],$b['day'],$b['year']); + $b['name'] = $lucifer[7]; + } else { + $b['month'] = $lucifer[5]; + $b['day'] = $lucifer[6]; + if (preg_match("/([0-9]{2}):([0-9]{2})/",$lucifer[7],$l2)) { + $b['year'] = date("Y"); + $b['hour'] = $l2[1]; + $b['minute'] = $l2[2]; + } else { + $b['year'] = $lucifer[7]; + $b['hour'] = 0; + $b['minute'] = 0; + } + $b['time'] = strtotime(sprintf("%d %s %d %02d:%02d",$b['day'],$b['month'],$b['year'],$b['hour'],$b['minute'])); + $b['name'] = $lucifer[8]; + } + } + + return $b; + } + + function dirlist($path = '.', $incdot = false, $recursive = false) { + $this->debug("dirlist();"); + if( $this->is_file($path) ) { + $limitFile = basename($path); + $path = trailingslashit(dirname($path)); + } else { + $limitFile = false; + } + + $list = $this->run_command($this->link, sprintf('ls -la %s', $path)); + + if ( $list === false ) + return false; + + $list = explode("\n", $list); + + $dirlist = array(); + foreach ( (array)$list as $k => $v ) { + $entry = $this->parselisting($v); + if ( empty($entry) ) + continue; + + if ( '.' == $entry['name'] || '..' == $entry['name'] ) + continue; + + $dirlist[ $entry['name'] ] = $entry; + } + + if ( ! $dirlist ) + return false; + + if ( empty($dirlist) ) + return array(); + + $ret = array(); + foreach ( $dirlist as $struc ) { + + if ( 'd' == $struc['type'] ) { + $struc['files'] = array(); + + if ( $incdot ){ + //We're including the doted starts + if( '.' != $struc['name'] && '..' != $struc['name'] ){ //Ok, It isnt a special folder + if ($recursive) + $struc['files'] = $this->dirlist($path . '/' . $struc['name'], $incdot, $recursive); + } + } else { //No dots + if ( $recursive ) + $struc['files'] = $this->dirlist($path . '/' . $struc['name'], $incdot, $recursive); + } + } + //File + $ret[$struc['name']] = $struc; + } + return $ret; + } + function __destruct() { + $this->debug("__destruct();"); + if ( $this->link ) + unset($this->link); + if ( $this->sftp_link ) + unset($this->sftp_link); + } +} + +?> diff --git a/wp-admin/includes/comment.php b/wp-admin/includes/comment.php index 8a47fe6d..0fd1533d 100644 --- a/wp-admin/includes/comment.php +++ b/wp-admin/includes/comment.php @@ -1,5 +1,21 @@ 'WordPress Dashboard', - 'id' => 'wp_dashboard', - 'before_widget' => "\t
      \n\n\t\t
      \n\n", - 'after_widget' => "\t\t
      \n\n\t
      \n\n", - 'before_title' => "\t\t\t

      ", - 'after_title' => "

      \n\n" - ) ); - - /* Register Widgets and Controls */ + // Right Now + wp_add_dashboard_widget( 'dashboard_right_now', __( 'Right Now' ), 'wp_dashboard_right_now' ); + // Recent Comments Widget - $mod_comments = wp_count_comments(); - $mod_comments = $mod_comments->moderated; - if ( current_user_can( 'moderate_comments' ) && $mod_comments ) { - $notice = sprintf( __ngettext( '%d comment awaiting moderation', '%d comments awaiting moderation', $mod_comments ), $mod_comments ); - $notice = "$notice"; - } else { - $notice = ''; - } - wp_register_sidebar_widget( 'dashboard_recent_comments', __( 'Recent Comments' ), 'wp_dashboard_recent_comments', - array( 'all_link' => 'edit-comments.php', 'notice' => $notice, 'width' => 'half' ) - ); + $recent_comments_title = __( 'Recent Comments' ); + wp_add_dashboard_widget( 'dashboard_recent_comments', $recent_comments_title, 'wp_dashboard_recent_comments' ); // Incoming Links Widget if ( !isset( $widget_options['dashboard_incoming_links'] ) || !isset( $widget_options['dashboard_incoming_links']['home'] ) || $widget_options['dashboard_incoming_links']['home'] != get_option('home') ) { @@ -42,25 +38,23 @@ function wp_dashboard_setup() { 'home' => get_option('home'), 'link' => apply_filters( 'dashboard_incoming_links_link', 'http://blogsearch.google.com/blogsearch?hl=en&scoring=d&partner=wordpress&q=link:' . trailingslashit( get_option('home') ) ), 'url' => apply_filters( 'dashboard_incoming_links_feed', 'http://blogsearch.google.com/blogsearch_feeds?hl=en&scoring=d&ie=utf-8&num=10&output=rss&partner=wordpress&q=link:' . trailingslashit( get_option('home') ) ), - 'items' => 5, - 'show_date' => 0 + 'items' => isset($widget_options['dashboard_incoming_links']['items']) ? $widget_options['dashboard_incoming_links']['items'] : 10, + 'show_date' => isset($widget_options['dashboard_incoming_links']['show_date']) ? $widget_options['dashboard_incoming_links']['show_date'] : false ); } - wp_register_sidebar_widget( 'dashboard_incoming_links', __( 'Incoming Links' ), 'wp_dashboard_empty', - array( 'all_link' => $widget_options['dashboard_incoming_links']['link'], 'feed_link' => $widget_options['dashboard_incoming_links']['url'], 'width' => 'half' ), - 'wp_dashboard_cached_rss_widget', 'wp_dashboard_incoming_links_output' - ); - wp_register_widget_control( 'dashboard_incoming_links', __( 'Incoming Links' ), 'wp_dashboard_rss_control', array(), - array( 'widget_id' => 'dashboard_incoming_links', 'form_inputs' => array( 'title' => false, 'show_summary' => false, 'show_author' => false ) ) - ); - + wp_add_dashboard_widget( 'dashboard_incoming_links', __( 'Incoming Links' ), 'wp_dashboard_incoming_links', 'wp_dashboard_incoming_links_control' ); // WP Plugins Widget - wp_register_sidebar_widget( 'dashboard_plugins', __( 'Plugins' ), 'wp_dashboard_empty', - array( 'all_link' => 'http://wordpress.org/extend/plugins/', 'feed_link' => 'http://wordpress.org/extend/plugins/rss/topics/', 'width' => 'half' ), - 'wp_dashboard_cached_rss_widget', 'wp_dashboard_plugins_output', - array( 'http://wordpress.org/extend/plugins/rss/browse/popular/', 'http://wordpress.org/extend/plugins/rss/browse/new/', 'http://wordpress.org/extend/plugins/rss/browse/updated/' ) - ); + if ( current_user_can( 'activate_plugins' ) ) + wp_add_dashboard_widget( 'dashboard_plugins', __( 'Plugins' ), 'wp_dashboard_plugins' ); + + // QuickPress Widget + if ( current_user_can('edit_posts') ) + wp_add_dashboard_widget( 'dashboard_quick_press', __( 'QuickPress' ), 'wp_dashboard_quick_press' ); + + // Recent Drafts + if ( current_user_can('edit_posts') ) + wp_add_dashboard_widget( 'dashboard_recent_drafts', __('Recent Drafts'), 'wp_dashboard_recent_drafts' ); // Primary feed (Dev Blog) Widget if ( !isset( $widget_options['dashboard_primary'] ) ) { @@ -75,14 +69,7 @@ function wp_dashboard_setup() { 'show_date' => 1 ); } - wp_register_sidebar_widget( 'dashboard_primary', $widget_options['dashboard_primary']['title'], 'wp_dashboard_empty', - array( 'all_link' => $widget_options['dashboard_primary']['link'], 'feed_link' => $widget_options['dashboard_primary']['url'], 'width' => 'half', 'class' => 'widget_rss' ), - 'wp_dashboard_cached_rss_widget', 'wp_dashboard_rss_output' - ); - wp_register_widget_control( 'dashboard_primary', __( 'Primary Feed' ), 'wp_dashboard_rss_control', array(), - array( 'widget_id' => 'dashboard_primary' ) - ); - + wp_add_dashboard_widget( 'dashboard_primary', $widget_options['dashboard_primary']['title'], 'wp_dashboard_primary', 'wp_dashboard_primary_control' ); // Secondary Feed (Planet) Widget if ( !isset( $widget_options['dashboard_secondary'] ) ) { @@ -91,60 +78,21 @@ function wp_dashboard_setup() { 'link' => apply_filters( 'dashboard_secondary_link', __( 'http://planet.wordpress.org/' ) ), 'url' => apply_filters( 'dashboard_secondary_feed', __( 'http://planet.wordpress.org/feed/' ) ), 'title' => apply_filters( 'dashboard_secondary_title', __( 'Other WordPress News' ) ), - 'items' => 15 + 'items' => 5 ); } - wp_register_sidebar_widget( 'dashboard_secondary', $widget_options['dashboard_secondary']['title'], 'wp_dashboard_empty', - array( 'all_link' => $widget_options['dashboard_secondary']['link'], 'feed_link' => $widget_options['dashboard_secondary']['url'], 'width' => 'full' ), - 'wp_dashboard_cached_rss_widget', 'wp_dashboard_secondary_output' - ); - wp_register_widget_control( 'dashboard_secondary', __( 'Secondary Feed' ), 'wp_dashboard_rss_control', array(), - array( 'widget_id' => 'dashboard_secondary', 'form_inputs' => array( 'show_summary' => false, 'show_author' => false, 'show_date' => false ) ) - ); - - - /* Dashboard Widget Template - wp_register_sidebar_widget( $widget_id (unique slug) , $widget_title, $output_callback, - array( - 'all_link' => full url for "See All" link, - 'feed_link' => full url for "RSS" link, - 'width' => 'fourth', 'third', 'half', 'full' (defaults to 'half'), - 'height' => 'single', 'double' (defaults to 'single'), - ), - $wp_dashboard_empty_callback (only needed if using 'wp_dashboard_empty' as your $output_callback), - $arg, $arg, $arg... (further args passed to callbacks) - ); - - // optional: if you want users to be able to edit the settings of your widget, you need to register a widget_control - wp_register_widget_control( $widget_id, $widget_control_title, $control_output_callback, - array(), // leave an empty array here: oddity in widget code - array( - 'widget_id' => $widget_id, // Yes - again. This is required: oddity in widget code - 'arg' => an arg to pass to the $control_output_callback, - 'another' => another arg to pass to the $control_output_callback, - ... - ) - ); - */ + wp_add_dashboard_widget( 'dashboard_secondary', $widget_options['dashboard_secondary']['title'], 'wp_dashboard_secondary', 'wp_dashboard_secondary_control' ); // Hook to register new widgets do_action( 'wp_dashboard_setup' ); - // Hard code the sidebar's widgets and order - $dashboard_widgets = array(); - $dashboard_widgets[] = 'dashboard_recent_comments'; - $dashboard_widgets[] = 'dashboard_incoming_links'; - $dashboard_widgets[] = 'dashboard_primary'; - if ( current_user_can( 'activate_plugins' ) ) - $dashboard_widgets[] = 'dashboard_plugins'; - $dashboard_widgets[] = 'dashboard_secondary'; - // Filter widget order - $dashboard_widgets = apply_filters( 'wp_dashboard_widgets', $dashboard_widgets ); - - $wp_dashboard_sidebars = array( 'wp_dashboard' => $dashboard_widgets, 'array_version' => 3.5 ); + $dashboard_widgets = apply_filters( 'wp_dashboard_widgets', array() ); - add_filter( 'dynamic_sidebar_params', 'wp_dashboard_dynamic_sidebar_params' ); + foreach ( $dashboard_widgets as $widget_id ) { + $name = empty( $wp_registered_widgets[$widget_id]['all_link'] ) ? $wp_registered_widgets[$widget_id]['name'] : $wp_registered_widgets[$widget_id]['name'] . " " . __('View all') . ''; + wp_add_dashboard_widget( $widget_id, $name, $wp_registered_widgets[$widget_id]['callback'], $wp_registered_widget_controls[$widget_id]['callback'] ); + } if ( 'POST' == $_SERVER['REQUEST_METHOD'] && isset($_POST['widget_id']) ) { ob_start(); // hack - but the same hack wp-admin/widgets.php uses @@ -156,162 +104,469 @@ function wp_dashboard_setup() { if ( $update ) update_option( 'dashboard_widget_options', $widget_options ); + + do_action('do_meta_boxes', 'dashboard', 'normal', ''); + do_action('do_meta_boxes', 'dashboard', 'side', ''); } -// Echoes out the dashboard -function wp_dashboard() { - echo "
      \n\n"; +function wp_add_dashboard_widget( $widget_id, $widget_name, $callback, $control_callback = null ) { + global $wp_dashboard_control_callbacks; + if ( $control_callback && current_user_can( 'edit_dashboard' ) && is_callable( $control_callback ) ) { + $wp_dashboard_control_callbacks[$widget_id] = $control_callback; + if ( isset( $_GET['edit'] ) && $widget_id == $_GET['edit'] ) { + list($url) = explode( '#', add_query_arg( 'edit', false ), 2 ); + $widget_name .= ' ' . __( 'Cancel' ) . ''; + add_meta_box( $widget_id, $widget_name, '_wp_dashboard_control_callback', 'dashboard', 'normal', 'core' ); + return; + } + list($url) = explode( '#', add_query_arg( 'edit', $widget_id ), 2 ); + $widget_name .= ' ' . __( 'Configure' ) . ''; + } + $side_widgets = array('dashboard_quick_press', 'dashboard_recent_drafts', 'dashboard_primary', 'dashboard_secondary'); + $location = 'normal'; + if ( in_array($widget_id, $side_widgets) ) + $location = 'side'; + add_meta_box( $widget_id, $widget_name , $callback, 'dashboard', $location, 'core' ); +} - // We're already filtering dynamic_sidebar_params obove - add_filter( 'option_sidebars_widgets', 'wp_dashboard_sidebars_widgets' ); // here there be hackery - dynamic_sidebar( 'wp_dashboard' ); - remove_filter( 'option_sidebars_widgets', 'wp_dashboard_sidebars_widgets' ); +function _wp_dashboard_control_callback( $dashboard, $meta_box ) { + echo '
      '; + wp_dashboard_trigger_widget_control( $meta_box['id'] ); + echo "

      "; - echo "
      \n
      \n\n\n"; + echo ''; } -// Makes sidebar_widgets option reflect the dashboard settings -function wp_dashboard_sidebars_widgets() { // hackery - return $GLOBALS['wp_dashboard_sidebars']; +/** + * Displays the dashboard. + * + * @since unknown + */ +function wp_dashboard() { + echo "
      \n\n"; + + echo "
      \n\n"; + $class = do_meta_boxes( 'dashboard', 'side', '' ) ? ' class="has-sidebar"' : ''; + echo "
      \n\n"; + + echo "
      \n\n"; + echo "
      \n\n"; + do_meta_boxes( 'dashboard', 'normal', '' ); + echo "
      \n\n"; + echo "
      \n\n"; + + echo "
      \n

      \n"; + wp_nonce_field( 'closedpostboxes', 'closedpostboxesnonce', false ); + wp_nonce_field( 'meta-box-order', 'meta-box-order-nonce', false ); + echo "

      \n
      \n"; + + echo "
      "; } -// Modifies sidbar params on the fly to set up ids, class names, titles for each widget (called once per widget) -// Switches widget to edit mode if $_GET['edit'] -function wp_dashboard_dynamic_sidebar_params( $params ) { - global $wp_registered_widgets, $wp_registered_widget_controls; - - $sidebar_defaults = array('widget_id' => 0, 'before_widget' => '', 'after_widget' => '', 'before_title' => '', 'after_title' => ''); - extract( $sidebar_defaults, EXTR_PREFIX_ALL, 'sidebar' ); - extract( $params[0], EXTR_PREFIX_ALL, 'sidebar' ); - - if ( !isset($wp_registered_widgets[$sidebar_widget_id]) || !is_array($wp_registered_widgets[$sidebar_widget_id]) ) { - return $params; - } - $widget_defaults = array('id' => '', 'width' => '', 'height' => '', 'class' => '', 'feed_link' => '', 'all_link' => '', 'notice' => false, 'error' => false); - extract( $widget_defaults, EXTR_PREFIX_ALL, 'widget' ); - extract( $wp_registered_widgets[$sidebar_widget_id], EXTR_PREFIX_ALL, 'widget' ); - - $the_classes = array(); - if ( in_array($widget_width, array( 'third', 'fourth', 'full' ) ) ) - $the_classes[] = $widget_width; - - if ( 'double' == $widget_height ) - $the_classes[] = 'double'; - - if ( $widget_class ) - $the_classes[] = $widget_class; - - // Add classes to the widget holder - if ( $the_classes ) - $sidebar_before_widget = str_replace( "
      ' . __( 'See All' ) . ''; - - $content_class = 'dashboard-widget-content'; - if ( current_user_can( 'edit_dashboard' ) && isset($wp_registered_widget_controls[$widget_id]) && is_callable($wp_registered_widget_controls[$widget_id]['callback']) ) { - // Switch this widget to edit mode - if ( isset($_GET['edit']) && $_GET['edit'] == $widget_id ) { - $content_class .= ' dashboard-widget-control'; - $wp_registered_widgets[$widget_id]['callback'] = 'wp_dashboard_empty'; - $sidebar_widget_name = $wp_registered_widget_controls[$widget_id]['name']; - $params[1] = 'wp_dashboard_trigger_widget_control'; - $sidebar_before_widget .= '
      '; - $sidebar_after_widget = "
      $sidebar_after_widget"; - $links[] = '' . __( 'Cancel' ) . ''; - } else { - $links[] = '' . __( 'Edit' ) . ''; - } - } +/* Dashboard Widgets */ - if ( $widget_feed_link ) - $links[] = '' . __( 'rss icon' ) . ' ' . __( 'RSS' ) . ''; +function wp_dashboard_right_now() { + $num_posts = wp_count_posts( 'post' ); + $num_pages = wp_count_posts( 'page' ); - $links = apply_filters( "wp_dashboard_widget_links_$widget_id", $links ); + $num_cats = wp_count_terms('category'); - // Add links to widget's title bar - if ( $links ) { - $sidebar_before_title .= ''; - $sidebar_after_title = '' . join( ' | ', $links ) . "
      $sidebar_after_title"; - } + $num_tags = wp_count_terms('post_tag'); - // Could have put this in widget-content. Doesn't really matter - if ( $widget_notice ) - $sidebar_after_title .= "\t\t\t
      $widget_notice
      \n\n"; + $num_comm = wp_count_comments( ); - if ( $widget_error ) - $sidebar_after_title .= "\t\t\t
      $widget_error
      \n\n"; + echo "\n\t".'

      ' . __('At a Glance') . '

      '; + echo "\n\t".'
      '."\n\t".''; + echo "\n\t".''; - $sidebar_after_title .= "\t\t\t
      \n\n"; + // Posts + $num = number_format_i18n( $num_posts->publish ); + $text = __ngettext( 'Post', 'Posts', intval($num_posts->publish) ); + if ( current_user_can( 'edit_posts' ) ) { + $num = "$num"; + $text = "$text"; + } + echo '
      '; + echo ''; + /* TODO: Show status breakdown on hover + if ( $can_edit_pages && !empty($num_pages->publish) ) { // how many pages is not exposed in feeds. Don't show if !current_user_can + $post_type_texts[] = ''.sprintf( __ngettext( '%s page', '%s pages', $num_pages->publish ), number_format_i18n( $num_pages->publish ) ).''; + } + if ( $can_edit_posts && !empty($num_posts->draft) ) { + $post_type_texts[] = ''.sprintf( __ngettext( '%s draft', '%s drafts', $num_posts->draft ), number_format_i18n( $num_posts->draft ) ).''; + } + if ( $can_edit_posts && !empty($num_posts->future) ) { + $post_type_texts[] = ''.sprintf( __ngettext( '%s scheduled post', '%s scheduled posts', $num_posts->future ), number_format_i18n( $num_posts->future ) ).''; + } + if ( current_user_can('publish_posts') && !empty($num_posts->pending) ) { + $pending_text = sprintf( __ngettext( 'There is %2$s post pending your review.', 'There are %2$s posts pending your review.', $num_posts->pending ), 'edit.php?post_status=pending', number_format_i18n( $num_posts->pending ) ); + } else { + $pending_text = ''; + } + */ + + // Total Comments + $num = number_format_i18n($num_comm->total_comments); + $text = __ngettext( 'Comment', 'Comments', $num_comm->total_comments ); + if ( current_user_can( 'moderate_comments' ) ) { + $num = "$num"; + $text = "$text"; + } + echo ''; + echo ''; - $sidebar_after_widget .= "\t\t\t\n\n"; + echo ''; - foreach( array_keys( $params[0] ) as $key ) - $$key = ${'sidebar_' . $key}; + // Pages + $num = number_format_i18n( $num_pages->publish ); + $text = __ngettext( 'Page', 'Pages', $num_pages->publish ); + if ( current_user_can( 'edit_pages' ) ) { + $num = "$num"; + $text = "$text"; + } + echo ''; + echo ''; + + // Approved Comments + $num = number_format_i18n($num_comm->approved); + $text = __ngettext( 'Approved', 'Approved', $num_comm->approved ); + if ( current_user_can( 'moderate_comments' ) ) { + $num = "$num"; + $text = "$text"; + } + echo ''; + echo ''; - $params[0] = compact( array_keys( $params[0] ) ); + echo "\n\t"; - return $params; -} + // Categories + $num = number_format_i18n( $num_cats ); + $text = __ngettext( 'Category', 'Categories', $num_cats ); + if ( current_user_can( 'manage_categories' ) ) { + $num = "$num"; + $text = "$text"; + } + echo ''; + echo ''; + + // Pending Comments + $num = number_format_i18n($num_comm->moderated); + $text = __ngettext( 'Pending', 'Pending', $num_comm->moderated ); + if ( current_user_can( 'moderate_comments' ) ) { + $num = "$num"; + $text = "$text"; + } + echo ''; + echo ''; + echo "\n\t"; -/* Dashboard Widgets */ + // Tags + $num = number_format_i18n( $num_tags ); + $text = __ngettext( 'Tag', 'Tags', $num_tags ); + if ( current_user_can( 'manage_categories' ) ) { + $num = "$num"; + $text = "$text"; + } + echo ''; + echo ''; + + // Spam Comments + $num = number_format_i18n($num_comm->spam); + $text = __ngettext( 'Spam', 'Spam', $num_comm->spam ); + if ( current_user_can( 'moderate_comments' ) ) { + $num = "$num"; + $text = "$text"; + } + echo ''; + echo ''; + + echo ""; + do_action('right_now_table_end'); + echo "\n\t
      ' . $num . '' . $text . '' . $num . '' . $text . '
      ' . $num . '' . $text . '' . $num . '' . $text . '
      ' . $num . '' . $text . '' . $num . '' . $text . '
      ' . $num . '' . $text . '' . $num . '' . $text . '
      \n\t
      "; + + echo "\n\t".'
      '; + $ct = current_theme_info(); + $sidebars_widgets = wp_get_sidebars_widgets(); + $num_widgets = array_reduce( $sidebars_widgets, create_function( '$prev, $curr', 'return $prev+count($curr);' ), 0 ); + $num = number_format_i18n( $num_widgets ); + + echo "\n\t

      "; + if ( current_user_can( 'switch_themes' ) ) { + echo '' . __('Change Theme') . ''; + printf(__ngettext('Theme %1$s with %2$s Widget', 'Theme %1$s with %2$s Widgets', $num_widgets), $ct->title, $num); + } else { + printf(__ngettext('Theme %1$s with %2$s Widget', 'Theme %1$s with %2$s Widgets', $num_widgets), $ct->title, $num); + } + + echo '

      '; -function wp_dashboard_recent_comments( $sidebar_args ) { - global $comment; - extract( $sidebar_args, EXTR_SKIP ); + update_right_now_message(); - echo $before_widget; + echo "\n\t".'
      '; + do_action( 'rightnow_end' ); + do_action( 'activity_box_end' ); +} - echo $before_title; - echo $widget_name; - echo $after_title; +function wp_dashboard_quick_press() { + $drafts = false; + if ( 'post' === strtolower( $_SERVER['REQUEST_METHOD'] ) && isset( $_POST['action'] ) && 0 === strpos( $_POST['action'], 'post-quickpress' ) && (int) $_POST['post_ID'] ) { + $view = get_permalink( $_POST['post_ID'] ); + $edit = clean_url( get_edit_post_link( $_POST['post_ID'] ) ); + if ( 'post-quickpress-publish' == $_POST['action'] ) { + if ( current_user_can('publish_posts') ) + printf( '

      ' . __( 'Post Published. View post | Edit post' ) . '

      ', clean_url( $view ), $edit ); + else + printf( '

      ' . __( 'Post submitted. Preview post | Edit post' ) . '

      ', clean_url( add_query_arg( 'preview', 1, $view ) ), $edit ); + } else { + printf( '

      ' . __( 'Draft Saved. Preview post | Edit post' ) . '

      ', clean_url( add_query_arg( 'preview', 1, $view ) ), $edit ); + $drafts_query = new WP_Query( array( + 'post_type' => 'post', + 'what_to_show' => 'posts', + 'post_status' => 'draft', + 'author' => $GLOBALS['current_user']->ID, + 'posts_per_page' => 1, + 'orderby' => 'modified', + 'order' => 'DESC' + ) ); + + if ( $drafts_query->posts ) + $drafts =& $drafts_query->posts; + } + printf('

      ' . __('You can also try %s, easy blogging from anywhere on the Web.') . '

      ', '' . __('Press This') . '' ); + $_REQUEST = array(); // hack for get_default_post_to_edit() + } - $lambda = create_function( '', 'return 5;' ); - add_filter( 'option_posts_per_rss', $lambda ); // hack - comments query doesn't accept per_page parameter - $comments_query = new WP_Query(array('feed' => 'rss2', 'withcomments' => 1)); - remove_filter( 'option_posts_per_rss', $lambda ); + $post = get_default_post_to_edit(); +?> - $is_first = true; +
      +

      +
      + +
      + + +
      + +
      + + +

      +
      + +
      + + + +

      +
      + +
      + +

      + + + + + + + + + + +
      +

      + +
      - if ( $comments_query->have_comments() ) { - while ( $comments_query->have_comments() ) { $comments_query->the_comment(); +comment_post_ID ); - $comment_post_title = get_the_title( $comment->comment_post_ID ); - $comment_post_link = "$comment_post_title"; - $comment_link = '#'; - $comment_meta = sprintf( __( 'From %1$s on %2$s %3$s' ), get_comment_author(), $comment_post_link, $comment_link ); +function wp_dashboard_recent_drafts( $drafts = false ) { + if ( !$drafts ) { + $drafts_query = new WP_Query( array( + 'post_type' => 'post', + 'what_to_show' => 'posts', + 'post_status' => 'draft', + 'author' => $GLOBALS['current_user']->ID, + 'posts_per_page' => 5, + 'orderby' => 'modified', + 'order' => 'DESC' + ) ); + $drafts =& $drafts_query->posts; + } - if ( $is_first ) : $is_first = false; + if ( $drafts && is_array( $drafts ) ) { + $list = array(); + foreach ( $drafts as $draft ) { + $url = get_edit_post_link( $draft->ID ); + $title = _draft_or_post_title( $draft->ID ); + $item = "

      $title " . get_the_time( get_option( 'date_format' ), $draft ) . '

      '; + if ( $the_content = preg_split( '#\s#', strip_tags( $draft->post_content ), 11, PREG_SPLIT_NO_EMPTY ) ) + $item .= '

      ' . join( ' ', array_slice( $the_content, 0, 10 ) ) . ( 10 < count( $the_content ) ? '…' : '' ) . '

      '; + $list[] = $item; + } ?> -

      -

      +
        +
      • \n
      • ", $list ); ?>
      • +
      +

      comment_count > 1 ) : ?> -
        + } else { + _e('There are no drafts at the moment'); + } +} + +/** + * Display recent comments dashboard widget content. + * + * @since unknown + */ +function wp_dashboard_recent_comments() { + global $wpdb; + + if ( current_user_can('edit_posts') ) + $allowed_states = array('0', '1'); + else + $allowed_states = array('1'); + + // Select all comment types and filter out spam later for better query performance. + $comments = array(); + $start = 0; + + while ( count( $comments ) < 5 && $possible = $wpdb->get_results( "SELECT * FROM $wpdb->comments ORDER BY comment_date_gmt DESC LIMIT $start, 50" ) ) { + + foreach ( $possible as $comment ) { + if ( count( $comments ) >= 5 ) + break; + if ( in_array( $comment->comment_approved, $allowed_states ) ) + $comments[] = $comment; + } + + $start = $start + 50; + } + + if ( $comments ) : +?> + +
        -
      • +
        + +

        + + +

        - if ( $comments_query->comment_count > 1 ) : ?> -
      comment_post_ID ); + $comment_post_title = get_the_title( $comment->comment_post_ID ); + $comment_post_link = "$comment_post_title"; + $comment_link = '#'; + + $delete_url = clean_url( wp_nonce_url( "comment.php?action=deletecomment&p=$comment->comment_post_ID&c=$comment->comment_ID", "delete-comment_$comment->comment_ID" ) ); + $approve_url = clean_url( wp_nonce_url( "comment.php?action=approvecomment&p=$comment->comment_post_ID&c=$comment->comment_ID", "approve-comment_$comment->comment_ID" ) ); + $unapprove_url = clean_url( wp_nonce_url( "comment.php?action=unapprovecomment&p=$comment->comment_post_ID&c=$comment->comment_ID", "unapprove-comment_$comment->comment_ID" ) ); + $spam_url = clean_url( wp_nonce_url( "comment.php?action=deletecomment&dt=spam&p=$comment->comment_post_ID&c=$comment->comment_ID", "delete-comment_$comment->comment_ID" ) ); + + $actions = array(); + + $actions_string = ''; + if ( current_user_can('edit_post', $comment->comment_post_ID) ) { + $actions['approve'] = "" . __( 'Approve' ) . ''; + $actions['unapprove'] = "" . __( 'Unapprove' ) . ''; + $actions['edit'] = "". __('Edit') . ''; + //$actions['quickedit'] = '' . __('Quick Edit') . ''; + $actions['reply'] = '' . __('Reply') . ''; + $actions['spam'] = "" . _c( 'Spam|verb' ) . ''; + $actions['delete'] = "" . __('Delete') . ''; + + $actions = apply_filters( 'comment_row_actions', $actions, $comment ); + + $i = 0; + foreach ( $actions as $action => $link ) { + ++$i; + ( ( ('approve' == $action || 'unapprove' == $action) && 2 === $i ) || 1 === $i ) ? $sep = '' : $sep = ' | '; + // Reply and quickedit need a hide-if-no-js span + if ( 'reply' == $action || 'quickedit' == $action ) + $action .= ' hide-if-no-js'; + + $actions_string .= "$sep$link"; + } } - echo $after_widget; +?> + +
      comment_ID) ) ); ?>> + comment_type || 'comment' == $comment->comment_type ) : ?> + + +

      ' . get_comment_author_link() . '', $comment_post_link." ".$comment_link, ' ' . __( '[Pending]' ) . '' ); ?>

      + + comment_type ) : + case 'pingback' : + $type = __( 'Pingback' ); + break; + case 'trackback' : + $type = __( 'Trackback' ); + break; + default : + $type = ucwords( $comment->comment_type ); + endswitch; + $type = wp_specialchars( $type ); + ?> + +

      $type", $comment_post_link ); ?>

      +

      + + +

      +

      + + + +
      + false, 'show_summary' => false, 'show_author' => false ) ); +} + +function wp_dashboard_primary() { + wp_dashboard_cached_rss_widget( 'dashboard_primary', 'wp_dashboard_rss_output' ); +} + +function wp_dashboard_primary_control() { + wp_dashboard_rss_control( 'dashboard_primary' ); +} + +/** + * {@internal Missing Short Description}} + * + * @since unknown + * + * @param int $widget_id + */ function wp_dashboard_rss_output( $widget_id ) { $widgets = get_option( 'dashboard_widget_options' ); + echo "
      "; wp_widget_rss_output( $widgets[$widget_id] ); + echo "
      "; +} + +function wp_dashboard_secondary() { + wp_dashboard_cached_rss_widget( 'dashboard_secondary', 'wp_dashboard_secondary_output' ); +} + +function wp_dashboard_secondary_control() { + wp_dashboard_rss_control( 'dashboard_secondary' ); } -// $sidebar_args are handled by wp_dashboard_empty() +/** + * Display secondary dashboard RSS widget feed. + * + * @since unknown + * + * @return unknown + */ function wp_dashboard_secondary_output() { $widgets = get_option( 'dashboard_widget_options' ); @extract( @$widgets['dashboard_secondary'], EXTR_SKIP ); $rss = @fetch_rss( $url ); + if ( !isset($rss->items) || 0 == count($rss->items) ) return false; - echo "
        \n"; - $rss->items = array_slice($rss->items, 0, $items); - foreach ($rss->items as $item ) { - $title = wp_specialchars($item['title']); - list($author,$post) = explode( ':', $title, 2 ); - $link = clean_url($item['link']); - echo "\t
      • $post$author
      • \n"; + if ( 'http://planet.wordpress.org/' == $rss->channel['link'] ) { + foreach ( array_keys($rss->items) as $i ) { + list($site, $description) = explode( ':', wp_specialchars($rss->items[$i]['title']), 2 ); + $rss->items[$i]['dc']['creator'] = trim($site); + $rss->items[$i]['title'] = trim($description); + } } - echo "
      \n
      \n"; + echo "
      "; + wp_widget_rss_output( $rss, $widgets['dashboard_secondary'] ); + echo "
      "; } -// $sidebar_args are handled by wp_dashboard_empty() +function wp_dashboard_plugins() { + wp_dashboard_cached_rss_widget( 'dashboard_plugins', 'wp_dashboard_plugins_output', array( + 'http://wordpress.org/extend/plugins/rss/browse/popular/', + 'http://wordpress.org/extend/plugins/rss/browse/new/', + 'http://wordpress.org/extend/plugins/rss/browse/updated/' + ) ); +} + +/** + * Display plugins most popular, newest plugins, and recently updated widget text. + * + * @since unknown + */ function wp_dashboard_plugins_output() { $popular = @fetch_rss( 'http://wordpress.org/extend/plugins/rss/browse/popular/' ); $new = @fetch_rss( 'http://wordpress.org/extend/plugins/rss/browse/new/' ); @@ -433,18 +736,35 @@ function wp_dashboard_plugins_output() { list($link, $frag) = explode( '#', $item['link'] ); $link = clean_url($link); - $dlink = rtrim($link, '/') . '/download/'; + if( preg_match('|/([^/]+?)/?$|', $link, $matches) ) + $slug = $matches[1]; + else + $slug = ''; + + $ilink = wp_nonce_url('plugin-install.php?tab=plugin-information&plugin=' . $slug, 'install-plugin_' . $slug) . + '&TB_iframe=true&width=600&height=800'; echo "

      $label

      \n"; - echo "
      $title
       (" . __( 'Download' ) . ")\n"; + echo "
      $title
       (" . __( 'Install' ) . ")\n"; echo "

      $description

      \n"; } } -// Checks to see if all of the feed url in $check_urls are cached. -// If $check_urls is empty, look for the rss feed url found in the dashboard widget optios of $widget_id. -// If cached, call $callback, a function that echoes out output for this widget. -// If not cache, echo a "Loading..." stub which is later replaced by AJAX call (see top of /wp-admin/index.php) +/** + * Checks to see if all of the feed url in $check_urls are cached. + * + * If $check_urls is empty, look for the rss feed url found in the dashboard + * widget optios of $widget_id. If cached, call $callback, a function that + * echoes out output for this widget. If not cache, echo a "Loading..." stub + * which is later replaced by AJAX call (see top of /wp-admin/index.php) + * + * @since unknown + * + * @param int $widget_id + * @param callback $callback + * @param array $check_urls RSS feeds + * @return bool False on failure. True on success. + */ function wp_dashboard_cached_rss_widget( $widget_id, $callback, $check_urls = array() ) { $loading = '

      ' . __( 'Loading…' ) . '

      '; @@ -480,42 +800,36 @@ function wp_dashboard_cached_rss_widget( $widget_id, $callback, $check_urls = ar return true; } -// Empty widget used for JS/AJAX created output. -// Callback inserts content between before_widget and after_widget. Used when widget is in edit mode. Can also be used for custom widgets. -function wp_dashboard_empty( $sidebar_args, $callback = false ) { - extract( $sidebar_args, EXTR_SKIP ); - - echo $before_widget; - - echo $before_title; - echo $widget_name; - echo $after_title; - - // When in edit mode, the callback passed to this function is the widget_control callback - if ( $callback && is_callable( $callback ) ) { - $args = array_slice( func_get_args(), 2 ); - array_unshift( $args, $widget_id ); - call_user_func_array( $callback, $args ); - } - - echo $after_widget; -} - -/* Dashboard Widgets Controls. Ssee also wp_dashboard_empty() */ +/* Dashboard Widgets Controls */ // Calls widget_control callback +/** + * Calls widget control callback. + * + * @since unknown + * + * @param int $widget_control_id Registered Widget ID. + */ function wp_dashboard_trigger_widget_control( $widget_control_id = false ) { - global $wp_registered_widget_controls; - if ( is_scalar($widget_control_id) && $widget_control_id && isset($wp_registered_widget_controls[$widget_control_id]) && is_callable($wp_registered_widget_controls[$widget_control_id]['callback']) ) - call_user_func_array( $wp_registered_widget_controls[$widget_control_id]['callback'], $wp_registered_widget_controls[$widget_control_id]['params'] ); -} + global $wp_dashboard_control_callbacks; -// Sets up $args to be used as input to wp_widget_rss_form(), handles POST data from RSS-type widgets -function wp_dashboard_rss_control( $args ) { - extract( $args ); - if ( !$widget_id ) - return false; + if ( is_scalar($widget_control_id) && $widget_control_id && isset($wp_dashboard_control_callbacks[$widget_control_id]) && is_callable($wp_dashboard_control_callbacks[$widget_control_id]) ) { + call_user_func( $wp_dashboard_control_callbacks[$widget_control_id], '', array( 'id' => $widget_control_id, 'callback' => $wp_dashboard_control_callbacks[$widget_control_id] ) ); + } +} +/** + * The RSS dashboard widget control. + * + * Sets up $args to be used as input to wp_widget_rss_form(). Handles POST data + * from RSS-type widgets. + * + * @since unknown + * + * @param string widget_id + * @param array form_inputs + */ +function wp_dashboard_rss_control( $widget_id, $form_inputs = array() ) { if ( !$widget_options = get_option( 'dashboard_widget_options' ) ) $widget_options = array(); @@ -540,4 +854,9 @@ function wp_dashboard_rss_control( $args ) { wp_widget_rss_form( $widget_options[$widget_id], $form_inputs ); } +/** + * Empty function usable by plugins to output empty dashboard widget (to be populated later by JS). + */ +function wp_dashboard_empty() {} + ?> diff --git a/wp-admin/includes/export.php b/wp-admin/includes/export.php index 00201fab..4905b975 100644 --- a/wp-admin/includes/export.php +++ b/wp-admin/includes/export.php @@ -1,8 +1,28 @@ get_col("SELECT ID FROM $wpdb->posts $where ORDER BY post_dat $categories = (array) get_categories('get=all'); $tags = (array) get_tags('get=all'); +/** + * {@internal Missing Short Description}} + * + * @since unknown + * + * @param unknown_type $categories + */ function wxr_missing_parents($categories) { if ( !is_array($categories) || empty($categories) ) return array(); @@ -61,6 +88,13 @@ while ( ( $cat = array_shift($categories) ) && ++$pass < $passes ) { } unset($categories); +/** + * Place string in CDATA tag. + * + * @since unknown + * + * @param string $str String to place in XML CDATA tag. + */ function wxr_cdata($str) { if ( seems_utf8($str) == false ) $str = utf8_encode($str); @@ -72,6 +106,13 @@ function wxr_cdata($str) { return $str; } +/** + * {@internal Missing Short Description}} + * + * @since unknown + * + * @return string Site URL. + */ function wxr_site_url() { global $current_site; @@ -85,6 +126,13 @@ function wxr_site_url() { } } +/** + * {@internal Missing Short Description}} + * + * @since unknown + * + * @param object $c Category Object + */ function wxr_cat_name($c) { if ( empty($c->name) ) return; @@ -92,6 +140,13 @@ function wxr_cat_name($c) { echo '' . wxr_cdata($c->name) . ''; } +/** + * {@internal Missing Short Description}} + * + * @since unknown + * + * @param object $c Category Object + */ function wxr_category_description($c) { if ( empty($c->description) ) return; @@ -99,6 +154,13 @@ function wxr_category_description($c) { echo '' . wxr_cdata($c->description) . ''; } +/** + * {@internal Missing Short Description}} + * + * @since unknown + * + * @param object $t Tag Object + */ function wxr_tag_name($t) { if ( empty($t->name) ) return; @@ -106,6 +168,13 @@ function wxr_tag_name($t) { echo '' . wxr_cdata($t->name) . ''; } +/** + * {@internal Missing Short Description}} + * + * @since unknown + * + * @param object $t Tag Object + */ function wxr_tag_description($t) { if ( empty($t->description) ) return; @@ -113,6 +182,11 @@ function wxr_tag_description($t) { echo '' . wxr_cdata($t->description) . ''; } +/** + * {@internal Missing Short Description}} + * + * @since unknown + */ function wxr_post_taxonomy() { $categories = get_the_category(); $tags = get_the_tags(); @@ -148,7 +222,7 @@ echo '\n"; - + @@ -159,6 +233,7 @@ echo '\n"; \n"; $where = "WHERE ID IN (".join(',', $next_posts).")"; $posts = $wpdb->get_results("SELECT * FROM $wpdb->posts $where ORDER BY post_date_gmt ASC"); foreach ($posts as $post) { + // Don't export revisions. They bloat the export. + if ( 'revision' == $post->post_type ) + continue; setup_postdata($post); ?> <?php echo apply_filters('the_title_rss', $post->post_title); ?> diff --git a/wp-admin/includes/file.php b/wp-admin/includes/file.php index 349feb2e..cddfaa92 100644 --- a/wp-admin/includes/file.php +++ b/wp-admin/includes/file.php @@ -1,23 +1,70 @@ __( 'Main Index Template' ), 'style.css' => __( 'Stylesheet' ), 'rtl.css' => __( 'RTL Stylesheet' ), 'comments.php' => __( 'Comments' ), 'comments-popup.php' => __( 'Popup Comments' ), 'footer.php' => __( 'Footer' ), 'header.php' => __( 'Header' ), 'sidebar.php' => __( 'Sidebar' ), 'archive.php' => __( 'Archives' ), 'category.php' => __( 'Category Template' ), 'page.php' => __( 'Page Template' ), 'search.php' => __( 'Search Results' ), 'searchform.php' => __( 'Search Form' ), 'single.php' => __( 'Single Post' ), '404.php' => __( '404 Template' ), 'link.php' => __( 'Links Template' ), 'functions.php' => __( 'Theme Functions' ), 'attachment.php' => __( 'Attachment Template' ), 'my-hacks.php' => __( 'my-hacks.php (legacy hacks support)' ), '.htaccess' => __( '.htaccess (for rewrite rules )' ), +/** + * File contains all the administration image manipulation functions. + * + * @package WordPress + * @subpackage Administration + */ + +/** The descriptions for theme files. */ +$wp_file_descriptions = array ( + 'index.php' => __( 'Main Index Template' ), + 'style.css' => __( 'Stylesheet' ), + 'rtl.css' => __( 'RTL Stylesheet' ), + 'comments.php' => __( 'Comments' ), + 'comments-popup.php' => __( 'Popup Comments' ), + 'footer.php' => __( 'Footer' ), + 'header.php' => __( 'Header' ), + 'sidebar.php' => __( 'Sidebar' ), + 'archive.php' => __( 'Archives' ), + 'category.php' => __( 'Category Template' ), + 'page.php' => __( 'Page Template' ), + 'search.php' => __( 'Search Results' ), + 'searchform.php' => __( 'Search Form' ), + 'single.php' => __( 'Single Post' ), + '404.php' => __( '404 Template' ), + 'link.php' => __( 'Links Template' ), + 'functions.php' => __( 'Theme Functions' ), + 'attachment.php' => __( 'Attachment Template' ), + 'image.php' => __('Image Attachment Template'), + 'video.php' => __('Video Attachment Template'), + 'audio.php' => __('Audio Attachment Template'), + 'application.php' => __('Application Attachment Template'), + 'my-hacks.php' => __( 'my-hacks.php (legacy hacks support)' ), + '.htaccess' => __( '.htaccess (for rewrite rules )' ), // Deprecated files 'wp-layout.css' => __( 'Stylesheet' ), 'wp-comments.php' => __( 'Comments Template' ), 'wp-comments-popup.php' => __( 'Popup Comments Template' )); + +/** + * {@internal Missing Short Description}} + * + * @since unknown + * + * @param unknown_type $file + * @return unknown + */ function get_file_description( $file ) { global $wp_file_descriptions; if ( isset( $wp_file_descriptions[basename( $file )] ) ) { return $wp_file_descriptions[basename( $file )]; } - elseif ( file_exists( ABSPATH . $file ) && is_file( ABSPATH . $file ) ) { - $template_data = implode( '', file( ABSPATH . $file ) ); - if ( preg_match( "|Template Name:(.*)|i", $template_data, $name )) - return $name[1]; + elseif ( file_exists( WP_CONTENT_DIR . $file ) && is_file( WP_CONTENT_DIR . $file ) ) { + $template_data = implode( '', file( WP_CONTENT_DIR . $file ) ); + if ( preg_match( '|Template Name:(.*)$|mi', $template_data, $name )) + return $name[1] . ' Page Template'; } return basename( $file ); } +/** + * {@internal Missing Short Description}} + * + * @since unknown + * + * @return unknown + */ function get_home_path() { $home = get_option( 'home' ); if ( $home != '' && $home != get_option( 'siteurl' ) ) { @@ -32,6 +79,14 @@ function get_home_path() { return $home_path; } +/** + * {@internal Missing Short Description}} + * + * @since unknown + * + * @param unknown_type $file + * @return unknown + */ function get_real_file_to_edit( $file ) { if ('index.php' == $file || '.htaccess' == $file ) { $real_file = get_home_path() . $file; @@ -41,8 +96,16 @@ function get_real_file_to_edit( $file ) { return $real_file; } -//$folder = Full path to folder -//$levels = Levels of folders to follow, Default: 100 (PHP Loop limit) + +/** + * {@internal Missing Short Description}} + * + * @since unknown + * + * @param string $folder Optional. Full path to folder + * @param int $levels Optional. Levels of folders to follow, Default: 100 (PHP Loop limit). + * @return bool|array + */ function list_files( $folder = '', $levels = 100 ) { if( empty($folder) ) return false; @@ -70,6 +133,13 @@ function list_files( $folder = '', $levels = 100 ) { return $files; } +/** + * {@internal Missing Short Description}} + * + * @since unknown + * + * @return unknown + */ function get_temp_dir() { if ( defined('WP_TEMP_DIR') ) return trailingslashit(WP_TEMP_DIR); @@ -84,6 +154,15 @@ function get_temp_dir() { return '/tmp/'; } +/** + * {@internal Missing Short Description}} + * + * @since unknown + * + * @param unknown_type $filename + * @param unknown_type $dir + * @return unknown + */ function wp_tempnam($filename = '', $dir = ''){ if ( empty($dir) ) $dir = get_temp_dir(); @@ -96,6 +175,15 @@ function wp_tempnam($filename = '', $dir = ''){ return $filename; } +/** + * {@internal Missing Short Description}} + * + * @since unknown + * + * @param unknown_type $file + * @param unknown_type $allowed_files + * @return unknown + */ function validate_file_to_edit( $file, $allowed_files = '' ) { $file = stripslashes( $file ); @@ -116,12 +204,16 @@ function validate_file_to_edit( $file, $allowed_files = '' ) { } } -// array wp_handle_upload ( array &file [, array overrides] ) -// file: reference to a single element of $_FILES. Call the function once for each uploaded file. -// overrides: an associative array of names=>values to override default variables with extract( $overrides, EXTR_OVERWRITE ). -// On success, returns an associative array of file attributes. -// On failure, returns $overrides['upload_error_handler'](&$file, $message ) or array( 'error'=>$message ). -function wp_handle_upload( &$file, $overrides = false ) { +/** + * {@internal Missing Short Description}} + * + * @since unknown + * + * @param array $file Reference to a single element of $_FILES. Call the function once for each uploaded file. + * @param array $overrides Optional. An associative array of names=>values to override default variables with extract( $overrides, EXTR_OVERWRITE ). + * @return array On success, returns an associative array of file attributes. On failure, returns $overrides['upload_error_handler'](&$file, $message ) or array( 'error'=>$message ). + */ +function wp_handle_upload( &$file, $overrides = false, $time = null ) { // The default error handler. if (! function_exists( 'wp_handle_upload_error' ) ) { function wp_handle_upload_error( &$file, $message ) { @@ -132,6 +224,9 @@ function wp_handle_upload( &$file, $overrides = false ) { // You may define your own function and pass the name in $overrides['upload_error_handler'] $upload_error_handler = 'wp_handle_upload_error'; + // You may define your own function and pass the name in $overrides['unique_filename_callback'] + $unique_filename_callback = null; + // $_POST['action'] must be set and its value must equal $overrides['action'] or this: $action = 'wp_handle_upload'; @@ -141,6 +236,7 @@ function wp_handle_upload( &$file, $overrides = false ) { __( "The uploaded file exceeds the MAX_FILE_SIZE directive that was specified in the HTML form." ), __( "The uploaded file was only partially uploaded." ), __( "No file was uploaded." ), + '', __( "Missing a temporary folder." ), __( "Failed to write file to disk." )); @@ -189,7 +285,7 @@ function wp_handle_upload( &$file, $overrides = false ) { } // A writable uploads dir will pass this test. Again, there's no point overriding this one. - if ( ! ( ( $uploads = wp_upload_dir() ) && false === $uploads['error'] ) ) + if ( ! ( ( $uploads = wp_upload_dir($time) ) && false === $uploads['error'] ) ) return $upload_error_handler( $file, $uploads['error'] ); $filename = wp_unique_filename( $uploads['path'], $file['name'], $unique_filename_callback ); @@ -212,7 +308,18 @@ function wp_handle_upload( &$file, $overrides = false ) { return $return; } -// Pass this function an array similar to that of a $_FILES POST array. + +/** + * {@internal Missing Short Description}} + * + * Pass this function an array similar to that of a $_FILES POST array. + * + * @since unknown + * + * @param unknown_type $file + * @param unknown_type $overrides + * @return unknown + */ function wp_handle_sideload( &$file, $overrides = false ) { // The default error handler. if (! function_exists( 'wp_handle_upload_error' ) ) { @@ -224,6 +331,9 @@ function wp_handle_sideload( &$file, $overrides = false ) { // You may define your own function and pass the name in $overrides['upload_error_handler'] $upload_error_handler = 'wp_handle_upload_error'; + // You may define your own function and pass the name in $overrides['unique_filename_callback'] + $unique_filename_callback = null; + // $_POST['action'] must be set and its value must equal $overrides['action'] or this: $action = 'wp_handle_sideload'; @@ -285,11 +395,11 @@ function wp_handle_sideload( &$file, $overrides = false ) { return $upload_error_handler( $file, $uploads['error'] ); $filename = wp_unique_filename( $uploads['path'], $file['name'], $unique_filename_callback ); - + // Strip the query strings. $filename = str_replace('?','-', $filename); $filename = str_replace('&','-', $filename); - + // Move the file to the uploads dir $new_file = $uploads['path'] . "/$filename"; if ( false === @ rename( $file['tmp_name'], $new_file ) ) { @@ -310,45 +420,65 @@ function wp_handle_sideload( &$file, $overrides = false ) { } /** -* Downloads a url to a local file using the Snoopy HTTP Class -* -* @param string $url the URL of the file to download -* @return mixed WP_Error on failure, string Filename on success. -*/ + * Downloads a url to a local file using the Snoopy HTTP Class. + * + * @since unknown + * @todo Transition over to using the new HTTP Request API (jacob). + * + * @param string $url the URL of the file to download + * @return mixed WP_Error on failure, string Filename on success. + */ function download_url( $url ) { //WARNING: The file is not automatically deleted, The script must unlink() the file. - if( ! $url ) + if ( ! $url ) return new WP_Error('http_no_url', __('Invalid URL Provided')); $tmpfname = wp_tempnam($url); - if( ! $tmpfname ) + if ( ! $tmpfname ) return new WP_Error('http_no_file', __('Could not create Temporary file')); - $handle = @fopen($tmpfname, 'w'); - if( ! $handle ) + $handle = @fopen($tmpfname, 'wb'); + if ( ! $handle ) return new WP_Error('http_no_file', __('Could not create Temporary file')); - require_once( ABSPATH . 'wp-includes/class-snoopy.php' ); - $snoopy = new Snoopy(); - $snoopy->fetch($url); + $response = wp_remote_get($url, array('timeout' => 30)); + + if ( is_wp_error($response) ) { + fclose($handle); + unlink($tmpfname); + return $response; + } - if( $snoopy->status != '200' ){ + if ( $response['response']['code'] != '200' ){ fclose($handle); unlink($tmpfname); - return new WP_Error('http_404', trim($snoopy->response_code)); + return new WP_Error('http_404', trim($response['response']['message'])); } - fwrite($handle, $snoopy->results); + + fwrite($handle, $response['body']); fclose($handle); return $tmpfname; } +/** + * {@internal Missing Short Description}} + * + * @since unknown + * + * @param unknown_type $file + * @param unknown_type $to + * @return unknown + */ function unzip_file($file, $to) { global $wp_filesystem; if ( ! $wp_filesystem || !is_object($wp_filesystem) ) return new WP_Error('fs_unavailable', __('Could not access filesystem.')); + // Unzip uses a lot of memory + @ini_set('memory_limit', '256M'); + $fs =& $wp_filesystem; require_once(ABSPATH . 'wp-admin/includes/class-pclzip.php'); @@ -362,37 +492,56 @@ function unzip_file($file, $to) { if ( 0 == count($archive_files) ) return new WP_Error('empty_archive', __('Empty archive')); - $to = trailingslashit($to); - $path = explode('/', $to); - $tmppath = ''; - for ( $j = 0; $j < count($path) - 1; $j++ ) { - $tmppath .= $path[$j] . '/'; - if ( ! $fs->is_dir($tmppath) ) - $fs->mkdir($tmppath, 0755); + $path = explode('/', untrailingslashit($to)); + for ( $i = count($path); $i > 0; $i-- ) { //>0 = first element is empty allways for paths starting with '/' + $tmppath = implode('/', array_slice($path, 0, $i) ); + if ( $fs->is_dir($tmppath) ) { //Found the highest folder that exists, Create from here(ie +1) + for ( $i = $i + 1; $i <= count($path); $i++ ) { + $tmppath = implode('/', array_slice($path, 0, $i) ); + if ( ! $fs->mkdir($tmppath, FS_CHMOD_DIR) ) + return new WP_Error('mkdir_failed', __('Could not create directory'), $tmppath); + } + break; //Exit main for loop + } } + $to = trailingslashit($to); foreach ($archive_files as $file) { - $path = explode('/', $file['filename']); - $tmppath = ''; - - // Loop through each of the items and check that the folder exists. - for ( $j = 0; $j < count($path) - 1; $j++ ) { - $tmppath .= $path[$j] . '/'; - if ( ! $fs->is_dir($to . $tmppath) ) - if ( !$fs->mkdir($to . $tmppath, 0755) ) - return new WP_Error('mkdir_failed', __('Could not create directory'), $to . $tmppath); + $path = $file['folder'] ? $file['filename'] : dirname($file['filename']); + $path = explode('/', $path); + for ( $i = count($path); $i >= 0; $i-- ) { //>=0 as the first element contains data + if ( empty($path[$i]) ) + continue; + $tmppath = $to . implode('/', array_slice($path, 0, $i) ); + if ( $fs->is_dir($tmppath) ) {//Found the highest folder that exists, Create from here + for ( $i = $i + 1; $i <= count($path); $i++ ) { //< count() no file component please. + $tmppath = $to . implode('/', array_slice($path, 0, $i) ); + if ( ! $fs->is_dir($tmppath) && ! $fs->mkdir($tmppath, FS_CHMOD_DIR) ) + return new WP_Error('mkdir_failed', __('Could not create directory'), $tmppath); + } + break; //Exit main for loop + } } // We've made sure the folders are there, so let's extract the file now: - if ( ! $file['folder'] ) + if ( ! $file['folder'] ) { if ( !$fs->put_contents( $to . $file['filename'], $file['content']) ) return new WP_Error('copy_failed', __('Could not copy file'), $to . $file['filename']); - $fs->chmod($to . $file['filename'], 0644); + $fs->chmod($to . $file['filename'], FS_CHMOD_FILE); + } } - return true; } +/** + * {@internal Missing Short Description}} + * + * @since unknown + * + * @param unknown_type $from + * @param unknown_type $to + * @return unknown + */ function copy_dir($from, $to) { global $wp_filesystem; @@ -403,12 +552,18 @@ function copy_dir($from, $to) { foreach ( (array) $dirlist as $filename => $fileinfo ) { if ( 'f' == $fileinfo['type'] ) { - if ( ! $wp_filesystem->copy($from . $filename, $to . $filename, true) ) - return new WP_Error('copy_failed', __('Could not copy file'), $to . $filename); - $wp_filesystem->chmod($to . $filename, 0644); + if ( ! $wp_filesystem->copy($from . $filename, $to . $filename, true) ) { + // If copy failed, chmod file to 0644 and try again. + $wp_filesystem->chmod($to . $filename, 0644); + if ( ! $wp_filesystem->copy($from . $filename, $to . $filename, true) ) + return new WP_Error('copy_failed', __('Could not copy file'), $to . $filename); + } + $wp_filesystem->chmod($to . $filename, FS_CHMOD_FILE); } elseif ( 'd' == $fileinfo['type'] ) { - if ( !$wp_filesystem->mkdir($to . $filename, 0755) ) - return new WP_Error('mkdir_failed', __('Could not create directory'), $to . $filename); + if ( !$wp_filesystem->is_dir($to . $filename) ) { + if ( !$wp_filesystem->mkdir($to . $filename, FS_CHMOD_DIR) ) + return new WP_Error('mkdir_failed', __('Could not create directory'), $to . $filename); + } $result = copy_dir($from . $filename, $to . $filename); if ( is_wp_error($result) ) return $result; @@ -416,17 +571,25 @@ function copy_dir($from, $to) { } } +/** + * {@internal Missing Short Description}} + * + * @since unknown + * + * @param unknown_type $args + * @return unknown + */ function WP_Filesystem( $args = false ) { global $wp_filesystem; require_once(ABSPATH . 'wp-admin/includes/class-wp-filesystem-base.php'); - $method = get_filesystem_method(); + $method = get_filesystem_method($args); if ( ! $method ) return false; - $abstraction_file = apply_filters('filesystem_method_file', ABSPATH . 'wp-admin/includes/class-wp-filesystem-'.$method.'.php', $method); + $abstraction_file = apply_filters('filesystem_method_file', ABSPATH . 'wp-admin/includes/class-wp-filesystem-' . $method . '.php', $method); if( ! file_exists($abstraction_file) ) return; @@ -441,10 +604,24 @@ function WP_Filesystem( $args = false ) { if ( !$wp_filesystem->connect() ) return false; //There was an erorr connecting to the server. + // Set the permission constants if not already set. + if ( ! defined('FS_CHMOD_DIR') ) + define('FS_CHMOD_DIR', 0755 ); + if ( ! defined('FS_CHMOD_FILE') ) + define('FS_CHMOD_FILE', 0644 ); + return true; } -function get_filesystem_method() { +/** + * {@internal Missing Short Description}} + * + * @since unknown + * + * @param unknown_type $args + * @return unknown + */ +function get_filesystem_method($args = array()) { $method = false; if( function_exists('getmyuid') && function_exists('fileowner') ){ $temp_file = wp_tempnam(); @@ -453,9 +630,148 @@ function get_filesystem_method() { unlink($temp_file); } + if ( ! $method && isset($args['connection_type']) && 'ssh' == $args['connection_type'] && extension_loaded('ssh2') ) $method = 'ssh2'; if ( ! $method && extension_loaded('ftp') ) $method = 'ftpext'; if ( ! $method && ( extension_loaded('sockets') || function_exists('fsockopen') ) ) $method = 'ftpsockets'; //Sockets: Socket extension; PHP Mode: FSockopen / fwrite / fread return apply_filters('filesystem_method', $method); } -?> \ No newline at end of file +/** + * {@internal Missing Short Description}} + * + * @since unknown + * + * @param unknown_type $form_post + * @param unknown_type $type + * @param unknown_type $error + * @return unknown + */ +function request_filesystem_credentials($form_post, $type = '', $error = false) { + $req_cred = apply_filters('request_filesystem_credentials', '', $form_post, $type, $error); + if ( '' !== $req_cred ) + return $req_cred; + + if ( empty($type) ) + $type = get_filesystem_method(); + + if ( 'direct' == $type ) + return true; + + $credentials = get_option('ftp_credentials', array()); + // If defined, set it to that, Else, If POST'd, set it to that, If not, Set it to whatever it previously was(saved details in option) + $credentials['hostname'] = defined('FTP_HOST') ? FTP_HOST : (!empty($_POST['hostname']) ? $_POST['hostname'] : $credentials['hostname']); + $credentials['username'] = defined('FTP_USER') ? FTP_USER : (!empty($_POST['username']) ? $_POST['username'] : $credentials['username']); + $credentials['password'] = defined('FTP_PASS') ? FTP_PASS : (!empty($_POST['password']) ? $_POST['password'] : $credentials['password']); + + // Check to see if we are setting the public/private keys for ssh + $credentials['public_key'] = defined('FTP_PUBKEY') ? FTP_PUBKEY : (!empty($_POST['public_key']) ? $_POST['public_key'] : $credentials['public_key']); + $credentials['private_key'] = defined('FTP_PRIKEY') ? FTP_PRIKEY : (!empty($_POST['private_key']) ? $_POST['private_key'] : $credentials['private_key']); + + //sanitize the hostname, Some people might pass in odd-data: + $credentials['hostname'] = preg_replace('|\w+://|', '', $credentials['hostname']); //Strip any schemes off + + if ( strpos($credentials['hostname'], ':') ) + list( $credentials['hostname'], $credentials['port'] ) = explode(':', $credentials['hostname'], 2); + else + unset($credentials['port']); + + if ( defined('FTP_SSH') || (isset($_POST['connection_type']) && 'ssh' == $_POST['connection_type']) ) + $credentials['connection_type'] = 'ssh'; + else if ( defined('FTP_SSL') || (isset($_POST['connection_type']) && 'ftps' == $_POST['connection_type']) ) + $credentials['connection_type'] = 'ftps'; + else if ( !isset($credentials['connection_type']) || (isset($_POST['connection_type']) && 'ftp' == $_POST['connection_type']) ) + $credentials['connection_type'] = 'ftp'; + + if ( ! $error && !empty($credentials['password']) && !empty($credentials['username']) && !empty($credentials['hostname']) ) { + $stored_credentials = $credentials; + if ( !empty($stored_credentials['port']) ) //save port as part of hostname to simplify above code. + $stored_credentials['hostname'] .= ':' . $stored_credentials['port']; + + unset($stored_credentials['password'], $stored_credentials['port'], $stored_credentials['private_key'], $stored_credentials['public_key']); + update_option('ftp_credentials', $stored_credentials); + return $credentials; + } + $hostname = ''; + $username = ''; + $password = ''; + $connection_type = ''; + if ( !empty($credentials) ) + extract($credentials, EXTR_OVERWRITE); + if ( $error ) { + $error_string = __('Error: There was an error connecting to the server, Please verify the settings are correct.'); + if ( is_wp_error($error) ) + $error_string = $error->get_error_message(); + echo '

      ' . $error_string . '

      '; + } +?> + +
      +
      +

      +

      + + + + + + + + + + + + + + + + + + + + + + + + + + +
      " size="40" />
      size="40" />
      size="40" />'.__('(Password not shown)').''; ?>
      +
      +
      + +

      size="40" />
      size="40" /> +
      +
      +
      +
      + +
      +
      + + + + + + + +

      + +

      +
      +
      + diff --git a/wp-admin/includes/image.php b/wp-admin/includes/image.php index 8de29079..8069b977 100644 --- a/wp-admin/includes/image.php +++ b/wp-admin/includes/image.php @@ -3,41 +3,42 @@ * File contains all the administration image manipulation functions. * * @package WordPress + * @subpackage Administration */ /** - * wp_create_thumbnail() - Create a thumbnail from an Image given a maximum side size. + * Create a thumbnail from an Image given a maximum side size. * - * @package WordPress - * @param mixed $file Filename of the original image, Or attachment id - * @param int $max_side Maximum length of a single side for the thumbnail - * @return string Thumbnail path on success, Error string on failure + * This function can handle most image file formats which PHP supports. If PHP + * does not have the functionality to save in a file of the same format, the + * thumbnail will be created as a jpeg. + * + * @since 1.2.0 * - * This function can handle most image file formats which PHP supports. - * If PHP does not have the functionality to save in a file of the same format, the thumbnail will be created as a jpeg. + * @param mixed $file Filename of the original image, Or attachment id. + * @param int $max_side Maximum length of a single side for the thumbnail. + * @return string Thumbnail path on success, Error string on failure. */ function wp_create_thumbnail( $file, $max_side, $deprecated = '' ) { - $thumbpath = image_resize( $file, $max_side, $max_side ); return apply_filters( 'wp_create_thumbnail', $thumbpath ); } /** - * wp_crop_image() - Crop an Image to a given size. + * Crop an Image to a given size. * - * @package WordPress - * @internal Missing Long Description - * @param int $src_file The source file - * @param int $src_x The start x position to crop from - * @param int $src_y The start y position to crop from - * @param int $src_w The width to crop - * @param int $src_h The height to crop - * @param int $dst_w The destination width - * @param int $dst_h The destination height - * @param int $src_abs If the source crop points are absolute - * @param int $dst_file The destination file to write to - * @return string New filepath on success, String error message on failure + * @since 2.1.0 * + * @param string|int $src_file The source file or Attachment ID. + * @param int $src_x The start x position to crop from. + * @param int $src_y The start y position to crop from. + * @param int $src_w The width to crop. + * @param int $src_h The height to crop. + * @param int $dst_w The destination width. + * @param int $dst_h The destination height. + * @param int $src_abs Optional. If the source crop points are absolute. + * @param string $dst_file Optional. The destination file to write to. + * @return string New filepath on success, String error message on failure. */ function wp_crop_image( $src_file, $src_x, $src_y, $src_w, $src_h, $dst_w, $dst_h, $src_abs = false, $dst_file = false ) { if ( is_numeric( $src_file ) ) // Handle int as attachment ID @@ -74,54 +75,62 @@ function wp_crop_image( $src_file, $src_x, $src_y, $src_w, $src_h, $dst_w, $dst_ } /** - * wp_generate_attachment_metadata() - Generate post Image attachment Metadata + * Generate post image attachment meta data. * - * @package WordPress - * @internal Missing Long Description - * @param int $attachment_id Attachment Id to process - * @param string $file Filepath of the Attached image - * @return mixed Metadata for attachment + * @since 2.1.0 * + * @param int $attachment_id Attachment Id to process. + * @param string $file Filepath of the Attached image. + * @return mixed Metadata for attachment. */ function wp_generate_attachment_metadata( $attachment_id, $file ) { $attachment = get_post( $attachment_id ); $metadata = array(); if ( preg_match('!^image/!', get_post_mime_type( $attachment )) && file_is_displayable_image($file) ) { - $imagesize = getimagesize( $file ); + $full_path_file = $file; + $imagesize = getimagesize( $full_path_file ); $metadata['width'] = $imagesize[0]; $metadata['height'] = $imagesize[1]; list($uwidth, $uheight) = wp_shrink_dimensions($metadata['width'], $metadata['height']); $metadata['hwstring_small'] = "height='$uheight' width='$uwidth'"; + + // Make the file path relative to the upload dir + if ( ($uploads = wp_upload_dir()) && false === $uploads['error'] ) { // Get upload directory + if ( 0 === strpos($file, $uploads['basedir']) ) {// Check that the upload base exists in the file path + $file = str_replace($uploads['basedir'], '', $file); // Remove upload dir from the file path + $file = ltrim($file, '/'); + } + } $metadata['file'] = $file; // make thumbnails and other intermediate sizes - $sizes = array('thumbnail', 'medium'); + $sizes = array('thumbnail', 'medium', 'large'); $sizes = apply_filters('intermediate_image_sizes', $sizes); - + foreach ($sizes as $size) { - $resized = image_make_intermediate_size( $file, get_option("{$size}_size_w"), get_option("{$size}_size_h"), get_option("{$size}_crop") ); + $resized = image_make_intermediate_size( $full_path_file, get_option("{$size}_size_w"), get_option("{$size}_size_h"), get_option("{$size}_crop") ); if ( $resized ) $metadata['sizes'][$size] = $resized; } - + // fetch additional metadata from exif/iptc - $image_meta = wp_read_image_metadata( $file ); + $image_meta = wp_read_image_metadata( $full_path_file ); if ($image_meta) $metadata['image_meta'] = $image_meta; } + return apply_filters( 'wp_generate_attachment_metadata', $metadata ); } /** - * wp_load_image() - Load an image which PHP Supports. + * Load an image from a string, if PHP supports it. * - * @package WordPress - * @internal Missing Long Description - * @param string $file Filename of the image to load - * @return resource The resulting image resource on success, Error string on failure. + * @since 2.1.0 * + * @param string $file Filename of the image to load. + * @return resource The resulting image resource on success, Error string on failure. */ function wp_load_image( $file ) { if ( is_numeric( $file ) ) @@ -144,36 +153,43 @@ function wp_load_image( $file ) { } /** - * get_udims() - Calculated the new dimentions for downsampled images + * Calculated the new dimentions for a downsampled image. * - * @package WordPress - * @internal Missing Description + * @since 2.0.0 * @see wp_shrink_dimensions() - * @param int $width Current width of the image - * @param int $height Current height of the image - * @return mixed Array(height,width) of shrunk dimensions. * + * @param int $width Current width of the image + * @param int $height Current height of the image + * @return mixed Array(height,width) of shrunk dimensions. */ function get_udims( $width, $height) { return wp_shrink_dimensions( $width, $height ); } + /** - * wp_shrink_dimensions() - Calculates the new dimentions for a downsampled image. + * Calculates the new dimentions for a downsampled image. * - * @package WordPress - * @internal Missing Long Description - * @param int $width Current width of the image - * @param int $height Current height of the image - * @param int $wmax Maximum wanted width - * @param int $hmax Maximum wanted height - * @return mixed Array(height,width) of shrunk dimensions. + * @since 2.0.0 + * @see wp_constrain_dimensions() * + * @param int $width Current width of the image + * @param int $height Current height of the image + * @param int $wmax Maximum wanted width + * @param int $hmax Maximum wanted height + * @return mixed Array(height,width) of shrunk dimensions. */ function wp_shrink_dimensions( $width, $height, $wmax = 128, $hmax = 96 ) { return wp_constrain_dimensions( $width, $height, $wmax, $hmax ); } -// convert a fraction string to a decimal +/** + * Convert a fraction string to a decimal. + * + * @since 2.5.0 + * + * @param string $str + * @return int|float + */ function wp_exif_frac2dec($str) { @list( $n, $d ) = explode( '/', $str ); if ( !empty($d) ) @@ -181,25 +197,47 @@ function wp_exif_frac2dec($str) { return $str; } -// convert the exif date format to a unix timestamp +/** + * Convert the exif date format to a unix timestamp. + * + * @since 2.5.0 + * + * @param string $str + * @return int + */ function wp_exif_date2ts($str) { - // seriously, who formats a date like 'YYYY:MM:DD hh:mm:ss'? @list( $date, $time ) = explode( ' ', trim($str) ); @list( $y, $m, $d ) = explode( ':', $date ); return strtotime( "{$y}-{$m}-{$d} {$time}" ); } -// get extended image metadata, exif or iptc as available +/** + * Get extended image metadata, exif or iptc as available. + * + * Retrieves the EXIF metadata aperture, credit, camera, caption, copyright, iso + * created_timestamp, focal_length, shutter_speed, and title. + * + * The IPTC metadata that is retrieved is APP13, credit, byline, created date + * and time, caption, copyright, and title. Also includes FNumber, Model, + * DateTimeDigitized, FocalLength, ISOSpeedRatings, and ExposureTime. + * + * @todo Try other exif libraries if available. + * @since 2.5.0 + * + * @param string $file + * @return bool|array False on failure. Image metadata array on success. + */ function wp_read_image_metadata( $file ) { if ( !file_exists( $file ) ) return false; list(,,$sourceImageType) = getimagesize( $file ); - // exif contains a bunch of data we'll probably never need formatted in ways that are difficult to use. - // We'll normalize it and just extract the fields that are likely to be useful. Fractions and numbers - // are converted to floats, dates to unix timestamps, and everything else to strings. + // exif contains a bunch of data we'll probably never need formatted in ways + // that are difficult to use. We'll normalize it and just extract the fields + // that are likely to be useful. Fractions and numbers are converted to + // floats, dates to unix timestamps, and everything else to strings. $meta = array( 'aperture' => 0, 'credit' => '', @@ -213,7 +251,8 @@ function wp_read_image_metadata( $file ) { 'title' => '', ); - // read iptc first, since it might contain data not available in exif such as caption, description etc + // read iptc first, since it might contain data not available in exif such + // as caption, description etc if ( is_callable('iptcparse') ) { getimagesize($file, $info); if ( !empty($info['APP13']) ) { @@ -222,7 +261,7 @@ function wp_read_image_metadata( $file ) { $meta['credit'] = utf8_encode(trim($iptc['2#110'][0])); elseif ( !empty($iptc['2#080'][0]) ) // byline $meta['credit'] = utf8_encode(trim($iptc['2#080'][0])); - if ( !empty($iptc['2#055'][0]) and !empty($iptc['2#060'][0]) ) // created datee and time + if ( !empty($iptc['2#055'][0]) and !empty($iptc['2#060'][0]) ) // created date and time $meta['created_timestamp'] = strtotime($iptc['2#055'][0] . ' ' . $iptc['2#060'][0]); if ( !empty($iptc['2#120'][0]) ) // caption $meta['caption'] = utf8_encode(trim($iptc['2#120'][0])); @@ -249,33 +288,42 @@ function wp_read_image_metadata( $file ) { if (!empty($exif['ExposureTime'])) $meta['shutter_speed'] = wp_exif_frac2dec( $exif['ExposureTime'] ); } - // FIXME: try other exif libraries if available return apply_filters( 'wp_read_image_metadata', $meta, $file, $sourceImageType ); } -// is the file a real image file? +/** + * Validate that file is an image. + * + * @since 2.5.0 + * + * @param string $path File path to test if valid image. + * @return bool True if valid image, false if not valid image. + */ function file_is_valid_image($path) { $size = @getimagesize($path); return !empty($size); } -// is the file an image suitable for displaying within a web page? +/** + * Validate that file is suitable for displaying within a web page. + * + * @since 2.5.0 + * @uses apply_filters() Calls 'file_is_displayable_image' on $result and $path. + * + * @param string $path File path to test. + * @return bool True if suitable, false if not suitable. + */ function file_is_displayable_image($path) { $info = @getimagesize($path); if ( empty($info) ) $result = false; - elseif ( !in_array($info[2], array(IMAGETYPE_GIF, IMAGETYPE_JPEG, IMAGETYPE_PNG)) ) - // only gif, jpeg and png images can reliably be displayed - $result = false; - elseif ( $info['channels'] > 0 && $info['channels'] != 3 ) { - // some web browsers can't display cmyk or grayscale jpegs + elseif ( !in_array($info[2], array(IMAGETYPE_GIF, IMAGETYPE_JPEG, IMAGETYPE_PNG)) ) // only gif, jpeg and png images can reliably be displayed $result = false; - } else $result = true; - + return apply_filters('file_is_displayable_image', $result, $path); } diff --git a/wp-admin/includes/import.php b/wp-admin/includes/import.php index 35fd141b..c9cd71cb 100644 --- a/wp-admin/includes/import.php +++ b/wp-admin/includes/import.php @@ -1,5 +1,18 @@ false, 'test_type' => false ); $_FILES['import']['name'] .= '.import'; diff --git a/wp-admin/includes/media.php b/wp-admin/includes/media.php index d91ffc23..57e032ea 100644 --- a/wp-admin/includes/media.php +++ b/wp-admin/includes/media.php @@ -1,30 +1,64 @@ __('Choose File'), // handler action suffix => tab text + 'type' => __('From Computer'), // handler action suffix => tab text + 'type_url' => __('From URL'), 'gallery' => __('Gallery'), - 'library' => __('Media Library'), + 'library' => __('Media Library') ); return apply_filters('media_upload_tabs', $_default_tabs); } +/** + * {@internal Missing Short Description}} + * + * @since unknown + * + * @param unknown_type $tabs + * @return unknown + */ function update_gallery_tab($tabs) { global $wpdb; + if ( !isset($_REQUEST['post_id']) ) { unset($tabs['gallery']); return $tabs; } + if ( intval($_REQUEST['post_id']) ) $attachments = intval($wpdb->get_var($wpdb->prepare("SELECT count(*) FROM $wpdb->posts WHERE post_type = 'attachment' AND post_parent = %d", $_REQUEST['post_id']))); + if ( empty($attachments) ) { + unset($tabs['gallery']); + return $tabs; + } + $tabs['gallery'] = sprintf(__('Gallery (%s)'), "$attachments"); return $tabs; } add_filter('media_upload_tabs', 'update_gallery_tab'); +/** + * {@internal Missing Short Description}} + * + * @since unknown + */ function the_media_upload_tabs() { global $redir_tab; $tabs = media_upload_tabs(); @@ -51,9 +85,25 @@ function the_media_upload_tabs() { } } +/** + * {@internal Missing Short Description}} + * + * @since unknown + * + * @param unknown_type $id + * @param unknown_type $alt + * @param unknown_type $title + * @param unknown_type $align + * @param unknown_type $url + * @param unknown_type $rel + * @param unknown_type $size + * @return unknown + */ function get_image_send_to_editor($id, $alt, $title, $align, $url='', $rel = false, $size='medium') { - $html = get_image_tag($id, $alt, $title, $align, $size); + $htmlalt = ( empty($alt) ) ? $title : $alt; + + $html = get_image_tag($id, $htmlalt, $title, $align, $size); $rel = $rel ? ' rel="attachment wp-att-'.attribute_escape($id).'"' : ''; @@ -65,6 +115,20 @@ function get_image_send_to_editor($id, $alt, $title, $align, $url='', $rel = fal return $html; } +/** + * {@internal Missing Short Description}} + * + * @since unknown + * + * @param unknown_type $html + * @param unknown_type $id + * @param unknown_type $alt + * @param unknown_type $title + * @param unknown_type $align + * @param unknown_type $url + * @param unknown_type $size + * @return unknown + */ function image_add_caption( $html, $id, $alt, $title, $align, $url, $size ) { if ( empty($alt) || apply_filters( 'disable_captions', '' ) ) return $html; @@ -77,6 +141,8 @@ function image_add_caption( $html, $id, $alt, $title, $align, $url, $size ) { $html = preg_replace( '/align[^\s\'"]+\s?/', '', $html ); if ( empty($align) ) $align = 'none'; + $alt = ! empty($alt) ? addslashes($alt) : ''; + $shcode = '[caption id="' . $id . '" align="align' . $align . '" width="' . $width . '" caption="' . $alt . '"]' . $html . '[/caption]'; @@ -84,8 +150,15 @@ function image_add_caption( $html, $id, $alt, $title, $align, $url, $size ) { } add_filter( 'image_send_to_editor', 'image_add_caption', 20, 7 ); +/** + * {@internal Missing Short Description}} + * + * @since unknown + * + * @param unknown_type $html + */ function media_send_to_editor($html) { - ?> +?> + 'None', 'left' => 'Left', 'center' => 'Center', 'right' => 'Right'); + if ( !array_key_exists($checked, $alignments) ) + $checked = 'none'; + + $out = array(); + foreach ($alignments as $name => $label) { + + $out[] = ""; + } + return join("\n", $out); +} + +/** + * Retrieve HTML for the size radio buttons with the specified one checked. + * + * @since unknown + * + * @param unknown_type $post + * @param unknown_type $checked + * @return unknown + */ +function image_size_input_fields($post, $checked='') { + + // get a list of the actual pixel dimensions of each possible intermediate version of this image + $size_names = array('thumbnail' => __('Thumbnail'), 'medium' => __('Medium'), 'large' => __('Large'), 'full' => __('Full size')); + + foreach ( $size_names as $size => $name) { + $downsize = image_downsize($post->ID, $size); + + // is this size selectable? + $enabled = ( $downsize[3] || 'full' == $size ); + $css_id = "image-size-{$size}-{$post->ID}"; + // if this size is the default but that's not available, don't select it + if ( $checked && !$enabled ) + $checked = ''; + // if $checked was not specified, default to the first available size that's bigger than a thumbnail + if ( !$checked && $enabled && 'thumbnail' != $size ) + $checked = $size; + + $html = "
      "; + + $html .= ""; + // only show the dimensions if that choice is available + if ( $enabled ) + $html .= " "; + + $html .= '
      '; + + $out[] = $html; + } + + return array( + 'label' => __('Size'), + 'input' => 'html', + 'html' => join("\n", $out), + ); +} + +/** + * Retrieve HTML for the Link URL buttons with the default link type as specified. + * + * @since unknown + * + * @param unknown_type $post + * @param unknown_type $url_type + * @return unknown + */ +function image_link_input_fields($post, $url_type='') { + + $file = wp_get_attachment_url($post->ID); + $link = get_attachment_link($post->ID); + + $url = ''; + if ( $url_type == 'file' ) + $url = $file; + elseif ( $url_type == 'post' ) + $url = $link; + + return "
      + + + +"; +} + +/** + * {@internal Missing Short Description}} + * + * @since unknown + * + * @param unknown_type $form_fields + * @param unknown_type $post + * @return unknown + */ function image_attachment_fields_to_edit($form_fields, $post) { if ( substr($post->post_mime_type, 0, 5) == 'image' ) { $form_fields['post_title']['required'] = true; @@ -514,43 +842,42 @@ function image_attachment_fields_to_edit($form_fields, $post) { $form_fields['post_content']['label'] = __('Description'); - $thumb = wp_get_attachment_thumb_url($post->ID); - $form_fields['align'] = array( 'label' => __('Alignment'), 'input' => 'html', - 'html' => " - - - - - - - - \n", - ); - $form_fields['image-size'] = array( - 'label' => __('Size'), - 'input' => 'html', - 'html' => " - " . ( $thumb ? " - - " : '' ) . " - - - ", + 'html' => image_align_input_fields($post, get_option('image_default_align')), ); + + $form_fields['image-size'] = image_size_input_fields($post, get_option('image_default_size')); } return $form_fields; } add_filter('attachment_fields_to_edit', 'image_attachment_fields_to_edit', 10, 2); +/** + * {@internal Missing Short Description}} + * + * @since unknown + * + * @param unknown_type $form_fields + * @param unknown_type $post + * @return unknown + */ function media_single_attachment_fields_to_edit( $form_fields, $post ) { unset($form_fields['url'], $form_fields['align'], $form_fields['image-size']); return $form_fields; } +/** + * {@internal Missing Short Description}} + * + * @since unknown + * + * @param unknown_type $post + * @param unknown_type $attachment + * @return unknown + */ function image_attachment_fields_to_save($post, $attachment) { if ( substr($post['post_mime_type'], 0, 5) == 'image' ) { if ( strlen(trim($post['post_title'])) == 0 ) { @@ -564,6 +891,16 @@ function image_attachment_fields_to_save($post, $attachment) { add_filter('attachment_fields_to_save', 'image_attachment_fields_to_save', 10, 2); +/** + * {@internal Missing Short Description}} + * + * @since unknown + * + * @param unknown_type $html + * @param unknown_type $attachment_id + * @param unknown_type $attachment + * @return unknown + */ function image_media_send_to_editor($html, $attachment_id, $attachment) { $post =& get_post($attachment_id); if ( substr($post->post_mime_type, 0, 5) == 'image' ) { @@ -589,6 +926,15 @@ function image_media_send_to_editor($html, $attachment_id, $attachment) { add_filter('media_send_to_editor', 'image_media_send_to_editor', 10, 3); +/** + * {@internal Missing Short Description}} + * + * @since unknown + * + * @param unknown_type $post + * @param unknown_type $errors + * @return unknown + */ function get_attachment_fields_to_edit($post, $errors = null) { if ( is_int($post) ) $post =& get_post($post); @@ -596,8 +942,6 @@ function get_attachment_fields_to_edit($post, $errors = null) { $post = (object) $post; $edit_post = sanitize_post($post, 'edit'); - $file = wp_get_attachment_url($post->ID); - $link = get_attachment_link($post->ID); $form_fields = array( 'post_title' => array( @@ -616,17 +960,10 @@ function get_attachment_fields_to_edit($post, $errors = null) { 'url' => array( 'label' => __('Link URL'), 'input' => 'html', - 'html' => " -
      - - - - \n", + 'html' => image_link_input_fields($post, get_option('image_default_link_type')), 'helps' => __('Enter a link URL or click above for presets.'), ), - 'menu_order' => array( + 'menu_order' => array( 'label' => __('Order'), 'value' => $edit_post->menu_order ), @@ -661,6 +998,19 @@ function get_attachment_fields_to_edit($post, $errors = null) { return $form_fields; } +/** + * Retrieve HTML for media items of post gallery. + * + * The HTML markup retrieved will be created for the progress of SWF Upload + * component. Will also create link for showing and hiding the form to modify + * the image attachment. + * + * @since unknown + * + * @param int $post_id Optional. Post ID. + * @param array $errors Errors for attachment, if any. + * @return string + */ function get_media_items( $post_id, $errors ) { if ( $post_id ) { $post = get_post($post_id); @@ -674,20 +1024,27 @@ function get_media_items( $post_id, $errors ) { $attachments[$attachment->ID] = $attachment; } - if ( empty($attachments) ) - return ''; - - foreach ( $attachments as $id => $attachment ) + $output = ''; + foreach ( (array) $attachments as $id => $attachment ) if ( $item = get_media_item( $id, array( 'errors' => isset($errors[$id]) ? $errors[$id] : null) ) ) $output .= "\n
      $item\n
      "; return $output; } +/** + * Retrieve HTML form for modifying the image attachment. + * + * @since unknown + * + * @param int $attachment_id Attachment ID for modification. + * @param string|array $args Optional. Override defaults. + * @return string HTML form for attachment. + */ function get_media_item( $attachment_id, $args = null ) { global $redir_tab; - $default_args = array( 'errors' => null, 'send' => true, 'delete' => true, 'toggle' => true ); + $default_args = array( 'errors' => null, 'send' => true, 'delete' => true, 'toggle' => true, 'show_title' => true ); $args = wp_parse_args( $args, $default_args ); extract( $args, EXTR_SKIP ); @@ -697,10 +1054,6 @@ function get_media_item( $attachment_id, $args = null ) { else return false; - $title_label = __('Title'); - $description_label = __('Description'); - $tags_label = __('Tags'); - $toggle_on = __('Show'); $toggle_off = __('Hide'); @@ -708,13 +1061,14 @@ function get_media_item( $attachment_id, $args = null ) { $filename = basename($post->guid); $title = attribute_escape($post->post_title); - $description = attribute_escape($post->post_content); + if ( $_tags = get_the_tags($attachment_id) ) { foreach ( $_tags as $tag ) $tags[] = $tag->name; $tags = attribute_escape(join(', ', $tags)); } + $type = ''; if ( isset($post_mime_types) ) { $keys = array_keys(wp_match_mime_types(array_keys($post_mime_types), $post->post_mime_type)); $type = array_shift($keys); @@ -734,7 +1088,7 @@ function get_media_item( $attachment_id, $args = null ) { } $display_title = ( !empty( $title ) ) ? $title : $filename; // $title shouldn't ever be empty, but just in case - $display_title = wp_html_excerpt($display_title, 60); + $display_title = $show_title ? "
      " . wp_html_excerpt($display_title, 60) . "
      " : ''; $gallery = ( (isset($_REQUEST['tab']) && 'gallery' == $_REQUEST['tab']) || (isset($redir_tab) && 'gallery' == $redir_tab) ) ? true : false; $order = ''; @@ -755,7 +1109,7 @@ function get_media_item( $attachment_id, $args = null ) { $type $toggle_links $order -
      $display_title
      + $display_title @@ -813,7 +1167,7 @@ function get_media_item( $attachment_id, $args = null ) { if ( !empty($field[$field['input']]) ) $item .= $field[$field['input']]; elseif ( $field['input'] == 'textarea' ) { - $item .= ""; + $item .= ""; } else { $item .= ""; } @@ -845,9 +1199,21 @@ function get_media_item( $attachment_id, $args = null ) { foreach ( $hidden_fields as $name => $value ) $item .= "\t\n"; + if ( $post->post_parent < 1 && (int) $_REQUEST['post_id'] ) { + $parent = (int) $_REQUEST['post_id']; + $parent_name = "attachments[$attachment_id][post_parent]"; + + $item .= "\t\n"; + } + return $item; } +/** + * {@internal Missing Short Description}} + * + * @since unknown + */ function media_upload_header() { ?> @@ -857,6 +1223,13 @@ function media_upload_header() {
      @@ -887,10 +1260,16 @@ function media_upload_form( $errors = null ) {
      -

      + +

      @@ -932,9 +1314,10 @@ jQuery(function($){
      -

      +

      +

      @@ -945,6 +1328,15 @@ jQuery(function($){
      -

      + +

      + -
      - +'.wp_specialchars($id->get_error_message()).'
      '; + exit; + } +} +?>
      + +/** + * {@internal Missing Short Description}} + * + * @since unknown + * + * @param unknown_type $type + * @param unknown_type $errors + * @param unknown_type $id + */ +function media_upload_type_url_form($type = 'file', $errors = null, $id = null) { + media_upload_header(); -
      -

      -

      -
      + $post_id = intval($_REQUEST['post_id']); + + $form_action_url = admin_url("media-upload.php?type=$type&tab=type&post_id=$post_id"); + $form_action_url = apply_filters('media_upload_form_url', $form_action_url, $type); + + $callback = "type_url_form_$type"; +?> + + + + + + + +

      + + + + + + + + + diff --git a/wp-admin/includes/schema.php b/wp-admin/includes/schema.php index 7162b42b..1f9c5be5 100644 --- a/wp-admin/includes/schema.php +++ b/wp-admin/includes/schema.php @@ -1,19 +1,33 @@ supports_collation() ) { +if ( $wpdb->has_cap( 'collation' ) ) { if ( ! empty($wpdb->charset) ) $charset_collate = "DEFAULT CHARACTER SET $wpdb->charset"; if ( ! empty($wpdb->collate) ) $charset_collate .= " COLLATE $wpdb->collate"; } -$wp_queries="CREATE TABLE $wpdb->terms ( +/** Create WordPress database tables SQL */ +$wp_queries = "CREATE TABLE $wpdb->terms ( term_id bigint(20) NOT NULL auto_increment, name varchar(200) NOT NULL default '', slug varchar(200) NOT NULL default '', @@ -125,7 +139,8 @@ CREATE TABLE $wpdb->posts ( comment_count bigint(20) NOT NULL default '0', PRIMARY KEY (ID), KEY post_name (post_name), - KEY type_status_date (post_type,post_status,post_date,ID) + KEY type_status_date (post_type,post_status,post_date,ID), + KEY post_parent (post_parent) ) $charset_collate; CREATE TABLE $wpdb->users ( ID bigint(20) unsigned NOT NULL auto_increment, @@ -152,13 +167,20 @@ CREATE TABLE $wpdb->usermeta ( KEY meta_key (meta_key) ) $charset_collate;"; +/** + * Create WordPress options and set the default values. + * + * @since 1.5.0 + * @uses $wpdb + * @uses $wp_db_version + */ function populate_options() { global $wpdb, $wp_db_version; - + $guessurl = wp_guess_url(); - + do_action('populate_options'); - + add_option('siteurl', $guessurl); add_option('blogname', __('My Blog')); add_option('blogdescription', __('Just another WordPress weblog')); @@ -257,7 +279,29 @@ function populate_options() { add_option('avatar_default', 'mystery'); add_option('enable_app', 0); add_option('enable_xmlrpc', 0); - + + // 2.7 + add_option('large_size_w', 1024); + add_option('large_size_h', 1024); + add_option('image_default_link_type', 'file'); + add_option('image_default_size', ''); + add_option('image_default_align', ''); + add_option('close_comments_for_old_posts', 0); + add_option('close_comments_days_old', 14); + add_option('thread_comments', 0); + add_option('thread_comments_depth', 5); + add_option('page_comments', 1); + add_option('comments_per_page', 50); + add_option('default_comments_page', 'newest'); + add_option('comment_order', 'asc'); + add_option('use_ssl', 0); + add_option('sticky_posts', array()); + add_option('widget_categories', array()); + add_option('widget_text', array()); + add_option('widget_rss', array()); + add_option('update_core', array()); + add_option('dismissed_update_core', array()); + // Delete unused options $unusedoptions = array ('blodotgsping_url', 'bodyterminator', 'emailtestonly', 'phoneemail_separator', 'smilies_directory', 'subjectprefix', 'use_bbcode', 'use_blodotgsping', 'use_phoneemail', 'use_quicktags', 'use_weblogsping', 'weblogs_cache_file', 'use_preview', 'use_htmltrans', 'smilies_directory', 'fileupload_allowedusers', 'use_phoneemail', 'default_post_status', 'default_post_category', 'archive_mode', 'time_difference', 'links_minadminlevel', 'links_use_adminlevels', 'links_rating_type', 'links_rating_char', 'links_rating_ignore_zero', 'links_rating_single_image', 'links_rating_image0', 'links_rating_image1', 'links_rating_image2', 'links_rating_image3', 'links_rating_image4', 'links_rating_image5', 'links_rating_image6', 'links_rating_image7', 'links_rating_image8', 'links_rating_image9', 'weblogs_cacheminutes', 'comment_allowed_tags', 'search_engine_friendly_urls', 'default_geourl_lat', 'default_geourl_lon', 'use_default_geourl', 'weblogs_xml_url', 'new_users_can_blog', '_wpnonce', '_wp_http_referer', 'Update', 'action', 'rich_editing', 'autosave_interval', 'deactivated_plugins'); foreach ($unusedoptions as $option) : @@ -271,14 +315,25 @@ function populate_options() { endforeach; } +/** + * Execute WordPress role creation for the various WordPress versions. + * + * @since 2.0.0 + */ function populate_roles() { populate_roles_160(); populate_roles_210(); populate_roles_230(); populate_roles_250(); populate_roles_260(); + populate_roles_270(); } +/** + * Create the roles for WordPress 2.0 + * + * @since 2.0.0 + */ function populate_roles_160() { // Add roles @@ -296,7 +351,7 @@ function populate_roles_160() { add_role('subscriber', 'Subscriber|User role'); // Add caps for Administrator role - $role = get_role('administrator'); + $role =& get_role('administrator'); $role->add_cap('switch_themes'); $role->add_cap('edit_themes'); $role->add_cap('activate_plugins'); @@ -329,7 +384,7 @@ function populate_roles_160() { $role->add_cap('level_0'); // Add caps for Editor role - $role = get_role('editor'); + $role =& get_role('editor'); $role->add_cap('moderate_comments'); $role->add_cap('manage_categories'); $role->add_cap('manage_links'); @@ -351,7 +406,7 @@ function populate_roles_160() { $role->add_cap('level_0'); // Add caps for Author role - $role = get_role('author'); + $role =& get_role('author'); $role->add_cap('upload_files'); $role->add_cap('edit_posts'); $role->add_cap('edit_published_posts'); @@ -362,22 +417,27 @@ function populate_roles_160() { $role->add_cap('level_0'); // Add caps for Contributor role - $role = get_role('contributor'); + $role =& get_role('contributor'); $role->add_cap('edit_posts'); $role->add_cap('read'); $role->add_cap('level_1'); $role->add_cap('level_0'); // Add caps for Subscriber role - $role = get_role('subscriber'); + $role =& get_role('subscriber'); $role->add_cap('read'); $role->add_cap('level_0'); } +/** + * Create and modify WordPress roles for WordPress 2.1. + * + * @since 2.1.0 + */ function populate_roles_210() { $roles = array('administrator', 'editor'); foreach ($roles as $role) { - $role = get_role($role); + $role =& get_role($role); if ( empty($role) ) continue; @@ -398,42 +458,57 @@ function populate_roles_210() { $role->add_cap('read_private_pages'); } - $role = get_role('administrator'); + $role =& get_role('administrator'); if ( ! empty($role) ) { $role->add_cap('delete_users'); $role->add_cap('create_users'); } - $role = get_role('author'); + $role =& get_role('author'); if ( ! empty($role) ) { $role->add_cap('delete_posts'); $role->add_cap('delete_published_posts'); } - $role = get_role('contributor'); + $role =& get_role('contributor'); if ( ! empty($role) ) { $role->add_cap('delete_posts'); } } +/** + * Create and modify WordPress roles for WordPress 2.3. + * + * @since 2.3.0 + */ function populate_roles_230() { - $role = get_role( 'administrator' ); + $role =& get_role( 'administrator' ); if ( !empty( $role ) ) { $role->add_cap( 'unfiltered_upload' ); } } +/** + * Create and modify WordPress roles for WordPress 2.5. + * + * @since 2.5.0 + */ function populate_roles_250() { - $role = get_role( 'administrator' ); + $role =& get_role( 'administrator' ); if ( !empty( $role ) ) { $role->add_cap( 'edit_dashboard' ); } } +/** + * Create and modify WordPress roles for WordPress 2.6. + * + * @since 2.6.0 + */ function populate_roles_260() { - $role = get_role( 'administrator' ); + $role =& get_role( 'administrator' ); if ( !empty( $role ) ) { $role->add_cap( 'update_plugins' ); @@ -441,4 +516,18 @@ function populate_roles_260() { } } +/** + * Create and modify WordPress roles for WordPress 2.7. + * + * @since 2.7.0 + */ +function populate_roles_270() { + $role =& get_role( 'administrator' ); + + if ( !empty( $role ) ) { + $role->add_cap( 'install_plugins' ); + $role->add_cap( 'update_themes' ); + } +} + ?> diff --git a/wp-admin/includes/taxonomy.php b/wp-admin/includes/taxonomy.php index a0b95a7a..a6c753d4 100644 --- a/wp-admin/includes/taxonomy.php +++ b/wp-admin/includes/taxonomy.php @@ -1,9 +1,23 @@ $cat_name, 'category_parent' => $parent) ); } +/** + * {@internal Missing Short Description}} + * + * @since unknown + * + * @param unknown_type $categories + * @param unknown_type $post_id + * @return unknown + */ function wp_create_categories($categories, $post_id = '') { $cat_ids = array (); foreach ($categories as $category) { @@ -39,6 +79,14 @@ function wp_create_categories($categories, $post_id = '') { return $cat_ids; } +/** + * {@internal Missing Short Description}} + * + * @since unknown + * + * @param unknown_type $cat_ID + * @return unknown + */ function wp_delete_category($cat_ID) { $cat_ID = (int) $cat_ID; $default = get_option('default_category'); @@ -50,9 +98,18 @@ function wp_delete_category($cat_ID) { return wp_delete_term($cat_ID, 'category', array('default' => $default)); } +/** + * {@internal Missing Short Description}} + * + * @since unknown + * + * @param unknown_type $catarr + * @param unknown_type $wp_error + * @return unknown + */ function wp_insert_category($catarr, $wp_error = false) { $cat_defaults = array('cat_ID' => 0, 'cat_name' => '', 'category_description' => '', 'category_nicename' => '', 'category_parent' => ''); - $cat_arr = wp_parse_args($cat_arr, $cat_defaults); + $catarr = wp_parse_args($catarr, $cat_defaults); extract($catarr, EXTR_SKIP); if ( trim( $cat_name ) == '' ) { @@ -99,10 +156,18 @@ function wp_insert_category($catarr, $wp_error = false) { return $cat_ID['term_id']; } +/** + * {@internal Missing Short Description}} + * + * @since unknown + * + * @param unknown_type $catarr + * @return unknown + */ function wp_update_category($catarr) { $cat_ID = (int) $catarr['cat_ID']; - if ( $cat_ID == $catarr['category_parent'] ) + if ( isset($catarr['category_parent']) && ($cat_ID == $catarr['category_parent']) ) return false; // First, get all of the original fields @@ -121,6 +186,14 @@ function wp_update_category($catarr) { // Tags // +/** + * {@internal Missing Short Description}} + * + * @since unknown + * + * @param unknown_type $post_id + * @return unknown + */ function get_tags_to_edit( $post_id ) { $post_id = (int) $post_id; if ( !$post_id ) @@ -139,10 +212,26 @@ function get_tags_to_edit( $post_id ) { return $tags_to_edit; } +/** + * {@internal Missing Short Description}} + * + * @since unknown + * + * @param unknown_type $tag_name + * @return unknown + */ function tag_exists($tag_name) { return is_term($tag_name, 'post_tag'); } +/** + * {@internal Missing Short Description}} + * + * @since unknown + * + * @param unknown_type $tag_name + * @return unknown + */ function wp_create_tag($tag_name) { if ( $id = tag_exists($tag_name) ) return $id; diff --git a/wp-admin/includes/template.php b/wp-admin/includes/template.php index e132733e..2566a616 100644 --- a/wp-admin/includes/template.php +++ b/wp-admin/includes/template.php @@ -1,15 +1,43 @@ 0); @@ -39,7 +67,6 @@ function _cat_rows( $categories, &$count, $parent = 0, $level = 0, $page = 1, $p // If the page starts in a subtree, print the parents. if ( $count == $start && $category->parent > 0 ) { $my_parents = array(); - $my_parent = $category->parent; while ( $my_parent) { $my_parent = get_category($my_parent); $my_parents[] = $my_parent; @@ -57,7 +84,7 @@ function _cat_rows( $categories, &$count, $parent = 0, $level = 0, $page = 1, $p if ( $count >= $start ) echo "\t" . _cat_row( $category, $level ); - unset($categories[$i]); // Prune the working set + unset($categories[$i]); // Prune the working set $count++; if ( isset($children[$category->term_id]) ) @@ -68,83 +95,284 @@ function _cat_rows( $categories, &$count, $parent = 0, $level = 0, $page = 1, $p $output = ob_get_contents(); ob_end_clean(); - $output = apply_filters('cat_rows', $output); - echo $output; } +/** + * {@internal Missing Short Description}} + * + * @since unknown + * + * @param unknown_type $category + * @param unknown_type $level + * @param unknown_type $name_override + * @return unknown + */ function _cat_row( $category, $level, $name_override = false ) { - global $class; + static $row_class = ''; - $category = get_category( $category ); + $category = get_category( $category, OBJECT, 'display' ); + $default_cat_id = (int) get_option( 'default_category' ); $pad = str_repeat( '— ', $level ); $name = ( $name_override ? $name_override : $pad . ' ' . $category->name ); + $edit_link = "categories.php?action=edit&cat_ID=$category->term_id"; if ( current_user_can( 'manage_categories' ) ) { - $edit = "name)) . "'>$name"; + $edit = "name)) . "'>" . attribute_escape( $name ) . '
      '; + $actions = array(); + $actions['edit'] = '' . __('Edit') . ''; + $actions['inline hide-if-no-js'] = '' . __('Quick Edit') . ''; + if ( $default_cat_id != $category->term_id ) + $actions['delete'] = "term_id) . "' onclick=\"if ( confirm('" . js_escape(sprintf(__("You are about to delete this category '%s'\n 'Cancel' to stop, 'OK' to delete."), $name )) . "') ) { return true;}return false;\">" . __('Delete') . ""; + $action_count = count($actions); + $i = 0; + $edit .= '
      '; + foreach ( $actions as $action => $link ) { + ++$i; + ( $i == $action_count ) ? $sep = '' : $sep = ' | '; + $edit .= "$link$sep"; + } + $edit .= '
      '; } else { $edit = $name; } - $class = " class='alternate'" == $class ? '' : " class='alternate'"; + $row_class = 'alternate' == $row_class ? '' : 'alternate'; + $qe_data = get_category_to_edit($category->term_id); $category->count = number_format_i18n( $category->count ); $posts_count = ( $category->count > 0 ) ? "$category->count" : $category->count; - $output = "
      - "; + + $columns = get_column_headers('categories'); + $hidden = get_hidden_columns('categories'); + foreach ( $columns as $column_name => $column_display_name ) { + $class = "class=\"$column_name column-$column_name\""; + + $style = ''; + if ( in_array($column_name, $hidden) ) + $style = ' style="display:none;"'; + + $attributes = "$class$style"; + + switch ($column_name) { + case 'cb': + $output .= "'; + break; + case 'name': + $output .= "'; + break; + case 'description': + $output .= ""; + break; + case 'slug': + $output .= ""; + break; + case 'posts': + $attributes = 'class="posts column-posts num"' . $style; + $output .= "\n"; + } + } + $output .= ''; + + return $output; +} + +/** + * {@internal Missing Short Description}} + * + * @since 2.7 + * + * Outputs the HTML for the hidden table rows used in Categories, Link Caregories and Tags quick edit. + * + * @param string $type "tag", "category" or "link-category" + * @return + */ +function inline_edit_term_row($type) { + + if ( ! current_user_can( 'manage_categories' ) ) + return; + + $is_tag = $type == 'edit-tags'; + $columns = get_column_headers($type); + $hidden = array_intersect( array_keys( $columns ), array_filter( get_hidden_columns($type) ) ); + $col_count = count($columns) - count($hidden); + ?> + +
      "; - if ( absint(get_option( 'default_category' ) ) != $category->term_id ) { - $output .= ""; - } else { - $output .= " "; + $output = "
      "; + if ( $default_cat_id != $category->term_id ) { + $output .= ""; + } else { + $output .= " "; + } + $output .= '$edit"; + $output .= '$category->description$category->slug$posts_count
      + - - \n\t\n"; - return apply_filters('cat_row', $output); +?> + +

      + + + + + + +
      +

      + +
      +name ); + $edit_link = "link-category.php?action=edit&cat_ID=$category->term_id"; if ( current_user_can( 'manage_categories' ) ) { - $edit = "name)) . "' class='edit'>$name"; - $default_cat_id = (int) get_option( 'default_link_category' ); + $edit = "name)) . "'>$name
      "; + $actions = array(); + $actions['edit'] = '' . __('Edit') . ''; + $actions['inline hide-if-no-js'] = '' . __('Quick Edit') . ''; + if ( $default_cat_id != $category->term_id ) + $actions['delete'] = "term_id) . "' onclick=\"if ( confirm('" . js_escape(sprintf(__("You are about to delete this category '%s'\n 'Cancel' to stop, 'OK' to delete."), $name )) . "') ) { return true;}return false;\">" . __('Delete') . ""; + $action_count = count($actions); + $i = 0; + $edit .= '
      '; + foreach ( $actions as $action => $link ) { + ++$i; + ( $i == $action_count ) ? $sep = '' : $sep = ' | '; + $edit .= "$link$sep"; + } + $edit .= '
      '; } else { $edit = $name; } - $class = " class='alternate'" == $class ? '' : " class='alternate'"; + $row_class = 'alternate' == $row_class ? '' : 'alternate'; + $qe_data = get_term_to_edit($category->term_id, 'link_category'); $category->count = number_format_i18n( $category->count ); $count = ( $category->count > 0 ) ? "$category->count" : $category->count; - $output = " - "; - if ( absint( get_option( 'default_link_category' ) ) != $category->term_id ) { - $output .= ""; - } else { - $output .= " "; + $output = ""; + $columns = get_column_headers('edit-link-categories'); + $hidden = get_hidden_columns('edit-link-categories'); + foreach ( $columns as $column_name => $column_display_name ) { + $class = "class=\"$column_name column-$column_name\""; + + $style = ''; + if ( in_array($column_name, $hidden) ) + $style = ' style="display:none;"'; + + $attributes = "$class$style"; + + switch ($column_name) { + case 'cb': + $output .= ""; + if ( absint( get_option( 'default_link_category' ) ) != $category->term_id ) { + $output .= ""; + } else { + $output .= " "; + } + $output .= ""; + break; + case 'name': + $output .= "$edit"; + $output .= ''; + break; + case 'description': + $output .= "$category->description"; + break; + case 'slug': + $output .= "$category->slug"; + break; + case 'links': + $attributes = 'class="links column-links num"' . $style; + $output .= "$count"; + } } - $output .= " - $edit - $category->description - $count"; + $output .= ''; - return apply_filters( 'link_cat_row', $output ); + return $output; } +/** + * {@internal Missing Short Description}} + * + * @since unknown + * + * @param unknown_type $checked + * @param unknown_type $current + */ function checked( $checked, $current) { if ( $checked == $current) echo ' checked="checked"'; } +/** + * {@internal Missing Short Description}} + * + * @since unknown + * + * @param unknown_type $selected + * @param unknown_type $current + */ function selected( $selected, $current) { if ( $selected == $current) echo ' selected="selected"'; @@ -154,12 +382,27 @@ function selected( $selected, $current) { // Category Checklists // -// Deprecated. Use wp_link_category_checklist +/** + * {@internal Missing Short Description}} + * + * @since unknown + * @deprecated Use {@link wp_link_category_checklist()} + * @see wp_link_category_checklist() + * + * @param unknown_type $default + * @param unknown_type $parent + * @param unknown_type $popular_ids + */ function dropdown_categories( $default = 0, $parent = 0, $popular_ids = array() ) { global $post_ID; wp_category_checklist($post_ID); } +/** + * {@internal Missing Short Description}} + * + * @since unknown + */ class Walker_Category_Checklist extends Walker { var $tree_type = 'category'; var $db_fields = array ('parent' => 'parent', 'id' => 'term_id'); //TODO: decouple this @@ -178,7 +421,7 @@ class Walker_Category_Checklist extends Walker { extract($args); $class = in_array( $category->term_id, $popular_cats ) ? ' class="popular-category"' : ''; - $output .= "\n
    3. " . ''; + $output .= "\n
    4. " . ''; } function end_el(&$output, $category, $depth, $args) { @@ -186,12 +429,24 @@ class Walker_Category_Checklist extends Walker { } } -function wp_category_checklist( $post_id = 0, $descendants_and_self = 0, $selected_cats = false, $popular_cats = false ) { - $walker = new Walker_Category_Checklist; +/** + * {@internal Missing Short Description}} + * + * @since unknown + * + * @param unknown_type $post_id + * @param unknown_type $descendants_and_self + * @param unknown_type $selected_cats + * @param unknown_type $popular_cats + */ +function wp_category_checklist( $post_id = 0, $descendants_and_self = 0, $selected_cats = false, $popular_cats = false, $walker = null ) { + if ( empty($walker) || !is_a($walker, 'Walker') ) + $walker = new Walker_Category_Checklist; + $descendants_and_self = (int) $descendants_and_self; $args = array(); - + if ( is_array( $selected_cats ) ) $args['selected_cats'] = $selected_cats; elseif ( $post_id ) @@ -227,6 +482,17 @@ function wp_category_checklist( $post_id = 0, $descendants_and_self = 0, $select echo call_user_func_array(array(&$walker, 'walk'), array($categories, 0, $args)); } +/** + * {@internal Missing Short Description}} + * + * @since unknown + * + * @param unknown_type $taxonomy + * @param unknown_type $default + * @param unknown_type $number + * @param unknown_type $echo + * @return unknown + */ function wp_popular_terms_checklist( $taxonomy, $default = 0, $number = 10, $echo = true ) { global $post_ID; if ( $post_ID ) @@ -244,7 +510,7 @@ function wp_popular_terms_checklist( $taxonomy, $default = 0, $number = 10, $ech ?>
    5. + + + 0) ); @@ -835,28 +2227,58 @@ function wp_dropdown_cats( $currentcat = 0, $currentparent = 0, $parent = 0, $le } } +/** + * {@internal Missing Short Description}} + * + * @since unknown + * + * @param unknown_type $meta + */ function list_meta( $meta ) { // Exit if no meta - if (!$meta ) { - echo ' '; //TBODY needed for list-manipulation JS + if ( ! $meta ) { + echo ' + + + + + + + + + + +'; //TBODY needed for list-manipulation JS return; } $count = 0; ?> + - + - "; +?> + +
      + $entry['meta_id'] = (int) $entry['meta_id']; $delete_nonce = wp_create_nonce( 'delete-meta_' . $entry['meta_id'] ); $r .= "\n\t"; - $r .= "\n\t\t"; - $r .= "\n\t\t"; - $r .= "\n\t\t
      "; - $r .= "\n\t\t"; + + $r .= "\n\t\t
      "; + $r .= "\n\t\t
      "; $r .= wp_nonce_field( 'change-meta', '_ajax_nonce', false, false ); - $r .= "\n\t"; + $r .= ""; + + $r .= "\n\t\t\n\t"; return $r; } +/** + * {@internal Missing Short Description}} + * + * @since unknown + */ function meta_form() { global $wpdb; $limit = (int) apply_filters( 'postmeta_form_limit', 30 ); @@ -912,44 +2341,65 @@ function meta_form() { if ( $keys ) natcasesort($keys); ?> -

      - - - +

      +
      + + + - - + + + + - - - - + + + +
      - +
      + - + + + + + + + +
      - - +
      + +
      post_status, array('draft', 'pending') ) && (!$post->post_date || '0000-00-00 00:00:00' == $post->post_date ) ) ? false : true; + $edit = ( in_array($post->post_status, array('draft', 'pending') ) && (!$post->post_date_gmt || '0000-00-00 00:00:00' == $post->post_date_gmt ) ) ? false : true; $tab_index_attribute = ''; if ( (int) $tab_index > 0 ) @@ -966,29 +2416,55 @@ function touch_time( $edit = 1, $for_post = 1, $tab_index = 0 ) { $mn = ($edit) ? mysql2date( 'i', $post_date ) : gmdate( 'i', $time_adj ); $ss = ($edit) ? mysql2date( 's', $post_date ) : gmdate( 's', $time_adj ); - $month = "\n"; for ( $i = 1; $i < 13; $i = $i +1 ) { $month .= "\t\t\t" . '\n"; + $month .= '>' . $wp_locale->get_month_abbrev( $wp_locale->get_month( $i ) ) . "\n"; } $month .= ''; - $day = ''; - $year = ''; - $hour = ''; - $minute = ''; - printf(_c('%1$s%2$s, %3$s
      @ %4$s : %5$s|1: month input, 2: day input, 3: year input, 4: hour input, 5: minute input'), $month, $day, $year, $hour, $minute); + $day = ''; + $year = ''; + $hour = ''; + $minute = ''; + printf(_c('%1$s%2$s, %3$s @ %4$s : %5$s|1: month input, 2: day input, 3: year input, 4: hour input, 5: minute input'), $month, $day, $year, $hour, $minute); + + echo ''; + + if ( $multi ) return; + echo "\n\n"; - foreach ( array('mm', 'jj', 'aa', 'hh', 'mn') as $timeunit ) + foreach ( array('mm', 'jj', 'aa', 'hh', 'mn') as $timeunit ) { echo '' . "\n"; + $cur_timeunit = 'cur_' . $timeunit; + echo '' . "\n"; + } ?> + +

      + + +

      get_results( $wpdb->prepare("SELECT ID, post_parent, post_title FROM $wpdb->posts WHERE post_parent = %d AND post_type = 'page' ORDER BY menu_order", $parent) ); @@ -1019,7 +2505,7 @@ function parent_dropdown( $default = 0, $parent = 0, $level = 0 ) { else $current = ''; - echo "\n\t"; + echo "\n\t"; parent_dropdown( $default, $item->ID, $level +1 ); } } else { @@ -1027,16 +2513,26 @@ function parent_dropdown( $default = 0, $parent = 0, $level = 0 ) { } } +/** + * {@internal Missing Short Description}} + * + * @since unknown + */ function browse_happy() { $getit = __( 'WordPress recommends a better browser' ); echo ' - Browse Happy - '; +
      Browse Happy
      +'; } -if (strpos($_SERVER['HTTP_USER_AGENT'], 'MSIE') !== false) - add_action( 'in_admin_footer', 'browse_happy' ); - +/** + * {@internal Missing Short Description}} + * + * @since unknown + * + * @param unknown_type $id + * @return unknown + */ function the_attachment_links( $id = false ) { $id = (int) $id; $post = & get_post( $id ); @@ -1068,7 +2564,7 @@ function the_attachment_links( $id = false ) { - + @@ -1080,8 +2576,16 @@ function the_attachment_links( $id = false ) { role_names as $role => $name ) { $name = translate_with_context($name); @@ -1093,6 +2597,14 @@ function wp_dropdown_roles( $default = false ) { echo $p . $r; } +/** + * {@internal Missing Short Description}} + * + * @since unknown + * + * @param unknown_type $size + * @return unknown + */ function wp_convert_hr_to_bytes( $size ) { $size = strtolower($size); $bytes = (int) $size; @@ -1105,6 +2617,14 @@ function wp_convert_hr_to_bytes( $size ) { return $bytes; } +/** + * {@internal Missing Short Description}} + * + * @since unknown + * + * @param unknown_type $bytes + * @return unknown + */ function wp_convert_bytes_to_hr( $bytes ) { $units = array( 0 => 'B', 1 => 'kB', 2 => 'MB', 3 => 'GB' ); $log = log( $bytes, 1024 ); @@ -1113,6 +2633,13 @@ function wp_convert_bytes_to_hr( $bytes ) { return $size . $units[$power]; } +/** + * {@internal Missing Short Description}} + * + * @since unknown + * + * @return unknown + */ function wp_max_upload_size() { $u_bytes = wp_convert_hr_to_bytes( ini_get( 'upload_max_filesize' ) ); $p_bytes = wp_convert_hr_to_bytes( ini_get( 'post_max_size' ) ); @@ -1120,6 +2647,13 @@ function wp_max_upload_size() { return $bytes; } +/** + * {@internal Missing Short Description}} + * + * @since unknown + * + * @param unknown_type $action + */ function wp_import_upload_form( $action ) { $bytes = apply_filters( 'import_upload_size_limit', wp_max_upload_size() ); $size = wp_convert_bytes_to_hr( $bytes ); @@ -1139,6 +2673,11 @@ function wp_import_upload_form( $action ) { post_name); // just in case @@ -1147,53 +2686,60 @@ function wp_remember_old_slug() { } /** - * add_meta_box() - Add a meta box to an edit form + * Add a meta box to an edit form. * - * @since 2.5 + * @since 2.5.0 * * @param string $id String for use in the 'id' attribute of tags. - * @param string $title Title of the meta box - * @param string $callback Function that fills the box with the desired content. The function should echo its output. - * @param string $page The type of edit page on which to show the box (post, page, link) - * @param string $context The context within the page where the boxes should show ('normal', 'advanced') - * @param string $priority The priority within the context where the boxes should show ('high', 'low') + * @param string $title Title of the meta box. + * @param string $callback Function that fills the box with the desired content. The function should echo its output. + * @param string $page The type of edit page on which to show the box (post, page, link). + * @param string $context The context within the page where the boxes should show ('normal', 'advanced'). + * @param string $priority The priority within the context where the boxes should show ('high', 'low'). */ function add_meta_box($id, $title, $callback, $page, $context = 'advanced', $priority = 'default') { global $wp_meta_boxes; - - if ( !isset($wp_meta_boxes) ) + if ( !isset($wp_meta_boxes) ) $wp_meta_boxes = array(); if ( !isset($wp_meta_boxes[$page]) ) $wp_meta_boxes[$page] = array(); if ( !isset($wp_meta_boxes[$page][$context]) ) $wp_meta_boxes[$page][$context] = array(); + foreach ( array_keys($wp_meta_boxes[$page]) as $a_context ) { foreach ( array('high', 'core', 'default', 'low') as $a_priority ) { - if ( !isset($wp_meta_boxes[$page][$context][$a_priority][$id]) ) + if ( !isset($wp_meta_boxes[$page][$a_context][$a_priority][$id]) ) continue; + // If a core box was previously added or removed by a plugin, don't add. if ( 'core' == $priority ) { // If core box previously deleted, don't add - if ( false === $wp_meta_boxes[$page][$context][$a_priority][$id] ) + if ( false === $wp_meta_boxes[$page][$a_context][$a_priority][$id] ) return; // If box was added with default priority, give it core priority to maintain sort order if ( 'default' == $a_priority ) { - $wp_meta_boxes[$page][$context]['core'][$id] = $wp_meta_boxes[$page][$context]['default'][$id]; - unset($wp_meta_boxes[$page][$context]['default'][$id]); + $wp_meta_boxes[$page][$a_context]['core'][$id] = $wp_meta_boxes[$page][$a_context]['default'][$id]; + unset($wp_meta_boxes[$page][$a_context]['default'][$id]); } return; } // If no priority given and id already present, use existing priority - if ( empty($priority) ) + if ( empty($priority) ) { $priority = $a_priority; - // An id can be in only one priority - if ( $priority != $a_priority ) - unset($wp_meta_boxes[$page][$context][$a_priority][$id]); + // else if we're adding to the sorted priortiy, we don't know the title or callback. Glab them from the previously added context/priority. + } elseif ( 'sorted' == $priority ) { + $title = $wp_meta_boxes[$page][$a_context][$a_priority][$id]['title']; + $callback = $wp_meta_boxes[$page][$a_context][$a_priority][$id]['callback']; + } + // An id can be in only one priority and one context + if ( $priority != $a_priority || $context != $a_context ) + unset($wp_meta_boxes[$page][$a_context][$a_priority][$id]); + } } if ( empty($priority) ) - $priority = low; + $priority = 'low'; if ( !isset($wp_meta_boxes[$page][$context][$priority]) ) $wp_meta_boxes[$page][$context][$priority] = array(); @@ -1201,41 +2747,80 @@ function add_meta_box($id, $title, $callback, $page, $context = 'advanced', $pri $wp_meta_boxes[$page][$context][$priority][$id] = array('id' => $id, 'title' => $title, 'callback' => $callback); } +/** + * {@internal Missing Short Description}} + * + * @since unknown + * + * @param unknown_type $page + * @param unknown_type $context + * @param unknown_type $object + * @return int number of meta_boxes + */ function do_meta_boxes($page, $context, $object) { global $wp_meta_boxes; + static $already_sorted = false; - do_action('do_meta_boxes', $page, $context, $object); + //do_action('do_meta_boxes', $page, $context, $object); - if ( !isset($wp_meta_boxes) || !isset($wp_meta_boxes[$page]) || !isset($wp_meta_boxes[$page][$context]) ) - return; + $hidden = get_hidden_meta_boxes($page); - foreach ( array('high', 'core', 'default', 'low') as $priority ) { - foreach ( (array) $wp_meta_boxes[$page][$context][$priority] as $box ) { - if ( false === $box ) - continue; - echo '
      ' . "\n"; - echo "

      {$box['title']}

      \n"; - echo '
      ' . "\n"; - call_user_func($box['callback'], $object, $box); - echo "
      \n"; - echo "
      \n"; + echo "
      \n"; + + $i = 0; + do { + // Grab the ones the user has manually sorted. Pull them out of their previous context/priority and into the one the user chose + if ( !$already_sorted && $sorted = get_user_option( "meta-box-order_$page", 0, false ) ) { + foreach ( $sorted as $box_context => $ids ) + foreach ( explode(',', $ids) as $id ) + if ( $id ) + add_meta_box( $id, null, null, $page, $box_context, 'sorted' ); } - } + $already_sorted = true; + + if ( !isset($wp_meta_boxes) || !isset($wp_meta_boxes[$page]) || !isset($wp_meta_boxes[$page][$context]) ) + break; + + foreach ( array('high', 'sorted', 'core', 'default', 'low') as $priority ) { + if ( isset($wp_meta_boxes[$page][$context][$priority]) ) { + foreach ( (array) $wp_meta_boxes[$page][$context][$priority] as $box ) { + if ( false == $box || ! $box['title'] ) + continue; + $i++; + $style = ''; + if ( in_array($box['id'], $hidden) ) + $style = 'style="display:none;"'; + echo '
      ' . "\n"; + echo '

      '; + echo "

      {$box['title']}

      \n"; + echo '
      ' . "\n"; + call_user_func($box['callback'], $object, $box); + echo "
      \n"; + echo "
      \n"; + } + } + } + } while(0); + + echo "
      "; + + return $i; + } /** - * remove_meta_box() - Remove a meta box from an edit form + * Remove a meta box from an edit form. * - * @since 2.6 + * @since 2.6.0 * * @param string $id String for use in the 'id' attribute of tags. - * @param string $page The type of edit page on which to show the box (post, page, link) - * @param string $context The context within the page where the boxes should show ('normal', 'advanced') + * @param string $page The type of edit page on which to show the box (post, page, link). + * @param string $context The context within the page where the boxes should show ('normal', 'advanced'). */ function remove_meta_box($id, $page, $context) { global $wp_meta_boxes; - if ( !isset($wp_meta_boxes) ) + if ( !isset($wp_meta_boxes) ) $wp_meta_boxes = array(); if ( !isset($wp_meta_boxes[$page]) ) $wp_meta_boxes[$page] = array(); @@ -1246,4 +2831,621 @@ function remove_meta_box($id, $page, $context) { $wp_meta_boxes[$page][$context][$priority][$id] = false; } +/** + * {@internal Missing Short Description}} + * + * @since unknown + * + * @param unknown_type $page + */ +function meta_box_prefs($page) { + global $wp_meta_boxes; + + if ( empty($wp_meta_boxes[$page]) ) + return; + + $hidden = get_hidden_meta_boxes($page); + + foreach ( array_keys($wp_meta_boxes[$page]) as $context ) { + foreach ( array_keys($wp_meta_boxes[$page][$context]) as $priority ) { + foreach ( $wp_meta_boxes[$page][$context][$priority] as $box ) { + if ( false == $box || ! $box['title'] ) + continue; + // Submit box cannot be hidden + if ( 'submitdiv' == $box['id'] || 'linksubmitdiv' == $box['id'] ) + continue; + $box_id = $box['id']; + echo '\n"; + } + } + } +} + +function get_hidden_meta_boxes($page) { + $hidden = (array) get_user_option( "meta-box-hidden_$page", 0, false ); + + // Hide slug boxes by default + if ( empty($hidden[0]) ) { + if ( 'page' == $page ) + $hidden = array('pageslugdiv'); + elseif ( 'post' == $page ) + $hidden = array('slugdiv'); + } + + return $hidden; +} + +/** + * Add a new section to a settings page. + * + * @since 2.7.0 + * + * @param string $id String for use in the 'id' attribute of tags. + * @param string $title Title of the section. + * @param string $callback Function that fills the section with the desired content. The function should echo its output. + * @param string $page The type of settings page on which to show the section (general, reading, writing, ...). + */ +function add_settings_section($id, $title, $callback, $page) { + global $wp_settings_sections; + + if ( !isset($wp_settings_sections) ) + $wp_settings_sections = array(); + if ( !isset($wp_settings_sections[$page]) ) + $wp_settings_sections[$page] = array(); + if ( !isset($wp_settings_sections[$page][$id]) ) + $wp_settings_sections[$page][$id] = array(); + + $wp_settings_sections[$page][$id] = array('id' => $id, 'title' => $title, 'callback' => $callback); +} + +/** + * Add a new field to a settings page. + * + * @since 2.7.0 + * + * @param string $id String for use in the 'id' attribute of tags. + * @param string $title Title of the field. + * @param string $callback Function that fills the field with the desired content. The function should echo its output. + * @param string $page The type of settings page on which to show the field (general, reading, writing, ...). + * @param string $section The section of the settingss page in which to show the box (default, ...). + * @param array $args Additional arguments + */ +function add_settings_field($id, $title, $callback, $page, $section = 'default', $args = array()) { + global $wp_settings_fields; + + if ( !isset($wp_settings_fields) ) + $wp_settings_fields = array(); + if ( !isset($wp_settings_fields[$page]) ) + $wp_settings_fields[$page] = array(); + if ( !isset($wp_settings_fields[$page][$section]) ) + $wp_settings_fields[$page][$section] = array(); + + $wp_settings_fields[$page][$section][$id] = array('id' => $id, 'title' => $title, 'callback' => $callback, 'args' => $args); +} + +/** + * {@internal Missing Short Description}} + * + * @since unknown + * + * @param unknown_type $page + */ +function do_settings_sections($page) { + global $wp_settings_sections, $wp_settings_fields; + + if ( !isset($wp_settings_sections) || !isset($wp_settings_sections[$page]) ) + return; + + foreach ( (array) $wp_settings_sections[$page] as $section ) { + echo "

      {$section['title']}

      \n"; + call_user_func($section['callback'], $section); + if ( !isset($wp_settings_fields) || !isset($wp_settings_fields[$page]) || !isset($wp_settings_fields[$page][$section['id']]) ) + continue; + echo ''; + do_settings_fields($page, $section['id']); + echo '
      '; + } +} + +/** + * {@internal Missing Short Description}} + * + * @since unknown + * + * @param unknown_type $page + * @param unknown_type $section + */ +function do_settings_fields($page, $section) { + global $wp_settings_fields; + + if ( !isset($wp_settings_fields) || !isset($wp_settings_fields[$page]) || !isset($wp_settings_fields[$page][$section]) ) + return; + + foreach ( (array) $wp_settings_fields[$page][$section] as $field ) { + echo ''; + if ( !empty($field['args']['label_for']) ) + echo ''; + else + echo '' . $field['title'] . ''; + echo ''; + call_user_func($field['callback']); + echo ''; + echo ''; + } +} + +/** + * {@internal Missing Short Description}} + * + * @since unknown + * + * @param unknown_type $page + */ +function manage_columns_prefs($page) { + $columns = get_column_headers($page); + + $hidden = get_hidden_columns($page); + + foreach ( $columns as $column => $title ) { + // Can't hide these + if ( 'cb' == $column || 'title' == $column || 'name' == $column || 'username' == $column || 'media' == $column || 'comment' == $column ) + continue; + if ( empty($title) ) + continue; + + if ( 'comments' == $column ) + $title = __('Comments'); + $id = "$column-hide"; + echo '\n"; + } +} + +/** + * {@internal Missing Short Description}} + * + * @since unknown + * + * @param unknown_type $found_action + */ +function find_posts_div($found_action = '') { +?> + + +post_password ) ) echo attribute_escape( $post->post_password ); +} + +/** + * {@internal Missing Short Description}} + * + * @since unknown + */ +function favorite_actions() { + $actions = array( + 'post-new.php' => array(__('New Post'), 'edit_posts'), + 'edit.php?post_status=draft' => array(__('Drafts'), 'edit_posts'), + 'page-new.php' => array(__('New Page'), 'edit_pages'), + 'media-new.php' => array(__('Upload'), 'upload_files'), + 'edit-comments.php' => array(__('Comments'), 'moderate_comments') + ); + + $actions = apply_filters('favorite_actions', $actions); + + $allowed_actions = array(); + foreach ( $actions as $action => $data ) { + if ( current_user_can($data[1]) ) + $allowed_actions[$action] = $data[0]; + } + + if ( empty($allowed_actions) ) + return; + + $first = array_keys($allowed_actions); + $first = $first[0]; + echo '
      '; + echo '

      '; + echo '
      '; + + array_shift($allowed_actions); + + foreach ( $allowed_actions as $action => $label) { + echo "\n"; + } + echo "
      \n"; +} + +/** + * Get the post title. + * + * The post title is fetched and if it is blank then a default string is + * returned. + * + * @since 2.7.0 + * @param int $id The post id. If not supplied the global $post is used. + * + */ +function _draft_or_post_title($post_id = 0) +{ + $title = get_the_title($post_id); + if ( empty($title) ) + $title = __('(no title)'); + return $title; +} + +/** + * Display the search query. + * + * A simple wrapper to display the "s" parameter in a GET URI. This function + * should only be used when {@link the_search_query()} cannot. + * + * @uses attribute_escape + * @since 2.7.0 + * + */ +function _admin_search_query() { + echo isset($_GET['s']) ? attribute_escape( stripslashes( $_GET['s'] ) ) : ''; +} + +/** + * Generic Iframe header for use with Thickbox + * + * @since 2.7.0 + * @param string $title Title of the Iframe page. + * @param bool $limit_styles Limit styles to colour-related styles only (unless others are enqueued). + * + */ +function iframe_header( $title = '', $limit_styles = false) { +?> + > + + +<?php bloginfo('name') ?> › <?php echo $title ?> — <?php _e('WordPress'); ?> + + + + +> + +'; +} + +function _post_states($post) { + $post_states = array(); + if ( isset($_GET['post_status']) ) + $post_status = $_GET['post_status']; + else + $post_status = ''; + + if ( !empty($post->post_password) ) + $post_states[] = __('Password protected'); + if ( 'private' == $post->post_status && 'private' != $post_status ) + $post_states[] = __('Private'); + if ( 'draft' == $post->post_status && 'draft' != $post_status ) + $post_states[] = __('Draft'); + if ( 'pending' == $post->post_status && 'pending' != $post_status ) + $post_states[] = __('Pending'); + + if ( ! empty($post_states) ) { + $state_count = count($post_states); + $i = 0; + echo ' - '; + foreach ( $post_states as $state ) { + ++$i; + ( $i == $state_count ) ? $sep = '' : $sep = ', '; + echo "$state$sep"; + } + } +} + +function screen_meta($screen) { + global $wp_meta_boxes, $_wp_contextual_help; + + $screen = str_replace('.php', '', $screen); + $screen = str_replace('-new', '', $screen); + $screen = str_replace('-add', '', $screen); + $screen = apply_filters('screen_meta_screen', $screen); + + $column_screens = get_column_headers($screen); + $meta_screens = array('index' => 'dashboard'); + + if ( isset($meta_screens[$screen]) ) + $screen = $meta_screens[$screen]; + $show_screen = false; + if ( !empty($wp_meta_boxes[$screen]) || !empty($column_screens) ) + $show_screen = true; +?> +
      + + + +' . __('Writing Posts') . '

      '; + $_wp_contextual_help['post'] = $help; + } + + if ( !isset($_wp_contextual_help['page']) ) { + $help = drag_drop_help(); + $_wp_contextual_help['page'] = $help; + } + + if ( !isset($_wp_contextual_help['dashboard']) ) { + $help = drag_drop_help(); + $_wp_contextual_help['dashboard'] = $help; + } + + if ( !isset($_wp_contextual_help['link']) ) { + $help = drag_drop_help(); + $_wp_contextual_help['link'] = $help; + } + + if ( !isset($_wp_contextual_help['options-general']) ) + $_wp_contextual_help['options-general'] = __('General Settings'); + + $_wp_contextual_help = apply_filters('contextual_help_list', $_wp_contextual_help, $screen); + ?> + + + +
      +' . __('Most of the modules on this screen can be moved. If you hover your mouse over the title bar of a module you’ll notice the 4 arrow cursor appears to let you know it is movable. Click on it, hold down the mouse button and start dragging the module to a new location. As you drag the module, notice the dotted gray box that also moves. This box indicates where the module will be placed when you release the mouse button.') . '

      +

      ' . __('The same modules can be expanded and collapsed by clicking once on their title bar and also completely hidden from the Screen Options tab.') . '

      +'; +} + +function screen_icon($name = '') { + global $parent_file, $hook_suffix; + + if ( empty($name) ) { + if ( isset($parent_file) && !empty($parent_file) ) + $name = substr($parent_file, 0, -4); + else + $name = str_replace(array('.php', '-new', '-add'), '', $hook_suffix); + } + unset($hook_suffix); +?> +

      + diff --git a/wp-admin/includes/theme.php b/wp-admin/includes/theme.php index ec670ce6..8b883e23 100644 --- a/wp-admin/includes/theme.php +++ b/wp-admin/includes/theme.php @@ -1,5 +1,18 @@ exists($from . '/wordpress/wp-settings.php') || !$wp_filesystem->exists($from . '/wordpress/wp-admin/admin.php') || + !$wp_filesystem->exists($from . '/wordpress/wp-includes/functions.php') ) { + $wp_filesystem->delete($from, true); + return new WP_Error('insane_distro', __('The update could not be unpacked') ); + } + + apply_filters('update_feedback', __('Installing the latest version')); + + // Create maintenance file to signal that we are upgrading + $maintenance_string = ''; + $maintenance_file = $to . '.maintenance'; + $wp_filesystem->delete($maintenance_file); + $wp_filesystem->put_contents($maintenance_file, $maintenance_string, FS_CHMOD_FILE); + + // Copy new versions of WP files into place. + $result = copy_dir($from . '/wordpress', $to); + if ( is_wp_error($result) ) { + $wp_filesystem->delete($maintenance_file); + //$wp_filesystem->delete($working_dir, true); //TODO: Uncomment? This DOES mean that the new files are available in the upgrade folder if it fails. + return $result; + } + + // Remove old files + foreach ( $_old_files as $old_file ) { + $old_file = $to . $old_file; + if ( !$wp_filesystem->exists($old_file) ) + continue; + $wp_filesystem->delete($old_file, true); + } + + // Upgrade DB with separate request + apply_filters('update_feedback', __('Upgrading database')); + $db_upgrade_url = admin_url('upgrade.php?step=upgrade_db'); + wp_remote_post($db_upgrade_url, array('timeout' => 60)); + + // Remove working directory + $wp_filesystem->delete($from, true); + + // Force refresh of update information + delete_option('update_core'); + + // Remove maintenance file, we're done. + $wp_filesystem->delete($maintenance_file); +} + +?> diff --git a/wp-admin/includes/update.php b/wp-admin/includes/update.php index 7070bad8..c90bd7aa 100644 --- a/wp-admin/includes/update.php +++ b/wp-admin/includes/update.php @@ -1,42 +1,134 @@ 'latest'); + return $updates[0]; +} + +/** + * Get available core updates + * + * @param array $options Set $options['dismissed'] to true to show dismissed upgrades too, + * set $options['available'] to false to skip not-dimissed updates. + * @return array Array of the update objects + */ +function get_core_updates( $options = array() ) { + $options = array_merge( array('available' => true, 'dismissed' => false ), $options ); + $dismissed = get_option( 'dismissed_update_core' ); + if ( !is_array( $dismissed ) ) $dismissed = array(); + $from_api = get_option( 'update_core' ); + if ( empty($from_api) ) + return false; + if ( !is_array( $from_api->updates ) ) return false; + $updates = $from_api->updates; + if ( !is_array( $updates ) ) return false; + $result = array(); + foreach($updates as $update) { + if ( array_key_exists( $update->current.'|'.$update->locale, $dismissed ) ) { + if ( $options['dismissed'] ) { + $update->dismissed = true; + $result[]= $update; + } + } else { + if ( $options['available'] ) { + $update->dismissed = false; + $result[]= $update; + } + } + } + return $result; +} + +function dismiss_core_update( $update ) { + $dismissed = get_option( 'dismissed_update_core' ); + $dismissed[ $update->current.'|'.$update->locale ] = true; + return update_option( 'dismissed_update_core', $dismissed ); +} + +function undismiss_core_update( $version, $locale ) { + $dismissed = get_option( 'dismissed_update_core' ); + $key = $version.'|'.$locale; + if ( !isset( $dismissed[$key] ) ) return false; + unset( $dismissed[$key] ); + return update_option( 'dismissed_update_core', $dismissed ); +} + +function find_core_update( $version, $locale ) { + $from_api = get_option( 'update_core' ); + if ( !is_array( $from_api->updates ) ) return false; + $updates = $from_api->updates; + foreach($updates as $update) { + if ( $update->current == $version && $update->locale == $locale ) + return $update; + } + return false; +} + function core_update_footer( $msg = '' ) { if ( !current_user_can('manage_options') ) return sprintf( '| '.__( 'Version %s' ), $GLOBALS['wp_version'] ); - $cur = get_option( 'update_core' ); + $cur = get_preferred_from_update_core(); + if ( ! isset( $cur->current ) ) + $cur->current = ''; + + if ( ! isset( $cur->url ) ) + $cur->url = ''; + + if ( ! isset( $cur->response ) ) + $cur->response = ''; switch ( $cur->response ) { case 'development' : - return sprintf( '| '.__( 'You are using a development version (%s). Cool! Please stay updated.' ), $GLOBALS['wp_version'], $cur->url, $cur->current ); + return sprintf( __( 'You are using a development version (%1$s). Cool! Please stay updated.' ), $GLOBALS['wp_version'], 'update-core.php'); break; case 'upgrade' : if ( current_user_can('manage_options') ) { - return sprintf( '| '.__( 'Get Version %3$s' ).'', $GLOBALS['wp_version'], $cur->url, $cur->current ); + return sprintf( ''.__( 'Get Version %2$s' ).'', 'update-core.php', $cur->current); break; } case 'latest' : default : - return sprintf( '| '.__( 'Version %s' ), $GLOBALS['wp_version'], $cur->url, $cur->current ); + return sprintf( __( 'Version %s' ), $GLOBALS['wp_version'] ); break; } } add_filter( 'update_footer', 'core_update_footer' ); function update_nag() { - $cur = get_option( 'update_core' ); + global $pagenow; + + if ( 'update-core.php' == $pagenow ) + return; + + $cur = get_preferred_from_update_core(); if ( ! isset( $cur->response ) || $cur->response != 'upgrade' ) return false; if ( current_user_can('manage_options') ) - $msg = sprintf( __('WordPress %2$s is available! Please update now.'), $cur->url, $cur->current ); + $msg = sprintf( __('WordPress %1$s is available! Please update now.'), $cur->current, 'update-core.php' ); else - $msg = sprintf( __('WordPress %2$s is available! Please notify the site administrator.'), $cur->url, $cur->current ); + $msg = sprintf( __('WordPress %1$s is available! Please notify the site administrator.'), $cur->current ); echo "
      $msg
      "; } @@ -44,11 +136,11 @@ add_action( 'admin_notices', 'update_nag', 3 ); // Called directly from dashboard function update_right_now_message() { - $cur = get_option( 'update_core' ); + $cur = get_preferred_from_update_core(); - $msg = sprintf( __('This is WordPress version %s.'), $GLOBALS['wp_version'] ); + $msg = sprintf( __('You are using WordPress %s.'), $GLOBALS['wp_version'] ); if ( isset( $cur->response ) && $cur->response == 'upgrade' && current_user_can('manage_options') ) - $msg .= " " . sprintf( __('Update to %s'), $cur->current ? $cur->current : __( 'Latest' ) ) . ''; + $msg .= " " . sprintf( __('Update to %s'), $cur->current ? $cur->current : __( 'Latest' ) ) . ''; echo "$msg"; } @@ -60,14 +152,16 @@ function wp_plugin_update_row( $file, $plugin_data ) { $r = $current->response[ $file ]; + $details_url = admin_url('plugin-install.php?tab=plugin-information&plugin=' . $r->slug . '&TB_iframe=true&width=600&height=800'); + echo ''; if ( ! current_user_can('update_plugins') ) - printf( __('There is a new version of %1$s available. Download version %3$s here.'), $plugin_data['Name'], $r->url, $r->new_version); + printf( __('There is a new version of %1$s available. View version %3$s Details.'), $plugin_data['Name'], $details_url, $r->new_version); else if ( empty($r->package) ) - printf( __('There is a new version of %1$s available. Download version %3$s here automatic upgrade unavailable for this plugin.'), $plugin_data['Name'], $r->url, $r->new_version); + printf( __('There is a new version of %1$s available. View version %3$s Details automatic upgrade unavailable for this plugin.'), $plugin_data['Name'], $details_url, $r->new_version); else - printf( __('There is a new version of %1$s available. Download version %3$s here or upgrade automatically.'), $plugin_data['Name'], $r->url, $r->new_version, wp_nonce_url('update.php?action=upgrade-plugin&plugin=' . $file, 'upgrade-plugin_' . $file) ); - + printf( __('There is a new version of %1$s available. View version %3$s Details or upgrade automatically.'), $plugin_data['Name'], $details_url, $r->new_version, wp_nonce_url('update.php?action=upgrade-plugin&plugin=' . $file, 'upgrade-plugin_' . $file) ); + echo ''; } add_action( 'after_plugin_row', 'wp_plugin_update_row', 10, 2 ); @@ -102,7 +196,7 @@ function wp_update_plugin($plugin, $feedback = '') { $content_dir = $wp_filesystem->wp_content_dir(); if( empty($content_dir) ) return new WP_Error('fs_no_content_dir', __('Unable to locate WordPress Content directory (wp-content).')); - + $plugins_dir = trailingslashit( $plugins_dir ); $content_dir = trailingslashit( $content_dir ); @@ -129,10 +223,10 @@ function wp_update_plugin($plugin, $feedback = '') { apply_filters('update_feedback', __('Unpacking the update')); // Unzip package to working directory $result = unzip_file($download_file, $working_dir); - + // Once extracted, delete the package unlink($download_file); - + if ( is_wp_error($result) ) { $wp_filesystem->delete($working_dir, true); return $result; @@ -147,7 +241,7 @@ function wp_update_plugin($plugin, $feedback = '') { // Remove the existing plugin. apply_filters('update_feedback', __('Removing the old version of the plugin')); $this_plugin_dir = trailingslashit( dirname($plugins_dir . $plugin) ); - + // If plugin is in its own directory, recursively delete the directory. if ( strpos($plugin, '/') && $this_plugin_dir != $plugins_dir ) //base check on if plugin includes directory seperator AND that its not the root plugin folder $deleted = $wp_filesystem->delete($this_plugin_dir, true); @@ -163,7 +257,7 @@ function wp_update_plugin($plugin, $feedback = '') { // Copy new version of plugin into place. $result = copy_dir($working_dir, $plugins_dir); if ( is_wp_error($result) ) { - //$wp_filesystem->delete($working_dir, true); //TODO: Uncomment? This DOES mean that the new files are available in the upgrade folder if it fails. + $wp_filesystem->delete($working_dir, true); return $result; } @@ -175,10 +269,10 @@ function wp_update_plugin($plugin, $feedback = '') { // Force refresh of plugin update information delete_option('update_plugins'); - + if( empty($filelist) ) return false; //We couldnt find any files in the working dir, therefor no plugin installed? Failsafe backup. - + $folder = $filelist[0]; $plugin = get_plugins('/' . $folder); //Ensure to pass with leading slash $pluginfiles = array_keys($plugin); //Assume the requested plugin is the first in the list @@ -186,4 +280,213 @@ function wp_update_plugin($plugin, $feedback = '') { return $folder . '/' . $pluginfiles[0]; } +function wp_update_theme($theme, $feedback = '') { + global $wp_filesystem; + + if ( !empty($feedback) ) + add_filter('update_feedback', $feedback); + + // Is an update available? + $current = get_option( 'update_themes' ); + if ( !isset( $current->response[ $theme ] ) ) + return new WP_Error('up_to_date', __('The theme is at the latest version.')); + + $r = $current->response[ $theme ]; + + $themes = get_themes(); + foreach ( (array) $themes as $this_theme ) { + if ( $this_theme['Stylesheet'] == $theme ) { + $theme_directory = preg_replace('!^/themes/!i', '', $this_theme['Stylesheet Dir']); + break; + } + } + unset($themes); + + if ( empty($theme_directory) ) + return new WP_Error('theme_non_existant', __('Theme does not exist.')); + + // Is a filesystem accessor setup? + if ( ! $wp_filesystem || ! is_object($wp_filesystem) ) + WP_Filesystem(); + + if ( ! is_object($wp_filesystem) ) + return new WP_Error('fs_unavailable', __('Could not access filesystem.')); + + if ( $wp_filesystem->errors->get_error_code() ) + return new WP_Error('fs_error', __('Filesystem error'), $wp_filesystem->errors); + + //Get the base plugin folder + $themes_dir = $wp_filesystem->wp_themes_dir(); + if ( empty($themes_dir) ) + return new WP_Error('fs_no_themes_dir', __('Unable to locate WordPress Theme directory.')); + + //And the same for the Content directory. + $content_dir = $wp_filesystem->wp_content_dir(); + if( empty($content_dir) ) + return new WP_Error('fs_no_content_dir', __('Unable to locate WordPress Content directory (wp-content).')); + + $themes_dir = trailingslashit( $themes_dir ); + $content_dir = trailingslashit( $content_dir ); + + if ( empty($r->package) ) + return new WP_Error('no_package', __('Upgrade package not available.')); + + // Download the package + apply_filters('update_feedback', sprintf(__('Downloading update from %s'), $r['package'])); + $download_file = download_url($r['package']); + + if ( is_wp_error($download_file) ) + return new WP_Error('download_failed', __('Download failed.'), $download_file->get_error_message()); + + $working_dir = $content_dir . 'upgrade/' . basename($theme_directory); + + // Clean up working directory + if ( $wp_filesystem->is_dir($working_dir) ) + $wp_filesystem->delete($working_dir, true); + + apply_filters('update_feedback', __('Unpacking the update')); + // Unzip package to working directory + $result = unzip_file($download_file, $working_dir); + + // Once extracted, delete the package + unlink($download_file); + + if ( is_wp_error($result) ) { + $wp_filesystem->delete($working_dir, true); + return $result; + } + + //TODO: Is theme currently active? If so, set default theme + /* + if ( is_plugin_active($plugin) ) { + //Deactivate the plugin silently, Prevent deactivation hooks from running. + apply_filters('update_feedback', __('Deactivating the plugin')); + deactivate_plugins($plugin, true); + }*/ + + // Remove the existing plugin. + apply_filters('update_feedback', __('Removing the old version of the theme')); + $deleted = $wp_filesystem->delete($themes_dir . $theme_directory, true); + + if ( ! $deleted ) { + $wp_filesystem->delete($working_dir, true); + return new WP_Error('delete_failed', __('Could not remove the old plugin')); + } + + apply_filters('update_feedback', __('Installing the latest version')); + // Copy new version of plugin into place. + $result = copy_dir($working_dir, $themes_dir); + if ( is_wp_error($result) ) { + $wp_filesystem->delete($working_dir, true); + return $result; + } + + //Get a list of the directories in the working directory before we delete it, We need to know the new folder for the plugin + //$filelist = array_keys( $wp_filesystem->dirlist($working_dir) ); + + // Remove working directory + $wp_filesystem->delete($working_dir, true); + + // Force refresh of plugin update information + delete_option('update_themes'); + + /*if( empty($filelist) ) + return false; //We couldnt find any files in the working dir, therefor no plugin installed? Failsafe backup. + + $folder = $filelist[0]; + $plugin = get_plugins('/' . $folder); //Ensure to pass with leading slash + $pluginfiles = array_keys($plugin); //Assume the requested plugin is the first in the list + + return $folder . '/' . $pluginfiles[0];*/ +} + + +function wp_update_core($current, $feedback = '') { + global $wp_filesystem; + + @set_time_limit( 300 ); + + if ( !empty($feedback) ) + add_filter('update_feedback', $feedback); + + // Is an update available? + if ( !isset( $current->response ) || $current->response == 'latest' ) + return new WP_Error('up_to_date', __('WordPress is at the latest version.')); + + // Is a filesystem accessor setup? + if ( ! $wp_filesystem || ! is_object($wp_filesystem) ) + WP_Filesystem(); + + if ( ! is_object($wp_filesystem) ) + return new WP_Error('fs_unavailable', __('Could not access filesystem.')); + + if ( $wp_filesystem->errors->get_error_code() ) + return new WP_Error('fs_error', __('Filesystem error'), $wp_filesystem->errors); + + // Get the base WP folder + $wp_dir = $wp_filesystem->abspath(); + if ( empty($wp_dir) ) + return new WP_Error('fs_no_wp_dir', __('Unable to locate WordPress directory.')); + + // And the same for the Content directory. + $content_dir = $wp_filesystem->wp_content_dir(); + if( empty($content_dir) ) + return new WP_Error('fs_no_content_dir', __('Unable to locate WordPress Content directory (wp-content).')); + + $wp_dir = trailingslashit( $wp_dir ); + $content_dir = trailingslashit( $content_dir ); + + // Get the URL to the zip file + $package = $current->package; + + // Download the package + apply_filters('update_feedback', sprintf(__('Downloading update from %s'), $package)); + $download_file = download_url($package); + + if ( is_wp_error($download_file) ) + return new WP_Error('download_failed', __('Download failed.'), $download_file->get_error_message()); + + $working_dir = $content_dir . 'upgrade/core'; + // Clean up working directory + if ( $wp_filesystem->is_dir($working_dir) ) { + $wp_filesystem->delete($working_dir, true); + } + + apply_filters('update_feedback', __('Unpacking the core update')); + // Unzip package to working directory + $result = unzip_file($download_file, $working_dir); + // Once extracted, delete the package + unlink($download_file); + + if ( is_wp_error($result) ) { + $wp_filesystem->delete($working_dir, true); + return $result; + } + + // Copy update-core.php from the new version into place. + if ( !$wp_filesystem->copy($working_dir . '/wordpress/wp-admin/includes/update-core.php', $wp_dir . 'wp-admin/includes/update-core.php', true) ) { + $wp_filesystem->delete($working_dir, true); + return new WP_Error('copy_failed', __('Could not copy files')); + } + $wp_filesystem->chmod($wp_dir . 'wp-admin/includes/update-core.php', FS_CHMOD_FILE); + + require(ABSPATH . 'wp-admin/includes/update-core.php'); + + return update_core($working_dir, $wp_dir); +} + +function maintenance_nag() { + global $upgrading; + if ( ! isset( $upgrading ) ) + return false; + + if ( current_user_can('manage_options') ) + $msg = sprintf( __('An automated WordPress update has failed to complete - please attempt the update again now.'), 'update-core.php' ); + else + $msg = __('An automated WordPress update has failed to complete! Please notify the site administrator.'); + + echo "
      $msg
      "; +} +add_action( 'admin_notices', 'maintenance_nag' ); + ?> diff --git a/wp-admin/includes/upgrade.php b/wp-admin/includes/upgrade.php index fc398ab4..4919fd43 100644 --- a/wp-admin/includes/upgrade.php +++ b/wp-admin/includes/upgrade.php @@ -1,11 +1,38 @@ user_email; @@ -132,6 +180,15 @@ http://wordpress.org/ endif; if ( !function_exists('wp_upgrade') ) : +/** + * Run WordPress Upgrade functions. + * + * {@internal Missing Long Description}} + * + * @since unknown + * + * @return null + */ function wp_upgrade() { global $wp_current_db_version, $wp_db_version; @@ -141,6 +198,9 @@ function wp_upgrade() { if ( $wp_db_version == $wp_current_db_version ) return; + if( ! is_blog_installed() ) + return; + wp_check_mysql_version(); wp_cache_flush(); make_db_current_silent(); @@ -149,7 +209,13 @@ function wp_upgrade() { } endif; -// Functions to be called in install and upgrade scripts +/** + * Functions to be called in install and upgrade scripts. + * + * {@internal Missing Long Description}} + * + * @since unknown + */ function upgrade_all() { global $wp_current_db_version, $wp_db_version, $wp_rewrite; $wp_current_db_version = __get_option('db_version'); @@ -207,6 +273,9 @@ function upgrade_all() { if ( $wp_current_db_version < 8201 ) upgrade_260(); + if ( $wp_current_db_version < 8989 ) + upgrade_270(); + maybe_disable_automattic_widgets(); $wp_rewrite->flush_rules(); @@ -214,6 +283,11 @@ function upgrade_all() { update_option('db_version', $wp_db_version); } +/** + * Execute changes made in WordPress 1.0. + * + * @since 1.0.0 + */ function upgrade_100() { global $wpdb; @@ -236,7 +310,6 @@ function upgrade_100() { } } - $wpdb->query("UPDATE $wpdb->options SET option_value = REPLACE(option_value, 'wp-links/links-images/', 'wp-images/links/') WHERE option_name LIKE 'links_rating_image%' AND option_value LIKE 'wp-links/links-images/%'"); @@ -266,6 +339,11 @@ function upgrade_100() { endif; } +/** + * Execute changes made in WordPress 1.0.1. + * + * @since 1.0.1 + */ function upgrade_101() { global $wpdb; @@ -279,7 +357,11 @@ function upgrade_101() { add_clean_index($wpdb->links , 'link_visible'); } - +/** + * Execute changes made in WordPress 1.2. + * + * @since 1.2.0 + */ function upgrade_110() { global $wpdb; @@ -299,7 +381,6 @@ function upgrade_110() { } } - // Get the GMT offset, we'll use that later on $all_options = get_alloptions_110(); @@ -336,6 +417,11 @@ function upgrade_110() { } +/** + * Execute changes made in WordPress 1.5. + * + * @since 1.5.0 + */ function upgrade_130() { global $wpdb; @@ -413,6 +499,11 @@ function upgrade_130() { make_site_theme(); } +/** + * Execute changes made in WordPress 2.0. + * + * @since 2.0.0 + */ function upgrade_160() { global $wpdb, $wp_current_db_version; @@ -491,6 +582,11 @@ function upgrade_160() { } } +/** + * Execute changes made in WordPress 2.1. + * + * @since 2.1.0 + */ function upgrade_210() { global $wpdb, $wp_current_db_version; @@ -530,6 +626,11 @@ function upgrade_210() { } } +/** + * Execute changes made in WordPress 2.3. + * + * @since 2.3.0 + */ function upgrade_230() { global $wp_current_db_version, $wpdb; @@ -568,7 +669,7 @@ function upgrade_230() { } } - $wpdb->query( $wpdb->prepare("INSERT INTO $wpdb->terms (term_id, name, slug, term_group) VALUES + $wpdb->query( $wpdb->prepare("INSERT INTO $wpdb->terms (term_id, name, slug, term_group) VALUES (%d, %s, %s, %d)", $term_id, $name, $slug, $term_group) ); $count = 0; @@ -700,6 +801,11 @@ function upgrade_230() { } } +/** + * Remove old options from the database. + * + * @since 2.3.0 + */ function upgrade_230_options_table() { global $wpdb; $old_options_fields = array( 'option_can_override', 'option_type', 'option_width', 'option_height', 'option_description', 'option_admin_level' ); @@ -709,6 +815,11 @@ function upgrade_230_options_table() { $wpdb->show_errors(); } +/** + * Remove old categories, link2cat, and post2cat database tables. + * + * @since 2.3.0 + */ function upgrade_230_old_tables() { global $wpdb; $wpdb->query('DROP TABLE IF EXISTS ' . $wpdb->prefix . 'categories'); @@ -716,22 +827,36 @@ function upgrade_230_old_tables() { $wpdb->query('DROP TABLE IF EXISTS ' . $wpdb->prefix . 'post2cat'); } +/** + * Upgrade old slugs made in version 2.2. + * + * @since 2.2.0 + */ function upgrade_old_slugs() { // upgrade people who were using the Redirect Old Slugs plugin global $wpdb; $wpdb->query("UPDATE $wpdb->postmeta SET meta_key = '_wp_old_slug' WHERE meta_key = 'old_slug'"); } - +/** + * Execute changes made in WordPress 2.5.0. + * + * @since 2.5.0 + */ function upgrade_250() { global $wp_current_db_version; if ( $wp_current_db_version < 6689 ) { populate_roles_250(); } - + } +/** + * Execute changes made in WordPress 2.5.1. + * + * @since 2.5.1 + */ function upgrade_251() { global $wp_current_db_version; @@ -739,13 +864,25 @@ function upgrade_251() { update_option('secret', wp_generate_password(64)); } +/** + * Execute changes made in WordPress 2.5.2. + * + * @since 2.5.2 + */ function upgrade_252() { global $wpdb; $wpdb->query("UPDATE $wpdb->users SET user_activation_key = ''"); } +/** + * Execute changes made in WordPress 2.6. + * + * @since 2.6.0 + */ function upgrade_260() { + global $wp_current_db_version; + if ( $wp_current_db_version < 8000 ) populate_roles_260(); @@ -755,9 +892,38 @@ function upgrade_260() { } } +/** + * Execute changes made in WordPress 2.7. + * + * @since 2.7.0 + */ +function upgrade_270() { + global $wpdb, $wp_current_db_version; + + if ( $wp_current_db_version < 8980 ) + populate_roles_270(); + + // Update post_date for unpublished posts with empty timestamp + if ( $wp_current_db_version < 8921 ) + $wpdb->query( "UPDATE $wpdb->posts SET post_date = post_modified WHERE post_date = '0000-00-00 00:00:00'" ); +} + + // The functions we use to actually do stuff // General + +/** + * {@internal Missing Short Description}} + * + * {@internal Missing Long Description}} + * + * @since unknown + * + * @param string $table_name Database table name to create. + * @param string $create_ddl SQL statement to create table. + * @return bool If table already exists or was created by function. + */ function maybe_create_table($table_name, $create_ddl) { global $wpdb; foreach ($wpdb->get_col("SHOW TABLES",0) as $table ) { @@ -776,6 +942,17 @@ function maybe_create_table($table_name, $create_ddl) { return false; } +/** + * {@internal Missing Short Description}} + * + * {@internal Missing Long Description}} + * + * @since unknown + * + * @param string $table Database table name. + * @param string $index Index name to drop. + * @return bool True, when finished. + */ function drop_index($table, $index) { global $wpdb; $wpdb->hide_errors(); @@ -788,6 +965,17 @@ function drop_index($table, $index) { return true; } +/** + * {@internal Missing Short Description}} + * + * {@internal Missing Long Description}} + * + * @since unknown + * + * @param string $table Database table name. + * @param string $index Database table index column. + * @return bool True, when done with execution. + */ function add_clean_index($table, $index) { global $wpdb; drop_index($table, $index); @@ -820,8 +1008,13 @@ function maybe_add_column($table_name, $column_name, $create_ddl) { return false; } - -// get_alloptions as it was for 1.2. +/** + * Retrieve all options as it was for 1.2. + * + * @since 1.2.0 + * + * @return array List of options. + */ function get_alloptions_110() { global $wpdb; if ($options = $wpdb->get_results("SELECT option_name, option_value FROM $wpdb->options")) { @@ -837,7 +1030,15 @@ function get_alloptions_110() { return $all_options; } -// Version of get_option that is private to install/upgrade. +/** + * Version of get_option that is private to install/upgrade. + * + * @since unknown + * @access private + * + * @param string $setting Option name. + * @return mixed + */ function __get_option($setting) { global $wpdb; @@ -864,6 +1065,16 @@ function __get_option($setting) { return $option; } +/** + * {@internal Missing Short Description}} + * + * {@internal Missing Long Description}} + * + * @since unknown + * + * @param string $content + * @return string + */ function deslash($content) { // Note: \\\ inside a regex denotes a single backslash. @@ -881,6 +1092,17 @@ function deslash($content) { return $content; } +/** + * {@internal Missing Short Description}} + * + * {@internal Missing Long Description}} + * + * @since unknown + * + * @param unknown_type $queries + * @param unknown_type $execute + * @return unknown + */ function dbDelta($queries, $execute = true) { global $wpdb; @@ -1082,6 +1304,13 @@ function dbDelta($queries, $execute = true) { return $for_update; } +/** + * {@internal Missing Short Description}} + * + * {@internal Missing Long Description}} + * + * @since unknown + */ function make_db_current() { global $wp_queries; @@ -1091,12 +1320,30 @@ function make_db_current() { echo "
    \n"; } +/** + * {@internal Missing Short Description}} + * + * {@internal Missing Long Description}} + * + * @since unknown + */ function make_db_current_silent() { global $wp_queries; $alterations = dbDelta($wp_queries); } +/** + * {@internal Missing Short Description}} + * + * {@internal Missing Long Description}} + * + * @since unknown + * + * @param unknown_type $theme_name + * @param unknown_type $template + * @return unknown + */ function make_site_theme_from_oldschool($theme_name, $template) { $home_path = get_home_path(); $site_dir = WP_CONTENT_DIR . "/themes/$template"; @@ -1165,6 +1412,17 @@ function make_site_theme_from_oldschool($theme_name, $template) { return true; } +/** + * {@internal Missing Short Description}} + * + * {@internal Missing Long Description}} + * + * @since unknown + * + * @param unknown_type $theme_name + * @param unknown_type $template + * @return unknown + */ function make_site_theme_from_default($theme_name, $template) { $site_dir = WP_CONTENT_DIR . "/themes/$template"; $default_dir = WP_CONTENT_DIR . '/themes/default'; @@ -1220,6 +1478,15 @@ function make_site_theme_from_default($theme_name, $template) { } // Create a site theme from the default theme. +/** + * {@internal Missing Short Description}} + * + * {@internal Missing Long Description}} + * + * @since unknown + * + * @return unknown + */ function make_site_theme() { // Name the theme after the blog. $theme_name = __get_option('blogname'); @@ -1261,6 +1528,14 @@ function make_site_theme() { return $template; } +/** + * Translate user level to user role name. + * + * @since unknown + * + * @param int $level User level. + * @return string User role name. + */ function translate_level_to_role($level) { switch ($level) { case 10: @@ -1282,6 +1557,13 @@ function translate_level_to_role($level) { } } +/** + * {@internal Missing Short Description}} + * + * {@internal Missing Long Description}} + * + * @since unknown + */ function wp_check_mysql_version() { global $wpdb; $result = $wpdb->check_database_version(); @@ -1289,6 +1571,13 @@ function wp_check_mysql_version() { die( $result->get_error_message() ); } +/** + * {@internal Missing Short Description}} + * + * {@internal Missing Long Description}} + * + * @since unknown + */ function maybe_disable_automattic_widgets() { $plugins = __get_option( 'active_plugins' ); diff --git a/wp-admin/includes/user.php b/wp-admin/includes/user.php index a87535a8..5709cc18 100644 --- a/wp-admin/includes/user.php +++ b/wp-admin/includes/user.php @@ -1,6 +1,21 @@ rich_editing = $_POST['rich_editing']; else - $user->rich_editing = 'false'; + $user->rich_editing = 'true'; + + $user->comment_shortcuts = isset( $_POST['comment_shortcuts'] )? $_POST['comment_shortcuts'] : ''; + + $user->use_ssl = 0; + if ( !empty($_POST['use_ssl']) ) + $user->use_ssl = 1; if ( !$update ) $user->admin_color = 'fresh'; // Default to fresh for new users. @@ -138,12 +169,31 @@ function edit_user( $user_id = 0 ) { return $user_id; } +/** + * {@internal Missing Short Description}} + * + * {@internal Missing Long Description}} + * + * @since unknown + * + * @return array List of user IDs. + */ function get_author_user_ids() { global $wpdb; $level_key = $wpdb->prefix . 'user_level'; return $wpdb->get_col( $wpdb->prepare("SELECT user_id FROM $wpdb->usermeta WHERE meta_key = %s AND meta_value != '0'", $level_key) ); } +/** + * {@internal Missing Short Description}} + * + * {@internal Missing Long Description}} + * + * @since unknown + * + * @param int $user_id User ID. + * @return array|bool List of editable authors. False if no editable users. + */ function get_editable_authors( $user_id ) { global $wpdb; @@ -159,13 +209,24 @@ function get_editable_authors( $user_id ) { return apply_filters('get_editable_authors', $authors); } -function get_editable_user_ids( $user_id, $exclude_zeros = true ) { +/** + * {@internal Missing Short Description}} + * + * {@internal Missing Long Description}} + * + * @since unknown + * + * @param int $user_id User ID. + * @param bool $exclude_zeros Optional, default is true. Whether to exclude zeros. + * @return unknown + */ +function get_editable_user_ids( $user_id, $exclude_zeros = true, $post_type = 'post' ) { global $wpdb; $user = new WP_User( $user_id ); - if ( ! $user->has_cap('edit_others_posts') ) { - if ( $user->has_cap('edit_posts') || $exclude_zeros == false ) + if ( ! $user->has_cap("edit_others_{$post_type}s") ) { + if ( $user->has_cap("edit_{$post_type}s") || $exclude_zeros == false ) return array($user->id); else return false; @@ -180,6 +241,15 @@ function get_editable_user_ids( $user_id, $exclude_zeros = true ) { return $wpdb->get_col( $query ); } +/** + * {@internal Missing Short Description}} + * + * {@internal Missing Long Description}} + * + * @since unknown + * + * @return unknown + */ function get_nonauthor_user_ids() { global $wpdb; $level_key = $wpdb->prefix . 'user_level'; @@ -187,6 +257,15 @@ function get_nonauthor_user_ids() { return $wpdb->get_col( $wpdb->prepare("SELECT user_id FROM $wpdb->usermeta WHERE meta_key = %s AND meta_value = '0'", $level_key) ); } +/** + * Retrieve editable posts from other users. + * + * @since unknown + * + * @param int $user_id User ID to not retrieve posts from. + * @param string $type Optional, defaults to 'any'. Post type to retrieve, can be 'draft' or 'pending'. + * @return array List of posts from others. + */ function get_others_unpublished_posts($user_id, $type='any') { global $wpdb; @@ -209,14 +288,38 @@ function get_others_unpublished_posts($user_id, $type='any') { return apply_filters('get_others_drafts', $other_unpubs); } +/** + * Retrieve drafts from other users. + * + * @since unknown + * + * @param int $user_id User ID. + * @return array List of drafts from other users. + */ function get_others_drafts($user_id) { return get_others_unpublished_posts($user_id, 'draft'); } +/** + * Retrieve pending review posts from other users. + * + * @since unknown + * + * @param int $user_id User ID. + * @return array List of posts with pending review post type from other users. + */ function get_others_pending($user_id) { return get_others_unpublished_posts($user_id, 'pending'); } +/** + * Retrieve user data and filter it. + * + * @since unknown + * + * @param int $user_id User ID. + * @return object WP_User object with user data. + */ function get_user_to_edit( $user_id ) { $user = new WP_User( $user_id ); $user->user_login = attribute_escape($user->user_login); @@ -226,14 +329,22 @@ function get_user_to_edit( $user_id ) { $user->last_name = attribute_escape($user->last_name); $user->display_name = attribute_escape($user->display_name); $user->nickname = attribute_escape($user->nickname); - $user->aim = attribute_escape($user->aim); - $user->yim = attribute_escape($user->yim); - $user->jabber = attribute_escape($user->jabber); - $user->description = wp_specialchars($user->description); + $user->aim = isset( $user->aim ) && !empty( $user->aim ) ? attribute_escape($user->aim) : ''; + $user->yim = isset( $user->yim ) && !empty( $user->yim ) ? attribute_escape($user->yim) : ''; + $user->jabber = isset( $user->jabber ) && !empty( $user->jabber ) ? attribute_escape($user->jabber) : ''; + $user->description = isset( $user->description ) && !empty( $user->description ) ? wp_specialchars($user->description) : ''; return $user; } +/** + * Retrieve the user's drafts. + * + * @since unknown + * + * @param int $user_id User ID. + * @return array + */ function get_users_drafts( $user_id ) { global $wpdb; $query = $wpdb->prepare("SELECT ID, post_title FROM $wpdb->posts WHERE post_type = 'post' AND post_status = 'draft' AND post_author = %d ORDER BY post_modified DESC", $user_id); @@ -241,6 +352,20 @@ function get_users_drafts( $user_id ) { return $wpdb->get_results( $query ); } +/** + * Remove user and optionally reassign posts and links to another user. + * + * If the $reassign parameter is not assigned to an User ID, then all posts will + * be deleted of that user. The action 'delete_user' that is passed the User ID + * being deleted will be run after the posts are either reassigned or deleted. + * The user meta will also be deleted that are for that User ID. + * + * @since unknown + * + * @param int $id User ID. + * @param int $reassign Optional. Reassign posts and links to new User ID. + * @return bool True when finished. + */ function wp_delete_user($id, $reassign = 'novalue') { global $wpdb; @@ -275,6 +400,13 @@ function wp_delete_user($id, $reassign = 'novalue') { return true; } +/** + * Remove all capabilities from user. + * + * @since unknown + * + * @param int $id User ID. + */ function wp_revoke_user($id) { $id = (int) $id; @@ -282,27 +414,161 @@ function wp_revoke_user($id) { $user->remove_all_caps(); } -// WP_User_Search class -// by Mark Jaquith - if ( !class_exists('WP_User_Search') ) : +/** + * WordPress User Search class. + * + * @since unknown + * @author Mark Jaquith + */ class WP_User_Search { + + /** + * {@internal Missing Description}} + * + * @since unknown + * @access private + * @var unknown_type + */ var $results; + + /** + * {@internal Missing Description}} + * + * @since unknown + * @access private + * @var unknown_type + */ var $search_term; + + /** + * Page number. + * + * @since unknown + * @access private + * @var int + */ var $page; + + /** + * Role name that users have. + * + * @since unknown + * @access private + * @var string + */ var $role; + + /** + * Raw page number. + * + * @since unknown + * @access private + * @var int|bool + */ var $raw_page; + + /** + * Amount of users to display per page. + * + * @since unknown + * @access public + * @var int + */ var $users_per_page = 50; + + /** + * {@internal Missing Description}} + * + * @since unknown + * @access private + * @var unknown_type + */ var $first_user; + + /** + * {@internal Missing Description}} + * + * @since unknown + * @access private + * @var int + */ var $last_user; + + /** + * {@internal Missing Description}} + * + * @since unknown + * @access private + * @var unknown_type + */ var $query_limit; + + /** + * {@internal Missing Description}} + * + * @since unknown + * @access private + * @var unknown_type + */ var $query_sort; + + /** + * {@internal Missing Description}} + * + * @since unknown + * @access private + * @var unknown_type + */ var $query_from_where; + + /** + * {@internal Missing Description}} + * + * @since unknown + * @access private + * @var int + */ var $total_users_for_query = 0; + + /** + * {@internal Missing Description}} + * + * @since unknown + * @access private + * @var bool + */ var $too_many_total_users = false; + + /** + * {@internal Missing Description}} + * + * @since unknown + * @access private + * @var unknown_type + */ var $search_errors; - function WP_User_Search ($search_term = '', $page = '', $role = '') { // constructor + /** + * {@internal Missing Description}} + * + * @since unknown + * @access private + * @var unknown_type + */ + var $paging_text; + + /** + * PHP4 Constructor - Sets up the object properties. + * + * @since unknown + * + * @param string $search_term Search terms string. + * @param int $page Optional. Page ID. + * @param string $role Role name. + * @return WP_User_Search + */ + function WP_User_Search ($search_term = '', $page = '', $role = '') { $this->search_term = $search_term; $this->raw_page = ( '' == $page ) ? false : (int) $page; $this->page = (int) ( '' == $page ) ? 1 : $page; @@ -314,6 +580,14 @@ class WP_User_Search { $this->do_paging(); } + /** + * {@internal Missing Short Description}} + * + * {@internal Missing Long Description}} + * + * @since unknown + * @access public + */ function prepare_query() { global $wpdb; $this->first_user = ($this->page - 1) * $this->users_per_page; @@ -338,6 +612,14 @@ class WP_User_Search { } + /** + * {@internal Missing Short Description}} + * + * {@internal Missing Long Description}} + * + * @since unknown + * @access public + */ function query() { global $wpdb; $this->results = $wpdb->get_col('SELECT ID ' . $this->query_from_where . $this->query_sort . $this->query_limit); @@ -348,10 +630,26 @@ class WP_User_Search { $this->search_errors = new WP_Error('no_matching_users_found', __('No matching users were found!')); } + /** + * {@internal Missing Short Description}} + * + * {@internal Missing Long Description}} + * + * @since unknown + * @access public + */ function prepare_vars_for_template_usage() { $this->search_term = stripslashes($this->search_term); // done with DB, from now on we want slashes gone } + /** + * {@internal Missing Short Description}} + * + * {@internal Missing Long Description}} + * + * @since unknown + * @access public + */ function do_paging() { if ( $this->total_users_for_query > $this->users_per_page ) { // have to page the results $args = array(); @@ -367,23 +665,67 @@ class WP_User_Search { 'format' => 'userspage=%#%', 'add_args' => $args ) ); + if ( $this->paging_text ) { + $this->paging_text = sprintf( '' . __( 'Displaying %s–%s of %s' ) . '%s', + number_format_i18n( ( $this->page - 1 ) * $this->users_per_page + 1 ), + number_format_i18n( min( $this->page * $this->users_per_page, $this->total_users_for_query ) ), + number_format_i18n( $this->total_users_for_query ), + $this->paging_text + ); + } } } + /** + * {@internal Missing Short Description}} + * + * {@internal Missing Long Description}} + * + * @since unknown + * @access public + * + * @return unknown + */ function get_results() { return (array) $this->results; } + /** + * Displaying paging text. + * + * @see do_paging() Builds paging text. + * + * @since unknown + * @access public + */ function page_links() { echo $this->paging_text; } + /** + * Whether paging is enabled. + * + * @see do_paging() Builds paging text. + * + * @since unknown + * @access public + * + * @return bool + */ function results_are_paged() { if ( $this->paging_text ) return true; return false; } + /** + * Whether there are search terms. + * + * @since unknown + * @access public + * + * @return bool + */ function is_search() { if ( $this->search_term ) return true; diff --git a/wp-admin/includes/widgets.php b/wp-admin/includes/widgets.php index 52d1d7b1..9e15d548 100644 --- a/wp-admin/includes/widgets.php +++ b/wp-admin/includes/widgets.php @@ -1,6 +1,21 @@ array( 'widget_id' => $widget['id'], 'widget_name' => $widget['name'], '_display' => 'template', '_show' => $show ), 1 => $widget['params'][0] ) ); - $sidebar_args = call_user_func_array( 'wp_widget_control', $args ); + $args = wp_list_widget_controls_dynamic_sidebar( array( 0 => array( 'widget_id' => $widget['id'], 'widget_name' => $widget['name'], '_display' => 'template', '_show' => $show ), 1 => $widget['params'][0] ) ); + $sidebar_args = call_user_func_array( 'wp_widget_control', $args ); $widget_control_template = ob_get_contents(); ob_end_clean(); @@ -84,7 +101,7 @@ function wp_list_widgets( $show = 'all', $_search = false ) { 'edit' => $widget['id'], 'key' => array_search( $widget['id'], $sidebars_widgets[$sidebar] ), ) ) ); - + $widget_control_template = ''; } @@ -148,8 +165,13 @@ function wp_list_widgets( $show = 'all', $_search = false ) { @@ -163,7 +185,14 @@ function wp_list_widget_controls( $sidebar ) { - + - "> + ">
    @@ -276,6 +319,14 @@ function wp_widget_control( $sidebar_args ) { return $sidebar_args; } +/** + * {@internal Missing Short Description}} + * + * @since unknown + * + * @param string $string + * @return string + */ function wp_widget_control_ob_filter( $string ) { if ( false === $beg = strpos( $string, '%BEG_OF_TITLE%' ) ) return ''; @@ -286,4 +337,4 @@ function wp_widget_control_ob_filter( $string ) { return trim( wp_specialchars( strip_tags( $string ) ) ); } -?> +?> \ No newline at end of file diff --git a/wp-admin/index-extra.php b/wp-admin/index-extra.php index 3b77d104..32189707 100644 --- a/wp-admin/index-extra.php +++ b/wp-admin/index-extra.php @@ -1,28 +1,40 @@ +?> \ No newline at end of file diff --git a/wp-admin/index.php b/wp-admin/index.php index 2401ef9f..59fd228c 100644 --- a/wp-admin/index.php +++ b/wp-admin/index.php @@ -1,33 +1,25 @@ - -
    - -

    - -
    -

    - - - - - - - -
    -

    - -publish) ) { // with feeds, anyone can tell how many posts there are. Just unlink if !current_user_can - $post_text = sprintf( __ngettext( '%s post', '%s posts', $num_posts->publish ), number_format_i18n( $num_posts->publish ) ); - $post_type_texts[] = $can_edit_posts ? "$post_text" : $post_text; -} -if ( $can_edit_pages && !empty($num_pages->publish) ) { // how many pages is not exposed in feeds. Don't show if !current_user_can - $post_type_texts[] = ''.sprintf( __ngettext( '%s page', '%s pages', $num_pages->publish ), number_format_i18n( $num_pages->publish ) ).''; -} -if ( $can_edit_posts && !empty($num_posts->draft) ) { - $post_type_texts[] = ''.sprintf( __ngettext( '%s draft', '%s drafts', $num_posts->draft ), number_format_i18n( $num_posts->draft ) ).''; -} -if ( $can_edit_posts && !empty($num_posts->future) ) { - $post_type_texts[] = ''.sprintf( __ngettext( '%s scheduled post', '%s scheduled posts', $num_posts->future ), number_format_i18n( $num_posts->future ) ).''; -} - -if ( current_user_can('publish_posts') && !empty($num_posts->pending) ) { - $pending_text = sprintf( __ngettext( 'There is %2$s post pending your review.', 'There are %2$s posts pending your review.', $num_posts->pending ), 'edit.php?post_status=pending', number_format_i18n( $num_posts->pending ) ); -} else { - $pending_text = ''; -} - -$cats_text = sprintf( __ngettext( '%s category', '%s categories', $num_cats ), number_format_i18n( $num_cats ) ); -$tags_text = sprintf( __ngettext( '%s tag', '%s tags', $num_tags ), number_format_i18n( $num_tags ) ); -if ( current_user_can( 'manage_categories' ) ) { - $cats_text = "$cats_text"; - $tags_text = "$tags_text"; -} - -$total_comments = sprintf( __ngettext( '%1$s total', '%1$s total', $num_comm['total_comments'] ), number_format_i18n($num_comm['total_comments']) ); -$approved_comments = sprintf( __ngettext( '%1$s approved', '%1$s approved', $num_comm['approved'] ), number_format_i18n($num_comm['approved']) ); -$spam_comments = sprintf( __ngettext( '%1$s spam', '%1$s spam', $num_comm['spam'] ), number_format_i18n($num_comm['spam']) ); -$moderated_comments = sprintf( __ngettext( '%1$s awaiting moderation', '%1$s awaiting moderation', $num_comm['awaiting_moderation'] ), number_format_i18n($num_comm['awaiting_moderation']) ); - -if( current_user_can( 'moderate_comments' ) ) { - $total_comments = "{$total_comments}"; - $approved_comments = "{$approved_comments}"; - $moderated_comments = "{$moderated_comments}"; -} - -$comm_text = sprintf( __ngettext( 'You have %1$s comment, %2$s, %3$s and %4$s.', 'You have %1$s comments, %2$s, %3$s and %4$s.', $num_comm['total_comments'] ), $total_comments, $approved_comments, $spam_comments, $moderated_comments ); - -$post_type_text = implode(', ', $post_type_texts); - -// There is always a category -$sentence = sprintf( __( 'You have %1$s, contained within %2$s and %3$s. %4$s %5$s' ), $post_type_text, $cats_text, $tags_text, $pending_text, $comm_text ); -$sentence = apply_filters( 'dashboard_count_sentence', $sentence, $post_type_text, $cats_text, $tags_text, $pending_text, $comm_text ); - -?> -

    -$widgets_text"; -?> -

    - title, $widgets_text ); ?> - - - - -

    - - -
    - -
    + +

    - +
    - + diff --git a/wp-admin/install-helper.php b/wp-admin/install-helper.php index eebe0e3e..cddbc26a 100644 --- a/wp-admin/install-helper.php +++ b/wp-admin/install-helper.php @@ -1,15 +1,76 @@ + * check_column('wp_links', 'link_description', 'mediumtext'); + * if (check_column($wpdb->comments, 'comment_author', 'tinytext')) + * echo "ok\n"; + * + * $error_count = 0; + * $tablename = $wpdb->links; + * // check the column + * if (!check_column($wpdb->links, 'link_description', 'varchar(255)')) { + * $ddl = "ALTER TABLE $wpdb->links MODIFY COLUMN link_description varchar(255) NOT NULL DEFAULT '' "; + * $q = $wpdb->query($ddl); + * } + * + * if (check_column($wpdb->links, 'link_description', 'varchar(255)')) { + * $res .= $tablename . ' - ok
    '; + * } else { + * $res .= 'There was a problem with ' . $tablename . '
    '; + * ++$error_count; + * } + * + * + * @package WordPress + * @subpackage Plugin + */ + +/** + * @global bool $wp_only_load_config + * @name $wp_only_load_config + * @var bool + * @since unknown + */ $wp_only_load_config = true; + +/** Load WordPress Bootstrap */ require_once(dirname(dirname(__FILE__)).'/wp-load.php'); -$debug = 0; /** - ** maybe_create_table() - ** Create db table if it doesn't exist. - ** Returns: true if already exists or on successful completion - ** false on error + * Turn debugging on or off. + * @global bool|int $debug + * @name $debug + * @var bool|int + * @since unknown */ +$debug = 0; + if ( ! function_exists('maybe_create_table') ) : +/** + * Create database table, if it doesn't already exist. + * + * @since unknown + * @package WordPress + * @subpackage Plugin + * @uses $wpdb + * + * @param string $table_name Database table name. + * @param string $create_ddl Create database table SQL. + * @return bool False on error, true if already exists or success. + */ function maybe_create_table($table_name, $create_ddl) { global $wpdb; foreach ($wpdb->get_col("SHOW TABLES",0) as $table ) { @@ -29,20 +90,29 @@ function maybe_create_table($table_name, $create_ddl) { } endif; +if ( ! function_exists('maybe_add_column') ) : /** - ** maybe_add_column() - ** Add column to db table if it doesn't exist. - ** Returns: true if already exists or on successful completion - ** false on error + * Add column to database table, if column doesn't already exist in table. + * + * @since unknown + * @package WordPress + * @subpackage Plugin + * @uses $wpdb + * @uses $debug + * + * @param string $table_name Database table name + * @param string $column_name Table column name + * @param string $create_ddl SQL to add column to table. + * @return bool False on failure. True, if already exists or was successful. */ -if ( ! function_exists('maybe_add_column') ) : function maybe_add_column($table_name, $column_name, $create_ddl) { global $wpdb, $debug; foreach ($wpdb->get_col("DESC $table_name",0) as $column ) { if ($debug) echo("checking $column == $column_name
    "); - if ($column == $column_name) { - return true; - } + + if ($column == $column_name) { + return true; + } } //didn't find it try to create it. $wpdb->query($create_ddl); @@ -57,10 +127,17 @@ function maybe_add_column($table_name, $column_name, $create_ddl) { endif; /** - ** maybe_drop_column() - ** Drop column from db table if it exists. - ** Returns: true if it doesn't already exist or on successful drop - ** false on error + * Drop column from database table, if it exists. + * + * @since unknown + * @package WordPress + * @subpackage Plugin + * @uses $wpdb + * + * @param string $table_name Table name + * @param string $column_name Column name + * @param string $drop_ddl SQL statement to drop column. + * @return bool False on failure, true on success or doesn't exist. */ function maybe_drop_column($table_name, $column_name, $drop_ddl) { global $wpdb; @@ -80,20 +157,34 @@ function maybe_drop_column($table_name, $column_name, $drop_ddl) { return true; } - /** - ** check_column() - ** Check column matches passed in criteria. - ** Pass in null to skip checking that criteria - ** Returns: true if it matches - ** false otherwise - ** (case sensitive) Column names returned from DESC table are: - ** Field - ** Type - ** Null - ** Key - ** Default - ** Extra + * Check column matches criteria. + * + * Uses the SQL DESC for retrieving the table info for the column. It will help + * understand the parameters, if you do more research on what column information + * is returned by the SQL statement. Pass in null to skip checking that + * criteria. + * + * Column names returned from DESC table are case sensitive and are listed: + * Field + * Type + * Null + * Key + * Default + * Extra + * + * @since unknown + * @package WordPress + * @subpackage Plugin + * + * @param string $table_name Table name + * @param string $col_name Column name + * @param string $col_type Column type + * @param bool $is_null Optional. Check is null. + * @param mixed $key Optional. Key info. + * @param mixed $default Optional. Default value. + * @param mixed $extra Optional. Extra value. + * @return bool True, if matches. False, if not matching. */ function check_column($table_name, $col_name, $col_type, $is_null = null, $key = null, $default = null, $extra = null) { global $wpdb, $debug; @@ -102,55 +193,33 @@ function check_column($table_name, $col_name, $col_type, $is_null = null, $key = foreach ($results as $row ) { if ($debug > 1) print_r($row); - if ($row->Field == $col_name) { - // got our column, check the params - if ($debug) echo ("checking $row->Type against $col_type\n"); - if (($col_type != null) && ($row->Type != $col_type)) { - ++$diffs; - } - if (($is_null != null) && ($row->Null != $is_null)) { - ++$diffs; - } - if (($key != null) && ($row->Key != $key)) { - ++$diffs; - } - if (($default != null) && ($row->Default != $default)) { - ++$diffs; - } - if (($extra != null) && ($row->Extra != $extra)) { - ++$diffs; - } - if ($diffs > 0) { - if ($debug) echo ("diffs = $diffs returning false\n"); - return false; - } - return true; - } // end if found our column + + if ($row->Field == $col_name) { + // got our column, check the params + if ($debug) echo ("checking $row->Type against $col_type\n"); + if (($col_type != null) && ($row->Type != $col_type)) { + ++$diffs; + } + if (($is_null != null) && ($row->Null != $is_null)) { + ++$diffs; + } + if (($key != null) && ($row->Key != $key)) { + ++$diffs; + } + if (($default != null) && ($row->Default != $default)) { + ++$diffs; + } + if (($extra != null) && ($row->Extra != $extra)) { + ++$diffs; + } + if ($diffs > 0) { + if ($debug) echo ("diffs = $diffs returning false\n"); + return false; + } + return true; + } // end if found our column } return false; } -/* -echo "

    testing

    "; -echo "
    ";
    -
    -//check_column('wp_links', 'link_description', 'mediumtext');
    -//if (check_column($wpdb->comments, 'comment_author', 'tinytext'))
    -//    echo "ok\n";
    -$error_count = 0;
    -$tablename = $wpdb->links;
    -// check the column
    -if (!check_column($wpdb->links, 'link_description', 'varchar(255)'))
    -{
    -	$ddl = "ALTER TABLE $wpdb->links MODIFY COLUMN link_description varchar(255) NOT NULL DEFAULT '' ";
    -	$q = $wpdb->query($ddl);
    -}
    -if (check_column($wpdb->links, 'link_description', 'varchar(255)')) {
    -	$res .= $tablename . ' - ok 
    '; -} else { - $res .= 'There was a problem with ' . $tablename . '
    '; - ++$error_count; -} -echo "
    "; -*/ ?> diff --git a/wp-admin/install.php b/wp-admin/install.php index 32ef35dc..de5b970d 100644 --- a/wp-admin/install.php +++ b/wp-admin/install.php @@ -1,14 +1,38 @@ @@ -65,9 +89,9 @@ switch($step) { display_header(); // Fill in the data we gathered - $weblog_title = stripslashes($_POST['weblog_title']); - $admin_email = stripslashes($_POST['admin_email']); - $public = (int) $_POST['blog_public']; + $weblog_title = isset($_POST['weblog_title']) ? stripslashes($_POST['weblog_title']) : ''; + $admin_email = isset($_POST['admin_email']) ? stripslashes($_POST['admin_email']) : ''; + $public = isset($_POST['blog_public']) ? (int) $_POST['blog_public'] : 0; // check e-mail address if (empty($admin_email)) { // TODO: poka-yoke diff --git a/wp-admin/js/categories.js b/wp-admin/js/categories.js index a3273380..fa23b226 100644 --- a/wp-admin/js/categories.js +++ b/wp-admin/js/categories.js @@ -7,6 +7,14 @@ jQuery(function($) { var name = $("" + $('name', r).text() + "").html(); var id = $('cat', r).attr('id'); options[options.length] = new Option(name, id); + + addAfter2( r, settings ); + } + + var addAfter2 = function( x, r ) { + var t = $(r.parsed.responses[0].data); + if ( t.length == 1 ) + inlineEditTax.addEvents($(t.id)); } var delAfter = function( r, settings ) { @@ -19,5 +27,11 @@ jQuery(function($) { if ( options ) $('#the-list').wpList( { addAfter: addAfter, delAfter: delAfter } ); else - $('#the-list').wpList(); + $('#the-list').wpList({ addAfter: addAfter2 }); + + if ( jQuery('#link-category-search-input').size() ) { + columns.init('edit-link-categories'); + } else { + columns.init('categories'); + } }); diff --git a/wp-admin/js/comment.js b/wp-admin/js/comment.js index 11a36276..7d505525 100644 --- a/wp-admin/js/comment.js +++ b/wp-admin/js/comment.js @@ -1,26 +1,39 @@ -jQuery(document).ready( function() { - add_postbox_toggles('comment'); - - // close postboxes that should be closed - jQuery('.if-js-closed').removeClass('if-js-closed').addClass('closed'); - - // show things that should be visible, hide what should be hidden +jQuery(document).ready( function($) { jQuery('.hide-if-no-js').show(); jQuery('.hide-if-js').hide(); - jQuery('.edit-timestamp').click(function () { - if (jQuery('#timestampdiv').is(":hidden")) { - jQuery('#timestampdiv').slideDown("normal"); - jQuery('.edit-timestamp').text(commentL10n.cancel); - } else { - jQuery('#timestampdiv').hide(); - jQuery('#mm').val(jQuery('#hidden_mm').val()); - jQuery('#jj').val(jQuery('#hidden_jj').val()); - jQuery('#aa').val(jQuery('#hidden_aa').val()); - jQuery('#hh').val(jQuery('#hidden_hh').val()); - jQuery('#mn').val(jQuery('#hidden_mn').val()); - jQuery('.edit-timestamp').text(commentL10n.edit); + var stamp = $('#timestamp').html(); + $('.edit-timestamp').click(function () { + if ($('#timestampdiv').is(":hidden")) { + $('#timestampdiv').slideDown("normal"); + $('.edit-timestamp').hide(); } return false; - }); + }); + + $('.cancel-timestamp').click(function() { + $('#timestampdiv').slideUp("normal"); + $('#mm').val($('#hidden_mm').val()); + $('#jj').val($('#hidden_jj').val()); + $('#aa').val($('#hidden_aa').val()); + $('#hh').val($('#hidden_hh').val()); + $('#mn').val($('#hidden_mn').val()); + $('#timestamp').html(stamp); + $('.edit-timestamp').show(); + return false; + }); + + $('.save-timestamp').click(function () { // crazyhorse - multiple ok cancels + $('#timestampdiv').slideUp("normal"); + $('.edit-timestamp').show(); + $('#timestamp').html( + commentL10n.submittedOn + ' ' + + $( '#mm option[value=' + $('#mm').val() + ']' ).text() + ' ' + + $('#jj').val() + ', ' + + $('#aa').val() + ' @ ' + + $('#hh').val() + ':' + + $('#mn').val() + ' ' + ); + return false; + }); }); \ No newline at end of file diff --git a/wp-admin/js/common.js b/wp-admin/js/common.js index 6559d7d2..67e38d81 100644 --- a/wp-admin/js/common.js +++ b/wp-admin/js/common.js @@ -1,45 +1,395 @@ -jQuery(document).ready( function() { + +var wpCookies = { +// The following functions are from Cookie.js class in TinyMCE, Moxiecode, used under LGPL. + + each : function(o, cb, s) { + var n, l; + + if (!o) + return 0; + + s = s || o; + + if (typeof(o.length) != 'undefined') { + for (n=0, l = o.length; n

If for any reason this automatic file creation doesn't work, don't worry. All this does is fill in the database information to a configuration file. You may also simply open wp-config-sample.php in a text editor, fill in your information, and save it as wp-config.php.

-

In all likelihood, these items were supplied to you by your ISP. If you do not have this information, then you will need to contact them before you can continue. If you’re all ready…

+

In all likelihood, these items were supplied to you by your Web Host. If you do not have this information, then you will need to contact them before you can continue. If you’re all ready…

Let’s go!

- - - -<?php _e('WordPress › Posted'); ?> - - - -

-

Click here to post again.'), 'sidebar.php'); ?>

- - -<?php _e('WordPress › Sidebar'); ?> - +<?php bloginfo('name') ?> › <?php _e('Sidebar'); ?> -

WordPress

+
- -

- -

-

- - - + + +

' . __('Post published.') . '

'; +elseif ( 'c' == $_GET['a'] ) + echo '

' . __('Post saved.') . '

'; +?> +

+ +

+

- - + +

+ +
+ + +

+
+

- + - +

@@ -85,6 +126,3 @@ form { - \ No newline at end of file diff --git a/wp-admin/theme-editor.php b/wp-admin/theme-editor.php index fa16d7db..361f26b6 100644 --- a/wp-admin/theme-editor.php +++ b/wp-admin/theme-editor.php @@ -1,4 +1,12 @@ (%s)" : "%s"; +$desc_header = ( $description != $file_show ) ? "$description (%s)" : "%s"; ?>
+ +

-

- + "; ?>

diff --git a/wp-admin/themes.php b/wp-admin/themes.php index 22c52cea..15b3e5bf 100644 --- a/wp-admin/themes.php +++ b/wp-admin/themes.php @@ -1,4 +1,12 @@ add_query_arg( 'pagenum', '%#%' ) . '#themenav', 'format' => '', + 'prev_text' => __('«'), + 'next_text' => __('»'), 'total' => ceil($theme_total / $per_page), 'current' => $page )); $themes = array_slice( $themes, $start, $per_page ); +/** + * Check if there is an update for a theme available. + * + * Will display link, if there is an update available. + * + * @since 2.7.0 + * + * @param object $theme Theme data object. + * @return bool False if no valid info was passed. + */ +function theme_update_available( $theme ) { + static $themes_update; + if ( !isset($themes_update) ) + $themes_update = get_option('update_themes'); + + if ( is_object($theme) && isset($theme->stylesheet) ) + $stylesheet = $theme->stylesheet; + elseif ( is_array($theme) && isset($theme['Stylesheet']) ) + $stylesheet = $theme['Stylesheet']; + else + return false; //No valid info passed. + + if ( isset($themes_update->response[ $stylesheet ]) ) { + $update = $themes_update->response[ $stylesheet ]; + $details_url = add_query_arg(array('TB_iframe' => 'true', 'width' => 1024, 'height' => 800), $update['url']); //Theme browser inside WP? replace this, Also, theme preview JS will override this on the available list. + $update_url = wp_nonce_url('update.php?action=upgrade-theme&theme=' . urlencode($stylesheet), 'upgrade-theme_' . $stylesheet); + + if ( ! current_user_can('update_themes') ) + printf( __('

There is a new version of %1$s available. View version %3$s Details.

'), $ct->name, $details_url, $update['new_version']); + else if ( empty($update->package) ) + printf( __('

There is a new version of %1$s available. View version %3$s Details automatic upgrade unavailable for this theme.

'), $ct->name, $details_url, $update['new_version']); + else + printf( __('

There is a new version of %1$s available. View version %3$s Details or upgrade automatically.

'), $ct->name, $details_url, $update['new_version'], $update_url ); + } +} + ?>
-

+ +

+ +

screenshot ) : ?> <?php _e('Current theme preview'); ?> -

title, $ct->version, $ct->author) ; ?>

+

title, $ct->version, $ct->author) ; ?>

description; ?>

parent_theme) { ?>

%2$s. The stylesheet files are located in %3$s. %4$s uses templates from %5$s. Changes made to the templates will affect both themes.'), $ct->title, $ct->template_dir, $ct->stylesheet_dir, $ct->title, $ct->parent_theme); ?>

@@ -69,17 +118,22 @@ $themes = array_slice( $themes, $start, $per_page ); tags ) : ?>

tags); ?>

-
+ -

-
+
+
+

+
-$page_links
"; ?> -
+
' . __( 'Displaying %s–%s of %s' ) . '%s', + number_format_i18n( $start + 1 ), + number_format_i18n( min( $page * $per_page, $theme_total ) ), + number_format_i18n( $theme_total ), + $page_links +); echo $page_links_text; ?>
-
@@ -117,7 +171,7 @@ foreach ( $cols as $col => $theme_name ) { $screenshot = $themes[$theme_name]['Screenshot']; $stylesheet_dir = $themes[$theme_name]['Stylesheet Dir']; $preview_link = clean_url( get_option('home') . '/'); - $preview_link = add_query_arg( array('preview' => 1, 'template' => $template, 'stylesheet' => $stylesheet, 'TB_iframe' => 'true', 'width' => 600, 'height' => 400 ), $preview_link ); + $preview_link = htmlspecialchars( add_query_arg( array('preview' => 1, 'template' => $template, 'stylesheet' => $stylesheet, 'TB_iframe' => 'true', 'width' => 600, 'height' => 400 ), $preview_link ) ); $preview_text = attribute_escape( sprintf( __('Preview of "%s"'), $title ) ); $tags = $themes[$theme_name]['Tags']; $thickbox_class = 'thickbox'; @@ -133,8 +187,9 @@ foreach ( $cols as $col => $theme_name ) {

- + +
@@ -148,7 +203,7 @@ foreach ( $cols as $col => $theme_name ) {
-$page_links
"; ?> +$page_links_text
"; ?>
diff --git a/wp-admin/tools.php b/wp-admin/tools.php new file mode 100644 index 00000000..98be1ff7 --- /dev/null +++ b/wp-admin/tools.php @@ -0,0 +1,93 @@ + +
+

+ +
+ +
+

+


+

+

+

+
+
+ + + + + + + + +
+ + +
+

+

+ +

+

+

+
+ +
+ diff --git a/wp-admin/update-core.php b/wp-admin/update-core.php new file mode 100644 index 00000000..25840099 --- /dev/null +++ b/wp-admin/update-core.php @@ -0,0 +1,230 @@ +locale ? + $update->current : sprintf("%s–%s", $update->current, $update->locale); + $current = false; + if ( !isset($update->response) || 'latest' == $update->response ) + $current = true; + $submit = __('Upgrade Automatically'); + $form_action = 'update-core.php?action=do-core-upgrade'; + if ( 'development' == $update->response ) { + $message = __('You are using a development version of WordPress. You can upgrade to the latest nightly build automatically or download the nightly build and install it manually:'); + $download = __('Download nightly build'); + } else { + if ( $current ) { + $message = sprintf(__('You have the latest version of WordPress. You do not need to upgrade. However, if you want to re-install version %s, you can do so automatically or download the package and re-install manually:'), $version_string); + $submit = __('Re-install Automatically'); + $form_action = 'update-core.php?action=do-core-reinstall'; + } else { + $message = sprintf(__('You can upgrade to version %s automatically or download the package and install it manually:'), $version_string); + } + $download = sprintf(__('Download %s'), $version_string); + } + + echo '

'; + echo $message; + echo '

'; + echo ''; + wp_nonce_field('upgrade-core'); + echo '

'; + echo ' '; + echo ''; + echo ''; + echo '' . $download . ' '; + if ( 'en_US' != $update->locale ) + if ( !isset( $update->dismissed ) || !$update->dismissed ) + echo ''; + else + echo ''; + echo '

'; + echo '
'; + +} + +function dismissed_updates() { + $dismissed = get_core_updates( array( 'dismissed' => true, 'available' => false ) ); + if ( $dismissed ) { + + $show_text = js_escape(__('Show hidden updates')); + $hide_text = js_escape(__('Hide hidden updates')); + ?> + + '.__('Show hidden updates').'

'; + echo ''; + } +} + +/** + * Display upgrade WordPress for downloading latest or upgrading automatically form. + * + * @since 2.7 + * + * @return null + */ +function core_upgrade_preamble() { + $updates = get_core_updates(); +?> +
+ +

+response) || 'latest' == $updates[0]->response ) { + echo '

'; + _e('You have the latest version of WordPress. You do not need to upgrade'); + echo '

'; + } else { + echo '

'; + _e('Important: before upgrading, please backup your database and files.'); + echo '

'; + + echo '

'; + _e( 'There is a new version of WordPress available for upgrade' ); + echo '

'; + } + + echo '
    '; + $alternate = true; + foreach( (array) $updates as $update ) { + $class = $alternate? ' class="alternate"' : ''; + $alternate = !$alternate; + echo "
  • "; + list_core_update( $update ); + echo '
  • '; + } + echo '
'; + dismissed_updates(); + echo '
'; +} + + +/** + * Upgrade WordPress core display. + * + * @since 2.7 + * + * @return null + */ +function do_core_upgrade( $reinstall = false ) { + global $wp_filesystem; + + if ( $reinstall ) + $url = 'update-core.php?action=do-core-reinstall'; + else + $url = 'update-core.php?action=do-core-upgrade'; + $url = wp_nonce_url($url, 'upgrade-core'); + if ( false === ($credentials = request_filesystem_credentials($url)) ) + return; + + $version = isset( $_POST['version'] )? $_POST['version'] : false; + $locale = isset( $_POST['locale'] )? $_POST['locale'] : 'en_US'; + $update = find_core_update( $version, $locale ); + if ( !$update ) + return; + + + if ( ! WP_Filesystem($credentials) ) { + request_filesystem_credentials($url, '', true); //Failed to connect, Error and request again + return; + } +?> +
+ +

+errors->get_error_code() ) { + foreach ( $wp_filesystem->errors->get_error_messages() as $message ) + show_message($message); + echo '
'; + return; + } + + if ( $reinstall ) + $update->response = 'reinstall'; + + $result = wp_update_core($update, 'show_message'); + + if ( is_wp_error($result) ) { + show_message($result); + if ('up_to_date' != $result->get_error_code() ) + show_message( __('Installation Failed') ); + } else { + show_message( __('WordPress upgraded successfully') ); + } + echo ''; +} + +function do_dismiss_core_update() { + $version = isset( $_POST['version'] )? $_POST['version'] : false; + $locale = isset( $_POST['locale'] )? $_POST['locale'] : 'en_US'; + $update = find_core_update( $version, $locale ); + if ( !$update ) + return; + dismiss_core_update( $update ); + wp_redirect( wp_nonce_url('update-core.php?action=upgrade-core', 'upgrade-core') ); +} + +function do_undismiss_core_update() { + $version = isset( $_POST['version'] )? $_POST['version'] : false; + $locale = isset( $_POST['locale'] )? $_POST['locale'] : 'en_US'; + $update = find_core_update( $version, $locale ); + if ( !$update ) + return; + undismiss_core_update( $version, $locale ); + wp_redirect( wp_nonce_url('update-core.php?action=upgrade-core', 'upgrade-core') ); +} + +$action = isset($_GET['action']) ? $_GET['action'] : 'upgrade-core'; + +if ( 'upgrade-core' == $action ) { + $title = __('Upgrade WordPress'); + $parent_file = 'tools.php'; + require_once('admin-header.php'); + core_upgrade_preamble(); + include('admin-footer.php'); +} elseif ( 'do-core-upgrade' == $action || 'do-core-reinstall' == $action ) { + check_admin_referer('upgrade-core'); + $title = __('Upgrade WordPress'); + $parent_file = 'tools.php'; + // do the (un)dismiss actions before headers, + // so that they can redirect + if ( isset( $_POST['dismiss'] ) ) + do_dismiss_core_update(); + elseif ( isset( $_POST['undismiss'] ) ) + do_undismiss_core_update(); + require_once('admin-header.php'); + if ( 'do-core-reinstall' == $action ) + $reinstall = true; + else + $reinstall = false; + if ( isset( $_POST['upgrade'] ) ) + do_core_upgrade($reinstall); + include('admin-footer.php'); + +}?> diff --git a/wp-admin/update-links.php b/wp-admin/update-links.php index 5fd02e06..a60aa6e4 100644 --- a/wp-admin/update-links.php +++ b/wp-admin/update-links.php @@ -1,6 +1,19 @@ query( $wpdb->prepare("UPDATE $wpdb->links SET link_updated = %s WHERE link_url = %s", $time, $uri) ); - endforeach; -} +$options = array(); +$options['timeout'] = 30; +$options['body'] = $query_string; + +$options['headers'] = array( + 'content-type' => 'application/x-www-form-urlencoded; charset='.get_option('blog_charset'), + 'content-length' => strlen( $query_string ), +); + +$response = wp_remote_get('http://api.pingomatic.com/updated-batch/', $options); + +if ( is_wp_error( $response ) ) + wp_die(__('Request Failed.')); + +if ( $response['response']['code'] != 200 ) + wp_die(__('Request Failed.')); + +$body = str_replace(array("\r\n", "\r"), "\n", $response['body']); +$returns = explode("\n", $body); + +foreach ($returns as $return) : + $time = substr($return, 0, 19); + $uri = preg_replace('/(.*?) | (.*?)/', '$2', $return); + $wpdb->query( $wpdb->prepare("UPDATE $wpdb->links SET link_updated = %s WHERE link_url = %s", $time, $uri) ); +endforeach; + ?> diff --git a/wp-admin/update.php b/wp-admin/update.php index c3cd2892..803f50e2 100644 --- a/wp-admin/update.php +++ b/wp-admin/update.php @@ -1,94 +1,24 @@

' . __('Error: There was an error connecting to the server, Please verify the settings are correct.') . '

'; -?> -
-
-

-

- - - - - - - - - - - - - - - - - -
size="40" />
size="40" />
size="40" />'.__('(Password not shown)').''; ?>
- -
-

- -

-
-
-get_error_data() ) - $message = $message->get_error_message() . ': ' . $message->get_error_data(); - else - $message = $message->get_error_message(); - } - echo "

$message

\n"; -} - +/** + * Plugin upgrade display. + * + * @since 2.5 + * + * @param string $plugin Plugin + */ function do_plugin_upgrade($plugin) { global $wp_filesystem; @@ -97,7 +27,10 @@ function do_plugin_upgrade($plugin) { return; if ( ! WP_Filesystem($credentials) ) { - request_filesystem_credentials($url, '', true); //Failed to connect, Error and request again + $error = true; + if ( is_object($wp_filesystem) && $wp_filesystem->errors->get_error_code() ) + $error = $wp_filesystem->errors; + request_filesystem_credentials($url, '', $error); //Failed to connect, Error and request again return; } @@ -116,13 +49,74 @@ function do_plugin_upgrade($plugin) { if ( is_wp_error($result) ) { show_message($result); - show_message( __('Installation Failed') ); + show_message( __('Plugin upgrade Failed') ); } else { - //Result is the new plugin file relative to WP_PLUGIN_DIR - show_message( __('Plugin upgraded successfully') ); + $plugin_file = $result; + show_message( __('Plugin upgraded successfully') ); if( $result && $was_activated ){ show_message(__('Attempting reactivation of the plugin')); - echo ''; + echo ''; + } + $update_actions = array( + 'activate_plugin' => '' . __('Activate Plugin') . '', + 'plugins_page' => '' . __('Return to Plugins page') . '' + ); + if ( $was_activated ) + unset( $update_actions['activate_plugin'] ); + + $update_actions = apply_filters('update_plugin_complete_actions', $update_actions, $plugin_file); + if ( ! empty($update_actions) ) + show_message('' . __('Actions:') . ' ' . implode(' | ', (array)$update_actions)); + } + echo ''; +} + +/** + * Theme upgrade display. + * + * @since 2.5 + * + * @param string $plugin Plugin + */ +function do_theme_upgrade($theme) { + global $wp_filesystem; + + $url = wp_nonce_url('update.php?action=upgrade-theme&theme=' . urlencode($theme), 'upgrade-plugin_' . urlencode($theme)); + if ( false === ($credentials = request_filesystem_credentials($url)) ) + return; + + if ( ! WP_Filesystem($credentials) ) { + $error = true; + if ( is_object($wp_filesystem) && $wp_filesystem->errors->get_error_code() ) + $error = $wp_filesystem->errors; + request_filesystem_credentials($url, '', $error); //Failed to connect, Error and request again + return; + } + + echo '
'; + echo '

' . __('Upgrade Theme') . '

'; + if ( $wp_filesystem->errors->get_error_code() ) { + foreach ( $wp_filesystem->errors->get_error_messages() as $message ) + show_message($message); + echo '
'; + return; + } + + //TODO: Is theme currently active? + $was_current = false; //is_plugin_active($plugin); //Check now, It'll be deactivated by the next line if it is + + $result = wp_update_theme($theme, 'show_message'); + + if ( is_wp_error($result) ) { + show_message($result); + show_message( __('Installation Failed') ); + } else { + //Result is the new plugin file relative to WP_PLUGIN_DIR + show_message( __('Theme upgraded successfully') ); + if( $result && $was_current ){ + show_message(__('Setting theme as Current')); + //TODO: Actually set it as active again. + //echo ''; } } echo ''; @@ -130,34 +124,25 @@ function do_plugin_upgrade($plugin) { if ( isset($_GET['action']) ) { $plugin = isset($_GET['plugin']) ? trim($_GET['plugin']) : ''; + $theme = isset($_REQUEST['theme']) ? urldecode($_REQUEST['theme']) : ''; + $action = isset($_GET['action']) ? $_GET['action'] : ''; - if ( 'upgrade-plugin' == $_GET['action'] ) { + if ( 'upgrade-plugin' == $action ) { check_admin_referer('upgrade-plugin_' . $plugin); $title = __('Upgrade Plugin'); $parent_file = 'plugins.php'; require_once('admin-header.php'); do_plugin_upgrade($plugin); include('admin-footer.php'); - } elseif ('activate-plugin' == $_GET['action'] ) { + } elseif ('activate-plugin' == $action ) { check_admin_referer('activate-plugin_' . $plugin); if( ! isset($_GET['failure']) && ! isset($_GET['success']) ) { - wp_redirect( 'update.php?action=activate-plugin&failure=true&plugin=' . $plugin . '&_wpnonce=' . $_GET['_wpnonce'] ); + wp_redirect( 'update.php?action=activate-plugin&failure=true&plugin=' . $plugin . '&_wpnonce=' . $_GET['_wpnonce'] ); activate_plugin($plugin); - wp_redirect( 'update.php?action=activate-plugin&success=true&plugin=' . $plugin . '&_wpnonce=' . $_GET['_wpnonce'] ); + wp_redirect( 'update.php?action=activate-plugin&success=true&plugin=' . $plugin . '&_wpnonce=' . $_GET['_wpnonce'] ); die(); } - ?> - > - - -<?php bloginfo('name') ?> › <?php _e('Plugin Reactivation'); ?> — <?php _e('WordPress'); ?> - - - -' . __('Plugin reactivated successfully.') . '

'; @@ -167,7 +152,14 @@ wp_admin_css( 'colors', true ); @ini_set('display_errors', true); //Ensure that Fatal errors are displayed. include(WP_PLUGIN_DIR . '/' . $plugin); } - echo ""; + iframe_footer(); + } elseif ( 'upgrade-theme' == $action ) { + check_admin_referer('upgrade-theme_' . $theme); + $title = __('Upgrade Theme'); + $parent_file = 'themes.php'; + require_once('admin-header.php'); + do_theme_upgrade($theme); + include('admin-footer.php'); } } diff --git a/wp-admin/upgrade-functions.php b/wp-admin/upgrade-functions.php index 86b0b75a..ca14a59c 100644 --- a/wp-admin/upgrade-functions.php +++ b/wp-admin/upgrade-functions.php @@ -1,5 +1,13 @@ diff --git a/wp-admin/upgrade.php b/wp-admin/upgrade.php index cf5c3051..e26a92e3 100644 --- a/wp-admin/upgrade.php +++ b/wp-admin/upgrade.php @@ -1,14 +1,38 @@ @@ -21,7 +45,7 @@ else

WordPress

- +

@@ -68,4 +92,4 @@ endswitch; endif; ?> - \ No newline at end of file + diff --git a/wp-admin/upload.php b/wp-admin/upload.php index cf6c1916..7b57f649 100644 --- a/wp-admin/upload.php +++ b/wp-admin/upload.php @@ -1,157 +1,257 @@ post_type == 'attachment' ) - if ( ! wp_delete_attachment($post_id_del) ) - wp_die( __('Error in deleting...') ); + $all_posts = $wpdb->get_col("SELECT ID FROM $wpdb->posts WHERE post_type = 'post' OR post_type = 'page'"); + $all_att = $wpdb->get_results("SELECT ID, post_parent FROM $wpdb->posts WHERE post_type = 'attachment'"); + + $lost = array(); + foreach ( (array) $all_att as $att ) { + if ( $att->post_parent > 0 && ! in_array($att->post_parent, $all_posts) ) + $lost[] = $att->ID; } + $_GET['detached'] = 1; + +} elseif ( isset($_GET['found_post_id']) && isset($_GET['media']) ) { + check_admin_referer('bulk-media'); + + if ( ! ( $parent_id = (int) $_GET['found_post_id'] ) ) + return; + + $parent = &get_post($parent_id); + if ( !current_user_can('edit_post', $parent_id) ) + wp_die( __('You are not allowed to edit this post.') ); + + $attach = array(); + foreach( (array) $_GET['media'] as $att_id ) { + $att_id = (int) $att_id; + + if ( !current_user_can('edit_post', $att_id) ) + continue; + + $attach[] = $att_id; + } + + if ( ! empty($attach) ) { + $attach = implode(',', $attach); + $attached = $wpdb->query( $wpdb->prepare("UPDATE $wpdb->posts SET post_parent = %d WHERE post_type = 'attachment' AND ID IN ($attach)", $parent_id) ); + } + + if ( isset($attached) ) { + $location = 'upload.php'; + if ( $referer = wp_get_referer() ) { + if ( false !== strpos($referer, 'upload.php') ) + $location = $referer; + } - $location = 'upload.php'; - if ( $referer = wp_get_referer() ) { - if ( false !== strpos($referer, 'upload.php') ) - $location = $referer; + $location = add_query_arg( array( 'detached' => 1, 'attached' => $attached ) , $location ); + wp_redirect($location); + exit; } - $location = add_query_arg('message', 2, $location); - $location = remove_query_arg('posted', $location); - wp_redirect($location); - exit; -} elseif ( !empty($_GET['_wp_http_referer']) ) { - wp_redirect(remove_query_arg(array('_wp_http_referer', '_wpnonce'), stripslashes($_SERVER['REQUEST_URI']))); - exit; +} elseif ( isset($_GET['action']) && isset($_GET['media']) && ( -1 != $_GET['action'] || -1 != $_GET['action2'] ) ) { + check_admin_referer('bulk-media'); + $doaction = ( -1 != $_GET['action'] ) ? $_GET['action'] : $_GET['action2']; + + if ( 'delete' == $doaction ) { + foreach( (array) $_GET['media'] as $post_id_del ) { + $post_del = & get_post($post_id_del); + + if ( !current_user_can('delete_post', $post_id_del) ) + wp_die( __('You are not allowed to delete this post.') ); + + if ( $post_del->post_type == 'attachment' ) + if ( ! wp_delete_attachment($post_id_del) ) + wp_die( __('Error in deleting...') ); + } + + $location = 'upload.php'; + if ( $referer = wp_get_referer() ) { + if ( false !== strpos($referer, 'upload.php') ) + $location = $referer; + } + + $location = add_query_arg('message', 2, $location); + $location = remove_query_arg('posted', $location); + wp_redirect($location); + exit; + } +} elseif ( isset($_GET['_wp_http_referer']) && ! empty($_GET['_wp_http_referer']) ) { + wp_redirect( remove_query_arg( array('_wp_http_referer', '_wpnonce'), stripslashes($_SERVER['REQUEST_URI']) ) ); + exit; } $title = __('Media Library'); -$parent_file = 'edit.php'; -wp_enqueue_script( 'admin-forms' ); +$parent_file = 'upload.php'; + +if ( ! isset( $_GET['paged'] ) || $_GET['paged'] < 1 ) + $_GET['paged'] = 1; -list($post_mime_types, $avail_post_mime_types) = wp_edit_attachments_query(); +if ( isset($_GET['detached']) ) { -if ( is_singular() ) - wp_enqueue_script( 'admin-comments' ); + if ( !empty($lost) ) { + $start = ( $_GET['paged'] - 1 ) * 50; + $page_links_total = ceil(count($lost) / 50); + $lost = implode(',', $lost); -require_once('admin-header.php'); + $orphans = $wpdb->get_results( "SELECT * FROM $wpdb->posts WHERE post_type = 'attachment' AND ID IN ($lost) LIMIT $start, 50" ); + } else { + $start = ( $_GET['paged'] - 1 ) * 25; + $orphans = $wpdb->get_results( "SELECT SQL_CALC_FOUND_ROWS * FROM $wpdb->posts WHERE post_type = 'attachment' AND post_parent < 1 LIMIT $start, 25" ); + $page_links_total = ceil($wpdb->get_var( "SELECT FOUND_ROWS()" ) / 25); + } -if ( !isset( $_GET['paged'] ) ) - $_GET['paged'] = 1; + $post_mime_types = array( + 'image' => array(__('Images'), __('Manage Images'), __ngettext_noop('Image (%s)', 'Images (%s)')), + 'audio' => array(__('Audio'), __('Manage Audio'), __ngettext_noop('Audio (%s)', 'Audio (%s)')), + 'video' => array(__('Video'), __('Manage Video'), __ngettext_noop('Video (%s)', 'Video (%s)')), + ); + $post_mime_types = apply_filters('post_mime_types', $post_mime_types); + $avail_post_mime_types = get_available_post_mime_types('attachment'); + + if ( isset($_GET['post_mime_type']) && !array_intersect( (array) $_GET['post_mime_type'], array_keys($post_mime_types) ) ) + unset($_GET['post_mime_type']); + +} else { + list($post_mime_types, $avail_post_mime_types) = wp_edit_attachments_query(); +} + +require_once('admin-header.php'); ?> + + + +
+ +

' . __('Search results for “%s”') . '', wp_specialchars( get_search_query() ) ); ?> +

-
-

post_title)); -} else { - $post_mime_type_label = _c('Manage Media|manage media header'); - if ( isset($_GET['post_mime_type']) && in_array( $_GET['post_mime_type'], array_keys($post_mime_types) ) ) - $post_mime_type_label = $post_mime_types[$_GET['post_mime_type']][1]; - if ( $post_listing_pageable && !is_archive() && !is_search() ) - $h2_noun = is_paged() ? sprintf(__( 'Previous %s' ), $post_mime_type_label) : sprintf(__('Latest %s'), $post_mime_type_label); - else - $h2_noun = $post_mime_type_label; - // Use $_GET instead of is_ since they can override each other - $h2_author = ''; - $_GET['author'] = (int) $_GET['author']; - if ( $_GET['author'] != 0 ) { - if ( $_GET['author'] == '-' . $user_ID ) { // author exclusion - $h2_author = ' ' . __('by other authors'); - } else { - $author_user = get_userdata( get_query_var( 'author' ) ); - $h2_author = ' ' . sprintf(__('by %s'), wp_specialchars( $author_user->display_name )); - } - } - $h2_search = isset($_GET['s']) && $_GET['s'] ? ' ' . sprintf(__('matching “%s”'), wp_specialchars( get_search_query() ) ) : ''; - $h2_cat = isset($_GET['cat']) && $_GET['cat'] ? ' ' . sprintf( __('in “%s”'), single_cat_title('', false) ) : ''; - $h2_tag = isset($_GET['tag']) && $_GET['tag'] ? ' ' . sprintf( __('tagged with “%s”'), single_tag_title('', false) ) : ''; - $h2_month = isset($_GET['m']) && $_GET['m'] ? ' ' . sprintf( __('during %s'), single_month_title(' ', false) ) : ''; - printf( _c( '%1$s%2$s%3$s%4$s%5$s%6$s|You can reorder these: 1: Posts, 2: by {s}, 3: matching {s}, 4: in {s}, 5: tagged with {s}, 6: during {s}' ), $h2_noun, $h2_author, $h2_search, $h2_cat, $h2_tag, $h2_month ); + +

+

+?> - -

|

- -

- - -

- - + +

+
- - +
- max_num_pages; + $page_links = paginate_links( array( 'base' => add_query_arg( 'paged', '%#%' ), 'format' => '', - 'total' => $wp_query->max_num_pages, + 'prev_text' => __('«'), + 'next_text' => __('»'), + 'total' => $page_links_total, 'current' => $_GET['paged'] )); -if ( $page_links ) - echo "
$page_links
"; -?> - -
- +if ( $page_links ) : ?> +
' . __( 'Displaying %s–%s of %s' ) . '%s', + number_format_i18n( ( $_GET['paged'] - 1 ) * $wp_query->query_vars['posts_per_page'] + 1 ), + number_format_i18n( min( $_GET['paged'] * $wp_query->query_vars['posts_per_page'], $wp_query->found_posts ) ), + number_format_i18n( $wp_query->found_posts ), + $page_links +); echo $page_links_text; ?>
+ + +
+ + -posts WHERE post_type = 'attachment' ORDER BY post_date DESC"; $arc_result = $wpdb->get_results( $arc_query ); @@ -182,18 +282,106 @@ foreach ($arc_result as $arc_row) { - + + + + +

-
+
- + + + + + + + + + + - + + + + + + + + + + +ID) ); +?> + + + + + + + +post_date && 'date' == $column_name ) { + $t_time = $h_time = __('Unpublished'); + } else { + $t_time = get_the_time(__('Y/m/d g:i:s A')); + $m_time = $post->post_date; + $time = get_post_time( 'G', true ); + if ( ( abs($t_diff = time() - $time) ) < 86400 ) { + if ( $t_diff < 0 ) + $h_time = sprintf( __('%s from now'), human_time_diff( $time ) ); + else + $h_time = sprintf( __('%s ago'), human_time_diff( $time ) ); + } else { + $h_time = mysql2date(__('Y/m/d'), $m_time); + } + } ?> + + + + + + +
ID, array(80, 60), true ) ) { ?> + "> +">
+ ID))); ?> + +

+ ID) ) + $actions['edit'] = '' . __('Edit') . ''; + if ( current_user_can('delete_post', $post->ID) ) + $actions['delete'] = "ID) . "' onclick=\"if ( confirm('" . js_escape(sprintf( ('draft' == $post->post_status) ? __("You are about to delete this attachment '%s'\n 'Cancel' to stop, 'OK' to delete.") : __("You are about to delete this attachment '%s'\n 'Cancel' to stop, 'OK' to delete."), $post->post_title )) . "') ) { return true;}return false;\">" . __('Delete') . ""; + $actions['view'] = '' . __('View') . ''; + if ( current_user_can('edit_post', $post->ID) ) + $actions['attach'] = ''.__('Attach').''; + $action_count = count($actions); + $i = 0; + foreach ( $actions as $action => $link ) { + ++$i; + ( $i == $action_count ) ? $sep = '' : $sep = ' | '; + echo "$link$sep"; + } ?> +

+ +
@@ -201,50 +389,47 @@ foreach ($arc_result as $arc_row) { $page_links
"; + echo "
$page_links_text
"; ?> +
+ +

- -get_results( $wpdb->prepare("SELECT * FROM $wpdb->comments WHERE comment_post_ID = %d AND comment_approved != 'spam' ORDER BY comment_date", $id) ); - if ( $comments ) : - // Make sure comments, post, and post_author are cached - update_comment_cache($comments); - $post = get_post($id); - $authordata = get_userdata($post->post_author); - ?> - +
+
- - - - - - - - - -comment_ID, 'detail', false, false ); -?> - -
+ - +/* '; + return showNotice.warn(m); + } else if ( $('select[name^="action"]').val() == 'attach' ) { + e.preventDefault(); + findPosts.open(); + } + }); + }); +})(jQuery); +columns.init('upload'); +/* ]]> */ + -endif; // comments -endif; // posts; + - - - - diff --git a/wp-admin/user-edit.php b/wp-admin/user-edit.php index e7a30cd5..0cedd29c 100644 --- a/wp-admin/user-edit.php +++ b/wp-admin/user-edit.php @@ -1,5 +1,12 @@ ID; } else { wp_die(__('Invalid user ID.')); } +} elseif ( !get_userdata($user_id) ) { + wp_die( __('Invalid user ID.') ); +} + +/** + * Optional SSL preference that can be turned on by hooking to the 'personal_options' action. + * + * @since 2.7.0 + * + * @param object $user User data object + */ +function use_ssl_preference($user) { +?> + + + + + @@ -136,11 +160,11 @@ include ('admin-header.php');

-

+

- +
    -

    + +

    -
    + @@ -170,9 +195,10 @@ include ('admin-header.php'); - + + 1 ) : ?>
    @@ -184,24 +210,29 @@ foreach ( $_wp_admin_css_colors as $color => $color_info ): ?>
    /> - colors as $html_color ): ?> + colors as $html_color ): ?>
     
    - +
    - +
    + + + + + -

    @@ -209,7 +240,7 @@ foreach ( $_wp_admin_css_colors as $color => $color_info ): ?> - + @@ -239,17 +270,17 @@ echo $role_list . ''; - + - + - + @@ -281,27 +312,27 @@ echo $role_list . '';
    - + - + - + - + - +
    @@ -319,12 +350,12 @@ if ( $show_password_fields ) : ?> -
    -
    - -

    -
    - +
    +
    + +
    +

    + @@ -360,8 +391,8 @@ if ( $show_password_fields ) :

    - -

    + +

    +
    + +

    + + +
    +
      + get_error_messages() as $err ) + echo "
    • $err
    • \n"; + ?> +
    +
    + + + +
    + get_error_messages() as $message ) + echo "

    $message

    "; + ?> +
    + +
    + +' . sprintf(__('Users can register themselves or you can manually create users here.'), site_url('wp-register.php')) . '

    '; + else + echo '

    ' . sprintf(__('Users cannot currently register themselves, but you can manually create users here.'), admin_url('options-general.php#users_can_register')) . '

    '; +?> +
    + + 'login', 'first_name' => 'firstname', 'last_name' => 'lastname', + 'email' => 'email', 'url' => 'uri', 'role' => 'role') as $post_field => $var ) { + $var = "new_user_$var"; + if ( ! isset($$var) ) + $$var = isset($_POST[$post_field]) ? stripslashes($_POST[$post_field]) : ''; +} +?> + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    +
    +
    +
    +

    + +

    +
    + +
    + + \ No newline at end of file diff --git a/wp-admin/users.php b/wp-admin/users.php index f032e413..61fd687d 100644 --- a/wp-admin/users.php +++ b/wp-admin/users.php @@ -1,5 +1,15 @@ '; } else { $redirect = 'users.php'; + $referer = ''; } -switch ($action) { +switch ($doaction) { case 'promote': check_admin_referer('bulk-users'); @@ -105,7 +115,7 @@ case 'delete': check_admin_referer('bulk-users'); - if ( empty($_REQUEST['users']) ) { + if ( empty($_REQUEST['users']) && empty($_REQUEST['user']) ) { wp_redirect($redirect); exit(); } @@ -113,7 +123,10 @@ case 'delete': if ( !current_user_can('delete_users') ) $errors = new WP_Error('edit_users', __('You can’t delete users.')); - $userids = $_REQUEST['users']; + if ( empty($_REQUEST['users']) ) + $userids = array(intval($_REQUEST['user'])); + else + $userids = $_REQUEST['users']; include ('admin-header.php'); ?> @@ -122,12 +135,14 @@ case 'delete':
    +

      ID ) { echo "
    • " . sprintf(__('ID #%1s: %2s The current user will not be deleted.'), $id, $user->user_login) . "
    • \n"; @@ -163,23 +178,6 @@ case 'delete': break; -case 'adduser': - check_admin_referer('add-user'); - - if ( ! current_user_can('create_users') ) - wp_die(__('You can’t create users.')); - - $user_id = add_user(); - $update = 'add'; - if ( is_wp_error( $user_id ) ) - $add_user_errors = $user_id; - else { - $new_user_login = apply_filters('pre_user_login', sanitize_user(stripslashes($_REQUEST['user_login']), true)); - $redirect = add_query_arg( array('usersearch' => urlencode($new_user_login), 'update' => $update), $redirect ); - wp_redirect( $redirect . '#user-' . $user_id ); - die(); - } - default: if ( !empty($_GET['_wp_http_referer']) ) { @@ -188,72 +186,72 @@ default: } wp_enqueue_script('admin-users'); - wp_enqueue_script('admin-forms'); include('admin-header.php'); + $usersearch = isset($_GET['usersearch']) ? $_GET['usersearch'] : null; + $userspage = isset($_GET['userspage']) ? $_GET['userspage'] : null; + $role = isset($_GET['role']) ? $_GET['role'] : null; + // Query the users - $wp_user_search = new WP_User_Search($_GET['usersearch'], $_GET['userspage'], $_GET['role']); + $wp_user_search = new WP_User_Search($usersearch, $userspage, $role); + $messages = array(); if ( isset($_GET['update']) ) : switch($_GET['update']) { case 'del': case 'del_many': - ?> - -

      -

      ' . sprintf(__ngettext('%s user deleted', '%s users deleted', $delete_count), $delete_count) . '

    '; break; case 'add': - ?> -

    -

    ' . __('New user created.') . '

'; break; case 'promote': - ?> -

-

' . __('Changed roles.') . '

'; break; case 'err_admin_role': - ?> -

-

-

' . __("The current user's role must have user editing capabilities.") . '

'; + $messages[] = '

' . __('Other user roles have been changed.') . '

'; break; case 'err_admin_del': - ?> -

-

-

' . __("You can't delete the current user.") . '

'; + $messages[] = '

' . __('Other users have been deleted.') . '

'; break; } endif; ?> - +
    get_error_messages() as $message ) - echo "
  • $message
  • "; + foreach ( $errors->get_error_messages() as $err ) + echo "
  • $err
  • \n"; ?>
- + -
- is_search() ) : ?> -

search_term)); ?>

- -

- +if ( ! empty($messages) ) { + foreach ( $messages as $msg ) + echo $msg; +} ?> +
+ +

' . __('Search results for “%s”') . '', wp_specialchars( get_search_query() ) ); ?> +

+ +
+
    meta_value); foreach ( (array) $b_roles as $b_role => $val ) { @@ -265,42 +263,52 @@ foreach ( (array) $users_of_blog as $b_user ) { unset($users_of_blog); $current_role = false; -$class = empty($_GET['role']) ? ' class="current"' : ''; -$role_links[] = "
  • " . __('All Users') . ""; -foreach ( $wp_roles->get_names() as $role => $name ) { - if ( !isset($avail_roles[$role]) ) +$class = empty($role) ? ' class="current"' : ''; +$role_links[] = "
  • " . sprintf( __ngettext( 'All (%s)', 'All (%s)', $total_users ), number_format_i18n( $total_users ) ) . ''; +foreach ( $wp_roles->get_names() as $this_role => $name ) { + if ( !isset($avail_roles[$this_role]) ) continue; $class = ''; - if ( $role == $_GET['role'] ) { - $current_role = $_GET['role']; + if ( $this_role == $role ) { + $current_role = $role; $class = ' class="current"'; } $name = translate_with_context($name); - $name = sprintf(_c('%1$s (%2$s)|user role with count'), $name, $avail_roles[$role]); - $role_links[] = "
  • " . $name . ''; + $name = sprintf( _c('%1$s (%2$s)|user role with count'), $name, $avail_roles[$this_role] ); + $role_links[] = "
  • $name"; } -echo implode(' |
  • ', $role_links) . ''; +echo implode( " |\n", $role_links) . ''; unset($role_links); ?>
-

- - +

+
+ +
+ +

+
+
results_are_paged() ) : ?>
page_links(); ?>
-
- - +
+ + +
@@ -308,8 +316,6 @@ unset($role_links);
-
- search_errors ) ) : ?>
    @@ -325,20 +331,22 @@ unset($role_links); get_results() ) : ?> is_search() ) : ?> -

    +

    - +
    - - - - - - + + + + + + + + get_results() as $userid ) {
    page_links(); ?>
    +
    + + +
    +
    @@ -369,95 +385,18 @@ foreach ( $wp_user_search->get_results() as $userid ) { 'user_login', 'first_name' => 'user_firstname', 'last_name' => 'user_lastname', 'email' => 'user_email', 'url' => 'user_uri', 'role' => 'user_role') as $formpost => $var ) { - $var = 'new_' . $var; - $$var = attribute_escape(stripslashes($_REQUEST[$formpost])); - } - unset($name); + foreach ( array('user_login' => 'user_login', 'first_name' => 'user_firstname', 'last_name' => 'user_lastname', 'email' => 'user_email', 'url' => 'user_uri', 'role' => 'user_role') as $formpost => $var ) { + $var = 'new_' . $var; + $$var = isset($_REQUEST[$formpost]) ? attribute_escape(stripslashes($_REQUEST[$formpost])) : ''; } + unset($name); ?>
    - - -
    -

    - - -
    - get_error_messages() as $message ) - echo "

    $message

    "; - ?> -
    - -
    - ' . sprintf(__('Users can register themselves or you can manually create users here.'), site_url('wp-register.php')) . '

    '; - else - echo '

    ' . sprintf(__('Users cannot currently register themselves, but you can manually create users here.'), admin_url('options-general.php#users_can_register')) . '

    '; -?> - - -
    - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    -
    -
    -
    -

    - - -

    - - -
- - diff --git a/wp-admin/widgets.php b/wp-admin/widgets.php index 74922767..95e82814 100644 --- a/wp-admin/widgets.php +++ b/wp-admin/widgets.php @@ -1,6 +1,15 @@ -
-

-
-
-

follow these instructions.' ); /* TODO: article on codex */; ?>

+ +

+
+

+
+

follow these instructions.' ); ?>


- +
  • @@ -216,30 +223,22 @@ $show_values = array( $show = isset($_GET['show']) && isset($show_values[$_GET['show']]) ? attribute_escape( $_GET['show'] ) : false; - $messages = array( 'updated' => __('Changes saved.') ); -require_once( 'admin-header.php' ); - -if ( isset($_GET['message']) && isset($messages[$_GET['message']]) ) : ?> +require_once( 'admin-header.php' ); ?> +

    -
    + +

    -

    - -

    @@ -308,7 +307,7 @@ if ( isset($_GET['message']) && isset($messages[$_GET['message']]) ) : ?>

    - + @@ -316,12 +315,12 @@ if ( isset($_GET['message']) && isset($messages[$_GET['message']]) ) : ?>

    +
    -
    - + diff --git a/wp-admin/wp-admin.css b/wp-admin/wp-admin.css index 0699a87b..a2b3b9ac 100644 --- a/wp-admin/wp-admin.css +++ b/wp-admin/wp-admin.css @@ -1,4 +1,12 @@ -.plugins .name { + +p, ul, ol, blockquote { font-size: 12px; } + +.plugins .name, +#pass-strength-result.strong, +#pass-strength-result.short, +.button-highlighted, +#quicktags #ed_strong, +#ed_reply_toolbar #ed_reply_strong { font-weight: bold; } @@ -7,58 +15,26 @@ padding: 0; } -.plugins .togl { - width: 150px; - border-right-width: 1px; - border-right-style: solid; +.plugins .action-links { + white-space: nowrap; } .import-system { font-size: 16px; } -#uploading { - border-style: none; - padding: 0; - margin-bottom: 16px; - height: 18em; - width: 100%; -} - -form#upload th { - text-align: right; -} - -form#upload #post_content, form#upload #post_title { - width: 250px; -} - -.form-invalid input { - border-width: 1px !important; - border-style: solid !important; -} - - -form#upload #post_content { - height: 50px; -} - -.attpreview { - width: 1px; /* hug */ - text-align: center; -} - .anchors { margin: 10px 20px 10px 20px; } table#availablethemes { - border-spacing: 0px; - border: none; - border-top: 1px solid #ccc; - border-bottom: 1px solid #ccc; + border-spacing: 0; + border-width: 1px 0; + border-style: solid none; margin: 10px auto; + width: 100%; } + td.available-theme { vertical-align: top; width: 240px; @@ -66,42 +42,42 @@ td.available-theme { padding: 20px; text-align: left; } + table#availablethemes td { - border: 1px solid #eee; - border-top: none; -} -table#availablethemes td.top { - border-top: none; + border-width: 0 1px 1px; + border-style: none solid solid; } -table#availablethemes td.right { - border-right: none; - border-left: none; + +table#availablethemes td.right, +table#availablethemes td.left { + border-right: 0 none; + border-left: 0 none; } + table#availablethemes td.bottom { - border-bottom: none; -} -table#availablethemes td.left { - border-right: none; - border-left: none; + border-bottom: 0 none; } .available-theme a.screenshot { width: 240px; height: 180px; display: block; - border: 1px solid #efefef; + border-width: 1px; + border-style: solid; margin-bottom: 10px; overflow: hidden; } + .available-theme img { width: 240px; } + .available-theme h3 { margin: 15px 0 5px; } #current-theme { - margin-top: 1em; + margin: 1em 0 1.5em; } #current-theme a { @@ -120,7 +96,8 @@ table#availablethemes td.left { #current-theme img { float: left; - border: 1px solid #666; + border-width: 1px; + border-style: solid; margin-right: 1em; margin-bottom: 1.5em; width: 150px; @@ -129,23 +106,23 @@ table#availablethemes td.left { #TB_window #TB_title a.tb-theme-preview-link, #TB_window #TB_title a.tb-theme-preview-link:visited { font-weight: bold; - color: #999; text-decoration: none; } -#TB_window #TB_title a.tb-theme-preview-link:hover, -#TB_window #TB_title a.tb-theme-preview-link:focus { - color: #ccc; -} - .checkbox { border: none; margin: 0; padding: 0; } -.code { - font-family: "Courier New", Courier, monospace; +.code, code { + font-family: Consolas, Monaco, Courier, monospace; +} + +kbd, code { + padding: 1px 3px; + margin: 0 1px; + font-size: 11px; } .commentlist li { @@ -156,7 +133,7 @@ table#availablethemes td.left { } .commentlist li li { - border-bottom: 0px; + border-bottom: 0; padding: 0; } @@ -176,23 +153,112 @@ table#availablethemes td.left { } .quicktags, .search { - font: 12px Georgia, "Times New Roman", Times, serif; + font: 12px Georgia, "Times New Roman", "Bitstream Charter", Times, serif; } .submit { - border-top: 1px solid #ccc; - padding: 1.5em 0 0 0; - margin: 10px 0 0 0; - -moz-border-radius-bottomleft: 3px; - -khtml-border-bottom-left-radius: 3px; + padding: 1.5em 0; + margin: 5px 0; + -moz-border-radius: 0 0 3px 3px; -webkit-border-bottom-left-radius: 3px; - border-bottom-left-radius: 3px; - -moz-border-radius-bottomright: 3px; - -khtml-border-bottom-right-radius: 3px; -webkit-border-bottom-right-radius: 3px; + -khtml-border-bottom-left-radius: 3px; + -khtml-border-bottom-right-radius: 3px; + border-bottom-left-radius: 3px; border-bottom-right-radius: 3px; } +form p.submit a.cancel:hover { + text-decoration: none; +} + +#submitdiv h3, +#pagesubmitdiv h3 { + margin-bottom: 0 !important; +} + +#misc-publishing-actions { + padding: 6px 0 16px 0; +} + +.misc-pub-section { + padding: 6px; + border-bottom-width: 1px; + border-bottom-style: solid; +} + +.misc-pub-section-last { + border-bottom: 0 none; +} + +#minor-publishing-actions { + padding: 6px; + text-align: right; +} + +#minor-publishing { + border-bottom-width: 1px; + border-bottom-style: solid; +} + +#save-post { + float: left; +} + +.preview { + float: right; +} + +#major-publishing-actions { + padding: 6px; + clear: both; + border-top: none; +} + +#minor-publishing-actions input, +#major-publishing-actions input, +#minor-publishing-actions .preview { + min-width: 80px; + text-align: center; +} + +#delete-action { + line-height: 25px; + vertical-align: middle; + text-align: left; + float: left; +} + +#publishing-action { + text-align: right; + float: right; +} + +#post-body #minor-publishing { + padding-bottom: 10px; +} + +#post-body #misc-publishing-actions { + padding: 0; +} + +#post-body .misc-pub-section { + border-right-width: 1px; + border-right-style: solid; + border-bottom: 0 none; + min-height: 30px; + float: left; + max-width: 32%; +} + +#post-body .misc-pub-section-last { + border-right: 0; +} + +#sticky-span { + margin-left: 18px; +} + .side-info { margin: 0; padding: 4px; @@ -213,49 +279,77 @@ table#availablethemes td.left { list-style: square; } -.submit input, .button, .button-secondary, .button-highlighted { - font-family: "Lucida Grande", "Lucida Sans Unicode", Tahoma, Verdana, sans-serif; - padding: 3px 5px; - font-size: 12px; - line-height: 1.5em; +.submit input, +.button, +.button-primary, +.button-secondary, +.button-highlighted, +#postcustomstuff .submit input { + font-family: "Lucida Grande", Verdana, Arial, "Bitstream Vera Sans", sans-serif; + text-decoration: none; + font-size: 11px !important; + line-height: 16px; + padding: 2px 8px; + cursor: pointer; border-width: 1px; border-style: solid; - -moz-border-radius: 3px; - -khtml-border-radius: 3px; - -webkit-border-radius: 3px; - border-radius: 3px; - cursor: pointer; - text-decoration: none; + -moz-border-radius: 11px; + -khtml-border-radius: 11px; + -webkit-border-radius: 11px; + border-radius: 11px; + -moz-box-sizing: content-box; + -webkit-box-sizing: content-box; + -khtml-box-sizing: content-box; + box-sizing: content-box; +} + +a.button, +a.button-primary, +a.button-secondary { + line-height: 1.2em; + -webkit-border-radius: 10px; + padding: 4px 10px; } -.button-highlighted { - font-weight: bold; +#doaction, +#doaction2 { + margin-right: 8px; +} + +.tablenav select[name="action"], +.tablenav select[name="action2"] { + width: 120px; +} + +.tablenav select[name="m"] { + width: 120px; +} + +.tablenav select#cat { + width: 150px; } #wpcontent select { - font: 12px/20px "Lucida Grande", "Lucida Sans Unicode", Tahoma, Verdana, sans-serif; + font: 11px/20px "Lucida Grande", Verdana, Arial, "Bitstream Vera Sans", sans-serif; padding: 2px; - border-width: 1px; border-style: solid; height: 2em; - vertical-align:top; + vertical-align: top; +} + +#wpcontent option { + padding: 2px; } .approve { display: none; } -.unapproved .approve { +.unapproved .approve, .spam .approve { display: inline; } -.updated a { - border-bottom-width: 1px; - border-bottom-style: solid; -} - - .unapproved .unapprove { display: none; } @@ -269,7 +363,6 @@ table#availablethemes td.left { line-height: 150%; } - table .vers { text-align: center; } @@ -278,18 +371,25 @@ textarea.all-options, input.all-options { width: 250px; } -#postdiv, #titlediv, #guiddiv, #poststuff .stuffbox { - margin: 0 8px 0 0; - padding: 0; +#namediv table { + width: 100%; } -#titlediv, #namediv, #poststuff #namediv { - margin-top: 10px; +#namediv td.first { + width: 10px; + white-space: nowrap; } -#postdivrich { - margin: 0; - padding: 0; +#namediv input { + width: 98%; +} + +#namediv p { + margin: 10px 0; +} + +#wpbody-content .metabox-holder { + padding-top: 10px; } #content { @@ -298,100 +398,126 @@ textarea.all-options, input.all-options { } #editorcontainer #content { - padding: 0; + padding: 6px; line-height: 150%; border: 0 none; outline: none; + -moz-box-sizing: border-box; + -webkit-box-sizing: border-box; + -khtml-box-sizing: border-box; + box-sizing: border-box; } -#editorcontainer { - padding: 6px; - border-style: none solid solid; +#editorcontainer, +#quicktags { + border-style: solid; border-width: 1px; border-collapse: separate; + -moz-border-radius: 6px 6px 0 0; + -webkit-border-top-right-radius: 6px; + -webkit-border-top-left-radius: 6px; + -khtml-border-top-right-radius: 6px; + -khtml-border-top-left-radius: 6px; + border-top-right-radius: 6px; + border-top-left-radius: 6px; } #quicktags { padding: 0; - border: 0 none; + margin-bottom: -3px; + border-bottom-width: 3px; + background-image: url("images/ed-bg.gif"); + background-position: left top; + background-repeat: repeat-x; } #quicktags #ed_toolbar { - padding: 2px 4px; + padding: 2px 4px 0; } -#ed_toolbar input { - margin: 3px 2px 2px; - padding: 2px 4px; +#ed_toolbar input, +#ed_reply_toolbar input { + margin: 3px 1px 4px; line-height: 18px; display: inline-block; + border-width: 1px; + border-style: solid; + min-width: 26px; + padding: 2px 4px; + font-size: 12px; + -moz-border-radius: 3px; + -khtml-border-radius: 3px; + -webkit-border-radius: 3px; + border-radius: 3px; } -#quicktags #ed_strong { - font-weight: bold; +#ed_reply_toolbar input { + margin: 1px 2px 1px 1px; } -#quicktags #ed_link { +#quicktags #ed_link, +#ed_reply_toolbar #ed_reply_link { text-decoration: underline; } -#quicktags #ed_del { +#quicktags #ed_del, +#ed_reply_toolbar #ed_reply_del { text-decoration: line-through; } -#quicktags #ed_em { +#quicktags #ed_em, +#ed_reply_toolbar #ed_reply_em { font-style: italic; } -#quicktags #ed_code { - font-family: "Courier New", Courier, mono; - font-size: 1.1em; - vertical-align: top; -} - - -#attachmentlinks textarea { - width: 100%; - height: 2.5em; - margin-bottom: 6px; -} - #excerpt, .attachmentlinks { margin: 0; height: 4em; width: 98%; } -.plugins p { +/* post meta postbox */ +#postcustomstuff table, +#postcustomstuff input, +#postcustomstuff textarea { + border-width: 1px; + border-style: solid; + -moz-border-radius: 3px; + -khtml-border-radius: 3px; + -webkit-border-radius: 3px; + border-radius: 3px; } -#login .fullwidth { - width: 320px; +#postcustomstuff .updatemeta, +#postcustomstuff .deletemeta { + margin: auto; } -#searchform fieldset { - float: left; - margin: 0 1.5ex 1em 0; - padding: 0; +#postcustomstuff thead th { + padding: 5px 8px 8px; } -#searchform fieldset legend { - padding: 0 0 .2em 1px; +#postcustom #postcustomstuff .submit, +#pagecustomdiv #postcustomstuff .submit { + border: 0 none; + float: none; + padding: 5px 8px; } -#searchform #s { - padding: 4px 3px; +#side-sortables #postcustom #postcustomstuff .submit, +#side-sortables #pagecustomdiv #postcustomstuff .submit { + padding: 0 5px; } -#searchform #post-query-submit { - float: left; - margin: 14px 0 1em; - position: relative; - top: .35em; +#side-sortables #postcustom #postcustomstuff td.left input, +#side-sortables #pagecustomdiv #postcustomstuff td.left input { + margin: 3px 3px 0; } -#postcustomstuff .updatemeta, #postcustomstuff .deletemeta { - margin: auto; +#side-sortables #postcustom #postcustomstuff #the-list textarea, +#side-sortables #pagecustomdiv #postcustomstuff #the-list textarea { + height: 85px; + margin: 3px; } #postcustomstuff table { @@ -399,18 +525,40 @@ textarea.all-options, input.all-options { width: 100%; border-width: 1px; border-style: solid; + border-spacing: 0; } -#postcustomstuff table input, #postcustomstuff table textarea { +#postcustomstuff table input, +#postcustomstuff table select, +#postcustomstuff table textarea { width: 95%; + margin: 8px 0 8px 8px; +} + +#postcustomstuff th.left, +#postcustomstuff td.left { + width: 38%; +} + +#postcustomstuff .submit input { + width: auto; +} + +#postcustomstuff #newmeta .submit { + padding: 0 8px; } #postcustomstuff table #addmetasub { width: auto; } -#poststuff #post-body { - margin-right: 230px; +#postcustomstuff #newmetaleft { + vertical-align: top; +} + +#postcustomstuff #newmetaleft a { + padding: 0 10px; + text-decoration: none; } #save { @@ -425,13 +573,9 @@ textarea.all-options, input.all-options { margin-right: 0; } -#template, #template div, #editcat, #addcat { - zoom: 1; -} - /* A handy div class for hiding controls. Some browsers will disable them when you -set display:none; */ +set display: none; */ .zerosize { height: 0; width: 0; @@ -448,7 +592,7 @@ set display:none; */ } #your-profile legend { - font-family: Georgia, "Times New Roman", Times, serif; + font-family: Georgia, "Times New Roman", "Bitstream Charter", Times, serif; font-size: 22px; } @@ -466,7 +610,6 @@ set display:none; */ margin-left: 2em; } - div.nav { height: 2em; padding: 7px 10px; @@ -478,17 +621,12 @@ div.nav { padding: 2px 4px; } -.page-numbers { - padding: 2px 4px; - margin-right: 3px; - border-width: 1px; - border-style: solid; -} - -.page-numbers.current { +a.page-numbers { + border-bottom-style: solid; + border-bottom-width: 2px; font-weight: bold; - border-width: 1px; - border-style: solid; + margin-right: 1px; + padding: 0 2px; } p.pagenav { @@ -506,47 +644,64 @@ p.pagenav { font-weight: bold; } -.comment-column { - margin-left: 5px; +.column-comment p { + margin: 0.6em 0; } -.tablenav a.button-secondary { - display: block; - margin: 1px 8px 0 0; -} - -.tablenav .button-secondary { - padding: 2px 4px; - vertical-align: top; +.column-author img, .column-username img { + float: left; + margin-right: 10px; + margin-top: 3px; } -.tablenav .tablenav-pages a.next, .tablenav .tablenav-pages a.prev { - text-decoration: underline; +.tablenav a.button-secondary { + display: block; + margin: 3px 8px 0 0; } .tablenav { - height: 2em; - padding: 7px 10px; clear: both; - margin-bottom: -10px; - margin-top: 8px; - vertical-align: text-top; + height: 30px; + margin: 6px 0 4px; + vertical-align: middle; } .tablenav .tablenav-pages { float: right; - height: 18px; - padding-top: 6px; + display: block; + cursor: default; + height: 30px; + line-height: 30px; font-size: 11px; } -.tablenav .tablenav-pages a { +.tablenav .tablenav-pages a, .tablenav-pages span.current { text-decoration: none; + border: none; + padding: 3px 6px; + border-width: 1px; + border-style: solid; + -moz-border-radius: 5px; + -khtml-border-radius: 5px; + -webkit-border-radius: 5px; + border-radius: 5px; +} + +.tablenav .displaying-num { + margin-right: 10px; + font-size: 12px; + font-family: Georgia, "Times New Roman", "Bitstream Charter", Times, serif; + font-style: italic; +} + +.tablenav .actions { + padding: 2px 8px 0 0; } td.media-icon { vertical-align: middle; text-align: center; + width: 80px; } td.media-icon img { @@ -569,181 +724,351 @@ td.media-icon img { } #pass-strength-result { - padding: 3px 5px 3px 5px; - margin-top: 3px; - text-align: center; - border-width: 1px; border-style: solid; + border-width: 1px; + float: left; + margin: 12px 5px 5px 1px; + padding: 3px 5px; + text-align: center; + width: 200px; } -a.view-comment-post-link { - position: absolute; - text-decoration:underline; +.row-actions { + visibility: hidden; + padding: 2px 0 0; +} + +tr:hover .row-actions, +div.comment-item:hover .row-actions { + visibility: visible; } /* Admin Header */ +#wphead-info { + margin: 0 0 0 15px; + padding-right: 15px; +} #user_info { - position: absolute; - right: 15px; - top: 11px; - font-size: 11px; + float: right; + font-size: 12px; + line-height: 46px; + height: 46px; } #user_info p { margin: 0; padding: 0; + line-height: 46px; } #wphead { - border-top-width: 30px; - border-top-style: solid; + height: 46px; } -#wphead a, #dashmenu a, #adminmenu a, #submenu a, #sidemenu a, #taglist a, #catlist a { +#wphead a, +#adminmenu a, +#sidemenu a, +#taglist a, +#catlist a, +#show-settings a { text-decoration: none; } -#wphead #viewsite { - position: absolute; - margin-top: 12px; - margin-left: 10px; -} -#wphead #viewsite a { - font: 12px "Lucida Grande", "Lucida Sans Unicode", Tahoma, Verdana, sans-serif; - padding: 3px 4px; - display: block; - letter-spacing: normal; - border-width: 1px; - border-style: solid; - -moz-border-radius: 3px; - -khtml-border-radius: 3px; - -webkit-border-radius: 3px; - border-radius: 3px; +#header-logo { + float: left; + margin: 7px 0 0 15px; } #wphead h1 { - font: normal 36px Georgia, "Times New Roman", Times, serif; - padding: 11px 170px 16px 12px; + font: normal 22px Georgia, "Times New Roman", "Bitstream Charter", Times, serif; + padding: 10px 8px 5px; margin: 0; - margin-right: 15%; + float: left; } -/* menu stuff */ +#wphead h1.long-title { + font: normal 18px Georgia, "Times New Roman", "Bitstream Charter", Times, serif; + padding: 12px 10px 5px; +} -#dashmenu { - margin: 0; +#wphead h1 span { + font-size: 50%; +} + +/* side admin menu */ +#adminmenu * { + -webkit-user-select: none; + -moz-user-select: none; + -khtml-user-select: none; + user-select: none; +} + +#adminmenu .wp-submenu { + display: none; list-style: none; - position: absolute; - top: 7px; - left: 0; - font-size: 11px; - padding-left: 9px; + padding: 0; + margin: 0; + position: relative; + z-index: 2; + border-width: 1px 0 0; + border-style: solid none none; } -#dashmenu a { - padding: 5px 6px; - line-height: 220%; - margin-right: 8px; +#adminmenu .wp-submenu a { + font: normal 11px/18px "Lucida Grande", Verdana, Arial, "Bitstream Vera Sans", sans-serif; } -#dashmenu a.current { - border: none; - -moz-border-radius-topleft: 3px; - -khtml-border-top-left-radius: 3px; - -webkit-border-top-left-radius: 3px; - border-top-left-radius: 3px; - -moz-border-radius-topright: 3px; - -khtml-border-top-right-radius: 3px; - -webkit-border-top-right-radius: 3px; - border-top-right-radius: 3px; +#adminmenu .wp-submenu li.current, +#adminmenu .wp-submenu li.current a, +#adminmenu .wp-submenu li.current a:hover { + font-weight: bold; +} + +#adminmenu a.menu-top, +#adminmenu .wp-submenu-head { + font: normal 13px/18px Georgia, "Times New Roman", "Bitstream Charter", Times, serif; +} + +#adminmenu div.wp-submenu-head { + display: none; +} + +.folded #adminmenu div.wp-submenu-head, +.folded #adminmenu li.wp-has-submenu div.sub-open { + display: block; +} + +.folded #adminmenu a.menu-top, +.folded #adminmenu .wp-submenu, +.folded #adminmenu li.wp-menu-open .wp-submenu, +.folded #adminmenu div.wp-menu-toggle { + display: none; +} + +#adminmenu li.wp-menu-open .wp-submenu { + display: block; } -#adminmenu { +#adminmenu div.wp-menu-image { + float: left; + width: 28px; + height: 28px; +} + +#adminmenu li { margin: 0; - list-style: none; - padding-left: 11px; - border-bottom-width: 1px; - border-bottom-style: solid; + padding: 0; + cursor: pointer; } #adminmenu a { - font-size: 16px; - padding: 5px 7px; - line-height: 30px; + display: block; + line-height: 18px; + padding: 1px 5px 3px; } -#adminmenu a.current, #sidemenu a.current { - font-weight: normal; - padding-left: 6px; - padding-right: 6px; - -moz-border-radius-topleft: 4px; - -khtml-border-top-left-radius: 4px; - -webkit-border-top-left-radius: 4px; - border-top-left-radius: 4px; - -moz-border-radius-topright: 4px; - -khtml-border-top-right-radius: 4px; - -webkit-border-top-right-radius: 4px; - border-top-right-radius: 4px; +#adminmenu li.menu-top { + min-height: 26px; +} + +#adminmenu a.menu-top { + line-height: 18px; + min-width: 10em; + padding: 5px 5px; + border-width: 1px 1px 0; + border-style: solid solid none; +} + +#adminmenu .wp-submenu a { + margin: 0; + padding-left: 12px; + border-width: 0 1px 0 0; + border-style: none solid none none; +} + +#adminmenu .menu-top-last ul.wp-submenu { + border-width: 0 0 1px; + border-style: none none solid; +} + +#adminmenu .wp-submenu li { + padding: 0; + margin: 0; +} + +.folded #adminmenu li.menu-top { + width: 28px; + height: 30px; + overflow: hidden; + border-width: 1px 1px 0; + border-style: solid solid none; +} + +#adminmenu .menu-top-first a.menu-top, +.folded #adminmenu li.menu-top-first, +#adminmenu .wp-submenu .wp-submenu-head { + border-width: 1px 1px 0; + border-style: solid solid none; + -moz-border-radius-topleft :6px; + -moz-border-radius-topright: 6px; + -webkit-border-top-right-radius: 6px; + -webkit-border-top-left-radius: 6px; + -khtml-border-top-right-radius: 6px; + -khtml-border-top-left-radius: 6px; + border-top-right-radius: 6px; + border-top-left-radius: 6px; +} + +#adminmenu .menu-top-last a.menu-top, +.folded #adminmenu li.menu-top-last { border-width: 1px; border-style: solid; + -moz-border-radius-bottomleft: 6px; + -moz-border-radius-bottomright: 6px; + -webkit-border-bottom-right-radius: 6px; + -webkit-border-bottom-left-radius: 6px; + -khtml-border-bottom-right-radius: 6px; + -khtml-border-bottom-left-radius: 6px; + border-bottom-right-radius: 6px; + border-bottom-left-radius: 6px; +} + +#adminmenu li.wp-menu-open a.menu-top-last { + border-bottom: 0 none; + -moz-border-radius-bottomright: 0; + -moz-border-radius-bottomleft: 0; + -webkit-border-bottom-right-radius: 0; + -webkit-border-bottom-left-radius: 0; + -khtml-border-bottom-right-radius: 0; + -khtml-border-bottom-left-radius: 0; + border-bottom-right-radius: 0; + border-bottom-left-radius: 0; +} + +#adminmenu img.wp-menu-image { + float: left; + padding: 8px 6px 0; + opacity: 0.6; + filter: alpha(opacity=60); } -#adminmenu a.current { - border-bottom-width: 2px; +#adminmenu li.menu-top:hover img.wp-menu-image, +#adminmenu li.wp-has-current-submenu img.wp-menu-image { + opacity: 1; + filter: alpha(opacity=100); } -#sidemenu { - margin: -30px 15px 0 315px; - list-style: none; - position: relative; - float: right; +.folded #adminmenu img.wp-menu-image { + padding: 7px 0 0 6px; +} + +#adminmenu li.wp-menu-separator { + height: 21px; + padding: 0; + margin: 0; + cursor: w-resize; +} + +.folded #adminmenu li.wp-menu-separator { + cursor: e-resize; +} + +#adminmenu .wp-menu-separator-last { + height: 10px; + width: 1px; +} + +#adminmenu .wp-submenu .wp-submenu-head { + border-width: 1px; + border-style: solid; + padding: 6px 4px 6px 10px; + cursor: default; +} + +.folded #adminmenu .wp-submenu { + position: absolute; + margin: -1px 0 0 28px; + padding: 0 8px 8px; + z-index: 999; + border: 0 none; +} + +.folded #adminmenu .wp-submenu ul { + width: 140px; + border-width: 0 0 1px; + border-style: none none solid; +} + +.folded #adminmenu .wp-submenu li.wp-first-item { + border-top: 0 none; +} + +.folded #adminmenu .wp-submenu a { padding-left: 10px; - font-size:12px; } -#sidemenu a { - padding: 0 7px; - display: block; - float: left; - line-height: 28px; - border-top-width: 1px; - border-top-style: solid; - border-bottom-width: 1px; - border-bottom-style: solid; +.folded #adminmenu a.wp-has-submenu { + margin-left: 40px; } -#dashmenu li, #adminmenu li, #submenu li, #sidemenu li { - display: inline; - line-height: 200%; - list-style: none; - text-align: center; - white-space: nowrap; - margin: 0; - padding: 0; +#adminmenu li.menu-top-last .wp-submenu ul { + border-width: 0 0 1px; + border-style: none none solid; +} + +#adminmenu .wp-menu-toggle { + width: 22px; + clear: right; + float: right; + margin: 1px 0 0; + height: 27px; + padding: 1px 2px 0 0; + cursor: default; } -#submenu li { - padding: 0 0 8px 17px; +#adminmenu li.wp-has-current-submenu ul { + border-bottom-width: 1px; + border-bottom-style: solid; } +/* end side admin menu */ -#adminmenu li a #awaiting-mod, #sidemenu li a #update-plugins { +/* comments/plugins bubble in menu */ +#adminmenu #awaiting-mod, +#adminmenu span.update-plugins, +#sidemenu li a span.update-plugins { position: absolute; - margin-left: -0.4em; - margin-top: 0.2em; - font-size: 0.7em; - background-repeat: no-repeat; - background-position: 0 bottom; - height: 0.9em; - width: 1em; + font-family: Helvetica, Arial, sans-serif; + font-size: 7pt; + font-weight: bold; + margin-top: 2px; + margin-left: 2px; + -moz-border-radius: 7px; + -khtml-border-radius: 7px; + -webkit-border-radius: 7px; + border-radius: 7px; +} + +#adminmenu li #awaiting-mod span, +#adminmenu li span.update-plugins span, +#sidemenu li a span.update-plugins span { + float: left; + display: block; + height: 1.6em; + line-height: 1.6em; + padding: 0 6px; } -#adminmenu li a .count-0, #sidemenu li a .count-0 { +#adminmenu li span.count-0, +#sidemenu li a .count-0 { display: none; } +/* end menu stuff */ +/* comments bubble */ .post-com-count-wrapper { min-width: 22px; + font-family: Helvetica, Arial, sans-serif; } .post-com-count { @@ -758,16 +1083,18 @@ a.view-comment-post-link { } .post-com-count span { - height: 1.3em; - line-height: 1.2em; - padding: 0 0.5em; - background-color: #bbb; + font-size: 9px; + font-weight: bild; + height: 1.7em; + line-height: 1.70em; + min-width: 0.7em; + padding: 0 6px; display: inline-block; cursor: pointer; - -moz-border-radius: 3px; - -khtml-border-radius: 3px; - -webkit-border-radius: 3px; - border-radius: 3px; + -moz-border-radius: 5px; + -khtml-border-radius: 5px; + -webkit-border-radius: 5px; + border-radius: 5px; } strong .post-com-count { @@ -778,72 +1105,39 @@ strong .post-com-count { background-position: center -3px; } -#adminmenu li a:hover #awaiting-mod, #sidemenu li a:hover #update-plugins { - background-position: -80px bottom; -} - -#adminmenu li a #awaiting-mod span, #sidemenu li a #update-plugins span { - top: -0.8em; - right: 0; - position: absolute; - display: block; - height: 1.3em; - line-height: 1.3em; - padding: 0 0.6em; - -moz-border-radius: 3px; - -khtml-border-radius: 3px; - -webkit-border-radius: 3px; - border-radius: 3px; -} - -#submenu { - margin: 0; - list-style: none; - padding: 6px 0 3px 0; -} - -#submenu li { - font-size: 14px; +.column-response .post-com-count { + float: left; + margin-right: 5px; + text-align: center; } -#minisub { /* for empty submenus */ - height: 15px; +.response-links { + margin: 4px 0; } -/* end menu stuff */ - /* Admin Footer */ - -html, body { - height:100%; -} -#wpwrap { - position: relative; - min-height: 100%; -} -#wpcontent{ - padding-bottom: 95px; -} #footer { - clear: both; - height: 65px; - padding: 10px 0 0 60px; - margin: 0; - position: relative; - margin-top: -75px; + margin-top: -45px; +} + +#footer, +#footer a { font-size: 12px; + font-family: Georgia, "Times New Roman", "Bitstream Charter", Times, serif; + font-style: italic; } #footer p { margin: 0; - padding: 7px 0; + padding: 15px; + line-height: 15px; } -#footer p a { +#footer a { text-decoration: none; } -#footer p a:hover { +#footer a:hover { text-decoration: underline; } @@ -851,34 +1145,42 @@ html, body { .form-table { border-collapse: collapse; - margin-top: 1em; + margin-top: 0.5em; width: 100%; margin-bottom: -8px; + clear: both; } -.form-table td { +.form-table td, +#wpbody-content .describe td { margin-bottom: 9px; - padding: 10px; + padding: 4px 10px 12px; line-height: 20px; - border-bottom-width: 8px; - border-bottom-style: solid; font-size: 11px; } -.form-table th { +.form-table th, +.form-wrap label { + font-weight: normal; + text-shadow: rgba(255,255,255,1) 0 1px 0; +} + +.form-table th, +#wpbody-content .describe th { vertical-align: top; text-align: left; padding: 10px; - width: 150px; - border-bottom-width: 8px; - border-bottom-style: solid; + width: 200px; } .form-table th.th-full { width: auto; } -.form-table input, .form-table textarea { +.form-table input, +.form-table textarea, +#wpbody-content .describe input, +#wpbody-content .describe textarea { border-width: 1px; border-style: solid; } @@ -886,6 +1188,7 @@ html, body { .form-table div.color-option { display: block; clear: both; + margin-top: 12px; } .form-table input.tog { @@ -897,14 +1200,27 @@ html, body { .form-table table.color-palette { vertical-align: bottom; float: left; - margin: -3px 3px 8px; + margin: -8px 3px 8px; } .form-table .color-palette td { - border-bottom: none; - border: 1px solid #fff; - font-size: 1px; - line-height: 1px; + border-width: 1px 1px 0; + border-stile: solid solid none; + height: 10px; + line-height: 20px; + width: 10px; +} + +textarea.large-text { + width: 99%; +} + +.form-table input.regular-text { + width: 325px; +} + +.form-table input.small-text { + width: 50px; } #profile-page .form-table textarea { @@ -912,17 +1228,10 @@ html, body { margin-bottom: 6px; } -#profile-page .form-table input[type=text] { +#profile-page .form-table input[type=text] { width: 300px; } -#pass-strength-result { - width: 197px; - float: left; - margin-right: 5px; - border: 1px solid #ccc !important; -} - #profile-page .form-table #rich_editing { margin-right: 5px } @@ -945,41 +1254,205 @@ table.form-table td .updated { font-size: 13px; } -/* Post Screen */ +/* divs for cats and tags pages */ -#tagsdiv #newtag { - margin-right: 5px; - width: 16em; +.form-wrap { + margin: 10px 0; + width: 97%; } -#tagchecklist { - margin-left: 10px; +.form-wrap p, +.form-wrap label { + font-size: 11px; +} +.form-wrap label { + display: block; + padding: 2px; font-size: 12px; - overflow: auto; } -#tagchecklist strong { - margin-left: -8px; - position: absolute; +.form-field input, +.form-field textarea { + border-style: solid; + border-width: 1px; + width: 95%; } -#tagchecklist span { - margin-right: 25px; - display: block; - float: left; - font-size: 11px; - line-height: 1.8em; - white-space: nowrap; - cursor: default; +.form-wrap p { + margin: 2px 0 5px; } -#tagchecklist span a { - margin: 6px 0pt 0pt -9px; - cursor: pointer; - width: 10px; - height: 10px; - display: block; +.setting-description, .form-wrap p { + font-style: italic; + font-family: "Lucida Grande", Verdana, Arial, "Bitstream Vera Sans", sans-serif; +} + +.form-wrap .form-field { + margin: 0 0 10px; + padding: 8px; +} + +.col-wrap h3 { + margin: 12px 0; + font-size: 1.1em; +} + +.col-wrap p.submit { + margin-top: -10px; +} + +.tagcloud { + width: 97%; + margin: 0 0 40px; +} + +.tagcloud h3 { + margin: 2px 0 12px; +} + +/* Post Screen */ +#normal-sortables { + min-height: 50px; +} + +.postbox { + position: relative; + min-width: 255px; + width: 99.5%; +} + +#trackback_url { + width: 99%; +} + +#normal-sortables .postbox .submit { + background: transparent none; + border: 0 none; + float: right; + padding: 0 12px; + margin: 0; +} + +#normal-sortables .postbox #replyrow .submit { + float: none; + margin: 0; + padding: 3px 7px; +} + +#side-sortables { + min-height: 300px; +} + +#side-sortables .submitbox .submit input, +#side-sortables .submitbox .submit .preview, +#side-sortables .submitbox .submit a.preview:hover { + border: 0 none; +} + +#side-sortables .inside-submitbox .insidebox, +.stuffbox .insidebox { + margin: 11px 0; +} + +#side-sortables .comments-box, +#side-sortables #show-comments { + display: none; +} + +#post-body #tagsdiv #newtag { + margin-right: 5px; + width: 16em; +} + +#side-info-column input#post_password { + width: 94% +} + +#side-info-column #tagsdiv #newtag { + width: 68%; +} + +#post-status-info { + font-size: 12px; + line-height: 2; + padding: 0 15px 0 7px; + border-width: 0 1px 1px; + border-style: none solid solid; + -moz-border-radius: 0 0 6px 6px; + -webkit-border-bottom-left-radius: 6px; + -webkit-border-bottom-right-radius: 6px; + -khtml-border-bottom-left-radius: 6px; + -khtml-border-bottom-right-radius: 6px; + border-bottom-left-radius: 6px; + border-bottom-right-radius: 6px; +} + +#editorcontent #post-status-info { + border: none; +} + +#post-body-content .wp_themeSkin .mceStatusbar a.mceResize { + display: block; + float: right; + background: transparent url(images/resize.gif) no-repeat scroll right bottom; + width: 12px; + height: 12px; + cursor: se-resize; + margin: 0 2px; + position: relative; + right: 0; + top: 31px; +} + + +#pagesubmitdiv div.inside, +#linksubmitdiv div.inside, + div.inside { + padding: 0; + margin: 0; +} + +#comment-status-radio p { + margin: 3px 0 5px; +} + +#comment-status-radio input { + margin: 2px 3px 5px 0; + vertical-align: middle; +} + +#comment-status-radio label { + padding: 5px 0; +} + +#tagchecklist { + margin-left: 10px; + font-size: 12px; + overflow: auto; +} + +#tagchecklist strong { + margin-left: -8px; + position: absolute; +} + +#tagchecklist span { + margin-right: 25px; + display: block; + float: left; + font-size: 11px; + line-height: 1.8em; + white-space: nowrap; + cursor: default; +} + +#tagchecklist span a { + margin: 6px 0pt 0pt -9px; + cursor: pointer; + width: 10px; + height: 10px; + display: block; float: left; text-indent: -9999px; overflow: hidden; @@ -989,6 +1462,7 @@ table.form-table td .updated { .howto { font-style: italic; display: block; + font-family: "Lucida Grande", Verdana, Arial, "Bitstream Vera Sans", sans-serif; } .ac_results { @@ -1024,589 +1498,1445 @@ table.form-table td .updated { clear: left; } -#poststuff h3 { - font-size: 14px; +.ui-sortable .postbox h3 { + cursor: pointer; + -webkit-user-select: none; + -moz-user-select: none; + -khtml-user-select: none; + user-select: none; +} + +.ui-sortable .postbox .hndle span { + padding: 6px 0; +} + +.ui-sortable .postbox .hndle { + cursor: move; +} + +.hndle a { + font-size: 11px; + font-weight: normal; +} + +.meta-box-sortables .postbox .handlediv { + float: right; + width: 23px; + height: 26px; +} + +.sortable-placeholder { + border-width: 1px; + border-style: dashed; + z-index: -1; +} + +#poststuff h3, +.metabox-holder h3 { + font-size: 12px; font-weight: bold; - padding: 7px; - margin: 0 0 10px; + padding: 7px 9px; + margin: 0; + line-height: 1; } -#poststuff .postbox, #poststuff .stuffbox { - margin-left: 20px; - padding: 2px; +.metabox-holder .postbox, +#poststuff .postbox, +#poststuff .stuffbox { margin-bottom: 20px; - margin-right: 8px; border-width: 1px; border-style: solid; + line-height: 1; + -moz-border-radius: 6px; + -khtml-border-radius: 6px; + -webkit-border-radius: 6px; + border-radius: 6px; +} + +.metabox-holder .postbox h3, +#poststuff .postbox h3, +#poststuff .stuffbox h3 { + -moz-border-radius: 6px 6px 0 0; + -webkit-border-top-right-radius: 6px; + -webkit-border-top-left-radius: 6px; + -khtml-border-top-right-radius: 6px; + -khtml-border-top-left-radius: 6px; + border-top-right-radius: 6px; + border-top-left-radius: 6px; +} + +.postbox table.form-table { + margin-bottom: 0; +} + +.postbox input[type="text"], +.postbox textarea, +.stuffbox input[type="text"], +.stuffbox textarea { + border-width: 1px; + border-style: solid; +} + +#poststuff .inside, +#poststuff .inside p { + font-size: 11px; + margin: 6px; +} + +#poststuff .inside .submitbox p { + margin: 1em 0; +} + +#post-visibility-select { + line-height: 1.5em; + margin-top: 3px; +} + +#poststuff #submitdiv .inside { + margin: 0; } #titlediv, #poststuff .postarea { - margin-left: 20px; margin-bottom: 20px; - margin-right: 8px; } #titlediv { margin-bottom: 20px; } +#titlediv label { cursor: text; } #titlediv div.inside { margin: 0; } -#titlediv #title { +#poststuff #titlewrap { border: 0; padding: 0; - font-size: 1.7em; - width: 100%; - outline: none; + } -#poststuff #titlewrap { - padding: 2px 3px; +#titlediv #title { + padding: 3px 4px; border-width: 1px; border-style: solid; + -moz-border-radius: 6px; + -khtml-border-radius: 6px; + -webkit-border-radius: 6px; + border-radius: 6px; + font-size: 1.7em; + width: 100%; + outline: none; } -#poststuff .inside { - margin: 0 12px 12px; +#poststuff .inside-submitbox, +#side-info-column .inside-submitbox { + margin: 0 3px; font-size: 11px; } -#link_name, #link_url, #link_description { - font-size: 1.7em; - padding: 4px 3px; +input#link_description, +input#link_url { width: 98%; } +#pending { + background: 0 none; + border: 0 none; + padding: 0; + font-size: 11px; + margin-top: -1px; +} + #edit-slug-box { + height: 1em; margin-top: 8px; + padding: 0 7px; } -#editable-post-name-full {display: none;} +#editable-post-name-full { + display: none; +} -#editable-post-name input {width: 16em;} +#editable-post-name input { + width: 16em; +} -#edit-slug-buttons a.save { - padding: 6px 4px; - margin-right: 4px; - text-decoration: none; - border-width: 1px; - border-style: solid; - -moz-border-radius: 3px; - -khtml-border-radius: 3px; - -webkit-border-radius: 3px; - border-radius: 3px; - font-weight: bold; +.postarea h3 label { + float: left; } -#poststuff #editor-toolbar { +.postarea #add-media-button { + float: right; + margin: 7px 0pt 0pt; position: relative; + right: 10px; +} + +#poststuff #editor-toolbar { height: 30px; - margin-top: -41px; } -#poststuff #edButtonPreview, #poststuff #edButtonHTML { +.wp_themeSkin tr.mceFirst td.mceToolbar { + background-image: url("images/ed-bg.gif"); + background-position: left top; + background-repeat: repeat-x; + border-width: 0 0 1px; + border-style: none none solid; +} + +#poststuff #edButtonPreview, +#poststuff #edButtonHTML { display: block; - height: 20px; - padding: 5px 5px 1px; - margin: 5px 8px 0 0; + height: 18px; + margin: 5px 5px 0 0; + padding: 4px 5px 2px; float: right; cursor: pointer; -} - -#poststuff #editor-toolbar .active { - font-weight: bold; - -moz-border-radius-topright: 3px; - -khtml-border-top-right-radius: 3px; + border-width: 1px; + border-style: solid; + -moz-border-radius: 3px 3px 0 0; -webkit-border-top-right-radius: 3px; - border-top-right-radius: 3px; - -moz-border-radius-topleft: 3px; - -khtml-border-top-left-radius: 3px; -webkit-border-top-left-radius: 3px; + -khtml-border-top-right-radius: 3px; + -khtml-border-top-left-radius: 3px; + border-top-right-radius: 3px; border-top-left-radius: 3px; } -#poststuff #media-buttons { - float: right; - margin-right: 20px; - margin-top: 8px; +#poststuff #edButtonHTML { + margin-right: 15px; +} + +#media-buttons { cursor: default; - line-height: 1; - height: 1.1em; + padding: 8px 8px 0; } -#poststuff #media-buttons a { +#media-buttons a { cursor: pointer; - padding: 0 5px 2px 2px; + padding: 0 0 5px 10px; } -#poststuff #media-buttons img { +#media-buttons img { vertical-align: middle; } -#poststuff .togbox { - background-position: -10px 16px; - background-repeat: no-repeat; - display: block; - height: 37px; - margin-left: -21px; - margin-top: -10px; - overflow: hidden; - position: absolute; - text-indent: -9999px; - width: 12px; - -moz-border-radius-topleft: 3px; - -khtml-border-top-left-radius: 3px; - -webkit-border-top-left-radius: 3px; - border-top-left-radius: 3px; - -moz-border-radius-bottomleft: 3px; - -khtml-border-bottom-left-radius: 3px; - -webkit-border-bottom-left-radius: 3px; - border-bottom-left-radius: 3px; +.submitbox .submit { + text-align: left; + padding: 12px 10px 10px; + font-size: 11px; } -#poststuff .closed .inside { - display: none; +.submitbox .submitdelete { + border-bottom-width: 1px; + border-bottom-style: solid; + text-decoration: none; + padding: 1px 2px; } -#poststuff .closed h3 { - margin: 0; +.inside-submitbox #post_status { + margin: 2px 0 2px -2px; } -#poststuff .closed .togbox { - background-position: 4px 15px; +.submitbox .submit a:hover { + border-bottom-width: 1px; + border-bottom-style: solid; } -.submitbox { - width: 220px; - float: right; +.submitbox .submit input { + margin-bottom: 8px; + margin-right: 4px; + padding: 6px; } -.submitbox .inside strong { - font-size: 14px; +#post-status-select { + line-height: 2.5em; + margin-top: 3px; } -.submitbox .submitdelete { - border-bottom-width: 1px; - border-bottom-style: solid; - text-decoration: none; - margin-left: 8px; - padding-bottom: 1px; +/* Categories */ + +#category-adder { + margin-left: 120px; + padding: 4px 0; } +#category-adder h4 { + margin: 0 0 8px; +} -.submitbox #previewview { - padding: 15px 10px; - -moz-border-radius-topleft: 3px; - -khtml-border-top-left-radius: 3px; - -webkit-border-top-left-radius: 3px; - border-top-left-radius: 3px; - -moz-border-radius-topright: 3px; - -khtml-border-top-right-radius: 3px; +#side-info-column #category-adder { + margin: 0; +} + +#post-body #category-add input, #category-add select { + width: 30%; +} + +#side-info-column #category-add input { + width: 94%; +} + +#side-info-column #category-add select { + width: 100%; +} + +#category-add input#category-add-sumbit { + width: auto; +} + +#post-body ul#category-tabs { + float: left; + width: 120px; + text-align: right; + /* Negative margin for the sake of those without JS: all tabs display */ + margin: 0 -120px 0 0; + padding: 0; +} + +#post-body ul#category-tabs li { + padding: 8px; +} + +#post-body ul#category-tabs li.ui-tabs-selected { + -moz-border-radius: 3px 0 0 3px; + -webkit-border-top-left-radius: 3px; + -webkit-border-bottom-left-radius: 3px; + -khtml-border-top-left-radius: 3px; + -khtml-border-bottom-left-radius: 3px; + border-top-left-radius: 3px; + border-bottom-left-radius: 3px; +} + +#post-body ul#category-tabs li.ui-tabs-selected a { + font-weight: bold; + text-decoration: none; +} + +#categorydiv div.ui-tabs-panel, +#linkcategorydiv div.ui-tabs-panel { + height: 150px; + overflow: auto; + padding: 0.5em 0.9em; +} + +#post-body #categorydiv div.ui-tabs-panel, +#post-body #linkcategorydiv div.ui-tabs-panel { + margin: 0 5px 0 120px; + height: 10em; + overflow: auto; + border-width: 4px; + border-style: solid; +} + +#side-info-column #category-tabs li { + display: inline; + padding-right: 8px; +} + +#side-info-column #category-tabs a { + text-decoration: none; +} + +#side-info-column #category-tabs { + margin-bottom: 3px; +} + +#categorydiv ul, +#linkcategorydiv ul { + list-style: none; + padding: 0; + margin: 0; +} + +#categorydiv ul.categorychecklist ul, +#linkcategorydiv ul.categorychecklist ul { + margin-left: 18px; +} + +ul.categorychecklist li { + margin: 0; + padding: 0; + line-height: 19px; +} + +#category-adder h4 { + margin-top: 4px; + margin-bottom: 0px; +} + +#categorydiv .ui-tabs-panel { + border-width: 3px; + border-style: solid; +} + +ul#category-tabs { + margin-top: 12px; +} + +ul#category-tabs li { + padding: 5px 8px; + -moz-border-radius: 3px 3px 0 0; + -webkit-border-top-left-radius: 3px; -webkit-border-top-right-radius: 3px; + -khtml-border-top-left-radius: 3px; + -khtml-border-top-right-radius: 3px; + border-top-left-radius: 3px; border-top-right-radius: 3px; } -.submitbox #previewview a { - padding: 6px; +/* positioning etc. */ + +form#tags-filter { + position: relative; +} + +p.search-box { + float: right; + margin: -5px 0 0; +} + +.search-input { + border-width: 1px; + border-style: solid; + padding: 2px; +} + +#posts-filter fieldset { + float: left; + margin: 0 1.5ex 1em 0; + padding: 0; +} + +#posts-filter fieldset legend { + padding: 0 0 .2em 1px; +} + +.bordertitle { + padding-bottom: 5px; + border-bottom-width: 1px; + border-bottom-style: solid; +} + +/* Edit posts */ + +td.post-title strong { + display: block; + margin-bottom: .2em; +} + +td.post-title p { + margin: 6px 0; +} + +/* Global classes */ + +.wp-hidden-children .wp-hidden-child, +.ui-tabs-hide { + display: none; +} + +.commentlist .avatar { + vertical-align: text-top; +} + +.defaultavatarpicker .avatar { + margin: 2px 0; + vertical-align: middle; +} + +body.wp-admin { + min-width: 785px; +} + +.view-switch { + float: right; + margin: 6px 8px 0; +} + +.view-switch a { text-decoration: none; - font-weight: normal; - border-bottom: none; - font-size: 14px; +} + +.filter { + float: left; + margin: -5px 0 0 10px; +} + +.filter .subsubsub { + margin-left: -10px; + margin-top: 13px; +} + +#the-comment-list td.comment p.comment-author { + margin-top: 0; + margin-left: 0; +} + +#the-comment-list p.comment-author img { + float: left; + margin-right: 8px; +} + +#the-comment-list p.comment-author strong a { + border: none; +} + +#the-comment-list td { + vertical-align: top; +} + +#the-comment-list td.comment { + word-wrap: break-word; +} + +#the-comment-list .check-column { + padding-top: 8px; +} + +#templateside ul li a { + text-decoration: none; +} + +.tablenav .delete { + margin-right: 20px; +} + +td.action-links, th.action-links { + text-align: right; +} + +/* Diff */ + +table.diff { + width: 100%; +} + +table.diff col.content { + width: 50%; +} + +table.diff tr { + background-color: transparent; +} + +table.diff td, table.diff th { + padding: .5em; + font-family: Consolas, Monaco, Courier, monospace; + border: none; +} + +table.diff .diff-deletedline del, table.diff .diff-addedline ins { + text-decoration: none; +} + +#wp-word-count { + display: block; +} + +fieldset { + border: 0; + padding: 0; + margin: 0; +} + +.tool-box { + margin: 15px 0 35px; +} + +.tool-box .buttons { + margin: 15px 0; +} + +.tool-box .title { + margin: 8px 0; + font: 18px/24px Georgia, "Times New Roman", "Bitstream Charter", Times, serif; +} + +.pressthis a { + font-size: 1.2em; +} + +#wp_editbtns, +#wp_gallerybtns { + padding: 2px; + position: absolute; + display: none; + z-index: 999998; +} + +#wp_editimgbtn, +#wp_delimgbtn, +#wp_editgallery, +#wp_delgallery { + margin: 2px; + padding: 2px; + border-width: 1px; + border-style: solid; -moz-border-radius: 3px; -khtml-border-radius: 3px; -webkit-border-radius: 3px; border-radius: 3px; } -.submitbox .submit { - text-align: left; - padding: 12px 10px 10px 10px; - font-size: 11px; +.settings-toggle { + text-align: right; + margin: 5px 7px 15px 0; + font-size: 12px; +} + +.settings-toggle h3 { + margin: 0; +} + +#timestampdiv select { + height: 20px; + line-height: 20px; + padding: 0; +} + +#jj, #hh, #mn { + width: 2em; + padding: 1px; + font-size: 12px; +} + +#aa { + width: 3.4em; + padding: 1px; + font-size: 12px; +} + +.curtime #timestamp { + background-repeat: no-repeat; + background-position: left top; + padding-left: 18px; +} + +#timestampdiv { + padding-top: 5px; + line-height: 23px; +} + +#timestampdiv p { + margin: 8px 0 6px; +} + +#timestampdiv input { + border-width: 1px; + border-style: solid; +} + +/* media popup 0819 */ +#sidemenu { + margin: -30px 15px 0 315px; + list-style: none; + position: relative; + float: right; + padding-left: 10px; + font-size: 12px; +} + +#sidemenu a { + padding: 0 7px; + display: block; + float: left; + line-height: 28px; + border-top-width: 1px; + border-top-style: solid; + border-bottom-width: 1px; + border-bottom-style: solid; +} + +#sidemenu li { + display: inline; + line-height: 200%; + list-style: none; + text-align: center; + white-space: nowrap; + margin: 0; + padding: 0; +} + +#sidemenu a.current { + font-weight: normal; + padding-left: 6px; + padding-right: 6px; + -moz-border-radius: 4px 4px 0 0; + -webkit-border-top-left-radius: 4px; + -webkit-border-top-right-radius: 4px; + -khtml-border-top-left-radius: 4px; + -khtml-border-top-right-radius: 4px; + border-top-left-radius: 4px; + border-top-right-radius: 4px; + border-width: 1px; + border-style: solid; +} + +#sidemenu { + margin: -30px 15px 0 315px; + list-style: none; + position: relative; + float: right; + padding-left: 10px; + font-size: 12px; +} + +#sidemenu a { + padding: 0 7px; + display: block; + float: left; + line-height: 28px; + border-top-width: 1px; + border-top-style: solid; + border-bottom-width: 1px; + border-bottom-style: solid; +} + +#sidemenu li a .count-0 { + display: none; +} + +/* reply to comments */ +#replyrow { + font-size: 11px; +} + +#replyrow input { + border-width: 1px; + border-style: solid; +} + +#replyrow td { + padding: 2px; +} + +#replyrow #editorcontainer { + border: 0 none; +} + +#replysubmit { + margin: 0; + padding: 3px 7px; +} + +#replysubmit img.waiting, +.inline-edit-save img.waiting, +#commentstatusdiv img.waiting { + padding: 0 10px; + vertical-align: top; +} + +#replysubmit .button { + margin-right: 5px; +} + +#replyrow #editor-toolbar { + display: none; +} + +#replyhead { + font-size: 12px; + font-weight: bold; + padding: 2px 10px 4px; +} + +#edithead .inside { + float: left; + padding: 3px 0 2px 5px; + margin: 0; + text-align: center; + font-size: 11px; +} + +#edithead .inside input { + width: 180px; + font-size: 11px; +} + +#edithead label { + padding: 2px 0; +} + +#replycontainer { + padding: 5px; + border: 0 none; + height: 120px; + overflow: hidden; + position: relative; +} + +#replycontent { + resize: none; + margin: 0; + width: 100%; + height: 100%; + padding: 0; + line-height: 150%; + border: 0 none; + outline: none; + font-size: 12px; +} + +#replyrow #ed_reply_toolbar { + margin: 0; + padding: 2px 3px; +} + +/* show/hide settings */ +#screen-meta { + position: relative; + clear: both; +} + +#screen-meta-links { + margin: 0 9px 0 0; +} + +#screen-meta .invisible { + visibility: hidden; +} + +#screen-options-link-wrap, +#contextual-help-link-wrap { + float: right; + background: transparent url( images/screen-options-left.gif ) no-repeat 0 0; + font-family: "Lucida Grande", Verdana, Arial, "Bitstream Vera Sans", sans-serif; + height: 22px; + padding: 0; + margin: 0 6px 0 0; +} + +#screen-meta a.show-settings { + text-decoration: none; + z-index: 1; + padding: 0 16px 0 6px; + height: 22px; + line-height: 22px; + font-size: 10px; + display: block; + background-repeat: no-repeat; + background-position: right bottom; +} + +#screen-meta a.show-settings { + background-image: url( images/screen-options-right.gif ); +} + +#screen-meta a.show-settings:hover { + text-decoration: none; +} + +#screen-options-wrap h5, +#contextual-help-wrap h5 { + margin: 8px 0; + font-size: 13px; +} + +#screen-options-wrap, +#contextual-help-wrap { + border-style: none solid solid; + border-top: 0 none; + border-width: 0 1px 1px; + margin: 0 15px; + padding: 8px 12px 12px; + -moz-border-radius: 0 0 0 4px; + -webkit-border-bottom-left-radius: 4px; + -khtml-border-bottom-left-radius: 4px; + border-bottom-left-radius: 4px; +} + +.metabox-prefs label { + padding-right: 15px; + white-space: nowrap; + line-height: 30px; +} + +.metabox-prefs label input { + margin: 0 5px 0 2px; +} + +.metabox-prefs label a { + display: none; +} + +/* Inline Editor + .quick-edit* is for Quick Edit + .bulk-edit* is for Bulk Edit + .inline-edit* is for everything +*/ +/* Layout */ +tr.inline-edit-row td { + padding: 0 0.5em; +} + +#wpbody-content .inline-edit-row fieldset { + font-size: 12px; + float: left; + margin: 0; + padding: 0; + width: 100%; +} + +#wpbody-content .inline-edit-row fieldset .inline-edit-col { + padding: 0 0.5em; +} + +#wpbody-content .quick-edit-row-page fieldset.inline-edit-col-right .inline-edit-col { + border-width: 0 0 0 1px; + border-style: none none none solid; +} + +#wpbody-content .quick-edit-row-post .inline-edit-col-left { + width: 40%; +} + +#wpbody-content .quick-edit-row-post .inline-edit-col-right { + width: 39%; +} + +#wpbody-content .inline-edit-row-post .inline-edit-col-center { + width: 20%; +} + +#wpbody-content .quick-edit-row-page .inline-edit-col-left { + width: 50%; +} + +#wpbody-content .quick-edit-row-page .inline-edit-col-right, +#wpbody-content .bulk-edit-row-post .inline-edit-col-right { + width: 49%; +} + +#wpbody-content .bulk-edit-row .inline-edit-col-left { + width: 30%; +} + +#wpbody-content .bulk-edit-row-page .inline-edit-col-right { + width: 69%; +} + +#wpbody-content .bulk-edit-row .inline-edit-col-bottom { + float: right; + width: 69%; +} + +#wpbody-content .inline-edit-row-page .inline-edit-col-right, +#owpbody-content .bulk-edit-row-post .inline-edit-col-right { + margin-top: 27px; +} + +.inline-edit-row fieldset .inline-edit-group { + clear: both; +} + +.inline-edit-row fieldset .inline-edit-group:after { + content: "."; + display: block; + height: 0; + clear: both; + visibility: hidden; +} + +.inline-edit-row p.submit { + clear: both; + padding: 0.5em; + margin: 0.5em 0 0; +} + +/* Positioning */ +.inline-edit-row h4 { + margin: .2em 0; + padding: 0; + line-height: 23px; +} +.inline-edit-row fieldset span.title, +.inline-edit-row fieldset span.checkbox-title { + margin: 0; + padding: 0; + line-height: 27px; +} + +.inline-edit-row fieldset label, +.inline-edit-row fieldset span.inline-edit-categories-label { + display: block; + margin: .2em 0; +} + +.inline-edit-row fieldset label.inline-edit-tags { + margin-top: 0; +} + +.inline-edit-row fieldset label.inline-edit-tags span.title { + margin: .2em 0; +} + +.inline-edit-row fieldset label span.title { + display: block; + float: left; + width: 5em; +} + +.inline-edit-row fieldset label span.input-text-wrap { + display: block; + margin-left: 5em; +} + +.quick-edit-row-post fieldset.inline-edit-col-right label span.title { + width: auto; + padding-right: 0.5em; } -.submitbox .submit a:hover { - border-bottom-width: 1px; - border-bottom-style: solid; +.inline-edit-row .input-text-wrap input[type=text] { + width: 100%; } -.submitbox .submit input { - margin-bottom: 8px; - margin-right: 3px; - padding: 6px 4px; - border: none; +.inline-edit-row fieldset label input[type=checkbox] { + vertical-align: text-bottom; } -.submitbox #autosave .error { - margin-top: 10px; +.inline-edit-row fieldset label textarea { + width: 100%; + height: 4em; } -/* Categories */ +#wpbody-content .bulk-edit-row fieldset .inline-edit-group label { + max-width: 50%; +} -#categorydiv #category-adder { - margin-left: 120px; - padding: 4px 0; +#wpbody-content .quick-edit-row fieldset .inline-edit-group label.alignleft:first-child { + margin-right: 0.5em } -#category-add input, #category-add select { - width: 30%; +/* Styling */ +.inline-edit-row h4 { + text-transform: uppercase; } -#category-add input#category-add-sumbit { - width: auto; +.inline-edit-row fieldset span.title, +.inline-edit-row fieldset span.checkbox-title { + font-family: Georgia, "Times New Roman", "Bitstream Charter", Times, serif; + font-style: italic; + line-height: 1.8em; +} + +/* Specific Elements */ +.inline-edit-row fieldset input[type="text"], +.inline-edit-row fieldset textarea { + border-style: solid; + border-width: 1px; } -#categorydiv ul#category-tabs { +.inline-edit-row fieldset .inline-edit-date { float: left; - width: 120px; - text-align: right; - /* Negative margin for the sake of those without JS: all tabs display */ - margin: 0 -120px 0 0; - padding: 0; } -ul#category-tabs li { - padding: 8px; +.inline-edit-row fieldset input[name=jj], +.inline-edit-row fieldset input[name=hh], +.inline-edit-row fieldset input[name=mn] { + font-size: 12px; + width: 2.1em; } -ul#category-tabs li.ui-tabs-selected { - -moz-border-radius-topleft: 3px; - -khtml-border-top-left-radius: 3px; - -webkit-border-top-left-radius: 3px; - border-top-left-radius: 3px; - -moz-border-radius-bottomleft: 3px; - -khtml-border-bottom-left-radius: 3px; - -webkit-border-bottom-left-radius: 3px; - border-bottom-left-radius: 3px; +.inline-edit-row fieldset input[name=aa] { + font-size: 12px; + width: 3.5em; } -ul#category-tabs li.ui-tabs-selected a { - color: #333; - font-weight: bold; - text-decoration: none; +.inline-edit-row fieldset label input.inline-edit-password-input { + width: 8em; } -div.ui-tabs-panel { - margin: 0 5px 0 120px; - padding: .5em .9em; - height: 10em; - overflow: auto; - border-width: 4px; +ul.cat-checklist { + height: 12em; + border-style: solid; + border-width: 1px; + overflow-y: scroll; + padding: 0 5px; + margin: 0 0 5px; +} + +#bulk-titles { + display: block; + height: 12em; border-style: solid; + border-width: 1px; + overflow-y: scroll; + padding: 0 5px; + margin: 0 0 5px; } -#categorydiv ul { - list-style: none; - padding: 0; +.inline-edit-row fieldset ul.cat-checklist li, +.inline-edit-row fieldset ul.cat-checklist input { margin: 0; } -#categorydiv ul.categorychecklist ul { - margin-left: 18px; +.inline-edit-row fieldset ul.cat-checklist label, +.inline-edit-row .catshow, +.inline-edit-row .cathide, +.inline-edit-row #bulk-titles div { + font-family: "Lucida Grande", Verdana, Arial, "Bitstream Vera Sans", sans-serif; + font-style: normal; + font-size: 11px; } -ul.categorychecklist li { - margin: 0; - padding: 0; - line-height: 19px; +table .inline-edit-row fieldset ul.cat-hover { + height: auto; + max-height: 30em; + overflow-y: auto; + position: absolute; } -#linkcategorydiv #category-adder { - margin-left: 120px; - padding: 4px 0; +.inline-edit-row fieldset label input.inline-edit-menu-order-input { + width: 3em; } -#category-adder h4 { - margin: 0; +.inline-edit-row fieldset label input.inline-edit-slug-input { + width: 75%; } -#linkcategorydiv ul#category-tabs { +.quick-edit-row-post fieldset label.inline-edit-status { float: left; - width: 120px; - text-align: right; - /* Negative margin for the sake of those without JS: all tabs display */ - margin: 0 -120px 0 0; - padding: 0; } -#linkcategorydiv ul { - list-style: none; - padding: 0; - margin: 0; +#bulk-titles { + line-height: 140%; +} +#bulk-titles div { + margin: 0.2em 0.3em; } -#linkcategorydiv ul.categorychecklist ul { - margin-left: 18px; +#bulk-titles div a { + cursor: pointer; + display: block; + float: left; + height: 10px; + margin: 3px 3px 0 -2px; + overflow: hidden; + position: relative; + text-indent: -9999px; + width: 10px; } -/* pasitioning etc. */ -form#tags-filter { - position: relative; +/* Media library */ +#wpbody-content #media-items .describe { + border-collapse: collapse; + width: 100%; + border-top-style: solid; + border-top-width: 1px; + clear: both; + cursor: default; + padding: 5px; + width: 100%; } -p#tag-search { - position: absolute; - right: 0; - top: 0; - margin: 0; +#wpbody-content .describe .media-item-info tr { + background-color: transparent; } -form#posts-filter { - position: relative; +#wpbody-content .filename { + margin-left: 10px; } -p#post-search { - position: absolute; - right: 0; - top: 0; - margin: 0; +#wpbody-content .media-item .thumbnail { + max-height: 128px; + max-width: 128px; } -#post-search .button, #widget-search .button { - padding: 3px; +#wpbody-content .media-upload-form label { + display: block; font-size: 13px; + margin: 0.5em; } -#posts-filter fieldset { - float: left; - margin: 0 1.5ex 1em 0; - padding: 0; +abbr.required { + border: medium none; + text-decoration: none; } -#posts-filter fieldset legend { - padding: 0 0 .2em 1px; +#wpbody-content .describe input[type="text"], +#wpbody-content .describe textarea { + width: 460px; } -.bordertitle { - padding-bottom: 5px; - border-bottom-width: 1px; - border-bottom-style: solid; +#wpbody-content .describe p.help { + margin: 0; + padding: 0; } -/* Global classes */ -.wp-hidden-children .wp-hidden-child { display: none; } -.wp-no-js-hidden { display: none; } -.ui-tabs-hide { display: none; } +.describe-toggle-on, .describe-toggle-off { + display: block; + line-height: 36px; + float: right; + margin-right: 20px; +} -.commentlist .avatar { - vertical-align:text-top; +.describe-toggle-off { + display: none; } -.defaultavatarpicker .avatar { - margin: 2px 0; - vertical-align: middle; +#wpbody-content .media-item { + border-bottom-style: solid; + border-bottom-width: 1px; + min-height: 36px; + position: relative; + width: 100%; } -body.minwidth { - min-width: 808px; +#wpbody-content #media-items { + border-style: solid solid none; + border-width: 1px; + width: 670px; } -ul.view-switch { - float: right; - list-style: none; - margin: -23px 5px -2px 0; - position: relative; +#wpbody-content #media-items .filename { + float: left; + line-height: 36px; + margin-left: 10px; + max-width: 430px; + overflow: hidden; } -ul.view-switch li { +.media-item .pinkynail { float: left; - margin: 0; - font-size: 11px; - padding: 4px 6px; - font-weight: bold; + height: 32px; + margin: 2px; + max-width: 40px; + max-height: 40px; } -ul.view-switch a { - text-decoration: none; +.media-item .startopen, +.media-item .startclosed { + display: none; } -ul.view-switch li.current { - border: none; - -moz-border-radius-topleft: 3px; - -khtml-border-top-left-radius: 3px; - -webkit-border-top-left-radius: 3px; - border-top-left-radius: 3px; - -moz-border-radius-topright: 3px; - -khtml-border-top-right-radius: 3px; - -webkit-border-top-right-radius: 3px; - border-top-right-radius: 3px; +/* find posts */ +.find-box { + width: 400px; + height: 250px; + overflow: hidden; + padding: 33px 5px 50px; + position: absolute; + z-index: 1000; } +.find-box-head { + cursor: move; + font-weight: bold; + height: 2em; + line-height: 2em; + padding: 1px 12px; + position: absolute; + top: 5px; + width: 100%; +} -#the-comment-list .comment a { - padding-bottom: 1px; - text-decoration: none; - border-bottom-width: 1px; - border-bottom-style: solid; +.find-box-inside { + overflow: auto; + width: 100%; + height: 100%; } +.find-box-search { + padding: 12px; + border-width: 1px; + border-style: none none solid; +} -#the-comment-list td.comment p.comment-author { - margin-top: 0; - margin-left: 0 ; +#find-posts-response { + margin: 8px 0; + padding: 0 1px; } -#the-comment-list p.comment-author img { - float: left; - margin-right: 8px; +#find-posts-response table { + width: 100%; } -#the-comment-list p.comment-author strong a { - border: none; +#find-posts-response .found-radio { + padding: 8px 0 0 8px; + width: 15px; } -#the-comment-list td { - vertical-align: top; +.find-box-buttons { + bottom: 12px; + left: 12px; + position: absolute; } -#the-comment-list td.comment { - width: 65%; - max-width: 460px; - word-wrap: break-word; +.find-box-search label { + padding-right: 6px; } -#the-comment-list td.comment p { - margin-left: 8px; +/* favorite-actions */ +#favorite-actions { + float: right; + margin: 11px 12px 0; + min-width: 130px; + position: relative; } -#the-comment-list .check-column { - padding-top: 8px; +#favorite-first { + -moz-border-radius: 12px; + -khtml-border-radius: 12px; + -webkit-border-radius: 12px; + border-radius: 12px; + line-height: 15px; + padding: 3px 30px 4px 12px; + border-width: 1px; + border-style: solid; } -#templateside ul li a { - text-decoration: none; +#favorite-inside { + margin: 0 0 0 0px; + padding: 0 1px 6px 1px; + border-width: 1px; + border-style: solid; + position: absolute; + z-index: 11; + display: none; + -moz-border-radius: 0 0 12px 12px; + -webkit-border-bottom-right-radius: 12px; + -webkit-border-bottom-left-radius: 12px; + -khtml-border-bottom-right-radius: 12px; + -khtml-border-bottom-left-radius: 12px; + border-bottom-right-radius: 12px; + border-bottom-left-radius: 12px; } -.curtime { - background-image: url(images/date-button.gif); - background-repeat: no-repeat; - background-position: left 2px; - padding-left: 18px; +#favorite-actions a { + display: block; + text-decoration: none; + font-size: 11px; } -.tablenav .delete { - margin-right: 20px; +#favorite-inside a { + padding: 3px 5px 3px 10px; } -#tTips { - display: none; +#favorite-toggle { + height: 22px; position: absolute; - margin: 0; - padding: 0 0 8px 0; - background-image: url(images/tail.gif); - background-repeat: no-repeat; - background-position: 15px bottom; - background-color: transparent; + right: 0; + top: 1px; + width: 28px; +} + +#favorite-actions .slide-down { + background-image: url(images/fav-top.png); + background-repeat: repeat-x; + background-position: 0 top; + -moz-border-radius: 12px 12px 0 0; + -webkit-border-bottom-right-radius: 0; + -webkit-border-bottom-left-radius: 0; + -khtml-border-bottom-right-radius: 0; + -khtml-border-bottom-left-radius: 0; + border-bottom-right-radius: 0; + border-bottom-left-radius: 0; + border-bottom-width: 1px; + border-bottom-style: solid; } -#tTips p#tTips_inside { - margin: 0; - padding: 8px 12px; - text-align: center; - -moz-border-radius: 8px; - -khtml-border-radius: 8px; - -webkit-border-radius: 8px; - border-radius: 8px; +#utc-time, #local-time { + padding-left: 25px; + font-style: italic; + font-family: "Lucida Grande", Verdana, Arial, "Bitstream Vera Sans", sans-serif; } -td.action-links, th.action-links { - text-align: right; +ul#dismissed-updates { + display: none; +} +form.upgrade { + margin-top: 8px; } -#poststuff h3, #poststuff .closed h3 { - cursor: pointer; -} - -.hide-if-no-js { - display: none; +#tagsdiv #the-tagcloud { + margin: 5px 5px 10px; + padding: 8px; + border-width: 1px; + border-style: solid; + line-height: 1.8em; + word-spacing: 3px; + -moz-border-radius: 6px; + -khtml-border-radius: 6px; + -webkit-border-radius: 6px; + border-radius: 6px; } -/* Diff */ +br.clear { + height: 2px; + line-height: 2px; +} -table.diff { - width: 100%; +.swfupload { + margin: 5px 10px; + vertical-align: middle; } -table.diff col.content { - width: 50%; +/* table.fixed column width */ +table.fixed { + table-layout: fixed; } -table.diff tr { - background-color: transparent; +.fixed .column-date, +.fixed .column-parent, +.fixed .column-visible, +.fixed .column-links { + width: 10%; } -table.diff td, table.diff th { - padding: .5em; - font-family: monospace; - border: none; +.fixed .column-response, +.fixed .column-author, +.fixed .column-categories, +.fixed .column-tags, +.fixed .column-rel, +.fixed .column-role { + width: 15%; } -table.diff .diff-deletedline del, table.diff .diff-addedline ins { - text-decoration: none; +.fixed .column-comments { + width: 4em; } -#wp-word-count { - display: block; +.fixed .column-slug { + width: 25%; } -fieldset { - border: 0; - padding: 0; - margin: 0; +.fixed .column-posts { + width: 10%; } -.info-box { - top: 100px; - left: 50%; - margin-left: -225px; - height: 300px; - width: 450px; - border: 5px solid #ddd; - background: #f8f8f8; - position: absolute; - padding: 15px 15px 10px; - z-index: 1000; - display: none; +.fixed .column-icon { + width: 80px; } -.info-box .submit { - position: absolute; - bottom: 15px; - width: 450px; - padding: 15px 0 0; +#commentstatusdiv .fixed .column-author, +#comments-form .fixed .column-author, +#commentstatusdiv .fixed .column-date { + width: 20%; } -.info-box .gears-img { - float: right; - margin: 10px; +.widefat th, +.widefat td { + overflow: hidden; } -.info-box-title { - line-height: 2; - margin: 0; - padding: 0 7px; +.widefat th { + text-shadow: rgba(255,255,255,0.8) 0 1px 0; } -#wp_editbtns { - padding: 2px; - position: absolute; - display: none; - z-index: 999998; +.icon32 { + float: left; + height: 36px; + margin: 14px 6px 0 0; + width: 36px; } -#wp_editimgbtn, #wp_delimgbtn { - margin: 2px; - padding: 2px; - border: 1px solid #999; - background-color: #eee; - -moz-border-radius: 3px; - -khtml-border-radius: 3px; - -webkit-border-radius: 3px; - border-radius: 3px; +.key-labels label { + line-height: 24px; } -#wp_editimgbtn:hover, #wp_delimgbtn:hover { - border-color: #555; - background-color: #ccc; +.subtitle { + font-size: 0.75em; + line-height: 1; + padding-left: 25px; } diff --git a/wp-app.php b/wp-app.php index 8244dab3..15d924ab 100644 --- a/wp-app.php +++ b/wp-app.php @@ -46,8 +46,9 @@ $app_logging = 0; $always_authenticate = 1; /** - * log_app() - Writes logging info to a file. + * Writes logging info to a file. * + * @since 2.2.0 * @uses $app_logging * @package WordPress * @subpackage Logging @@ -67,16 +68,7 @@ function log_app($label,$msg) { if ( !function_exists('wp_set_current_user') ) : /** - * wp_set_current_user() - Sets the current WordPress User - * - * Pluggable function which is also found in pluggable.php. - * - * @see wp-includes/pluggable.php Documentation for this function. - * @uses $current_user Global of current user to test whether $id is the same. - * - * @param int $id The user's ID - * @param string $name Optional. The username of the user. - * @return WP_User Current user's User object + * @ignore */ function wp_set_current_user($id, $name = '') { global $current_user; @@ -91,10 +83,12 @@ function wp_set_current_user($id, $name = '') { endif; /** - * wa_posts_where_include_drafts_filter() - Filter to add more post statuses + * Filter to add more post statuses. * - * @param string $where SQL statement to filter - * @return string Filtered SQL statement with added post_status for where clause + * @since 2.2.0 + * + * @param string $where SQL statement to filter. + * @return string Filtered SQL statement with added post_status for where clause. */ function wa_posts_where_include_drafts_filter($where) { $where = str_replace("post_status = 'publish'","post_status = 'publish' OR post_status = 'future' OR post_status = 'draft' OR post_status = 'inherit'", $where); @@ -104,37 +98,150 @@ function wa_posts_where_include_drafts_filter($where) { add_filter('posts_where', 'wa_posts_where_include_drafts_filter'); /** - * @internal - * Left undocumented to work on later. If you want to finish, then please do so. + * WordPress AtomPub API implementation. * * @package WordPress * @subpackage Publishing + * @since 2.2.0 */ class AtomServer { + /** + * ATOM content type. + * + * @since 2.2.0 + * @var string + */ var $ATOM_CONTENT_TYPE = 'application/atom+xml'; + + /** + * Categories ATOM content type. + * + * @since 2.2.0 + * @var string + */ var $CATEGORIES_CONTENT_TYPE = 'application/atomcat+xml'; + + /** + * Service ATOM content type. + * + * @since 2.3.0 + * @var string + */ var $SERVICE_CONTENT_TYPE = 'application/atomsvc+xml'; + /** + * ATOM XML namespace. + * + * @since 2.3.0 + * @var string + */ var $ATOM_NS = 'http://www.w3.org/2005/Atom'; + + /** + * ATOMPUB XML namespace. + * + * @since 2.3.0 + * @var string + */ var $ATOMPUB_NS = 'http://www.w3.org/2007/app'; + /** + * Entries path. + * + * @since 2.2.0 + * @var string + */ var $ENTRIES_PATH = "posts"; + + /** + * Categories path. + * + * @since 2.2.0 + * @var string + */ var $CATEGORIES_PATH = "categories"; + + /** + * Media path. + * + * @since 2.2.0 + * @var string + */ var $MEDIA_PATH = "attachments"; + + /** + * Entry path. + * + * @since 2.2.0 + * @var string + */ var $ENTRY_PATH = "post"; + + /** + * Service path. + * + * @since 2.2.0 + * @var string + */ var $SERVICE_PATH = "service"; + + /** + * Media single path. + * + * @since 2.2.0 + * @var string + */ var $MEDIA_SINGLE_PATH = "attachment"; + /** + * ATOMPUB parameters. + * + * @since 2.2.0 + * @var array + */ var $params = array(); + + /** + * Supported ATOMPUB media types. + * + * @since 2.3.0 + * @var array + */ var $media_content_types = array('image/*','audio/*','video/*'); + + /** + * ATOMPUB content type(s). + * + * @since 2.2.0 + * @var array + */ var $atom_content_types = array('application/atom+xml'); + /** + * ATOMPUB methods. + * + * @since 2.2.0 + * @var unknown_type + */ var $selectors = array(); - // support for head + /** + * Whether to do output. + * + * Support for head. + * + * @since 2.2.0 + * @var bool + */ var $do_output = true; + /** + * PHP4 constructor - Sets up object properties. + * + * @since 2.2.0 + * @return AtomServer + */ function AtomServer() { $this->script_name = array_pop(explode('/',$_SERVER['SCRIPT_NAME'])); @@ -169,13 +276,18 @@ class AtomServer { ); } + /** + * Handle ATOMPUB request. + * + * @since 2.2.0 + */ function handle_request() { global $always_authenticate; if( !empty( $_SERVER['ORIG_PATH_INFO'] ) ) $path = $_SERVER['ORIG_PATH_INFO']; else - $path = $_SERVER['PATH_INFO']; + $path = $_SERVER['PATH_INFO']; $method = $_SERVER['REQUEST_METHOD']; @@ -226,6 +338,11 @@ class AtomServer { $this->not_found(); } + /** + * Retrieve XML for ATOMPUB service. + * + * @since 2.2.0 + */ function get_service() { log_app('function','get_service()'); @@ -261,6 +378,11 @@ EOD; $this->output($service_doc, $this->SERVICE_CONTENT_TYPE); } + /** + * Retrieve categories list in XML format. + * + * @since 2.2.0 + */ function get_categories_xml() { log_app('function','get_categories_xml()'); @@ -284,8 +406,10 @@ EOD; $this->output($output, $this->CATEGORIES_CONTENT_TYPE); } - /* - * Create Post (No arguments) + /** + * Create new post. + * + * @since 2.2.0 */ function create_post() { global $blog_id, $user_ID; @@ -357,6 +481,13 @@ EOD; $this->created($postID, $output); } + /** + * Retrieve post. + * + * @since 2.2.0 + * + * @param int $postID Post ID. + */ function get_post($postID) { global $entry; @@ -370,6 +501,13 @@ EOD; } + /** + * Update post. + * + * @since 2.2.0 + * + * @param int $postID Post ID. + */ function put_post($postID) { // checked for valid content-types (atom+xml) // quick check and exit @@ -419,6 +557,13 @@ EOD; $this->ok(); } + /** + * Remove post. + * + * @since 2.2.0 + * + * @param int $postID Post ID. + */ function delete_post($postID) { // check for not found @@ -444,7 +589,14 @@ EOD; } - function get_attachment($postID = NULL) { + /** + * Retrieve attachment. + * + * @since 2.2.0 + * + * @param int $postID Optional. Post ID. + */ + function get_attachment($postID = null) { if( !current_user_can( 'upload_files' ) ) $this->auth_required( __( 'Sorry, you do not have permission to upload files.' ) ); @@ -458,6 +610,11 @@ EOD; } } + /** + * Create new attachment. + * + * @since 2.2.0 + */ function create_attachment() { $type = $this->get_accepted_content_type(); @@ -466,7 +623,7 @@ EOD; $this->auth_required(__('You do not have permission to upload files.')); $fp = fopen("php://input", "rb"); - $bits = NULL; + $bits = null; while(!feof($fp)) { $bits .= fread($fp, 4096); } @@ -512,6 +669,13 @@ EOD; log_app('function',"create_attachment($postID)"); } + /** + * Update attachment. + * + * @since 2.2.0 + * + * @param int $postID Post ID. + */ function put_attachment($postID) { // checked for valid content-types (atom+xml) // quick check and exit @@ -552,6 +716,13 @@ EOD; $this->ok(); } + /** + * Remove attachment. + * + * @since 2.2.0 + * + * @param int $postID Post ID. + */ function delete_attachment($postID) { log_app('function',"delete_attachment($postID). File '$location' deleted."); @@ -583,6 +754,13 @@ EOD; $this->ok(); } + /** + * Retrieve attachment from post. + * + * @since 2.2.0 + * + * @param int $postID Post ID. + */ function get_file($postID) { // check for not found @@ -614,6 +792,13 @@ EOD; exit; } + /** + * Upload file to blog and add attachment to post. + * + * @since 2.2.0 + * + * @param int $postID Post ID. + */ function put_file($postID) { // first check if user can upload @@ -662,7 +847,15 @@ EOD; $this->ok(); } - function get_entries_url($page = NULL) { + /** + * Retrieve entries URL. + * + * @since 2.2.0 + * + * @param int $page Page ID. + * @return string + */ + function get_entries_url($page = null) { if($GLOBALS['post_type'] == 'attachment') { $path = $this->MEDIA_PATH; } else { @@ -675,19 +868,47 @@ EOD; return $url; } - function the_entries_url($page = NULL) { + /** + * Display entries URL. + * + * @since 2.2.0 + * + * @param int $page Page ID. + */ + function the_entries_url($page = null) { echo $this->get_entries_url($page); } + /** + * Retrieve categories URL. + * + * @since 2.2.0 + * + * @param mixed $deprecated Optional, not used. + * @return string + */ function get_categories_url($deprecated = '') { return $this->app_base . $this->CATEGORIES_PATH; } + /** + * Display category URL. + * + * @since 2.2.0 + */ function the_categories_url() { echo $this->get_categories_url(); } - function get_attachments_url($page = NULL) { + /** + * Retrieve attachment URL. + * + * @since 2.2.0 + * + * @param int $page Page ID. + * @return string + */ + function get_attachments_url($page = null) { $url = $this->app_base . $this->MEDIA_PATH; if(isset($page) && is_int($page)) { $url .= "/$page"; @@ -695,15 +916,37 @@ EOD; return $url; } - function the_attachments_url($page = NULL) { + /** + * Display attachment URL. + * + * @since 2.2.0 + * + * @param int $page Page ID. + */ + function the_attachments_url($page = null) { echo $this->get_attachments_url($page); } + /** + * Retrieve service URL. + * + * @since 2.3.0 + * + * @return string + */ function get_service_url() { return $this->app_base . $this->SERVICE_PATH; } - function get_entry_url($postID = NULL) { + /** + * Retrieve entry URL. + * + * @since 2.7.0 + * + * @param int $postID Post ID. + * @return string + */ + function get_entry_url($postID = null) { if(!isset($postID)) { global $post; $postID = (int) $post->ID; @@ -715,11 +958,26 @@ EOD; return $url; } - function the_entry_url($postID = NULL) { + /** + * Display entry URL. + * + * @since 2.7.0 + * + * @param int $postID Post ID. + */ + function the_entry_url($postID = null) { echo $this->get_entry_url($postID); } - function get_media_url($postID = NULL) { + /** + * Retrieve media URL. + * + * @since 2.2.0 + * + * @param int $postID Post ID. + * @return string + */ + function get_media_url($postID = null) { if(!isset($postID)) { global $post; $postID = (int) $post->ID; @@ -731,10 +989,24 @@ EOD; return $url; } - function the_media_url($postID = NULL) { + /** + * Display the media URL. + * + * @since 2.2.0 + * + * @param int $postID Post ID. + */ + function the_media_url($postID = null) { echo $this->get_media_url($postID); } + /** + * Set the current entry to post ID. + * + * @since 2.2.0 + * + * @param int $postID Post ID. + */ function set_current_entry($postID) { global $entry; log_app('function',"set_current_entry($postID)"); @@ -752,19 +1024,44 @@ EOD; return; } + /** + * Display posts XML. + * + * @since 2.2.0 + * + * @param int $page Optional. Page ID. + * @param string $post_type Optional, default is 'post'. Post Type. + */ function get_posts($page = 1, $post_type = 'post') { log_app('function',"get_posts($page, '$post_type')"); $feed = $this->get_feed($page, $post_type); $this->output($feed); } + /** + * Display attachment XML. + * + * @since 2.2.0 + * + * @param int $page Page ID. + * @param string $post_type Optional, default is 'attachment'. Post type. + */ function get_attachments($page = 1, $post_type = 'attachment') { - log_app('function',"get_attachments($page, '$post_type')"); - $GLOBALS['post_type'] = $post_type; - $feed = $this->get_feed($page, $post_type); - $this->output($feed); + log_app('function',"get_attachments($page, '$post_type')"); + $GLOBALS['post_type'] = $post_type; + $feed = $this->get_feed($page, $post_type); + $this->output($feed); } + /** + * Retrieve feed XML. + * + * @since 2.2.0 + * + * @param int $page Page ID. + * @param string $post_type Optional, default is post. Post type. + * @return string + */ function get_feed($page = 1, $post_type = 'post') { global $post, $wp, $wp_query, $posts, $wpdb, $blog_id; log_app('function',"get_feed($page, '$post_type')"); @@ -822,6 +1119,15 @@ EOD; return $feed; } + /** + * Display entry XML. + * + * @since 2.2.0 + * + * @param int $postID Post ID. + * @param string $post_type Optional, default is post. Post type. + * @return string. + */ function get_entry($postID, $post_type = 'post') { log_app('function',"get_entry($postID, '$post_type')"); ob_start(); @@ -849,6 +1155,11 @@ EOD; return $entry; } + /** + * Display post content XML. + * + * @since 2.3.0 + */ function echo_entry() { ?> @@ -886,6 +1197,11 @@ list($content_type, $content) = prep_atom_text_construct(get_the_content()); ?> exit; } + /** + * Set 'No Content' (204) status header. + * + * @since 2.2.0 + */ function no_content() { log_app('Status','204: No Content'); header('Content-Type: text/plain'); @@ -901,6 +1222,13 @@ list($content_type, $content) = prep_atom_text_construct(get_the_content()); ?> exit; } + /** + * Display 'Internal Server Error' (500) status header. + * + * @since 2.2.0 + * + * @param string $msg Optional. Status string. + */ function internal_error($msg = 'Internal Server Error') { log_app('Status','500: Server Error'); header('Content-Type: text/plain'); @@ -909,6 +1237,11 @@ list($content_type, $content) = prep_atom_text_construct(get_the_content()); ?> exit; } + /** + * Set 'Bad Request' (400) status header. + * + * @since 2.2.0 + */ function bad_request() { log_app('Status','400: Bad Request'); header('Content-Type: text/plain'); @@ -916,6 +1249,11 @@ list($content_type, $content) = prep_atom_text_construct(get_the_content()); ?> exit; } + /** + * Set 'Length Required' (411) status header. + * + * @since 2.2.0 + */ function length_required() { log_app('Status','411: Length Required'); header("HTTP/1.1 411 Length Required"); @@ -924,6 +1262,11 @@ list($content_type, $content) = prep_atom_text_construct(get_the_content()); ?> exit; } + /** + * Set 'Unsupported Media Type' (415) status header. + * + * @since 2.2.0 + */ function invalid_media() { log_app('Status','415: Unsupported Media Type'); header("HTTP/1.1 415 Unsupported Media Type"); @@ -931,6 +1274,11 @@ list($content_type, $content) = prep_atom_text_construct(get_the_content()); ?> exit; } + /** + * Set 'Forbidden' (403) status header. + * + * @since 2.6.0 + */ function forbidden($reason='') { log_app('Status','403: Forbidden'); header('Content-Type: text/plain'); @@ -939,6 +1287,11 @@ list($content_type, $content) = prep_atom_text_construct(get_the_content()); ?> exit; } + /** + * Set 'Not Found' (404) status header. + * + * @since 2.2.0 + */ function not_found() { log_app('Status','404: Not Found'); header('Content-Type: text/plain'); @@ -946,6 +1299,11 @@ list($content_type, $content) = prep_atom_text_construct(get_the_content()); ?> exit; } + /** + * Set 'Not Allowed' (405) status header. + * + * @since 2.2.0 + */ function not_allowed($allow) { log_app('Status','405: Not Allowed'); header('Allow: ' . join(',', $allow)); @@ -953,6 +1311,11 @@ list($content_type, $content) = prep_atom_text_construct(get_the_content()); ?> exit; } + /** + * Display Redirect (302) content and set status headers. + * + * @since 2.3.0 + */ function redirect($url) { log_app('Status','302: Redirect'); @@ -978,7 +1341,11 @@ EOD; } - + /** + * Set 'Client Error' (400) status header. + * + * @since 2.2.0 + */ function client_error($msg = 'Client Error') { log_app('Status','400: Client Error'); header('Content-Type: text/plain'); @@ -986,6 +1353,13 @@ EOD; exit; } + /** + * Set created status headers (201). + * + * Sets the 'content-type', 'content-location', and 'location'. + * + * @since 2.2.0 + */ function created($post_ID, $content, $post_type = 'post') { log_app('created()::$post_ID',"$post_ID, $post_type"); $edit = $this->get_entry_url($post_ID); @@ -1006,12 +1380,19 @@ EOD; exit; } + /** + * Set 'Auth Required' (401) headers. + * + * @since 2.2.0 + * + * @param string $msg Status header content and HTML content. + */ function auth_required($msg) { log_app('Status','401: Auth Required'); nocache_headers(); header('WWW-Authenticate: Basic realm="WordPress Atom Protocol"'); header("HTTP/1.1 401 $msg"); - header('Status: ' . $msg); + header('Status: 401 ' . $msg); header('Content-Type: text/html'); $content = << @@ -1030,6 +1411,14 @@ EOD; exit; } + /** + * Display XML and set headers with content type. + * + * @since 2.2.0 + * + * @param string $xml Display feed content. + * @param string $ctype Optional, default is 'atom+xml'. Feed content type. + */ function output($xml, $ctype = 'application/atom+xml') { status_header('200'); $xml = ''."\n".$xml; @@ -1044,6 +1433,13 @@ EOD; exit; } + /** + * Sanitize content for database usage. + * + * @since 2.2.0 + * + * @param array $array Sanitize array and multi-dimension array. + */ function escape(&$array) { global $wpdb; @@ -1058,8 +1454,12 @@ EOD; } } - /* - * Access credential through various methods and perform login + /** + * Access credential through various methods and perform login. + * + * @since 2.2.0 + * + * @return bool */ function authenticate() { log_app("authenticate()",print_r($_ENV, true)); @@ -1069,6 +1469,11 @@ EOD; if(isset($_SERVER['HTTP_AUTHORIZATION'])) { list($_SERVER['PHP_AUTH_USER'], $_SERVER['PHP_AUTH_PW']) = explode(':', base64_decode(substr($_SERVER['HTTP_AUTHORIZATION'], 6))); + } else if (isset($_SERVER['REDIRECT_REMOTE_USER'])) { + // Workaround for setups that do not forward HTTP_AUTHORIZATION + // See http://trac.wordpress.org/ticket/7361 + list($_SERVER['PHP_AUTH_USER'], $_SERVER['PHP_AUTH_PW']) = + explode(':', base64_decode(substr($_SERVER['REDIRECT_REMOTE_USER'], 6))); } // If Basic Auth is working... @@ -1085,7 +1490,15 @@ EOD; return false; } - function get_accepted_content_type($types = NULL) { + /** + * Retrieve accepted content types. + * + * @since 2.2.0 + * + * @param array $types Optional. Content Types. + * @return string + */ + function get_accepted_content_type($types = null) { if(!isset($types)) { $types = $this->media_content_types; @@ -1111,6 +1524,11 @@ EOD; $this->invalid_media(); } + /** + * Process conditionals for posts. + * + * @since 2.2.0 + */ function process_conditionals() { if(empty($this->params)) return; @@ -1154,31 +1572,52 @@ EOD; } } + /** + * Convert RFC3339 time string to timestamp. + * + * @since 2.3.0 + * + * @param string $str String to time. + * @return bool|int false if format is incorrect. + */ function rfc3339_str2time($str) { - $match = false; - if(!preg_match("/(\d{4}-\d{2}-\d{2})T(\d{2}\:\d{2}\:\d{2})\.?\d{0,3}(Z|[+-]+\d{2}\:\d{2})/", $str, $match)) + $match = false; + if(!preg_match("/(\d{4}-\d{2}-\d{2})T(\d{2}\:\d{2}\:\d{2})\.?\d{0,3}(Z|[+-]+\d{2}\:\d{2})/", $str, $match)) return false; - if($match[3] == 'Z') + if($match[3] == 'Z') $match[3] == '+0000'; - return strtotime($match[1] . " " . $match[2] . " " . $match[3]); + return strtotime($match[1] . " " . $match[2] . " " . $match[3]); } + /** + * Retrieve published time to display in XML. + * + * @since 2.3.0 + * + * @param string $published Time string. + * @return string + */ function get_publish_time($published) { - $pubtime = $this->rfc3339_str2time($published); + $pubtime = $this->rfc3339_str2time($published); - if(!$pubtime) { + if(!$pubtime) { return array(current_time('mysql'),current_time('mysql',1)); - } else { + } else { return array(date("Y-m-d H:i:s", $pubtime), gmdate("Y-m-d H:i:s", $pubtime)); - } + } } } +/** + * AtomServer + * @var AtomServer + * @global object $server + */ $server = new AtomServer(); $server->handle_request(); diff --git a/wp-atom.php b/wp-atom.php index 9e20eb68..f7221f3f 100644 --- a/wp-atom.php +++ b/wp-atom.php @@ -1,21 +1,12 @@ \ No newline at end of file diff --git a/wp-comments-post.php b/wp-comments-post.php index 96ab8947..64cc8e32 100644 --- a/wp-comments-post.php +++ b/wp-comments-post.php @@ -32,14 +32,16 @@ if ( empty($status->comment_status) ) { exit; } -$comment_author = trim(strip_tags($_POST['author'])); -$comment_author_email = trim($_POST['email']); -$comment_author_url = trim($_POST['url']); -$comment_content = trim($_POST['comment']); +$comment_author = ( isset($_POST['author']) ) ? trim(strip_tags($_POST['author'])) : null; +$comment_author_email = ( isset($_POST['email']) ) ? trim($_POST['email']) : null; +$comment_author_url = ( isset($_POST['url']) ) ? trim($_POST['url']) : null; +$comment_content = ( isset($_POST['comment']) ) ? trim($_POST['comment']) : null; // If the user is logged in $user = wp_get_current_user(); if ( $user->ID ) { + if ( empty( $user->display_name ) ) + $user->display_name=$user->user_login; $comment_author = $wpdb->escape($user->display_name); $comment_author_email = $wpdb->escape($user->user_email); $comment_author_url = $wpdb->escape($user->user_url); @@ -66,7 +68,9 @@ if ( get_option('require_name_email') && !$user->ID ) { if ( '' == $comment_content ) wp_die( __('Error: please type a comment.') ); -$commentdata = compact('comment_post_ID', 'comment_author', 'comment_author_email', 'comment_author_url', 'comment_content', 'comment_type', 'user_ID'); +$comment_parent = isset($_POST['comment_parent']) ? absint($_POST['comment_parent']) : 0; + +$commentdata = compact('comment_post_ID', 'comment_author', 'comment_author_email', 'comment_author_url', 'comment_content', 'comment_type', 'comment_parent', 'user_ID'); $comment_id = wp_new_comment( $commentdata ); @@ -77,7 +81,7 @@ if ( !$user->ID ) { setcookie('comment_author_url_' . COOKIEHASH, clean_url($comment->comment_author_url), time() + 30000000, COOKIEPATH, COOKIE_DOMAIN); } -$location = ( empty($_POST['redirect_to']) ? get_permalink($comment_post_ID) : $_POST['redirect_to'] ) . '#comment-' . $comment_id; +$location = empty($_POST['redirect_to']) ? get_comment_link($comment_id) : $_POST['redirect_to'] . '#comment-' . $comment_id; $location = apply_filters('comment_post_redirect', $location, $comment); wp_redirect($location); diff --git a/wp-commentsrss2.php b/wp-commentsrss2.php index 9c3b230f..1c146b14 100644 --- a/wp-commentsrss2.php +++ b/wp-commentsrss2.php @@ -1,23 +1,12 @@ \ No newline at end of file diff --git a/wp-config-sample.php b/wp-config-sample.php index f557e6d0..c0013a38 100644 --- a/wp-config-sample.php +++ b/wp-config-sample.php @@ -1,31 +1,76 @@ diff --git a/wp-content/plugins/akismet/akismet.php b/wp-content/plugins/akismet/akismet.php index 21933883..20034734 100644 --- a/wp-content/plugins/akismet/akismet.php +++ b/wp-content/plugins/akismet/akismet.php @@ -2,8 +2,8 @@ /* Plugin Name: Akismet Plugin URI: http://akismet.com/ -Description: Akismet checks your comments against the Akismet web service to see if they look like spam or not. You need a WordPress.com API key to use it. You can review the spam it catches under "Comments." To show off your Akismet stats just put <?php akismet_counter(); ?> in your template. See also: WP Stats plugin. -Version: 2.1.8 +Description: Akismet checks your comments against the Akismet web service to see if they look like spam or not. You need a WordPress.com API key to use it. You can review the spam it catches under "Comments." To show off your Akismet stats just put <?php akismet_counter(); ?> in your template. See also: WP Stats plugin. +Version: 2.2.3 Author: Matt Mullenweg Author URI: http://ma.tt/ */ @@ -21,9 +21,19 @@ function akismet_init() { $akismet_api_port = 80; add_action('admin_menu', 'akismet_config_page'); + add_action('admin_menu', 'akismet_stats_page'); } add_action('init', 'akismet_init'); +function akismet_admin_init() { + if ( function_exists( 'get_plugin_page_hook' ) ) + $hook = get_plugin_page_hook( 'akismet-stats-display', 'index.php' ); + else + $hook = 'dashboard_page_akismet-stats-display'; + add_action('admin_head-'.$hook, 'akismet_stats_script'); +} +add_action('admin_init', 'akismet_admin_init'); + if ( !function_exists('wp_nonce_field') ) { function akismet_nonce_field($action = -1) { return; } $akismet_nonce = -1; @@ -137,6 +147,43 @@ function akismet_conf() { + +
    + +
    + comment_ID ); } +add_filter( 'comment_spam_to_approved', 'akismet_spamtoham' ); + // Total spam in queue // get_option( 'akismet_spam_count' ) is the total caught ever function akismet_spam_count( $type = false ) { @@ -660,11 +710,14 @@ add_action('activity_box_end', 'akismet_stats'); // WP 2.5+ function akismet_rightnow() { - global $submenu; - if ( isset( $submenu['edit-comments.php'] ) ) - $link = 'edit-comments.php'; + global $submenu, $wp_db_version; + + if ( 8645 < $wp_db_version ) // 2.7 + $link = 'edit-comments.php?comment_status=spam'; + elseif ( isset( $submenu['edit-comments.php'] ) ) + $link = 'edit-comments.php?page=akismet-admin'; else - $link = 'edit.php'; + $link = 'edit.php?page=akismet-admin'; if ( $count = get_option('akismet_spam_count') ) { $intro = sprintf( __ngettext( @@ -681,9 +734,9 @@ function akismet_rightnow() { 'and there\'s %1$s comment in your spam queue right now.', 'and there are %1$s comments in your spam queue right now.', $queue_count - ), number_format_i18n( $queue_count ), clean_url("$link?page=akismet-admin") ); + ), number_format_i18n( $queue_count ), clean_url($link) ); } else { - $queue_text = sprintf( __( "but there's nothing in your spam queue at the moment." ), clean_url("$link?page=akismet-admin") ); + $queue_text = sprintf( __( "but there's nothing in your spam queue at the moment." ), clean_url($link) ); } $text = sprintf( _c( '%1$s %2$s|akismet_rightnow' ), $intro, $queue_text ); diff --git a/wp-content/plugins/hello.php b/wp-content/plugins/hello.php index abc5f97b..08a01bbf 100644 --- a/wp-content/plugins/hello.php +++ b/wp-content/plugins/hello.php @@ -1,4 +1,9 @@ $chosen

    "; } @@ -58,12 +66,11 @@ function dolly_css() { "; @@ -71,4 +78,4 @@ function dolly_css() { add_action('admin_head', 'dolly_css'); -?> \ No newline at end of file +?> diff --git a/wp-content/themes/classic/comments-popup.php b/wp-content/themes/classic/comments-popup.php index 4e0a6057..fdcb8932 100644 --- a/wp-content/themes/classic/comments-popup.php +++ b/wp-content/themes/classic/comments-popup.php @@ -1,9 +1,9 @@ - +/** + * @package WordPress + * @subpackage Classic_Theme + */ +?> <?php echo get_option('blogname'); ?> - <?php echo sprintf(__("Comments on %s"), the_title('','',false)); ?> @@ -19,6 +19,13 @@ while( have_posts()) : the_post();

    + +

    RSS feed for comments on this post."); ?>

    @@ -33,7 +40,7 @@ $commenter = wp_get_current_commenter(); extract($commenter); $comments = get_approved_comments($id); $commentstatus = get_post($id); -if (!empty($commentstatus->post_password) && $_COOKIE['wp-postpass_'. COOKIEHASH] != $commentstatus->post_password) { // and it doesn't match the cookie +if ( post_password_required($commentstatus) ) { // and it doesn't match the cookie echo(get_the_password_form()); } else { ?> @@ -42,7 +49,7 @@ if (!empty($commentstatus->post_password) && $_COOKIE['wp-postpass_'. COOKIEHASH
  • -

    @

    +

    @

  • @@ -57,13 +64,11 @@ if (!empty($commentstatus->post_password) && $_COOKIE['wp-postpass_'. COOKIEHASH
    -

    '.$user_identity.''); ?>

    +

    '.$user_identity.''); ?>

    - - " />

    @@ -84,6 +89,8 @@ if (!empty($commentstatus->post_password) && $_COOKIE['wp-postpass_'. COOKIEHASH

    + + " /> " />

    ID); ?> @@ -97,8 +104,11 @@ if (!empty($commentstatus->post_password) && $_COOKIE['wp-postpass_'. COOKIEHASH
    +

    Sorry, no posts matched your criteria.

    + diff --git a/wp-content/themes/classic/comments.php b/wp-content/themes/classic/comments.php index bf02bedd..b3fe7291 100644 --- a/wp-content/themes/classic/comments.php +++ b/wp-content/themes/classic/comments.php @@ -1,4 +1,10 @@ -post_password) && $_COOKIE['wp-postpass_' . COOKIEHASH] != $post->post_password) : ?> +

    @@ -12,10 +18,10 @@
      -
    1. +
    2. id="comment-"> -

      @

      +

      @

    3. @@ -43,7 +49,7 @@ -

      '.$user_identity.''); ?>

      +

      '.$user_identity.''); ?>

      diff --git a/wp-content/themes/classic/footer.php b/wp-content/themes/classic/footer.php index 0894f78e..819ed428 100644 --- a/wp-content/themes/classic/footer.php +++ b/wp-content/themes/classic/footer.php @@ -1,3 +1,9 @@ +
diff --git a/wp-content/themes/classic/functions.php b/wp-content/themes/classic/functions.php index a63850cc..40d4a46f 100644 --- a/wp-content/themes/classic/functions.php +++ b/wp-content/themes/classic/functions.php @@ -1,10 +1,14 @@ '
  • ', - 'after_widget' => '
  • ', - 'before_title' => '', - 'after_title' => '', - )); + 'before_widget' => '
  • ', + 'after_widget' => '
  • ', + 'before_title' => '', + 'after_title' => '', + )); ?> diff --git a/wp-content/themes/classic/header.php b/wp-content/themes/classic/header.php index 4a3e0b4f..e08c95d0 100644 --- a/wp-content/themes/classic/header.php +++ b/wp-content/themes/classic/header.php @@ -1,10 +1,16 @@ + > - <?php bloginfo('name'); ?><?php wp_title(); ?> + <?php wp_title('«', true, 'right'); ?> <?php bloginfo('name'); ?> + + diff --git a/wp-content/themes/default/image.php b/wp-content/themes/default/image.php index 5e039806..80dad8ac 100644 --- a/wp-content/themes/default/image.php +++ b/wp-content/themes/default/image.php @@ -1,4 +1,11 @@ - +
    @@ -8,7 +15,7 @@

    post_parent); ?> »

    ID, 'medium' ); ?>

    -
    post_excerpt) ) the_excerpt(); // this is the "caption" ?>
    +
    post_excerpt) ) the_excerpt(); // this is the "caption" ?>
    Read the rest of this entry »

    '); ?> diff --git a/wp-content/themes/default/images/header-img.php b/wp-content/themes/default/images/header-img.php index 75629d70..50bd3c37 100644 --- a/wp-content/themes/default/images/header-img.php +++ b/wp-content/themes/default/images/header-img.php @@ -1,5 +1,10 @@ +
    @@ -6,7 +12,7 @@ -
    +
    id="post-">

    @@ -28,7 +34,7 @@

    Not Found

    Sorry, but you are looking for something that isn't here.

    - + diff --git a/wp-content/themes/default/links.php b/wp-content/themes/default/links.php index e253e09b..81fdc008 100644 --- a/wp-content/themes/default/links.php +++ b/wp-content/themes/default/links.php @@ -1,4 +1,9 @@ +
    diff --git a/wp-content/themes/default/search.php b/wp-content/themes/default/search.php index 910b65ec..3e93ffce 100644 --- a/wp-content/themes/default/search.php +++ b/wp-content/themes/default/search.php @@ -1,4 +1,10 @@ - +
    @@ -14,7 +20,7 @@ -
    +
    >

    @@ -31,7 +37,7 @@

    No posts found. Try a different search?

    - + diff --git a/wp-content/themes/default/searchform.php b/wp-content/themes/default/searchform.php deleted file mode 100644 index 300a1c4b..00000000 --- a/wp-content/themes/default/searchform.php +++ /dev/null @@ -1,6 +0,0 @@ - - -
    - -
    - diff --git a/wp-content/themes/default/sidebar.php b/wp-content/themes/default/sidebar.php index 36dea86f..79c31229 100644 --- a/wp-content/themes/default/sidebar.php +++ b/wp-content/themes/default/sidebar.php @@ -1,9 +1,15 @@ +