Commit Graph

31159 Commits

Author SHA1 Message Date
Gary Pendergast 32b8ff1b14 Schema: Increase the length of `wp_options.option_name`.
It's pretty easy to run over the `option_name` length, which causes undefined behaviour when inserting and retrieving options. Increasing the length from `VARCHAR(64)` to `VARCHAR(191)` significantly reduces the risk of this occurring.

Because `option_name` has a `UNIQUE` index, we can only increase it to 191 characters, rather than 255. The index can only use a prefix of 191 characters, so will incorrectly restrict long different strings that have the same prefix, if we make the column longer.

Props scribu, OriginalEXE, khromov, MikeHansenMe, netweb, pento.

Fixes #13310.



git-svn-id: https://develop.svn.wordpress.org/trunk@34030 602fd350-edb4-49c9-b593-d223f7449a82
2015-09-11 01:25:21 +00:00
Aaron Jorbin 4796e96ebe Flush rewrite rules upon theme switch
Themes can ( and do ) but shouldn't include custom rewrite rules.This can lead to hard to debug issues for theme authors. Theme changes are not a ultra common conclusion. Flushing the rewrite rules on theme switch will lead to a clean slate for each theme which helps make debugging easier.

And @nacin said we should do this 5 years ago at WordCamp Mid Atlantic.

Fixes #14849



git-svn-id: https://develop.svn.wordpress.org/trunk@34028 602fd350-edb4-49c9-b593-d223f7449a82
2015-09-10 23:49:14 +00:00
John Blackbourn bdd42a0902 Set the `secure` flag on the `wp-saving-post` cookie when using HTTPS.
This cookie doesn't contain any sensitive information, but this change brings its behaviour in line with all other core cookies.

Fixes #31056


git-svn-id: https://develop.svn.wordpress.org/trunk@34027 602fd350-edb4-49c9-b593-d223f7449a82
2015-09-10 22:41:08 +00:00
Scott Taylor b1a91e4a28 Move `network_settings_add_js()` from `wp-admin/network/settings.php` to `wp-admin/includes/ms.php`.
See #33813.


git-svn-id: https://develop.svn.wordpress.org/trunk@34026 602fd350-edb4-49c9-b593-d223f7449a82
2015-09-10 22:23:47 +00:00
Scott Taylor 2fe412793e Move `confirm_delete_users()` from `wp-admin/network/users.php` to `wp-admin/includes/ms.php`.
See #33813.


git-svn-id: https://develop.svn.wordpress.org/trunk@34025 602fd350-edb4-49c9-b593-d223f7449a82
2015-09-10 22:22:44 +00:00
Scott Taylor ea07ff2e63 Create `wp-admin/includes/network.php` via `svn cp` and only load it in `wp-admin/network.php`. Move the functions there.
See #33813.


git-svn-id: https://develop.svn.wordpress.org/trunk@34023 602fd350-edb4-49c9-b593-d223f7449a82
2015-09-10 22:00:58 +00:00
Scott Taylor ab4fcd20d0 Move ad hoc Options functions to `wp-admin/includes/options.php`:
* Move `options_discussion_add_js()` from `wp-admin/options-discussion.php`
* Move `options_general_add_js()` from `wp-admin/options-general.php`
* Move `options_permalink_add_js()` from `wp-admin/options-permalink.php`
* Move `options_reading_add_js()` from `wp-admin/options-reading.php`
* Move `options_reading_blog_charset()` from `wp-admin/options-reading.php`

See #33813.


git-svn-id: https://develop.svn.wordpress.org/trunk@34022 602fd350-edb4-49c9-b593-d223f7449a82
2015-09-10 21:44:29 +00:00
Scott Taylor 96a40d6102 Move 2 ad hoc user admin functions:
* Move `use_ssl_preference()` from `wp-admin/user-edit.php` to `wp-admin/includes/user.php`.
* Move `admin_created_user_email()` from `wp-admin/user-new.php` to `wp-admin/includes/user.php`.

See #33813.


git-svn-id: https://develop.svn.wordpress.org/trunk@34021 602fd350-edb4-49c9-b593-d223f7449a82
2015-09-10 21:32:46 +00:00
Scott Taylor d7670b6a38 Move `redirect_post()` from `wp-admin/post.php` to `wp-admin/includes/post.php`.
See #33813.


git-svn-id: https://develop.svn.wordpress.org/trunk@34020 602fd350-edb4-49c9-b593-d223f7449a82
2015-09-10 21:30:24 +00:00
Scott Taylor 037cdcb412 Move `comment_footer_die()` from `wp-admin/comment.php` to `wp-admin/includes/comment.php`.
See #33813.


git-svn-id: https://develop.svn.wordpress.org/trunk@34019 602fd350-edb4-49c9-b593-d223f7449a82
2015-09-10 21:28:18 +00:00
Scott Taylor 706cdbc671 Move `plugin_sandbox_scrape()` from `wp-admin/plugins.php` to `wp-admin/includes/plugin.php`.
See #33813.


git-svn-id: https://develop.svn.wordpress.org/trunk@34018 602fd350-edb4-49c9-b593-d223f7449a82
2015-09-10 21:23:17 +00:00
Scott Taylor 8af9ff0e56 Move `wp_widgets_access_body_class()` (a hook callback) from `wp-admin/widgets.php` to `wp-admin/includes/widgets.php`.
See #33813.


git-svn-id: https://develop.svn.wordpress.org/trunk@34017 602fd350-edb4-49c9-b593-d223f7449a82
2015-09-10 21:21:27 +00:00
Scott Taylor a55b56c3d2 After [34004], don't break apart the paragraph into multiple translatable strings.
Fixes #18418.


git-svn-id: https://develop.svn.wordpress.org/trunk@34016 602fd350-edb4-49c9-b593-d223f7449a82
2015-09-10 20:59:35 +00:00
Scott Taylor 7bf64e0125 Comments/PHP Notices: check that a parent comment exists before displaying an orphan's link to it in the admin.
Props rachelbaker.
Fixes #33710.


git-svn-id: https://develop.svn.wordpress.org/trunk@34015 602fd350-edb4-49c9-b593-d223f7449a82
2015-09-10 20:50:12 +00:00
Scott Taylor 7b59221ea1 `_wpThemeSettings.l10n.searchPlaceholder` is an input placeholder and doesn't handle UTF-8 or HTML entities properly. In lieu of using literal Unicode here, use `...`.
See #32875.


git-svn-id: https://develop.svn.wordpress.org/trunk@34014 602fd350-edb4-49c9-b593-d223f7449a82
2015-09-10 20:35:03 +00:00
Scott Taylor 8ed569b1ea After [33970], swap UTF-8 characters for their `\u2026` escape sequence.
See #32875.


git-svn-id: https://develop.svn.wordpress.org/trunk@34013 602fd350-edb4-49c9-b593-d223f7449a82
2015-09-10 20:29:18 +00:00
Jeremy Felt 9b193ad5a4 Multisite: Display content attribution drop down when deleting a user
The previous move from `echo()` to `_e()` left some of the output hanging. Introduced in [32333].

Props figureone.
Fixes #33811 for trunk.


git-svn-id: https://develop.svn.wordpress.org/trunk@34012 602fd350-edb4-49c9-b593-d223f7449a82
2015-09-10 20:25:07 +00:00
Scott Taylor d937112e9f Grunt RTL CSS: `swap-dashicons-left-right-arrows` in `rtlcss:properties` expects double-quoted `content` strings in CSS. It doesn't swap single-quoted values.
Props Ankit K Gupta, yoavf, netweb.
Fixes #33786.


git-svn-id: https://develop.svn.wordpress.org/trunk@34011 602fd350-edb4-49c9-b593-d223f7449a82
2015-09-10 20:21:57 +00:00
Scott Taylor 3b180cf785 Clarify `wp-includes/cache.php` docs with some more precise language.
Props danielbachhuber.
Fixes #33734.


git-svn-id: https://develop.svn.wordpress.org/trunk@34010 602fd350-edb4-49c9-b593-d223f7449a82
2015-09-10 18:23:45 +00:00
Scott Taylor 6a37ad1464 WP Plupload: on `FileUploaded`, allow `success` and `error` callbacks to receive server responses after a successful upload.
Props ippetkov.
Fixes #24934.


git-svn-id: https://develop.svn.wordpress.org/trunk@34009 602fd350-edb4-49c9-b593-d223f7449a82
2015-09-10 18:18:41 +00:00
Scott Taylor 47287f8d51 After [33961], ensure that comment filters that expect a comment ID are receiving one.
Props dimadin.
Fixes #33809.


git-svn-id: https://develop.svn.wordpress.org/trunk@34008 602fd350-edb4-49c9-b593-d223f7449a82
2015-09-10 18:09:15 +00:00
Scott Taylor be9cd867df In `wp_generate_attachment_metadata()`, also pass `$metadata` to the `intermediate_image_sizes_advanced` filter.
Props amereservant, wonderboymusic.
Fixes #23401.


git-svn-id: https://develop.svn.wordpress.org/trunk@34007 602fd350-edb4-49c9-b593-d223f7449a82
2015-09-10 18:03:20 +00:00
Scott Taylor 09df5b81a1 Add a "View" row action for approved comments on the Dashboard screen, remove the link labeled `#`.
Props rachelbaker, zeo.
Fixes #18885. 


git-svn-id: https://develop.svn.wordpress.org/trunk@34006 602fd350-edb4-49c9-b593-d223f7449a82
2015-09-10 17:48:34 +00:00
Scott Taylor 532baa4c5f In `WP_Posts_List_Table::column_date()`, the order of status and time should be switched. It doesn't make sense for phrases like "Last Modified" to occur AFTER the date. Should be before.
Props johnbillion, wonderboymusic.
Fixes #18641. 


git-svn-id: https://develop.svn.wordpress.org/trunk@34005 602fd350-edb4-49c9-b593-d223f7449a82
2015-09-10 17:42:55 +00:00
Scott Taylor f5ce2ba96d Cleanup the text for `Publish Settings > Publish` in the `edit-form-advanced` help tab. Clarify that Private posts aren't hidden from editors and administrators.
Props sillybean.
Fixes #18418. 


git-svn-id: https://develop.svn.wordpress.org/trunk@34004 602fd350-edb4-49c9-b593-d223f7449a82
2015-09-10 17:35:17 +00:00
Scott Taylor 0a7636cfa3 In `wp_media_upload_handler()`, replace a lingering instance of `media_upload_gallery()` with `wp_iframe(...)`
Props jeffstieler, antpb.
Fixes #17812. 


git-svn-id: https://develop.svn.wordpress.org/trunk@34003 602fd350-edb4-49c9-b593-d223f7449a82
2015-09-10 17:23:23 +00:00
Scott Taylor 7178b67671 `media-new.php`, when using the browser uploader, if the result of uploading is a `WP_Error` - `wp_die()` with the error, instead of redirecting with a generic error.
Props solarissmoke.
Fixes #16820. 


git-svn-id: https://develop.svn.wordpress.org/trunk@34002 602fd350-edb4-49c9-b593-d223f7449a82
2015-09-10 17:17:22 +00:00
Scott Taylor ad163d3547 In `get_page_uri()`, do not add parent slugs to orphaned pages.
Adds unit test.

Props filosofo, MikeHansenMe, MikeHansenMe, chriscct7.
Fixes #15963. 


git-svn-id: https://develop.svn.wordpress.org/trunk@34001 602fd350-edb4-49c9-b593-d223f7449a82
2015-09-10 16:53:52 +00:00
Scott Taylor 2deb9565c0 When deleting via User List Table, don't prompt for re-attribution if the user(s) do(es) not have any posts.
Props rajnikmit, wojtek.szkutnik, benjmay, wonderboymusic.
Fixes #6405. 


git-svn-id: https://develop.svn.wordpress.org/trunk@34000 602fd350-edb4-49c9-b593-d223f7449a82
2015-09-10 16:46:38 +00:00
Jeremy Felt 9473a479d9 Multisite: Correct `ms_not_installed()` `@since` version for new parameters
Props dimadin.
See 27264.


git-svn-id: https://develop.svn.wordpress.org/trunk@33999 602fd350-edb4-49c9-b593-d223f7449a82
2015-09-10 16:20:29 +00:00
Sergey Biryukov 5d8eb77621 Merge two similar strings.
Props dipesh.kakadiya.
Fixes #33777.

git-svn-id: https://develop.svn.wordpress.org/trunk@33998 602fd350-edb4-49c9-b593-d223f7449a82
2015-09-10 10:58:58 +00:00
Jeremy Felt 837b6c3e3e Multisite: Add action to handle network not found
`ms_network_not_found` fires when the global `$current_site` has not been filled and `ms_not_installed()` is about to fire. It cannot be used to populate `$current_site`, but can be used to capture the request and redirect or present a custom error.

Props rmccue.
Fixes #31702.


git-svn-id: https://develop.svn.wordpress.org/trunk@33990 602fd350-edb4-49c9-b593-d223f7449a82
2015-09-10 05:05:14 +00:00
Jeremy Felt d0706ac9ca Multisite: Remove `$domain` and `$path` globals in `ms_not_installed()`
Further reduces the reliance on these unnecessary globals.

Fixes #27264.


git-svn-id: https://develop.svn.wordpress.org/trunk@33989 602fd350-edb4-49c9-b593-d223f7449a82
2015-09-10 03:52:21 +00:00
Jeremy Felt ef1f697564 Multisite: Allow users with `manage_network_users` to edit network users.
Other users in a network can now be given capabilities to manage users without also having global super admin privileges.

* Users with `manage_network_users` can not edit super admins.
* Users with `manage_network_users` can not promote users to super admin.
* Uses of `is_super_admin()` in `user-new.php` are now updated to `manage_network_users`.

Props daniellandau, chriscct7.
Fixes #16860.


git-svn-id: https://develop.svn.wordpress.org/trunk@33988 602fd350-edb4-49c9-b593-d223f7449a82
2015-09-10 03:33:22 +00:00
Jeremy Felt c89822ebe0 Multisite: Test `edit_user` capabilities for multisite administrators
An administrator in multisite can not edit users other than itself.

Props daniellandau for the initial patch.
See #16860.


git-svn-id: https://develop.svn.wordpress.org/trunk@33987 602fd350-edb4-49c9-b593-d223f7449a82
2015-09-10 03:20:11 +00:00
Scott Taylor a025ce4f12 After the `global` churn in [33964], also set `$post` to `null` at the end of `WP_Comments_List_Table::single_row()` to ensure that an orphaned comment doesn't inherit the previous row's `$post` context.
See #33638.


git-svn-id: https://develop.svn.wordpress.org/trunk@33986 602fd350-edb4-49c9-b593-d223f7449a82
2015-09-10 03:11:09 +00:00
Scott Taylor 6bc498c0e6 Implement a priority system for Help Tabs to add them at specific positions.
Adds unit tests.

Props swissspidy.
Fixes #19828.


git-svn-id: https://develop.svn.wordpress.org/trunk@33985 602fd350-edb4-49c9-b593-d223f7449a82
2015-09-10 01:26:26 +00:00
Scott Taylor 89f4c471fa Add `@access` docs to `class-wp-filesystem-*` files.
Props wenthemes.
Fixes #33725.


git-svn-id: https://develop.svn.wordpress.org/trunk@33984 602fd350-edb4-49c9-b593-d223f7449a82
2015-09-10 01:20:58 +00:00
Scott Taylor c5220e43f5 Plugins page: re-word "No out of date plugins were selected." to "All selected plugins are up to date." since it's not really an error condition.
Props swissspidy.
Fixes #26494.


git-svn-id: https://develop.svn.wordpress.org/trunk@33983 602fd350-edb4-49c9-b593-d223f7449a82
2015-09-10 01:10:25 +00:00
Scott Taylor c83106d13f After [33821], when dynamically updating the document title text of the Comments List Table page, operate only on the fragment that contains the comment count. This prevents us from including other numbers that may be present in the other title parts (site title, etc).
See #33414.


git-svn-id: https://develop.svn.wordpress.org/trunk@33982 602fd350-edb4-49c9-b593-d223f7449a82
2015-09-10 01:02:05 +00:00
Andrew Ozz cc18f258cb TinyMCE: update to 4.2.5, changelog: http://www.tinymce.com/develop/changelog/?ctrl=version&act=index&pr_id=1.
Fixes #33782 for trunk.

git-svn-id: https://develop.svn.wordpress.org/trunk@33981 602fd350-edb4-49c9-b593-d223f7449a82
2015-09-09 19:44:09 +00:00
Drew Jaynes 81ec5c8e91 Docs: Add a changelog entry to the DocBlock for `touch_time()` to mention the shift from accessing the global `$comment` to using `get_comment()`.
See #33638.


git-svn-id: https://develop.svn.wordpress.org/trunk@33979 602fd350-edb4-49c9-b593-d223f7449a82
2015-09-09 15:47:43 +00:00
Drew Jaynes d651587a0d Docs: Use the `$widget_links_args` parameter in the hook doc for the `widget_links_args` filter, introduced when the args array was split out to a variable in [33971].
See #20788.


git-svn-id: https://develop.svn.wordpress.org/trunk@33978 602fd350-edb4-49c9-b593-d223f7449a82
2015-09-09 15:44:46 +00:00
Scott Taylor ab9bbfa9ce `WP_Widget_Links`: pass widget instance to `widget_links_args` filter
Props SergeyBiryukov, MikeHansenMe, DrewAPicture.
Fixes #20788.


git-svn-id: https://develop.svn.wordpress.org/trunk@33971 602fd350-edb4-49c9-b593-d223f7449a82
2015-09-09 04:41:21 +00:00
Scott Taylor d6e73d47e4 Round 2 of: We should use ellipses … / … instead of three dots/periods ... e.g Loading… not Loading...
Props yoavf.
Fixes #32875.


git-svn-id: https://develop.svn.wordpress.org/trunk@33970 602fd350-edb4-49c9-b593-d223f7449a82
2015-09-09 04:38:31 +00:00
Scott Taylor 9eefbd1999 Deprecate `wp_get_http()` - function isn't used anywhere (apart from itself).
Props swissspidy.
Fixes #33709.


git-svn-id: https://develop.svn.wordpress.org/trunk@33969 602fd350-edb4-49c9-b593-d223f7449a82
2015-09-09 04:25:24 +00:00
Scott Taylor 4016b77b1a Add a parameter, `$post`, to `get_{$adjacent}_post_join`, `get_{$adjacent}_post_where`, and `get_{$adjacent}_post_sort`
Props JustinSainton.
Fixes #24597.


git-svn-id: https://develop.svn.wordpress.org/trunk@33968 602fd350-edb4-49c9-b593-d223f7449a82
2015-09-09 03:49:00 +00:00
Scott Taylor 05e249d5ac Ensure that `role` is not empty before adding it in `add_role()` function and methods.
Props MikeHansenMe, dannydehaan, michielhab.
Fixes #23746.


git-svn-id: https://develop.svn.wordpress.org/trunk@33967 602fd350-edb4-49c9-b593-d223f7449a82
2015-09-09 03:41:27 +00:00
Scott Taylor 047f3ef01a Revisions screen: change language from "Return to post editor" to "Return to editor" - more generic for usage by custom post types.
Props lancewillett, adamsilverstein.
Fixes #31910.


git-svn-id: https://develop.svn.wordpress.org/trunk@33966 602fd350-edb4-49c9-b593-d223f7449a82
2015-09-09 03:22:36 +00:00
Scott Taylor 42e8258275 Use `get_comment()` instead of a global in `touch_time()`.
See #33638.


git-svn-id: https://develop.svn.wordpress.org/trunk@33965 602fd350-edb4-49c9-b593-d223f7449a82
2015-09-09 03:04:38 +00:00