Commit Graph

1191 Commits

Author SHA1 Message Date
Andrew Ozz
34ff5cd2d2 Press This: fix the header styling and add a logo.
Props Michael-Arestad. Fixes #31472.

git-svn-id: https://develop.svn.wordpress.org/trunk@31807 602fd350-edb4-49c9-b593-d223f7449a82
2015-03-18 02:09:00 +00:00
Andrew Ozz
21da2ccd85 Press This: bump bookmarklet's version. See #31657.
git-svn-id: https://develop.svn.wordpress.org/trunk@31800 602fd350-edb4-49c9-b593-d223f7449a82
2015-03-17 01:18:01 +00:00
Andrew Ozz
820fe85082 Press This:
- Strip slashes while running side_load_images(), add slashes after.
- Simplify and clean up side_load_images().
- Add another arg to media_sideload_image() to return the uploaded image src only, and fix it to always return WP_Error on errors.
Fixes #31660.

git-svn-id: https://develop.svn.wordpress.org/trunk@31799 602fd350-edb4-49c9-b593-d223f7449a82
2015-03-17 00:46:01 +00:00
Andrew Ozz
b91de55ede Press This: change the Publish button text to Submit for Review for contributors (like on the Edit Post screen).
Props stephdau, DrewAPicture. Fixes #31658.

git-svn-id: https://develop.svn.wordpress.org/trunk@31798 602fd350-edb4-49c9-b593-d223f7449a82
2015-03-16 21:06:01 +00:00
Andrew Ozz
eb9cf72a1b Press This:
- Test image sizes from JS after Press This loads, before adding them to  "Suggested media".
- Clean up and simplify the HTML and JS a bit.
Fixes #31561.

git-svn-id: https://develop.svn.wordpress.org/trunk@31797 602fd350-edb4-49c9-b593-d223f7449a82
2015-03-16 20:50:39 +00:00
Andrew Ozz
a6b11c0411 PressThis: add a wrapped with role = application to the categories section.
Props: afercia. See #31443.

git-svn-id: https://develop.svn.wordpress.org/trunk@31775 602fd350-edb4-49c9-b593-d223f7449a82
2015-03-13 23:40:53 +00:00
Andrew Ozz
2650be6c74 PressThis: simplify and restyle the categories drop-down, remove the checkboxes and use JS to get the selected categories on submitting the form.
Part prop: Michael-Arestad. Fixes #31443.

git-svn-id: https://develop.svn.wordpress.org/trunk@31765 602fd350-edb4-49c9-b593-d223f7449a82
2015-03-13 16:56:45 +00:00
Dominik Schilling (ocean90)
94768cad74 Revert [31749], see #31528.
git-svn-id: https://develop.svn.wordpress.org/trunk@31755 602fd350-edb4-49c9-b593-d223f7449a82
2015-03-12 17:50:54 +00:00
Sergey Biryukov
6642a1d228 Shiny Updates: Don't translate an error code string.
props ericlewis.
fixes #31606.

git-svn-id: https://develop.svn.wordpress.org/trunk@31751 602fd350-edb4-49c9-b593-d223f7449a82
2015-03-12 13:08:40 +00:00
Aaron Jorbin
b857ff6083 Request FTP and SSH credentials when needed during shiny updates
This is a first pass at requesting FTP and SSH credentials when needed during shiny updates. Styling and some UX improvements are still needed, but we do show the prompt and use the passed data when doing plugin installs and updates for shiny updates.  There are also a couple of areas that we could improve code wise such how we create the requestFilesystemCredentials part of the localized _wpUpdatesSettings. Over the past half century, we've split the atom, we've spliced the gene and we've roamed Tranquility Base. We've reached for the stars and never have we been closer to having them in our grasp. That has nothing to do with shiny updates. 

Props ericlewis, jorbin, and drewapicture for testing
Fixes #31528



git-svn-id: https://develop.svn.wordpress.org/trunk@31749 602fd350-edb4-49c9-b593-d223f7449a82
2015-03-12 08:52:42 +00:00
Helen Hou-Sandi
c5169d828e Nav menus: Return to calling links "Custom Links".
It was like this before 3.6 and got a bit lost during that development cycle. Also uses the terminology more consistently in the nav menu UI.

props tyxla.
fixes #31344.


git-svn-id: https://develop.svn.wordpress.org/trunk@31748 602fd350-edb4-49c9-b593-d223f7449a82
2015-03-12 06:14:53 +00:00
Andrew Ozz
2707b39c63 PressThis: add inline comments and some cleanup for the images and embeds regex.
Props stephdau. Fixes #31373.

git-svn-id: https://develop.svn.wordpress.org/trunk@31739 602fd350-edb4-49c9-b593-d223f7449a82
2015-03-11 23:36:23 +00:00
Andrew Ozz
962ba7c52e PressThis: update _limit_url(), use esc_url_raw(). Fixes checking of urlencoded strings.
See #31373.

git-svn-id: https://develop.svn.wordpress.org/trunk@31737 602fd350-edb4-49c9-b593-d223f7449a82
2015-03-11 23:22:21 +00:00
Dominik Schilling (ocean90)
62dd55f7d7 Administration: Remove single-use URL parameters and create canonical link based on new URL.
The default removable query args are 'message', 'settings-updated', 'saved', 'update', 'updated','activated', 'activate', 'deactivate', 'locked', 'deleted', 'trashed', 'untrashed', 'enabled', 'disabled', and 'skipped'. 

props morganestes.
fixes #23367.

git-svn-id: https://develop.svn.wordpress.org/trunk@31736 602fd350-edb4-49c9-b593-d223f7449a82
2015-03-11 23:08:56 +00:00
John Blackbourn
82ac76c0a7 Introduce a new algorithm for displaying a hierarchical list of post objects in the WP_Posts_List_Table. This reduces processing time, reduces database queries, and substantially reduces memory use on sites with a high number of Pages.
Props nofearinc, rodrigosprimo, nacin, johnbillion.
Fixes #15459


git-svn-id: https://develop.svn.wordpress.org/trunk@31730 602fd350-edb4-49c9-b593-d223f7449a82
2015-03-11 20:45:17 +00:00
Dominik Schilling (ocean90)
f29a9083fc Merge three similar strings.
props pavelevap.
see #31013.

git-svn-id: https://develop.svn.wordpress.org/trunk@31717 602fd350-edb4-49c9-b593-d223f7449a82
2015-03-11 15:24:04 +00:00
Dominik Schilling (ocean90)
3bb3d2f1a5 Screen Options: Improve items per page option label.
Previously the label just said "Posts", "Pages", or "Comments". This was bad in terms of accessibility and internationalization because of missing context.
This change adds a default label "Number of items per page:" to `WP_Screen->render_per_page_options()` and removes all the existing one-word labels.

props afercia.
fixes #31349, #15576.

git-svn-id: https://develop.svn.wordpress.org/trunk@31696 602fd350-edb4-49c9-b593-d223f7449a82
2015-03-10 15:31:54 +00:00
Sergey Biryukov
5fe8182c7f EXIF/IPTC captions should populate Caption (post_excerpt) on upload, not Description (post_content).
Make sure the caption is always set if found. Previously, if the caption was less than 80 characters, only the Title field would be set.

props beaulebens, ericlewis, bendoh, SergeyBiryukov.
fixes #22768.

git-svn-id: https://develop.svn.wordpress.org/trunk@31694 602fd350-edb4-49c9-b593-d223f7449a82
2015-03-10 05:06:39 +00:00
Andrew Ozz
e0f843cd81 PressThis:
- Filter and select the content on the PHP side. Then pass only the needed data to JS.
- Add the suggested post title and contend directly to the HTML.
- Standardise the data type names.
- Some cleanup/reduction of the code in the bookmarklet.
See #31373.

git-svn-id: https://develop.svn.wordpress.org/trunk@31693 602fd350-edb4-49c9-b593-d223f7449a82
2015-03-09 21:48:38 +00:00
Dion Hulse
b96b1db015 SSH2 Upgrade transport: Trim the trailing newline character from the ouput of pwd to avoid a PHP Segfault.
Fixes #30802 for trunk.


git-svn-id: https://develop.svn.wordpress.org/trunk@31686 602fd350-edb4-49c9-b593-d223f7449a82
2015-03-09 04:31:21 +00:00
Scott Taylor
3c810c5872 There are a few functions that have the ability to return false instead of a string, so the return value should be checked before being passed to functions that expect string.
These are trivial, but they clear out some Scrutinizer issues.

See #30799.


git-svn-id: https://develop.svn.wordpress.org/trunk@31681 602fd350-edb4-49c9-b593-d223f7449a82
2015-03-09 02:10:36 +00:00
Scott Taylor
1997429498 Empty return statements are unnecessary at the end of functions.
See #30799.


git-svn-id: https://develop.svn.wordpress.org/trunk@31679 602fd350-edb4-49c9-b593-d223f7449a82
2015-03-08 23:08:48 +00:00
Scott Taylor
f06485a701 Use $this-> instead of parent:: when calling tablenav() in WP_Theme_Install_List_Table.
See #30799.


git-svn-id: https://develop.svn.wordpress.org/trunk@31672 602fd350-edb4-49c9-b593-d223f7449a82
2015-03-07 23:03:00 +00:00
Andrew Ozz
e651a8bef1 PressThis: make the Preview button "subtle".
See #31458.

git-svn-id: https://develop.svn.wordpress.org/trunk@31655 602fd350-edb4-49c9-b593-d223f7449a82
2015-03-07 01:49:57 +00:00
Andrew Ozz
fba4d3e296 PressThis: add preview functionality. Opens the preview in a new window or a tab next to the source tab.
Fixes #31458.

git-svn-id: https://develop.svn.wordpress.org/trunk@31654 602fd350-edb4-49c9-b593-d223f7449a82
2015-03-07 01:16:05 +00:00
Andrew Ozz
900468728a 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.

git-svn-id: https://develop.svn.wordpress.org/trunk@31651 602fd350-edb4-49c9-b593-d223f7449a82
2015-03-06 22:56:17 +00:00
Scott Taylor
42bcec5061 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.


git-svn-id: https://develop.svn.wordpress.org/trunk@31645 602fd350-edb4-49c9-b593-d223f7449a82
2015-03-06 20:25:09 +00:00
Andrew Ozz
1080a903fc PressThis: when server-side parsing, filter small images by the width and height attributes if set.
See #31373.

git-svn-id: https://develop.svn.wordpress.org/trunk@31637 602fd350-edb4-49c9-b593-d223f7449a82
2015-03-06 02:02:03 +00:00
Andrew Ozz
24461024ca PressThis:
- Fix error when checking for empty array keys.
- Add better DailyMotion embed support.
Props stephdau, see #31373.

git-svn-id: https://develop.svn.wordpress.org/trunk@31635 602fd350-edb4-49c9-b593-d223f7449a82
2015-03-06 01:16:53 +00:00
Scott Taylor
214836a843 After [31620], when checking for HTTP URLs, make sure we are checking the shortcode body instead of an indexed attribute.
See #31139.


git-svn-id: https://develop.svn.wordpress.org/trunk@31626 602fd350-edb4-49c9-b593-d223f7449a82
2015-03-05 16:26:00 +00:00
Scott Taylor
21568b8cc1 detached affects the wp() call for the media list table, so switch our new $_GET key to detach.
See #6820.


git-svn-id: https://develop.svn.wordpress.org/trunk@31624 602fd350-edb4-49c9-b593-d223f7449a82
2015-03-05 15:58:02 +00:00
Scott Taylor
4726669b3f 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.


git-svn-id: https://develop.svn.wordpress.org/trunk@31620 602fd350-edb4-49c9-b593-d223f7449a82
2015-03-05 05:59:10 +00:00
Scott Taylor
6c8322e8fa Allow attachments to be Detached from their parent in media grid and list modes.
See #6820.


git-svn-id: https://develop.svn.wordpress.org/trunk@31619 602fd350-edb4-49c9-b593-d223f7449a82
2015-03-05 05:34:40 +00:00
Helen Hou-Sandi
c4673e8c79 List tables: Display front and posts page indicators.
fixes #30190.


git-svn-id: https://develop.svn.wordpress.org/trunk@31610 602fd350-edb4-49c9-b593-d223f7449a82
2015-03-04 19:44:22 +00:00
Andrew Ozz
f9a6a7aa56 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.

git-svn-id: https://develop.svn.wordpress.org/trunk@31609 602fd350-edb4-49c9-b593-d223f7449a82
2015-03-04 19:28:53 +00:00
Helen Hou-Sandi
1c9b51a3e6 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.


git-svn-id: https://develop.svn.wordpress.org/trunk@31607 602fd350-edb4-49c9-b593-d223f7449a82
2015-03-03 21:52:35 +00:00
Helen Hou-Sandi
84ec54e07e 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.


git-svn-id: https://develop.svn.wordpress.org/trunk@31604 602fd350-edb4-49c9-b593-d223f7449a82
2015-03-03 21:13:37 +00:00
Andrew Ozz
0b962e2238 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.

git-svn-id: https://develop.svn.wordpress.org/trunk@31601 602fd350-edb4-49c9-b593-d223f7449a82
2015-03-02 23:40:13 +00:00
Drew Jaynes
7b0e13670d 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.


git-svn-id: https://develop.svn.wordpress.org/trunk@31599 602fd350-edb4-49c9-b593-d223f7449a82
2015-03-02 06:10:08 +00:00
Andrew Ozz
701d97b6d5 PressThis: make sure buttons.css is loaded before press-this.css. Use (int) $post_ID instead of $post->ID.
See #31373.

git-svn-id: https://develop.svn.wordpress.org/trunk@31597 602fd350-edb4-49c9-b593-d223f7449a82
2015-03-02 00:57:34 +00:00
Andrew Ozz
2d19a3b446 PressThis:
- Replace all `%1$s` and `%2$s` in suggestedHTML in case plugins repeat them.
- Fix docs typo, props kraftbj.
See #31373.

git-svn-id: https://develop.svn.wordpress.org/trunk@31596 602fd350-edb4-49c9-b593-d223f7449a82
2015-03-01 23:28:00 +00:00
Andrew Ozz
aee04ab9a3 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.

git-svn-id: https://develop.svn.wordpress.org/trunk@31595 602fd350-edb4-49c9-b593-d223f7449a82
2015-03-01 22:43:36 +00:00
Drew Jaynes
753b3c6d38 Fix a typo in the $args parameter hash notation description for add_settings_field().
See #28975, [31592].


git-svn-id: https://develop.svn.wordpress.org/trunk@31593 602fd350-edb4-49c9-b593-d223f7449a82
2015-03-01 07:56:18 +00:00
Drew Jaynes
9013a5d088 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.


git-svn-id: https://develop.svn.wordpress.org/trunk@31592 602fd350-edb4-49c9-b593-d223f7449a82
2015-03-01 07:52:46 +00:00
Andrew Ozz
cc3b0374ae PressThis:
- Remove unneeded passing of post formats strings to JS.
- Set the currently selected post format name with jQuery.
See #31373.

git-svn-id: https://develop.svn.wordpress.org/trunk@31589 602fd350-edb4-49c9-b593-d223f7449a82
2015-02-28 20:07:45 +00:00
Dominik Schilling (ocean90)
91694337df 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.

git-svn-id: https://develop.svn.wordpress.org/trunk@31588 602fd350-edb4-49c9-b593-d223f7449a82
2015-02-28 10:35:27 +00:00
Dominik Schilling (ocean90)
964ba03e97 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.

git-svn-id: https://develop.svn.wordpress.org/trunk@31577 602fd350-edb4-49c9-b593-d223f7449a82
2015-02-27 19:43:33 +00:00
Scott Taylor
212d6d8046 Make a new function, wp_delete_file(). Use it.
Props scribu, wonderboymusic.
Fixes #17864.


git-svn-id: https://develop.svn.wordpress.org/trunk@31575 602fd350-edb4-49c9-b593-d223f7449a82
2015-02-27 16:50:14 +00:00
Dominik Schilling (ocean90)
7d9ed19fa7 Press This: Use boolean value instead of __return_true(). Add missing hook docs.
see #31373.

git-svn-id: https://develop.svn.wordpress.org/trunk@31571 602fd350-edb4-49c9-b593-d223f7449a82
2015-02-27 11:14:34 +00:00
Andrew Ozz
2223b319f9 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.

git-svn-id: https://develop.svn.wordpress.org/trunk@31566 602fd350-edb4-49c9-b593-d223f7449a82
2015-02-27 02:49:05 +00:00
Helen Hou-Sandi
195dabc136 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.


git-svn-id: https://develop.svn.wordpress.org/trunk@31560 602fd350-edb4-49c9-b593-d223f7449a82
2015-02-26 19:58:50 +00:00
Sergey Biryukov
6e4b84f073 Press This: Use correct URL for update bookmarklet link.
props kraftbj.
fixes #31461.

git-svn-id: https://develop.svn.wordpress.org/trunk@31556 602fd350-edb4-49c9-b593-d223f7449a82
2015-02-26 08:47:30 +00:00
Scott Taylor
79706ee8a8 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.


git-svn-id: https://develop.svn.wordpress.org/trunk@31554 602fd350-edb4-49c9-b593-d223f7449a82
2015-02-26 05:47:53 +00:00
Scott Taylor
9145a72789 Add missing access modifiers to WP_Press_This.
See #31456.


git-svn-id: https://develop.svn.wordpress.org/trunk@31552 602fd350-edb4-49c9-b593-d223f7449a82
2015-02-26 05:17:42 +00:00
Drew Jaynes
a136a78c1e Ignore the internal-use function _wp_posts_page_notice() from parsing for the code reference.
See #17470.


git-svn-id: https://develop.svn.wordpress.org/trunk@31551 602fd350-edb4-49c9-b593-d223f7449a82
2015-02-26 03:07:26 +00:00
Helen Hou-Sandi
f11e86fb83 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.


git-svn-id: https://develop.svn.wordpress.org/trunk@31550 602fd350-edb4-49c9-b593-d223f7449a82
2015-02-26 02:46:40 +00:00
Andrew Ozz
2e3afd2760 PressThis v2, first run. Props michael-arestad, stephdau, marcelomazza, DrewAPicture, iseulde, afercia, kraftbj, rachelbaker, AramZS, dd32. See #31373.
git-svn-id: https://develop.svn.wordpress.org/trunk@31534 602fd350-edb4-49c9-b593-d223f7449a82
2015-02-25 01:49:26 +00:00
Mark Jaquith
f1bb5c2fd7 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

git-svn-id: https://develop.svn.wordpress.org/trunk@31533 602fd350-edb4-49c9-b593-d223f7449a82
2015-02-24 20:30:22 +00:00
Drew Jaynes
4cc15f83cc 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.


git-svn-id: https://develop.svn.wordpress.org/trunk@31529 602fd350-edb4-49c9-b593-d223f7449a82
2015-02-24 06:06:59 +00:00
Jeremy Felt
ff0b2f7a6f 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.


git-svn-id: https://develop.svn.wordpress.org/trunk@31517 602fd350-edb4-49c9-b593-d223f7449a82
2015-02-23 02:28:41 +00:00
Andrew Ozz
825fa21a22 Improve table footer tab sequence by moving <tfoot> after <tbody>. Props afercia, rianrietveld, DrewAPicture. Fixes #30914.
git-svn-id: https://develop.svn.wordpress.org/trunk@31513 602fd350-edb4-49c9-b593-d223f7449a82
2015-02-22 21:47:30 +00:00
Jeremy Felt
6556f8e112 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.


git-svn-id: https://develop.svn.wordpress.org/trunk@31511 602fd350-edb4-49c9-b593-d223f7449a82
2015-02-22 21:29:45 +00:00
Sergey Biryukov
2dd6c6e696 Dashboard: Add a filter for the query arguments used for the Recent Posts widget.
props danielbachhuber.
fixes #29374.

git-svn-id: https://develop.svn.wordpress.org/trunk@31508 602fd350-edb4-49c9-b593-d223f7449a82
2015-02-22 19:56:09 +00:00
SergeyBiryukov
d1998396fb Remove untranslatable period from a successful update message in Bulk_Upgrader_Skin::add_strings().
props mako09, DrewAPicture.
fixes #30793.

git-svn-id: https://develop.svn.wordpress.org/trunk@31506 602fd350-edb4-49c9-b593-d223f7449a82
2015-02-22 17:06:02 +00:00
Sergey Biryukov
9b463c5a45 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.

git-svn-id: https://develop.svn.wordpress.org/trunk@31462 602fd350-edb4-49c9-b593-d223f7449a82
2015-02-14 09:13:36 +00:00
Sergey Biryukov
bde2a220d9 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.

git-svn-id: https://develop.svn.wordpress.org/trunk@31447 602fd350-edb4-49c9-b593-d223f7449a82
2015-02-13 11:22:38 +00:00
Sergey Biryukov
997b9733c9 Use correct default values for some admin template functions.
props ipm-frommen.
fixes #31308.

git-svn-id: https://develop.svn.wordpress.org/trunk@31446 602fd350-edb4-49c9-b593-d223f7449a82
2015-02-13 06:50:49 +00:00
Sergey Biryukov
5ec46121cd Rename unused argument and remove obsolete global in iframe_header().
props ipm-frommen.
fixes #31309.

git-svn-id: https://develop.svn.wordpress.org/trunk@31443 602fd350-edb4-49c9-b593-d223f7449a82
2015-02-13 05:30:53 +00:00
Sergey Biryukov
5f360a12a7 _list_meta_row() should always return a string.
props ipm-frommen.
fixes #31310.

git-svn-id: https://develop.svn.wordpress.org/trunk@31442 602fd350-edb4-49c9-b593-d223f7449a82
2015-02-13 04:21:47 +00:00
Sergey Biryukov
e3728870fb Correct parameter types for Plugin_Upgrader::bulk_upgrade() and Theme_Upgrader::bulk_upgrade().
props ipm-frommen.
fixes #31312.

git-svn-id: https://develop.svn.wordpress.org/trunk@31441 602fd350-edb4-49c9-b593-d223f7449a82
2015-02-13 04:18:45 +00:00
Sergey Biryukov
100e1e4b20 Terminate JS statements in two admin files.
props ipm-frommen.
fixes #31311.

git-svn-id: https://develop.svn.wordpress.org/trunk@31440 602fd350-edb4-49c9-b593-d223f7449a82
2015-02-13 04:08:33 +00:00
Helen Hou-Sandi
8e1df9dab2 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.


git-svn-id: https://develop.svn.wordpress.org/trunk@31438 602fd350-edb4-49c9-b593-d223f7449a82
2015-02-12 18:37:06 +00:00
Dion Hulse
d17168583d 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.


git-svn-id: https://develop.svn.wordpress.org/trunk@31429 602fd350-edb4-49c9-b593-d223f7449a82
2015-02-12 01:14:47 +00:00
Scott Taylor
267f68c0d6 Remove unused media JS files.
See #28510.


git-svn-id: https://develop.svn.wordpress.org/trunk@31405 602fd350-edb4-49c9-b593-d223f7449a82
2015-02-10 22:44:09 +00:00
Sergey Biryukov
d0c0ba43eb Remove redundant string with a typo introduced in [25481].
see #31217.

git-svn-id: https://develop.svn.wordpress.org/trunk@31404 602fd350-edb4-49c9-b593-d223f7449a82
2015-02-10 07:52:38 +00:00
Sergey Biryukov
edeb3f3ae3 Replace generic "Dear user" greeting in email notifications with a more personalized one.
props Ipstenu.
fixes #31217.

git-svn-id: https://develop.svn.wordpress.org/trunk@31403 602fd350-edb4-49c9-b593-d223f7449a82
2015-02-10 07:46:50 +00:00
Sergey Biryukov
b931f924a7 Update body class when switching between admin color schemes.
props valendesigns.
fixes #30488.

git-svn-id: https://develop.svn.wordpress.org/trunk@31400 602fd350-edb4-49c9-b593-d223f7449a82
2015-02-10 02:22:49 +00:00
Boone Gorges
d4fbf04671 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.

git-svn-id: https://develop.svn.wordpress.org/trunk@31392 602fd350-edb4-49c9-b593-d223f7449a82
2015-02-09 22:53:40 +00:00
Sergey Biryukov
8aac5ba74e 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.

git-svn-id: https://develop.svn.wordpress.org/trunk@31363 602fd350-edb4-49c9-b593-d223f7449a82
2015-02-07 06:20:42 +00:00
Boone Gorges
fb4048fcdd 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.

git-svn-id: https://develop.svn.wordpress.org/trunk@31359 602fd350-edb4-49c9-b593-d223f7449a82
2015-02-06 20:31:37 +00:00
Gary Pendergast
8f02177c40 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



git-svn-id: https://develop.svn.wordpress.org/trunk@31358 602fd350-edb4-49c9-b593-d223f7449a82
2015-02-06 13:40:17 +00:00
Gary Pendergast
029f637aa5 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 



git-svn-id: https://develop.svn.wordpress.org/trunk@31354 602fd350-edb4-49c9-b593-d223f7449a82
2015-02-06 05:58:15 +00:00
Gary Pendergast
8004484a6b 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



git-svn-id: https://develop.svn.wordpress.org/trunk@31351 602fd350-edb4-49c9-b593-d223f7449a82
2015-02-06 05:25:22 +00:00
Gary Pendergast
9f6ddf8944 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



git-svn-id: https://develop.svn.wordpress.org/trunk@31349 602fd350-edb4-49c9-b593-d223f7449a82
2015-02-06 04:50:19 +00:00
Gary Pendergast
ba2beaf37d Shiny Updates: Fix a PHP warning when installing new plugins.
Props lgladdy for the initial patch.

See #29820



git-svn-id: https://develop.svn.wordpress.org/trunk@31345 602fd350-edb4-49c9-b593-d223f7449a82
2015-02-06 00:33:49 +00:00
Gary Pendergast
4c49dd62e3 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



git-svn-id: https://develop.svn.wordpress.org/trunk@31335 602fd350-edb4-49c9-b593-d223f7449a82
2015-02-05 06:15:59 +00:00
Gary Pendergast
d0379f4fb7 Shiny Updates: Add capability checks to the ajax callbacks, to ensure the current user is allowed to install/update plugins.
See #29820



git-svn-id: https://develop.svn.wordpress.org/trunk@31334 602fd350-edb4-49c9-b593-d223f7449a82
2015-02-05 06:04:32 +00:00
Gary Pendergast
748d595b5c 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



git-svn-id: https://develop.svn.wordpress.org/trunk@31333 602fd350-edb4-49c9-b593-d223f7449a82
2015-02-05 04:18:57 +00:00
Helen Hou-Sandi
8d0b774e65 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.


git-svn-id: https://develop.svn.wordpress.org/trunk@31331 602fd350-edb4-49c9-b593-d223f7449a82
2015-02-04 03:45:24 +00:00
Dion Hulse
4ed2d89ced WP_Upgrader: Remove references to non-existant variables that have never existed.
Props jdgrimes. Fixes  #29087


git-svn-id: https://develop.svn.wordpress.org/trunk@31327 602fd350-edb4-49c9-b593-d223f7449a82
2015-02-03 06:17:05 +00:00
dd32
5f13a0e3e5 Remove an unused parameter on install_plugins_upload().
Props michalzuber. Fixes #28964


git-svn-id: https://develop.svn.wordpress.org/trunk@31326 602fd350-edb4-49c9-b593-d223f7449a82
2015-02-03 06:13:02 +00:00
Boone Gorges
f05f380638 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.

git-svn-id: https://develop.svn.wordpress.org/trunk@31323 602fd350-edb4-49c9-b593-d223f7449a82
2015-02-02 16:49:23 +00:00
Boone Gorges
32f2903248 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.

git-svn-id: https://develop.svn.wordpress.org/trunk@31313 602fd350-edb4-49c9-b593-d223f7449a82
2015-01-31 19:37:12 +00:00
Boone Gorges
c7320c5a86 Fix 'quick_edit_show_taxonomy' filter so that can properly be used for overrides in all cases.
See #26948.

git-svn-id: https://develop.svn.wordpress.org/trunk@31308 602fd350-edb4-49c9-b593-d223f7449a82
2015-01-30 19:28:27 +00:00
Boone Gorges
057c428346 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.

git-svn-id: https://develop.svn.wordpress.org/trunk@31307 602fd350-edb4-49c9-b593-d223f7449a82
2015-01-30 19:17:51 +00:00
Sergey Biryukov
e725b36d1e Don't display the Help tab reference in Page Attributes meta box if Help tab was removed.
props bananastalktome.
fixes #31164.

git-svn-id: https://develop.svn.wordpress.org/trunk@31303 602fd350-edb4-49c9-b593-d223f7449a82
2015-01-30 15:33:33 +00:00
Sergey Biryukov
dcb278f006 Switch to a 403 response code in places where it is more appropriate than a 500 due to permissions errors.
props tomdxw.
fixes #30927.

git-svn-id: https://develop.svn.wordpress.org/trunk@31300 602fd350-edb4-49c9-b593-d223f7449a82
2015-01-29 21:14:54 +00:00
Drew Jaynes (DrewAPicture)
f4e2134bee 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.


git-svn-id: https://develop.svn.wordpress.org/trunk@31293 602fd350-edb4-49c9-b593-d223f7449a82
2015-01-29 11:33:02 +00:00
Drew Jaynes (DrewAPicture)
18280eb766 Add missing descriptions to the DocBlocks for various functions in wp-admin/includes/post.php
Props ipm-frommen.
See #31008.


git-svn-id: https://develop.svn.wordpress.org/trunk@31292 602fd350-edb4-49c9-b593-d223f7449a82
2015-01-29 11:31:44 +00:00
Drew Jaynes (DrewAPicture)
5e301c5794 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.


git-svn-id: https://develop.svn.wordpress.org/trunk@31246 602fd350-edb4-49c9-b593-d223f7449a82
2015-01-19 09:14:39 +00:00
Drew Jaynes (DrewAPicture)
b590db9253 Ensure the correct list of default tabs for the Plugin Install screen are documented.
Props stevenkword.
Fixes #31017.


git-svn-id: https://develop.svn.wordpress.org/trunk@31244 602fd350-edb4-49c9-b593-d223f7449a82
2015-01-19 08:43:15 +00:00
Sergey Biryukov
6e206c2973 Use the site's local time to create the first post during installation.
props extendwings.
fixes #29296.

git-svn-id: https://develop.svn.wordpress.org/trunk@31225 602fd350-edb4-49c9-b593-d223f7449a82
2015-01-17 10:06:42 +00:00
Scott Taylor
357fa4131a 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.


git-svn-id: https://develop.svn.wordpress.org/trunk@31220 602fd350-edb4-49c9-b593-d223f7449a82
2015-01-16 22:50:20 +00:00
Scott Taylor
1d3b42d226 Fix some erroneous @param annotations.
See #30799.


git-svn-id: https://develop.svn.wordpress.org/trunk@31219 602fd350-edb4-49c9-b593-d223f7449a82
2015-01-16 22:43:13 +00:00
Scott Taylor
5deee71273 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.


git-svn-id: https://develop.svn.wordpress.org/trunk@31217 602fd350-edb4-49c9-b593-d223f7449a82
2015-01-16 21:18:52 +00:00
Scott Taylor
2ed007c023 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.


git-svn-id: https://develop.svn.wordpress.org/trunk@31216 602fd350-edb4-49c9-b593-d223f7449a82
2015-01-16 21:09:18 +00:00
Scott Taylor
9a16e6230b 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.


git-svn-id: https://develop.svn.wordpress.org/trunk@31215 602fd350-edb4-49c9-b593-d223f7449a82
2015-01-16 21:06:29 +00:00
Scott Taylor
d29abb1d24 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.


git-svn-id: https://develop.svn.wordpress.org/trunk@31213 602fd350-edb4-49c9-b593-d223f7449a82
2015-01-16 19:12:15 +00:00
Scott Taylor
5743898e1e @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.


git-svn-id: https://develop.svn.wordpress.org/trunk@31212 602fd350-edb4-49c9-b593-d223f7449a82
2015-01-16 19:02:26 +00:00
Scott Taylor
835dbe7baf [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.


git-svn-id: https://develop.svn.wordpress.org/trunk@31211 602fd350-edb4-49c9-b593-d223f7449a82
2015-01-16 18:36:46 +00:00
Scott Taylor
e3ac341f24 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.


git-svn-id: https://develop.svn.wordpress.org/trunk@31210 602fd350-edb4-49c9-b593-d223f7449a82
2015-01-16 17:41:50 +00:00
Scott Taylor
07d899740e 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.


git-svn-id: https://develop.svn.wordpress.org/trunk@31209 602fd350-edb4-49c9-b593-d223f7449a82
2015-01-16 17:22:07 +00:00
Scott Taylor
b0c6a64fbd WP_Filesystem_Base should declare $errors and $options as fields for use by subclasses.
See #30799.


git-svn-id: https://develop.svn.wordpress.org/trunk@31208 602fd350-edb4-49c9-b593-d223f7449a82
2015-01-16 17:09:35 +00:00
Scott Taylor
8ebe917c6b 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.


git-svn-id: https://develop.svn.wordpress.org/trunk@31201 602fd350-edb4-49c9-b593-d223f7449a82
2015-01-16 05:18:17 +00:00
Scott Taylor
83b6fad852 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.


git-svn-id: https://develop.svn.wordpress.org/trunk@31200 602fd350-edb4-49c9-b593-d223f7449a82
2015-01-16 04:15:52 +00:00
Scott Taylor
5acc6bdb58 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.


git-svn-id: https://develop.svn.wordpress.org/trunk@31188 602fd350-edb4-49c9-b593-d223f7449a82
2015-01-16 01:05:52 +00:00
Scott Taylor
102fb4ac5c Replace the 3 remaining occurrences of wpspin GIF with spinner.
Props avryl.
Fixes #27482.


git-svn-id: https://develop.svn.wordpress.org/trunk@31187 602fd350-edb4-49c9-b593-d223f7449a82
2015-01-16 00:32:45 +00:00
Helen Hou-Sandi
8ab449ae35 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.


git-svn-id: https://develop.svn.wordpress.org/trunk@31181 602fd350-edb4-49c9-b593-d223f7449a82
2015-01-14 22:13:03 +00:00
Scott Taylor
47ba5e6c2e WP_Themes_List_Table accesses $_pagination_args from the parent class. Switch $_pagination_args to protected in WP_List_Table.
See #30891.


git-svn-id: https://develop.svn.wordpress.org/trunk@31167 602fd350-edb4-49c9-b593-d223f7449a82
2015-01-12 16:25:30 +00:00
Scott Taylor
47a74bb21f Add a private field to WP_Terms_List_Table, $level.
See #30891.


git-svn-id: https://develop.svn.wordpress.org/trunk@31166 602fd350-edb4-49c9-b593-d223f7449a82
2015-01-12 16:22:38 +00:00
Scott Taylor
b3f726efc4 Add a private field to WP_Posts_List_Table, $is_trash.
See #30891.


git-svn-id: https://develop.svn.wordpress.org/trunk@31165 602fd350-edb4-49c9-b593-d223f7449a82
2015-01-12 16:21:08 +00:00
Scott Taylor
e5672bd8c5 Add a private field to WP_Plugin_Install_List_Table, $error.
See #30891.


git-svn-id: https://develop.svn.wordpress.org/trunk@31164 602fd350-edb4-49c9-b593-d223f7449a82
2015-01-12 16:18:52 +00:00
Scott Taylor
02eaef3ae0 In lieu of refactoring, add a private field to WP_MS_Themes_List_Table, $has_items. Ideally, this class would overload ->has_items() and not set a private field.
See #30891.


git-svn-id: https://develop.svn.wordpress.org/trunk@31163 602fd350-edb4-49c9-b593-d223f7449a82
2015-01-12 16:16:16 +00:00
Scott Taylor
f0c4ab3e69 Add 2 private fields to WP_Media_List_Table, $detached and $is_trash.
See #30891.


git-svn-id: https://develop.svn.wordpress.org/trunk@31162 602fd350-edb4-49c9-b593-d223f7449a82
2015-01-12 16:07:41 +00:00
Scott Taylor
243d50d2f7 After [31146], properly declare $user_can as a private field in WP_Comments_List_Table.
See #30891.


git-svn-id: https://develop.svn.wordpress.org/trunk@31161 602fd350-edb4-49c9-b593-d223f7449a82
2015-01-12 16:01:53 +00:00
Dion Hulse
32b020bf05 More concise documentation for wp_install_maybe_enable_pretty_permalinks()
See #6481. Props ericlewis.


git-svn-id: https://develop.svn.wordpress.org/trunk@31160 602fd350-edb4-49c9-b593-d223f7449a82
2015-01-12 04:32:35 +00:00
Dion Hulse
0aaa2f0f32 The new wp_install_maybe_enable_pretty_permalinks() function doesn't need to be pluggable.
See #6481. Props nacin, valendesigns


git-svn-id: https://develop.svn.wordpress.org/trunk@31159 602fd350-edb4-49c9-b593-d223f7449a82
2015-01-12 04:30:01 +00:00
Scott Taylor
274253629f In WP_List_Table, only call magic method internals again whitelists of properties and methods, $compat_fields and $compat_methods.
See #30891.


git-svn-id: https://develop.svn.wordpress.org/trunk@31146 602fd350-edb4-49c9-b593-d223f7449a82
2015-01-11 22:19:58 +00:00
Scott Taylor
ad6dd738b2 In WP_Filesystem_Base, make the only private member, $cache, public and remove magic methods. $cache was always public until [28487], has been essentially public via a magic method since.
See #30891.


git-svn-id: https://develop.svn.wordpress.org/trunk@31145 602fd350-edb4-49c9-b593-d223f7449a82
2015-01-11 22:03:59 +00:00
Boone Gorges
77128eb048 Default $parent in category_exists() should default to null rather than 0.
[29863] made the corresponding change in `term_exists()`. Failure to change the
default value in `category_exists()` meant that an unspecified value for
`$parent` would limit results to top-level categories.

Includes unit tests and corrected function documentation.

Props hissy.
Fixes #30975 for trunk.

git-svn-id: https://develop.svn.wordpress.org/trunk@31140 602fd350-edb4-49c9-b593-d223f7449a82
2015-01-11 01:25:19 +00:00
Scott Taylor
979ba60a57 Fix some @param docs that have chars too close them.
Add `@property` annotations to `WP_User` and `WP_Post`.
Remove erroneous `@param`s from image editor class methods.
Officially add the property `$_column_headers` to `WP_List_Table`.	

See #30799.


git-svn-id: https://develop.svn.wordpress.org/trunk@31127 602fd350-edb4-49c9-b593-d223f7449a82
2015-01-10 06:56:51 +00:00
Scott Taylor
349e5cb318 Adding a @return annotation to constructors is generally not recommended as a constructor does not have a meaningful return value. Constructors do not have meaningful return values, anything that is returned from here is discarded.
See #30799.


git-svn-id: https://develop.svn.wordpress.org/trunk@31126 602fd350-edb4-49c9-b593-d223f7449a82
2015-01-10 06:53:48 +00:00
Scott Taylor
cb85e15f06 Adding a @return annotation to constructors is generally not recommended as a constructor does not have a meaningful return value - anything that is returned is discarded.
See #30799.


git-svn-id: https://develop.svn.wordpress.org/trunk@31125 602fd350-edb4-49c9-b593-d223f7449a82
2015-01-10 06:12:25 +00:00
Scott Taylor
bc723548a7 Declare $wp_version, $required_php_version, and $required_mysql_version as globals in install and upgrade admin files.
See #30799.


git-svn-id: https://develop.svn.wordpress.org/trunk@31124 602fd350-edb4-49c9-b593-d223f7449a82
2015-01-10 05:56:45 +00:00
Scott Taylor
38e18d800c In wp-admin/includes/revision.php, $post->modified is a coding error. It should be $post->post_modified.
See #30799.


git-svn-id: https://develop.svn.wordpress.org/trunk@31123 602fd350-edb4-49c9-b593-d223f7449a82
2015-01-10 05:49:24 +00:00
Scott Taylor
164b4f21c9 WP_Upgrader will take any "skin" that is passed to it, and set ->skin via composition. The default type of ->skin is WP_Upgrader_Skin, which doesn't have methods declared for ->bulk_header() and ->bulk_footer(). Add noop methods to WP_Upgrader_Skin.
See #30799.


git-svn-id: https://develop.svn.wordpress.org/trunk@31122 602fd350-edb4-49c9-b593-d223f7449a82
2015-01-10 05:41:05 +00:00
Scott Taylor
44a3c002f5 In wp_ajax_upload_attachment(), wp_check_filetype_and_ext() doesn't need a 3rd param - it already defaults to null. Passing false would fail a strict check
See #30799.


git-svn-id: https://develop.svn.wordpress.org/trunk@31119 602fd350-edb4-49c9-b593-d223f7449a82
2015-01-10 04:54:13 +00:00
Sergey Biryukov
68191cc15c Add variable type for sync_category_tag_slugs() parameters.
props tillkruess.
fixes #30718.

git-svn-id: https://develop.svn.wordpress.org/trunk@31113 602fd350-edb4-49c9-b593-d223f7449a82
2015-01-09 11:18:22 +00:00
Sergey Biryukov
1c88f482bf Use localized format for Last Updated date in plugin details modal, for consistency with [31055].
see #30717.

git-svn-id: https://develop.svn.wordpress.org/trunk@31110 602fd350-edb4-49c9-b593-d223f7449a82
2015-01-09 06:20:08 +00:00
Sergey Biryukov
b641ca55f5 Improve documentation for media_handle_upload().
props ericlewis.
fixes #30962.

git-svn-id: https://develop.svn.wordpress.org/trunk@31109 602fd350-edb4-49c9-b593-d223f7449a82
2015-01-09 05:04:59 +00:00
Scott Taylor
0c37f866f2 After [31105], don't ditch the isset() calls for BC. Declare $page_hook as null so it is initialized for all execution paths but will still fail isset() checks.
Fixes #30958.


git-svn-id: https://develop.svn.wordpress.org/trunk@31106 602fd350-edb4-49c9-b593-d223f7449a82
2015-01-08 22:51:30 +00:00
Scott Taylor
c4e2ad04a2 Properly declare $hook_suffix, $plugin_page, $typenow, and $taxnow as globals in wp-admin/admin.php.
Fixes #30958.


git-svn-id: https://develop.svn.wordpress.org/trunk@31105 602fd350-edb4-49c9-b593-d223f7449a82
2015-01-08 22:14:58 +00:00
Scott Taylor
85595b73cc Overriding methods should do more than simply call the same method in the super class.
See #30799.


git-svn-id: https://develop.svn.wordpress.org/trunk@31101 602fd350-edb4-49c9-b593-d223f7449a82
2015-01-08 21:19:24 +00:00
Scott Taylor
0522fcb3f9 Jump statements should not be followed by other statements (there were 5 lingering).
See #30799.


git-svn-id: https://develop.svn.wordpress.org/trunk@31100 602fd350-edb4-49c9-b593-d223f7449a82
2015-01-08 21:14:56 +00:00
Scott Taylor
da9057fd6d Use && instead of and in the 3 places where and was used.
See #30799.


git-svn-id: https://develop.svn.wordpress.org/trunk@31099 602fd350-edb4-49c9-b593-d223f7449a82
2015-01-08 21:11:46 +00:00
Scott Taylor
1ca58614b2 In wp-includes/plugin.php, collapse 3 else-newline-tab-if statements.
See #30799.


git-svn-id: https://develop.svn.wordpress.org/trunk@31091 602fd350-edb4-49c9-b593-d223f7449a82
2015-01-08 07:12:42 +00:00
Scott Taylor
6fd11624d1 The keyword elseif should be used instead of else if so that all control keywords look like single words.
This was a mess, is now standardized across the codebase, except for a few 3rd-party libs. 

See #30799.


git-svn-id: https://develop.svn.wordpress.org/trunk@31090 602fd350-edb4-49c9-b593-d223f7449a82
2015-01-08 07:04:40 +00:00
Dion Hulse
d0767caf54 Enable Pretty Permalinks for new sites during install if the server supports it.
See #6481, Props valendesigns, DrewAPicture & ericlewis


git-svn-id: https://develop.svn.wordpress.org/trunk@31089 602fd350-edb4-49c9-b593-d223f7449a82
2015-01-08 06:46:55 +00:00
Scott Taylor
5d6cc49628 Perl-style comments should not be used
See #30799.


git-svn-id: https://develop.svn.wordpress.org/trunk@31079 602fd350-edb4-49c9-b593-d223f7449a82
2015-01-08 05:51:39 +00:00
Scott Taylor
97d6901048 Access Modifiers:
* In `WP_Plugin_Install_List_Table`, use `public` instead of `var`
* In `WP_User`, `->data` is accessed directly on an instance if the constructor receives it: make it `public`
* In `WP_Locale`, every property is exported to a global and is already `public` via `var`, half of the properties are accessed directly already, make them all `public`
* In `WP_Rewrite`, several properties are accessed publicly in functions via the `$wp_rewrite` global, make those props `public`.
* In `WP_Rewrite`, the property `->comment_feed_structure` was misspelled as `->comments_feed_structure`

See #30799.


git-svn-id: https://develop.svn.wordpress.org/trunk@31078 602fd350-edb4-49c9-b593-d223f7449a82
2015-01-08 05:43:54 +00:00