Commit Graph

13571 Commits

Author SHA1 Message Date
Jeremy Felt 40bcb404a3 Update `home` and `siteurl` after path slashes are validated in `update_blog_details()`
When editing a site, if `home` and `siteurl` are checked to be updated along with a site's domain and path, they should receive the results of any modifications in `update_blog_details()` rather than trusting the POST data.

Previously, it was possible to save a value without a leading slash on the path, causing an invalid URL to be stored.

Props earnjam.

Fixes #30417.

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


git-svn-id: http://core.svn.wordpress.org/trunk@31137 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-01-12 01:57: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 a56d920454 In `Custom_Image_Header`:
* In [28481], `$admin_header_callback` and `$admin_image_div_callback` were set to `private` based on their erroneous `@param` values
* `$admin_header_callback` and `$admin_image_div_callback` are used as hook callbacks - as such, they must be `public`
* In [28521] and [28524], magic methods were added for back-compat
* Currently, there are 4 properties marked `private`: `$uploaded_headers`, `$default_headers`, `$page`, and `$updated` - `$page` and `$uploaded_headers` are never used and `$updated` was added by me in [30187] during 4.1. `$default_headers` does not necessarily need to be `private`

Set `$admin_header_callback` and `$admin_image_div_callback` to `public`.
Remove the `$page` property - it duplicated the `$page` local var and is referenced/used nowhere.
Remove the `$uploaded_headers` property - it is used nowhere and is dead code.
Set `$default_headers` to `public`.
Remove the magic methods - they were beyond overkill and rendered moot by the above changes.

See #30891.

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


git-svn-id: http://core.svn.wordpress.org/trunk@31115 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-01-10 22:11:22 +00:00
Scott Taylor 61f5cc459e In `Custom_Background`:
* In [28481], `$admin_header_callback` and `$admin_image_div_callback` were set to `private` based on their erroneous `@param` value
* `$admin_header_callback` and `$admin_image_div_callback` are used as hook callbacks - as such, they must be `public`
* In [28521] and [28524], magic methods were added for back-compat
* Currently, there are 2 properties marked `private`, `$page` and `$updated` - `$page` is never used and `$updated` was added by me in [30186] during 4.1

Set `$admin_header_callback` and `$admin_image_div_callback` to `public`.
Remove the `$page` property - it duplicated the `$page` local var and is referenced/used nowhere.
Remove the magic methods - they were beyond overkill and rendered moot by the above changes.

See #30891.

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


git-svn-id: http://core.svn.wordpress.org/trunk@31114 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-01-10 21:59:22 +00:00
Scott Taylor 56d6682461 In `edit-form-advanced.php`:
* `get_permalink( $post_ID )` can return `false`, set it to a variable and check it
* Using the variable allows us to replace 11 separate calls to `get_permalink( $post_ID )` in the file
* These notices were triggered by the potential for `false` to be passed to `esc_url()`

See #30799.

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


git-svn-id: http://core.svn.wordpress.org/trunk@31112 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-01-10 21:21:22 +00:00
Scott Taylor a6d6ba957b `get_header_image()` can return `false`. In `Custom_Image_Header->step_1()`, check the value before setting the `background-image` portion of the `style` attribute. Setting the the URL to empty string will cause the current request to be set as the source of the background image.
See #30799.

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


git-svn-id: http://core.svn.wordpress.org/trunk@31111 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-01-10 21:08:22 +00:00
Scott Taylor aaae4e9df0 Since `get_theme_mod()` returns `false` on failure, `$background_image_thumb` can be set to it and checked instead of calling `get_background_image()` 3 times in `Custom_Background->admin_page()`.
See #30799.

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


git-svn-id: http://core.svn.wordpress.org/trunk@31110 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-01-10 20:44:22 +00:00
Scott Taylor 2b6b7c0235 Declare `$action` as a global in `wp-admin/comment.php`.
See #30799.

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


git-svn-id: http://core.svn.wordpress.org/trunk@31109 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-01-10 20:42:24 +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 84867b3e9c Admin globals:
* Declare `$wp_importers` as a global in `admin.php`
* Declare `$post_type`, `$post_type_object`, and  `$post` as globals where applicable

See #30799.

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


git-svn-id: http://core.svn.wordpress.org/trunk@31102 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-01-10 05:29: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
Andrew Ozz 3324fb71f6 TinyMCE editor-expand: when kitchensink is off hide the statusbar on loading, and when the editor is shorter then the viewport. Props avryl, fixes #30961.
Built from https://develop.svn.wordpress.org/trunk@31118


git-svn-id: http://core.svn.wordpress.org/trunk@31099 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-01-10 01:32:26 +00:00
Scott Taylor 709698a579 In `Custom_Background` and `Custom_Header`:
* In `->init()`, don't check `current_user_can()` since `add_theme_page()` will return `false` immediately if the cap check fails. 
* Bail if `add_theme_page()` returns `false`
* `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@31116


git-svn-id: http://core.svn.wordpress.org/trunk@31097 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-01-09 21:07:22 +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
Helen Hou-Sandí bc7cc3bb12 Collapse additional avatar settings if avatars are disabled.
props markjaquith, krogsgard, valendesigns.
 fixes #30168.

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


git-svn-id: http://core.svn.wordpress.org/trunk@31076 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-01-08 17:01:24 +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
Sergey Biryukov da4a8f56f5 Theme install: Display an appropriate string if theme has not been rated yet.
props kevdotbadger, valendesigns.
fixes #28147.
Built from https://develop.svn.wordpress.org/trunk@31072


git-svn-id: http://core.svn.wordpress.org/trunk@31053 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-01-07 23:17: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 1c9e1836ac Remove obsolete help sentence on Edit User screen.
fixes #30750.
Built from https://develop.svn.wordpress.org/trunk@31067


git-svn-id: http://core.svn.wordpress.org/trunk@31048 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-01-07 08:23:23 +00:00
Dominik Schilling 56981c7143 Customizer: Send JSON success for `customize_save` and allow response to be filtered.
props westonruter.
fixes #29098.
Built from https://develop.svn.wordpress.org/trunk@31062


git-svn-id: http://core.svn.wordpress.org/trunk@31043 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-01-06 21:47:23 +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
Sergey Biryukov 291de9cac1 Themes: Fix position of admin notice with .notice class.
fixes #30895.
Built from https://develop.svn.wordpress.org/trunk@31054


git-svn-id: http://core.svn.wordpress.org/trunk@31035 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-01-05 20:06:23 +00:00
Sergey Biryukov 1541bc1537 Pass comment author name and comment ID to 'get_comment_author_link' filter on Edit Comment screen, for consistency with [30092].
props tyxla.
fixes #30894.
Built from https://develop.svn.wordpress.org/trunk@31053


git-svn-id: http://core.svn.wordpress.org/trunk@31034 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-01-05 19:10: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 ada7442b9e After [31037], ensure that the library is passed as a map to the Media Grid instance. Remove useless query vars.
Fixes #30584.

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


git-svn-id: http://core.svn.wordpress.org/trunk@31022 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-01-04 02:07:23 +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