Commit Graph

5202 Commits

Author SHA1 Message Date
Scott Taylor
dccf5ceb90 Empty return statements are unnecessary at the end of functions.
See #30799.

Built from https://develop.svn.wordpress.org/trunk@31679


git-svn-id: http://core.svn.wordpress.org/trunk@31660 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-03-08 23:09:27 +00:00
Scott Taylor
c1cab11ceb Use $this-> instead of parent:: when calling tablenav() in WP_Theme_Install_List_Table.
See #30799.

Built from https://develop.svn.wordpress.org/trunk@31672


git-svn-id: http://core.svn.wordpress.org/trunk@31653 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-03-07 23:03:27 +00:00
Andrew Ozz
be207e6550 PressThis: make the Preview button "subtle".
See #31458.
Built from https://develop.svn.wordpress.org/trunk@31655


git-svn-id: http://core.svn.wordpress.org/trunk@31636 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-03-07 01:50:26 +00:00
Andrew Ozz
9716d171c7 PressThis: add preview functionality. Opens the preview in a new window or a tab next to the source tab.
Fixes #31458.
Built from https://develop.svn.wordpress.org/trunk@31654


git-svn-id: http://core.svn.wordpress.org/trunk@31635 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-03-07 01:17:26 +00:00
Andrew Ozz
a27967aa05 PressThis:
- Close the sidebar on moving the focus outside of it (by clicking or by "tabbing").
- Fix a (weird) structural CSS problem where clicks go through the sidebar when it is open.
- Clean up the JS a bit.
Fixes #31457.
Built from https://develop.svn.wordpress.org/trunk@31651


git-svn-id: http://core.svn.wordpress.org/trunk@31632 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-03-06 22:57:26 +00:00
Scott Taylor
8f0b626d13 Introduce a function, wp_attachment_is( $type, $post = 0 ), to collapse the logic for determining whether an attachment is an image, audio, or video.
This is admittedly a first pass. There needs to be a generic handler for when any other type is passed, but for now it accepts the whitelist.

See #25275.

Built from https://develop.svn.wordpress.org/trunk@31645


git-svn-id: http://core.svn.wordpress.org/trunk@31626 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-03-06 20:26:26 +00:00
Andrew Ozz
5abac389fa PressThis: when server-side parsing, filter small images by the width and height attributes if set.
See #31373.
Built from https://develop.svn.wordpress.org/trunk@31637


git-svn-id: http://core.svn.wordpress.org/trunk@31618 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-03-06 02:03:27 +00:00
Andrew Ozz
bcad925af4 PressThis:
- Fix error when checking for empty array keys.
- Add better DailyMotion embed support.
Props stephdau, see #31373.
Built from https://develop.svn.wordpress.org/trunk@31635


git-svn-id: http://core.svn.wordpress.org/trunk@31616 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-03-06 01:17:24 +00:00
Scott Taylor
da7359b060 After [31620], when checking for HTTP URLs, make sure we are checking the shortcode body instead of an indexed attribute.
See #31139.

Built from https://develop.svn.wordpress.org/trunk@31626


git-svn-id: http://core.svn.wordpress.org/trunk@31607 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-03-05 16:26:25 +00:00
Scott Taylor
f9c138b4c4 detached affects the wp() call for the media list table, so switch our new $_GET key to detach.
See #6820.

Built from https://develop.svn.wordpress.org/trunk@31624


git-svn-id: http://core.svn.wordpress.org/trunk@31605 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-03-05 15:59:27 +00:00
Scott Taylor
cc953717b7 Allow inline editing of width and height parameters while previewing an embed in the media modal:
* Use `wp.shortcode()` instead of manually constructing a shortcode in `views/embed/link`
* Allow a URL to transition to a shortcode (and vice versa) when returning an embed to TinyMCE
* In `WP_Embed`, store the last URL and last set of attributes requested in class properties
* `wp_ajax_parse_embed()`, allow `[embed]`s to have attributes. Return `attr` in the response.

This is a first pass to allow broad testing with recent MCE view changes. 

See #31139.

Built from https://develop.svn.wordpress.org/trunk@31620


git-svn-id: http://core.svn.wordpress.org/trunk@31601 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-03-05 06:00:26 +00:00
Scott Taylor
d3471e9850 Allow attachments to be Detached from their parent in media grid and list modes.
See #6820.

Built from https://develop.svn.wordpress.org/trunk@31619


git-svn-id: http://core.svn.wordpress.org/trunk@31600 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-03-05 05:35:28 +00:00
Helen Hou-Sandí
df08581656 List tables: Display front and posts page indicators.
fixes #30190.

Built from https://develop.svn.wordpress.org/trunk@31610


git-svn-id: http://core.svn.wordpress.org/trunk@31591 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-03-04 19:45:25 +00:00
Andrew Ozz
f53199487d PressThis:
- Improve handling of the data, both from the bookmarklet and from server-side parsing.
- Standardize on processing the data in PHP and remove duplicate code from JS.
- Improve the bookmarklet code and remove pre-filtering of the data.
Part props stephdau, see #31373.
Built from https://develop.svn.wordpress.org/trunk@31609


git-svn-id: http://core.svn.wordpress.org/trunk@31590 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-03-04 19:29:25 +00:00
Helen Hou-Sandí
513a038159 Remove the once-placeholder-esque "tag hint", which has not worked in quite some time.
It's not particularly useful, and adds visual noise when in place.

props welcher.
fixes #31485.

Built from https://develop.svn.wordpress.org/trunk@31607


git-svn-id: http://core.svn.wordpress.org/trunk@31588 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-03-03 21:53:25 +00:00
Helen Hou-Sandí
5567d03278 Nav menus: Better JS performance on initial load of edit screen.
The accessibility helpers previously processed all items when editing a menu, which was quite slow to the point of being unresponsive for large menus. They now only process items when they are expanded or a user comes near them in some way, such as hover or focus.

Also simplifies a redundant set of click event handlers down to one, which further enhances performance.

props atimmer, sevenspark.
fixes #25698.

Built from https://develop.svn.wordpress.org/trunk@31604


git-svn-id: http://core.svn.wordpress.org/trunk@31585 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-03-03 21:14:25 +00:00
Andrew Ozz
a9f165915f Press This:
- Remove classes from suggested HTML for the editor.
- Improve the filter, pass an associative array as param.
- Use <em> instead of <cite>.
Props Michael-Arestad, kraftbj. Fixes #31493.
Built from https://develop.svn.wordpress.org/trunk@31601


git-svn-id: http://core.svn.wordpress.org/trunk@31582 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-03-02 23:41:27 +00:00
Drew Jaynes
0b3c3092fc Clean up and refine DocBlocks for a variety of functions and methods in wp-admin/includes/template.php.
* Also documents the default arguments of `wp_terms_checklist()` as a hash notation.

Props ipm-frommen, DrewAPicture.
Fixes #31248.

Built from https://develop.svn.wordpress.org/trunk@31599


git-svn-id: http://core.svn.wordpress.org/trunk@31580 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-03-02 06:11:40 +00:00
Andrew Ozz
c22307fd9a PressThis: make sure buttons.css is loaded before press-this.css. Use (int) $post_ID instead of $post->ID.
See #31373.
Built from https://develop.svn.wordpress.org/trunk@31597


git-svn-id: http://core.svn.wordpress.org/trunk@31578 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-03-02 00:58:25 +00:00
Andrew Ozz
3a124ac2f4 PressThis:
- Replace all `%1$s` and `%2$s` in suggestedHTML in case plugins repeat them.
- Fix docs typo, props kraftbj.
See #31373.
Built from https://develop.svn.wordpress.org/trunk@31596


git-svn-id: http://core.svn.wordpress.org/trunk@31577 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-03-01 23:28:26 +00:00
Andrew Ozz
4e8138cea5 PressThis:
- Simplify `getSuggestedContent()` and helpers. No need to override the global `data`.
- Replace the `press_this_source_string` and `press_this_source_link` filters with `press_this_suggested_html` that allows filtering of the link and the wrapper HTML tags.
See #31373.
Built from https://develop.svn.wordpress.org/trunk@31595


git-svn-id: http://core.svn.wordpress.org/trunk@31576 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-03-01 22:44:25 +00:00
Drew Jaynes
a337c34c4e Fix a typo in the $args parameter hash notation description for add_settings_field().
See #28975, [31592].

Built from https://develop.svn.wordpress.org/trunk@31593


git-svn-id: http://core.svn.wordpress.org/trunk@31574 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-03-01 07:57:32 +00:00
Drew Jaynes
82fd5e33dd Add a hash notation for the optional $args parameter in add_settings_field(), which includes a description for the new $class argument added in [31560].
Also adds a changelog entry to `add_settings_field()` DocBlock for the new `$class` argument.

See [31560].
Fixes #28975.

Built from https://develop.svn.wordpress.org/trunk@31592


git-svn-id: http://core.svn.wordpress.org/trunk@31573 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-03-01 07:53:25 +00:00
Andrew Ozz
8164f8fe0e PressThis:
- Remove unneeded passing of post formats strings to JS.
- Set the currently selected post format name with jQuery.
See #31373.
Built from https://develop.svn.wordpress.org/trunk@31589


git-svn-id: http://core.svn.wordpress.org/trunk@31570 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-02-28 20:08:27 +00:00
Dominik Schilling
8ecb7f5d1e Press This: Backwards compatibility enhancements.
* Add missing actions for printing styles/scripts.
* Since `$hook_suffix` is null, hardcode `press-this.php`.
* Restore body classes, add filter.
* Use boolean value instead of `__return_false()`.
* Use `wp_json_encode()`.
* Update docs for filters in script-loader.php.
* Make `<a href="%1$s">%2$s</a>` not translatable.

see #31373.
Built from https://develop.svn.wordpress.org/trunk@31588


git-svn-id: http://core.svn.wordpress.org/trunk@31569 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-02-28 10:36:25 +00:00
Dominik Schilling
c7dba8b015 Press This: RTL improvements.
* Load the RTL version of press-this-editor.css.
* Use more semantic class names for the arrows, Makes it easier to swap the arrows in RTL, see #31478.

see #31474.
Built from https://develop.svn.wordpress.org/trunk@31577


git-svn-id: http://core.svn.wordpress.org/trunk@31558 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-02-27 19:44:24 +00:00
Scott Taylor
f6b1b01ecd Make a new function, wp_delete_file(). Use it.
Props scribu, wonderboymusic.
Fixes #17864.

Built from https://develop.svn.wordpress.org/trunk@31575


git-svn-id: http://core.svn.wordpress.org/trunk@31556 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-02-27 16:51:25 +00:00
Dominik Schilling
5e47a1f633 Press This: Use boolean value instead of __return_true(). Add missing hook docs.
see #31373.
Built from https://develop.svn.wordpress.org/trunk@31571


git-svn-id: http://core.svn.wordpress.org/trunk@31552 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-02-27 11:15:25 +00:00
Andrew Ozz
4593319ea7 PressThis: accessibility enhancements:
- Add missing form labels.
- Add some screen-reader-text and aria-hidden attributes.
- Focus handling improvements.
- Change tagcloud-link into a button.
- Add missing ID attribute in tools.php.
Props afercia. Fixes #31449.
Built from https://develop.svn.wordpress.org/trunk@31566


git-svn-id: http://core.svn.wordpress.org/trunk@31547 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-02-27 02:50:25 +00:00
Helen Hou-Sandí
b95d99d1c1 Settings API: Allow passing a class to add_settings_field() via the $args array.
While it's possible to target the wrapper element otherwise (currently a `tr`), this deficiency is made especially noticeable when custom code cannot take advantage of what core is doing, such as with avatars in #30168.

props valendesigns.
fixes #28975. see #30168.

Built from https://develop.svn.wordpress.org/trunk@31560


git-svn-id: http://core.svn.wordpress.org/trunk@31541 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-02-26 19:59:25 +00:00
Sergey Biryukov
49dd31506f Press This: Use correct URL for update bookmarklet link.
props kraftbj.
fixes #31461.
Built from https://develop.svn.wordpress.org/trunk@31556


git-svn-id: http://core.svn.wordpress.org/trunk@31537 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-02-26 08:48:25 +00:00
Scott Taylor
7cb45f2402 Don't call the size function count() as part of a test condition in loops. Compute the size beforehand, and not on each iteration.
Scrutinizer added a Performance label: these are the only violations.

See #30799.

Built from https://develop.svn.wordpress.org/trunk@31554


git-svn-id: http://core.svn.wordpress.org/trunk@31535 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-02-26 05:48:24 +00:00
Scott Taylor
4310147e54 Add missing access modifiers to WP_Press_This.
See #31456.

Built from https://develop.svn.wordpress.org/trunk@31552


git-svn-id: http://core.svn.wordpress.org/trunk@31533 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-02-26 05:18:25 +00:00
Drew Jaynes
50bb433c66 Ignore the internal-use function _wp_posts_page_notice() from parsing for the code reference.
See #17470.

Built from https://develop.svn.wordpress.org/trunk@31551


git-svn-id: http://core.svn.wordpress.org/trunk@31532 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-02-26 03:08:28 +00:00
Helen Hou-Sandí
ae3baa7c5b Hide irrelevant UI and display a message when editing the page for posts.
Users are frequently confused as to why the content they've entered or the page template they've selected doesn't apply for this one page. Showing and saving items that don't do anything hurts trust.

Developers can elect to turn on the editor should they be using it for something. If the content isn't empty, the editor will show so that users still have access to their content.

props alexkingorg for the initial, long-suffering patch.
fixes #17470.

Built from https://develop.svn.wordpress.org/trunk@31550


git-svn-id: http://core.svn.wordpress.org/trunk@31531 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-02-26 02:47:25 +00:00
Andrew Ozz
1857055bb8 PressThis v2, first run. Props michael-arestad, stephdau, marcelomazza, DrewAPicture, iseulde, afercia, kraftbj, rachelbaker, AramZS, dd32. See #31373.
Built from https://develop.svn.wordpress.org/trunk@31534


git-svn-id: http://core.svn.wordpress.org/trunk@31515 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-02-25 01:50:26 +00:00
Mark Jaquith
8b180b9a46 Add theme browsing and theme switching to the Customizer
* Brings into core the Customizer Theme Switcher feature plugin
* You can now browse, preview, and activate themes right from the Customizer

fixes #31303.
props celloexpressions, afercia, westonruter, folletto, designsimply
Built from https://develop.svn.wordpress.org/trunk@31533


git-svn-id: http://core.svn.wordpress.org/trunk@31514 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-02-24 20:31:24 +00:00
Drew Jaynes
4743843323 Add missing function and parameter descriptions to a variety of functions in wp-admin/includes/image-edit.php.
Props NikV for the initial patch.
Fixes #31353.

Built from https://develop.svn.wordpress.org/trunk@31529


git-svn-id: http://core.svn.wordpress.org/trunk@31510 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-02-24 06:07:26 +00:00
Jeremy Felt
7644e68119 Provide proper label associations and descriptions throughout the network admin
* Add labels previously missing for many inputs throughout the network admin screen.
* Add proper `aria-describedby` attributes to provide better descriptions.
* Wrap grouped inputs with `fieldset` elements.
* Remove now unneeded `title` attributes when appropriate.

Props cfoellmann, afercia, rianrietveld.

Fixes #38406.

Built from https://develop.svn.wordpress.org/trunk@31517


git-svn-id: http://core.svn.wordpress.org/trunk@31498 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-02-23 02:29:26 +00:00
Andrew Ozz
19dbf7b998 Improve table footer tab sequence by moving <tfoot> after <tbody>. Props afercia, rianrietveld, DrewAPicture. Fixes #30914.
Built from https://develop.svn.wordpress.org/trunk@31513


git-svn-id: http://core.svn.wordpress.org/trunk@31494 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-02-22 21:48:26 +00:00
Jeremy Felt
678982ee7e Do not activate plugins on initial installation in multisite.
Check `is_multisite()` before activating a plugin that has been installed via AJAX. Without this check, the plugin would be automatically activated on the main site of the network.

Props ianmjones.

Fixes #31327.

Built from https://develop.svn.wordpress.org/trunk@31511


git-svn-id: http://core.svn.wordpress.org/trunk@31492 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-02-22 21:30:25 +00:00
Sergey Biryukov
8eb25609e9 Dashboard: Add a filter for the query arguments used for the Recent Posts widget.
props danielbachhuber.
fixes #29374.
Built from https://develop.svn.wordpress.org/trunk@31508


git-svn-id: http://core.svn.wordpress.org/trunk@31489 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-02-22 19:57:24 +00:00
Sergey Biryukov
4b21c67738 Remove untranslatable period from a successful update message in Bulk_Upgrader_Skin::add_strings().
props mako09, DrewAPicture.
fixes #30793.
Built from https://develop.svn.wordpress.org/trunk@31506


git-svn-id: http://core.svn.wordpress.org/trunk@31487 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-02-22 17:07:24 +00:00
Sergey Biryukov
19a43125cd Don't try to read a non-existent Exif:Title tag in wp_read_image_metadata(), as it's not a part of the Exif standard.
props tyxla.
fixes #31043.
Built from https://develop.svn.wordpress.org/trunk@31462


git-svn-id: http://core.svn.wordpress.org/trunk@31443 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-02-14 09:14:28 +00:00
Sergey Biryukov
e2f5a8094e Avoid a PHP notice in wp_install_language_form() and wp_dropdown_languages() if the language doesn't have a ISO 639-1 code.
props barrykooij.
fixes #31319.
Built from https://develop.svn.wordpress.org/trunk@31447


git-svn-id: http://core.svn.wordpress.org/trunk@31428 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-02-13 11:23:26 +00:00
Sergey Biryukov
7b9d981a54 Use correct default values for some admin template functions.
props ipm-frommen.
fixes #31308.
Built from https://develop.svn.wordpress.org/trunk@31446


git-svn-id: http://core.svn.wordpress.org/trunk@31427 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-02-13 06:51:25 +00:00
Sergey Biryukov
5a0b01edf1 Rename unused argument and remove obsolete global in iframe_header().
props ipm-frommen.
fixes #31309.
Built from https://develop.svn.wordpress.org/trunk@31443


git-svn-id: http://core.svn.wordpress.org/trunk@31424 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-02-13 05:31:26 +00:00
Sergey Biryukov
268d79cb77 _list_meta_row() should always return a string.
props ipm-frommen.
fixes #31310.
Built from https://develop.svn.wordpress.org/trunk@31442


git-svn-id: http://core.svn.wordpress.org/trunk@31423 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-02-13 04:22:26 +00:00
Sergey Biryukov
6fd67ad80e Correct parameter types for Plugin_Upgrader::bulk_upgrade() and Theme_Upgrader::bulk_upgrade().
props ipm-frommen.
fixes #31312.
Built from https://develop.svn.wordpress.org/trunk@31441


git-svn-id: http://core.svn.wordpress.org/trunk@31422 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-02-13 04:19:27 +00:00
Sergey Biryukov
43583a1b9e Terminate JS statements in two admin files.
props ipm-frommen.
fixes #31311.
Built from https://develop.svn.wordpress.org/trunk@31440


git-svn-id: http://core.svn.wordpress.org/trunk@31421 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-02-13 04:09:27 +00:00
Helen Hou-Sandí
2a1f3c4c1f Posts list table: Add a filter to disable the months dropdown.
It was previously possible to prevent it from displaying by filtering everything out from the results, but if one really doesn't want it, they should be able to short-circuit before the query even runs.

props norcross, SergeyBiryukov.
fixes #30254.

Built from https://develop.svn.wordpress.org/trunk@31438


git-svn-id: http://core.svn.wordpress.org/trunk@31419 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-02-12 18:38:29 +00:00
Dion Hulse
3cec3655e9 Prevent IE9 and lower displaying the download file dialogue when attempting to upload using the html4 Plupload handler.
The HTML4 Plupload handler uses a hidden iframe to POST the upload form,
Unfortunately Internet Explorer 9 doesn't support the `application/json` 
content-type which `wp_send_json_success()` and requires `text/html` instead.

This partially reverts [30354], keeping the better error messages.

Fixes #31037 for trunk.

Built from https://develop.svn.wordpress.org/trunk@31429


git-svn-id: http://core.svn.wordpress.org/trunk@31410 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-02-12 01:15:29 +00:00
Scott Taylor
6cb16f7a21 Remove unused media JS files.
See #28510.

Built from https://develop.svn.wordpress.org/trunk@31405


git-svn-id: http://core.svn.wordpress.org/trunk@31386 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-02-10 22:45:28 +00:00
Sergey Biryukov
0e65ae6176 Remove redundant string with a typo introduced in [25481].
see #31217.
Built from https://develop.svn.wordpress.org/trunk@31404


git-svn-id: http://core.svn.wordpress.org/trunk@31385 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-02-10 07:53:28 +00:00
Sergey Biryukov
12f4004989 Replace generic "Dear user" greeting in email notifications with a more personalized one.
props Ipstenu.
fixes #31217.
Built from https://develop.svn.wordpress.org/trunk@31403


git-svn-id: http://core.svn.wordpress.org/trunk@31384 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-02-10 07:47:27 +00:00
Sergey Biryukov
f166a51809 Update body class when switching between admin color schemes.
props valendesigns.
fixes #30488.
Built from https://develop.svn.wordpress.org/trunk@31400


git-svn-id: http://core.svn.wordpress.org/trunk@31381 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-02-10 02:23:28 +00:00
Boone Gorges
72f18cb067 Don't parse empty 'tax_input' keys in edit_post().
This fixes a bug introduced in [31359] where saving a tax_input that contained
only whitespace would result in a random tag being erroneously added to the
post.

See #30615.
Built from https://develop.svn.wordpress.org/trunk@31392


git-svn-id: http://core.svn.wordpress.org/trunk@31373 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-02-09 22:54:28 +00:00
Sergey Biryukov
1e0905793c Avoid inadvertent stomping of the original $args parameter passed to plugins_api_result and themes_api_result filters in plugins_api() and themes_api(), respectively.
Fixes a regression introduced in [25956].

props Corphi, obenland.
fixes #29079.
Built from https://develop.svn.wordpress.org/trunk@31363


git-svn-id: http://core.svn.wordpress.org/trunk@31344 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-02-07 06:21:22 +00:00
Boone Gorges
b9e661dcae Parse non-hierarchical tag input into term IDs before sending to wp_insert_post().
When editing a post, non-hierarchical taxonomy terms are sent as the
comma-separated list entered into the tax_input metabox. Passing these
values directly to `wp_update_post()` meant that they were interpreted as
term slugs rather than term names, causing mismatches when a typed string
matched the slug of one term and the name of a different term. We fix the
problem by preprocessing tax_input data sent from post.php, converting it to
unambiguous term_ids before saving.

Props boonebgorges, ArminBraun.
Fixes #30615.
Built from https://develop.svn.wordpress.org/trunk@31359


git-svn-id: http://core.svn.wordpress.org/trunk@31340 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-02-06 20:32:22 +00:00
Gary Pendergast
d7c6ac95bc Upgrades: wp_usermeta is a global table in multisite, so it should only be upgraded by the single site routines when we're not in a multisite install.
See #21212


Built from https://develop.svn.wordpress.org/trunk@31358


git-svn-id: http://core.svn.wordpress.org/trunk@31339 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-02-06 13:41:22 +00:00
Gary Pendergast
7444799a82 Upgrades: When upgrading a table to utf8mb4, we should run the ALTER TABLE query, even if it doesn't have any text columns. This will update the table's default character set, so that any text columns added in the future will have the expected character set.
See #21212 


Built from https://develop.svn.wordpress.org/trunk@31354


git-svn-id: http://core.svn.wordpress.org/trunk@31335 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-02-06 05:59:23 +00:00
Gary Pendergast
555a9f0912 Upgrades: When deciding if we can upgrade a table to utf8mb4, make sure we're checking the character set, not the collation.
Bump the DB version as well, as the update in [31349] wouldn't have triggered for anyone who tried it.

See #21212


Built from https://develop.svn.wordpress.org/trunk@31351


git-svn-id: http://core.svn.wordpress.org/trunk@31332 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-02-06 05:26:21 +00:00
Gary Pendergast
b2cf823105 WPDB: If a site is using the utf8 charset, and their version of MySQL supports utf8mb4, auto-upgrade them to utf8mb4.
This patch also resizes some indexes, to allow for the 767 byte index size limit in standard MySQL installs.

See #21212


Built from https://develop.svn.wordpress.org/trunk@31349


git-svn-id: http://core.svn.wordpress.org/trunk@31330 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-02-06 04:51:22 +00:00
Gary Pendergast
5e4d135411 Shiny Updates: Fix a PHP warning when installing new plugins.
Props lgladdy for the initial patch.

See #29820


Built from https://develop.svn.wordpress.org/trunk@31345


git-svn-id: http://core.svn.wordpress.org/trunk@31326 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-02-06 00:34:21 +00:00
Gary Pendergast
27aa3e92d7 Shiny Updates: If the current user is not allowed to install/update plugins, we should return a JSON error, so it can be used by the JS handlers.
See #29820


Built from https://develop.svn.wordpress.org/trunk@31335


git-svn-id: http://core.svn.wordpress.org/trunk@31316 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-02-05 06:16:23 +00:00
Gary Pendergast
b7926a518a Shiny Updates: Add capability checks to the ajax callbacks, to ensure the current user is allowed to install/update plugins.
See #29820


Built from https://develop.svn.wordpress.org/trunk@31334


git-svn-id: http://core.svn.wordpress.org/trunk@31315 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-02-05 06:05:22 +00:00
Gary Pendergast
9c69213f2b Shiny Updates: Add ajax-y updates to the plugin list page, and ajax-y updates and installs to the plugin card page.
This also includes JS architecture that can be expanded to support theme, core and language pack updates.

Props pento, ericlewis, lgladdy, adamsilverstein, DrewAPicture

See #29820


Built from https://develop.svn.wordpress.org/trunk@31333


git-svn-id: http://core.svn.wordpress.org/trunk@31314 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-02-05 04:19:23 +00:00
Helen Hou-Sandí
62e65c3a35 Accessibility: remove remaining instances of accesskey.
It is a poorly implemented browser feature, not particularly discoverable, and causes more problems than it helps solve.

props afercia.
fixes #29715.

Built from https://develop.svn.wordpress.org/trunk@31331


git-svn-id: http://core.svn.wordpress.org/trunk@31312 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-02-04 03:46:24 +00:00
Dion Hulse
e8f032c747 WP_Upgrader: Remove references to non-existant variables that have never existed.
Props jdgrimes. Fixes  #29087

Built from https://develop.svn.wordpress.org/trunk@31327


git-svn-id: http://core.svn.wordpress.org/trunk@31308 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-02-03 06:18:24 +00:00
Dion Hulse
92cb5936f1 Remove an unused parameter on install_plugins_upload().
Props michalzuber. Fixes #28964

Built from https://develop.svn.wordpress.org/trunk@31326


git-svn-id: http://core.svn.wordpress.org/trunk@31307 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-02-03 06:14:22 +00:00
Boone Gorges
eec82f9330 In get_sample_permalink(), override 'future' status before generating permalink.
In [31114], `get_permalink()` was modified to prevent pretty permalinks from
being generated for posts with the 'future' post status. This inadvertently
broke the pretty permalink preview for scheduled posts. The fix is to include
the 'future' status in the list of statuses that `get_sample_permalink()` fakes
as 'publish' before it fetches a permalink.

Props DrewAPicture.
Fixes #30910.
Built from https://develop.svn.wordpress.org/trunk@31323


git-svn-id: http://core.svn.wordpress.org/trunk@31304 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-02-02 16:50:22 +00:00
Boone Gorges
f345a72c58 Prevent terms in a show_in_quick_edit=false taxonomy from being updated by a faked AJAX request.
The UI for these taxonomies was hidden in [31308], but it remained possible to
send a direct POST request to the `inline-edit` endpoint to bypass the
restriction. The current changeset fixes this.

Props meloniq.
Fixes #26948.
Built from https://develop.svn.wordpress.org/trunk@31313


git-svn-id: http://core.svn.wordpress.org/trunk@31294 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-01-31 19:38:24 +00:00
Boone Gorges
e4f8d5e0bc Fix 'quick_edit_show_taxonomy' filter so that can properly be used for overrides in all cases.
See #26948.
Built from https://develop.svn.wordpress.org/trunk@31308


git-svn-id: http://core.svn.wordpress.org/trunk@31289 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-01-30 19:29:22 +00:00
Boone Gorges
abce542e5f Introduce 'show_in_quick_edit' parameter for register_taxonomy().
Setting 'show_in_quick_edit' to false when registering a custom taxonomy will
hide the taxonomy when editing posts using Quick Edit.

The new 'quick_edit_show_taxonomy' filter allows this behavior to be filtered
on a finer scale, as when you want a given taxonomy to be hidden for one post
type but not for others.

Props hlashbrooke.
Fixes #26948.
Built from https://develop.svn.wordpress.org/trunk@31307


git-svn-id: http://core.svn.wordpress.org/trunk@31288 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-01-30 19:18:23 +00:00
Sergey Biryukov
b05014805f Don't display the Help tab reference in Page Attributes meta box if Help tab was removed.
props bananastalktome.
fixes #31164.
Built from https://develop.svn.wordpress.org/trunk@31303


git-svn-id: http://core.svn.wordpress.org/trunk@31284 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-01-30 15:34:24 +00:00
Sergey Biryukov
5ac0568ee3 Switch to a 403 response code in places where it is more appropriate than a 500 due to permissions errors.
props tomdxw.
fixes #30927.
Built from https://develop.svn.wordpress.org/trunk@31300


git-svn-id: http://core.svn.wordpress.org/trunk@31281 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-01-29 21:15:22 +00:00
Drew Jaynes
0f20ecca9c Add missing descriptions to the DocBlocks for various functions in wp-admin/includes/taxonomy.php.
Also adds a few missing parameter descriptions.

Props ipm-frommen.
See #31008.

Built from https://develop.svn.wordpress.org/trunk@31293


git-svn-id: http://core.svn.wordpress.org/trunk@31274 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-01-29 11:34:22 +00:00
Drew Jaynes
f3033f34c6 Add missing descriptions to the DocBlocks for various functions in wp-admin/includes/post.php
Props ipm-frommen.
See #31008.

Built from https://develop.svn.wordpress.org/trunk@31292


git-svn-id: http://core.svn.wordpress.org/trunk@31273 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-01-29 11:32:22 +00:00
Drew Jaynes
d95586e943 Add missing summaries and descriptions for various functions in wp-admin/includes/upgrade.php.
Also generally improve existing parameter, return, and other documentation in various function DocBlocks.

Props morganestes.
Fixes #30825.

Built from https://develop.svn.wordpress.org/trunk@31246


git-svn-id: http://core.svn.wordpress.org/trunk@31227 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-01-19 09:15:22 +00:00
Drew Jaynes
d41e669efe Ensure the correct list of default tabs for the Plugin Install screen are documented.
Props stevenkword.
Fixes #31017.

Built from https://develop.svn.wordpress.org/trunk@31244


git-svn-id: http://core.svn.wordpress.org/trunk@31225 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-01-19 08:44:22 +00:00
Sergey Biryukov
768624cb99 Use the site's local time to create the first post during installation.
props extendwings.
fixes #29296.
Built from https://develop.svn.wordpress.org/trunk@31225


git-svn-id: http://core.svn.wordpress.org/trunk@31206 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-01-17 10:07:23 +00:00
Scott Taylor
02a1f35ac8 Fix some internal types that are passed to functions to avoid changing the acceptable types passed as arguments to those functions:
* In `WP_Importer->is_user_over_quota()`, the default value for the first argument for `upload_is_user_over_quota()` is `true`. Don't bother passing `1`.
* When calling `submit_button()` with no `$name`, pass empty string instead of `false`.
* The default value for the 2nd argument to `get_edit_post_link()` is `'display'`. Because PHP is PHP, passing `true` is the same as passing `'display'` or nothing. Don't bother passing `true`. 
* In `WP_User_Meta_Session_Tokens::drop_sessions()`, pass `0` instead of `false` to `delete_metadata()` as the value for `$object_id`, which expects an int. 

See #30799.

Built from https://develop.svn.wordpress.org/trunk@31220


git-svn-id: http://core.svn.wordpress.org/trunk@31201 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-01-16 22:51:21 +00:00
Scott Taylor
eeda68bbda Fix some erroneous @param annotations.
See #30799.

Built from https://develop.svn.wordpress.org/trunk@31219


git-svn-id: http://core.svn.wordpress.org/trunk@31200 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-01-16 22:44:25 +00:00
Scott Taylor
0f6d0b84d1 Remove unused local vars in delete_plugins(), delete_theme(), WP_Date_Query->validate_date_values(), global_terms(), and WP_Text_Diff_Renderer_Table->_changed().
This will clear out the "Unused Code" label in the next Scrutinizer report.

See #30799.

Built from https://develop.svn.wordpress.org/trunk@31217


git-svn-id: http://core.svn.wordpress.org/trunk@31198 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-01-16 21:19:22 +00:00
Scott Taylor
7c5038feb6 Calling ->chown() and ->chgrp() in WP_Filesystem_ftpsockets produces no side-effects. Remove the calls. ->chgrp() is defined in the super class, and does nothing, can be removed from the child class.
See #30799.

Built from https://develop.svn.wordpress.org/trunk@31216


git-svn-id: http://core.svn.wordpress.org/trunk@31197 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-01-16 21:10:23 +00:00
Scott Taylor
6fa7021d62 Calling ->chown() and ->chgrp() in WP_Filesystem_FTPext produces no side-effects. Remove the calls. ->chgrp() is defined in the super class, and does nothing, can be removed from the child class.
See #30799.

Built from https://develop.svn.wordpress.org/trunk@31215


git-svn-id: http://core.svn.wordpress.org/trunk@31196 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-01-16 21:07:24 +00:00
Scott Taylor
b8dd1f9c69 By initializing this array before a loop, Scrutinizer reports 0 (zero) "Coding Style" errors.
There are plenty of other kinds of errors, but this label will be cleared out.

See #30799.

Built from https://develop.svn.wordpress.org/trunk@31213


git-svn-id: http://core.svn.wordpress.org/trunk@31194 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-01-16 19:13:23 +00:00
Scott Taylor
bc55996a0b @param cleanup:
* `get_metadata()` will return literally anything, needs to be `mixed`
* `wp()` and `WP_Query::__construct()` no longer just take a query string
* Clarify a few others

See #30799.

Built from https://develop.svn.wordpress.org/trunk@31212


git-svn-id: http://core.svn.wordpress.org/trunk@31193 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-01-16 19:03:23 +00:00
Scott Taylor
cde4c83091 [31210] broke Supportflow on dotorg, which declares these methods as protected. Switch to protected for the noop methods. The subclasses can make them more visible using public.
See #30799.

Built from https://develop.svn.wordpress.org/trunk@31211


git-svn-id: http://core.svn.wordpress.org/trunk@31192 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-01-16 18:37:24 +00:00
Scott Taylor
3fb283db0a Add 2 noop methods to WP_List_Table: ->column_default() and ->column_cb().
`WP_List_Table` is essentially an `abstract` class. Some of its methods throw `die()` warnings if they aren't overridden in a child class.

These noop methods wouldn't be `abstract`, because they are not required in subclasses. However, `WP_List_Table` can call these methods in its own method, `->single_row_columns()`, whether a subclass defined them or not.

See #30799.

Built from https://develop.svn.wordpress.org/trunk@31210


git-svn-id: http://core.svn.wordpress.org/trunk@31191 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-01-16 17:42:22 +00:00
Scott Taylor
895794f74d In WP_Filesystem_Base subclasses that set $wp_base, remove this dead code.
Unused since [8009] - "Make WP_Filesystem work with new directory constants"

There is currently no declared field and no `@property` annotation.

See #30799.

Built from https://develop.svn.wordpress.org/trunk@31209


git-svn-id: http://core.svn.wordpress.org/trunk@31190 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-01-16 17:23:22 +00:00
Scott Taylor
b29a20b90a WP_Filesystem_Base should declare $errors and $options as fields for use by subclasses.
See #30799.

Built from https://develop.svn.wordpress.org/trunk@31208


git-svn-id: http://core.svn.wordpress.org/trunk@31189 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-01-16 17:10:43 +00:00
Scott Taylor
60c285aa22 In wp_ajax_parse_media_shortcode(), don't require a global $post for all passed shortcodes.
`embed` is the only shortcode that requires a post ID. This will allow MCE views to work for `playlist`, `audio`, and `video` outside of the Edit Post screen.

See #30835.

Built from https://develop.svn.wordpress.org/trunk@31201


git-svn-id: http://core.svn.wordpress.org/trunk@31182 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-01-16 05:19:22 +00:00
Scott Taylor
7f8b548df1 In HTML5, the action attribute is no longer required. Remove this attribute when empty.
The admin HTML is served with the HTML5 doctype.

"The action and formaction content attributes, if specified, must have a value that is a valid non-empty URL potentially surrounded by spaces." 
http://www.w3.org/html/wg/drafts/html/master/forms.html#attr-fs-action

Props voldemortensen.
Fixes #30126.

Built from https://develop.svn.wordpress.org/trunk@31200


git-svn-id: http://core.svn.wordpress.org/trunk@31181 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-01-16 04:16:24 +00:00
Scott Taylor
fe6b5983df In PHP 5.0.0, is_a() became deprecated in favour of the instanceof operator. Calling is_a() would result in an E_STRICT warning.
In PHP 5.3.0, `is_a()` is no longer deprecated, and will therefore no longer throw `E_STRICT` warnings.

To avoid warnings in PHP < 5.3.0, convert all `is_a()` calls to `$var instanceof WP_Class` calls.

`instanceof` does not throw any error if the variable being tested is not an object, it simply returns `false`.

Props markoheijnen, wonderboymusic.
Fixes #25672.

Built from https://develop.svn.wordpress.org/trunk@31188


git-svn-id: http://core.svn.wordpress.org/trunk@31169 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-01-16 01:06:24 +00:00
Scott Taylor
6704875855 Replace the 3 remaining occurrences of wpspin GIF with spinner.
Props avryl.
Fixes #27482.

Built from https://develop.svn.wordpress.org/trunk@31187


git-svn-id: http://core.svn.wordpress.org/trunk@31168 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-01-16 00:33:22 +00:00
Helen Hou-Sandí
62a197d6bf List tables: Use CSS :nth-child() selectors for zebra striping.
Note that this does not fix issues related to comment quick edit. Internal linking also continues to use the `.alternate` class for now. IE8 and below gracefully degrade by not having zebra striping.

There is some hoop jumping with adding an extra table row to maintain zebra striping during quick edit. Documenting that here for future reference; it is also in the inline documentation.

fixes #30981 and #26060. see #25060.

Built from https://develop.svn.wordpress.org/trunk@31181


git-svn-id: http://core.svn.wordpress.org/trunk@31162 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-01-14 22:14:22 +00:00
Scott Taylor
b51593763a WP_Themes_List_Table accesses $_pagination_args from the parent class. Switch $_pagination_args to protected in WP_List_Table.
See #30891.

Built from https://develop.svn.wordpress.org/trunk@31167


git-svn-id: http://core.svn.wordpress.org/trunk@31148 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-01-12 16:26:21 +00:00
Scott Taylor
4f6de09a5b Add a private field to WP_Terms_List_Table, $level.
See #30891.

Built from https://develop.svn.wordpress.org/trunk@31166


git-svn-id: http://core.svn.wordpress.org/trunk@31147 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-01-12 16:23:22 +00:00
Scott Taylor
194932fd6b Add a private field to WP_Posts_List_Table, $is_trash.
See #30891.

Built from https://develop.svn.wordpress.org/trunk@31165


git-svn-id: http://core.svn.wordpress.org/trunk@31146 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-01-12 16:22:22 +00:00