Commit Graph

33099 Commits

Author SHA1 Message Date
Dominik Schilling (ocean90) d1ec5b6ac3 Passwords: Support the pre-4.3 behavior of `wp_new_user_notification()`.
Hello, it's me again. A pluggable function named `wp_new_user_notification()`. A few months ago, after [33023], I have lost my second parameter `$plaintext_pass`. But thanks to [33620] I got a new one.
Bad idea - It hasn't had the same behavior as my previous parameter.
To solve that the second parameter got deprecated and reintroduced as the third parameter in [34116]. I was happy again, for a short time.
You remember my lost friend `$plaintext_pass`? No? Well, if its value was empty no notification was sent to the user. This behavior was still lost. And that's what this change is about: Don't notify a user if a plugin uses `wp_new_user_notification( $user_id )`.

You're asking if I'm happy now? Dunno, but maybe you have learned something about pluggable functions, have you?

Props danielbachhuber.
Fixes #34377.

git-svn-id: https://develop.svn.wordpress.org/trunk@35735 602fd350-edb4-49c9-b593-d223f7449a82
2015-11-24 23:06:03 +00:00
Dominik Schilling (ocean90) 50c47fa78c HTTP Tests: Use `login.wordpress.org/wp-login.php` in `test_get_response_cookies()`.
The old URL redirects to `login.wordpress.org` because it's the new canonical URL for all logins on wordpress.org.

Fixes #34782.

git-svn-id: https://develop.svn.wordpress.org/trunk@35734 602fd350-edb4-49c9-b593-d223f7449a82
2015-11-24 21:59:23 +00:00
Dominik Schilling (ocean90) a32d38c9f0 Passwords: Re-enable password fields before submitting the form.
Avoids an PHP undefined notice when creating new users.

Fixes #33699.

git-svn-id: https://develop.svn.wordpress.org/trunk@35733 602fd350-edb4-49c9-b593-d223f7449a82
2015-11-24 21:16:02 +00:00
Sergey Biryukov 6f310a775d Users: Move the tests added in [35116] and [35618] to a more appropriate place and give them a better name.
See #28435, #29880.

git-svn-id: https://develop.svn.wordpress.org/trunk@35732 602fd350-edb4-49c9-b593-d223f7449a82
2015-11-23 18:39:20 +00:00
Sergey Biryukov 282e87a683 Docs: Improve DocBlock formatting for `add_menu_page()` and `add_submenu_page()` wrappers.
See #34360.

git-svn-id: https://develop.svn.wordpress.org/trunk@35731 602fd350-edb4-49c9-b593-d223f7449a82
2015-11-23 17:55:24 +00:00
Helen Hou-Sandi 87fa157bf8 Pass the `$post` object as context to `postmeta_form_keys`.
see #33885, #18979.


git-svn-id: https://develop.svn.wordpress.org/trunk@35730 602fd350-edb4-49c9-b593-d223f7449a82
2015-11-23 17:14:39 +00:00
Gary Pendergast d0e3670401 Docs: Replace a reference to WP.org with WordPress.org.
git-svn-id: https://develop.svn.wordpress.org/trunk@35729 602fd350-edb4-49c9-b593-d223f7449a82
2015-11-22 22:37:32 +00:00
Andrew Ozz a78706fe36 Editor: remove wpLink dependency on jQuery UI.
Props afercia.
Fixes #34716.

git-svn-id: https://develop.svn.wordpress.org/trunk@35728 602fd350-edb4-49c9-b593-d223f7449a82
2015-11-22 19:26:18 +00:00
Andrew Ozz fdde197d93 TinyMCE: fix the regexp used to protect line breaks inside script and pre tags to match `<script>` that load external scripts.
Fixes #34760.

git-svn-id: https://develop.svn.wordpress.org/trunk@35727 602fd350-edb4-49c9-b593-d223f7449a82
2015-11-22 19:12:21 +00:00
Sergey Biryukov b513ea197b Comments: After [35670], change the CSS class for the pending comments count back to `moderated`.
Fixes #34680.

git-svn-id: https://develop.svn.wordpress.org/trunk@35726 602fd350-edb4-49c9-b593-d223f7449a82
2015-11-22 15:22:38 +00:00
Sergey Biryukov 3e634c753e After [35718], update the location of some files in `This filter is documented in` docs.
Partially reverts [33954].

Fixes #33413.

git-svn-id: https://develop.svn.wordpress.org/trunk@35725 602fd350-edb4-49c9-b593-d223f7449a82
2015-11-22 03:50:32 +00:00
Weston Ruter 89f49aad80 Customize: Ensure that a setting (especially a multidimensional one) can still be previewed when the post value to preview is set after `preview()` is invoked.
* Introduce `customize_post_value_set_{$setting_id}` and `customize_post_value_set` actions which are done when `WP_Customize_Manager::set_post_value()` is called.
* Clear the `preview_applied` flag for aggregated multidimensional settings when a post value is set. This ensures the new value is used instead of a previously-cached previewed value.
* Move `$is_preview` property from subclasses to `WP_Customize_Setting` parent class.
* Deferred preview: Ensure that when `preview()` short-circuits due to not being applicable that it will be called again later when the post value is set.
* Populate post value for updated-widget with the (unsanitized) JS-value in `WP_Customize_Widgets::call_widget_update()` so that value will be properly sanitized when accessed in `WP_Customize_Manager::post_value()`.

Includes unit tests with assertions to check the reported issues and validate the fixes.

Fixes defect introduced in [35007].
See #32103.
Fixes #34738.


git-svn-id: https://develop.svn.wordpress.org/trunk@35724 602fd350-edb4-49c9-b593-d223f7449a82
2015-11-21 02:51:57 +00:00
Sergey Biryukov 692d7b820f Comments: In `comment_form()`, introduce the `comment_form_fields` filter for comment fields, including the textarea.
Correct the docs for `comment_notes_before` and `comment_notes_after` arguments as well as `comment_form_before_fields` and `comment_form_after_fields` actions to better describe the current behaviour.

Fixes #34731.

git-svn-id: https://develop.svn.wordpress.org/trunk@35723 602fd350-edb4-49c9-b593-d223f7449a82
2015-11-20 18:55:31 +00:00
Sergey Biryukov b0e225b619 Customizer: Use correct context and translator comments for menu location strings.
See #33431.

git-svn-id: https://develop.svn.wordpress.org/trunk@35722 602fd350-edb4-49c9-b593-d223f7449a82
2015-11-20 17:45:57 +00:00
Helen Hou-Sandi 85dc4bcb63 Postbox handle buttons don't need a focus outline.
see #33808, #34242.


git-svn-id: https://develop.svn.wordpress.org/trunk@35721 602fd350-edb4-49c9-b593-d223f7449a82
2015-11-20 15:55:04 +00:00
Dominik Schilling (ocean90) ee3ac55419 Build: Update source for `includes:embed` after [35718].
See #33413.

git-svn-id: https://develop.svn.wordpress.org/trunk@35720 602fd350-edb4-49c9-b593-d223f7449a82
2015-11-20 15:36:21 +00:00
Dominik Schilling (ocean90) f1181f363a 4.4-beta4-35719.
git-svn-id: https://develop.svn.wordpress.org/trunk@35719 602fd350-edb4-49c9-b593-d223f7449a82
2015-11-20 13:45:26 +00:00
Andrew Nacin 8220d04e6d Simplify the include graph after work to split out classes.
see #33413. More details there.


git-svn-id: https://develop.svn.wordpress.org/trunk@35718 602fd350-edb4-49c9-b593-d223f7449a82
2015-11-20 07:23:04 +00:00
Helen Hou-Sandi 03bd31aedd Custom fields: Allow for short-circuiting the meta key dropdown.
Adds the `postmeta_form_keys` filter which allows for a potentially expensive query against postmeta to be avoided.

props ericmann, tollmanz, nacin.
see #33885.


git-svn-id: https://develop.svn.wordpress.org/trunk@35717 602fd350-edb4-49c9-b593-d223f7449a82
2015-11-20 06:15:34 +00:00
Sergey Biryukov 583a84b1db Docs: Remove redundant `type` strings from the `wp_calculate_image_srcset` filter DocBlock.
Props DH-Shredder, joemcgill.
See #34733.

git-svn-id: https://develop.svn.wordpress.org/trunk@35716 602fd350-edb4-49c9-b593-d223f7449a82
2015-11-20 06:15:19 +00:00
SergeyBiryukov a5a5200bcb Docs: Add `@see` tags for `wp_get_attachment_image_srcset()` and `wp_get_attachment_image_sizes()`.
Update `@see` tags for `wp_make_content_images_responsive()` and `wp_image_add_srcset_and_sizes()`.

Props jaspermdegroot.
See #34733.

git-svn-id: https://develop.svn.wordpress.org/trunk@35715 602fd350-edb4-49c9-b593-d223f7449a82
2015-11-20 06:12:01 +00:00
Dion Hulse e4f5801383 Merge the changes to GlotPress's POMO from upstream to WordPress's copy.
Fixes #34748


git-svn-id: https://develop.svn.wordpress.org/trunk@35714 602fd350-edb4-49c9-b593-d223f7449a82
2015-11-20 04:33:12 +00:00
Dion Hulse 16797d1814 Bump the version of MediaElement in script-loader.php to match what we're shipping with.
See #33798
Fixes #34743


git-svn-id: https://develop.svn.wordpress.org/trunk@35713 602fd350-edb4-49c9-b593-d223f7449a82
2015-11-20 03:31:17 +00:00
Sergey Biryukov f006da9bdb ru_RU: In back-compat styles for admin menu, inherit the width from the parent element, `#adminmenuwrap`, to account for media queries.
See #20974.

git-svn-id: https://develop.svn.wordpress.org/trunk@35712 602fd350-edb4-49c9-b593-d223f7449a82
2015-11-20 01:39:16 +00:00
Sergey Biryukov c2f2ef1c9b ru_RU: After [35710], remove fixed width for admin menu, as it does not account for media queries.
See #20974.

git-svn-id: https://develop.svn.wordpress.org/trunk@35711 602fd350-edb4-49c9-b593-d223f7449a82
2015-11-20 01:03:15 +00:00
Sergey Biryukov 7c1dd221c4 Add some back-compat styles for ru_RU.
This prevents the admin menu from disappearing if an old `ru_RU.php` file is left over after updating directly from 3.1.x or an older version to the latest release.

See #20974.

git-svn-id: https://develop.svn.wordpress.org/trunk@35710 602fd350-edb4-49c9-b593-d223f7449a82
2015-11-20 00:35:25 +00:00
Gary Pendergast 274bb41c04 Texturize: Only convert `&` to `&#038;` within text nodes.
Previously, `&` would be converted everywhere, which caused problems when it was converted within a `<script>`, for example.

`convert_chars()` is now removed from the `the_content` filter, as it was doing the same job as `wptexturize()`.

KSES correctly handles converting `&` within HTML attributes, so there's no need for `wptexturize()` and `convert_chars()` to do the same job.

Fixes #34698.



git-svn-id: https://develop.svn.wordpress.org/trunk@35709 602fd350-edb4-49c9-b593-d223f7449a82
2015-11-19 23:31:00 +00:00
Gary Pendergast c7e05dafbe Embeds: Remove `&` characters from the inline embed JS.
Older versions of WordPress will convert those `&` characters to `&#038;`, which makes for some non-functional JS. If folks are running an older release, let's not make their lives more difficult than it already is.

Props pento, peterwilsoncc.

See #34698.



git-svn-id: https://develop.svn.wordpress.org/trunk@35708 602fd350-edb4-49c9-b593-d223f7449a82
2015-11-19 23:05:39 +00:00
John Blackbourn 71c0c35c24 Ensure the count for users with no role remains accurate when users with multiple roles are present.
See #34495


git-svn-id: https://develop.svn.wordpress.org/trunk@35707 602fd350-edb4-49c9-b593-d223f7449a82
2015-11-19 17:10:47 +00:00
Konstantin Obenland bbe6aa01aa Template: Use `template-loader.php` as cononical source of truth for conditional ordering.
Reverts [35700] which didn't account for author archives without posts.
Determination of the correct title is now based on the same order of
conditionals that template loader uses to select the right template.

H/t ocean90.
Fixes #34516.



git-svn-id: https://develop.svn.wordpress.org/trunk@35706 602fd350-edb4-49c9-b593-d223f7449a82
2015-11-19 17:08:33 +00:00
John Blackbourn 4920716b4d Clean up the `grammarian` role so it doesn't pollute other tests.
See #24153


git-svn-id: https://develop.svn.wordpress.org/trunk@35705 602fd350-edb4-49c9-b593-d223f7449a82
2015-11-19 16:46:43 +00:00
John Blackbourn 55d04cb50f Move the `show_ui` logic into the `get_edit_post_link()` and `get_edit_term_link()` functions to facilitate post types and terms which specify `show_ui` as false but provide a custom editing UI via the `get_edit_post_link` and `get_edit_term_link` filters.
Fixes #33763
Fixes #33938


git-svn-id: https://develop.svn.wordpress.org/trunk@35704 602fd350-edb4-49c9-b593-d223f7449a82
2015-11-19 16:24:35 +00:00
Helen Hou-Sandi f7d27be8aa Color picker: update to the new button style.
props paulwilde.
fixes #34734.


git-svn-id: https://develop.svn.wordpress.org/trunk@35703 602fd350-edb4-49c9-b593-d223f7449a82
2015-11-19 14:36:35 +00:00
Gary Pendergast 99180a09ba Embeds: Remove the `allow_insecure_embeds` filter.
This reverts [35640]. On further reflection, it really didn't do what it said it did.

Fixes #34588.



git-svn-id: https://develop.svn.wordpress.org/trunk@35702 602fd350-edb4-49c9-b593-d223f7449a82
2015-11-19 05:01:07 +00:00
Boone Gorges 33d9464c3c On 4.4 upgrade, remove the unused 'add_users' cap from all roles.
Fixes #16719.

git-svn-id: https://develop.svn.wordpress.org/trunk@35701 602fd350-edb4-49c9-b593-d223f7449a82
2015-11-19 03:52:32 +00:00
Konstantin Obenland 17ba0ec012 Template: Get the author name directly from `$authordata`.
Since [25574] `$authordata` gets set up in `WP::register_globals()` - no need
to take a detour over the queried object.

Props greenshady for initial patch.
Fixes #34516.


git-svn-id: https://develop.svn.wordpress.org/trunk@35700 602fd350-edb4-49c9-b593-d223f7449a82
2015-11-19 00:05:37 +00:00
Konstantin Obenland 63d9d27e57 Media: Reset box-sizing for input elements in the entire media modal.
See [29727].

Props tyxla for initial patch.
Fixes #34556.



git-svn-id: https://develop.svn.wordpress.org/trunk@35699 602fd350-edb4-49c9-b593-d223f7449a82
2015-11-18 23:35:17 +00:00
Scott Taylor 328a6b21c0 List Tables: Fix PHP error notice when `$columns` is `null`
Use of `register_column_headers()` and `print_column_headers()` creates a `_WP_List_Table_Compat` without any columns. When the List Table object doesn't have any columns, there's naturally no primary column.

Props danielbachhuber.
Fixes #34148.


git-svn-id: https://develop.svn.wordpress.org/trunk@35698 602fd350-edb4-49c9-b593-d223f7449a82
2015-11-18 23:00:55 +00:00
Dominik Schilling (ocean90) 01a6fe13f9 Buttons: Update colors for disabled buttons.
Props hugobaeta.
Fixes #31459.

git-svn-id: https://develop.svn.wordpress.org/trunk@35697 602fd350-edb4-49c9-b593-d223f7449a82
2015-11-18 22:46:25 +00:00
Drew Jaynes 03a4df50c7 Docs: Clarify some parameter and return descriptions in the DocBlocks for `wp_get_attachment_image_srcset()` and `wp_calculate_image_srcset()`, `wp_get_attachment_image_sizes()`, and the `wp_calculate_image_srcset` filter.
Props joemcgill.
See #34733.


git-svn-id: https://develop.svn.wordpress.org/trunk@35696 602fd350-edb4-49c9-b593-d223f7449a82
2015-11-18 22:43:05 +00:00
Dominik Schilling (ocean90) a88d7d81b5 Customizer: Merge two similar strings.
Remove also `{{ data.menu_name }}` since it doesn't print anything.

Fixes #33630.

git-svn-id: https://develop.svn.wordpress.org/trunk@35695 602fd350-edb4-49c9-b593-d223f7449a82
2015-11-18 22:24:22 +00:00
Dominik Schilling (ocean90) b8e615070c Customizer: Remove two unused strings.
Fixes #33632.

git-svn-id: https://develop.svn.wordpress.org/trunk@35694 602fd350-edb4-49c9-b593-d223f7449a82
2015-11-18 22:11:13 +00:00
John Blackbourn 3636f0dc1a Add support for oEmbeds from Speaker Deck.
Fixes #28597


git-svn-id: https://develop.svn.wordpress.org/trunk@35693 602fd350-edb4-49c9-b593-d223f7449a82
2015-11-18 22:04:59 +00:00
Jeremy Felt 8c5ce610b3 Multisite: Re-Account for striped table rows with `.site-*` classes.
[34356] removed the table row specificity on rules for `.site-deleted`, `.site-spammed`, `.site-archived`, and `.site-matured` so that the styles would be properly applied to other elements. Now, the zebra striping rules override these styles on even rows.

We can account for `tr` specific and more generic applications of these classes.

Fixes #33595.


git-svn-id: https://develop.svn.wordpress.org/trunk@35692 602fd350-edb4-49c9-b593-d223f7449a82
2015-11-18 21:58:18 +00:00
Boone Gorges 23fc24278c Eliminate a db query when building the admin menu for non-privileged users.
Users who cannot `edit_posts` do not see the Comments nav item anyway, so
don't bother running a query that gets a comment count to display in the menu.

Props bordoni, johnbillion.
Fixes #19372.

git-svn-id: https://develop.svn.wordpress.org/trunk@35691 602fd350-edb4-49c9-b593-d223f7449a82
2015-11-18 21:33:03 +00:00
Boone Gorges 1d3749ea87 In `WP_Query`, set `is_home` to `false` during REST requests.
Props danielbachhuber.
Fixes #34373.

git-svn-id: https://develop.svn.wordpress.org/trunk@35690 602fd350-edb4-49c9-b593-d223f7449a82
2015-11-18 21:17:30 +00:00
Drew Jaynes 6a2eaf6448 Embeds: Introduce `print_embed_comments_button()`, `print_embed_sharing_button()`, and `print_embed_sharing_dialog()`, which respectively output the comments button, sharing buttons, and sharing dialog elements in the embed template.
This change hooks these new output functions to existing hooks in the embed template, allowing for more straightforward display control of these elements.

Leaves the embed header and footer intact pending further modularization in a future release.

Props juliobox, swissspidy, DrewAPicture.
See #34561.


git-svn-id: https://develop.svn.wordpress.org/trunk@35689 602fd350-edb4-49c9-b593-d223f7449a82
2015-11-18 20:50:53 +00:00
Aaron Jorbin ee18e04df0 Revert [34291] bringing back my-hacks
Keeping myhacks support is a small price to pay for not breaking people's sites.  Even if it is very very very few sites, breaking sites isn't something that should be encouraged. Even with 10 years of deprecation notices.

https://core.trac.wordpress.org/ticket/33741#comment:18 outlines all the ways that the hack_file and my-hacks options can be setup and thus all the ways that the removal of those options could break sites.

Fixes #33741.




git-svn-id: https://develop.svn.wordpress.org/trunk@35688 602fd350-edb4-49c9-b593-d223f7449a82
2015-11-18 20:48:24 +00:00
John Blackbourn e904632cc3 Remove `register_api_field()` from core. This is the only core function that utilises the `$wp_rest_additional_fields` global, and doesn't belong as part of the infrastructure.
See https://github.com/WP-API/WP-API/pull/1748

Fixes #34730


git-svn-id: https://develop.svn.wordpress.org/trunk@35687 602fd350-edb4-49c9-b593-d223f7449a82
2015-11-18 20:38:25 +00:00
Sergey Biryukov 28a1b19ed1 I18N: After [35620], move the code for standardizing on `\n` line endings to `Translation_Entry::key()`.
Props dd32.
Fixes #22172.

git-svn-id: https://develop.svn.wordpress.org/trunk@35686 602fd350-edb4-49c9-b593-d223f7449a82
2015-11-18 20:36:50 +00:00