Commit Graph

30072 Commits

Author SHA1 Message Date
Dominik Schilling (ocean90)
5202111c6a Toolbar: Remove a duplicate CSS selector.
props deconf.
fixes #32634.

git-svn-id: https://develop.svn.wordpress.org/trunk@32750 602fd350-edb4-49c9-b593-d223f7449a82
2015-06-13 14:53:59 +00:00
Scott Taylor
9629b5413d In WP_Posts_List_Table::column_title(), use is_post_type_hierarchical() instead of $this->hierarchical_display in the logic to determine whether the_excerpt() should be called.
Fixes #32187.


git-svn-id: https://develop.svn.wordpress.org/trunk@32749 602fd350-edb4-49c9-b593-d223f7449a82
2015-06-13 14:41:15 +00:00
Dominik Schilling (ocean90)
1e9781a945 Nav menus: Apply the wp_get_nav_menu_items filter also on an empty list of menu items.
props westonruter.
fixes #32631.

git-svn-id: https://develop.svn.wordpress.org/trunk@32748 602fd350-edb4-49c9-b593-d223f7449a82
2015-06-13 14:37:25 +00:00
Scott Taylor
93e01e68b5 Add an abort class method to the Promise instance returned by wp.ajax.send().
Props westonruter.
Fixes #32628.


git-svn-id: https://develop.svn.wordpress.org/trunk@32747 602fd350-edb4-49c9-b593-d223f7449a82
2015-06-13 14:29:42 +00:00
Dominik Schilling (ocean90)
2ac1bec5ca Nav menu: Introduce a has_nav_menu filter in has_nav_menu() to filter whether a nav menu is assigned to a specified location.
props westonruter.
fixes #32630.

git-svn-id: https://develop.svn.wordpress.org/trunk@32746 602fd350-edb4-49c9-b593-d223f7449a82
2015-06-13 14:14:42 +00:00
Dominik Schilling (ocean90)
8502ee5f86 Nav menu: Allow the sortable items selector in wpNavMenu to be overridden.
props adamsilverstein.
fixes #32633.

git-svn-id: https://develop.svn.wordpress.org/trunk@32745 602fd350-edb4-49c9-b593-d223f7449a82
2015-06-13 14:02:41 +00:00
Weston Ruter
0c7358cffc 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.


git-svn-id: https://develop.svn.wordpress.org/trunk@32744 602fd350-edb4-49c9-b593-d223f7449a82
2015-06-12 22:53:39 +00:00
Weston Ruter
4092c5a37e 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.



git-svn-id: https://develop.svn.wordpress.org/trunk@32743 602fd350-edb4-49c9-b593-d223f7449a82
2015-06-12 22:27:51 +00:00
Scott Taylor
52cfab850f 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.


git-svn-id: https://develop.svn.wordpress.org/trunk@32742 602fd350-edb4-49c9-b593-d223f7449a82
2015-06-12 20:47:46 +00:00
Scott Taylor
7fbeffec20 After [32740], correct doc block typo.
See #29881.


git-svn-id: https://develop.svn.wordpress.org/trunk@32741 602fd350-edb4-49c9-b593-d223f7449a82
2015-06-12 20:28:22 +00:00
Scott Taylor
1de436b466 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.


git-svn-id: https://develop.svn.wordpress.org/trunk@32740 602fd350-edb4-49c9-b593-d223f7449a82
2015-06-12 20:17:59 +00:00
Scott Taylor
87f0a73bdc 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.


git-svn-id: https://develop.svn.wordpress.org/trunk@32739 602fd350-edb4-49c9-b593-d223f7449a82
2015-06-12 18:54:56 +00:00
Scott Taylor
8463ad6f29 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.


git-svn-id: https://develop.svn.wordpress.org/trunk@32738 602fd350-edb4-49c9-b593-d223f7449a82
2015-06-12 18:49:18 +00:00
Scott Taylor
cae366cad0 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.


git-svn-id: https://develop.svn.wordpress.org/trunk@32737 602fd350-edb4-49c9-b593-d223f7449a82
2015-06-12 18:44:50 +00:00
Scott Taylor
ca123a2054 In WP_Comments_List_Table::column_comment(), $post and $the_comment_status are unused, as is the $comment_status global.
See #32444.


git-svn-id: https://develop.svn.wordpress.org/trunk@32736 602fd350-edb4-49c9-b593-d223f7449a82
2015-06-12 18:38:26 +00:00
Scott Taylor
9bb0d08c14 Fix some malformed doc blocks in Custom_Image_Header.
See #32444.


git-svn-id: https://develop.svn.wordpress.org/trunk@32735 602fd350-edb4-49c9-b593-d223f7449a82
2015-06-12 18:34:49 +00:00
Scott Taylor
6b48cb1205 Fix some malformed doc blocks in Custom_Background.
See #32444.


git-svn-id: https://develop.svn.wordpress.org/trunk@32734 602fd350-edb4-49c9-b593-d223f7449a82
2015-06-12 18:24:10 +00:00
Scott Taylor
9c42e158bc $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.


git-svn-id: https://develop.svn.wordpress.org/trunk@32733 602fd350-edb4-49c9-b593-d223f7449a82
2015-06-12 17:47:16 +00:00
Scott Taylor
6c8e2e1ab0 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.


git-svn-id: https://develop.svn.wordpress.org/trunk@32732 602fd350-edb4-49c9-b593-d223f7449a82
2015-06-12 17:28:46 +00:00
Scott Taylor
611261c223 Add the proper access modifier to _init_caps() in WP_User. Add __call() for BC.
See #32444.


git-svn-id: https://develop.svn.wordpress.org/trunk@32731 602fd350-edb4-49c9-b593-d223f7449a82
2015-06-12 17:25:28 +00:00
Scott Taylor
3f29a2101d Don't loosely compare functions that return bool against a literal bool.
See #32444.


git-svn-id: https://develop.svn.wordpress.org/trunk@32730 602fd350-edb4-49c9-b593-d223f7449a82
2015-06-12 17:18:38 +00:00
Scott Taylor
40c54bc238 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.


git-svn-id: https://develop.svn.wordpress.org/trunk@32729 602fd350-edb4-49c9-b593-d223f7449a82
2015-06-12 17:00:59 +00:00
Scott Taylor
c7c55f20b5 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.


git-svn-id: https://develop.svn.wordpress.org/trunk@32728 602fd350-edb4-49c9-b593-d223f7449a82
2015-06-12 16:53:17 +00:00
Boone Gorges
dba2b6a9c0 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.

git-svn-id: https://develop.svn.wordpress.org/trunk@32727 602fd350-edb4-49c9-b593-d223f7449a82
2015-06-12 13:04:04 +00:00
Dion Hulse
671218ac1d 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


git-svn-id: https://develop.svn.wordpress.org/trunk@32726 602fd350-edb4-49c9-b593-d223f7449a82
2015-06-12 06:30:58 +00:00
Konstantin Obenland
995753d1d0 Improve non-visual feedback for list table items without terms.
Props karpstrucking, afercia.
Fixes #32150.



git-svn-id: https://develop.svn.wordpress.org/trunk@32725 602fd350-edb4-49c9-b593-d223f7449a82
2015-06-11 09:27:13 +00:00
Helen Hou-Sandi
c2ed5b170d List tables: Use a class instead of inline styles for hidden columns.
fixes #32608.


git-svn-id: https://develop.svn.wordpress.org/trunk@32724 602fd350-edb4-49c9-b593-d223f7449a82
2015-06-10 19:46:39 +00:00
Helen Hou-Sandi
c296d882a8 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.


git-svn-id: https://develop.svn.wordpress.org/trunk@32723 602fd350-edb4-49c9-b593-d223f7449a82
2015-06-10 19:30:22 +00:00
Helen Hou-Sandi
1a0773a4b4 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.


git-svn-id: https://develop.svn.wordpress.org/trunk@32722 602fd350-edb4-49c9-b593-d223f7449a82
2015-06-10 14:58:42 +00:00
Helen Hou-Sandi
615ab22fea List tables: Consolidate <td> output for posts.
see #25408.


git-svn-id: https://develop.svn.wordpress.org/trunk@32721 602fd350-edb4-49c9-b593-d223f7449a82
2015-06-10 14:00:55 +00:00
Konstantin Obenland
e66948cf50 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.



git-svn-id: https://develop.svn.wordpress.org/trunk@32720 602fd350-edb4-49c9-b593-d223f7449a82
2015-06-10 09:08:10 +00:00
Jeremy Felt
fc2ba19214 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.


git-svn-id: https://develop.svn.wordpress.org/trunk@32719 602fd350-edb4-49c9-b593-d223f7449a82
2015-06-10 07:27:09 +00:00
Jeremy Felt
9170edb2b2 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.


git-svn-id: https://develop.svn.wordpress.org/trunk@32718 602fd350-edb4-49c9-b593-d223f7449a82
2015-06-10 06:49:38 +00:00
Helen Hou-Sandi
74a6899d0d 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.


git-svn-id: https://develop.svn.wordpress.org/trunk@32717 602fd350-edb4-49c9-b593-d223f7449a82
2015-06-10 01:45:11 +00:00
Konstantin Obenland
c7a40c6847 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.



git-svn-id: https://develop.svn.wordpress.org/trunk@32716 602fd350-edb4-49c9-b593-d223f7449a82
2015-06-09 22:01:06 +00:00
Aaron Jorbin
b095afe2db 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



git-svn-id: https://develop.svn.wordpress.org/trunk@32715 602fd350-edb4-49c9-b593-d223f7449a82
2015-06-09 21:59:51 +00:00
Aaron Jorbin
09340de73e 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.



git-svn-id: https://develop.svn.wordpress.org/trunk@32714 602fd350-edb4-49c9-b593-d223f7449a82
2015-06-09 17:58:18 +00:00
Boone Gorges
c04185a1f2 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.

git-svn-id: https://develop.svn.wordpress.org/trunk@32713 602fd350-edb4-49c9-b593-d223f7449a82
2015-06-09 17:41:35 +00:00
Dion Hulse
306d8b6a1e WP_HTTP: ensure that the temporary file is created within the temporary directly when stream is specified without a filename parameter.
Fixes #32549


git-svn-id: https://develop.svn.wordpress.org/trunk@32712 602fd350-edb4-49c9-b593-d223f7449a82
2015-06-09 03:54:49 +00:00
Ella Iseulde Van Dorpe
9f13e05b64 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.


git-svn-id: https://develop.svn.wordpress.org/trunk@32711 602fd350-edb4-49c9-b593-d223f7449a82
2015-06-08 21:31:39 +00:00
Ella Iseulde Van Dorpe
c345382dee TinyMCE: views: fix typo in createInstance
This prevented instances from being reused.

Fixes #32591.


git-svn-id: https://develop.svn.wordpress.org/trunk@32710 602fd350-edb4-49c9-b593-d223f7449a82
2015-06-08 19:53:35 +00:00
Boone Gorges
036c33caaa 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.

git-svn-id: https://develop.svn.wordpress.org/trunk@32709 602fd350-edb4-49c9-b593-d223f7449a82
2015-06-08 19:44:32 +00:00
Dominik Schilling (ocean90)
b3660e2731 Parse request: Quote regular expression characters in home path.
Adds unit tests.

props akirk.
fixes #30438.

git-svn-id: https://develop.svn.wordpress.org/trunk@32708 602fd350-edb4-49c9-b593-d223f7449a82
2015-06-08 13:28:44 +00:00
Konstantin Obenland
99d0d85fb0 Sort screen options for meta boxes according to the meta box's priority.
Props swissspidy.
Fixes #32582.



git-svn-id: https://develop.svn.wordpress.org/trunk@32707 602fd350-edb4-49c9-b593-d223f7449a82
2015-06-08 12:34:03 +00:00
Ella Iseulde Van Dorpe
11de1cedaa TinyMCE: wptextpattern: make tests ~2x faster
* Reuse the same instance for all tests in the module.
* Run without CSS (skin).
* Less typing.

See #31441.


git-svn-id: https://develop.svn.wordpress.org/trunk@32706 602fd350-edb4-49c9-b593-d223f7449a82
2015-06-07 22:15:47 +00:00
Ella Iseulde Van Dorpe
ea5ba64400 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.


git-svn-id: https://develop.svn.wordpress.org/trunk@32705 602fd350-edb4-49c9-b593-d223f7449a82
2015-06-07 21:10:17 +00:00
Ella Iseulde Van Dorpe
9eafba9d15 Autoprefixer after autoprefixer-core 5.2 update
grunt-autoprefixer requires ^5.1.7, so this was automatically updated.

See #31700.


git-svn-id: https://develop.svn.wordpress.org/trunk@32704 602fd350-edb4-49c9-b593-d223f7449a82
2015-06-07 20:07:06 +00:00
Ella Iseulde Van Dorpe
fc74e695f5 TinyMCE: wptextpattern: add docs
Props DrewAPicture and iseulde.
See #31441.


git-svn-id: https://develop.svn.wordpress.org/trunk@32703 602fd350-edb4-49c9-b593-d223f7449a82
2015-06-07 19:59:11 +00:00
Sergey Biryukov
9dcaac39e2 In get_avatar(), avoid a second get_avatar_data() call to get the 2x URL.
props ravinderk.
fixes #32572.

git-svn-id: https://develop.svn.wordpress.org/trunk@32702 602fd350-edb4-49c9-b593-d223f7449a82
2015-06-07 14:57:11 +00:00
Ella Iseulde Van Dorpe
63183254c9 Customizer: hide controls on test page
Introduced in [30919].
See #32577 and #30701.


git-svn-id: https://develop.svn.wordpress.org/trunk@32701 602fd350-edb4-49c9-b593-d223f7449a82
2015-06-07 09:03:03 +00:00