Commit Graph

29973 Commits

Author SHA1 Message Date
Weston Ruter 489db97ea3 Customizer: Allow sections and panels to be exported to JS.
Also fix param docs for `customize_dynamic_setting_class` filter, and use `require_once` for `class-wp-customize-manager.php` in bootstrap function `_wp_customize_include()`.

See #30737, #32576.

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


git-svn-id: http://core.svn.wordpress.org/trunk@32715 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-06-12 22:54:25 +00:00
Weston Ruter 40ad21b58b Fix regressions from [32649] wrt Customizer `expanded` and `active` state changes for sections.
The `args.completeCallback` was not always called when `onChangeExpanded()` was called. And when a section became inactive (`active` state goes to `false`) and it was currently `expanded`, the Customizer panel would then becomes blank as the section was hidden; it needed to `collapse()` the section first before hiding the element.

See #31336.


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


git-svn-id: http://core.svn.wordpress.org/trunk@32714 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-06-12 22:28:25 +00:00
Scott Taylor c11e433858 After [32740], in `WP_Posts_List_Table::single_row()` - `$lock_holder` is checked but unused, so the call to `get_userdata()` is unnecessary.
See #29881.

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


git-svn-id: http://core.svn.wordpress.org/trunk@32713 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-06-12 20:48:26 +00:00
Scott Taylor c1c7a7c14c After [32740], correct doc block typo.
See #29881.

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


git-svn-id: http://core.svn.wordpress.org/trunk@32712 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-06-12 20:29:26 +00:00
Scott Taylor 3f4cadf4aa Override `->single_row_columns()` in `WP_Posts_List_Table`.
Break apart the giant `switch` statement in `->single_row()` into `column_{$column_name}` methods.
To maintain the `->single_row_columns( $item )` interface, add a property, `$current_level`, to allow access to `$level`.

This list table class is now easier to subclass.

Props joehoyle, wonderboymusic.
See #29881.

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


git-svn-id: http://core.svn.wordpress.org/trunk@32711 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-06-12 20:18:24 +00:00
Scott Taylor d0aa8e4a6e In `WP_Terms_List_Table::display_rows_or_placeholder()`:
* `get_terms()` can return `WP_Error`, so its return value should be checked before traversing.
* The 2nd call to `get_terms()` can be removed, it is redundant #OPTIMIZATION

See #32444.

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


git-svn-id: http://core.svn.wordpress.org/trunk@32710 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-06-12 18:55:25 +00:00
Scott Taylor da4c3d0fe4 In `WP_Posts_List_Table::single_row()`:
* `get_the_terms()` can return `WP_Error`, so its return value should be checked before traversing.
* Correct the `@param` doc blocks

See #32444.

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


git-svn-id: http://core.svn.wordpress.org/trunk@32709 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-06-12 18:50:25 +00:00
Scott Taylor 4835310a18 In `WP_Media_List_Table::display_rows()`, `get_the_terms()` can return `WP_Error`, so its return value should be checked before traversing.
See #32444.

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


git-svn-id: http://core.svn.wordpress.org/trunk@32708 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-06-12 18:45:25 +00:00
Scott Taylor f88b42be94 In `WP_Comments_List_Table::column_comment()`, `$post` and `$the_comment_status` are unused, as is the `$comment_status` global.
See #32444.

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


git-svn-id: http://core.svn.wordpress.org/trunk@32707 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-06-12 18:39:25 +00:00
Scott Taylor 55b3ec92f4 Fix some malformed doc blocks in `Custom_Image_Header`.
See #32444.

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


git-svn-id: http://core.svn.wordpress.org/trunk@32706 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-06-12 18:35:26 +00:00
Scott Taylor ab66fc95bc Fix some malformed doc blocks in `Custom_Background`.
See #32444.

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


git-svn-id: http://core.svn.wordpress.org/trunk@32705 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-06-12 18:25:25 +00:00
Scott Taylor f888767c73 `$status` shouldn't be loosely compared to `true` in `wp_xmlrpc_server::wp_deleteComment()`.
`$initial` shouldn't be loosely compared to `true` in `get_calendar()`.
`current_user_can()` shouldn't be loosely compared to `false` in `kses_init()`
`$get_all` shouldn't be loosely compared to `true` in `get_blog_details()`.
`is_array()` and `in_array()` shouldn't be loosely compared in `wpmu_validate_user_signup()`.
`$result` should by strictly compared in `check_ajax_referer()`.
`wp_verify_nonce()` should by strictly compared in `_show_post_preview()`.
`is_user_logged_in()` should not be loosly compared against `false` in `wp-signup.php`.

See #32444.

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


git-svn-id: http://core.svn.wordpress.org/trunk@32704 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-06-12 17:48:26 +00:00
Scott Taylor 740b92853d `WP_Customize_Setting::is_current_blog_previewed()` should only return `false`, not `false` or `void`. The one invocation of the method only loosely checks the return value.
See #32444.

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


git-svn-id: http://core.svn.wordpress.org/trunk@32703 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-06-12 17:29:26 +00:00
Scott Taylor 3b1e434c3b Add the proper access modifier to `_init_caps()` in `WP_User`. Add `__call()` for BC.
See #32444.

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


git-svn-id: http://core.svn.wordpress.org/trunk@32702 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-06-12 17:26:25 +00:00
Scott Taylor d2a00338f6 Don't loosely compare functions that return `bool` against a literal `bool`.
See #32444.

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


git-svn-id: http://core.svn.wordpress.org/trunk@32701 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-06-12 17:19:27 +00:00
Scott Taylor 107d5b088d `page_template` should be annotated as `@property`, not `@property-read` in `WP_Post`. The property is set on an instance in `wp_insert_post()`
Props morganestes.
Fixes #32515.

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


git-svn-id: http://core.svn.wordpress.org/trunk@32700 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-06-12 17:01:24 +00:00
Scott Taylor 05682bdaa8 After [32596] and [32597], ensure that `wp_scripts|styles()` is called to ensure an instance is created of `WP_Scripts|Styles()` before calling `->do_items()`.
See #32444.

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


git-svn-id: http://core.svn.wordpress.org/trunk@32699 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-06-12 16:54:24 +00:00
Boone Gorges 2459cbd20f Introduce `class` argument to `wp_dropdown_pages()`.
This new argument allows devs to specify the 'class' attribute of the select
element.

Props ramiy, voldemortensen.
Fixes #30082.
Built from https://develop.svn.wordpress.org/trunk@32727


git-svn-id: http://core.svn.wordpress.org/trunk@32698 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-06-12 13:05:27 +00:00
Dion Hulse a676eda395 Update Akismet external to 3.1.2 in trunk
git-svn-id: http://core.svn.wordpress.org/trunk@32697 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-06-12 08:39:02 +00:00
Dion Hulse c445d60a00 SSH2 Upgrade transport: Use ssh2_sftp_realpath() instead of shell commands to determine the current directory on the remote server. This should allow it to be used on chrooted SSH sessions.
See #32345

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


git-svn-id: http://core.svn.wordpress.org/trunk@32696 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-06-12 06:31:28 +00:00
Konstantin Obenland cb39d03501 Improve non-visual feedback for list table items without terms.
Props karpstrucking, afercia.
Fixes #32150.


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


git-svn-id: http://core.svn.wordpress.org/trunk@32695 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-06-11 09:28:31 +00:00
Helen Hou-Sandí c87224eaf6 List tables: Use a class instead of inline styles for hidden columns.
fixes #32608.

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


git-svn-id: http://core.svn.wordpress.org/trunk@32694 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-06-10 19:47:27 +00:00
Helen Hou-Sandí 06ebd0a2aa List tables:
Since the primary column is not going to be alterable for plugins and MS themes, we don't need to check in on it.

see #25408.

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


git-svn-id: http://core.svn.wordpress.org/trunk@32693 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-06-10 19:31:25 +00:00
Helen Hou-Sandí 51b5ed9fa4 List tables: Better primary column back-compat.
Why are people manually setting `$_column_headers` other than because somebody else told them to? Maybe time will tell.

props kovshenin.
see #25408.

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


git-svn-id: http://core.svn.wordpress.org/trunk@32692 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-06-10 14:59:30 +00:00
Helen Hou-Sandí 3562ac028d List tables: Consolidate `<td>` output for posts.
see #25408.

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


git-svn-id: http://core.svn.wordpress.org/trunk@32691 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-06-10 14:01:28 +00:00
Konstantin Obenland ce16fd8dca More semantic markup for the post formats metabox.
Screen readers will now introduce the group of radio buttons.
Also brings the meta box to parity with Press This.

Props joedolson, afercia.
Fixes #26160.


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


git-svn-id: http://core.svn.wordpress.org/trunk@32690 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-06-10 09:09:25 +00:00
Jeremy Felt 0e76a2c570 Additional improvement to sites list table display
* Build `$blogname` identically when creating action link messaging.
* Remove the trailing slash from URLs for a better UI.

See #32434.

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


git-svn-id: http://core.svn.wordpress.org/trunk@32689 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-06-10 07:28:26 +00:00
Jeremy Felt 93ff65e677 Improve information displayed in a network's sites list table
* Better support for arbitrary domain/path combinations by displaying the URL in the primary column rather than Path or Domain.
* Show a cached count of total users per site as a more useful data point rather than the first 5 users.
* Clear that cached count of users for a site when a user is added to the site via `add_user_to_blog()`.

Props @ocean90.
Fixes #32434.

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


git-svn-id: http://core.svn.wordpress.org/trunk@32688 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-06-10 06:50:25 +00:00
Helen Hou-Sandí 005d937ce2 List tables:
* Avoid notices in custom list tables that manually set `$_column_headers`. Any plugins using this for a specific purpose should update.
* Restore a special class name in the users list table.

props georgestephanis, stephdau.
see #25408.

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


git-svn-id: http://core.svn.wordpress.org/trunk@32687 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-06-10 01:46:27 +00:00
Konstantin Obenland bafb008be1 When inline editing a post, reset password field to be editable by default.
The Quick Edit form is cloned and then populated with post-specific data. If the 
previous post was private, the password field would continue to be disabled for
the next post.

Props afercia.
Fixes #32259.


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


git-svn-id: http://core.svn.wordpress.org/trunk@32686 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-06-09 22:02:27 +00:00
Aaron Jorbin 82e8acd70b Remove Truthy check from DO_NOT_UPGRADE_GLOBAL_TABLES
Some, but not all, of the checks for DO_NOT_UPGRADE_GLOBAL_TABLES just check if it is defined, so checking for truthiness could cause the issue to not be fully fixed.

In the words of Colonel Jessep: You can't handle the truth!

Introduced in [32714]

Fixes #32011


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


git-svn-id: http://core.svn.wordpress.org/trunk@32685 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-06-09 22:00:28 +00:00
Aaron Jorbin d1586725d1 Add error if a user attempts to install WordPress with DO_NOT_UPGRADE_GLOBAL_TABLES defined
The install process runs through migrations to global tables, therefore we cannot install WordPress with this constant defined. This error message prevents a false success screen from being seen.

Fixes #32011.
Props Oxymoron.


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


git-svn-id: http://core.svn.wordpress.org/trunk@32684 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-06-09 17:59:24 +00:00
Boone Gorges 5dfd6a02a7 Avoid returning duplicate matches when using a meta query in `WP_User_Query`.
A meta_query containing an `OR` relation can result in the same record matching
multiple clauses, leading to duplicate results. The previous prevention against
duplicates [18178] #17582 became unreliable in 4.1 when `WP_Meta_Query`
introduced support for nested clauses. The current changeset adds a new method
`WP_Meta_Query::has_or_relation()` for checking whether an `OR` relation
appears anywhere in the query, and uses the new method in `WP_User_Query` to
enforce distinct results as necessary.

Props maxxsnake.
Fixes #32592.
Built from https://develop.svn.wordpress.org/trunk@32713


git-svn-id: http://core.svn.wordpress.org/trunk@32683 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-06-09 17:42:28 +00:00
Dion Hulse 6657e42c7d WP_HTTP: ensure that the temporary file is created within the temporary directly when `stream` is specified without a `filename` parameter.
Fixes #32549

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


git-svn-id: http://core.svn.wordpress.org/trunk@32682 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-06-09 03:55:27 +00:00
Ella Iseulde Van Dorpe 00e4f35300 TinyMCE: wpviews: cache iframe heights
Cache iframe heights per instance so it can be reused. This will prevent to content from moving in the editor when undoing or redoing changes.

Fixes #32593.

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


git-svn-id: http://core.svn.wordpress.org/trunk@32681 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-06-08 21:32:27 +00:00
Ella Iseulde Van Dorpe e9ac7f5164 TinyMCE: views: fix typo in createInstance
This prevented instances from being reused.

Fixes #32591.

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


git-svn-id: http://core.svn.wordpress.org/trunk@32680 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-06-08 19:54:25 +00:00
Boone Gorges e8ad0ff400 Filter out empty object_types in `register_taxonomy_for_object_type()`.
This prevents weird edge bugs when registering an existing taxonomy with an
object type when the taxonomy was previously associated with no object types.

Fixes #32590.
Built from https://develop.svn.wordpress.org/trunk@32709


git-svn-id: http://core.svn.wordpress.org/trunk@32679 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-06-08 19:45:31 +00:00
Dominik Schilling 0549150843 Parse request: Quote regular expression characters in home path.
Adds unit tests.

props akirk.
fixes #30438.
Built from https://develop.svn.wordpress.org/trunk@32708


git-svn-id: http://core.svn.wordpress.org/trunk@32678 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-06-08 13:29:26 +00:00
Konstantin Obenland 6d56231da3 Sort screen options for meta boxes according to the meta box's priority.
Props swissspidy.
Fixes #32582.


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


git-svn-id: http://core.svn.wordpress.org/trunk@32677 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-06-08 12:35:26 +00:00
Ella Iseulde Van Dorpe ab1c4329b6 TinyMCE: wptextpattern: make tests ~2x faster
* Reuse the same instance for all tests in the module.
* Run without CSS (skin).
* Less typing.

See #31441.

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


git-svn-id: http://core.svn.wordpress.org/trunk@32676 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-06-07 22:16:24 +00:00
Ella Iseulde Van Dorpe c12af009c2 Editor: link modal: use link as fallback for text
If there is no link text provided, use the link as the text. This is better than silently failing.

Props bcole808.
Fixes #32323.

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


git-svn-id: http://core.svn.wordpress.org/trunk@32675 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-06-07 21:11:24 +00:00
Ella Iseulde Van Dorpe 8acda26129 Autoprefixer after autoprefixer-core 5.2 update
grunt-autoprefixer requires ^5.1.7, so this was automatically updated.

See #31700.

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


git-svn-id: http://core.svn.wordpress.org/trunk@32674 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-06-07 20:08:24 +00:00
Ella Iseulde Van Dorpe d74a115e21 TinyMCE: wptextpattern: add docs
Props DrewAPicture and iseulde.
See #31441.

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


git-svn-id: http://core.svn.wordpress.org/trunk@32673 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-06-07 20:00:28 +00:00
Sergey Biryukov c9dd28908a In `get_avatar()`, avoid a second `get_avatar_data()` call to get the 2x URL.
props ravinderk.
fixes #32572.
Built from https://develop.svn.wordpress.org/trunk@32702


git-svn-id: http://core.svn.wordpress.org/trunk@32672 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-06-07 14:58:26 +00:00
Ella Iseulde Van Dorpe cf31f32475 Customizer: hide controls on test page
Introduced in [30919].
See #32577 and #30701.

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


git-svn-id: http://core.svn.wordpress.org/trunk@32671 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-06-07 09:04:32 +00:00
Ella Iseulde Van Dorpe 6926314730 TinyMCE: wptextpattern: disable for IE 8 and lower
Props azaozz, iseulde.
See #31441.

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


git-svn-id: http://core.svn.wordpress.org/trunk@32670 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-06-06 22:38:28 +00:00
Ella Iseulde Van Dorpe 356fd0ff81 TinyMCE: add wptextpattern plugin
This plugin can automatically format text patterns as you type. It includes two patterns: unordered (`* ` and `- `) and ordered list (`1. ` and `1) `). If the transformation in unwanted, the user can undo the change by pressing backspace, using the undo shortcut, or the undo button in the toolbar.

This is the first TinyMCE plugin that has unit tests and there's some good groundwork for adding tests to existing plugins in the future.

First run. See #31441.

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


git-svn-id: http://core.svn.wordpress.org/trunk@32669 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-06-06 20:07:24 +00:00
Ella Iseulde Van Dorpe ff17bd95fe QUnit: test minified files
Fixes #32574.

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


git-svn-id: http://core.svn.wordpress.org/trunk@32668 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-06-06 19:58:24 +00:00
Ella Iseulde Van Dorpe 521de0130b Browserify after [32677]
See #30949.

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


git-svn-id: http://core.svn.wordpress.org/trunk@32667 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-06-06 19:50:29 +00:00
Sergey Biryukov 50369e1c98 Add `@since` for `check_password_reset_key()`, `reset_password()`, and `register_new_user()`.
see #20279.
Built from https://develop.svn.wordpress.org/trunk@32696


git-svn-id: http://core.svn.wordpress.org/trunk@32666 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-06-05 20:39:26 +00:00