"Please enter the same password in both password fields" should cover all the scenarios.
Props MikeHansenMe, jmayhak, desrosj, gounder.
Fixes#33101.
git-svn-id: https://develop.svn.wordpress.org/trunk@35008 602fd350-edb4-49c9-b593-d223f7449a82
As the number of multidimensional settings (serialized options and theme mods) increase for a given ID base (e.g. a widget of a certain type), the number of calls to the `multidimensional` methods on `WP_Customize_Setting` increase exponentially, and the time for the preview to refresh grows in time exponentially as well.
To improve performance, this change reduces the number of filters needed to preview the settings off of a multidimensional root from N to 1. This improves performance from `O(n^2)` to `O(n)`, but the linear increase is so low that the performance is essentially `O(1)` in comparison. This is achieved by introducing the concept of an "aggregated multidimensional" setting, where the root value of the multidimensional serialized setting value gets cached in a static array variable shared across all settings.
Also improves performance by only adding preview filters if there is actually a need to do so: there is no need to add a filter if there is an initial value and if there is no posted value for a given setting (if it is not dirty).
Fixes#32103.
git-svn-id: https://develop.svn.wordpress.org/trunk@35007 602fd350-edb4-49c9-b593-d223f7449a82
* It works correctly for RTL
* Requires less CSS styling
* Is visually consistent with plugin ratings
* Is more accessible
Fixes#34080.
git-svn-id: https://develop.svn.wordpress.org/trunk@35006 602fd350-edb4-49c9-b593-d223f7449a82
In all three cases, the functions can accept a post ID, a `WP_Post` object, or a falsey value, which defaults to the value of the global `$post`. Switching to `$post` in this context allows the parameters to better self-document and removes ambiguity in the code they are subsequently used in.
Props chriscct7 for the initial patch.
See #34234.
git-svn-id: https://develop.svn.wordpress.org/trunk@35001 602fd350-edb4-49c9-b593-d223f7449a82
A side effect of this change is that terms stored in the cache no longer have
an `object_id` associated with them. Previously, `object_id` had always been
cached when the term cache was populated via `wp_get_object_terms()`, a
strategy that was mostly harmless but still incorrect.
See #14162.
git-svn-id: https://develop.svn.wordpress.org/trunk@34999 602fd350-edb4-49c9-b593-d223f7449a82
`get_term()` now returns a `WP_Term` object, instead of a `stdClass` object.
Cache support and sanitization filters for individual terms are now more
centralized. For example, `get_term_by()` is able to cast results of its query
to a `WP_Term` object by passing it through `get_term()`.
The `$taxonomy` parameter for `get_term()` is now optional, as terms ought to
be unique to a taxonomy (ie, shared terms no longer exist). In cases where
`get_term()` detects that the term matching the specified term_id is from the
wrong taxonomy, it checks to see if you've requested a shared term, and if so,
it splits the term. This is used only for fallback purposes.
The elimination of shared terms allows the caching strategy for terms to be
simplified. Individual terms are now cached in a single 'terms' bucket.
Props flixos90, boonebgorges, scribu, dipesh.kakadiya.
See #14162.
git-svn-id: https://develop.svn.wordpress.org/trunk@34997 602fd350-edb4-49c9-b593-d223f7449a82
The `theme_page_templates` hook was originally added in [27297] as `page_templates`, and later renamed in [27470]. Previously, it was only possible to remove or rename page templates via this hook.
Fixes#13265. Fixes#25879.
git-svn-id: https://develop.svn.wordpress.org/trunk@34995 602fd350-edb4-49c9-b593-d223f7449a82
These H5 (heading level 5) don't allow for a good headings hierarchy and shouldn't be headings in the first place. Each group of options has now its own fieldset and legend.
In `render_screen_options()`, introduce two new "render" methods: `render_meta_boxes_preferences()` and `render_list_table_columns_preferences()` for consistency with already existing render methods and cleaner code.
Props joedolson, afercia.
Fixes#33646.
git-svn-id: https://develop.svn.wordpress.org/trunk@34991 602fd350-edb4-49c9-b593-d223f7449a82
Because the media modal can be used on the front-end, the CSS needs to be added here rather than using the notice classes.
props paulwilde.
fixes#32244.
git-svn-id: https://develop.svn.wordpress.org/trunk@34990 602fd350-edb4-49c9-b593-d223f7449a82
The 'do not' is converted to "don't" because "you" is third-person plural, and 'does not' is converted to "doesn't" because `localhost` is third-person singular. While both are "negative" contractions, we often write this way in WordPress to provide a friendlier tone. That's your English grammar lesson for the day.
Props ankit-k-gupta, iamfriendly.
Fixes#30317.
git-svn-id: https://develop.svn.wordpress.org/trunk@34987 602fd350-edb4-49c9-b593-d223f7449a82
`random_compat` offers a set of compatible functions for older versions of PHP, filling in the gap by using other PHP extensions when available.
We still include our existing `wp_rand()` functionality as a fallback for when no proper CSPRNG exists on the system.
Take Two, this was previously committed in [34922] but had an issue on PHP 5.2 which sarciszewski has now resolved.
Props sarciszewski
See #28633
git-svn-id: https://develop.svn.wordpress.org/trunk@34981 602fd350-edb4-49c9-b593-d223f7449a82
This brings them in line with updated buttons as done in [34948] for #31459. It also gives it secondary action styling as opposed to primary, as restoring is considered the primary action.
props hugobaeta.
fixes#34220.
git-svn-id: https://develop.svn.wordpress.org/trunk@34976 602fd350-edb4-49c9-b593-d223f7449a82
While it might seem counter-intuitive to remove HTML escaping, these fields are already safe (they originate in `_get_plugin_data_markup_translate()` which handles sanitization and escaping), and the AuthorName field actually allows some HTML. This change prevents escaped HTML from appearing here.
Fixes#25422
git-svn-id: https://develop.svn.wordpress.org/trunk@34973 602fd350-edb4-49c9-b593-d223f7449a82
`$blog_id` is used in both single and multisite configurations as a global variable, though has never been explicitly marked as such in the global scope. This can cause confusion depending on how core is loaded.
Fixes#34217.
git-svn-id: https://develop.svn.wordpress.org/trunk@34961 602fd350-edb4-49c9-b593-d223f7449a82