Compare commits

...

97 Commits
6.3 ... 3.1.2

Author SHA1 Message Date
ryan
75d19ef32b 3.1.2
git-svn-id: http://svn.automattic.com/wordpress/tags/3.1.2@17716 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2011-04-26 18:40:40 +00:00
ryan
61e239a533 Bump
git-svn-id: http://svn.automattic.com/wordpress/branches/3.1@17712 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2011-04-26 18:30:09 +00:00
ryan
ad2b485a1e Validate post status against capabilities in press this. Props nacin. for 3.1
git-svn-id: http://svn.automattic.com/wordpress/branches/3.1@17710 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2011-04-26 18:06:50 +00:00
ryan
e13b1c82de Bump
git-svn-id: http://svn.automattic.com/wordpress/branches/3.1@17707 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2011-04-26 15:47:16 +00:00
nacin
fb4caf3e06 Add the filter in display_rows, rather than _display_rows. for 3.1.
git-svn-id: http://svn.automattic.com/wordpress/branches/3.1@17705 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2011-04-26 10:20:04 +00:00
nacin
b4a7b06241 Remove vestige code, prevent over-escaping of post titles when using Quick Edit for hierarchical post types. fixes #17218 for the 3.1 branch.
git-svn-id: http://svn.automattic.com/wordpress/branches/3.1@17704 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2011-04-26 10:19:16 +00:00
nacin
3aa1494dc6 Apply esc_html properly in Walker_PageDropdown. fixes #17217 for the 3.1 branch.
git-svn-id: http://svn.automattic.com/wordpress/branches/3.1@17685 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2011-04-22 18:43:00 +00:00
ryan
5c7e289e0f Use proper prefix in query. Fixes user queries ordered by post count. Props ziofix, ericmann. fixes #17123 for 3.1
git-svn-id: http://svn.automattic.com/wordpress/branches/3.1@17635 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2011-04-13 17:02:52 +00:00
ryan
d4ad475e82 There is not a NOT operator. Props scribu. fixes #17054 for 3.1
git-svn-id: http://svn.automattic.com/wordpress/branches/3.1@17611 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2011-04-06 16:09:13 +00:00
ryan
aaab3bbdbe Set is_* flags for AND taxonomy queries. fixes #17054 for 3.1
git-svn-id: http://svn.automattic.com/wordpress/branches/3.1@17607 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2011-04-05 18:50:28 +00:00
ryan
56c6950788 Bump
git-svn-id: http://svn.automattic.com/wordpress/branches/3.1@17605 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2011-04-05 18:17:34 +00:00
ryan
335cffab4e Bump
git-svn-id: http://svn.automattic.com/wordpress/branches/3.1@17594 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2011-04-04 15:38:54 +00:00
ryan
ca878a5a21 Bump
git-svn-id: http://svn.automattic.com/wordpress/branches/3.1@17586 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2011-04-01 19:44:37 +00:00
ryan
bc052a10bf esc_url_raw() when doing urlencode()
git-svn-id: http://svn.automattic.com/wordpress/branches/3.1@17585 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2011-04-01 19:36:04 +00:00
ryan
b21b855c52 s/esc_url_raw/esc_url/. Props duck_. For 3.1
git-svn-id: http://svn.automattic.com/wordpress/branches/3.1@17583 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2011-04-01 19:30:28 +00:00
ryan
69eb0bb44d Bump
git-svn-id: http://svn.automattic.com/wordpress/branches/3.1@17572 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2011-03-29 01:22:11 +00:00
ryan
6393921f0b Reduce backtracking in make_clickable() regex. Reduce pcre.recursion_limit to avoid segfaulting. Props hakre. For 3.1.
git-svn-id: http://svn.automattic.com/wordpress/branches/3.1@17571 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2011-03-28 21:39:39 +00:00
ryan
c68f7ef382 Add some nonce checks to the uploaders. Props duck_. For 3.1.
git-svn-id: http://svn.automattic.com/wordpress/branches/3.1@17569 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2011-03-28 21:32:01 +00:00
nacin
b6d689386b Remove two out of date strings from network contextual help. see #16988 for the 3.1 branch.
git-svn-id: http://svn.automattic.com/wordpress/branches/3.1@17567 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2011-03-28 18:01:30 +00:00
nacin
4dd235d1e3 3.1.1 beta 1.
git-svn-id: http://svn.automattic.com/wordpress/branches/3.1@17560 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2011-03-25 21:13:38 +00:00
azaozz
c1315f1aa1 Fix position of submenus when showing avatar, props johnjamesjacoby, see #16667 for 3.1
git-svn-id: http://svn.automattic.com/wordpress/branches/3.1@17559 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2011-03-25 20:33:30 +00:00
azaozz
15629d2e5f Fix discrepancy in the nested loop in the Recent Comments dashboard widget, props ocean90, fixes #16846 for 3.1.1
git-svn-id: http://svn.automattic.com/wordpress/branches/3.1@17557 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2011-03-25 20:13:53 +00:00
ryan
e0c7538280 Parse the meta query again if query vars change. Set a global query_vars_changed flag instead of doing multiple hash creation calls. Props greuben. see #16742 for 3.1
git-svn-id: http://svn.automattic.com/wordpress/branches/3.1@17553 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2011-03-24 16:08:02 +00:00
dd32
ff7a775638 Reinstate [15462] for 3.1; Prevents canonical redirects for custom rewrite rules for taxonomies. See #16627
git-svn-id: http://svn.automattic.com/wordpress/branches/3.1@17549 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2011-03-24 01:18:41 +00:00
ryan
000c091b09 Don't die inside db_connect() if connection fails. Let dead_db() handle it. fixes #16640 for 3.1
git-svn-id: http://svn.automattic.com/wordpress/branches/3.1@17547 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2011-03-23 19:58:03 +00:00
ryan
1e995c979b Don't die for failed db connects during install. Props westi. fixes #16640 for 3.1
git-svn-id: http://svn.automattic.com/wordpress/branches/3.1@17537 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2011-03-23 17:47:20 +00:00
ryan
b2c412ebcc Fix display of oversized custom user/site icons in the admin bar. Props jtsternberg, JohnONolan. see #16667 for 3.1
git-svn-id: http://svn.automattic.com/wordpress/branches/3.1@17533 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2011-03-22 20:43:16 +00:00
ryan
4e71b1a011 Avoid var name conflict in _get_meta_sql(). Fixes type var passed to get_meta_sql filter. Props Rahe, nacin. fixes #16825 for 3.1
git-svn-id: http://svn.automattic.com/wordpress/branches/3.1@17531 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2011-03-22 20:36:20 +00:00
ryan
852860648d Add back compat fields to queried category objects. Props scribu, duck_. fixes #16857 for 3.1
git-svn-id: http://svn.automattic.com/wordpress/branches/3.1@17529 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2011-03-22 20:28:09 +00:00
ryan
b5528f516d Return false instead of WP_Error from get_term_by() if the term does not exist. Makes fetching a term by id consistent with slug and name. Props hakre. fixes #16464 #16717 for 3.1
git-svn-id: http://svn.automattic.com/wordpress/branches/3.1@17527 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2011-03-22 20:07:50 +00:00
nacin
0f785851c8 Add TinyMCE version number. props SergeyBiryukov, fixes #16674 for the 3.1 branch.
git-svn-id: http://svn.automattic.com/wordpress/branches/3.1@17520 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2011-03-10 18:47:36 +00:00
markjaquith
9168d77a75 Correctly handle PATHINFO CPTs and CTs that specify with_front=false. fixes #16807 for 3.1
git-svn-id: http://svn.automattic.com/wordpress/branches/3.1@17519 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2011-03-10 04:25:40 +00:00
markjaquith
fbff9bf162 Make plugin header parsing slightly more liberal (like it was in 3.0), to allow for PHPdoc style headers. props miqrogroove. fixes #16751 for 3.1
git-svn-id: http://svn.automattic.com/wordpress/branches/3.1@17517 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2011-03-09 05:47:25 +00:00
markjaquith
946a00ceb0 Use with_front properly when creating rules for CPT archive pages. props scribu. fixes #16626 for 3.1
git-svn-id: http://svn.automattic.com/wordpress/branches/3.1@17515 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2011-03-09 05:41:10 +00:00
markjaquith
fc28e3f83f Prevent double index.php preprend on PATHINFO custom taxonomy permalinks. Proper use of with_front. props greuben. fixes #16918. fixes #16622. see #15813. see #12659. For 3.1
git-svn-id: http://svn.automattic.com/wordpress/branches/3.1@17513 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2011-03-09 05:19:20 +00:00
ryan
5e09c87f1d Anchor network and user admins at the network domain and path rather than at the main site. Makes the redirects consistent with network_admin_url(). fixes #16652 for 3.1
git-svn-id: http://svn.automattic.com/wordpress/branches/3.1@17511 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2011-03-08 22:56:43 +00:00
ryan
db890f3ef9 Don't show admin bar on login screen. Props nacin. fixes #16588 for 3.1
git-svn-id: http://svn.automattic.com/wordpress/branches/3.1@17509 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2011-03-08 22:49:14 +00:00
ryan
1c704a2db8 Check for WP_Error return from get_term_by(). Props fabifott, kawauso, nacin. fixes #16717 for 3.1
git-svn-id: http://svn.automattic.com/wordpress/branches/3.1@17507 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2011-03-08 22:07:06 +00:00
ryan
60e0ec7adb Don't perform taxonomy queries for single post requests. Props scribu. fixes #16703 for trunk
git-svn-id: http://svn.automattic.com/wordpress/branches/3.1@17505 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2011-03-08 22:02:12 +00:00
ryan
7149f70a81 Mark theme preview iframe as a preview_iframe so that the admin bar doesn't show. Props tetele. fixes #16659 for 3.1
git-svn-id: http://svn.automattic.com/wordpress/branches/3.1@17503 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2011-03-08 21:54:48 +00:00
ryan
b24da574e1 Don't double process the tag query var. Props scribu. fixes #16730 for 3.1
git-svn-id: http://svn.automattic.com/wordpress/branches/3.1@17501 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2011-03-03 16:11:26 +00:00
ryan
011b0bd2b0 Do not do canonical redirects for unregistered feeds. fixes #16704 for 3.1
git-svn-id: http://svn.automattic.com/wordpress/branches/3.1@17499 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2011-03-03 15:56:08 +00:00
nacin
2bac601ee9 Avoid mangling the current site path variable with the search query. props greuben, fixes #16720 for the 3.1 branch.
git-svn-id: http://svn.automattic.com/wordpress/branches/3.1@17497 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2011-03-02 18:35:19 +00:00
markjaquith
05759ee9ca Revert to the cat=X permalinks from 3.0 and earlier. props dd32. fixes #16644 for 3.1
git-svn-id: http://svn.automattic.com/wordpress/branches/3.1@17495 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2011-03-02 17:30:10 +00:00
ryan
fdf0a096db Do not perform canonical redirects for IISto avoid redirect loops on some IIS setups. fixes #16639 for 3.1
git-svn-id: http://svn.automattic.com/wordpress/branches/3.1@17493 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2011-03-02 15:33:42 +00:00
ryan
bb2e880429 Bump
git-svn-id: http://svn.automattic.com/wordpress/branches/3.1@17491 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2011-03-02 15:02:17 +00:00
markjaquith
f7d54d04e0 Reparse the taxonomy query if query vars change. fixes #16622 for 3.1
git-svn-id: http://svn.automattic.com/wordpress/branches/3.1@17490 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2011-03-02 04:10:53 +00:00
markjaquith
0fad424d88 3.1
git-svn-id: http://svn.automattic.com/wordpress/branches/3.1@17486 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2011-02-23 14:45:33 +00:00
markjaquith
662ff0ce80 Also mention compressed scripts
git-svn-id: http://svn.automattic.com/wordpress/branches/3.1@17484 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2011-02-22 22:36:58 +00:00
nacin
af09e49ba4 Avoid printf entirely. props SergeyBiryukov, fixes #16611 for 3.1.
git-svn-id: http://svn.automattic.com/wordpress/branches/3.1@17482 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2011-02-22 10:13:03 +00:00
potbot
5c29dc99c0 POT, generated from r17478
git-svn-id: http://svn.automattic.com/wordpress/branches/3.1@17480 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2011-02-22 08:27:36 +00:00
nacin
e0be5a74dd Back compat with the gallery_style filter in Twenty Ten. fixes #16610 for the 3.1 branch.
git-svn-id: http://svn.automattic.com/wordpress/branches/3.1@17477 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2011-02-22 08:23:11 +00:00
nacin
ff64d344f3 Use get_comments_number() in comments_bubble() method. Removes chance of sprintf arguments error due to percent encoding in URLs and kills unnecessary translations. Escape translations into attributes. esc_url on admin_url. fixes #16611 for the 3.1 branch.
git-svn-id: http://svn.automattic.com/wordpress/branches/3.1@17476 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2011-02-22 04:25:11 +00:00
ryan
68b6a2813d 3.0 compat for twentyten. For 3.1
git-svn-id: http://svn.automattic.com/wordpress/branches/3.1@17474 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2011-02-21 20:10:47 +00:00
markjaquith
cd5bc88945 Make a written offer pointing to a central WordPress.org URL for obtaining the source to any binary programs included in WordPress, instead of relying on third party sites. Include the MIT license file that the swfupload project omitted from their codebase. fixes #16517 for 3.1
git-svn-id: http://svn.automattic.com/wordpress/branches/3.1@17473 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2011-02-21 19:39:57 +00:00
nacin
46c2bc99bf Ensure we're matching the complete theme directory when excluding parent templates from the theme editor. props chrisbliss18, fixes #16607 for the 3.1 branch.
git-svn-id: http://svn.automattic.com/wordpress/branches/3.1@17470 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2011-02-21 18:55:48 +00:00
ryan
861d81ad6c Bump
git-svn-id: http://svn.automattic.com/wordpress/branches/3.1@17464 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2011-02-17 01:31:56 +00:00
nacin
a18b9d8970 Bump.
git-svn-id: http://svn.automattic.com/wordpress/branches/3.1@17462 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2011-02-16 19:38:39 +00:00
ryan
7c25c2160d Lose create_function() in links_add_target() and links_add_base_url(). esc_attr() the target to provide extra coverage for plugins. Props Justin Rainbow, nacin. For 3.1
git-svn-id: http://svn.automattic.com/wordpress/branches/3.1@17460 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2011-02-16 19:24:45 +00:00
ryan
d5cd365c06 Don't allow changing the post type. Props nacin. For 3.1
git-svn-id: http://svn.automattic.com/wordpress/branches/3.1@17458 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2011-02-16 18:58:40 +00:00
ryan
4425fc362e Use ->query instead of . Always kick off the parse_query action. fixes #16545 for 3.1
git-svn-id: http://svn.automattic.com/wordpress/branches/3.1@17456 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2011-02-16 16:27:03 +00:00
ryan
7e22be1283 Bump
git-svn-id: http://svn.automattic.com/wordpress/branches/3.1@17454 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2011-02-16 00:00:16 +00:00
ryan
1f56cc0d04 Run parse_query() in get_posts() so that the query vars are always parsed for set(), get_posts() patterns. fixes #16545 for 3.1
git-svn-id: http://svn.automattic.com/wordpress/branches/3.1@17452 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2011-02-15 23:58:42 +00:00
ryan
c4289622f3 Make plugin and theme title columns narrower. Props garyc40. fixes #16563 for 3.1
git-svn-id: http://svn.automattic.com/wordpress/branches/3.1@17450 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2011-02-15 03:46:47 +00:00
nacin
14ca237999 s/owpbody/wpbody/. props ptahdunbar, fixes #16559 for 3.1.
git-svn-id: http://svn.automattic.com/wordpress/branches/3.1@17447 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2011-02-14 22:56:15 +00:00
markjaquith
4d159aec4b Do not output an HTML ID on the (potentially duplicate) hidden parent_id field. props nacin. fixes #13179 for 3.1
git-svn-id: http://svn.automattic.com/wordpress/branches/3.1@17446 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2011-02-13 14:44:36 +00:00
ryan
519cc6a295 Don't allow passing slugs to get_tag_link() and get_category_link(); they are too ambiguous. Restore WP_Error return to get_term_link(). fixes #16521 for 3.1
git-svn-id: http://svn.automattic.com/wordpress/branches/3.1@17444 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2011-02-10 21:49:30 +00:00
ryan
5c8e92822b Bump
git-svn-id: http://svn.automattic.com/wordpress/branches/3.1@17442 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2011-02-10 20:41:56 +00:00
ryan
8dd892a91b Disallow and hide user removal (as opposed to deletion) for single site installs. Removal is a multisite concept. Props nacin. fixes #16501 for 3.1
git-svn-id: http://svn.automattic.com/wordpress/branches/3.1@17440 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2011-02-10 20:38:04 +00:00
ryan
0b2f08609e Return empty strings instead of WP_Errro from get_category_link(), get_term_link(), and get_tag_link() when passed an invalid term. Clarify phpdoc. Props nacin. fixes #16521 for 3.1
git-svn-id: http://svn.automattic.com/wordpress/branches/3.1@17438 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2011-02-10 20:19:02 +00:00
ryan
1981ec619b Pink the whites.
git-svn-id: http://svn.automattic.com/wordpress/branches/3.1@17436 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2011-02-09 17:36:23 +00:00
nacin
cd8259fa5d Cleanup crew.
git-svn-id: http://svn.automattic.com/wordpress/branches/3.1@17433 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2011-02-09 17:35:10 +00:00
ryan
64a20e2a11 Add additional promote_users checks. Show Add existing button only for multisite. Don't show bulk actions if user can't promote users. Show add new user menu if user has create_users but not promote_users. Props nacin. fixes #16501 for 3.1
git-svn-id: http://svn.automattic.com/wordpress/branches/3.1@17432 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2011-02-09 17:30:46 +00:00
ryan
d6470f75fa Don't query the post format for post types that don't support formats. Props nacin. fixes #16503 for 3.1
git-svn-id: http://svn.automattic.com/wordpress/branches/3.1@17430 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2011-02-09 17:14:00 +00:00
ryan
3caaeccf2c Return early if list is not an array. Props nacin. fixes #16499 for 3.1
git-svn-id: http://svn.automattic.com/wordpress/branches/3.1@17428 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2011-02-09 17:07:12 +00:00
nacin
33caf4df41 Akismet 2.5.3 for the 3.1 branch.
git-svn-id: http://svn.automattic.com/wordpress/branches/3.1@17426 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2011-02-09 10:04:18 +00:00
nacin
5dc0aa23e0 Bump.
git-svn-id: http://svn.automattic.com/wordpress/branches/3.1@17424 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2011-02-08 21:09:10 +00:00
nacin
964bb8bd91 Use wp_kses_post instead of wp_kses_data for a better balance between security and flexibility. fixes #16489 for the 3.1 branch.
git-svn-id: http://svn.automattic.com/wordpress/branches/3.1@17423 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2011-02-08 20:18:04 +00:00
ryan
f0ff1d9226 RC4
git-svn-id: http://svn.automattic.com/wordpress/branches/3.1@17418 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2011-02-07 23:01:26 +00:00
markjaquith
91f95cb5a1 Skip authors that no longer exist when doing an export. props nacin. fixes #16479 for 3.1
git-svn-id: http://svn.automattic.com/wordpress/branches/3.1@17416 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2011-02-07 20:08:18 +00:00
ryan
e9522e5f75 Bump
git-svn-id: http://svn.automattic.com/wordpress/branches/3.1@17414 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2011-02-07 19:20:10 +00:00
markjaquith
eb81c1524f A little escaping paranoia, just to be safe. (Already sanitized, higher up). for 3.1
git-svn-id: http://svn.automattic.com/wordpress/branches/3.1@17411 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2011-02-07 19:11:45 +00:00
ryan
69ee1b0bcf Bump
git-svn-id: http://svn.automattic.com/wordpress/branches/3.1@17408 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2011-02-06 19:19:31 +00:00
ryan
c3cd991ba1 Run sanitize_key() on post_status, comment_status, and ping_status on the way into the DB. Props duck_. For 3.1
git-svn-id: http://svn.automattic.com/wordpress/branches/3.1@17405 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2011-02-06 18:37:58 +00:00
markjaquith
c290c81b1a Do not use PHP5-only array_combine. props duck_. see #16459 for 3.1
git-svn-id: http://svn.automattic.com/wordpress/branches/3.1@17403 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2011-02-05 18:46:15 +00:00
ryan
8559a5f1a3 Preserve tag escaping. Props koopersmith, Nils Jueneman. For 3.1
git-svn-id: http://svn.automattic.com/wordpress/branches/3.1@17399 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2011-02-05 18:31:48 +00:00
ryan
fe1823622a Properly encode the post title. Props koopersmith, nacin. For 3.1
git-svn-id: http://svn.automattic.com/wordpress/branches/3.1@17396 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2011-02-05 18:27:19 +00:00
markjaquith
0180311c0f No translation for post format slugs. Too fragile for the future. fixes #16459 for 3.1 branch
git-svn-id: http://svn.automattic.com/wordpress/branches/3.1@17394 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2011-02-05 18:25:03 +00:00
ryan
ca11f54e4c Add cap and type checks to media item fetch. For 3.1
git-svn-id: http://svn.automattic.com/wordpress/branches/3.1@17392 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2011-02-05 18:24:05 +00:00
markjaquith
f658bc1cc3 Improvement to check_admin_referer() when called without first argument (PLUGIN AUTHORS: STOP DOING THAT). props indie-ulf. fixes #16449 for 3.1
git-svn-id: http://svn.automattic.com/wordpress/branches/3.1@17386 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2011-02-03 20:42:10 +00:00
ryan
8fdfe5aa1c Remove debug cruft. Props markmcwilliams. fixes #15530
git-svn-id: http://svn.automattic.com/wordpress/branches/3.1@17384 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2011-02-03 20:02:15 +00:00
markjaquith
286f033442 Remove unused/non-functional code with old-style CSRF checking. see #16499
git-svn-id: http://svn.automattic.com/wordpress/branches/3.1@17382 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2011-02-03 07:23:17 +00:00
markjaquith
a815c789d7 restore_current_blog() in add_user_to_blog() and remove_user_from_blog() before early return, to avoid being stuck in a switched state. props mdawaffe. fixes #16444 for trunk.
git-svn-id: http://svn.automattic.com/wordpress/branches/3.1@17380 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2011-02-03 00:17:35 +00:00
markjaquith
dc3a5b3c8c Remove admin bar CSS cruft that darkened the bar in RTL languages. props ocean90. fixes #16427 for 3.1 branch
git-svn-id: http://svn.automattic.com/wordpress/branches/3.1@17378 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2011-02-01 01:47:00 +00:00
nacin
93886c8280 Bump.
git-svn-id: http://svn.automattic.com/wordpress/branches/3.1@17376 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2011-01-31 17:29:03 +00:00
nacin
6aaa33cee0 Add context to 'Format' string. props scribu, SergeyBiryukov, fixes #16423 for the 3.1 branch.
git-svn-id: http://svn.automattic.com/wordpress/branches/3.1@17373 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2011-01-31 14:44:33 +00:00
markjaquith
94c578613f Branching for 3.1
git-svn-id: http://svn.automattic.com/wordpress/branches/3.1@17370 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2011-01-30 20:45:59 +00:00
72 changed files with 419 additions and 242 deletions

View File

@@ -279,3 +279,10 @@ POSSIBILITY OF SUCH DAMAGES.
END OF TERMS AND CONDITIONS
WRITTEN OFFER
The source code for any program binaries or compressed scripts that are
included with WordPress can be freely obtained at the following URL:
http://wordpress.org/download/source/

View File

@@ -8,7 +8,7 @@
<body>
<h1 id="logo">
<a href="http://wordpress.org/"><img alt="WordPress" src="wp-admin/images/wordpress-logo.png" width="250" height="68" /></a>
<br /> Version 3.1
<br /> Version 3.1.2
</h1>
<p style="text-align: center">Semantic Personal Publishing Platform</p>

View File

@@ -30,6 +30,13 @@ if ( !current_user_can('upload_files') )
// just fetch the detail form for that attachment
if ( isset($_REQUEST['attachment_id']) && ($id = intval($_REQUEST['attachment_id'])) && $_REQUEST['fetch'] ) {
$post = get_post( $id );
if ( 'attachment' != $post->post_type )
wp_die( __( 'Unknown post type.' ) );
$post_type_object = get_post_type_object( 'attachment' );
if ( ! current_user_can( $post_type_object->cap->edit_post, $id ) )
wp_die( __( 'You are not allowed to edit this item.' ) );
if ( 2 == $_REQUEST['fetch'] ) {
add_filter('attachment_fields_to_edit', 'media_single_attachment_fields_to_edit', 10, 2);
echo get_media_item($id, array( 'send' => false, 'delete' => true ));

File diff suppressed because one or more lines are too long

View File

@@ -1620,7 +1620,7 @@ tr.inline-edit-row td {
}
#wpbody-content .inline-edit-row-page .inline-edit-col-right,
#owpbody-content .bulk-edit-row-post .inline-edit-col-right {
#wpbody-content .bulk-edit-row-post .inline-edit-col-right {
margin-top: 27px;
}
@@ -3575,9 +3575,9 @@ span.imgedit-scale-warn {
16.0 - Themes
------------------------------------------------------------------------------*/
.theme-install-php .tablenav {
height:auto;
}
.theme-install-php .tablenav {
height:auto;
}
table#availablethemes {
border-spacing: 0;
@@ -3587,10 +3587,10 @@ table#availablethemes {
width: 100%;
}
table#availablethemes .no-items td{
border-width:0;
padding:5px;
}
table#availablethemes .no-items td{
border-width:0;
padding:5px;
}
td.available-theme {
vertical-align: top;
@@ -3784,8 +3784,6 @@ h2 .nav-tab {
17.0 - Plugins
------------------------------------------------------------------------------*/
.plugins #description {width: 60%}
.plugins .name,
#pass-strength-result.strong,
#pass-strength-result.short,
@@ -3839,8 +3837,9 @@ input.button-highlighted,
padding: 5px 7px 0;
}
#wpbody-content .plugins .plugin-title {
#wpbody-content .plugins .plugin-title, #wpbody-content .plugins .theme-title {
padding-right: 12px;
white-space:nowrap;
}
.plugins .second, .plugins .row-actions-visible {

View File

@@ -109,7 +109,7 @@ require_once('./includes/meta-boxes.php');
add_meta_box('submitdiv', __('Publish'), 'post_submit_meta_box', $post_type, 'side', 'core');
if ( current_theme_supports( 'post-formats' ) && post_type_supports( $post_type, 'post-formats' ) )
add_meta_box( 'formatdiv', __('Format'), 'post_format_meta_box', $post_type, 'side', 'core' );
add_meta_box( 'formatdiv', _x( 'Format', 'post format' ), 'post_format_meta_box', $post_type, 'side', 'core' );
// all taxonomies
foreach ( get_object_taxonomies($post_type) as $tax_name ) {
@@ -210,7 +210,7 @@ require_once('./admin-header.php');
<?php endif; ?>
<form name="post" action="post.php" method="post" id="post"<?php do_action('post_edit_form_tag'); ?>>
<?php wp_nonce_field($nonce_action); ?>
<input type="hidden" id="parent_id" name="parent_id" value="<?php echo esc_attr( $post->post_parent ); ?>" />
<input type="hidden" name="parent_id" value="<?php echo esc_attr( $post->post_parent ); ?>" />
<input type="hidden" id="user-id" name="user_ID" value="<?php echo (int) $user_ID ?>" />
<input type="hidden" id="hiddenaction" name="action" value="<?php echo esc_attr( $form_action ) ?>" />
<input type="hidden" id="originalaction" name="originalaction" value="<?php echo esc_attr( $form_action ) ?>" />

View File

@@ -154,7 +154,7 @@ if ( ! empty($_REQUEST['_wp_http_referer']) ) {
if ( ! empty( $_REQUEST['paged'] ) )
$location = add_query_arg( 'paged', (int) $_REQUEST['paged'] );
wp_redirect( $location );
exit;
}

View File

@@ -48,7 +48,6 @@ class WP_Comments_List_Table extends WP_List_Table {
$comment_status = 'all';
$comment_type = !empty( $_REQUEST['comment_type'] ) ? $_REQUEST['comment_type'] : '';
error_log( var_export( $comment_type, true ) );
$search = ( isset( $_REQUEST['s'] ) ) ? $_REQUEST['s'] : '';

View File

@@ -198,7 +198,7 @@ class WP_List_Table {
if ( ! empty( $_REQUEST['orderby'] ) )
echo '<input type="hidden" name="orderby" value="' . esc_attr( $_REQUEST['orderby'] ) . '" />';
if ( ! empty( $_REQUEST['order'] ) )
if ( ! empty( $_REQUEST['order'] ) )
echo '<input type="hidden" name="order" value="' . esc_attr( $_REQUEST['order'] ) . '" />';
?>
<p class="search-box">
@@ -420,13 +420,7 @@ class WP_List_Table {
if ( $pending_comments )
echo '<strong>';
$link = "<a href='" . add_query_arg( 'p', $post_id, admin_url('edit-comments.php') ) . "' title='$pending_phrase' class='post-com-count'><span class='comment-count'>%s</span></a>";
comments_number(
sprintf( $link, /* translators: comment count link */ _x( '0', 'comment count' ) ),
sprintf( $link, /* translators: comment count link */ _x( '1', 'comment count' ) ),
sprintf( $link, /* translators: comment count link: % will be substituted by comment count */ _x( '%', 'comment count' ) )
);
echo "<a href='" . esc_url( add_query_arg( 'p', $post_id, admin_url( 'edit-comments.php' ) ) ) . "' title='" . esc_attr( $pending_phrase ) . "' class='post-com-count'><span class='comment-count'>" . number_format_i18n( get_comments_number() ) . "</span></a>";
if ( $pending_comments )
echo '</strong>';
@@ -482,7 +476,7 @@ class WP_List_Table {
$current = $this->get_pagenum();
$current_url = ( is_ssl() ? 'https://' : 'http://' ) . $_SERVER['HTTP_HOST'] . $_SERVER['REQUEST_URI'];
$current_url = remove_query_arg( array( 'hotkeys_highlight_last', 'hotkeys_highlight_first' ), $current_url );
$page_links = array();

View File

@@ -72,7 +72,7 @@ class WP_MS_Sites_List_Table extends WP_List_Table {
$query .= " AND ( {$wpdb->blogs}.domain LIKE '$blog_s' ) ";
} else {
if ( $like_s != trim('/', $current_site->path) )
$blog_s = $current_site->path .= $like_s . $wild . '/';
$blog_s = $current_site->path . $like_s . $wild . '/';
else
$blog_s = $like_s;
$query .= " AND ( {$wpdb->blogs}.path LIKE '$blog_s' )";

View File

@@ -38,7 +38,7 @@ class WP_MS_Themes_List_Table extends WP_List_Table {
}
function get_table_classes() {
return array( 'widefat', 'fixed', 'plugins' ); // todo: remove and add CSS for .themes
return array( 'widefat', 'plugins' ); // todo: remove and add CSS for .themes
}
function ajax_user_can() {

View File

@@ -152,7 +152,7 @@ class WP_Plugin_Install_List_Table extends WP_List_Table {
'code' => array(), 'pre' => array(), 'em' => array(),'strong' => array(),
'ul' => array(), 'ol' => array(), 'li' => array(), 'p' => array(), 'br' => array()
);
list( $columns, $hidden ) = $this->get_column_info();
$style = array();

View File

@@ -27,6 +27,10 @@ class WP_Plugins_List_Table extends WP_List_Table {
'plural' => 'plugins',
) );
}
function get_table_classes() {
return array( 'widefat', $this->_args['plural'] );
}
function ajax_user_can() {
if ( is_multisite() ) {

View File

@@ -310,6 +310,8 @@ class WP_Posts_List_Table extends WP_List_Table {
if ( empty( $posts ) )
$posts = $wp_query->posts;
add_filter( 'the_title', 'esc_html' );
if ( $this->hierarchical_display ) {
$this->_display_rows_hierarchical( $posts, $this->get_pagenum(), $per_page );
} else {
@@ -320,8 +322,6 @@ class WP_Posts_List_Table extends WP_List_Table {
function _display_rows( $posts ) {
global $post, $mode;
add_filter( 'the_title', 'esc_html' );
// Create array of post IDs.
$post_ids = array();
@@ -522,7 +522,6 @@ class WP_Posts_List_Table extends WP_List_Table {
}
}
$post->post_title = esc_html( $post->post_title );
$pad = str_repeat( '&#8212; ', $level );
?>
<td <?php echo $attributes ?>><strong><?php if ( $can_edit_post && $post->post_status != 'trash' ) { ?><a class="row-title" href="<?php echo $edit_link; ?>" title="<?php echo esc_attr( sprintf( __( 'Edit &#8220;%s&#8221;' ), $title ) ); ?>"><?php echo $pad; echo $title ?></a><?php } else { echo $pad; echo $title; }; _post_states( $post ); echo isset( $parent_name ) ? ' | ' . $post_type_object->labels->parent_item_colon . ' ' . esc_html( $parent_name ) : ''; ?></strong>

View File

@@ -66,7 +66,7 @@ class WP_Themes_List_Table extends WP_List_Table {
_e( 'No items found.' );
return;
}
if ( is_multisite() ) {
if ( current_user_can( 'install_themes' ) && current_user_can( 'manage_network_themes' ) ) {
printf( __( 'You only have one theme enabled for this site right now. Visit the Network Admin to <a href="%1$s">enable</a> or <a href="%2$s">install</a> more themes.' ), network_admin_url( 'site-themes.php?id=' . $GLOBALS['blog_id'] ), network_admin_url( 'theme-install.php' ) );
@@ -88,23 +88,23 @@ class WP_Themes_List_Table extends WP_List_Table {
// Fallthrough.
printf( __( 'Only the current theme is available to you. Contact the %s administrator for information about accessing additional themes.' ), get_site_option( 'site_name' ) );
}
function tablenav( $which = 'top' ) {
function tablenav( $which = 'top' ) {
if ( $this->get_pagination_arg( 'total_pages' ) <= 1 )
return;
?>
<div class="tablenav <?php echo $which; ?>">
<?php $this->pagination( $which ); ?>
<img src="<?php echo esc_url( admin_url( 'images/wpspin_light.gif' ) ); ?>" class="ajax-loading list-ajax-loading" alt="" />
<br class="clear" />
</div>
<?php
?>
<div class="tablenav <?php echo $which; ?>">
<?php $this->pagination( $which ); ?>
<img src="<?php echo esc_url( admin_url( 'images/wpspin_light.gif' ) ); ?>" class="ajax-loading list-ajax-loading" alt="" />
<br class="clear" />
</div>
<?php
}
function display() {
// wp_nonce_field( "fetch-list-" . get_class( $this ), '_ajax_fetch_list_nonce' );
?>
<?php $this->tablenav( 'top' ); ?>
<?php $this->tablenav( 'top' ); ?>
<table id="availablethemes" cellspacing="0" cellpadding="0">
<tbody id="the-list" class="list:themes">
@@ -112,7 +112,7 @@ class WP_Themes_List_Table extends WP_List_Table {
</tbody>
</table>
<?php $this->tablenav( 'bottom' ); ?>
<?php $this->tablenav( 'bottom' ); ?>
<?php
}

View File

@@ -1349,7 +1349,7 @@ class Theme_Installer_Skin extends WP_Upgrader_Skin {
$stylesheet = $this->upgrader->result['destination_name'];
$template = !empty($theme_info['Template']) ? $theme_info['Template'] : $stylesheet;
$preview_link = htmlspecialchars( add_query_arg( array('preview' => 1, 'template' => $template, 'stylesheet' => $stylesheet, 'TB_iframe' => 'true' ), trailingslashit(esc_url(get_option('home'))) ) );
$preview_link = htmlspecialchars( add_query_arg( array('preview' => 1, 'template' => $template, 'stylesheet' => $stylesheet, 'preview_iframe' => 1, 'TB_iframe' => 'true' ), trailingslashit(esc_url(get_option('home'))) ) );
$activate_link = wp_nonce_url("themes.php?action=activate&amp;template=" . urlencode($template) . "&amp;stylesheet=" . urlencode($stylesheet), 'switch-theme_' . $template);
$install_actions = array(

View File

@@ -121,10 +121,13 @@ class WP_Users_List_Table extends WP_List_Table {
function get_bulk_actions() {
$actions = array();
if ( !is_multisite() && current_user_can( 'delete_users' ) )
$actions['delete'] = __( 'Delete' );
else
$actions['remove'] = __( 'Remove' );
if ( is_multisite() ) {
if ( current_user_can( 'remove_users' ) )
$actions['remove'] = __( 'Remove' );
} else {
if ( current_user_can( 'delete_users' ) )
$actions['delete'] = __( 'Delete' );
}
return $actions;
}
@@ -132,6 +135,8 @@ class WP_Users_List_Table extends WP_List_Table {
function extra_tablenav( $which ) {
if ( 'top' != $which )
return;
if ( ! current_user_can( 'promote_users' ) )
return;
?>
<div class="alignleft actions">
<label class="screen-reader-text" for="new_role"><?php _e( 'Change role to&hellip;' ) ?></label>

View File

@@ -609,7 +609,7 @@ function wp_dashboard_recent_comments() {
$total_items = isset( $widgets['dashboard_recent_comments'] ) && isset( $widgets['dashboard_recent_comments']['items'] )
? absint( $widgets['dashboard_recent_comments']['items'] ) : 5;
while ( count( $comments ) < 5 && $possible = $wpdb->get_results( "SELECT * FROM $wpdb->comments c LEFT JOIN $wpdb->posts p ON c.comment_post_ID = p.ID WHERE p.post_status != 'trash' ORDER BY c.comment_date_gmt DESC LIMIT $start, 50" ) ) {
while ( count( $comments ) < $total_items && $possible = $wpdb->get_results( "SELECT * FROM $wpdb->comments c LEFT JOIN $wpdb->posts p ON c.comment_post_ID = p.ID WHERE p.post_status != 'trash' ORDER BY c.comment_date_gmt DESC LIMIT $start, 50" ) ) {
foreach ( $possible as $comment ) {
if ( count( $comments ) >= $total_items )

View File

@@ -241,6 +241,8 @@ function export_wp( $args = array() ) {
foreach ( (array) $results as $result )
$authors[] = get_userdata( $result->post_author );
$authors = array_filter( $authors );
foreach( $authors as $author ) {
echo "\t<wp:author>";
echo '<wp:author_id>' . $author->ID . '</wp:author_id>';

View File

@@ -499,6 +499,7 @@ function media_upload_image() {
$id = 0;
if ( isset($_POST['html-upload']) && !empty($_FILES) ) {
check_admin_referer('media-form');
// Upload File button was clicked
$id = media_handle_upload('async-upload', $_REQUEST['post_id']);
unset($_FILES);
@@ -604,6 +605,7 @@ function media_upload_audio() {
$id = 0;
if ( isset($_POST['html-upload']) && !empty($_FILES) ) {
check_admin_referer('media-form');
// Upload File button was clicked
$id = media_handle_upload('async-upload', $_REQUEST['post_id']);
unset($_FILES);
@@ -662,6 +664,7 @@ function media_upload_video() {
$id = 0;
if ( isset($_POST['html-upload']) && !empty($_FILES) ) {
check_admin_referer('media-form');
// Upload File button was clicked
$id = media_handle_upload('async-upload', $_REQUEST['post_id']);
unset($_FILES);
@@ -720,6 +723,7 @@ function media_upload_file() {
$id = 0;
if ( isset($_POST['html-upload']) && !empty($_FILES) ) {
check_admin_referer('media-form');
// Upload File button was clicked
$id = media_handle_upload('async-upload', $_REQUEST['post_id']);
unset($_FILES);

View File

@@ -136,6 +136,8 @@ function edit_post( $post_data = null ) {
$post_data = &$_POST;
$post_ID = (int) $post_data['post_ID'];
$post = get_post( $post_ID );
$post_data['post_type'] = $post->post_type;
$ptype = get_post_type_object($post_data['post_type']);
if ( !current_user_can( $ptype->cap->edit_post, $post_ID ) ) {

View File

@@ -270,16 +270,16 @@ function get_inline_data($post) {
if ( ! current_user_can($post_type_object->cap->edit_post, $post->ID) )
return;
$title = esc_attr( trim( $post->post_title ) );
$title = esc_textarea( trim( $post->post_title ) );
echo '
<div class="hidden" id="inline_' . $post->ID . '">
<div class="post_title">' . $title . '</div>
<div class="post_name">' . apply_filters('editable_slug', $post->post_name) . '</div>
<div class="post_author">' . $post->post_author . '</div>
<div class="comment_status">' . $post->comment_status . '</div>
<div class="ping_status">' . $post->ping_status . '</div>
<div class="_status">' . $post->post_status . '</div>
<div class="comment_status">' . esc_html( $post->comment_status ) . '</div>
<div class="ping_status">' . esc_html( $post->ping_status ) . '</div>
<div class="_status">' . esc_html( $post->post_status ) . '</div>
<div class="jj">' . mysql2date( 'd', $post->post_date, false ) . '</div>
<div class="mm">' . mysql2date( 'm', $post->post_date, false ) . '</div>
<div class="aa">' . mysql2date( 'Y', $post->post_date, false ) . '</div>

View File

@@ -294,7 +294,7 @@ function update_core($from, $to) {
$mysql_version = $wpdb->db_version();
$required_php_version = '4.3';
$required_mysql_version = '4.1.2';
$wp_version = '3.1';
$wp_version = '3.1.2';
$php_compat = version_compare( $php_version, $required_php_version, '>=' );
$mysql_compat = version_compare( $mysql_version, $required_mysql_version, '>=' ) || file_exists( WP_CONTENT_DIR . '/db.php' );

View File

@@ -218,10 +218,10 @@ setCommentsList = function() {
var refillTheExtraList = function(ev) {
// var args = $.query.get(), total_pages = listTable.get_total_pages(), per_page = $('input[name=_per_page]', '#comments-form').val(), r;
var args = $.query.get(), total_pages = $('.total-pages').text(), per_page = $('input[name=_per_page]', '#comments-form').val(), r;
if (! args.paged)
args.paged = 1;
if (args.paged > total_pages) {
return;
}

View File

@@ -29,12 +29,12 @@ window.listTable = {
$('select', context).each( function(){
var options = $('option', this),
anySelected = false;
options.each( function(){
this.selected = this.defaultSelected;
anySelected = anySelected || this.defaultSelected;
});
// If no options are selected within a single-select dropdown,
// select the first element by default.
if ( ! this.multiple && ! anySelected )

View File

@@ -36,7 +36,10 @@ tagBox = {
},
quickClicks : function(el) {
var thetags = $('.the-tags', el), tagchecklist = $('.tagchecklist', el), current_tags, disabled;
var thetags = $('.the-tags', el),
tagchecklist = $('.tagchecklist', el),
id = $(el).attr('id'),
current_tags, disabled;
if ( !thetags.length )
return;
@@ -47,19 +50,25 @@ tagBox = {
tagchecklist.empty();
$.each( current_tags, function( key, val ) {
var txt, button_id, id = $(el).attr('id');
var span, xbutton;
val = $.trim(val);
if ( !val.match(/^\s+$/) && '' != val ) {
button_id = id + '-check-num-' + key;
if ( disabled )
txt = '<span>' + val + '</span> ';
else
txt = '<span><a id="' + button_id + '" class="ntdelbutton">X</a>&nbsp;' + val + '</span> ';
tagchecklist.append(txt);
if ( ! disabled )
$( '#' + button_id ).click( function(){ tagBox.parseTags(this); });
val = $.trim( val );
if ( ! val )
return;
// Create a new span, and ensure the text is properly escaped.
span = $('<span />').text( val );
// If tags editing isn't disabled, create the X button.
if ( ! disabled ) {
xbutton = $( '<a id="' + id + '-check-num-' + key + '" class="ntdelbutton">X</a>' );
xbutton.click( function(){ tagBox.parseTags(this); });
span.prepend('&nbsp;').prepend( xbutton );
}
// Append the span to the tag list.
tagchecklist.append( span );
});
},

File diff suppressed because one or more lines are too long

View File

@@ -38,6 +38,7 @@ if ( isset($_GET['inline']) ) {
$errors = array();
if ( isset($_POST['html-upload']) && !empty($_FILES) ) {
check_admin_referer('media-form');
// Upload File button was clicked
$id = media_handle_upload('async-upload', $_REQUEST['post_id']);
unset($_FILES);

View File

@@ -191,13 +191,19 @@ else
if ( current_user_can('list_users') ) {
$_wp_real_parent_file['profile.php'] = 'users.php'; // Back-compat for plugins adding submenus to profile.php.
$submenu['users.php'][5] = array(__('Users'), 'list_users', 'users.php');
$submenu['users.php'][10] = array(_x('Add New', 'user'), 'promote_users', 'user-new.php');
if ( current_user_can('create_users') )
$submenu['users.php'][10] = array(_x('Add New', 'user'), 'create_users', 'user-new.php');
else
$submenu['users.php'][10] = array(_x('Add New', 'user'), 'promote_users', 'user-new.php');
$submenu['users.php'][15] = array(__('Your Profile'), 'read', 'profile.php');
} else {
$_wp_real_parent_file['users.php'] = 'profile.php';
$submenu['profile.php'][5] = array(__('Your Profile'), 'read', 'profile.php');
$submenu['profile.php'][10] = array(__('Add New User'), 'promote_users', 'user-new.php');
if ( current_user_can('create_users') )
$submenu['profile.php'][10] = array(__('Add New User'), 'create_users', 'user-new.php');
else
$submenu['profile.php'][10] = array(__('Add New User'), 'promote_users', 'user-new.php');
}
$menu[75] = array( __('Tools'), 'edit_posts', 'tools.php', '', 'menu-top menu-icon-tools', 'menu-tools', 'div' );

View File

@@ -108,7 +108,6 @@ add_contextual_help($current_screen,
'<p>' . __('Choose subdomains or subdirectories; this can only be switched afterwards by reconfiguring your install. Fill out the network details, and click install. If this does not work, you may have to add a wildcard DNS record (for subdomains) or change to another setting in Permalinks (for subdirectories).') . '</p>' .
'<p>' . __('The next screen for Network will give you individually-generated lines of code to add to your wp-config.php and .htaccess files. Make sure the settings of your FTP client make files starting with a dot visible, so that you can find .htaccess; you may have to create this file if it really is not there. Make backup copies of those two files.') . '</p>' .
'<p>' . __('Add a <code>blogs.dir</code> directory under <code>/wp-content</code> and add the designated lines of code to wp-config.php (just before <code>/*...stop editing...*/</code>) and <code>.htaccess</code> (replacing the existing WordPress rules).') . '</p>' .
'<p>' . __('Refreshing your browser will take you to a screen with an archive of those added lines of code. A set of six links under Super Admin will appear at the top of the main left navigation menu. The multisite network is now enabled.') . '</p>' .
'<p>' . __('The choice of subdirectory sites is disabled if this setup is more than a month old because of permalink problems with &#8220;/blog/&#8221; from the main site. This disabling will be addressed soon in a future version.') . '</p>' .
'<p><strong>' . __('For more information:') . '</strong></p>' .
'<p>' . __('<a href="http://codex.wordpress.org/Create_A_Network" target="_blank">Documentation on Creating a Network</a>') . '</p>' .

View File

@@ -15,7 +15,7 @@ require_once( dirname( dirname( __FILE__ ) ) . '/admin.php' );
if ( ! is_multisite() )
wp_die( __( 'Multisite support is not enabled.' ) );
if ( ! is_main_site() ) {
if ( ( $current_blog->domain != $current_site->domain ) || ( $current_blog->path != $current_site->path ) ) {
wp_redirect( network_admin_url() );
exit;
}

View File

@@ -28,7 +28,6 @@ add_contextual_help($current_screen,
'<p>' . __('Upload settings control the size of the uploaded files and the amount of available upload space for each site. You can change the default value for specific sites when you edit a particular site. Allowed file types are also listed (space separated only).') . '</p>' .
'<p>' . __('Checkboxes for media upload buttons set which are shown in the visual editor. If unchecked, a generic upload button is still visible; other media types can still be uploaded if on the allowed file types list.') . '</p>' .
'<p>' . __('Menu setting enables/disables the plugin menus from appearing for non super admins, so that only super admins, not site admins, have access to activate plugins.') . '</p>' .
'<p>' . __('Super admins can no longer be added on the Options screen. You must now go to the list of existing users on Super Admin > Users and click on Username or the Edit action link below that name. This goes to an Edit User page where you can check a box to grant super admin privileges.') . '</p>' .
'<p><strong>' . __('For more information:') . '</strong></p>' .
'<p>' . __('<a href="http://codex.wordpress.org/Network_Admin_Settings_Screen" target="_blank">Documentation on Network Settings</a>') . '</p>' .
'<p>' . __('<a href="http://wordpress.org/support/" target="_blank">Support Forums</a>') . '</p>'

View File

@@ -56,7 +56,12 @@ function press_it() {
}
}
// set the post_content and status
$quick['post_status'] = isset($_POST['publish']) ? 'publish' : 'draft';
if ( isset( $_POST['publish'] ) && current_user_can( 'publish_posts' ) )
$quick['post_status'] = 'publish';
elseif ( isset( $_POST['review'] ) )
$quick['post_status'] = 'pending';
else
$quick['post_status'] = 'draft';
$quick['post_content'] = $content;
// error handling for media_sideload
if ( is_wp_error($upload) ) {

View File

@@ -180,7 +180,7 @@ if ($allowed_files) :
$template_dir = $themes[$theme]['Template Dir'];
foreach ( $themes[$theme]['Template Files'] as $template_file ) {
// Don't show parent templates.
if ( $is_child_theme && strpos( $template_file, $themes[$theme]['Template Dir'] ) === 0 )
if ( $is_child_theme && strpos( $template_file, trailingslashit( $template_dir ) ) === 0 )
continue;
$description = trim( get_file_description($template_file) );
@@ -202,7 +202,7 @@ if ($allowed_files) :
$stylesheet_dir = $themes[$theme]['Stylesheet Dir'];
foreach ( $themes[$theme]['Stylesheet Files'] as $style_file ) {
// Don't show parent styles.
if ( $is_child_theme && strpos( $style_file, $themes[$theme]['Template Dir'] ) === 0 )
if ( $is_child_theme && strpos( $style_file, trailingslashit( $template_dir ) ) === 0 )
continue;
$description = trim( get_file_description($style_file) );

View File

@@ -86,7 +86,7 @@ switch ( $step ) :
wp_upgrade();
$backto = !empty($_GET['backto']) ? stripslashes( urldecode( $_GET['backto'] ) ) : __get_option( 'home' ) . '/';
$backto = esc_url_raw( $backto );
$backto = esc_url( $backto );
$backto = wp_validate_redirect($backto, __get_option( 'home' ) . '/');
?>
<h2><?php _e( 'Update Complete' ); ?></h2>

View File

@@ -97,14 +97,6 @@ if ( is_multisite() && IS_PROFILE_PAGE && isset( $_GET[ 'newuseremail' ] ) && $c
}
switch ($action) {
case 'switchposts':
check_admin_referer();
/* TODO: Switch all posts from one user to another user */
break;
case 'update':
check_admin_referer('update-user_' . $user_id);

View File

@@ -9,8 +9,12 @@
/** WordPress Administration Bootstrap */
require_once('./admin.php');
if ( ! current_user_can('create_users') && ! current_user_can('promote_users') )
wp_die(__('Cheatin&#8217; uh?'));
if ( is_multisite() ) {
if ( ! current_user_can( 'create_users' ) && ! current_user_can( 'promote_users' ) )
wp_die( __( 'Cheatin&#8217; uh?' ) );
} elseif ( ! current_user_can( 'create_users' ) ) {
wp_die( __( 'Cheatin&#8217; uh?' ) );
}
if ( is_multisite() ) {
function admin_created_user_email( $text ) {

View File

@@ -16,7 +16,7 @@ if ( ! is_multisite() ) {
exit;
}
if ( ! is_main_site() ) {
if ( ( $current_blog->domain != $current_site->domain ) || ( $current_blog->path != $current_site->path ) ) {
wp_redirect( user_admin_url() );
exit;
}

View File

@@ -48,6 +48,9 @@ switch ( $wp_list_table->current_action() ) {
case 'promote':
check_admin_referer('bulk-users');
if ( ! current_user_can( 'promote_users' ) )
wp_die( __( 'You can&#8217;t edit that user.' ) );
if ( empty($_REQUEST['users']) ) {
wp_redirect($redirect);
exit();
@@ -197,13 +200,16 @@ break;
case 'doremove':
check_admin_referer('remove-users');
if ( ! is_multisite() )
wp_die( __( 'You can&#8217;t remove users.' ) );
if ( empty($_REQUEST['users']) ) {
wp_redirect($redirect);
exit;
}
if ( !current_user_can('remove_users') )
die(__('You can&#8217;t remove users.'));
if ( ! current_user_can( 'remove_users' ) )
wp_die( __( 'You can&#8217;t remove users.' ) );
$userids = $_REQUEST['users'];
@@ -231,6 +237,9 @@ case 'remove':
check_admin_referer('bulk-users');
if ( ! is_multisite() )
wp_die( __( 'You can&#8217;t remove users.' ) );
if ( empty($_REQUEST['users']) && empty($_REQUEST['user']) ) {
wp_redirect($redirect);
exit();
@@ -352,7 +361,7 @@ if ( ! empty($messages) ) {
echo esc_html( $title );
if ( current_user_can( 'create_users' ) ) { ?>
<a href="user-new.php" class="button add-new-h2"><?php echo esc_html_x( 'Add New', 'user' ); ?></a>
<?php } elseif ( current_user_can( 'promote_users' ) ) { ?>
<?php } elseif ( is_multisite() && current_user_can( 'promote_users' ) ) { ?>
<a href="user-new.php" class="button add-new-h2"><?php echo esc_html_x( 'Add Existing', 'user' ); ?></a>
<?php }

View File

@@ -303,6 +303,9 @@ add_filter( 'use_default_gallery_style', '__return_false' );
function twentyten_remove_gallery_css( $css ) {
return preg_replace( "#<style type='text/css'>(.*?)</style>#s", '', $css );
}
// Backwards compatibility with WordPress 3.0.
if ( version_compare( $GLOBALS['wp_version'], '3.1', '<' ) )
add_filter( 'gallery_style', 'twentyten_remove_gallery_css' );
if ( ! function_exists( 'twentyten_comment' ) ) :
/**
@@ -443,6 +446,10 @@ add_action( 'widgets_init', 'twentyten_widgets_init' );
* To override this in a child theme, remove the filter and optionally add your own
* function tied to the widgets_init action hook.
*
* This function uses a filter (show_recent_comments_widget_style) new in WordPress 3.1
* to remove the default style. Using Twenty Ten 1.2 in WordPress 3.0 will show the styles,
* but they won't have any effect on the widget in default Twenty Ten styling.
*
* @since Twenty Ten 1.0
*/
function twentyten_remove_recent_comments_style() {

View File

@@ -4,7 +4,7 @@ msgid ""
msgstr ""
"Project-Id-Version: Twenty Ten 1.2\n"
"Report-Msgid-Bugs-To: http://wordpress.org/tag/twentyten\n"
"POT-Creation-Date: 2011-01-15 01:27:01+00:00\n"
"POT-Creation-Date: 2011-02-22 08:27:35+00:00\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
@@ -24,7 +24,7 @@ msgstr ""
msgid "<span class=\"%1$s\">By</span> %2$s"
msgstr ""
#: loop-attachment.php:36 functions.php:469
#: loop-attachment.php:36 functions.php:476
msgid "View all posts by %s"
msgstr ""
@@ -218,93 +218,93 @@ msgstr ""
msgid "Sunset"
msgstr ""
#: functions.php:327
#: functions.php:330
msgid "%s <span class=\"says\">says:</span>"
msgstr ""
#: functions.php:330
#: functions.php:333
msgid "Your comment is awaiting moderation."
msgstr ""
#: functions.php:337
#: functions.php:340
msgid "%1$s at %2$s"
msgstr ""
#: functions.php:337 functions.php:354
#: functions.php:340 functions.php:357
msgid "(Edit)"
msgstr ""
#: functions.php:354
#: functions.php:357
msgid "Pingback:"
msgstr ""
#: functions.php:373
#: functions.php:376
msgid "Primary Widget Area"
msgstr ""
#: functions.php:375
#: functions.php:378
msgid "The primary widget area"
msgstr ""
#: functions.php:384
#: functions.php:387
msgid "Secondary Widget Area"
msgstr ""
#: functions.php:386
#: functions.php:389
msgid "The secondary widget area"
msgstr ""
#: functions.php:395
#: functions.php:398
msgid "First Footer Widget Area"
msgstr ""
#: functions.php:397
#: functions.php:400
msgid "The first footer widget area"
msgstr ""
#: functions.php:406
#: functions.php:409
msgid "Second Footer Widget Area"
msgstr ""
#: functions.php:408
#: functions.php:411
msgid "The second footer widget area"
msgstr ""
#: functions.php:417
#: functions.php:420
msgid "Third Footer Widget Area"
msgstr ""
#: functions.php:419
#: functions.php:422
msgid "The third footer widget area"
msgstr ""
#: functions.php:428
#: functions.php:431
msgid "Fourth Footer Widget Area"
msgstr ""
#: functions.php:430
#: functions.php:433
msgid "The fourth footer widget area"
msgstr ""
#: functions.php:460
#: functions.php:467
msgid ""
"<span class=\"%1$s\">Posted on</span> %2$s <span class=\"meta-sep\">by</"
"span> %3$s"
msgstr ""
#: functions.php:486
#: functions.php:493
msgid ""
"This entry was posted in %1$s and tagged %2$s. Bookmark the <a href=\"%3$s\" "
"title=\"Permalink to %4$s\" rel=\"bookmark\">permalink</a>."
msgstr ""
#: functions.php:488
#: functions.php:495
msgid ""
"This entry was posted in %1$s. Bookmark the <a href=\"%3$s\" title="
"\"Permalink to %4$s\" rel=\"bookmark\">permalink</a>."
msgstr ""
#: functions.php:490
#: functions.php:497
msgid ""
"Bookmark the <a href=\"%3$s\" title=\"Permalink to %4$s\" rel=\"bookmark"
"\">permalink</a>."

View File

@@ -57,7 +57,7 @@
<?php /* How to display posts of the Gallery format. The gallery category is the old way. */ ?>
<?php if ( 'gallery' == get_post_format( $post->ID ) || in_category( _x( 'gallery', 'gallery category slug', 'twentyten' ) ) ) : ?>
<?php if ( ( function_exists( 'get_post_format' ) && 'gallery' == get_post_format( $post->ID ) ) || in_category( _x( 'gallery', 'gallery category slug', 'twentyten' ) ) ) : ?>
<div id="post-<?php the_ID(); ?>" <?php post_class(); ?>>
<h2 class="entry-title"><a href="<?php the_permalink(); ?>" title="<?php printf( esc_attr__( 'Permalink to %s', 'twentyten' ), the_title_attribute( 'echo=0' ) ); ?>" rel="bookmark"><?php the_title(); ?></a></h2>
@@ -89,7 +89,7 @@
</div><!-- .entry-content -->
<div class="entry-utility">
<?php if ( 'gallery' == get_post_format( $post->ID ) ) : ?>
<?php if ( function_exists( 'get_post_format' ) && 'gallery' == get_post_format( $post->ID ) ) : ?>
<a href="<?php echo get_post_format_link( 'gallery' ); ?>" title="<?php esc_attr_e( 'View Galleries', 'twentyten' ); ?>"><?php _e( 'More Galleries', 'twentyten' ); ?></a>
<span class="meta-sep">|</span>
<?php elseif ( in_category( _x( 'gallery', 'gallery category slug', 'twentyten' ) ) ) : ?>
@@ -103,7 +103,7 @@
<?php /* How to display posts of the Aside format. The asides category is the old way. */ ?>
<?php elseif ( 'aside' == get_post_format( $post->ID ) || in_category( _x( 'asides', 'asides category slug', 'twentyten' ) ) ) : ?>
<?php elseif ( ( function_exists( 'get_post_format' ) && 'aside' == get_post_format( $post->ID ) ) || in_category( _x( 'asides', 'asides category slug', 'twentyten' ) ) ) : ?>
<div id="post-<?php the_ID(); ?>" <?php post_class(); ?>>
<?php if ( is_archive() || is_search() ) : // Display excerpts for archives and search. ?>

View File

@@ -145,9 +145,9 @@ function wp_admin_bar_shortlink_menu() {
if ( empty( $short ) )
return;
$html = '<input class="shortlink-input" type="text" readonly="readonly" value="' . esc_attr( $short ) . '" />';
$wp_admin_bar->add_menu( array(
'id' => $id,
'title' => __( 'Shortlink' ),
@@ -337,14 +337,14 @@ function show_admin_bar( $show ) {
* @return bool Whether the admin bar should be showing.
*/
function is_admin_bar_showing() {
global $show_admin_bar;
global $show_admin_bar, $pagenow;
/* For all these types of request we never want an admin bar period */
if ( defined('XMLRPC_REQUEST') || defined('APP_REQUEST') || defined('DOING_AJAX') || defined('IFRAME_REQUEST') )
return false;
if ( ! isset( $show_admin_bar ) ) {
if ( ! is_user_logged_in() ) {
if ( ! is_user_logged_in() || 'wp-login.php' == $pagenow ) {
$show_admin_bar = false;
} else {
$context = is_admin() ? 'admin' : 'front';

View File

@@ -35,9 +35,9 @@
* not needed or the string of the URL
*/
function redirect_canonical( $requested_url = null, $do_redirect = true ) {
global $wp_rewrite, $is_iis7, $wp_query, $wpdb;
global $wp_rewrite, $is_IIS, $wp_query, $wpdb;
if ( is_trackback() || is_search() || is_comments_popup() || is_admin() || !empty($_POST) || is_preview() || is_robots() || ( $is_iis7 && !iis7_supports_permalinks() ) )
if ( is_trackback() || is_search() || is_comments_popup() || is_admin() || !empty($_POST) || is_preview() || is_robots() || $is_IIS )
return;
if ( !$requested_url ) {
@@ -150,7 +150,7 @@ function redirect_canonical( $requested_url = null, $do_redirect = true ) {
$term_count += count( $tax_query['terms'] );
$obj = $wp_query->get_queried_object();
if ( $term_count <= 1 && !empty($obj->term_id) && ( $tax_url = get_term_link((int)$obj->term_id, $obj->taxonomy) ) && !is_wp_error($tax_url) ) {
if ( $term_count <= 1 && !empty($obj->term_id) && ( $tax_url = get_term_link((int)$obj->term_id, $obj->taxonomy) ) && !is_wp_error($tax_url) && !empty($redirect['query']) ) {
if ( !empty($redirect['query']) ) {
if ( is_category() ) {
$redirect['query'] = remove_query_arg( array( 'category_name', 'category', 'cat'), $redirect['query']);
@@ -195,7 +195,7 @@ function redirect_canonical( $requested_url = null, $do_redirect = true ) {
}
$addl_path = '';
if ( is_feed() ) {
if ( is_feed() && in_array( get_query_var('feed'), $wp_rewrite->feeds ) ) {
$addl_path = !empty( $addl_path ) ? trailingslashit($addl_path) : '';
if ( get_query_var( 'withcomments' ) )
$addl_path .= 'comments/';

View File

@@ -12,11 +12,19 @@
* @since 1.0.0
* @see get_term_link()
*
* @param int $category_id Category ID.
* @return string|WP_Error Link on success, WP_Error if category does not exist.
* @param int|object $category Category ID or object.
* @return string Link on success, empty string if category does not exist.
*/
function get_category_link( $category_id ) {
return get_term_link((int)$category_id, 'category');
function get_category_link( $category ) {
if ( ! is_object( $category ) )
$category = (int) $category;
$category = get_term_link( $category, 'category' );
if ( is_wp_error( $category ) )
return '';
return $category;
}
/**
@@ -964,11 +972,19 @@ class Walker_CategoryDropdown extends Walker {
* @since 2.3.0
* @see get_term_link()
*
* @param int $tag_id Tag (term) ID.
* @return string|WP_Error Link on success, WP_Error if tag does not exist.
* @param int|object $tag Tag ID or object.
* @return string Link on success, empty string if tag does not exist.
*/
function get_tag_link( $tag_id ) {
return get_term_link( (int)$tag_id, 'post_tag');
function get_tag_link( $tag ) {
if ( ! is_object( $tag ) )
$tag = (int) $tag;
$tag = get_term_link( $tag, 'post_tag' );
if ( is_wp_error( $tag ) )
return '';
return $tag;
}
/**

View File

@@ -12,7 +12,7 @@
*
* Licensed under the GNU GPL. For full terms see the file COPYING.
* @license http://opensource.org/licenses/gpl-license.php GNU General Public License
*
*
* pop3 class
*
* $Id$

View File

@@ -115,7 +115,7 @@ class WP_Admin_Bar {
function recursive_render( $id, &$menu_item ) { ?>
<?php
$is_parent = ! empty( $menu_item['children'] );
$menuclass = $is_parent ? 'menupop' : '';
if ( ! empty( $menu_item['meta']['class'] ) )
$menuclass .= ' ' . $menu_item['meta']['class'];

View File

@@ -1 +1 @@
#wpadminbar{background:#666 url(../images/admin-bar-sprite-rtl.png?d=08102010) 0 -222px repeat-x;direction:rtl;font-family:Tahoma,Arial,sans-serif;right:0;left:auto;}#wpadminbar .quicklinks ul{text-align:right;}#wpadminbar .quicklinks ul li{float:right;}#wpadminbar .quicklinks>ul>li>a{border-left:1px solid #686868;border-right:1px solid #808080;}#wpadminbar .quicklinks>ul>li:last-child>a{border-left:none;border-right:1px solid #808080;}#wpadminbar .quicklinks>ul>li:hover>a{border-right-color:#707070;border-left-color:#686868;}#wpadminbar .quicklinks li#wp-admin-bar-my-account-with-avatar a img{margin:-2px -5px 0 23px;}#wpadminbar .quicklinks li#wp-admin-bar-my-account-with-avatar ul{left:auto;right:30px;}#wpadminbar .quicklinks .menupop li:hover>ul,#wpadminbar .quicklinks .menupop li.hover>ul{margin-right:100%;margin-left:0;}#wpadminbar .quicklinks .menupop a>span{background:url(../images/admin-bar-sprite-rtl.png?d=11122010) left -58px no-repeat;padding-right:0;padding-left:.8em;}#wpadminbar .quicklinks .menupop ul li a>span{background:url(../images/admin-bar-sprite-rtl.png?d=11122010) left -29px no-repeat;padding-right:0;padding-left:1.5em;}#wpadminbar .quicklinks a{font-family:Tahoma,Arial,Helvetica,sans-serif;}#wpadminbar .quicklinks .menupop li a img.blavatar{margin-right:0;margin-left:8px;}#wpadminbar .quicklinks li#wp-admin-bar-my-account-with-avatar>a{background:url(../images/admin-bar-sprite-rtl.png?d=11122010) top right no-repeat;}#wpadminbar .quicklinks li#wp-admin-bar-my-account>a,#wpadminbar .quicklinks li#wp-admin-bar-my-account-with-avatar>a{border-right:none;border-left:1px solid #686868;}#wpadminbar #adminbarsearch{float:left;}#wpadminbar #adminbarsearch .adminbar-input{float:right;font-family:Tahoma,Arial,Helvetica,sans-serif;margin-right:0;margin-left:3px;-moz-box-shadow:inset 2px -2px 1px #cdcdcd;-webkit-box-shadow:inset -2px 2px 1px #cdcdcd;box-shadow:inset 2px -2px 1px #cdcdcd;}#wpadminbar #adminbarsearch .adminbar-button{float:right;font-family:Tahoma,Arial,Helvetica,sans-serif;}
#wpadminbar{direction:rtl;font-family:Tahoma,Arial,sans-serif;right:0;left:auto;}#wpadminbar .quicklinks ul{text-align:right;}#wpadminbar .quicklinks ul li{float:right;}#wpadminbar .quicklinks>ul>li>a{border-left:1px solid #686868;border-right:1px solid #808080;}#wpadminbar .quicklinks>ul>li:last-child>a{border-left:none;border-right:1px solid #808080;}#wpadminbar .quicklinks>ul>li:hover>a{border-right-color:#707070;border-left-color:#686868;}#wpadminbar .quicklinks li#wp-admin-bar-my-account-with-avatar a img{margin:-2px -5px 0 23px;}#wpadminbar .quicklinks li#wp-admin-bar-my-account-with-avatar ul{left:auto;right:30px;}#wpadminbar .quicklinks .menupop li:hover>ul,#wpadminbar .quicklinks .menupop li.hover>ul{margin-right:100%;margin-left:0;}#wpadminbar .quicklinks .menupop a>span{background:url(../images/admin-bar-sprite-rtl.png?d=11122010) left -58px no-repeat;padding-right:0;padding-left:.8em;}#wpadminbar .quicklinks .menupop ul li a>span{background:url(../images/admin-bar-sprite-rtl.png?d=11122010) left -29px no-repeat;padding-right:0;padding-left:1.5em;}#wpadminbar .quicklinks a{font-family:Tahoma,Arial,Helvetica,sans-serif;}#wpadminbar .quicklinks .menupop li a img.blavatar{margin-right:0;margin-left:8px;}#wpadminbar .quicklinks li#wp-admin-bar-my-account-with-avatar>a{background:url(../images/admin-bar-sprite-rtl.png?d=11122010) top right no-repeat;}#wpadminbar .quicklinks li#wp-admin-bar-my-account>a,#wpadminbar .quicklinks li#wp-admin-bar-my-account-with-avatar>a{border-right:none;border-left:1px solid #686868;}#wpadminbar #adminbarsearch{float:left;}#wpadminbar #adminbarsearch .adminbar-input{float:right;font-family:Tahoma,Arial,Helvetica,sans-serif;margin-right:0;margin-left:3px;-moz-box-shadow:inset 2px -2px 1px #cdcdcd;-webkit-box-shadow:inset -2px 2px 1px #cdcdcd;box-shadow:inset 2px -2px 1px #cdcdcd;}#wpadminbar #adminbarsearch .adminbar-button{float:right;font-family:Tahoma,Arial,Helvetica,sans-serif;}

View File

@@ -1,5 +1,4 @@
#wpadminbar {
background: #666 url(../images/admin-bar-sprite-rtl.png?d=08102010) 0 -222px repeat-x;
direction: rtl;
font-family: Tahoma, Arial ,sans-serif;
right: 0;

File diff suppressed because one or more lines are too long

View File

@@ -192,6 +192,8 @@
}
#wpadminbar .quicklinks li#wp-admin-bar-my-account-with-avatar > a img {
width: 16px;
height: 16px;
display: inline;
border: 1px solid #999;
vertical-align: middle;
@@ -205,6 +207,10 @@
left: 30px;
}
#wpadminbar .quicklinks li#wp-admin-bar-my-account-with-avatar ul ul {
left: 0;
}
#wpadminbar .quicklinks .menupop li a img.blavatar {
vertical-align: middle;
margin: 0 8px 0 0;

View File

@@ -36,9 +36,10 @@ foreach ( array( 'pre_term_description', 'pre_link_description', 'pre_link_notes
// Kses only for textarea admin displays
if ( is_admin() ) {
foreach ( array( 'term_description', 'link_description', 'link_notes', 'user_description', 'comment_text' ) as $filter ) {
foreach ( array( 'term_description', 'link_description', 'link_notes', 'user_description' ) as $filter ) {
add_filter( $filter, 'wp_kses_data' );
}
add_filter( 'comment_text', 'wp_kses_post' );
}
// Email saves
@@ -81,6 +82,9 @@ foreach ( array( 'pre_term_slug' ) as $filter ) {
foreach ( array( 'pre_post_type' ) as $filter ) {
add_filter( $filter, 'sanitize_user' );
}
foreach ( array( 'pre_post_status', 'pre_post_comment_status', 'pre_post_ping_status' ) as $filter ) {
add_filter( $filter, 'sanitize_key' );
}
// Places to balance tags on input
foreach ( array( 'content_save_pre', 'excerpt_save_pre', 'comment_save_pre', 'pre_comment_content' ) as $filter ) {
@@ -212,7 +216,6 @@ add_action( 'wp_head', 'wp_shortlink_wp_head', 10, 0 );
add_action( 'template_redirect', 'wp_shortlink_header', 11, 0 );
// Login actions
add_action( 'login_head', 'wp_enqueue_scripts', 1 );
add_action( 'login_head', 'wp_print_head_scripts', 9 );
add_action( 'login_footer', 'wp_print_footer_scripts' );

View File

@@ -1386,7 +1386,11 @@ function _make_email_clickable_cb($matches) {
function make_clickable($ret) {
$ret = ' ' . $ret;
// in testing, using arrays here was found to be faster
$ret = preg_replace_callback('#(?<!=[\'"])(?<=[*\')+.,;:!&$\s>])(\()?([\w]+?://(?:[\w\\x80-\\xff\#%~/?@\[\]-]|[\'*(+.,;:!=&$](?![\b\)]|(\))?([\s]|$))|(?(1)\)(?![\s<.,;:]|$)|\)))+)#is', '_make_url_clickable_cb', $ret);
$save = @ini_set('pcre.recursion_limit', 10000);
$retval = preg_replace_callback('#(?<!=[\'"])(?<=[*\')+.,;:!&$\s>])(\()?([\w]+?://(?:[\w\\x80-\\xff\#%~/?@\[\]-]{1,2000}|[\'*(+.,;:!=&$](?![\b\)]|(\))?([\s]|$))|(?(1)\)(?![\s<.,;:]|$)|\)))+)#is', '_make_url_clickable_cb', $ret);
if (null !== $retval )
$ret = $retval;
@ini_set('pcre.recursion_limit', $save);
$ret = preg_replace_callback('#([\s>])((www|ftp)\.[\w\\x80-\\xff\#$%&~/.\-;:=,?@\[\]+]+)#is', '_make_web_ftp_clickable_cb', $ret);
$ret = preg_replace_callback('#([\s>])([.0-9a-z_+-]+)@(([0-9a-z-]+\.)+[0-9a-z]{2,})#i', '_make_email_clickable_cb', $ret);
// this one is not in an array because we need it to run last, for cleanup of accidental links within links
@@ -2734,10 +2738,10 @@ function wp_html_excerpt( $str, $count ) {
* @return string The processed content.
*/
function links_add_base_url( $content, $base, $attrs = array('src', 'href') ) {
global $_links_add_base;
$_links_add_base = $base;
$attrs = implode('|', (array)$attrs);
return preg_replace_callback("!($attrs)=(['\"])(.+?)\\2!i",
create_function('$m', 'return _links_add_base($m, "' . $base . '");'),
$content);
return preg_replace_callback( "!($attrs)=(['\"])(.+?)\\2!i", '_links_add_base', $content );
}
/**
@@ -2747,14 +2751,14 @@ function links_add_base_url( $content, $base, $attrs = array('src', 'href') ) {
* @access private
*
* @param string $m The matched link.
* @param string $base The base URL to prefix to links.
* @return string The processed link.
*/
function _links_add_base($m, $base) {
function _links_add_base($m) {
global $_links_add_base;
//1 = attribute name 2 = quotation mark 3 = URL
return $m[1] . '=' . $m[2] .
(strpos($m[3], 'http://') === false ?
path_join($base, $m[3]) :
path_join($_links_add_base, $m[3]) :
$m[3])
. $m[2];
}
@@ -2775,10 +2779,10 @@ function _links_add_base($m, $base) {
* @return string The processed content.
*/
function links_add_target( $content, $target = '_blank', $tags = array('a') ) {
global $_links_add_target;
$_links_add_target = $target;
$tags = implode('|', (array)$tags);
return preg_replace_callback("!<($tags)(.+?)>!i",
create_function('$m', 'return _links_add_target($m, "' . $target . '");'),
$content);
return preg_replace_callback( "!<($tags)(.+?)>!i", '_links_add_target', $content );
}
/**
@@ -2788,13 +2792,13 @@ function links_add_target( $content, $target = '_blank', $tags = array('a') ) {
* @access private
*
* @param string $m The matched link.
* @param string $target The Target to add to the links.
* @return string The processed link.
*/
function _links_add_target( $m, $target ) {
function _links_add_target( $m ) {
global $_links_add_target;
$tag = $m[1];
$link = preg_replace('|(target=[\'"](.*?)[\'"])|i', '', $m[2]);
return '<' . $tag . $link . ' target="' . $target . '">';
return '<' . $tag . $link . ' target="' . esc_attr( $_links_add_target ) . '">';
}
// normalize EOL characters and strip duplicate whitespace

View File

@@ -3034,6 +3034,9 @@ function wp_array_slice_assoc( $array, $keys ) {
* @return array A list of objects or object fields
*/
function wp_filter_object_list( $list, $args = array(), $operator = 'and', $field = false ) {
if ( ! is_array( $list ) )
return array();
$list = wp_list_filter( $list, $args, $operator );
if ( $field )
@@ -3057,6 +3060,9 @@ function wp_filter_object_list( $list, $args = array(), $operator = 'and', $fiel
* @return array
*/
function wp_list_filter( $list, $args = array(), $operator = 'AND' ) {
if ( ! is_array( $list ) )
return array();
if ( empty( $args ) )
return $list;
@@ -3066,7 +3072,7 @@ function wp_list_filter( $list, $args = array(), $operator = 'AND' ) {
foreach ( $list as $key => $obj ) {
$matched = count( array_intersect_assoc( (array) $obj, $args ) );
if ( ( 'AND' == $operator && $matched == $count )
if ( ( 'AND' == $operator && $matched == $count )
|| ( 'OR' == $operator && $matched <= $count )
|| ( 'NOT' == $operator && 0 == $matched ) ) {
$filtered[$key] = $obj;
@@ -4296,7 +4302,7 @@ function get_file_data( $file, $default_headers, $context = '' ) {
}
foreach ( $all_headers as $field => $regex ) {
preg_match( '/^[ \t\/*#]*' . preg_quote( $regex, '/' ) . ':(.*)$/mi', $file_data, ${$field});
preg_match( '/^[ \t\/*#@]*' . preg_quote( $regex, '/' ) . ':(.*)$/mi', $file_data, ${$field});
if ( !empty( ${$field} ) )
${$field} = _cleanup_header_comment( ${$field}[1] );
else

View File

@@ -53,11 +53,11 @@
/* remove the hover class for any objects not in the immediate element's ancestry */
i = q.length;
while ( i-- ) {
inA = false;
inA = false;
ancestorLength = ancestors.length;
while( ancestorLength-- ) {
if ( ancestors[ ancestorLength ] == q[i][1] )
inA = true;
if ( ancestors[ ancestorLength ] == q[i][1] )
inA = true;
}
if ( ! inA )

View File

@@ -0,0 +1,32 @@
/**
* SWFUpload: http://www.swfupload.org, http://swfupload.googlecode.com
*
* mmSWFUpload 1.0: Flash upload dialog - http://profandesign.se/swfupload/, http://www.vinterwebb.se/
*
* SWFUpload is (c) 2006-2007 Lars Huring, Olov Nilzén and Mammon Media and is released under the MIT License:
* http://www.opensource.org/licenses/mit-license.php
*
* SWFUpload 2 is (c) 2007-2008 Jake Roberts and is released under the MIT License:
* http://www.opensource.org/licenses/mit-license.php
*
*/
The MIT License
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in
all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
THE SOFTWARE.

File diff suppressed because one or more lines are too long

View File

@@ -847,6 +847,8 @@ function get_post_type_archive_link( $post_type ) {
$struct = ( true === $post_type_obj->has_archive ) ? $post_type_obj->rewrite['slug'] : $post_type_obj->has_archive;
if ( $post_type_obj->rewrite['with_front'] )
$struct = $wp_rewrite->front . $struct;
else
$struct = $wp_rewrite->root . $struct;
$link = home_url( user_trailingslashit( $struct, 'post_type_archive' ) );
} else {
$link = home_url( '?post_type=' . $post_type );
@@ -2411,7 +2413,7 @@ function wp_shortlink_wp_head() {
if ( empty( $shortlink ) )
return;
echo "<link rel='shortlink' href='" . esc_url_raw( $shortlink ) . "' />\n";
echo "<link rel='shortlink' href='" . esc_url( $shortlink ) . "' />\n";
}
/**

View File

@@ -368,19 +368,19 @@ function update_meta_cache($meta_type, $object_ids) {
* Possible values: 'NUMERIC', 'BINARY', 'CHAR', 'DATE', 'DATETIME', 'DECIMAL', 'SIGNED', 'TIME', 'UNSIGNED'.
* Default: 'CHAR'
*
* @param string $meta_type
* @param string $type Type of meta
* @param string $primary_table
* @param string $primary_id_column
* @param object $context (optional) The main query object
* @return array( 'join' => $join_sql, 'where' => $where_sql )
*/
function _get_meta_sql( $meta_query, $meta_type, $primary_table, $primary_id_column, $context = null ) {
function _get_meta_sql( $meta_query, $type, $primary_table, $primary_id_column, $context = null ) {
global $wpdb;
if ( ! $meta_table = _get_meta_table( $meta_type ) )
if ( ! $meta_table = _get_meta_table( $type ) )
return false;
$meta_id_column = esc_sql( $meta_type . '_id' );
$meta_id_column = esc_sql( $type . '_id' );
$join = '';
$where = '';
@@ -442,7 +442,7 @@ function _get_meta_sql( $meta_query, $meta_type, $primary_table, $primary_id_col
$where .= $wpdb->prepare( " AND CAST($alias.meta_value AS {$meta_type}) {$meta_compare} {$meta_compare_string}", $meta_value );
}
return apply_filters_ref_array( 'get_meta_sql', array( compact( 'join', 'where' ), $meta_query, $meta_type, $primary_table, $primary_id_column, &$context ) );
return apply_filters_ref_array( 'get_meta_sql', array( compact( 'join', 'where' ), $meta_query, $type, $primary_table, $primary_id_column, &$context ) );
}
/**

View File

@@ -209,8 +209,10 @@ function add_user_to_blog( $blog_id, $user_id, $role ) {
$user = new WP_User($user_id);
if ( empty( $user->ID ) )
if ( empty( $user->ID ) ) {
restore_current_blog();
return new WP_Error('user_does_not_exist', __('That user does not exist.'));
}
if ( !get_user_meta($user_id, 'primary_blog', true) ) {
update_user_meta($user_id, 'primary_blog', $blog_id);
@@ -269,8 +271,10 @@ function remove_user_from_blog($user_id, $blog_id = '', $reassign = '') {
// wp_revoke_user($user_id);
$user = new WP_User($user_id);
if ( empty( $user->ID ) )
if ( empty( $user->ID ) ) {
restore_current_blog();
return new WP_Error('user_does_not_exist', __('That user does not exist.'));
}
$user->remove_all_caps();

View File

@@ -835,7 +835,7 @@ function check_admin_referer($action = -1, $query_arg = '_wpnonce') {
$adminurl = strtolower(admin_url());
$referer = strtolower(wp_get_referer());
$result = isset($_REQUEST[$query_arg]) ? wp_verify_nonce($_REQUEST[$query_arg], $action) : false;
if ( !$result && !(-1 == $action && strpos($referer, $adminurl) !== false) ) {
if ( !$result && !(-1 == $action && strpos($referer, $adminurl) === 0) ) {
wp_nonce_ays($action);
die();
}

View File

@@ -1100,9 +1100,8 @@ class Walker_PageDropdown extends Walker {
if ( $page->ID == $args['selected'] )
$output .= ' selected="selected"';
$output .= '>';
$title = esc_html($page->post_title);
$title = apply_filters( 'list_pages', $page->post_title );
$output .= "$pad$title";
$output .= $pad . esc_html( $title );
$output .= "</option>\n";
}
}

View File

@@ -487,6 +487,9 @@ function get_post_mime_type($ID = '') {
function get_post_format( $post = null ) {
$post = get_post($post);
if ( ! post_type_supports( $post->post_type, 'post-formats' ) )
return false;
$_format = get_the_terms( $post->ID, 'post_format' );
if ( empty( $_format ) )
@@ -982,6 +985,11 @@ function register_post_type($post_type, $args = array()) {
if ( $args->has_archive ) {
$archive_slug = $args->has_archive === true ? $args->rewrite['slug'] : $args->has_archive;
if ( $args->rewrite['with_front'] )
$archive_slug = substr( $wp_rewrite->front, 1 ) . $archive_slug;
else
$archive_slug = $wp_rewrite->root . $archive_slug;
$wp_rewrite->add_rule( "{$archive_slug}/?$", "index.php?post_type=$post_type", 'top' );
if ( $args->rewrite['feeds'] && $wp_rewrite->feeds ) {
$feeds = '(' . trim( implode( '|', $wp_rewrite->feeds ) ) . ')';
@@ -5066,27 +5074,26 @@ function get_post_format_strings() {
}
/**
* Retrieves an array of (translated and sanitized) post format slugs.
* Retrieves an array of post format slugs.
*
* @since 3.1.0
*
* @uses sanitize_title_with_dashes()
* @return array The array of (translated and sanitized) post format slugs.
* @return array The array of post format slugs.
*/
function get_post_format_slugs() {
// 3.2-early: use array_combine() and array_keys( get_post_format_strings() )
$slugs = array(
'standard' => _x( 'standard', 'Post format slug' ),
'aside' => _x( 'aside', 'Post format slug' ),
'chat' => _x( 'chat', 'Post format slug' ),
'gallery' => _x( 'gallery', 'Post format slug' ),
'link' => _x( 'link', 'Post format slug' ),
'image' => _x( 'image', 'Post format slug' ),
'quote' => _x( 'quote', 'Post format slug' ),
'status' => _x( 'status', 'Post format slug' ),
'video' => _x( 'video', 'Post format slug' ),
'audio' => _x( 'audio', 'Post format slug' ),
'standard' => 'standard', // Special case. any value that evals to false will be considered standard
'aside' => 'aside',
'chat' => 'chat',
'gallery' => 'gallery',
'link' => 'link',
'image' => 'image',
'quote' => 'quote',
'status' => 'status',
'video' => 'video',
'audio' => 'audio',
);
$slugs = array_map( 'sanitize_title_with_dashes', $slugs );
return $slugs;
}
@@ -5152,7 +5159,7 @@ function get_post_format_link( $format ) {
function _post_format_request( $qvs ) {
if ( ! isset( $qvs['post_format'] ) )
return $qvs;
$slugs = array_flip( get_post_format_slugs() );
$slugs = get_post_format_slugs();
if ( isset( $slugs[ $qvs['post_format'] ] ) )
$qvs['post_format'] = 'post-format-' . $slugs[ $qvs['post_format'] ];
$tax = get_taxonomy( 'post_format' );
@@ -5171,9 +5178,8 @@ function _post_format_link( $link, $term, $taxonomy ) {
global $wp_rewrite;
if ( 'post_format' != $taxonomy )
return $link;
$slugs = get_post_format_slugs();
if ( $wp_rewrite->get_extra_permastruct( $taxonomy ) ) {
return str_replace( "/{$term->slug}", '/' . $slugs[ str_replace( 'post-format-', '', $term->slug ) ], $link );
return str_replace( "/{$term->slug}", '/' . str_replace( 'post-format-', '', $term->slug ), $link );
} else {
$link = remove_query_arg( 'post_format', $link );
return add_query_arg( 'post_format', str_replace( 'post-format-', '', $term->slug ), $link );
@@ -5235,4 +5241,4 @@ function _post_format_wp_get_object_terms( $terms ) {
}
add_filter( 'wp_get_object_terms', '_post_format_wp_get_object_terms' );
?>
?>

View File

@@ -1231,13 +1231,22 @@ class WP_Query {
var $is_post_type_archive = false;
/**
* Whether the tax query has been parsed once.
* Stores the ->query_vars state like md5(serialize( $this->query_vars ) ) so we know
* whether we have to re-parse because something has changed
*
* @since 3.1.0
* @access private
* @var bool
*/
var $parsed_tax_query = false;
var $query_vars_hash = false;
/**
* Whether query vars have changed since the initial parse_query() call. Used to catch modifications to query vars made
* via pre_get_posts hooks.
*
* @since 3.1.1
* @access private
*/
var $query_vars_changed = true;
/**
* Resets query flags to false.
@@ -1312,7 +1321,7 @@ class WP_Query {
* @access public
*/
function parse_query_vars() {
$this->parse_query('');
$this->parse_query();
}
/**
@@ -1383,16 +1392,19 @@ class WP_Query {
* @since 1.5.0
* @access public
*
* @param string|array $query
* @param string|array $query Optional query.
*/
function parse_query($query) {
if ( !empty($query) || !isset($this->query) ) {
function parse_query( $query = '' ) {
if ( ! empty( $query ) ) {
$this->init();
$this->query = $this->query_vars = wp_parse_args($query);
$this->query = $this->query_vars = wp_parse_args( $query );
} elseif ( ! isset( $this->query ) ) {
$this->query = $this->query_vars;
}
$this->query_vars = $this->fill_query_vars($this->query_vars);
$qv = &$this->query_vars;
$this->query_vars_changed = true;
if ( ! empty($qv['robots']) )
$this->is_robots = true;
@@ -1494,11 +1506,11 @@ class WP_Query {
$this->is_date = true;
}
$this->parsed_tax_query = false;
$this->query_vars_hash = false;
$this->parse_tax_query( $qv );
foreach ( $this->tax_query->queries as $tax_query ) {
if ( 'IN' == $tax_query['operator'] ) {
if ( 'NOT IN' != $tax_query['operator'] ) {
switch ( $tax_query['taxonomy'] ) {
case 'category':
$this->is_category = true;
@@ -1568,7 +1580,7 @@ class WP_Query {
// Correct is_* for page_on_front and page_for_posts
if ( $this->is_home && 'page' == get_option('show_on_front') && get_option('page_on_front') ) {
$_query = wp_parse_args($query);
$_query = wp_parse_args($this->query);
// pagename can be set and empty depending on matched rewrite rules. Ignore an empty pagename.
if ( isset($_query['pagename']) && '' == $_query['pagename'] )
unset($_query['pagename']);
@@ -1625,8 +1637,10 @@ class WP_Query {
if ( '404' == $qv['error'] )
$this->set_404();
if ( !empty($query) )
do_action_ref_array('parse_query', array(&$this));
$this->query_vars_hash = md5( serialize( $this->query_vars ) );
$this->query_vars_changed = false;
do_action_ref_array('parse_query', array(&$this));
}
/*
@@ -1653,6 +1667,9 @@ class WP_Query {
}
foreach ( $GLOBALS['wp_taxonomies'] as $taxonomy => $t ) {
if ( 'post_tag' == $taxonomy )
continue; // Handled further down in the $q['tag'] block
if ( $t->query_var && !empty( $q[$t->query_var] ) ) {
$tax_query_defaults = array(
'taxonomy' => $taxonomy,
@@ -1681,7 +1698,7 @@ class WP_Query {
}
// Category stuff
if ( !empty($q['cat']) && '0' != $q['cat'] && !$this->is_singular && !$this->parsed_tax_query ) {
if ( !empty($q['cat']) && '0' != $q['cat'] && !$this->is_singular && $this->query_vars_changed ) {
$q['cat'] = ''.urldecode($q['cat']).'';
$q['cat'] = addslashes_gpc($q['cat']);
$cat_array = preg_split('/[,\s]+/', $q['cat']);
@@ -1719,7 +1736,7 @@ class WP_Query {
'taxonomy' => 'category',
'terms' => $q['category__not_in'],
'operator' => 'NOT IN',
'include_children' => false
'include_children' => false
);
}
@@ -1735,7 +1752,7 @@ class WP_Query {
}
// Tag stuff
if ( '' != $q['tag'] && !$this->is_singular && !$this->parsed_tax_query ) {
if ( '' != $q['tag'] && !$this->is_singular && $this->query_vars_changed ) {
if ( strpos($q['tag'], ',') !== false ) {
$tags = preg_split('/[,\s]+/', $q['tag']);
foreach ( (array) $tags as $tag ) {
@@ -1789,7 +1806,7 @@ class WP_Query {
}
if ( !empty($q['tag_slug__in']) ) {
$q['tag_slug__in'] = array_map('sanitize_title', (array) $q['tag_slug__in']);
$q['tag_slug__in'] = array_map('sanitize_title', array_unique( (array) $q['tag_slug__in'] ) );
$tax_query[] = array(
'taxonomy' => 'post_tag',
'terms' => $q['tag_slug__in'],
@@ -1798,7 +1815,7 @@ class WP_Query {
}
if ( !empty($q['tag_slug__and']) ) {
$q['tag_slug__and'] = array_map('sanitize_title', (array) $q['tag_slug__and']);
$q['tag_slug__and'] = array_map('sanitize_title', array_unique( (array) $q['tag_slug__and'] ) );
$tax_query[] = array(
'taxonomy' => 'post_tag',
'terms' => $q['tag_slug__and'],
@@ -1807,8 +1824,6 @@ class WP_Query {
);
}
$this->parsed_tax_query = true;
$this->tax_query = new WP_Tax_Query( $tax_query );
}
@@ -1871,13 +1886,24 @@ class WP_Query {
function &get_posts() {
global $wpdb, $user_ID, $_wp_using_ext_object_cache;
$this->parse_query();
do_action_ref_array('pre_get_posts', array(&$this));
// Shorthand.
$q = &$this->query_vars;
// Fill again in case pre_get_posts unset some vars.
$q = $this->fill_query_vars($q);
// Set a flag if a pre_get_posts hook changed the query vars.
$hash = md5( serialize( $this->query_vars ) );
if ( $hash != $this->query_vars_hash ) {
$this->query_vars_changed = true;
$this->query_vars_hash = $hash;
}
unset($hash);
// First let's clear some variables
$distinct = '';
$whichauthor = '';
@@ -2144,12 +2170,14 @@ class WP_Query {
$search = apply_filters_ref_array('posts_search', array( $search, &$this ) );
// Taxonomies
$this->parse_tax_query( $q );
if ( !$this->is_singular ) {
$this->parse_tax_query( $q );
$clauses = $this->tax_query->get_sql( $wpdb->posts, 'ID' );
$clauses = $this->tax_query->get_sql( $wpdb->posts, 'ID' );
$join .= $clauses['join'];
$where .= $clauses['where'];
$join .= $clauses['join'];
$where .= $clauses['where'];
}
if ( $this->is_tax ) {
if ( empty($post_type) ) {
@@ -2436,6 +2464,16 @@ class WP_Query {
$where .= ')';
}
// Parse the meta query again if query vars have changed.
if ( $this->query_vars_changed ) {
$meta_query_hash = md5( serialize( $q['meta_query'] ) );
$_meta_query = $q['meta_query'];
unset( $q['meta_query'] );
_parse_meta_query( $q );
if ( md5( serialize( $q['meta_query'] ) ) != $meta_query_hash && is_array( $_meta_query ) )
$q['meta_query'] = array_merge( $_meta_query, $q['meta_query'] );
}
if ( !empty( $q['meta_query'] ) ) {
$clauses = call_user_func_array( '_get_meta_sql', array( $q['meta_query'], 'post', $wpdb->posts, 'ID', &$this) );
$join .= $clauses['join'];
@@ -2851,8 +2889,9 @@ class WP_Query {
* @param string $query URL query string.
* @return array List of posts.
*/
function &query($query) {
$this->parse_query($query);
function &query( $query ) {
$this->init();
$this->query = $this->query_vars = wp_parse_args( $query );
return $this->get_posts();
}
@@ -2888,6 +2927,9 @@ class WP_Query {
if ( $term && ! is_wp_error($term) ) {
$this->queried_object = $term;
$this->queried_object_id = (int) $term->term_id;
if ( $this->is_category )
_make_cat_compat( $this->queried_object );
}
} elseif ( $this->is_post_type_archive ) {
$this->queried_object = get_post_type_object( $this->get('post_type') );

View File

@@ -1857,6 +1857,8 @@ class WP_Rewrite {
function add_permastruct($name, $struct, $with_front = true, $ep_mask = EP_NONE) {
if ( $with_front )
$struct = $this->front . $struct;
else
$struct = $this->root . $struct;
$this->extra_permastructs[$name] = array($struct, $ep_mask);
}

View File

@@ -262,7 +262,7 @@ function wp_default_scripts( &$scripts ) {
$scripts->add( 'user-profile', "/wp-admin/js/user-profile$suffix.js", array( 'jquery', 'password-strength-meter' ), '20110113' );
$scripts->add_data( 'user-profile', 'group', 1 );
$scripts->add( 'admin-bar', "/wp-includes/js/admin-bar$suffix.js", false, '20110112a' );
$scripts->add( 'admin-bar', "/wp-includes/js/admin-bar$suffix.js", false, '20110131' );
$scripts->add_data( 'admin-bar', 'group', 1 );
$scripts->add( 'wplink', "/wp-includes/js/tinymce/plugins/wplink/js/wplink$suffix.js", array('jquery'), '20110111' );
@@ -312,7 +312,7 @@ function wp_default_scripts( &$scripts ) {
$scripts->add( 'postbox', "/wp-admin/js/postbox$suffix.js", array('jquery-ui-sortable'), '20091012' );
$scripts->add_data( 'postbox', 'group', 1 );
$scripts->add( 'post', "/wp-admin/js/post$suffix.js", array('suggest', 'wp-lists', 'postbox'), '20101222' );
$scripts->add( 'post', "/wp-admin/js/post$suffix.js", array('suggest', 'wp-lists', 'postbox'), '20110203' );
$scripts->add_data( 'post', 'group', 1 );
$scripts->localize( 'post', 'postL10n', array(
'tagsUsed' => __('Tags used on this post:'),
@@ -471,7 +471,7 @@ function wp_default_styles( &$styles ) {
// Any rtl stylesheets that don't have a .dev version for ltr
$no_suffix = array( 'farbtastic' );
$styles->add( 'wp-admin', "/wp-admin/css/wp-admin$suffix.css", array(), '20110127' );
$styles->add( 'wp-admin', "/wp-admin/css/wp-admin$suffix.css", array(), '20110214' );
$styles->add( 'ie', "/wp-admin/css/ie$suffix.css", array(), '20101102' );
$styles->add_data( 'ie', 'conditional', 'lte IE 7' );
@@ -502,7 +502,7 @@ function wp_default_styles( &$styles ) {
$styles->add( 'jcrop', '/wp-includes/js/jcrop/jquery.Jcrop.css', array(), '0.9.8' );
$styles->add( 'imgareaselect', '/wp-includes/js/imgareaselect/imgareaselect.css', array(), '0.9.1' );
$styles->add( 'nav-menu', "/wp-admin/css/nav-menu$suffix.css", array(), '20100907' );
$styles->add( 'admin-bar', "/wp-includes/css/admin-bar$suffix.css", array(), '20110122' );
$styles->add( 'admin-bar', "/wp-includes/css/admin-bar$suffix.css", array(), '20110325' );
$styles->add( 'wp-jquery-ui-dialog', "/wp-includes/css/jquery-ui-dialog$suffix.css", array(), '20101224' );
$styles->add( 'wplink', "/wp-includes/js/tinymce/plugins/wplink/css/wplink$suffix.css", array(), '20101224' );

View File

@@ -15,6 +15,8 @@
* Creates the initial taxonomies when 'init' action is fired.
*/
function create_initial_taxonomies() {
global $wp_rewrite;
register_taxonomy( 'category', 'post', array(
'hierarchical' => true,
'update_count_callback' => '_update_post_term_count',
@@ -22,7 +24,7 @@ function create_initial_taxonomies() {
'rewrite' => did_action( 'init' ) ? array(
'hierarchical' => true,
'slug' => get_option('category_base') ? get_option('category_base') : 'category',
'with_front' => false) : false,
'with_front' => ( get_option('category_base') && ! $wp_rewrite->using_index_permalinks() ) ? false : true ) : false,
'public' => true,
'show_ui' => true,
'_builtin' => true,
@@ -34,7 +36,7 @@ function create_initial_taxonomies() {
'query_var' => 'tag',
'rewrite' => did_action( 'init' ) ? array(
'slug' => get_option('tag_base') ? get_option('tag_base') : 'tag',
'with_front' => false) : false,
'with_front' => ( get_option('category_base') && ! $wp_rewrite->using_index_permalinks() ) ? false : true ) : false,
'public' => true,
'show_ui' => true,
'_builtin' => true,
@@ -87,8 +89,8 @@ function create_initial_taxonomies() {
'public' => true,
'hierarchical' => false,
'labels' => array(
'name' => __( 'Format' ),
'singular_name' => __( 'Format' ),
'name' => _x( 'Format', 'post format' ),
'singular_name' => _x( 'Format', 'post format' ),
),
'query_var' => true,
'rewrite' => $rewrite,
@@ -329,7 +331,7 @@ function register_taxonomy( $taxonomy, $object_type, $args = array() ) {
$tag = '([^/]+)';
$wp_rewrite->add_rewrite_tag("%$taxonomy%", $tag, $args['query_var'] ? "{$args['query_var']}=" : "taxonomy=$taxonomy&term=");
$wp_rewrite->add_permastruct($taxonomy, "{$wp_rewrite->root}{$args['rewrite']['slug']}/%$taxonomy%", $args['rewrite']['with_front']);
$wp_rewrite->add_permastruct($taxonomy, "{$args['rewrite']['slug']}/%$taxonomy%", $args['rewrite']['with_front']);
}
if ( is_null($args['show_ui']) )
@@ -887,7 +889,10 @@ function get_term_by($field, $value, $taxonomy, $output = OBJECT, $filter = 'raw
$value = stripslashes($value);
$field = 't.name';
} else {
return get_term( (int) $value, $taxonomy, $output, $filter);
$term = get_term( (int) $value, $taxonomy, $output, $filter);
if ( is_wp_error( $term ) )
$term = false;
return $term;
}
$term = $wpdb->get_row( $wpdb->prepare( "SELECT t.*, tt.* FROM $wpdb->terms AS t INNER JOIN $wpdb->term_taxonomy AS tt ON t.term_id = tt.term_id WHERE tt.taxonomy = %s AND $field = %s LIMIT 1", $taxonomy, $value) );
@@ -2842,7 +2847,9 @@ function get_term_link( $term, $taxonomy = '') {
$t = get_taxonomy($taxonomy);
if ( empty($termlink) ) {
if ( $t->query_var )
if ( 'category' == $taxonomy )
$termlink = '?cat=' . $term->term_id;
elseif ( $t->query_var )
$termlink = "?$t->query_var=$slug";
else
$termlink = "?taxonomy=$taxonomy&term=$slug";

View File

@@ -438,7 +438,7 @@ class WP_User_Query {
$where = get_posts_by_author_sql('post');
$this->query_from .= " LEFT OUTER JOIN (
SELECT post_author, COUNT(*) as post_count
FROM wp_posts
FROM $wpdb->posts
$where
GROUP BY post_author
) p ON ({$wpdb->users}.ID = p.post_author)
@@ -542,13 +542,13 @@ class WP_User_Query {
*/
function query() {
global $wpdb;
if ( is_array( $this->query_vars['fields'] ) || 'all' == $this->query_vars['fields'] ) {
$this->results = $wpdb->get_results("SELECT $this->query_fields $this->query_from $this->query_where $this->query_orderby $this->query_limit");
} else {
$this->results = $wpdb->get_col("SELECT $this->query_fields $this->query_from $this->query_where $this->query_orderby $this->query_limit");
}
if ( $this->query_vars['count_total'] )
$this->total_users = $wpdb->get_var("SELECT COUNT(*) $this->query_from $this->query_where");

View File

@@ -22,21 +22,21 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
* @global string $wp_version
*/
$wp_version = '3.1-RC3-17365';
$wp_version = '3.1.2';
/**
* Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.
*
* @global int $wp_db_version
*/
$wp_db_version = 17056;
$wp_db_version = 17516;
/**
* Holds the TinyMCE version
*
* @global string $tinymce_version
*/
$tinymce_version = '3393';
$tinymce_version = '3393a';
/**
* Holds the cache manifest version

View File

@@ -1050,12 +1050,7 @@ class wpdb {
<p>If you're unsure what these terms mean you should probably contact your host. If you still need help you can always visit the <a href='http://wordpress.org/support/'>WordPress Support Forums</a>.</p>
"/*/WP_I18N_DB_CONN_ERROR*/, $this->dbhost ), 'db_connect_fail' );
// If show errors is disabled then we need to die anyway as we don't have a working DB connection
// unless we're trying to test the initial connection, in which case setup-config.php will handle.
if ( defined( 'WP_SETUP_CONFIG' ) )
return;
die();
return;
}
$this->set_charset( $this->dbh );

View File

@@ -79,7 +79,8 @@ function login_header($title = 'Log In', $message = '', $wp_error = '') {
<?php
}
do_action('login_head'); ?>
do_action( 'login_enqueue_scripts' );
do_action( 'login_head' ); ?>
</head>
<body class="login">
<?php if ( !is_multisite() ) { ?>