Gary Pendergast
ceccfa10b4
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
git-svn-id: https://develop.svn.wordpress.org/trunk@31094 602fd350-edb4-49c9-b593-d223f7449a82
2015-01-08 08:44:10 +00:00
Gary Pendergast
befcf4f442
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 .
git-svn-id: https://develop.svn.wordpress.org/trunk@31093 602fd350-edb4-49c9-b593-d223f7449a82
2015-01-08 08:31:42 +00:00
Scott Taylor
ddbb6c7a0f
In wp_xmlrpc_server
, remove dead code.
...
See #30799 .
git-svn-id: https://develop.svn.wordpress.org/trunk@31092 602fd350-edb4-49c9-b593-d223f7449a82
2015-01-08 07:20:17 +00:00
Scott Taylor
1ca58614b2
In wp-includes/plugin.php
, collapse 3 else-newline-tab-if
statements.
...
See #30799 .
git-svn-id: https://develop.svn.wordpress.org/trunk@31091 602fd350-edb4-49c9-b593-d223f7449a82
2015-01-08 07:12:42 +00:00
Scott Taylor
6fd11624d1
The keyword elseif
should be used instead of else if
so that all control keywords look like single words.
...
This was a mess, is now standardized across the codebase, except for a few 3rd-party libs.
See #30799 .
git-svn-id: https://develop.svn.wordpress.org/trunk@31090 602fd350-edb4-49c9-b593-d223f7449a82
2015-01-08 07:04:40 +00:00
Dion Hulse
d0767caf54
Enable Pretty Permalinks for new sites during install if the server supports it.
...
See #6481 , Props valendesigns, DrewAPicture & ericlewis
git-svn-id: https://develop.svn.wordpress.org/trunk@31089 602fd350-edb4-49c9-b593-d223f7449a82
2015-01-08 06:46:55 +00:00
Scott Taylor
59e6292c0e
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 .
git-svn-id: https://develop.svn.wordpress.org/trunk@31087 602fd350-edb4-49c9-b593-d223f7449a82
2015-01-08 06:25:40 +00:00
Scott Taylor
8108c0babe
PHP keywords and constants "true", "false", "null" should be in lower case - there was one lingering capitalized false
in _http_build_query()
.
...
See #30799 .
git-svn-id: https://develop.svn.wordpress.org/trunk@31086 602fd350-edb4-49c9-b593-d223f7449a82
2015-01-08 06:13:05 +00:00
Scott Taylor
14c2161a3b
There is no need to use the final
modifier inside a final
class. Everything in it is final
by default.
...
See #30799 .
git-svn-id: https://develop.svn.wordpress.org/trunk@31085 602fd350-edb4-49c9-b593-d223f7449a82
2015-01-08 06:09:59 +00:00
Scott Taylor
101e00314d
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 .
git-svn-id: https://develop.svn.wordpress.org/trunk@31083 602fd350-edb4-49c9-b593-d223f7449a82
2015-01-08 06:01:08 +00:00
wonderboymusic
1dd301f634
WP_Query->parse_tax_query()
- for BC, this method is not marked as protected. See [28987]. It needs an access modifier, it shall have public
. The comment remains.
...
See #30799 .
git-svn-id: https://develop.svn.wordpress.org/trunk@31081 602fd350-edb4-49c9-b593-d223f7449a82
2015-01-08 05:53:58 +00:00
Scott Taylor
5d6cc49628
Perl-style comments should not be used
...
See #30799 .
git-svn-id: https://develop.svn.wordpress.org/trunk@31079 602fd350-edb4-49c9-b593-d223f7449a82
2015-01-08 05:51:39 +00:00
Scott Taylor
97d6901048
Access Modifiers:
...
* In `WP_Plugin_Install_List_Table`, use `public` instead of `var`
* In `WP_User`, `->data` is accessed directly on an instance if the constructor receives it: make it `public`
* In `WP_Locale`, every property is exported to a global and is already `public` via `var`, half of the properties are accessed directly already, make them all `public`
* In `WP_Rewrite`, several properties are accessed publicly in functions via the `$wp_rewrite` global, make those props `public`.
* In `WP_Rewrite`, the property `->comment_feed_structure` was misspelled as `->comments_feed_structure`
See #30799 .
git-svn-id: https://develop.svn.wordpress.org/trunk@31078 602fd350-edb4-49c9-b593-d223f7449a82
2015-01-08 05:43:54 +00:00
Scott Taylor
469164785f
Pinking Shears.
...
See #30799 .
git-svn-id: https://develop.svn.wordpress.org/trunk@31077 602fd350-edb4-49c9-b593-d223f7449a82
2015-01-08 05:02:05 +00:00
Sergey Biryukov
621292d70f
In dashboard activity widget, display a front-end link if the user cannot edit the post.
...
props UaMV, DrewAPicture.
fixes #29025 .
git-svn-id: https://develop.svn.wordpress.org/trunk@31075 602fd350-edb4-49c9-b593-d223f7449a82
2015-01-08 00:25:26 +00:00
Sergey Biryukov
ca34257bd6
Call the init() method for the upgrader in wp_can_install_language_pack() to avoid undefined index notices.
...
props ocean90.
fixes #30827 for trunk.
git-svn-id: https://develop.svn.wordpress.org/trunk@31074 602fd350-edb4-49c9-b593-d223f7449a82
2015-01-07 23:42:48 +00:00
Sergey Biryukov
dd05a3a40f
TinyMCE: Remove dashicon-no-alt.png, unused since [30694].
...
props kpdesign, MattyRob.
fixes #30791 for trunk.
git-svn-id: https://develop.svn.wordpress.org/trunk@31073 602fd350-edb4-49c9-b593-d223f7449a82
2015-01-07 23:31:16 +00:00
Sergey Biryukov
37499b6169
Theme install: Display an appropriate string if theme has not been rated yet.
...
props kevdotbadger, valendesigns.
fixes #28147 .
git-svn-id: https://develop.svn.wordpress.org/trunk@31072 602fd350-edb4-49c9-b593-d223f7449a82
2015-01-07 23:16:19 +00:00
Sergey Biryukov
22c9a89602
Add context for 'Previous' and 'Next' strings in get_the_posts_pagination().
...
fixes #30762 for trunk.
git-svn-id: https://develop.svn.wordpress.org/trunk@31071 602fd350-edb4-49c9-b593-d223f7449a82
2015-01-07 23:06:20 +00:00
Andrew Ozz
3fdc11be29
Image file editor: fix a wrong error message when restoring an edited image and IMAGE_EDIT_OVERWRITE is set. Props tiqbiz, fixes #30167 .
...
git-svn-id: https://develop.svn.wordpress.org/trunk@31070 602fd350-edb4-49c9-b593-d223f7449a82
2015-01-07 22:47:32 +00:00
Sergey Biryukov
bac33e9a17
Customizer: Correctly display "Select" option in Navigation section dropdowns.
...
props kucrut.
fixes #30929 .
git-svn-id: https://develop.svn.wordpress.org/trunk@31069 602fd350-edb4-49c9-b593-d223f7449a82
2015-01-07 19:49:17 +00:00
Sergey Biryukov
c99a082e25
Dashicons: Fix typo in .dashicons-excerpt-view class.
...
props desrosj.
fixes #30832 .
git-svn-id: https://develop.svn.wordpress.org/trunk@31068 602fd350-edb4-49c9-b593-d223f7449a82
2015-01-07 09:01:58 +00:00
Sergey Biryukov
23bb9030f2
Remove obsolete help sentence on Edit User screen.
...
fixes #30750 .
git-svn-id: https://develop.svn.wordpress.org/trunk@31067 602fd350-edb4-49c9-b593-d223f7449a82
2015-01-07 08:22:13 +00:00
Sergey Biryukov
4fdc7c7a0b
Don't force newlines around URLs in WP_Embed::autoembed().
...
props chipx86, sgrant.
fixes #23776 .
git-svn-id: https://develop.svn.wordpress.org/trunk@31066 602fd350-edb4-49c9-b593-d223f7449a82
2015-01-07 07:50:58 +00:00
Sergey Biryukov
2fcd588983
Fix typo in a comment in slashing tests.
...
git-svn-id: https://develop.svn.wordpress.org/trunk@31065 602fd350-edb4-49c9-b593-d223f7449a82
2015-01-07 07:08:47 +00:00
Gary Pendergast
d3d11c704d
Options: When updating options, make sure the user isn't trying to insert characters that aren't supported by the database character set.
...
See #30361 .
git-svn-id: https://develop.svn.wordpress.org/trunk@31064 602fd350-edb4-49c9-b593-d223f7449a82
2015-01-07 04:14:32 +00:00
Drew Jaynes (DrewAPicture)
af680788bc
Add a description for the $data
parameter in the DocBlock for the customize_save_response
hook introduced in [31062].
...
Props westonruter.
Fixes #29098 .
git-svn-id: https://develop.svn.wordpress.org/trunk@31063 602fd350-edb4-49c9-b593-d223f7449a82
2015-01-07 01:47:17 +00:00
Dominik Schilling (ocean90)
8bf3003c67
Customizer: Send JSON success for customize_save
and allow response to be filtered.
...
props westonruter.
fixes #29098 .
git-svn-id: https://develop.svn.wordpress.org/trunk@31062 602fd350-edb4-49c9-b593-d223f7449a82
2015-01-06 21:46:54 +00:00
Dominik Schilling (ocean90)
afb8352a70
Autoprefixer for [31038].
...
see #30886 .
git-svn-id: https://develop.svn.wordpress.org/trunk@31061 602fd350-edb4-49c9-b593-d223f7449a82
2015-01-06 21:43:35 +00:00
Sergey Biryukov
76afa9f9a3
Remove space before comma in wp_notify_postauthor() and wp_notify_moderator().
...
see #30930 .
git-svn-id: https://develop.svn.wordpress.org/trunk@31060 602fd350-edb4-49c9-b593-d223f7449a82
2015-01-06 17:16:17 +00:00
Sergey Biryukov
ca4df7ec0a
Remove padding from the comment notification emails in wp_notify_moderator().
...
See [30015] for wp_notify_postauthor().
props pavelevap.
fixes #30930 .
git-svn-id: https://develop.svn.wordpress.org/trunk@31059 602fd350-edb4-49c9-b593-d223f7449a82
2015-01-06 17:09:13 +00:00
Sergey Biryukov
3274f5fee6
Skip building the query in wp_count_posts() if cached results are used.
...
props MikeHansenMe.
fixes #30928 .
git-svn-id: https://develop.svn.wordpress.org/trunk@31058 602fd350-edb4-49c9-b593-d223f7449a82
2015-01-06 16:57:12 +00:00
Sergey Biryukov
4b29e64a4d
Fix 'compare' parameter description in WP_Date_Query.
...
props dlh.
fixes #30925 .
git-svn-id: https://develop.svn.wordpress.org/trunk@31057 602fd350-edb4-49c9-b593-d223f7449a82
2015-01-06 03:35:56 +00:00
Sergey Biryukov
0d32524409
Remove obsolete inline comment.
...
props travisnorthcutt.
fixes #30924 .
git-svn-id: https://develop.svn.wordpress.org/trunk@31056 602fd350-edb4-49c9-b593-d223f7449a82
2015-01-06 01:56:07 +00:00
Sergey Biryukov
8e9b9bc458
Use localized format for Last Updated date on Add Plugins screen.
...
props tyxla.
fixes #30717 .
git-svn-id: https://develop.svn.wordpress.org/trunk@31055 602fd350-edb4-49c9-b593-d223f7449a82
2015-01-06 01:02:21 +00:00
Sergey Biryukov
d33e517bb9
Themes: Fix position of admin notice with .notice class.
...
fixes #30895 .
git-svn-id: https://develop.svn.wordpress.org/trunk@31054 602fd350-edb4-49c9-b593-d223f7449a82
2015-01-05 20:05:19 +00:00
Sergey Biryukov
7d7b33ff49
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 .
git-svn-id: https://develop.svn.wordpress.org/trunk@31053 602fd350-edb4-49c9-b593-d223f7449a82
2015-01-05 19:09:36 +00:00
Gary Pendergast
eb4d356e29
size_format()
incorrectly included a trailing space for B
values: less than 1024 bytes.
...
Also add a unit test to check for this, so we don't do it again.
Fixes #30908 .
Props tillkruess.
git-svn-id: https://develop.svn.wordpress.org/trunk@31052 602fd350-edb4-49c9-b593-d223f7449a82
2015-01-05 13:12:06 +00:00
Gary Pendergast
aada083f3c
WPDB: To ensure we're not asking MySQL to read data using queries that it can't handle, make sure that we run all read queries through the character set sanity checks.
...
See #21212 .
git-svn-id: https://develop.svn.wordpress.org/trunk@31051 602fd350-edb4-49c9-b593-d223f7449a82
2015-01-05 04:39:26 +00:00
Gary Pendergast
ea660736eb
WPDB Docs: Update the @since version from 4.1.0 to 4.2.0, for all the methods/members that were punted from 4.1.
...
See #21212 .
git-svn-id: https://develop.svn.wordpress.org/trunk@31050 602fd350-edb4-49c9-b593-d223f7449a82
2015-01-05 03:50:14 +00:00
Dion Hulse
8cce0f1607
Preinitialize WP_User::$data to an object in the event an empty user object is created. Avoids a "Creating default object from empty value" PHP Warning.
...
Fixes #28019
git-svn-id: https://develop.svn.wordpress.org/trunk@31049 602fd350-edb4-49c9-b593-d223f7449a82
2015-01-05 01:40:43 +00:00
Sergey Biryukov
44c0c4a9cd
A couple more tweaks to the post-thumbnail-template.php description.
...
see #30867 .
git-svn-id: https://develop.svn.wordpress.org/trunk@31048 602fd350-edb4-49c9-b593-d223f7449a82
2015-01-04 23:09:53 +00:00
Boone Gorges
969808e7bb
Add tests for the 'post_status' behavior of WP_Query
.
...
See #29167 .
git-svn-id: https://develop.svn.wordpress.org/trunk@31047 602fd350-edb4-49c9-b593-d223f7449a82
2015-01-04 20:35:12 +00:00
Boone Gorges
04eef529b0
Remove non-built-in post statuses during each unit test teardown.
...
See #29167 .
git-svn-id: https://develop.svn.wordpress.org/trunk@31046 602fd350-edb4-49c9-b593-d223f7449a82
2015-01-04 20:05:53 +00:00
Scott Taylor
2003fcae83
In Media Views, use this.listenTo( this.model, .... )
instead of this.model.on( .... )
to fix garbage collection and to avoid "ghost views."
...
Fixes #30896 .
git-svn-id: https://develop.svn.wordpress.org/trunk@31045 602fd350-edb4-49c9-b593-d223f7449a82
2015-01-04 05:24:24 +00:00
Scott Taylor
49d19a367a
ImageMagick expects TIFF files to have .tiff
as an extension, so the key in wp_get_mime_types()
should be 'tiff|tif'
not 'tif|tiff'
so the proper extension is returned in WP_Image_Editor->get_extension()
subclass invocations.
...
Fixes #30211 .
git-svn-id: https://develop.svn.wordpress.org/trunk@31044 602fd350-edb4-49c9-b593-d223f7449a82
2015-01-04 03:08:48 +00:00
Scott Taylor
14ddc6c9c0
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 .
git-svn-id: https://develop.svn.wordpress.org/trunk@31043 602fd350-edb4-49c9-b593-d223f7449a82
2015-01-04 02:51:20 +00:00
Scott Taylor
621e909a9b
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 .
git-svn-id: https://develop.svn.wordpress.org/trunk@31042 602fd350-edb4-49c9-b593-d223f7449a82
2015-01-04 02:31:29 +00:00
Scott Taylor
efc61d054e
After [31037], ensure that the library is passed as a map to the Media Grid instance. Remove useless query vars.
...
Fixes #30584 .
git-svn-id: https://develop.svn.wordpress.org/trunk@31041 602fd350-edb4-49c9-b593-d223f7449a82
2015-01-04 02:06:04 +00:00
Scott Taylor
3d3e1fb72a
Preserve alpha transparency when rotating a PNG while GD is the active image editor.
...
Adds unit tests.
Props frankpw, voldemortensen.
Fixes #30596 .
git-svn-id: https://develop.svn.wordpress.org/trunk@31040 602fd350-edb4-49c9-b593-d223f7449a82
2015-01-03 22:01:54 +00:00