Commit Graph

30234 Commits

Author SHA1 Message Date
John Blackbourn
afd6dd79fe Comprehensive unit tests for every available capability, and for all roles.
Fixes #32394.


git-svn-id: https://develop.svn.wordpress.org/trunk@32812 602fd350-edb4-49c9-b593-d223f7449a82
2015-06-17 00:04:08 +00:00
John Blackbourn
177e0ed93e Ensure the create_users capability check checks the super admin status of the user in question, rather than the current user.
git-svn-id: https://develop.svn.wordpress.org/trunk@32811 602fd350-edb4-49c9-b593-d223f7449a82
2015-06-17 00:02:08 +00:00
Drew Jaynes
991237783d Add line-wrapping to a long return description because readability in documentation is important.
See [32797]. See #32421.


git-svn-id: https://develop.svn.wordpress.org/trunk@32810 602fd350-edb4-49c9-b593-d223f7449a82
2015-06-16 23:17:16 +00:00
Andrew Ozz
7ef6ece222 Editor: do not reuse the preview tab when the user has navigated away.
See #32588.

git-svn-id: https://develop.svn.wordpress.org/trunk@32809 602fd350-edb4-49c9-b593-d223f7449a82
2015-06-16 23:12:21 +00:00
Dominik Schilling (ocean90)
b31928788d Fix a typo in [32806].
see #32576.

git-svn-id: https://develop.svn.wordpress.org/trunk@32808 602fd350-edb4-49c9-b593-d223f7449a82
2015-06-16 23:08:09 +00:00
Dominik Schilling (ocean90)
d0a8130970 Twenty Fifteen: Wrap navigation helpers into a function so it can be called on a refresh event of the Customize Preview.
props westonruter.
see #32576.

git-svn-id: https://develop.svn.wordpress.org/trunk@32807 602fd350-edb4-49c9-b593-d223f7449a82
2015-06-16 22:17:39 +00:00
Dominik Schilling (ocean90)
c0a66eba79 Add menu management to the Customizer.
This brings in the Menu Customizer plugin: https://wordpress.org/plugins/menu-customizer/.

props celloexpressions, westonruter, valendesigns, voldemortensen, ocean90, adamsilverstein, kucrut, jorbin, designsimply, afercia, davidakennedy, obenland.
see #32576.

git-svn-id: https://develop.svn.wordpress.org/trunk@32806 602fd350-edb4-49c9-b593-d223f7449a82
2015-06-16 22:07:08 +00:00
Helen Hou-Sandi
0433b87fdf Media list table: Avoid PHP notices by using the proper variables.
Also visually tightens up the row actions.

props tyxla.
fixes #32657. see #29881.


git-svn-id: https://develop.svn.wordpress.org/trunk@32805 602fd350-edb4-49c9-b593-d223f7449a82
2015-06-16 21:32:53 +00:00
Scott Taylor
195b61009f In get_attachment_template(), pass an array of templates to get_query_template( 'attachment', $templates ), instead of bailing on the first found template.
Props willnorris, jfarthing84, SergeyBiryukov, DrewAPicture, wonderboymusic.
Fixes #15337.


git-svn-id: https://develop.svn.wordpress.org/trunk@32804 602fd350-edb4-49c9-b593-d223f7449a82
2015-06-16 20:49:44 +00:00
Scott Taylor
d878213e55 In wp_nav_menu(), ensure that the $menu arg is populated when passed to filters.
Props greuben, chriscct7.
Fixes #16594.


git-svn-id: https://develop.svn.wordpress.org/trunk@32803 602fd350-edb4-49c9-b593-d223f7449a82
2015-06-16 20:33:00 +00:00
Scott Taylor
a6a0480eb0 Add a class method to wpLink, buildHtml(). This will allows devs to duck-punch the implementation.
Props martinsachse.
Fixes #32180.


git-svn-id: https://develop.svn.wordpress.org/trunk@32802 602fd350-edb4-49c9-b593-d223f7449a82
2015-06-16 20:19:54 +00:00
Scott Taylor
862c761c08 Avoid using HTML in translation strings in edit-form-comment.php.
Fixes #31847.


git-svn-id: https://develop.svn.wordpress.org/trunk@32801 602fd350-edb4-49c9-b593-d223f7449a82
2015-06-16 20:07:14 +00:00
Scott Taylor
296c559baf if is a statment, not a function.
See #32444.


git-svn-id: https://develop.svn.wordpress.org/trunk@32800 602fd350-edb4-49c9-b593-d223f7449a82
2015-06-16 20:00:15 +00:00
Scott Taylor
9cf3adb204 Avoid using <code> in a translation string.
Props ramiy.
Fixes #31848.


git-svn-id: https://develop.svn.wordpress.org/trunk@32799 602fd350-edb4-49c9-b593-d223f7449a82
2015-06-16 19:52:39 +00:00
Helen Hou-Sandi
d878ce73f5 Media list table: Restore row actions.
see #29881, #32657.


git-svn-id: https://develop.svn.wordpress.org/trunk@32798 602fd350-edb4-49c9-b593-d223f7449a82
2015-06-16 19:46:27 +00:00
Scott Taylor
a4765f9e1b Document the default list of allowed protocols in the doc block for wp_allowed_protocols() and cross-reference in esc_url() and the kses_allowed_protocols filter.
Props GunGeekATX.
Fixes #32421.


git-svn-id: https://develop.svn.wordpress.org/trunk@32797 602fd350-edb4-49c9-b593-d223f7449a82
2015-06-16 19:44:39 +00:00
Helen Hou-Sandi
b9b36d1c57 Comments: Better markup for the edit screen.
Previously there were no labels, and since labels can't contain links and the links were of dubious value, we've removed those.

props afercia, DrewAPicture.
fixes #31326.


git-svn-id: https://develop.svn.wordpress.org/trunk@32796 602fd350-edb4-49c9-b593-d223f7449a82
2015-06-16 18:53:16 +00:00
Ella Iseulde Van Dorpe
a65f178bbb TinyMCE: wptextpattern: Add blockquote and headings
As discussed in the editor meeting 9 June.
We should re-evaluate these additions towards the end of the release.

See #31441.


git-svn-id: https://develop.svn.wordpress.org/trunk@32795 602fd350-edb4-49c9-b593-d223f7449a82
2015-06-16 13:51:37 +00:00
Boone Gorges
8235387ee4 Clean up uploaded file after test_media_handle_upload_sets_post_excerpt().
Props McGuive7.
Fixes #32534.

git-svn-id: https://develop.svn.wordpress.org/trunk@32794 602fd350-edb4-49c9-b593-d223f7449a82
2015-06-16 12:37:30 +00:00
Dion Hulse
f5a914218d Add a filter to wp_safe_redirect() for the fallback URL.
Props anubisthejackle. Fixes #22612


git-svn-id: https://develop.svn.wordpress.org/trunk@32793 602fd350-edb4-49c9-b593-d223f7449a82
2015-06-16 05:25:32 +00:00
Boone Gorges
91512a9161 Tag/category conversion link on edit-tags.php should point to specific importer page when cat2tag plugin is active.
Props solarissmoke, c3mdigital.
Fixes #16369.

git-svn-id: https://develop.svn.wordpress.org/trunk@32792 602fd350-edb4-49c9-b593-d223f7449a82
2015-06-16 04:29:04 +00:00
Scott Taylor
86672e7d8c sanitize_option() needs to handle WP_Error. DRY the conditional calls to add_settings_error().
Props chriscct7 for an initial patch.
Fixes #32350.


git-svn-id: https://develop.svn.wordpress.org/trunk@32791 602fd350-edb4-49c9-b593-d223f7449a82
2015-06-16 01:28:47 +00:00
Scott Taylor
7abf3cb0c3 Add a note to wptexturize() docs.
Props miqrogroove.
Fixes #32521.


git-svn-id: https://develop.svn.wordpress.org/trunk@32790 602fd350-edb4-49c9-b593-d223f7449a82
2015-06-16 00:56:35 +00:00
Scott Taylor
1e8fb99ebd Improve the consistency of punctuation matching in wptexturize().
Adds unit tests.

Props miqrogroove.
Fixes #31886.


git-svn-id: https://develop.svn.wordpress.org/trunk@32789 602fd350-edb4-49c9-b593-d223f7449a82
2015-06-16 00:49:45 +00:00
Scott Taylor
40bb9aa3d9 Allow 'Cockney' filter to be translated.
Updates unit test.

Props miqrogroove.
Fixes #31953.


git-svn-id: https://develop.svn.wordpress.org/trunk@32788 602fd350-edb4-49c9-b593-d223f7449a82
2015-06-16 00:45:49 +00:00
Scott Taylor
7dd8a1364a In the youtube_embed_url embed handler, make embed a non-capturing group that alternately matches for v - YouTube supports both URL paths.
Add unit test cases.

Props dmchale for some patch work.
Fixes #32161.


git-svn-id: https://develop.svn.wordpress.org/trunk@32787 602fd350-edb4-49c9-b593-d223f7449a82
2015-06-16 00:34:06 +00:00
Scott Taylor
e88721433c In get_comment_reply_link(), when generating the reply link, add the replytocom query arg to the result of get_permalink() on the current $post, instead of the current global request URI.
Props nazmul.hossain.nihal.
Fixes #31333.


git-svn-id: https://develop.svn.wordpress.org/trunk@32786 602fd350-edb4-49c9-b593-d223f7449a82
2015-06-16 00:18:39 +00:00
Scott Taylor
2860548f5b Set $_SERVER['REQUEST_METHOD'] for unit tests.
Props johnbillion.
Fixes #32636.


git-svn-id: https://develop.svn.wordpress.org/trunk@32785 602fd350-edb4-49c9-b593-d223f7449a82
2015-06-16 00:03:25 +00:00
Dion Hulse
9f2ad2538e Updates: Consistently use the same variable to refer to the plugin, avoids a potential PHP Notice when an external update script adds data without that key.
Props mordauk. Fixes #31784


git-svn-id: https://develop.svn.wordpress.org/trunk@32784 602fd350-edb4-49c9-b593-d223f7449a82
2015-06-15 06:25:58 +00:00
Dion Hulse
8455dd10da Updats: Add a filter for the options params for the update being performed.
Props nofearinc. Fixes #27754


git-svn-id: https://develop.svn.wordpress.org/trunk@32783 602fd350-edb4-49c9-b593-d223f7449a82
2015-06-15 05:34:52 +00:00
Dion Hulse
5b607d7ff6 Updates: Allow the update row to include the active border styling post-ajax update.
Props TobiasBg. Fixes #32129


git-svn-id: https://develop.svn.wordpress.org/trunk@32782 602fd350-edb4-49c9-b593-d223f7449a82
2015-06-15 05:12:41 +00:00
Dion Hulse
4f8b348c9b Updates: Remove redundant title tags from update outputs.
Props afercia. Fixes #32530


git-svn-id: https://develop.svn.wordpress.org/trunk@32781 602fd350-edb4-49c9-b593-d223f7449a82
2015-06-15 05:08:48 +00:00
Dion Hulse
672f394b57 Updates: When an update fails (and it's not during the credential form) allow further updates to continue, with the assumption that the error only affects a single plugin.
Props magicroundabout. Fixes #32110 for trunk.


git-svn-id: https://develop.svn.wordpress.org/trunk@32780 602fd350-edb4-49c9-b593-d223f7449a82
2015-06-15 04:27:37 +00:00
Dion Hulse
a5ed63c86f Updates: Display the failure reason in addition to 'Update Failed', allows for debugging by site owners.
Fixes #32435, #32473


git-svn-id: https://develop.svn.wordpress.org/trunk@32779 602fd350-edb4-49c9-b593-d223f7449a82
2015-06-15 03:47:54 +00:00
Dion Hulse
5a33c20515 Updates: When a error occurs during the connection phase, pass the error message back as the ajax failure message.
See #32435


git-svn-id: https://develop.svn.wordpress.org/trunk@32778 602fd350-edb4-49c9-b593-d223f7449a82
2015-06-15 03:31:40 +00:00
Dion Hulse
7805a509f3 Updates: Better handling when the credential form is long (such as when SSH is active). This adds scrolling to the dialogue, and hides the SSH-specific fields when not using the SSH handler.
See #32435


git-svn-id: https://develop.svn.wordpress.org/trunk@32777 602fd350-edb4-49c9-b593-d223f7449a82
2015-06-15 03:19:30 +00:00
Dion Hulse
d72005f6d0 Updates: When a connection failure occurs, and no credential form is present client side, allow it to fall through to the normal failure handlers.
See #32435


git-svn-id: https://develop.svn.wordpress.org/trunk@32776 602fd350-edb4-49c9-b593-d223f7449a82
2015-06-15 02:47:19 +00:00
Jeremy Felt
7819ac5d16 Introduce get_main_network_id()
Expand on the logic previously available as part of `is_main_network()` and provide a way to obtain the ID of the main network. Most useful in multi-network configurations.

Props @johnjamesjacoby for the initial patch.
Fixes #30294.


git-svn-id: https://develop.svn.wordpress.org/trunk@32775 602fd350-edb4-49c9-b593-d223f7449a82
2015-06-14 21:44:45 +00:00
Helen Hou-Sandi
97e6967d63 Multisite: Use an email input for new user email address.
We also need to set novalidate on the form due to some browsers rejecting valid email addresses containing an IDN. We should holistically investigate whether this is still an issue in any major browsers at some point.

props earnjam.
fixes #32643.


git-svn-id: https://develop.svn.wordpress.org/trunk@32774 602fd350-edb4-49c9-b593-d223f7449a82
2015-06-14 20:40:35 +00:00
Andrew Nacin
6d8e339608 Media: Support title fields to be removed from attachments.
props antpb.
fixes #23932.


git-svn-id: https://develop.svn.wordpress.org/trunk@32773 602fd350-edb4-49c9-b593-d223f7449a82
2015-06-14 20:32:58 +00:00
Helen Hou-Sandi
32845bd9c6 Reduce form spacing on narrower screens.
props liljimmi.
fixes #32489, #32484.


git-svn-id: https://develop.svn.wordpress.org/trunk@32772 602fd350-edb4-49c9-b593-d223f7449a82
2015-06-14 20:11:40 +00:00
Andrew Nacin
3c554c0391 Add add_user_role and remove_user_role actions for WP_User::add_role() and remove_role().
props shooper.
fixes #32060.


git-svn-id: https://develop.svn.wordpress.org/trunk@32771 602fd350-edb4-49c9-b593-d223f7449a82
2015-06-14 19:25:17 +00:00
Aaron Jorbin
7988f78e44 Improve dbDelta unit tests
Add new tests for more parts of dbDelta.  This was cleaned up and prepared for commit at #wcphilly contributor day.

Props jdgrimes, tryon, jtsternberg, ebinnion, JPry, avnarun, kevkoeh, jorbin, salcode.
Fixes #29020.



git-svn-id: https://develop.svn.wordpress.org/trunk@32770 602fd350-edb4-49c9-b593-d223f7449a82
2015-06-14 19:22:20 +00:00
Andrew Nacin
cda77232fe Update comment caches in WP_Comment_Query, rather than comments template.
props dd32.
fixes #31081.


git-svn-id: https://develop.svn.wordpress.org/trunk@32769 602fd350-edb4-49c9-b593-d223f7449a82
2015-06-14 19:20:12 +00:00
Andrew Nacin
8b5b201fa1 Tweak the first post/page content to get with the times.
props chriscct7.
fixes #22474.


git-svn-id: https://develop.svn.wordpress.org/trunk@32768 602fd350-edb4-49c9-b593-d223f7449a82
2015-06-14 18:55:52 +00:00
Aaron Jorbin
a4fed87d43 Restore [32732] as it wasn't the actual cause of test failures as those failures where fixed separately.
See #32732



git-svn-id: https://develop.svn.wordpress.org/trunk@32767 602fd350-edb4-49c9-b593-d223f7449a82
2015-06-14 18:55:16 +00:00
Aaron Jorbin
84ee11c768 Revert [32732] since it is causing the tests to break
See #32732



git-svn-id: https://develop.svn.wordpress.org/trunk@32766 602fd350-edb4-49c9-b593-d223f7449a82
2015-06-14 18:42:50 +00:00
Aaron Jorbin
caf041d76e Improve lastBuildDate timestamp in rss feeds
RSS feed timestamps should reflect the actual timestamps for those RSS feeds rather than the generic timestamp for all posts and all comments. 

Props stevenkword.
Fixes #4575.




git-svn-id: https://develop.svn.wordpress.org/trunk@32765 602fd350-edb4-49c9-b593-d223f7449a82
2015-06-14 18:36:14 +00:00
Dominik Schilling (ocean90)
c6bf4b951b Nav menus: Introduce a wp_get_nav_menu_object filter in wp_get_nav_menu_object() to filter the retrieved nav_menu term.
props westonruter.
fixes #32629.

git-svn-id: https://develop.svn.wordpress.org/trunk@32764 602fd350-edb4-49c9-b593-d223f7449a82
2015-06-14 17:36:21 +00:00
Dominik Schilling (ocean90)
6e54e12aed Nav menus: Reset the fallback_cb default argument in wp_nav_menu in case of a Customizer preview.
props westonruter.
see #32576.

git-svn-id: https://develop.svn.wordpress.org/trunk@32763 602fd350-edb4-49c9-b593-d223f7449a82
2015-06-14 17:13:23 +00:00