Commit Graph

5109 Commits

Author SHA1 Message Date
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
Scott Taylor
71f9bc3f42 Add a private field to WP_Plugin_Install_List_Table, $error.
See #30891.

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


git-svn-id: http://core.svn.wordpress.org/trunk@31145 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-01-12 16:19:22 +00:00
Scott Taylor
91312e71cd 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.

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


git-svn-id: http://core.svn.wordpress.org/trunk@31144 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-01-12 16:17:22 +00:00
Scott Taylor
86c0f63739 Add 2 private fields to WP_Media_List_Table, $detached and $is_trash.
See #30891.

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


git-svn-id: http://core.svn.wordpress.org/trunk@31143 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-01-12 16:08:21 +00:00
Scott Taylor
df09597a65 After [31146], properly declare $user_can as a private field in WP_Comments_List_Table.
See #30891.

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


git-svn-id: http://core.svn.wordpress.org/trunk@31142 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-01-12 16:02:24 +00:00
Dion Hulse
af92025162 More concise documentation for wp_install_maybe_enable_pretty_permalinks()
See #6481. Props ericlewis.

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


git-svn-id: http://core.svn.wordpress.org/trunk@31141 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-01-12 04:33:23 +00:00
Dion Hulse
a114d0929b The new wp_install_maybe_enable_pretty_permalinks() function doesn't need to be pluggable.
See #6481. Props nacin, valendesigns

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


git-svn-id: http://core.svn.wordpress.org/trunk@31140 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-01-12 04:31:23 +00:00
Scott Taylor
e6fc90f973 In WP_List_Table, only call magic method internals again whitelists of properties and methods, $compat_fields and $compat_methods.
See #30891.

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


git-svn-id: http://core.svn.wordpress.org/trunk@31127 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-01-11 22:20:22 +00:00
Scott Taylor
2749e46178 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.

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


git-svn-id: http://core.svn.wordpress.org/trunk@31126 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-01-11 22:04:22 +00:00
Boone Gorges
5c0ddb8602 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.
Built from https://develop.svn.wordpress.org/trunk@31140


git-svn-id: http://core.svn.wordpress.org/trunk@31121 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-01-11 01:26:27 +00:00
Scott Taylor
5547115dc2 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.

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


git-svn-id: http://core.svn.wordpress.org/trunk@31108 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-01-10 06:57:22 +00:00
Scott Taylor
0a511680f4 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.

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


git-svn-id: http://core.svn.wordpress.org/trunk@31107 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-01-10 06:54:23 +00:00
Scott Taylor
da99d29a59 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.

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


git-svn-id: http://core.svn.wordpress.org/trunk@31106 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-01-10 06:13:22 +00:00
Scott Taylor
1b3f91f500 Declare $wp_version, $required_php_version, and $required_mysql_version as globals in install and upgrade admin files.
See #30799.

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


git-svn-id: http://core.svn.wordpress.org/trunk@31105 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-01-10 05:57:22 +00:00
Scott Taylor
1bac6fb886 In wp-admin/includes/revision.php, $post->modified is a coding error. It should be $post->post_modified.
See #30799.

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


git-svn-id: http://core.svn.wordpress.org/trunk@31104 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-01-10 05:50:22 +00:00
Scott Taylor
d6ce5dd553 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.

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


git-svn-id: http://core.svn.wordpress.org/trunk@31103 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-01-10 05:42:22 +00:00
Scott Taylor
afd09f1f04 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.

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


git-svn-id: http://core.svn.wordpress.org/trunk@31100 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-01-10 04:55:25 +00:00
Sergey Biryukov
7b04e6d4f4 Add variable type for sync_category_tag_slugs() parameters.
props tillkruess.
fixes #30718.
Built from https://develop.svn.wordpress.org/trunk@31113


git-svn-id: http://core.svn.wordpress.org/trunk@31094 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-01-09 11:19:22 +00:00
Sergey Biryukov
e214fce67f Use localized format for Last Updated date in plugin details modal, for consistency with [31055].
see #30717.
Built from https://develop.svn.wordpress.org/trunk@31110


git-svn-id: http://core.svn.wordpress.org/trunk@31091 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-01-09 06:21:22 +00:00
Sergey Biryukov
d5d0b367ab Improve documentation for media_handle_upload().
props ericlewis.
fixes #30962.
Built from https://develop.svn.wordpress.org/trunk@31109


git-svn-id: http://core.svn.wordpress.org/trunk@31090 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-01-09 05:05:23 +00:00
Scott Taylor
8ee598169f 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.

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


git-svn-id: http://core.svn.wordpress.org/trunk@31087 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-01-08 22:52:22 +00:00
Scott Taylor
60e1dd409b Properly declare $hook_suffix, $plugin_page, $typenow, and $taxnow as globals in wp-admin/admin.php.
Fixes #30958.

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


git-svn-id: http://core.svn.wordpress.org/trunk@31086 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-01-08 22:15:24 +00:00
Scott Taylor
e4b6265c7a Overriding methods should do more than simply call the same method in the super class.
See #30799.

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


git-svn-id: http://core.svn.wordpress.org/trunk@31082 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-01-08 21:20:22 +00:00
Scott Taylor
4a1ad9acec Jump statements should not be followed by other statements (there were 5 lingering).
See #30799.

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


git-svn-id: http://core.svn.wordpress.org/trunk@31081 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-01-08 21:15:22 +00:00
Scott Taylor
4feecb922c Use && instead of and in the 3 places where and was used.
See #30799.

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


git-svn-id: http://core.svn.wordpress.org/trunk@31080 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-01-08 21:12:22 +00:00
Scott Taylor
383a5c6c24 In wp-includes/plugin.php, collapse 3 else-newline-tab-if statements.
See #30799.

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


git-svn-id: http://core.svn.wordpress.org/trunk@31072 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-01-08 07:13:24 +00:00
Scott Taylor
60b0cd7943 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.

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


git-svn-id: http://core.svn.wordpress.org/trunk@31071 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-01-08 07:05:25 +00:00
Dion Hulse
a4ed093250 Enable Pretty Permalinks for new sites during install if the server supports it.
See #6481, Props valendesigns, DrewAPicture & ericlewis

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


git-svn-id: http://core.svn.wordpress.org/trunk@31070 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-01-08 06:47:23 +00:00
Scott Taylor
ac4e67b82e Perl-style comments should not be used
See #30799.

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


git-svn-id: http://core.svn.wordpress.org/trunk@31060 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-01-08 05:52:24 +00:00
Scott Taylor
e029005847 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.

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


git-svn-id: http://core.svn.wordpress.org/trunk@31059 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-01-08 05:44:23 +00:00
Scott Taylor
ff98cfcf45 Pinking Shears.
See #30799.

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


git-svn-id: http://core.svn.wordpress.org/trunk@31058 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-01-08 05:03:23 +00:00
Sergey Biryukov
9b0e279e82 In dashboard activity widget, display a front-end link if the user cannot edit the post.
props UaMV, DrewAPicture.
fixes #29025.
Built from https://develop.svn.wordpress.org/trunk@31075


git-svn-id: http://core.svn.wordpress.org/trunk@31056 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-01-08 00:26:22 +00:00
Sergey Biryukov
f2b5ac8ef1 Call the init() method for the upgrader in wp_can_install_language_pack() to avoid undefined index notices.
props ocean90.
fixes #30827 for trunk.
Built from https://develop.svn.wordpress.org/trunk@31074


git-svn-id: http://core.svn.wordpress.org/trunk@31055 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-01-07 23:43:24 +00:00
Sergey Biryukov
f601e45055 TinyMCE: Remove dashicon-no-alt.png, unused since [30694].
props kpdesign, MattyRob.
fixes #30791 for trunk.
Built from https://develop.svn.wordpress.org/trunk@31073


git-svn-id: http://core.svn.wordpress.org/trunk@31054 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-01-07 23:32:22 +00:00
Andrew Ozz
00ff6675a2 Image file editor: fix a wrong error message when restoring an edited image and IMAGE_EDIT_OVERWRITE is set. Props tiqbiz, fixes #30167.
Built from https://develop.svn.wordpress.org/trunk@31070


git-svn-id: http://core.svn.wordpress.org/trunk@31051 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-01-07 22:48:22 +00:00
Sergey Biryukov
483e7a36d7 Use localized format for Last Updated date on Add Plugins screen.
props tyxla.
fixes #30717.
Built from https://develop.svn.wordpress.org/trunk@31055


git-svn-id: http://core.svn.wordpress.org/trunk@31036 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-01-06 01:03:23 +00:00
Scott Taylor
a9302b2e36 If IMAGE_EDIT_OVERWRITE is defined as true, ensure that multiple edits to the same image does not result in the file being deleted (updating the meta fails because the old and new paths are identical).
Props hew.
Fixes #30394.

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


git-svn-id: http://core.svn.wordpress.org/trunk@31024 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-01-04 02:52:24 +00:00
Scott Taylor
f79eb196df Improve the handling of comma-separated mime-types in wp_match_mime_types(), particularly as pertains to the mime-type selector on the Media list table screen.
Props mdgl.
Fixes #30788.

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


git-svn-id: http://core.svn.wordpress.org/trunk@31023 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-01-04 02:32:22 +00:00
Scott Taylor
c5f9a7c26a Respect query vars for taxonomies passed as URL parameters when in grid mode of Media Library.
Fixes #30584.

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


git-svn-id: http://core.svn.wordpress.org/trunk@31018 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-01-03 08:24:22 +00:00
Scott Taylor
190165cb32 Use the 'not_found' label when there are no items for a taxonomy in the terms list table.
Props SergeyBiryukov.
Fixes #30586.

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


git-svn-id: http://core.svn.wordpress.org/trunk@31016 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-01-03 06:20:21 +00:00
Scott Taylor
af0e5cc851 Inline <script>s that are only printed in the admin for pages that are served with the HTML5 doctype absolutely do not need CDATA comments.
Props tw2113 for the initial patch.
See #18788.

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


git-svn-id: http://core.svn.wordpress.org/trunk@31015 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-01-03 05:46:25 +00:00
Scott Taylor
618c5b4333 When outputting JS with a Content-Type header:
`text/javascript` is obsolete, `application/x-javascript` was experimental. `application/javascript` is the recommended type per RFC 4329.

Props sergej.mueller.
Fixes #29196.

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


git-svn-id: http://core.svn.wordpress.org/trunk@31010 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-01-03 02:57:21 +00:00
Scott Taylor
5e4941023b WP_List_Table's constructor registers an 'admin_footer' callback when AJAX is enabled. As such, if you create multiple instances of the class, you get multiple JS blobs on the page when the callbacks fire. Extra instances get made when wp_comment_reply() invokes the class constructor without checking for the existing instance via the $wp_list_table global.
We shall check the `$wp_list_table` global in `wp_comment_reply()`.

Props sorich87.
Fixes #17413.

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


git-svn-id: http://core.svn.wordpress.org/trunk@31000 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-01-01 19:55:35 +00:00
Scott Taylor
952a5c9971 Support chromeless Vimeo via MEjs:
* Bump MediaElement script loader versions to 2.16.2 - missed in [30634], oops!
* Add `Froogaloop` to `js/mediaelement` scripts for Vimeo
* Check for Vimeo in the same locations that YouTube is checked
* Dynamically load Froogaloop script in admin when editing a TinyMCE view
* Edit MediaElement to call `mejs.$.extend` instead of `$.extend` in `mejs.HtmlMediaElementShim.createPlugin()`, since `$` is not available via WP's jQuery (I will report this upstream):
6f9a78e008/src/js/me-shim.js (L631)

Fixes #29267.

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


git-svn-id: http://core.svn.wordpress.org/trunk@30997 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2014-12-31 20:41:24 +00:00
Andrew Nacin
bc60e63518 Use correct function name in docs for get_plugin_data().
props eliorivero.
fixes #30699.

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


git-svn-id: http://core.svn.wordpress.org/trunk@30989 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2014-12-31 08:08:22 +00:00
Boone Gorges
95dba4c8c0 When no plugins are active, return an empty array from validate_active_plugins().
This creates parity with the behavior of the function when plugins *are* active,
but none are invalid. It also makes it possible to write unit tests for the
function.

Props sgrant.
Fixes #30860.
Built from https://develop.svn.wordpress.org/trunk@31003


git-svn-id: http://core.svn.wordpress.org/trunk@30984 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2014-12-30 19:31:22 +00:00
Scott Taylor
bc1341628f Comment List Tables:
* Declare `$extra_items` property
* Since `->get_column_info()` overrides its parent's method, it doesn't need to set `_column_headers`, which is an undeclared property that is only used for caching the lookup after the first run in the parent class, which isn't called in the child class.
* `$_args` in `WP_List_Table` has to be `protected` for `WP_Post_Comments_List_Table` to legally access it. `$_args` is awkward as is and should probably be only available via a getter.

See #30799.

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


git-svn-id: http://core.svn.wordpress.org/trunk@30970 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2014-12-20 23:27:25 +00:00
Scott Taylor
786caa4d55 Correct the @param docs for arguments that are truthy/falsey.
See #30799.

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


git-svn-id: http://core.svn.wordpress.org/trunk@30969 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2014-12-20 23:04:23 +00:00
Scott Taylor
5eb5afac34 For clarity, initialize some arrays that previously were only assigned via short circuit in loops.
See #30799.

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


git-svn-id: http://core.svn.wordpress.org/trunk@30968 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2014-12-20 22:47:22 +00:00
Scott Taylor
2dbd0d0a8f In image_size_input_fields():
* Declare `$out` as an empty array - this is not a strict PHP requirement, but is a good practice before loops
* Most of this function was tabbed twice, instead of once

See #30799.

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


git-svn-id: http://core.svn.wordpress.org/trunk@30967 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2014-12-20 22:19:24 +00:00
Scott Taylor
f19bec8754 In wp_import_handle_upload():
`$file` was essentially getting declared/overwritten 3 times. In lieu of this, return an array containing the error immediately instead of doing a short-circuit array key assignment on error. Rename the local variable to `$upload` and use its properties instead of creating 3 new local vars, one of which stomped the array.

See #30799.

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


git-svn-id: http://core.svn.wordpress.org/trunk@30966 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2014-12-20 21:10:24 +00:00
Scott Taylor
42f5acd869 Improve some docs for @param. Remove an unneeded $wpdb global import.
See #30799.

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


git-svn-id: http://core.svn.wordpress.org/trunk@30965 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2014-12-20 20:56:22 +00:00
Scott Taylor
574fabf2bc Improve some wp-admin/includes/class-wp-filesystem-*.php docs for @param.
See #30799.

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


git-svn-id: http://core.svn.wordpress.org/trunk@30964 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2014-12-20 20:40:23 +00:00
Dominik Schilling
eccd5a5eda Pass locale to wordpress.org theme/plugin API.
In the future this will be used to return localized plugin/theme info.

see #30735.
Built from https://develop.svn.wordpress.org/trunk@30944


git-svn-id: http://core.svn.wordpress.org/trunk@30933 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2014-12-16 22:39:22 +00:00
Andrew Nacin
8c3027c3c7 Call it 'Distraction-free writing mode' and update the help string. fixes #30657.
Built from https://develop.svn.wordpress.org/trunk@30890


git-svn-id: http://core.svn.wordpress.org/trunk@30880 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2014-12-16 10:07:23 +00:00
Andrew Nacin
7b015d507d Update/add plugin recommendation strings.
Update [30887], add a translation function to the Vine string.

fixes #30337. see #30435.

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


git-svn-id: http://core.svn.wordpress.org/trunk@30879 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2014-12-16 10:06:24 +00:00
Andrew Nacin
23f4b0f62f Updates to the 'Log out everywhere' implementation.
* Include a message and a disabled button when you're only logged in at one location.
 * Avoid leaking the session token in HTML.
 * Simplify, simplify, simplify.

see #30264.

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


git-svn-id: http://core.svn.wordpress.org/trunk@30878 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2014-12-16 09:15:23 +00:00
Dion Hulse
5661464d35 Background Updates: Pass back whether Group Writable support is being leveraged for an update to the WordPress.org API.
See #30245

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


git-svn-id: http://core.svn.wordpress.org/trunk@30850 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2014-12-15 14:08:23 +00:00
Andrew Nacin
180c596d7b Rename _wp_clear_update_cache() to wp_clean_update_cache().
This makes it match most cache-clearing functions, including the ones it wraps. Also no need for it to be prefixed as "private."

wp_clean_plugins_cache() doesn't always exist, so as a quick fix, clear the transient we care to clear.

see #30369.

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


git-svn-id: http://core.svn.wordpress.org/trunk@30846 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2014-12-15 08:55:22 +00:00
Andrew Ozz
bb67aa9d5a Improve text for the DFW admin pointer. Remove the concatenation.
Props kpdesign, ianmjones.
See #30671.
Built from https://develop.svn.wordpress.org/trunk@30837


git-svn-id: http://core.svn.wordpress.org/trunk@30827 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2014-12-12 22:12:22 +00:00
Andrew Ozz
0aa0016488 Fix the search field width in the media modal, media library grid and on the install new plugins screen. Props helen, fixes #30658.
Built from https://develop.svn.wordpress.org/trunk@30813


git-svn-id: http://core.svn.wordpress.org/trunk@30803 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2014-12-11 04:12:23 +00:00
Sergey Biryukov
0ef8e683f2 Revert [28948], which caused a regression.
see #29573 for trunk. see #28350.
Built from https://develop.svn.wordpress.org/trunk@30791


git-svn-id: http://core.svn.wordpress.org/trunk@30781 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2014-12-08 21:14:23 +00:00
Andrew Ozz
a445806c6f Plugins: move the recommender results to a separate tab. Any outstanding quality issues will be fixed on the API side without needing core changes. Props tellyworth, fixes #30337.
Built from https://develop.svn.wordpress.org/trunk@30782


git-svn-id: http://core.svn.wordpress.org/trunk@30772 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2014-12-07 23:40:24 +00:00
Andrew Ozz
ef0501e1bc Better docs for Plugin_Upgrader::deactivate_plugin_before_upgrade(). Props DrewAPicture. Fixes #29088.
Built from https://develop.svn.wordpress.org/trunk@30762


git-svn-id: http://core.svn.wordpress.org/trunk@30752 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2014-12-07 01:19:24 +00:00
Andrew Ozz
1bb4b6a82b Always return a value in Plugin_Upgrader::deactivate_plugin_before_upgrade(). Props jdgrimes. Fixes #29088.
Built from https://develop.svn.wordpress.org/trunk@30761


git-svn-id: http://core.svn.wordpress.org/trunk@30751 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2014-12-07 00:53:23 +00:00
Drew Jaynes
473ebca2af Add missing DocBlocks and parameter descriptions for a wide variety of properties and methods in WP_Upgrader, Plugin_Upgrader, Theme_Upgrader, Language_Pack_Upgrader, Core_Upgrader, and File_upload_Upgrader.
Props jdgrimes, DrewAPicture.

See #29086.

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


git-svn-id: http://core.svn.wordpress.org/trunk@30748 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2014-12-07 00:26:22 +00:00
Drew Jaynes
cc4ac906dc Fix a typo in the return description for get_sample_permalink().
Props TobiasBg.
Fixes #30591.

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


git-svn-id: http://core.svn.wordpress.org/trunk@30745 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2014-12-06 21:46:23 +00:00
John Blackbourn
bdd00b3902 Improve various hook and filter docs so they are correctly parsed for the code reference.
Fixes #30558
Props DrewAPicture

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


git-svn-id: http://core.svn.wordpress.org/trunk@30744 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2014-12-06 21:32:24 +00:00
Drew Jaynes
23707b1ada Convert various uses of (optional) in core parameter descriptions to use the style prescribed in the inline documentation standards for PHP.
The style for marking parameters optional in inline PHP docs is: `@param type $var Optional. Description. Accepts. Default.`, where Accepts can be omitted on a case-by-case basis.

Props coffee2code.
Fixes #30591.

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


git-svn-id: http://core.svn.wordpress.org/trunk@30743 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2014-12-06 21:24:45 +00:00
Andrew Nacin
1cf7a49ffd Adjust [29806] and revert [29807] to restore placeholder and email copy order.
Avoids unnecessarily changing a (large, carefully formatted) translated string from 4.0.

fixes #21089.

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


git-svn-id: http://core.svn.wordpress.org/trunk@30732 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2014-12-05 01:15:26 +00:00
John Blackbourn
543f408098 Correct the default value of the show_split_view argument for revisions so they are correctly displayed side by side ins
tead of inline.

Fixes #24908

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


git-svn-id: http://core.svn.wordpress.org/trunk@30729 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2014-12-04 14:36:24 +00:00
Andrew Ozz
1bb20da03b Update better description of the Screen Options checkbox for DFW v2 and editor-expand. Props johnbillion, kpdesign, fixes #30557.
Built from https://develop.svn.wordpress.org/trunk@30734


git-svn-id: http://core.svn.wordpress.org/trunk@30724 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2014-12-03 22:00:29 +00:00
Andrew Ozz
5299e95360 Editor show the DFW v2 pointer for users that have disabled the visual editor. Fixes #30458.
Built from https://develop.svn.wordpress.org/trunk@30730


git-svn-id: http://core.svn.wordpress.org/trunk@30720 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2014-12-03 18:18:23 +00:00
Drew Jaynes
8df7115760 Use the correct hash notation syntax for the WP_Filesystem_Base::dirlist() DocBlock.
See #28298.

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


git-svn-id: http://core.svn.wordpress.org/trunk@30712 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2014-12-03 10:11:22 +00:00
Andrew Ozz
04c2e80c03 Update the description of the Screen Options checkbox for turning editor-expand on/off to include DFW v2. Props kpdesign, fixes #30557.
Built from https://develop.svn.wordpress.org/trunk@30718


git-svn-id: http://core.svn.wordpress.org/trunk@30708 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2014-12-02 23:23:23 +00:00
Andrew Ozz
71d0c1c977 Update the DFW v2 pointer text. Props kpdesign, DrewAPicture, johnbillion. Fixes #30458.
Built from https://develop.svn.wordpress.org/trunk@30717


git-svn-id: http://core.svn.wordpress.org/trunk@30707 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2014-12-02 23:11:24 +00:00
Andrew Ozz
f1dcfa9712 Editor: hide the DFW v2 button when editor-expand is off. Fixes #30568.
Built from https://develop.svn.wordpress.org/trunk@30711


git-svn-id: http://core.svn.wordpress.org/trunk@30701 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2014-12-02 20:40:22 +00:00
Drew Jaynes
c4b9da857a Using let's properly in inline comments lets us move on to more pressing matters of inline documentation.
Props trepmal.
Fixes #30570.

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


git-svn-id: http://core.svn.wordpress.org/trunk@30693 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2014-12-02 04:43:22 +00:00
John Blackbourn
6fcf4ed3c5 Prevent the deletion of a theme while it has an active child theme.
Fixes #29580
Props karpstrucking, jesin

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


git-svn-id: http://core.svn.wordpress.org/trunk@30687 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2014-12-02 02:21:24 +00:00
Drew Jaynes
ad297dab6d Correctly capitalize JavaScript throughout core docs.
Fixes #30569.

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


git-svn-id: http://core.svn.wordpress.org/trunk@30685 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2014-12-02 00:31:22 +00:00
Scott Taylor
37a23b2c73 Improve various @param docs.
See #30224.

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


git-svn-id: http://core.svn.wordpress.org/trunk@30672 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2014-12-01 02:17:21 +00:00
Scott Taylor
2c32752abd Improve various @param docs for src/wp-admin/*.
See #30224.

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


git-svn-id: http://core.svn.wordpress.org/trunk@30670 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2014-12-01 01:00:22 +00:00
Scott Taylor
65ab522a51 Improve various @param docs for List Tables.
See #30224.

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


git-svn-id: http://core.svn.wordpress.org/trunk@30669 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2014-12-01 00:33:23 +00:00
Scott Taylor
da4c39480f Improve various @param docs for src/wp-admin/includes/class-wp-filesystem-*.php.
See #30224.

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


git-svn-id: http://core.svn.wordpress.org/trunk@30668 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2014-12-01 00:13:22 +00:00
Scott Taylor
67417897ec Improve the @param docs for src/wp-admin/includes/plugin.php.
See #30224.

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


git-svn-id: http://core.svn.wordpress.org/trunk@30658 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2014-11-30 22:23:23 +00:00
Scott Taylor
562ddb8316 Use sanitize_mime_type() instead of urlencode() when string-building <option> values in ->get_views() for media list tables.
`urlencode()` was introduced in [28553] via _duck and yours truly.

Got weirder after [29625].

Props birgire.
Fixes #30123.

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


git-svn-id: http://core.svn.wordpress.org/trunk@30651 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2014-11-30 20:23:23 +00:00
Drew Jaynes
78bb3e5ff5 Docs Formatting: Backtick-escape inline code for all dynamic hook docs in wp-admin/includes/*.
Also adds a few inline `@see` cross-references as they apply.

Affects DocBlocks for the following hooks:
* `views_{$this->screen->id}`
* `bulk_actions-{$this->screen->id}`
* `manage_{$this->screen->id}_sortable_columns`
* `theme_action_links_$stylesheet`
* `after_theme_row_$stylesheet`
* `install_plugins_table_api_args_$tab`
* `$prefix . plugin_action_links`
* `after_plugin_row_$plugin_file`
* `manage_taxonomies_for_{$post_type}_columns`
* `manage_{$post_type}_posts_columns`
* `manage_{$post->post_type}_posts_custom_column`
* `{$taxonomy}_row_actions`
* `manage_{$this->screen->taxonomy}_custom_column`
* `install_themes_table_api_args_' . $tab`
* `auto_update_ . $type`
* `{$action}_prefilter`
* `admin_head_{$content_func}`
* `nav_menu_items_{$post_type_name}`
* `activate_ . $plugin`
* `deactivate_ . $plugin`
* `edit_{$post_type}_per_page`
* `postbox_classes_{$page}_{$id}`
* `_wp_post_revision_field_$field`
* `manage_{$screen->id}_columns`
* `in_plugin_update_message-{$file}`
* `in_theme_update_message-{$theme_key}`

See #30552.

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


git-svn-id: http://core.svn.wordpress.org/trunk@30638 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2014-11-30 11:28:24 +00:00
Drew Jaynes
3ceb75bd8e Specify a type (array) for the $post_data parameter in the DocBlock for wp_autosave().
Props tillkruess.
See #30508.

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


git-svn-id: http://core.svn.wordpress.org/trunk@30635 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2014-11-30 10:01:23 +00:00
Drew Jaynes
e4425165ff Improve the inline documentation for image_edit_apply_changes().
Including:
* Add a correct type (array) for the `$changes` parameter
* Add the `@since` version
* Add proper descriptions for both parameters and the return value.

Props tillkruess for the initial patch.
See #30508.

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


git-svn-id: http://core.svn.wordpress.org/trunk@30634 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2014-11-30 09:59:22 +00:00
Andrew Ozz
760e3e5fbd Editor: no pointer for DFW v2 when editor-scrolling is not used. Pass $post_type in the wp_editor_expand filter. See #30458.
Built from https://develop.svn.wordpress.org/trunk@30641


git-svn-id: http://core.svn.wordpress.org/trunk@30631 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2014-11-30 06:37:21 +00:00
Drew Jaynes
bb380687fa Add missing DocBlocks for several functions in wp-admin/includes/ms.php.
Props dustyf.
See #30483.

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


git-svn-id: http://core.svn.wordpress.org/trunk@30620 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2014-11-30 05:06:23 +00:00
Drew Jaynes
3699ea4155 Use the correct type (integer) for the $menu_id parameter in the wp_get_nav_menu_to_edit() DocBlock.
Also properly mark the parameter as optional and specify the default value.

Props jaimieolmstead for the initial patch.
Fixes #30540.

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


git-svn-id: http://core.svn.wordpress.org/trunk@30617 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2014-11-30 04:25:23 +00:00
Boone Gorges
c6e752b063 In get_default_post_to_edit(), let 'post_name' be passed to filter.
Previously, it was being overridden after the default post had been inserted
into the database, making it cumbersome to override with the 'wp_insert_post_data'
filter.

Props danielbachhuber.
Fixes #29847.
Built from https://develop.svn.wordpress.org/trunk@30626


git-svn-id: http://core.svn.wordpress.org/trunk@30616 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2014-11-29 19:26:23 +00:00
Drew Jaynes
4432dc752b 4.1 Docs Audit: Various formatting fixes for inline documentation in class-wp-list-table.php and comment-template.php.
See #30469.

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


git-svn-id: http://core.svn.wordpress.org/trunk@30600 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2014-11-28 11:22:23 +00:00