Commit Graph

5086 Commits

Author SHA1 Message Date
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
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