Commit Graph

30205 Commits

Author SHA1 Message Date
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
Ella Iseulde Van Dorpe
b866b19a20 TinyMCE: wptextpattern: disable for IE 8 and lower
Props azaozz, iseulde.
See #31441.


git-svn-id: https://develop.svn.wordpress.org/trunk@32700 602fd350-edb4-49c9-b593-d223f7449a82
2015-06-06 22:37:13 +00:00
Ella Iseulde Van Dorpe
5bac5f7ccd 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.


git-svn-id: https://develop.svn.wordpress.org/trunk@32699 602fd350-edb4-49c9-b593-d223f7449a82
2015-06-06 20:07:00 +00:00
Ella Iseulde Van Dorpe
66f327cff2 QUnit: test minified files
Fixes #32574.


git-svn-id: https://develop.svn.wordpress.org/trunk@32698 602fd350-edb4-49c9-b593-d223f7449a82
2015-06-06 19:57:54 +00:00
Ella Iseulde Van Dorpe
cb73a0cc1a Browserify after [32677]
See #30949.


git-svn-id: https://develop.svn.wordpress.org/trunk@32697 602fd350-edb4-49c9-b593-d223f7449a82
2015-06-06 19:49:24 +00:00
Sergey Biryukov
c896260f38 Add @since for check_password_reset_key(), reset_password(), and register_new_user().
see #20279.

git-svn-id: https://develop.svn.wordpress.org/trunk@32696 602fd350-edb4-49c9-b593-d223f7449a82
2015-06-05 20:38:36 +00:00
Helen Hou-Sandi
028c61f1d4 Nav menus: Hidden inputs do not need an ID, especially one that's already in use.
props sagarjadhav.
fixes #31816.


git-svn-id: https://develop.svn.wordpress.org/trunk@32695 602fd350-edb4-49c9-b593-d223f7449a82
2015-06-05 15:35:17 +00:00
Konstantin Obenland
990008aa50 Remove title attributes in user list tables.
They don't add valuable information and are redundant.
Reduces annoyance for screen reader users.

Props afercia.
Fixes #32535.



git-svn-id: https://develop.svn.wordpress.org/trunk@32694 602fd350-edb4-49c9-b593-d223f7449a82
2015-06-05 08:39:26 +00:00
Konstantin Obenland
9dfbd00947 Text improvements for screen readers in list table paginations.
Removes title attributes where reasonable and uses accessible hidden text.
Screen readers will now correctly read out all available information.

Props afercia, rianrietveld.
Fixes #32028.



git-svn-id: https://develop.svn.wordpress.org/trunk@32693 602fd350-edb4-49c9-b593-d223f7449a82
2015-06-05 05:00:23 +00:00
Boone Gorges
9747d9f611 In wp_notify_moderator(), don't throw notice when comment belongs to a post with no author.
Props Oxymoron.
Fixes #32566.

git-svn-id: https://develop.svn.wordpress.org/trunk@32692 602fd350-edb4-49c9-b593-d223f7449a82
2015-06-04 17:28:07 +00:00
Helen Hou-Sandi
6c51513a44 Nav menus: hide the title attribute field by default for new users and installs.
It is still available in screen options. This also gives the "Navigation Label", a crucial field, the room it really deserves.

props paulwilde.
fixes #32218.


git-svn-id: https://develop.svn.wordpress.org/trunk@32691 602fd350-edb4-49c9-b593-d223f7449a82
2015-06-04 04:37:02 +00:00
Helen Hou-Sandi
112fc6d369 Nav menus: Provide visual feedback when attempting to add an empty custom link.
props pragunbhutani for the initial patch.
fixes #18517.


git-svn-id: https://develop.svn.wordpress.org/trunk@32690 602fd350-edb4-49c9-b593-d223f7449a82
2015-06-04 04:30:04 +00:00
John Blackbourn
e069a38598 Switch to pointer tolerance for improved drag and drop behaviour when reordering widgets.
Props jkudish, MikeHansenMe.
Fixes #20791


git-svn-id: https://develop.svn.wordpress.org/trunk@32689 602fd350-edb4-49c9-b593-d223f7449a82
2015-06-03 22:58:52 +00:00
Helen Hou-Sandi
2da4d61f95 Media list view: ensure thumbnails are appropriately sized and constrained.
see #29993.


git-svn-id: https://develop.svn.wordpress.org/trunk@32688 602fd350-edb4-49c9-b593-d223f7449a82
2015-06-03 15:22:14 +00:00
Helen Hou-Sandi
6c60055740 Media: move the thumbnail into the title column in list view.
This gives us more space for the title and row actions, and will make a responsive list table enhancement significantly easier.

props bradt for the initial patch.
fixes #29993 and #32255. see #32509 and #32395.


git-svn-id: https://develop.svn.wordpress.org/trunk@32687 602fd350-edb4-49c9-b593-d223f7449a82
2015-06-03 15:12:19 +00:00
Helen Hou-Sandi
fa29d5bb80 List tables: tighten up primary column handling for plugins and multisite themes.
These shouldn't be able to have their primary column reassigned by default. Also removes the `has-row-actions` class as these list tables always have row actions visible and the JS for visual toggling conflicts. The `column-primary` class remains.

props stephdau.
see #25408.


git-svn-id: https://develop.svn.wordpress.org/trunk@32686 602fd350-edb4-49c9-b593-d223f7449a82
2015-06-03 15:07:22 +00:00
Boone Gorges
ab747208b2 Add @since entry for 'has_published_post' argument of WP_User_Query.
Mega-props DrewAPicture.
Fixes #32250.

git-svn-id: https://develop.svn.wordpress.org/trunk@32685 602fd350-edb4-49c9-b593-d223f7449a82
2015-06-02 18:20:36 +00:00
Boone Gorges
c73ac2bbb5 Normalize whitespace in docblock for WP_User_Query::prepare_query().
git-svn-id: https://develop.svn.wordpress.org/trunk@32684 602fd350-edb4-49c9-b593-d223f7449a82
2015-06-02 13:34:04 +00:00