Lance Willett
7be12f7d8d
Twenty Fifteen: move js
and no-js
class name functionality out of header template and into a wp_head
hook in functions.php file so that the JavaScript functionality isn't hard-coded into a template file.
...
Fixes #30770 , props chipbennett, valendesigns, and peterwilsoncc.
Built from https://develop.svn.wordpress.org/trunk@31184
git-svn-id: http://core.svn.wordpress.org/trunk@31165 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-01-15 23:10:22 +00:00
Lance Willett
4d00172987
Twenty Fifteen: remove unused CSS rules for wp_page_menu
since are not used in the theme. And a bit of CSS cleanup.
...
Props iamtakashi, fixes #30957 .
Built from https://develop.svn.wordpress.org/trunk@31183
git-svn-id: http://core.svn.wordpress.org/trunk@31164 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-01-15 23:05:22 +00:00
Lance Willett
6960d5ce12
Twenty Fifteen: remove border on post navigation when post thumbnail is available.
...
Props jartes, fixes #30918 .
Built from https://develop.svn.wordpress.org/trunk@31182
git-svn-id: http://core.svn.wordpress.org/trunk@31163 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-01-15 23:03:26 +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
Andrew Ozz
a7dcd2d736
TinyMCE: select the iframe element by id. Needed as some browser extensions insert extra elements in the page. Props avryl, see #30785 .
...
Built from https://develop.svn.wordpress.org/trunk@31180
git-svn-id: http://core.svn.wordpress.org/trunk@31161 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-01-14 21:33:25 +00:00
Boone Gorges
3f033dc73d
Support array values in WP_Date_Query::validate_date_values()
.
...
Introduced in [29925], `validate_date_values()` throws `_doing_it_wrong()`
notices when values passed as part of a `WP_Date_Query` do not reflect actual
dates. However, the validation did not account properly for the case where an
array of multiple values is passed, as when doing IN or BETWEEN queries.
Props dlh.
Fixes #31001 for trunk.
Built from https://develop.svn.wordpress.org/trunk@31179
git-svn-id: http://core.svn.wordpress.org/trunk@31160 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-01-14 16:51:24 +00:00
Jeremy Felt
8d55b418ec
Don't overcheck the expected return from get_blog_details()
in get_blogaddress_by_id()
...
If `get_blog_details()` is returning something that is not our expected object or `false`, then a notice would already be thrown there.
Also adds proper return docs to `get_blog_details()`.
Props SergeyBiryukov.
Fixes #30566
Built from https://develop.svn.wordpress.org/trunk@31178
git-svn-id: http://core.svn.wordpress.org/trunk@31159 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-01-14 05:33:25 +00:00
Sergey Biryukov
19e51601ab
Revert [31173] and target only taxonomy and link manager tables in keyboard focus code.
...
props afercia.
fixes #30980 .
Built from https://develop.svn.wordpress.org/trunk@31177
git-svn-id: http://core.svn.wordpress.org/trunk@31158 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-01-13 14:01:22 +00:00
Sergey Biryukov
c3c35cf645
Customizer: Use deep-link for Widgets in toolbar on front-end.
...
props caseypatrickdriscoll.
fixes #30971 .
Built from https://develop.svn.wordpress.org/trunk@31176
git-svn-id: http://core.svn.wordpress.org/trunk@31157 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-01-13 07:45:22 +00:00
Sergey Biryukov
b2b4233b7b
Twenty Fifteen: Add print section to the table of contents in the stylesheet.
...
props iamtakashi.
fixes #30993 .
Built from https://develop.svn.wordpress.org/trunk@31175
git-svn-id: http://core.svn.wordpress.org/trunk@31156 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-01-13 07:21:21 +00:00
Sergey Biryukov
68c50a9e1b
Scope attachment selectors in media views to avoid interfering with attachment pages on front-end.
...
props valendesigns.
fixes #30878 .
Built from https://develop.svn.wordpress.org/trunk@31174
git-svn-id: http://core.svn.wordpress.org/trunk@31155 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-01-13 07:16:23 +00:00
Sergey Biryukov
3ac60370b8
Reveal row actions on focus on taxonomy screens.
...
props afercia.
fixes #30980 .
Built from https://develop.svn.wordpress.org/trunk@31173
git-svn-id: http://core.svn.wordpress.org/trunk@31154 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-01-13 07:02:22 +00:00
Sergey Biryukov
dcaa26c1de
Add 'user_id' to the list of fields wp_update_comment() can update.
...
props jphase.
fixes #30307 .
Built from https://develop.svn.wordpress.org/trunk@31172
git-svn-id: http://core.svn.wordpress.org/trunk@31153 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-01-13 06:48:22 +00:00
Sergey Biryukov
47b47c4980
Add 'comment_type' to the list of fields wp_update_comment() can update.
...
props desaiuditd.
fixes #30627 .
Built from https://develop.svn.wordpress.org/trunk@31171
git-svn-id: http://core.svn.wordpress.org/trunk@31152 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-01-13 06:42:21 +00:00
Drew Jaynes
f2bc30c03f
Ensure we're using the correct @ignore
phpDocumentor tag to mark elements that should be skipped when parsing.
...
Up to this point, various core elements' DocBlocks incorrectly included an `@internal` tag as a means for skipping the parsing process. When paired with a description (inline or otherwise), `@internal` is a valid tag meant to provide internal-only context, but not necessarily to skip parsing the entire element.
See #30987 .
Built from https://develop.svn.wordpress.org/trunk@31170
git-svn-id: http://core.svn.wordpress.org/trunk@31151 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-01-13 00:51:21 +00:00
Drew Jaynes
632c26d142
Remove an erroneous @internal
tag from the DocBlock for get_children()
.
...
Use of the `@internal` tag caused the reference article for this function to be skipped during the parsing process.
Fixes #30987 for trunk.
Built from https://develop.svn.wordpress.org/trunk@31169
git-svn-id: http://core.svn.wordpress.org/trunk@31150 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-01-13 00:08:22 +00:00
Scott Taylor
fc843ce4d0
There are some random add_action()
and add_filter()
calls littered around some files in wp-includes/
. These should be moved to wp-includes/default-filters.php
with the rest of the registered hooks. It seems like this was the best practice for awhile and then we randomly stopped. This file loads way before any of the includes, so the hooks will be registered for any request that loads WordPress, even SHORTINIT
- a lot of the hooks registered won't run anyways (that's already the case).
...
See #30947 .
Built from https://develop.svn.wordpress.org/trunk@31168
git-svn-id: http://core.svn.wordpress.org/trunk@31149 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-01-12 16:40:23 +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
Jeremy Felt
8f35b191db
Use a less complex approach for enforcing path slashes in update_blog_details()
...
Ensure leading and traling slashes are in place and don't touch anything in the middle. Validating with `array_filter()` would have missed a possible valid falsy path - `/my-path/0/`.
Props nacin.
Fixes #18117 .
Built from https://develop.svn.wordpress.org/trunk@31158
git-svn-id: http://core.svn.wordpress.org/trunk@31139 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-01-12 04:21:22 +00:00
Jeremy Felt
343a6587cf
Check for existence of data from get_blogaddress_by_id()
before returning a URL
...
* Prevent a notice when an invalid ID is used with `get_blogaddres_by_id()`.
* Return a falsy empty string rather than the previous "http://".
* Add unit tests for `get_blogaddress_by_id()`.
Props nerrad.
Fixes #30566 .
Built from https://develop.svn.wordpress.org/trunk@31157
git-svn-id: http://core.svn.wordpress.org/trunk@31138 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-01-12 02:24:22 +00:00
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
Jeremy Felt
eaf7f8df74
Enforce leading and trailing slashes on paths updated with update_blog_details()
...
In multisite, core expects the stored value for a site's path to have leading and trailing slashes. When these slashes are missing, it becomes impossible to visit the site.
This enforces proper `/path/` creation in `update_blog_details()`, most likely used when updating an existing site through `site-info.php`.
Props earnjam, simonwheatley.
Fixes #18117 . Fixes #23865 .
Built from https://develop.svn.wordpress.org/trunk@31155
git-svn-id: http://core.svn.wordpress.org/trunk@31136 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-01-12 01:43:22 +00:00
Gary Pendergast
34636a0e41
If get_avatar_data()
is passed an empty value for the default avatar, we should be using the site's avatar_default
option instead.
...
See #21195
Built from https://develop.svn.wordpress.org/trunk@31154
git-svn-id: http://core.svn.wordpress.org/trunk@31135 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-01-12 00:23:24 +00:00
Gary Pendergast
3d051df3c9
In get_avatar_data()
, there's no need to return false
if we couldn't find an avatar, as Gravatar can handle being given an empty email hash. This allows the default avatar to show when no email address is given.
...
See #21195
Built from https://develop.svn.wordpress.org/trunk@31153
git-svn-id: http://core.svn.wordpress.org/trunk@31134 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-01-12 00:20:24 +00:00
Gary Pendergast
4bc89fef32
In get_avatar()
, revert the <img>
tag attributes to using single quotes, instead of double quotes. This behaviour was changed in [31107], but caused problems for code that attempted to parse the <img>
tag.
...
See #21195
Built from https://develop.svn.wordpress.org/trunk@31152
git-svn-id: http://core.svn.wordpress.org/trunk@31133 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-01-12 00:03:24 +00:00
Scott Taylor
eed3698c49
In WP_Query
, only call magic method internals again whitelists of properties and methods, $compat_fields
and $compat_methods
. Remove __unset()
since __set()
is not implemented.
...
See #30891 .
Built from https://develop.svn.wordpress.org/trunk@31151
git-svn-id: http://core.svn.wordpress.org/trunk@31132 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-01-11 22:41:24 +00:00
Scott Taylor
61e12e00c1
In WP_Comment_Query
, only allow __call()
to run against ->get_search_sql()
.
...
See #30891 .
Built from https://develop.svn.wordpress.org/trunk@31150
git-svn-id: http://core.svn.wordpress.org/trunk@31131 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-01-11 22:33:24 +00:00
Scott Taylor
0e84d59de5
In wp_xmlrpc_server
, only allow __call()
to run against ->_multisite_getUsersBlogs()
.
...
See #30891 .
Built from https://develop.svn.wordpress.org/trunk@31149
git-svn-id: http://core.svn.wordpress.org/trunk@31130 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-01-11 22:31:22 +00:00
Scott Taylor
ed4e7b01d4
In WP_oEmbed
, only allow __call()
to run against a whitelist of methods, $compat_methods
.
...
See #30891 .
Built from https://develop.svn.wordpress.org/trunk@31148
git-svn-id: http://core.svn.wordpress.org/trunk@31129 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-01-11 22:27:23 +00:00
Scott Taylor
a4092e90f0
In WP_Roles
, only allow __call()
to run against ->_init()
.
...
See #30891 .
Built from https://develop.svn.wordpress.org/trunk@31147
git-svn-id: http://core.svn.wordpress.org/trunk@31128 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-01-11 22:23: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
Scott Taylor
a79c242038
In WP_User_Query
, only call magic method internals against a whitelist of properties, $compat_fields
.
...
See #30891 .
Built from https://develop.svn.wordpress.org/trunk@31144
git-svn-id: http://core.svn.wordpress.org/trunk@31125 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-01-11 22:00:23 +00:00
Andrew Ozz
d079899553
TinyMCE wpView: when clicking in the editor optimize the caret placement before or after a view. Props avryl, fixes #30938 .
...
Built from https://develop.svn.wordpress.org/trunk@31143
git-svn-id: http://core.svn.wordpress.org/trunk@31124 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-01-11 20:42:23 +00:00
Andrew Ozz
49c0b22828
TinyMCE: fix (switch) the indent/outdent icons in RTL mode so the arrow points at the proper direction. Props avryl, fixes #21281 .
...
Built from https://develop.svn.wordpress.org/trunk@31142
git-svn-id: http://core.svn.wordpress.org/trunk@31123 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-01-11 20:30:26 +00:00
Boone Gorges
77875a273e
Walker::$has_children
should be public for backward compatibility.
...
See [31137]. See #30891 .
Built from https://develop.svn.wordpress.org/trunk@31141
git-svn-id: http://core.svn.wordpress.org/trunk@31122 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-01-11 01:56: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
c9bc1cc46e
WP_Ajax_Response
has one property only, $responses
. It was public until [28508], when it became private
in name only. Is it worth 4 magic methods to pretend that this property is private
? It is not.
...
Make it `public` and remove the magic methods.
See #30891 .
Built from https://develop.svn.wordpress.org/trunk@31139
git-svn-id: http://core.svn.wordpress.org/trunk@31120 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-01-11 00:13:23 +00:00
Scott Taylor
d8e5aabab5
In WP_Error
:
...
* `wp_send_json_error()` accesses `$errors` on an instance, it must be `public`
* `$error_data` is a local message cache for error codes and doesn't particularly hide info, would be the only non-public field or method in the class
Make `$errors` and `$error_data` public and remove magic methods.
See #30891 .
Built from https://develop.svn.wordpress.org/trunk@31138
git-svn-id: http://core.svn.wordpress.org/trunk@31119 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-01-11 00:01:22 +00:00
Scott Taylor
b962499be6
In Walker
:
...
* Every subclass of `Walker` overrides `$db_fields` and makes it public
* `wp_list_comments()` accesses `->max_pages` on an instance of `Walker`, it must be public
* `$has_children` was added as `protected` in 4.0. doesn't need BC
Make `$db_fields` and `$max_pages` public and remove magic methods.
See #30891 .
Built from https://develop.svn.wordpress.org/trunk@31137
git-svn-id: http://core.svn.wordpress.org/trunk@31118 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-01-10 23:44:23 +00:00
Scott Taylor
eab3aa7802
In WP_MatchesMapRegex
:
...
* Exactly one method was made private in [28516], and is only used internally.
* 2 properties were made private, but they just store variables passed to the constructor.
* Instances of this class are never created in core. `WP_MatchesMapRegex::apply()` is called statically in `WP->parse_request()` and `url_to_postid()`.
The chances that:
1) this class is used as an instance somewhere and
2) the properties that have always been marked `@access private` and begin with `_` were used publicly
...is extremely low.
Remove the magic methods, I should not have added them.
While we're at it, use the PHP5-style `__construct()` instead of the class name.
See #30891 .
Built from https://develop.svn.wordpress.org/trunk@31136
git-svn-id: http://core.svn.wordpress.org/trunk@31117 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-01-10 23:27:21 +00:00
Scott Taylor
65a459b34f
In WP_Text_Diff_Renderer_Table
:
...
* In [28525], `$_diff_threshold`, `$inline_diff_renderer`, and `$_show_split_view` were marked `protected`; magic methods were also added.
* The magic methods should only perform operations on a whitelisted set of properties, now specified in `$compat_fields`
* Remove `__call()`, is unnecessary and can wreak havoc on the parent class.
This class is used in one place: `wp_text_diff()`.
See #30891 .
Built from https://develop.svn.wordpress.org/trunk@31135
git-svn-id: http://core.svn.wordpress.org/trunk@31116 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-01-10 22:58:24 +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
806b2e9bae
get_post()
takes $output
as its 2nd param. The @return
annotation should reflect the function's ability to return an array.
...
See #30799 .
Built from https://develop.svn.wordpress.org/trunk@31132
git-svn-id: http://core.svn.wordpress.org/trunk@31113 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-01-10 21:38:23 +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
ac654632fe
Use PHP_SAPI
constant instead of php_sapi_name()
in iis7_supports_permalinks()
, wp_fix_server_vars()
, and wp_redirect()
.
...
See #30799 .
Built from https://develop.svn.wordpress.org/trunk@31120
git-svn-id: http://core.svn.wordpress.org/trunk@31101 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-01-10 04:59: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
Andrew Ozz
71885dceca
Media modal: do not attempt to focus the hidden file input field added by Plupload when tabbing. Props afercia, fixes #30392 .
...
Built from https://develop.svn.wordpress.org/trunk@31117
git-svn-id: http://core.svn.wordpress.org/trunk@31098 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-01-09 21:47:29 +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
Scott Taylor
236d8ae9dc
After [31016], would be cool if we actually included the froogaloop
file to interact with Vimeo.
...
Props dimadin.
Fixes #29267 .
Built from https://develop.svn.wordpress.org/trunk@31115
git-svn-id: http://core.svn.wordpress.org/trunk@31096 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-01-09 20:04:23 +00:00
Boone Gorges
df945fcdcb
In get_permalink()
, don't resolve to pretty permalink if post has 'future' status.
...
We already do this for other non-public statuses, to prevent leaking non-public
information about unpublished posts.
Props e.mazovetskiy, CalEvans.
Fixes #30910 .
Built from https://develop.svn.wordpress.org/trunk@31114
git-svn-id: http://core.svn.wordpress.org/trunk@31095 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-01-09 16:40: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
2be2af7789
Avoid a PHP notice in _WP_Editors::wp_fullscreen_html() when no $post global is set.
...
props marcochiesi.
fixes #30071 .
Built from https://develop.svn.wordpress.org/trunk@31112
git-svn-id: http://core.svn.wordpress.org/trunk@31093 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-01-09 10:28:23 +00:00
Sergey Biryukov
a2f9b410f8
Toolbar: Make network admin accessible via keyboard.
...
props Cheffheid.
fixes #29422 .
Built from https://develop.svn.wordpress.org/trunk@31111
git-svn-id: http://core.svn.wordpress.org/trunk@31092 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-01-09 09:51: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
Sergey Biryukov
e24b443f50
Correct @return value for WP_Theme::load_textdomain() after [30681].
...
see #30224 .
Built from https://develop.svn.wordpress.org/trunk@31108
git-svn-id: http://core.svn.wordpress.org/trunk@31089 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-01-09 04:54:24 +00:00
Gary Pendergast
5ee3ff435d
Add get_avatar_url()
, for retrieving just the URL of an avatar, rather than the entire <img>
tag that get_avatar()
produces.
...
Unlike `get_avatar()`, `get_avatar_url()` is not pluggable. It can be extended/or modified through the new filters included.
Fixes #21195 .
Props mdawaffe, pento, pathawks, DrewAPicture
Built from https://develop.svn.wordpress.org/trunk@31107
git-svn-id: http://core.svn.wordpress.org/trunk@31088 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-01-09 04:43: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
Sergey Biryukov
91297b7a30
If WP_Rewrite::flush_rules() is called on 'init' or earlier, wait until 'wp_loaded' before actually flushing the rules, to make sure all the rules registered on 'init' are included.
...
props joostdevalk.
see #30501 .
Built from https://develop.svn.wordpress.org/trunk@31104
git-svn-id: http://core.svn.wordpress.org/trunk@31085 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-01-08 22:00:23 +00:00
Sergey Biryukov
6e29458407
Remove a redundant inline comment with a typo.
...
props nicnicnicdevos.
fixes #30956 .
Built from https://develop.svn.wordpress.org/trunk@31103
git-svn-id: http://core.svn.wordpress.org/trunk@31084 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-01-08 21:29:24 +00:00
Sergey Biryukov
24b3ee8680
Make a hint on Edit Selection view in media modal more accurate, as it applies to all media files, not just images.
...
props pavelevap.
see #30931 .
Built from https://develop.svn.wordpress.org/trunk@31102
git-svn-id: http://core.svn.wordpress.org/trunk@31083 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-01-08 21:24:23 +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
Sergey Biryukov
dfac056cf1
Pass post type to count_user_posts() in get_the_author_posts().
...
props Caspie, tyxla.
fixes #30904 .
Built from https://develop.svn.wordpress.org/trunk@31098
git-svn-id: http://core.svn.wordpress.org/trunk@31079 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-01-08 19:53:22 +00:00
Sergey Biryukov
ff4968ebc4
Use home_url() instead of hardcoded domain in Tests_Link_GetAdjacentPostLink.
...
props CalEvans.
fixes #30955 .
Built from https://develop.svn.wordpress.org/trunk@31097
git-svn-id: http://core.svn.wordpress.org/trunk@31078 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-01-08 18:45:23 +00:00
Sergey Biryukov
e53b581817
Remove non-functional date filter from Edit Selection view in media modal.
...
props tyxla.
fixes #30931 .
Built from https://develop.svn.wordpress.org/trunk@31096
git-svn-id: http://core.svn.wordpress.org/trunk@31077 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-01-08 18:23:23 +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
Gary Pendergast
c777f6a29c
WPDB: When sanity checking a string, check that it's a string, first - PHP notices can occur if an array or object is handled like a string.
...
See #21212
Built from https://develop.svn.wordpress.org/trunk@31094
git-svn-id: http://core.svn.wordpress.org/trunk@31075 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-01-08 08:45:22 +00:00
Gary Pendergast
83a229084f
WPDB: When wpdb::query()
needs to sanity check a query string, make sure to run wpdb:flush()
afterwards, to ensure the results from sanity check queries aren't mixed up with the results for the user query.
...
See #21212 .
Fixes #30948 .
Built from https://develop.svn.wordpress.org/trunk@31093
git-svn-id: http://core.svn.wordpress.org/trunk@31074 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-01-08 08:32:22 +00:00
Scott Taylor
ac6fddee35
In wp_xmlrpc_server
, remove dead code.
...
See #30799 .
Built from https://develop.svn.wordpress.org/trunk@31092
git-svn-id: http://core.svn.wordpress.org/trunk@31073 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-01-08 07:21: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
bc4cd01190
In wp-includes/taxonomy.php
:
...
The keyword `elseif` should be used instead of `else if` so that all control keywords look like single words.
See #30799 .
Built from https://develop.svn.wordpress.org/trunk@31087
git-svn-id: http://core.svn.wordpress.org/trunk@31068 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-01-08 06:26:23 +00:00
Scott Taylor
29cd3fa5bf
PHP keywords and constants "true", "false", "null" should be in lower case - there was one lingering capitalized false
in _http_build_query()
.
...
See #30799 .
Built from https://develop.svn.wordpress.org/trunk@31086
git-svn-id: http://core.svn.wordpress.org/trunk@31067 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-01-08 06:14:23 +00:00
Scott Taylor
55fdfb529a
There is no need to use the final
modifier inside a final
class. Everything in it is final
by default.
...
See #30799 .
Built from https://develop.svn.wordpress.org/trunk@31085
git-svn-id: http://core.svn.wordpress.org/trunk@31066 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-01-08 06:10:46 +00:00
Scott Taylor
905f35f289
In Customizer classes:
...
* `public final function` methods should be `final public function` - confusing Hack and aligns with PSR2
* Some methods were missing access modifiers
See #30799 .
Built from https://develop.svn.wordpress.org/trunk@31083
git-svn-id: http://core.svn.wordpress.org/trunk@31064 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-01-08 06:02:24 +00:00