Commit Graph

30131 Commits

Author SHA1 Message Date
Scott Taylor a06f5f6d90 Don't strip `\0` (backslash+zero) from post content for users without "unfiltered_html"
Adds unit tests.

Props miqrogroove.
Fixes #28699.


git-svn-id: https://develop.svn.wordpress.org/trunk@32860 602fd350-edb4-49c9-b593-d223f7449a82
2015-06-19 18:46:11 +00:00
Dominik Schilling (ocean90) bd272f3188 Customizer: Improve accessibility of the toggle button in the available menu items panel.
Prevents focus lost in Safari because the button was "invisible" until it got focused.

fixes #32709.

git-svn-id: https://develop.svn.wordpress.org/trunk@32859 602fd350-edb4-49c9-b593-d223f7449a82
2015-06-19 17:23:46 +00:00
Konstantin Obenland 59a9592125 Remove allowed tags from comment form.
It can be confusing to users and for most it is not relevant.
Commenters comfortable with HTML will know which tags are likely
to be accepted.

Props krogsgard, rachelbaker.
Fixes #30157.



git-svn-id: https://develop.svn.wordpress.org/trunk@32858 602fd350-edb4-49c9-b593-d223f7449a82
2015-06-19 14:14:41 +00:00
Konstantin Obenland 82a26045e5 Check that current changes can be lost before editing another comment.
When replying to or editing a comment, double-clicking another comment will
open it in quick edit and changes to the current comment are lost.

Props pareshradadiya, chriscct7.
Fixes #21845.



git-svn-id: https://develop.svn.wordpress.org/trunk@32857 602fd350-edb4-49c9-b593-d223f7449a82
2015-06-19 13:47:35 +00:00
Ella Iseulde Van Dorpe fa5ec5077b Editor: restructure word count
* The WordCounter should only do one thing: count words. This makes it also easier to test.
* Add some really basic unit tests.
* Instead of only refreshing the count on enter and delete, refresh the count when the user stops typing. Also look at paste and content changes in TinyMCE.
* Use `match` instead of `replace` when it is appropriate.
* More readable code.

See #30966. Fixes #26620.



git-svn-id: https://develop.svn.wordpress.org/trunk@32856 602fd350-edb4-49c9-b593-d223f7449a82
2015-06-19 10:34:59 +00:00
Konstantin Obenland bfb8734652 Keep `WP_Customize_Nav_Menus_Panel` with other panels rather than controls.
Accidentally merged into the wrong file in [32806].
H/t celloexpressions for noticing.

See https://wordpress.slack.com/archives/core-customize/p1434696254000258.
See #32576.



git-svn-id: https://develop.svn.wordpress.org/trunk@32855 602fd350-edb4-49c9-b593-d223f7449a82
2015-06-19 08:36:37 +00:00
Dion Hulse 9c0750ac52 When updating plugins/themes verify that the files to be deleted can be modified before starting the deletion process.
This will avoid partially deleting an item during update which has inconsistent permissions.
This change only affects those using the direct & ssh transports as FTP's is_writable() currently always returns `true`.
Fixes #30921


git-svn-id: https://develop.svn.wordpress.org/trunk@32854 602fd350-edb4-49c9-b593-d223f7449a82
2015-06-19 03:48:55 +00:00
Dion Hulse 4ff7f27c83 Remove a redundant index drop, it'll be dropped and re-created a few lines further down.
Fixes a warning during updating from 4.0 or earlier.
Fixes #31388 for trunk


git-svn-id: https://develop.svn.wordpress.org/trunk@32852 602fd350-edb4-49c9-b593-d223f7449a82
2015-06-19 03:17:12 +00:00
Andrew Ozz 5cb9a4b019 Fix using `htmlspecialchars()` whit the `$double_encode` parameter. PHP < 5.4 doesn't validate the entities.
Props miqrogroove. Fixes #17780.

git-svn-id: https://develop.svn.wordpress.org/trunk@32851 602fd350-edb4-49c9-b593-d223f7449a82
2015-06-19 01:52:48 +00:00
Scott Taylor 4d8c4295f3 Since PHP 5.2.3, the `htmlspecialchars()` function has an optional `$double_encode` parameter, which we can now use. This will save us a few expensive kses/html decoding calls.
Adds unit tests.

Props miqrogroove.
Fixes #17780.


git-svn-id: https://develop.svn.wordpress.org/trunk@32850 602fd350-edb4-49c9-b593-d223f7449a82
2015-06-18 21:59:10 +00:00
John Blackbourn b8180d3d14 Correct the docs for the `post_type_labels_{$post_type}` filter.
Fixes #32707
Props dlh


git-svn-id: https://develop.svn.wordpress.org/trunk@32849 602fd350-edb4-49c9-b593-d223f7449a82
2015-06-18 21:32:53 +00:00
Dominik Schilling (ocean90) 413d24c47f Customizer: Improve accessibility of Add Menu Items button and its panel.
props afercia, ocean90.
fixes #32682.

git-svn-id: https://develop.svn.wordpress.org/trunk@32848 602fd350-edb4-49c9-b593-d223f7449a82
2015-06-18 20:51:48 +00:00
Dominik Schilling (ocean90) ee24335ba5 Autoprefixer for [32844].
git-svn-id: https://develop.svn.wordpress.org/trunk@32847 602fd350-edb4-49c9-b593-d223f7449a82
2015-06-18 20:48:52 +00:00
Aaron Jorbin 301988d967 Add singular.php to template hierarchy
Singular is the only template context conditional that lacks a corresponding template. This allows some themes to simplify.

Fixes #22314.
Props chipbennett.



git-svn-id: https://develop.svn.wordpress.org/trunk@32846 602fd350-edb4-49c9-b593-d223f7449a82
2015-06-18 19:00:09 +00:00
Scott Taylor 646c19accf Make sure that all Gravatars are generated by `get_avatar()` or at least run through `apply_filters( 'get_avatar', $avatar )` for the sake of extensibility.
Props miqrogroove, GlennM, SergeyBiryukov.
Fixes #22650.


git-svn-id: https://develop.svn.wordpress.org/trunk@32845 602fd350-edb4-49c9-b593-d223f7449a82
2015-06-18 18:35:04 +00:00
Konstantin Obenland 9bf79ed862 Semanticize Help and Screen Options toggle.
Links used as UI controls that are not real links but act as buttons, should be buttons.

Props afercia.
Fixes #32494.



git-svn-id: https://develop.svn.wordpress.org/trunk@32844 602fd350-edb4-49c9-b593-d223f7449a82
2015-06-18 16:35:12 +00:00
Konstantin Obenland 2ae17175b2 Use https for Google API external libraries.
Google recommends it and users are more likely to have the https version cached in their browser already.

Props rommelxcastro.
Fixes #32552.



git-svn-id: https://develop.svn.wordpress.org/trunk@32843 602fd350-edb4-49c9-b593-d223f7449a82
2015-06-18 15:50:42 +00:00
Konstantin Obenland 771509a452 Show the posts meta box by default in Appearance > Menus.
Lessens user confusion and the likelyhood of misusing custom links
to add menu items for posts.

Props bcole808.
Fixes #32440.



git-svn-id: https://develop.svn.wordpress.org/trunk@32842 602fd350-edb4-49c9-b593-d223f7449a82
2015-06-18 15:03:29 +00:00
Konstantin Obenland b758c6cec4 More consistent spacing around the excerpt textarea.
Props paulwilde.
Fixes #32242.



git-svn-id: https://develop.svn.wordpress.org/trunk@32841 602fd350-edb4-49c9-b593-d223f7449a82
2015-06-18 14:18:53 +00:00
Boone Gorges d7831ec94d Use `assertFalse()` rather than `assertNull()` in `Tests_WP_Customize_Setting::test_is_current_blog_previewed()`.
`is_current_blog_previewed()` returns a boolean.

See #31428.

git-svn-id: https://develop.svn.wordpress.org/trunk@32840 602fd350-edb4-49c9-b593-d223f7449a82
2015-06-18 14:07:35 +00:00
Boone Gorges 9597066674 Make sure `$_SERVER['SERVER_NAME']` is set whenever `wp_mail()` is called in PHPUnit tests.
This eliminates PHP notices when `wp_mail()` needs to determine its own From header.

See [25381] for a previous fix, which focused only on the mail-specific tests.

Fixes #32702.

git-svn-id: https://develop.svn.wordpress.org/trunk@32839 602fd350-edb4-49c9-b593-d223f7449a82
2015-06-18 13:52:29 +00:00
Boone Gorges 7ae03917a9 When updating a user, only send email-change notification if email address is passed.
The notification, introduced in [32380], was firing incorrectly (and throwing
a PHP notice) when `wp_update_user()` was called without including 'user_email'
in the update data.

Props imath.
Fixes #32684. See #32430.

git-svn-id: https://develop.svn.wordpress.org/trunk@32838 602fd350-edb4-49c9-b593-d223f7449a82
2015-06-18 13:29:41 +00:00
Boone Gorges cf9044394b Add filters to `wp_unique_term_slug()`.
This changeset adds two new filters:
* 'wp_unique_term_slug_is_bad_slug' lets developers control whether a test slug needs to be made unique, before the queries required to build a suffix are performed.
* 'wp_unique_term_slug' filters the output of the function.

These changes introduce parity with the filters in `wp_unique_post_slug()`.

Props coffee2code, bolo1988, boonebgorges.
Fixes #20783.

git-svn-id: https://develop.svn.wordpress.org/trunk@32837 602fd350-edb4-49c9-b593-d223f7449a82
2015-06-18 13:19:12 +00:00
Ella Iseulde Van Dorpe 9941421f72 TinyMCE: wptextpattern: escape should undo
Props azaozz.
See #31441.


git-svn-id: https://develop.svn.wordpress.org/trunk@32836 602fd350-edb4-49c9-b593-d223f7449a82
2015-06-18 12:58:07 +00:00
Konstantin Obenland f88225549e Revert [32834].
It's not ready yet and was a product of misusing vim.

See #30729.



git-svn-id: https://develop.svn.wordpress.org/trunk@32835 602fd350-edb4-49c9-b593-d223f7449a82
2015-06-18 12:26:40 +00:00
Konstantin Obenland 1fc76c997f Emphasise previewing new themes
git-svn-id: https://develop.svn.wordpress.org/trunk@32834 602fd350-edb4-49c9-b593-d223f7449a82
2015-06-18 12:23:30 +00:00
Konstantin Obenland 77d2e23a69 Make posts in the 'Most recent' tab of post type meta boxes filterable.
Provides parity with the 'View All' tab of post type meta boxes in Appearance > Menus.

Props jpyper, chriscct7.
Fixes #19365.



git-svn-id: https://develop.svn.wordpress.org/trunk@32833 602fd350-edb4-49c9-b593-d223f7449a82
2015-06-18 11:34:33 +00:00
Ella Iseulde Van Dorpe fa1a214eb6 TinyMCE: wptextpattern: fix issue that removes content
* If the resulting text node is empty, don't remove all the content from the paragraph.
* If there's an empty text node at the start of the paragraph, ignore it and consider the next node to be the start.

See #31441.


git-svn-id: https://develop.svn.wordpress.org/trunk@32832 602fd350-edb4-49c9-b593-d223f7449a82
2015-06-18 11:33:11 +00:00
Ella Iseulde Van Dorpe b1446f4221 TinyMCE: show inline toolbar after scroll/resize
Also:

* Reduce the amount of callbacks.
* Move everything under `preinit` (but prepend to the callback). The API shouldn't be availbale earlier, and some UI is not available yet, neither is `editor.dom`.
* Hide the toolbar if the target is out of view.

See #32604.



git-svn-id: https://develop.svn.wordpress.org/trunk@32831 602fd350-edb4-49c9-b593-d223f7449a82
2015-06-18 11:09:56 +00:00
Konstantin Obenland cfbff5b495 Recommend a user updates keys/salts in `maint/repair.php`.
Since they are already going into `wp-config.php`, we should also encourage
them to update their unique phrases for keys and salts, assuming they do not
have a complete set of 8 unique ones already.

Props nacin, chriscct7.
Fixes #20779.



git-svn-id: https://develop.svn.wordpress.org/trunk@32830 602fd350-edb4-49c9-b593-d223f7449a82
2015-06-18 11:06:09 +00:00
John Blackbourn 0da957471b Correct a typo in the inline docs for `add_action()`.
Props nabil_kadimi, swissspidy
Fixes #32697


git-svn-id: https://develop.svn.wordpress.org/trunk@32829 602fd350-edb4-49c9-b593-d223f7449a82
2015-06-18 08:36:39 +00:00
Andrew Ozz 80a511015b Press This: Check the embeds list against all of the oembed providers.
Props stephdau. Fixes #32069.

git-svn-id: https://develop.svn.wordpress.org/trunk@32828 602fd350-edb4-49c9-b593-d223f7449a82
2015-06-18 00:11:30 +00:00
Andrew Ozz 675de40f11 Press This: show error message when the user is attempting to add a category that already exists.
Fixes #32339.

git-svn-id: https://develop.svn.wordpress.org/trunk@32827 602fd350-edb4-49c9-b593-d223f7449a82
2015-06-17 23:12:08 +00:00
John Blackbourn c98a9dd6d7 Correct a unit test name.
See #21212


git-svn-id: https://develop.svn.wordpress.org/trunk@32826 602fd350-edb4-49c9-b593-d223f7449a82
2015-06-17 23:09:28 +00:00
Dominik Schilling (ocean90) 9031531071 Customizer: Remove an `overflow: hidden` declaration to prevent cutting off the left and right edge focus style of the "Add a Menu" input field.
props paulwilde.
fixes #32680.

git-svn-id: https://develop.svn.wordpress.org/trunk@32825 602fd350-edb4-49c9-b593-d223f7449a82
2015-06-17 21:42:45 +00:00
Dominik Schilling (ocean90) 59230dd5ab Customizer: Fix keyboard events for the menu items search field.
Replace the `change` event with `keyup`, see https://core.trac.wordpress.org/ticket/26600#comment:59 for background.

props tywayne.
fixes #32677.

git-svn-id: https://develop.svn.wordpress.org/trunk@32824 602fd350-edb4-49c9-b593-d223f7449a82
2015-06-17 21:36:11 +00:00
Dominik Schilling (ocean90) 71cdd9a3e1 Customizer: Revert the blue on hover color which was introduced in [32649].
Blue is meant to be the primary action which isn't the case in this context. Colors need to be revised in #29158. 

see #31336.

git-svn-id: https://develop.svn.wordpress.org/trunk@32823 602fd350-edb4-49c9-b593-d223f7449a82
2015-06-17 21:07:01 +00:00
Dominik Schilling (ocean90) cedda9aef1 Customizer: Decode HTML entities of panel/section titles.
Titles are now passed into Underscore templates but HTML-escaped, see #30737.

fixes #32670.

git-svn-id: https://develop.svn.wordpress.org/trunk@32822 602fd350-edb4-49c9-b593-d223f7449a82
2015-06-17 19:47:58 +00:00
Dominik Schilling (ocean90) 2481eec41d Customizer: Replace usage of `calc()` with `box-sizing: border-box`.
IE8 doesn't support `calc()`.

props afercia.
see #31336.
fixes #32664.

git-svn-id: https://develop.svn.wordpress.org/trunk@32821 602fd350-edb4-49c9-b593-d223f7449a82
2015-06-17 19:34:44 +00:00
Mark Jaquith 3f215c6d1a Send emails when a user's email address or password is changed.
* In case of email change, email goes to the OLD address
* Prevents against issues where an account is compromised (say via cookie interception) and then the attacker silently takes over ownership via pw/email changes — now there will at least be a record that something is up

fixes #32430
props RMarks, MikeHansenMe, tharsheblows, obenland

git-svn-id: https://develop.svn.wordpress.org/trunk@32820 602fd350-edb4-49c9-b593-d223f7449a82
2015-06-17 19:30:37 +00:00
Boone Gorges 322b6cc54f Bail out of 4.3 term splitting routine when no shared terms are found.
Props dd32.
See #30261.

git-svn-id: https://develop.svn.wordpress.org/trunk@32819 602fd350-edb4-49c9-b593-d223f7449a82
2015-06-17 11:39:19 +00:00
Ella Iseulde Van Dorpe 361e7d9717 TinyMCE: show active inline toolbar after focus
This makes sure that e.g. the image toolbar shows up again after closing the media library modal.

See #32604.


git-svn-id: https://develop.svn.wordpress.org/trunk@32818 602fd350-edb4-49c9-b593-d223f7449a82
2015-06-17 07:07:50 +00:00
Ella Iseulde Van Dorpe f81208f55a TinyMCE: wplink: don't link a URL with a pasted URL
Fixes #32357.



git-svn-id: https://develop.svn.wordpress.org/trunk@32817 602fd350-edb4-49c9-b593-d223f7449a82
2015-06-17 05:04:23 +00:00
Ella Iseulde Van Dorpe 33e63b7bda TinyMCE: improve reposition method inline toolbars
* Make sure the toolbar does not overlap the target, unless it is higher than half the visible editor area's height.
* Allow the toolbar to have the preference to position itself above or below the target.
* Cache DOM lookups.
* Simplify the logic and fix various positioning issues.

See #32604.



git-svn-id: https://develop.svn.wordpress.org/trunk@32816 602fd350-edb4-49c9-b593-d223f7449a82
2015-06-17 04:41:59 +00:00
Ella Iseulde Van Dorpe 2b857dfdc3 JSHint after [32806]
See #32576.


git-svn-id: https://develop.svn.wordpress.org/trunk@32815 602fd350-edb4-49c9-b593-d223f7449a82
2015-06-17 04:14:06 +00:00
Boone Gorges f9ae6b826a Split all shared taxonomy terms on upgrade to 4.3.
Dear Shared Terms, Welcome to Splitsville. Population: You.

See #30261.

git-svn-id: https://develop.svn.wordpress.org/trunk@32814 602fd350-edb4-49c9-b593-d223f7449a82
2015-06-17 01:52:46 +00:00
Boone Gorges 4649b2345d Performance enhancements for `_split_shared_term()`.
* Introduce a `$record` parameter, which defaults to true. When set to false, `_split_shared_term()` will not keep a record of split term data in wp_options. The judicious use of this flag can greatly improve performance when processing shared terms in batches.
* Allow term/tt objects to be passed to the `$term_id` and `$term_taxonomy_id` parameters. This has the potential to save database queries when the objects are already available.

See #30261.

git-svn-id: https://develop.svn.wordpress.org/trunk@32813 602fd350-edb4-49c9-b593-d223f7449a82
2015-06-17 01:47:52 +00:00
John Blackbourn afd6dd79fe Comprehensive unit tests for every available capability, and for all roles.
Fixes #32394.


git-svn-id: https://develop.svn.wordpress.org/trunk@32812 602fd350-edb4-49c9-b593-d223f7449a82
2015-06-17 00:04:08 +00:00
John Blackbourn 177e0ed93e Ensure the `create_users` capability check checks the super admin status of the user in question, rather than the current user.
git-svn-id: https://develop.svn.wordpress.org/trunk@32811 602fd350-edb4-49c9-b593-d223f7449a82
2015-06-17 00:02:08 +00:00
Drew Jaynes 991237783d Add line-wrapping to a long return description because readability in documentation is important.
See [32797]. See #32421.


git-svn-id: https://develop.svn.wordpress.org/trunk@32810 602fd350-edb4-49c9-b593-d223f7449a82
2015-06-16 23:17:16 +00:00