Also only exclude these characters for the `words` type. They should be counted for other types.
Add the ASCIIOnly option to the uglify config to preserve escaped unicode characters.
See #30966. Fixes#27391.
git-svn-id: https://develop.svn.wordpress.org/trunk@33292 602fd350-edb4-49c9-b593-d223f7449a82
Don't nest `esc_attr()` and `htmlspecialchars()` when escaping the post title on the edit post screen.
Unrevert parts of [32851] and [32850].
Adds/alters unit tests.
Props miqrogroove.
Fixes#17780.
git-svn-id: https://develop.svn.wordpress.org/trunk@33271 602fd350-edb4-49c9-b593-d223f7449a82
This prevents existing posts with numeric slugs from having their permalinks
changed on update.
Fixes#5305.
git-svn-id: https://develop.svn.wordpress.org/trunk@33262 602fd350-edb4-49c9-b593-d223f7449a82
Reduce some of the clutter in `tests/multisite/site.php` and introduce `tests/multisite/updateBlogDetails.php`. Tests moved over are verbatum at this point.
See #32988.
git-svn-id: https://develop.svn.wordpress.org/trunk@33253 602fd350-edb4-49c9-b593-d223f7449a82
Previously, attempting to run certain test files in isolation would resultin
fatal errors, as the parent classes had not been loaded.
Props isaacchapman.
Fixes#32984.
git-svn-id: https://develop.svn.wordpress.org/trunk@33250 602fd350-edb4-49c9-b593-d223f7449a82
Falling back to Apple app icons is deprecated behavior and will not work
forever. 192px is the recommended size for that icon.
Props kraftbj.
Fixes#32964.
git-svn-id: https://develop.svn.wordpress.org/trunk@33202 602fd350-edb4-49c9-b593-d223f7449a82
* Add an `$exclude` parameter to `recurse_dirsize()`.
* Use this parameter in `get_dirsize()` to exclude `/sites` when on the main site.
* Add tests for main site and switched site.
Props @earnjam, @jeremyfelt.
Fixes#30202.
git-svn-id: https://develop.svn.wordpress.org/trunk@33184 602fd350-edb4-49c9-b593-d223f7449a82
Test to make sure that dbDelta properly inserts a value into the DB.
Props tryon, jtsternberg, ebinnion, JPry, avnarun, kevkoeh, salcode.
Fixes#29020.
git-svn-id: https://develop.svn.wordpress.org/trunk@33175 602fd350-edb4-49c9-b593-d223f7449a82
In step with the UI provided by `wp-admin/network/users.php`, super admin privileges must be removed before a user can be deleted through the API.
Props @johnjamesjacoby, @jeremyfelt.
Fixes#32935.
git-svn-id: https://develop.svn.wordpress.org/trunk@33143 602fd350-edb4-49c9-b593-d223f7449a82
Also includes these related changes:
* Export `oldContainer` and `newContainer` among the `customize-preview-menu-refreshed` event params for themes to be able to more easily re-initialize the DOM elements.
* Improve performance for partial refresh by only sending settings related to the menu being previewed.
* Fix previewing of menu assigned to Custom Menu by exporting a menu `term_id` as opposed to an object, as the former is more stable for comparing in in args hashes.
* Do full refresh of preview when nav menu unassigned so that the layout can be updated.
* Harden conditions for when partial refresh is eligible for a `wp_nav_menu()` instance.
Fixes#32841.
git-svn-id: https://develop.svn.wordpress.org/trunk@33138 602fd350-edb4-49c9-b593-d223f7449a82
These args only need to be cleared out when exported to JavaScript, when they are not JSON-serializable. So the filter now clears these when gathering args for exporting to JS, but otherwise now leaves the original values to be passed through to `wp_nav_menu()`.
Fixes#32781.
git-svn-id: https://develop.svn.wordpress.org/trunk@33131 602fd350-edb4-49c9-b593-d223f7449a82
Includes two modifications for WordPress:
* Removes support for NTLM in `class-smtp.php` since the required client (`extras/ntlm_sasl_client.php`) is not distributed as part of WordPress.
* Requires `class-smtp.php` for backwards compatibility with direct (non-wp_mail()) uses of PHPMailer, as the autoloader isn't used. See [27385].
This also includes a change to our `MockMailer` for unit tests. It now overrides `postSend() instead of `send()`, and `preSend()`.
`preSend()` resets `$this->Encoding` because PHPMailer doesn't clean up after itself / presets all variables. This becomes an issue when `PHPMailer::createBody()` sets `$this->Encoding = 'quoted-printable'` (away from it's default of 8bit) when it encounters a line longer than 998 characters. `Tests_Comment::test_comment_field_lengths` is such a case.
props MattyRob, dd32.
fixes#28909.
git-svn-id: https://develop.svn.wordpress.org/trunk@33124 602fd350-edb4-49c9-b593-d223f7449a82
If you are subclassing these classes in your own tests, you'll need to update your code.
Props johnbillion
See #31982
git-svn-id: https://develop.svn.wordpress.org/trunk@33123 602fd350-edb4-49c9-b593-d223f7449a82
In cases where a user has the `edit_others_posts` capability but not
`publish_posts`, it was possible for that user to unstick a post after editing,
since the input field was never made available in that context.
Props ericmann, chriscct7.
Fixes#24153.
git-svn-id: https://develop.svn.wordpress.org/trunk@33096 602fd350-edb4-49c9-b593-d223f7449a82
Only 60 characters can be stored in the database for a username, which could cause lookup issues when attempting to use similar usernames of extreme length.
Props @DJPaul.
See #17904, Fixes#26784.
git-svn-id: https://develop.svn.wordpress.org/trunk@33083 602fd350-edb4-49c9-b593-d223f7449a82
Adds validation for initially-supplied nav menu name, blocking empty names from being supplied. If later an empty name is supplied and the nav menu is saved, the name "(unnamed)" will be supplied instead and supplied back to the client. If a name is supplied for the menu which is currently used by another menu, then the name conflict is resolved by adding a numerical counter similar to how `post_name` conflicts are resolved. Includes unit tests.
Fixes#32760.
git-svn-id: https://develop.svn.wordpress.org/trunk@33071 602fd350-edb4-49c9-b593-d223f7449a82
The mailto protocol is a bit different than the other protocols in that new lines are something you might realistically want to include. Includes tests to make sure that http protocol urls that contain mailto: aren't affected. Tests for stripping newlines in general already exist.
Fixes#31632
Props danielbachhuber
git-svn-id: https://develop.svn.wordpress.org/trunk@33064 602fd350-edb4-49c9-b593-d223f7449a82
Pages are static content, for which comments are not expected out of the box.
Props valendesigns, rachelbaker.
Fixes#31168.
git-svn-id: https://develop.svn.wordpress.org/trunk@33041 602fd350-edb4-49c9-b593-d223f7449a82
* A variant of a language has its own locale, for example the locale of the formal variant of German is `de_DE_formal`.
* Update `remove_accents()` and some CSS rules to support `de_DE_formal`.
* Add tests for `get_bloginfo( 'language' )`.
* API changes will be deployed over the next few days.
see #28303.
git-svn-id: https://develop.svn.wordpress.org/trunk@33027 602fd350-edb4-49c9-b593-d223f7449a82
The new parameter creates inconsistencies in the signatures of the various
functions for fetching term links (`get_term_feed_link()`,
`get_edit_term_link()`, etc.).
Reverts [32553].
See #14156.
git-svn-id: https://develop.svn.wordpress.org/trunk@33022 602fd350-edb4-49c9-b593-d223f7449a82
[32994] results in an additional database query during automated testing, so
the query count being compared in this specific test must be incremented
manually.
See #16434.
git-svn-id: https://develop.svn.wordpress.org/trunk@32997 602fd350-edb4-49c9-b593-d223f7449a82
This filter allows developers to modify the data that is used to create tag
clouds, without having to manipulate the tag cloud markup directly.
As part of the refactor, this changeset also adds a few unit tests for the way
`wp_generate_tag_cloud()` generates the 'title' attribute, as well as
improvements to output escaping.
Props flixos90, ysalame.
Fixes#24656.
git-svn-id: https://develop.svn.wordpress.org/trunk@32996 602fd350-edb4-49c9-b593-d223f7449a82
PHP7 is deprecating PHP4 style constructors, so we need to modify our code to have _construct methods that fire before the named PHP4 style constructors. The PHP4 style constructors will call the PHP5 style constructor in case it is being called directly (usually via parent::METHOD).
This modifies external libraries to add PHP5 style constructors, but doesn't add a notice for when they are used. In WordPress core code, PHP4 style constructors are being given a call to _deprecated_constructor. To the PHP4 style constructor I say "I know that I can't take no more | It ain't no lie | I wanna see you out that door | Baby, bye, bye, bye..."
Upstream: https://wiki.php.net/rfc/remove_php4_constructors
Props jdgrimes, netweb, jorbin
See #31982
git-svn-id: https://develop.svn.wordpress.org/trunk@32990 602fd350-edb4-49c9-b593-d223f7449a82