Commit Graph

10244 Commits

Author SHA1 Message Date
Andrew Nacin beec541ae9 Always return a variable reference from get_pages(). props wonderboymusic, foxinni. fixes #20756.
git-svn-id: https://develop.svn.wordpress.org/trunk@21550 602fd350-edb4-49c9-b593-d223f7449a82
2012-08-20 16:38:43 +00:00
Andrew Ozz 4b05f3c604 Fix screen reader text in IE7 and 8 in the toolbar "Updates" menu, props SergeyBiryukov, fixes #21333
git-svn-id: https://develop.svn.wordpress.org/trunk@21549 602fd350-edb4-49c9-b593-d223f7449a82
2012-08-19 22:19:00 +00:00
bumpbot c699530ab6 Compress scripts/styles: 3.5-alpha-21548.
git-svn-id: https://develop.svn.wordpress.org/trunk@21548 602fd350-edb4-49c9-b593-d223f7449a82
2012-08-19 18:58:22 +00:00
bumpbot 256c792376 Compress scripts/styles: 3.5-alpha-21546. TinyMCE updated.
git-svn-id: https://develop.svn.wordpress.org/trunk@21546 602fd350-edb4-49c9-b593-d223f7449a82
2012-08-19 00:58:19 +00:00
Andrew Ozz 754c42e71f Update TinyMCE to 3.5.6, see #21173
git-svn-id: https://develop.svn.wordpress.org/trunk@21545 602fd350-edb4-49c9-b593-d223f7449a82
2012-08-18 23:24:27 +00:00
Ryan Boren ee8cf061f8 Introduce wp_get_mime_types() for fetching the complete list of mime types. Remove the static caching of the types so that filters other than the first filter work. Use wp_get_mime_types() in do_enclose(). fixes #21299 #21594
git-svn-id: https://develop.svn.wordpress.org/trunk@21541 602fd350-edb4-49c9-b593-d223f7449a82
2012-08-17 17:25:19 +00:00
Andrew Nacin 80cc4de72f If the DB upgrade hasn't yet been run, assume the Link Manager is disabled. Important for multisite installs. props ryan. see #21307.
git-svn-id: https://develop.svn.wordpress.org/trunk@21537 602fd350-edb4-49c9-b593-d223f7449a82
2012-08-16 23:09:40 +00:00
bumpbot 4ce19368bf Compress scripts/styles: 3.5-alpha-21535.
git-svn-id: https://develop.svn.wordpress.org/trunk@21535 602fd350-edb4-49c9-b593-d223f7449a82
2012-08-16 16:58:26 +00:00
Andrew Ozz ab61b71fd5 Revert [21495]. Discussed in dev-chat: it's better if the themes implement this or something similar.
git-svn-id: https://develop.svn.wordpress.org/trunk@21532 602fd350-edb4-49c9-b593-d223f7449a82
2012-08-15 21:21:51 +00:00
Ryan Boren 128e63d9aa Specify the encoding in IXR_Server::output(). Props solarissmoke, sergey.s.betke@novgaro.ru, SergeyBiryukov. fixes #4794
git-svn-id: https://develop.svn.wordpress.org/trunk@21531 602fd350-edb4-49c9-b593-d223f7449a82
2012-08-15 20:12:00 +00:00
bumpbot 36a3924822 Compress scripts/styles: 3.5-alpha-21530.
git-svn-id: https://develop.svn.wordpress.org/trunk@21530 602fd350-edb4-49c9-b593-d223f7449a82
2012-08-15 18:58:27 +00:00
Ryan Boren 7366f664a8 Specify the charset in WP_Ajax_Response::send(). Props sergey.s.betke@novgaro.ru, SergeyBiryukov. fixes #19448
git-svn-id: https://develop.svn.wordpress.org/trunk@21528 602fd350-edb4-49c9-b593-d223f7449a82
2012-08-15 18:17:21 +00:00
Ryan Boren c4efcb4def Fix MS Office mime types. Group the mime list in get_allowed_mime_types() by type. Props hebbet, markel, SergeyBiryukov. fixes #17117
git-svn-id: https://develop.svn.wordpress.org/trunk@21527 602fd350-edb4-49c9-b593-d223f7449a82
2012-08-15 16:48:36 +00:00
Ryan Boren 720ec1cd07 Return post_parent, menu_order, guid, and post_mime_type from wp.getPost(). Props maxcutler. fixes #21308
git-svn-id: https://develop.svn.wordpress.org/trunk@21526 602fd350-edb4-49c9-b593-d223f7449a82
2012-08-15 16:06:05 +00:00
Ryan Boren 67fb26f7b2 Fix phpdoc for switch_to_blog() and restore_current_blog(). Props SergeyBiryukov. fixes #21459
git-svn-id: https://develop.svn.wordpress.org/trunk@21523 602fd350-edb4-49c9-b593-d223f7449a82
2012-08-15 15:56:14 +00:00
Ryan Boren a77d7f0867 Add @since for _wp_get_user_contactmethods() and _get_additional_user_keys(). Props SergeyBiryukov. fixes #21246
git-svn-id: https://develop.svn.wordpress.org/trunk@21522 602fd350-edb4-49c9-b593-d223f7449a82
2012-08-15 15:33:59 +00:00
Ryan Boren 70061dfb5f Update @since for various wpdb properties. Props SergeyBiryukov. fixes #21582
git-svn-id: https://develop.svn.wordpress.org/trunk@21521 602fd350-edb4-49c9-b593-d223f7449a82
2012-08-15 15:32:35 +00:00
bumpbot 06112b685f Compress scripts/styles: 3.5-alpha-21514.
git-svn-id: https://develop.svn.wordpress.org/trunk@21514 602fd350-edb4-49c9-b593-d223f7449a82
2012-08-14 20:58:23 +00:00
Andrew Nacin 821a0d8181 @since for wpdb's result property. props SergeyBiryukov. see #21533.
git-svn-id: https://develop.svn.wordpress.org/trunk@21513 602fd350-edb4-49c9-b593-d223f7449a82
2012-08-14 20:34:12 +00:00
Andrew Nacin c653147d47 Add magic set, isset, and unset to wpdb. props pento.
These magic methods allow us to mark properties as protected or private, without breaking compatibility, as they were once accessible. The joys of PHP4.

fixes #18510.



git-svn-id: https://develop.svn.wordpress.org/trunk@21512 602fd350-edb4-49c9-b593-d223f7449a82
2012-08-14 20:26:04 +00:00
Andrew Nacin 69881dfee7 Eliminate error suppression for mysql_free_result() and only call it when the result is actually a resource. Depending on the query, mysql_query() can return a boolean rather than a resource, hence the original use of error suppression.
Fixes a warning introduced in [21472] when calling mysql_free_result() was moved to flush().

fixes #20838.



git-svn-id: https://develop.svn.wordpress.org/trunk@21511 602fd350-edb4-49c9-b593-d223f7449a82
2012-08-14 20:21:10 +00:00
Ryan Boren 83e5beed47 Update wp_update_user() phpdoc to reflect a possible return of WP_Error. Props SergeyBiryukov. fixes #21439
git-svn-id: https://develop.svn.wordpress.org/trunk@21509 602fd350-edb4-49c9-b593-d223f7449a82
2012-08-14 19:29:40 +00:00
Ryan Boren 5cbcb6a764 Add isset() check to avoid notice. Props c3mdigital. fixes #21512
git-svn-id: https://develop.svn.wordpress.org/trunk@21506 602fd350-edb4-49c9-b593-d223f7449a82
2012-08-14 19:07:56 +00:00
bumpbot cd93e31cfa Compress scripts/styles: 3.5-alpha-21505.
git-svn-id: https://develop.svn.wordpress.org/trunk@21505 602fd350-edb4-49c9-b593-d223f7449a82
2012-08-14 18:58:20 +00:00
Ryan Boren 4974f5f233 Remove post type from post nonces. Fixes attachment deletion when EMPTY_TRASH_DAYS is 0. Props c3mdigital, kurtpayne, SergeyBiryukov. fixes #21194
git-svn-id: https://develop.svn.wordpress.org/trunk@21504 602fd350-edb4-49c9-b593-d223f7449a82
2012-08-14 18:39:15 +00:00
Andrew Nacin 665ad96636 Fix WP_Theme's get_template_directory_uri() method. props batmoo. see #21549 for trunk.
git-svn-id: https://develop.svn.wordpress.org/trunk@21503 602fd350-edb4-49c9-b593-d223f7449a82
2012-08-14 18:38:26 +00:00
Andrew Nacin 9931c1a45d Hide the link manager from the UI on upgrade, if the site has no links. New DB option, link_manager_enabled.
Enforce this by denying the 'manage_links' capability, which hides the All Links, Add New Link, and Link Categories screens. Hide WP_Widget_Links and the UI for the default_link_category as well.

Convert all references to 'posts and links' when handling reassignment on user deletion to just 'posts'.

see #21307.



git-svn-id: https://develop.svn.wordpress.org/trunk@21501 602fd350-edb4-49c9-b593-d223f7449a82
2012-08-13 16:18:42 +00:00
bumpbot de461b777b Compress scripts/styles: 3.5-alpha-21499.
git-svn-id: https://develop.svn.wordpress.org/trunk@21499 602fd350-edb4-49c9-b593-d223f7449a82
2012-08-11 02:58:19 +00:00
Andrew Ozz da532a7573 Remove unused images, props helenyhou, coffee2code, ocean90, fixes #20980
git-svn-id: https://develop.svn.wordpress.org/trunk@21498 602fd350-edb4-49c9-b593-d223f7449a82
2012-08-11 02:36:01 +00:00
Ryan Boren 1096d07b11 Avoid fatal error in the customizer when the current theme doesn't support custom headers. Props c3mdigital. fixes #21515
git-svn-id: https://develop.svn.wordpress.org/trunk@21497 602fd350-edb4-49c9-b593-d223f7449a82
2012-08-10 20:15:06 +00:00
Ryan Boren 9580f65af6 Allow passing stdClass and WP_User to wp_insert_user() and wp_update_user(). Introduce WP_User::to_array(). Eliminate uses of get_object_vars() when passing to wp_*_user(). fixes #21429
git-svn-id: https://develop.svn.wordpress.org/trunk@21496 602fd350-edb4-49c9-b593-d223f7449a82
2012-08-10 15:36:54 +00:00
Andrew Ozz d79594b872 Better editor background, take one, see #21536
git-svn-id: https://develop.svn.wordpress.org/trunk@21495 602fd350-edb4-49c9-b593-d223f7449a82
2012-08-10 07:11:03 +00:00
Ryan Boren 20a1def1c0 switch_to_blog() and restore_current_blog() housekeeping.
wp-includes/admin-bar.php:

* Replace get_admin_url() and get_home_url() with admin_url() and home_url() and place them inside a switch/restore. Likewise replace current_user_can_for_blog() with current_user_can(). This avoids doing multiple switch restores.

wp-includes/ms-blogs.php:

* Deprecate the $validate argument to switch_to_blog(). This avoids a not very necessary call to get_blog_details(), possibly saving a few queries.
* Use $_wp_switched and $_wp_switched_stack instead of $switched and $switched_stack to make it less likely these globals will be stomped.
* Use GLOBALS to access blog_id and other globals. I've preferred this style lately since it makes it obvious a global is being used and avoids global blog_id being stomped by a local variable.
* Lose some is_object() checks. wp_get_current_user() always returns an object, for example.
* Call the new WP_Roles::reinit() method.

wp-includes/class-wp-xmlrpc-server.php:

* Replace current_user_can_for_blog() with current_user_can() and move it inside the switch/restore pair. This eliminates a switch/restore.

wp-includes/capabilities.php:

* Use array_keys() instead of $role => $data since $data is unused. I *think* this is a bit faster.
* Introduce WP_Roles::reinit(). This reinitializes WP_Roles and is used after switch_to_blog() has already update the blog ID in the wpdb object. If a global roles array is being used instead of the db, reinit is skipped.
* current_user_can_for_blog() now does a switch/restore. It didn't before meaning it could be reinitializing the user with the wrong role information for the current blog.

wp-includes/ms-settings.php:

* Define $_wp_switched_stack and $_wp_switched. This way switch_to_blog() and restore_current_blog() can rely on it being set.

wp-settings.php:

* Instantiate the WP_Roles global. This was it is always defined during init. To remove the WP_Roles checks from WP_Role and WP_User this would probably have to move before plugins are loaded, which might not be a good thing.

wp-includes/functions.php:

* Update wp_upload_dir() to reference _wp_switched.



git-svn-id: https://develop.svn.wordpress.org/trunk@21485 602fd350-edb4-49c9-b593-d223f7449a82
2012-08-09 16:28:15 +00:00
Ryan Boren fd52f7397d Move get_current_blog_id() to load.php so it is available during multisite bootstrap. fixes #21432
git-svn-id: https://develop.svn.wordpress.org/trunk@21484 602fd350-edb4-49c9-b593-d223f7449a82
2012-08-09 13:17:14 +00:00
Andrew Ozz 90e990d983 When WP_Dependencies accept a string for a single dependency, make sure the string is not empty, see #20683
git-svn-id: https://develop.svn.wordpress.org/trunk@21481 602fd350-edb4-49c9-b593-d223f7449a82
2012-08-08 17:21:24 +00:00
Ryan Boren 4c0121178b Undeprecate *_blog_option() by popular demand. Put them back in ms-blogs.php since direct inclusion of ms-blogs.php/ms-functions.php is unforntunately common.
see #21432


git-svn-id: https://develop.svn.wordpress.org/trunk@21480 602fd350-edb4-49c9-b593-d223f7449a82
2012-08-08 17:11:15 +00:00
Andrew Nacin 5a45a59cb2 Declare, document, and protect $dbuser, $dbpassword, $dbname, $dbhost and $dbh in wpdb.
These properties, while protected, are still accessible thanks to the magic getter added in [21472].

props pento, nvartolomei, joelhardi. fixes #18510.



git-svn-id: https://develop.svn.wordpress.org/trunk@21473 602fd350-edb4-49c9-b593-d223f7449a82
2012-08-08 06:28:57 +00:00
Andrew Nacin b3fb67a97d Lazy-load column info in wpdb. props pento. fixes #20838.
git-svn-id: https://develop.svn.wordpress.org/trunk@21472 602fd350-edb4-49c9-b593-d223f7449a82
2012-08-08 06:24:59 +00:00
Andrew Nacin 4218686707 Introduce wpdb::get_charset_collate() to return the DEFAULT CHARACTER SET and COLLATE for use in table schemas.
props simonwheatley, pento. fixes #18451.



git-svn-id: https://develop.svn.wordpress.org/trunk@21471 602fd350-edb4-49c9-b593-d223f7449a82
2012-08-08 06:13:48 +00:00
Andrew Nacin aba535c65b Deprecate wpdb::supports_collation() in favor of wpdb::has_cap().
props hakre, pento. fixes #16757.



git-svn-id: https://develop.svn.wordpress.org/trunk@21470 602fd350-edb4-49c9-b593-d223f7449a82
2012-08-08 06:06:57 +00:00
Andrew Ozz 42b696ee44 Fix typo in wp_login_form(), props greenshady, fixes #21514
git-svn-id: https://develop.svn.wordpress.org/trunk@21469 602fd350-edb4-49c9-b593-d223f7449a82
2012-08-07 23:13:31 +00:00
Andrew Ozz 4e712ea44c TinyMCE: fix typo in button tooltips.
git-svn-id: https://develop.svn.wordpress.org/trunk@21468 602fd350-edb4-49c9-b593-d223f7449a82
2012-08-07 03:28:20 +00:00
bumpbot 142a33fd8e Compress scripts/styles: 3.5-alpha-21466.
git-svn-id: https://develop.svn.wordpress.org/trunk@21466 602fd350-edb4-49c9-b593-d223f7449a82
2012-08-06 22:58:30 +00:00
bumpbot 49ef671550 Compress scripts/styles: 3.5-alpha-21463.
git-svn-id: https://develop.svn.wordpress.org/trunk@21463 602fd350-edb4-49c9-b593-d223f7449a82
2012-08-06 20:58:37 +00:00
bumpbot 07a63e22e7 Compress scripts/styles: 3.5-alpha-21460.
git-svn-id: https://develop.svn.wordpress.org/trunk@21460 602fd350-edb4-49c9-b593-d223f7449a82
2012-08-06 18:58:29 +00:00
Andrew Ozz cd8663f68d Replace last remaining gradients with css, standardize the gradient css cascade, props ocean90, fixes #16461
git-svn-id: https://develop.svn.wordpress.org/trunk@21459 602fd350-edb4-49c9-b593-d223f7449a82
2012-08-06 17:21:41 +00:00
bumpbot 9c0e7302fb Compress scripts/styles: 3.5-alpha-21458.
git-svn-id: https://develop.svn.wordpress.org/trunk@21458 602fd350-edb4-49c9-b593-d223f7449a82
2012-08-06 04:58:26 +00:00
bumpbot b5864beaa0 Compress scripts/styles: 3.5-alpha-21456.
git-svn-id: https://develop.svn.wordpress.org/trunk@21456 602fd350-edb4-49c9-b593-d223f7449a82
2012-08-06 02:58:33 +00:00
bumpbot add3a6f3ba Compress scripts/styles: 3.5-alpha-21453.
git-svn-id: https://develop.svn.wordpress.org/trunk@21453 602fd350-edb4-49c9-b593-d223f7449a82
2012-08-06 00:58:32 +00:00
Andrew Ozz d80d9acc28 Accessibility: add off-screen Log Out link in the toolbar, tweak the class names of the accessible links in #adminbar, see #21312
git-svn-id: https://develop.svn.wordpress.org/trunk@21452 602fd350-edb4-49c9-b593-d223f7449a82
2012-08-06 00:34:44 +00:00