Commit Graph

28621 Commits

Author SHA1 Message Date
Scott Taylor
d4c4205f31 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.


git-svn-id: https://develop.svn.wordpress.org/trunk@31130 602fd350-edb4-49c9-b593-d223f7449a82
2015-01-10 21:07:54 +00:00
Scott Taylor
0f54cc95b3 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.


git-svn-id: https://develop.svn.wordpress.org/trunk@31129 602fd350-edb4-49c9-b593-d223f7449a82
2015-01-10 20:43:12 +00:00
Scott Taylor
061daaa7ee Declare $action as a global in wp-admin/comment.php.
See #30799.


git-svn-id: https://develop.svn.wordpress.org/trunk@31128 602fd350-edb4-49c9-b593-d223f7449a82
2015-01-10 20:41:04 +00:00
Scott Taylor
979ba60a57 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.


git-svn-id: https://develop.svn.wordpress.org/trunk@31127 602fd350-edb4-49c9-b593-d223f7449a82
2015-01-10 06:56:51 +00:00
Scott Taylor
349e5cb318 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.


git-svn-id: https://develop.svn.wordpress.org/trunk@31126 602fd350-edb4-49c9-b593-d223f7449a82
2015-01-10 06:53:48 +00:00
Scott Taylor
cb85e15f06 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.


git-svn-id: https://develop.svn.wordpress.org/trunk@31125 602fd350-edb4-49c9-b593-d223f7449a82
2015-01-10 06:12:25 +00:00
Scott Taylor
bc723548a7 Declare $wp_version, $required_php_version, and $required_mysql_version as globals in install and upgrade admin files.
See #30799.


git-svn-id: https://develop.svn.wordpress.org/trunk@31124 602fd350-edb4-49c9-b593-d223f7449a82
2015-01-10 05:56:45 +00:00
Scott Taylor
38e18d800c In wp-admin/includes/revision.php, $post->modified is a coding error. It should be $post->post_modified.
See #30799.


git-svn-id: https://develop.svn.wordpress.org/trunk@31123 602fd350-edb4-49c9-b593-d223f7449a82
2015-01-10 05:49:24 +00:00
Scott Taylor
164b4f21c9 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.


git-svn-id: https://develop.svn.wordpress.org/trunk@31122 602fd350-edb4-49c9-b593-d223f7449a82
2015-01-10 05:41:05 +00:00
Scott Taylor
77cffd8edf 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.


git-svn-id: https://develop.svn.wordpress.org/trunk@31121 602fd350-edb4-49c9-b593-d223f7449a82
2015-01-10 05:28:46 +00:00
Scott Taylor
c3bd2252f5 Use PHP_SAPI constant instead of php_sapi_name() in iis7_supports_permalinks(), wp_fix_server_vars(), and wp_redirect().
See #30799.


git-svn-id: https://develop.svn.wordpress.org/trunk@31120 602fd350-edb4-49c9-b593-d223f7449a82
2015-01-10 04:58:49 +00:00
Scott Taylor
44a3c002f5 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.


git-svn-id: https://develop.svn.wordpress.org/trunk@31119 602fd350-edb4-49c9-b593-d223f7449a82
2015-01-10 04:54:13 +00:00
Andrew Ozz
23d6e28390 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.
git-svn-id: https://develop.svn.wordpress.org/trunk@31118 602fd350-edb4-49c9-b593-d223f7449a82
2015-01-10 01:32:00 +00:00
Andrew Ozz
47cfdb5ced Media modal: do not attempt to focus the hidden file input field added by Plupload when tabbing. Props afercia, fixes #30392.
git-svn-id: https://develop.svn.wordpress.org/trunk@31117 602fd350-edb4-49c9-b593-d223f7449a82
2015-01-09 21:46:03 +00:00
Scott Taylor
b3322a9604 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.


git-svn-id: https://develop.svn.wordpress.org/trunk@31116 602fd350-edb4-49c9-b593-d223f7449a82
2015-01-09 21:06:13 +00:00
Scott Taylor
38f87e7c56 After [31016], would be cool if we actually included the froogaloop file to interact with Vimeo.
Props dimadin.
Fixes #29267.


git-svn-id: https://develop.svn.wordpress.org/trunk@31115 602fd350-edb4-49c9-b593-d223f7449a82
2015-01-09 20:03:58 +00:00
Boone Gorges
d5c9eb41d7 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.

git-svn-id: https://develop.svn.wordpress.org/trunk@31114 602fd350-edb4-49c9-b593-d223f7449a82
2015-01-09 16:39:56 +00:00
Sergey Biryukov
68191cc15c Add variable type for sync_category_tag_slugs() parameters.
props tillkruess.
fixes #30718.

git-svn-id: https://develop.svn.wordpress.org/trunk@31113 602fd350-edb4-49c9-b593-d223f7449a82
2015-01-09 11:18:22 +00:00
Sergey Biryukov
1710690c99 Avoid a PHP notice in _WP_Editors::wp_fullscreen_html() when no $post global is set.
props marcochiesi.
fixes #30071.

git-svn-id: https://develop.svn.wordpress.org/trunk@31112 602fd350-edb4-49c9-b593-d223f7449a82
2015-01-09 10:27:05 +00:00
Sergey Biryukov
1e5ed7fdfd Toolbar: Make network admin accessible via keyboard.
props Cheffheid.
fixes #29422.

git-svn-id: https://develop.svn.wordpress.org/trunk@31111 602fd350-edb4-49c9-b593-d223f7449a82
2015-01-09 09:50:39 +00:00
Sergey Biryukov
1c88f482bf Use localized format for Last Updated date in plugin details modal, for consistency with [31055].
see #30717.

git-svn-id: https://develop.svn.wordpress.org/trunk@31110 602fd350-edb4-49c9-b593-d223f7449a82
2015-01-09 06:20:08 +00:00
Sergey Biryukov
b641ca55f5 Improve documentation for media_handle_upload().
props ericlewis.
fixes #30962.

git-svn-id: https://develop.svn.wordpress.org/trunk@31109 602fd350-edb4-49c9-b593-d223f7449a82
2015-01-09 05:04:59 +00:00
Sergey Biryukov
c8f0a49dee Correct @return value for WP_Theme::load_textdomain() after [30681].
see #30224.

git-svn-id: https://develop.svn.wordpress.org/trunk@31108 602fd350-edb4-49c9-b593-d223f7449a82
2015-01-09 04:53:29 +00:00
Gary Pendergast
dec1cba410 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



git-svn-id: https://develop.svn.wordpress.org/trunk@31107 602fd350-edb4-49c9-b593-d223f7449a82
2015-01-09 04:42:48 +00:00
Scott Taylor
0c37f866f2 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.


git-svn-id: https://develop.svn.wordpress.org/trunk@31106 602fd350-edb4-49c9-b593-d223f7449a82
2015-01-08 22:51:30 +00:00
Scott Taylor
c4e2ad04a2 Properly declare $hook_suffix, $plugin_page, $typenow, and $taxnow as globals in wp-admin/admin.php.
Fixes #30958.


git-svn-id: https://develop.svn.wordpress.org/trunk@31105 602fd350-edb4-49c9-b593-d223f7449a82
2015-01-08 22:14:58 +00:00
Sergey Biryukov
9d67bfe82d 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.

git-svn-id: https://develop.svn.wordpress.org/trunk@31104 602fd350-edb4-49c9-b593-d223f7449a82
2015-01-08 21:59:57 +00:00
Sergey Biryukov
c96947757a Remove a redundant inline comment with a typo.
props nicnicnicdevos.
fixes #30956.

git-svn-id: https://develop.svn.wordpress.org/trunk@31103 602fd350-edb4-49c9-b593-d223f7449a82
2015-01-08 21:28:11 +00:00
Sergey Biryukov
6ffb5feab9 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.

git-svn-id: https://develop.svn.wordpress.org/trunk@31102 602fd350-edb4-49c9-b593-d223f7449a82
2015-01-08 21:23:21 +00:00
Scott Taylor
85595b73cc Overriding methods should do more than simply call the same method in the super class.
See #30799.


git-svn-id: https://develop.svn.wordpress.org/trunk@31101 602fd350-edb4-49c9-b593-d223f7449a82
2015-01-08 21:19:24 +00:00
Scott Taylor
0522fcb3f9 Jump statements should not be followed by other statements (there were 5 lingering).
See #30799.


git-svn-id: https://develop.svn.wordpress.org/trunk@31100 602fd350-edb4-49c9-b593-d223f7449a82
2015-01-08 21:14:56 +00:00
Scott Taylor
da9057fd6d Use && instead of and in the 3 places where and was used.
See #30799.


git-svn-id: https://develop.svn.wordpress.org/trunk@31099 602fd350-edb4-49c9-b593-d223f7449a82
2015-01-08 21:11:46 +00:00
Sergey Biryukov
907be55276 Pass post type to count_user_posts() in get_the_author_posts().
props Caspie, tyxla.
fixes #30904.

git-svn-id: https://develop.svn.wordpress.org/trunk@31098 602fd350-edb4-49c9-b593-d223f7449a82
2015-01-08 19:52:52 +00:00
Sergey Biryukov
d5b99d560e Use home_url() instead of hardcoded domain in Tests_Link_GetAdjacentPostLink.
props CalEvans.
fixes #30955.

git-svn-id: https://develop.svn.wordpress.org/trunk@31097 602fd350-edb4-49c9-b593-d223f7449a82
2015-01-08 18:44:18 +00:00
Sergey Biryukov
386d0d5fc7 Remove non-functional date filter from Edit Selection view in media modal.
props tyxla.
fixes #30931.

git-svn-id: https://develop.svn.wordpress.org/trunk@31096 602fd350-edb4-49c9-b593-d223f7449a82
2015-01-08 18:22:35 +00:00
Helen Hou-Sandi
854ea3e3e6 Collapse additional avatar settings if avatars are disabled.
props markjaquith, krogsgard, valendesigns.
 fixes #30168.


git-svn-id: https://develop.svn.wordpress.org/trunk@31095 602fd350-edb4-49c9-b593-d223f7449a82
2015-01-08 17:00:15 +00:00
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