Commit Graph

33344 Commits

Author SHA1 Message Date
Sergey Biryukov 836ea13929 Docs: Correct return value for `is_allowed_http_origin()`.
Props kraftbj.
Fixes #35607.

git-svn-id: https://develop.svn.wordpress.org/trunk@36398 602fd350-edb4-49c9-b593-d223f7449a82
2016-01-26 00:38:17 +00:00
Eric Andrew Lewis 63afb0dcc8 Plugins: Clarify that mu-plugins can't be "active" in docs.
Plugins installed in the plugins/ folder can be activated by users. This puts the plugin in an "active" state. Plugins in the mu-folder/ are "must-use" plugins that are always loaded. They can't be activated, and thereby can't be "active." Because of this, using the `is_plugin_active()` or `is_plugin_active_for_network()` returns false when checking for these plugins. This clarifies that behavior in the functions' docs.


git-svn-id: https://develop.svn.wordpress.org/trunk@36397 602fd350-edb4-49c9-b593-d223f7449a82
2016-01-26 00:31:08 +00:00
Andrea Fercia d43a7a9f06 Accessibility: Improve the color contrast ratio replacing the residual occurrences of the `#777` gray.
Uses the existing `#72777c` on white backgrounds and the new `#555d66` "dark medium gray" on darker backgrounds.

Fixes #35605.

git-svn-id: https://develop.svn.wordpress.org/trunk@36396 602fd350-edb4-49c9-b593-d223f7449a82
2016-01-26 00:03:34 +00:00
Andrea Fercia fd5743761a Accessibility: Fix the color contrast ratio in the login screen.
Props scarinessreported for the initial patch.
Fixes #31548.

git-svn-id: https://develop.svn.wordpress.org/trunk@36395 602fd350-edb4-49c9-b593-d223f7449a82
2016-01-25 23:51:15 +00:00
Konstantin Obenland ddfbfce2e6 Pass data consistently on plugin, network plugin, and network theme screens.
List tables on these three screens look similar but come with unexpected caveats.
The network themes screen in particular has been neglected, using a `.plugin`
class to inherit its sibling's styles and not providing classes and data
attributes that the other two offer. This will provide some more consistency.

Fixes #35335.



git-svn-id: https://develop.svn.wordpress.org/trunk@36394 602fd350-edb4-49c9-b593-d223f7449a82
2016-01-25 22:54:52 +00:00
Jeremy Felt e497698613 Multisite: Introduce the WP_Site class.
* A `WP_Site` object initially matches a row from `wp_blogs`.
* A site can be retrieved by its ID through `WP_Site::get_instance()`.
* Adds `sites` to the global cache group and captures instance lookups.
* The multisite bootstrap now ensures `$current_blog` is an instance of `WP_Site`.

Props johnjamesjacoby, jeremyfelt.
See #32450.


git-svn-id: https://develop.svn.wordpress.org/trunk@36393 602fd350-edb4-49c9-b593-d223f7449a82
2016-01-25 21:51:01 +00:00
Dominik Schilling (ocean90) 494e4ee146 Docs: Fix indentation in `add_filter()` example.
See #32246.

git-svn-id: https://develop.svn.wordpress.org/trunk@36392 602fd350-edb4-49c9-b593-d223f7449a82
2016-01-25 18:57:43 +00:00
Drew Jaynes 2960ad4cbd Docs: Fix parameter documentation ordering in the hook docs for the `register_taxonomy_args` filter.
See #32246.


git-svn-id: https://develop.svn.wordpress.org/trunk@36391 602fd350-edb4-49c9-b593-d223f7449a82
2016-01-25 17:10:57 +00:00
Peter Westwood 3c88ac14ee i18n tools: Add the text domain to translate_nooped_plural() calls as well.
Fixes #34126 props jrf.


git-svn-id: https://develop.svn.wordpress.org/trunk@36390 602fd350-edb4-49c9-b593-d223f7449a82
2016-01-24 15:28:40 +00:00
Peter Westwood 1e1ac57375 i18n tools: Add a test for the add-textdomain.php script.
git-svn-id: https://develop.svn.wordpress.org/trunk@36389 602fd350-edb4-49c9-b593-d223f7449a82
2016-01-24 15:25:11 +00:00
Weston Ruter b07466c2bf Customizer: Use "(Untitled)" as site title if `blogname` is empty.
Fixes a layout issue in the Customizer UI. Also de-duplicate title display logic, outputting "Loading..." as site title in PHP with actual title being set upon Customizer `ready`. Also update the site title in response to a `blogname` setting change as opposed to `input` DOM events on the control.

Fixes #35579.


git-svn-id: https://develop.svn.wordpress.org/trunk@36388 602fd350-edb4-49c9-b593-d223f7449a82
2016-01-23 23:14:10 +00:00
Boone Gorges e1b5d2d2bf In comments list table, `$post_id` should default to `false` rather than 0.
After [36381], the default value of `0` was causing the list table at
edit-comments.php to be empty. `false` prevents this.

This fix is likely temporary, while more research is done into the backward
compatibility concerns tied to [36381].

See #35090.

git-svn-id: https://develop.svn.wordpress.org/trunk@36387 602fd350-edb4-49c9-b593-d223f7449a82
2016-01-23 22:15:19 +00:00
Eric Andrew Lewis 41406e3c6e Networks and sites: Replace "blog" usage with "site" in docs.
This effort focuses on `src/wp-includes/link-template.php`.

Multisite functions use the term "blog" to refer to what we now call a "site," e.g. `get_current_blog_id()`. These functions are here to stay because of our commitment to backwards compatibility. What we can do is set the documentation straight.

Props mrahmadawais.
Fixes #35589.


git-svn-id: https://develop.svn.wordpress.org/trunk@36386 602fd350-edb4-49c9-b593-d223f7449a82
2016-01-23 16:46:31 +00:00
Sergey Biryukov 5d56b9a465 Docs: Correct `wpdb::db_version()` description.
Props luciole135.
Fixes #35588.

git-svn-id: https://develop.svn.wordpress.org/trunk@36385 602fd350-edb4-49c9-b593-d223f7449a82
2016-01-23 11:21:14 +00:00
Ella Iseulde Van Dorpe b780792d87 TinyMCE: add inline link dialog
First run.
Links the advanced button to the "old" dialog for now.

See #33301.


git-svn-id: https://develop.svn.wordpress.org/trunk@36384 602fd350-edb4-49c9-b593-d223f7449a82
2016-01-23 00:07:29 +00:00
Weston Ruter 0e46055d5b Customizer: Add shift-click on nav menu items in preview to focus on corresponding nav menu item controls in pane.
Add missing `params.completeCallback` to `MenuItemControl.focus()` for parity with `Control.focus()`. Also adds `params` to `MenuItemControl.expandForm`, `MenuItemControl.collapseForm()`, and `MenuItemControl.toggleForm()`.

Props MattGeri, westonruter.
Fixes #32681.


git-svn-id: https://develop.svn.wordpress.org/trunk@36383 602fd350-edb4-49c9-b593-d223f7449a82
2016-01-22 21:20:26 +00:00
Drew Jaynes 535d080317 Docs: List out possible values for the `$show` parameter in the description for `get_bloginfo()`.
Fixes #35581.


git-svn-id: https://develop.svn.wordpress.org/trunk@36382 602fd350-edb4-49c9-b593-d223f7449a82
2016-01-22 20:21:40 +00:00
Boone Gorges dbac8968ed Allow comment query results to be limited to comments with comment_post_ID = 0.
Previously, this was not possible due to an overly broad `empty()` check.

Passing `null`, `false`, or `''` to 'post_id', or omitting 'post_id'
altogether, will continue to return comments regardless of `comment_post_ID`,
as before. Passing `0` or `'0'` will limit results to comments with no
associated post.

Props danielbachhuber.
Fixes #35090.

git-svn-id: https://develop.svn.wordpress.org/trunk@36381 602fd350-edb4-49c9-b593-d223f7449a82
2016-01-22 20:19:49 +00:00
Drew Jaynes ad00ffffe4 Docs: Improve documentation for `bloginfo()` including cross-reference info for the `$show` parameter passed through to `get_bloginfo()`.
See #35581.


git-svn-id: https://develop.svn.wordpress.org/trunk@36380 602fd350-edb4-49c9-b593-d223f7449a82
2016-01-22 20:16:11 +00:00
Andrea Fercia e23986bdb3 Accessibility: Remove title attributes from the Menus screen.
Also, adds missing labels and improves the existing ones. 
Updates the "custom links" labels and inputs in the Customizer too.
Introduces a generic, reusable, `.wp-initial-focus` CSS class to be used for
the sole purpose of setting the initial focus.
"Quick Search": uniform the attached events and avoids new AJAX requests to
be triggered when the pressed key doesn't change the searched term.

Fixes #35374.

git-svn-id: https://develop.svn.wordpress.org/trunk@36379 602fd350-edb4-49c9-b593-d223f7449a82
2016-01-22 14:25:58 +00:00
Sergey Biryukov 3fe805cf99 Docs: Remove redundant PHP tags from `get_object_taxonomies()` description.
Props dotancohen.
Fixes #35553.

git-svn-id: https://develop.svn.wordpress.org/trunk@36377 602fd350-edb4-49c9-b593-d223f7449a82
2016-01-22 02:40:10 +00:00
Andrew Ozz 10c8930278 TinyMCE: remove the `srcset` and `sizes` attributes (if any) after replacing or editing an image.
See #35434.

git-svn-id: https://develop.svn.wordpress.org/trunk@36376 602fd350-edb4-49c9-b593-d223f7449a82
2016-01-22 01:18:30 +00:00
Andrea Fercia 710f2593cc Quick/Bulk Edit: Remove a no more used jQuery loop for unsupported post formats.
See #23426.
See #24096.
Fixes #35564.

git-svn-id: https://develop.svn.wordpress.org/trunk@36375 602fd350-edb4-49c9-b593-d223f7449a82
2016-01-21 22:49:43 +00:00
Weston Ruter a2637cf34d Customizer: Hide help toggle button in panel when no description is supplied.
This aligns with the `.customize-panel-description` element which is also excluded if there is no description.

Props drebbits.web.
Fixes #35540.


git-svn-id: https://develop.svn.wordpress.org/trunk@36374 602fd350-edb4-49c9-b593-d223f7449a82
2016-01-21 22:00:42 +00:00
Sergey Biryukov ac704e838c Media: In `_wp_handle_upload()`, move ending brace to a new line.
Props georgestephanis.
Fixes #35565.

git-svn-id: https://develop.svn.wordpress.org/trunk@36373 602fd350-edb4-49c9-b593-d223f7449a82
2016-01-21 20:26:06 +00:00
Sergey Biryukov 497b64a300 Unit Tests: Correct comment in `wp-tests-config-sample.php`.
Props tahteche.
Fixes #35563.

git-svn-id: https://develop.svn.wordpress.org/trunk@36372 602fd350-edb4-49c9-b593-d223f7449a82
2016-01-21 20:24:12 +00:00
Weston Ruter 5600ca6bf4 Customizer: Fix `click.preview` event handler for jump links and shift+clicks in preview.
* Prevent following jump links (starting with `#`), but instead scroll that element into view.
* Prevent following links clicked in the Customizer if shift key is pressed when clicking; this fixes an issue when trying to shift-click on a widget or nav menu item (#32681) to just focus on the control in the Customizer.

Fixes #26005.


git-svn-id: https://develop.svn.wordpress.org/trunk@36371 602fd350-edb4-49c9-b593-d223f7449a82
2016-01-21 06:07:45 +00:00
Dion Hulse 51aee5ab1b Upgrade: Switch the locking mechanism to using static methods so that it can be accessed from other upgrade-classes.
Fixes #34878


git-svn-id: https://develop.svn.wordpress.org/trunk@36370 602fd350-edb4-49c9-b593-d223f7449a82
2016-01-21 01:21:52 +00:00
Dominik Schilling (ocean90) 58082f28e6 Widgets: Show the "Clear Inactive Widgets" button only after the sidebar with inactive widgets.
Fixes #35447.

git-svn-id: https://develop.svn.wordpress.org/trunk@36368 602fd350-edb4-49c9-b593-d223f7449a82
2016-01-20 21:54:01 +00:00
Drew Jaynes 832197c6e6 Docs: Update the `@access` tag value for `WP_Http::_get_first_available_transport()` from `private` to `public`.
When the method was introduced in [17914], the name was underscore-prefixed as is core style for private-use, though it was also introduced with a `public` access modifier for the declaration. Due to core's committment to backward-compatibility, the access modifier overrules in this case, meaning that while the method is underscore-prefixed and was originally-intentioned to be private, it is and always will be a public method, and the documentation should reflect that.

Props Frozzare.
Fixes #35289.


git-svn-id: https://develop.svn.wordpress.org/trunk@36367 602fd350-edb4-49c9-b593-d223f7449a82
2016-01-20 18:45:04 +00:00
Jeremy Felt 77f8c5fc07 Themes: Enhance filtering options for allowed themes on a network.
* Move the legacy `allowed_themes` filter to `WP_Theme::get_allowed_on_network()`, where it will continue to filter themes allowed on the network.
* Add `network_allowed_themes` filter to `WP_Theme::get_allowed()` and pass `$blog_id` to provide context.
* Add `site_allowed_themes` filter to `WP_Theme::get_allowed_on_site()` and pass `$blog_id` to provide context.

Props pauldewouters, lamosty, michalzuber, dmsnell, johnnypea, rob.
Fixes #28436.


git-svn-id: https://develop.svn.wordpress.org/trunk@36366 602fd350-edb4-49c9-b593-d223f7449a82
2016-01-20 18:28:33 +00:00
Drew Jaynes 8ae1899929 Docs: Add missing `@access` tags to DocBlocks for `WP` class methods and properties.
See #32246.


git-svn-id: https://develop.svn.wordpress.org/trunk@36365 602fd350-edb4-49c9-b593-d223f7449a82
2016-01-20 18:18:53 +00:00
Scott Taylor 2ed7c6d857 Media: When reusing the initial values from the global MediaElement config object, the config object should first be cloned. Objects in JS are references that will retain any changes. This fixes an issue where player controls could get mixed up between instances when multiple players (namely, single audio and audio playlists, in a certain order) are on the same page.
Props Fab1en.
Fixes #34152.


git-svn-id: https://develop.svn.wordpress.org/trunk@36364 602fd350-edb4-49c9-b593-d223f7449a82
2016-01-20 15:46:59 +00:00
Dion Hulse 65267f09fb Emoji: Work around a `mod_security` rule which prevents pages with 4 or more instances of `String.fromCharCode(` from being served.
Fixes #35412 for trunk.


git-svn-id: https://develop.svn.wordpress.org/trunk@36359 602fd350-edb4-49c9-b593-d223f7449a82
2016-01-20 07:39:47 +00:00
Andrew Ozz 1d82f671a3 TinyMCE: update to 4.3.3. Update the QUnit tests and revert back to testing the non-minified files in /src.
Fixes #35539.

git-svn-id: https://develop.svn.wordpress.org/trunk@36352 602fd350-edb4-49c9-b593-d223f7449a82
2016-01-20 04:17:22 +00:00
Dion Hulse 078b93863d Build Tools: Revert to using a human readable timestamp rather than the unix timestamp in [36315].
Fixes #28722


git-svn-id: https://develop.svn.wordpress.org/trunk@36351 602fd350-edb4-49c9-b593-d223f7449a82
2016-01-20 02:01:57 +00:00
Jeremy Felt 18d9640a5a Themes: Add initial tests for the `allowed_themes` filter.
We'll be adjusting the placement of this filter and adding two other related filters, so we should make sure it continues to work as expected after the change.

See #28436.


git-svn-id: https://develop.svn.wordpress.org/trunk@36350 602fd350-edb4-49c9-b593-d223f7449a82
2016-01-19 23:57:46 +00:00
Dion Hulse b9e62671f6 Core Upgrader: Add a locking mechanism to avoid two concurrent updates of WordPress occuring.
Fixes #34878


git-svn-id: https://develop.svn.wordpress.org/trunk@36349 602fd350-edb4-49c9-b593-d223f7449a82
2016-01-19 05:06:46 +00:00
Boone Gorges 5eee5cfc3c Don't double-escape the 'name' param in `get_terms()`.
[32353] changed the way the 'name' param in `get_terms()` is sanitized, by
running it through `sanitize_term_field( 'name' )` before performing the SQL
query. An unintentional side effect of this change was that the string is
double-escaped: once by `wp_filter_kses()`, and once by `esc_sql()`. The
double-escaping was causing 'name' queries to fail when the param contained
apostrophes or other escaped characters.

Fixes #35493.

git-svn-id: https://develop.svn.wordpress.org/trunk@36348 602fd350-edb4-49c9-b593-d223f7449a82
2016-01-19 04:09:32 +00:00
Eric Andrew Lewis d36d6cc630 Build/Test Tools: Move PHP factory classes into their own files.
This makes the code easier to browse.

`factory.php` loads the new files, so this is backwards compatible in case `factory.php` is loaded directly for access to one of the classes.

See #35492.


git-svn-id: https://develop.svn.wordpress.org/trunk@36347 602fd350-edb4-49c9-b593-d223f7449a82
2016-01-19 03:55:19 +00:00
Boone Gorges 7ae3adfb80 Share post fixture in `WP_Comment_Query` tests.
See #30017.

git-svn-id: https://develop.svn.wordpress.org/trunk@36346 602fd350-edb4-49c9-b593-d223f7449a82
2016-01-19 03:02:42 +00:00
Boone Gorges 1b8e03bd89 Ignore false values of 'search' in `WP_Comment_Query`.
Props danielbachhuber.
Fixes #35513.

git-svn-id: https://develop.svn.wordpress.org/trunk@36345 602fd350-edb4-49c9-b593-d223f7449a82
2016-01-19 02:54:28 +00:00
Eric Andrew Lewis 43da0d3894 Themes: Show template loading error to users with `switch_themes` cap.
In [36338], a template loading error was shown only to users with the `install_themes` capability. This is now displayed users with the `switch_themes` capability, as users with this cap can at least switch to a different theme. Also, this will now show for site administrators in multisite, whereas `install_themes` is limited to superadmins.

Props dd32.
See #21931.


git-svn-id: https://develop.svn.wordpress.org/trunk@36344 602fd350-edb4-49c9-b593-d223f7449a82
2016-01-18 19:56:54 +00:00
Rachel Baker 7c6d2b0d61 Comments: Remove unused `$default_comments_page` variable in `get_comment_link()`.
Left in r34735, fetches the `default_comments_page` option twice since this variable is unused. 

See #34073 and #35511.

Props Latz.

git-svn-id: https://develop.svn.wordpress.org/trunk@36343 602fd350-edb4-49c9-b593-d223f7449a82
2016-01-18 16:34:54 +00:00
Dion Hulse 1dbc5b2918 CSS: Reference the original location of the CSS rule being overridden.
See #35229


git-svn-id: https://develop.svn.wordpress.org/trunk@36342 602fd350-edb4-49c9-b593-d223f7449a82
2016-01-18 09:58:21 +00:00
Dion Hulse 834ba4367f CSS: Stop using `wp-admin.min.css` and instead queue the individual stylesheets up through `load-styles.php`.
We still generate the `wp-admin.*` files for compabitility purposes, however they only include the `@import()` lines.

Fixes #35229


git-svn-id: https://develop.svn.wordpress.org/trunk@36341 602fd350-edb4-49c9-b593-d223f7449a82
2016-01-18 09:56:06 +00:00
Jeremy Felt e62a20e5b6 Docs: Fix type documentation for `WP_Network` properties.
* `$cookie_domain` was incorrectly documented as an `int`.
* `$id` and `$blog_id`, though numeric, are provided as strings and should be documented as such.

Fixes #35404.


git-svn-id: https://develop.svn.wordpress.org/trunk@36340 602fd350-edb4-49c9-b593-d223f7449a82
2016-01-18 02:58:22 +00:00
Rachel Baker 2da13dda2e List Tables: Use the $GLOBALS array when unsetting the global post and comment in `WP_Comments_List_Table::single_row()`.
In r35674 only the local variables were unset, when using `unset()` with a global variable the `$GLOBALS` array must be used.


Fixes #35506.


git-svn-id: https://develop.svn.wordpress.org/trunk@36339 602fd350-edb4-49c9-b593-d223f7449a82
2016-01-18 02:49:40 +00:00
Eric Andrew Lewis 7c6c3a081f Themes: Only users with proper capability should see theme errors.
After [36335], if a template file is not loaded, an error is displayed
to logged-in users. As logged-in users may have no capabilities,
this check is insubstantial. Limit the display of this error to users
with the `install_themes` capability, i.e. someone who has the capacity
to deal with the error.

See #21931.


git-svn-id: https://develop.svn.wordpress.org/trunk@36338 602fd350-edb4-49c9-b593-d223f7449a82
2016-01-17 23:58:04 +00:00
Ella Iseulde Van Dorpe 342d132b37 Fix unit tests after [36336]
git-svn-id: https://develop.svn.wordpress.org/trunk@36337 602fd350-edb4-49c9-b593-d223f7449a82
2016-01-17 23:37:51 +00:00