Commit Graph

37167 Commits

Author SHA1 Message Date
Sergey Biryukov
6ac73689f4 Docs: Add a @global entry for $wp_filesystem in wp_ajax_install_theme(), wp_ajax_update_theme(), wp_ajax_delete_theme(), wp_ajax_install_plugin(), wp_ajax_update_plugin(), and wp_ajax_delete_plugin().
Props ronakganatra.
Fixes #41382.

git-svn-id: https://develop.svn.wordpress.org/trunk@41110 602fd350-edb4-49c9-b593-d223f7449a82
2017-07-20 13:46:14 +00:00
Sergey Biryukov
3f38a85894 Docs: Add @staticvar entries for get_html_split_regex() and _get_wptexturize_split_regex().
Props ajayghaghretiya1.
Fixes #41385.

git-svn-id: https://develop.svn.wordpress.org/trunk@41109 602fd350-edb4-49c9-b593-d223f7449a82
2017-07-20 13:37:19 +00:00
Sergey Biryukov
06f6f249bc Docs: Add @access entries for WP_Upgrader_Skin::set_upgrader(), ::request_filesystem_credentials(), and ::decrement_update_count().
See #41383.

git-svn-id: https://develop.svn.wordpress.org/trunk@41108 602fd350-edb4-49c9-b593-d223f7449a82
2017-07-20 13:34:07 +00:00
Sergey Biryukov
f62453c06f Docs: Add @access entry for Automatic_Upgrader_Skin::request_filesystem_credentials().
Props rushabh4486.
Fixes #41383.

git-svn-id: https://develop.svn.wordpress.org/trunk@41107 602fd350-edb4-49c9-b593-d223f7449a82
2017-07-20 13:32:19 +00:00
Sergey Biryukov
078f396b17 Docs: Add @access entries for Bulk_Upgrader_Skin::before() and ::after().
Props rushabh4486.
Fixes #41384.

git-svn-id: https://develop.svn.wordpress.org/trunk@41106 602fd350-edb4-49c9-b593-d223f7449a82
2017-07-20 13:24:05 +00:00
Sergey Biryukov
6229dd05b5 Docs: Change @version entry for WP_Http::buildCookieHeader() to @since.
See #41381.

git-svn-id: https://develop.svn.wordpress.org/trunk@41105 602fd350-edb4-49c9-b593-d223f7449a82
2017-07-20 13:14:50 +00:00
Sergey Biryukov
c6ba869397 Docs: Add @access entries for WP_Http::block_request(), ::handle_redirects(), and ::is_ip_address().
Props ronakganatra.
Fixes #41381.

git-svn-id: https://develop.svn.wordpress.org/trunk@41104 602fd350-edb4-49c9-b593-d223f7449a82
2017-07-20 13:13:09 +00:00
Sergey Biryukov
2a4d33f2c6 Docs: Add @access entries for before() and after() methods in Bulk_Plugin_Upgrader_Skin and Bulk_Theme_Upgrader_Skin.
See #41365.

git-svn-id: https://develop.svn.wordpress.org/trunk@41103 602fd350-edb4-49c9-b593-d223f7449a82
2017-07-20 12:08:19 +00:00
Sergey Biryukov
977c0592e0 Docs: Add @access entries for __construct() in WP_Upgrader_Skin, Bulk_Upgrader_Skin, Language_Pack_Upgrader_Skin, Plugin_Upgrader_Skin, and Theme_Upgrader_Skin.
Props rushabh4486.
Fixes #41376.

git-svn-id: https://develop.svn.wordpress.org/trunk@41102 602fd350-edb4-49c9-b593-d223f7449a82
2017-07-20 12:05:34 +00:00
Sergey Biryukov
d27ac87b78 Docs: Add @access entries for feedback() and error() methods in WP_Upgrader_Skin, Bulk_Upgrader_Skin, and Language_Pack_Upgrader_Skin.
See #41365.

git-svn-id: https://develop.svn.wordpress.org/trunk@41101 602fd350-edb4-49c9-b593-d223f7449a82
2017-07-20 11:59:16 +00:00
Sergey Biryukov
dbfa71a638 Docs: Add @access entries for $admin_header_callback and $admin_image_div_callback properties in Custom_Image_Header and Custom_Background.
Props rushabh4486.
Fixes #41377.

git-svn-id: https://develop.svn.wordpress.org/trunk@41100 602fd350-edb4-49c9-b593-d223f7449a82
2017-07-20 11:53:15 +00:00
Sergey Biryukov
348073994e Docs: Correct @access entry for Custom_Image_Header::default_headers.
Props rushabh4486.
Fixes #41378.

git-svn-id: https://develop.svn.wordpress.org/trunk@41099 602fd350-edb4-49c9-b593-d223f7449a82
2017-07-20 11:47:34 +00:00
James Nylen
df386b41a9 About page: Add a privacy policy.
Props MattyRob, johnbillion, swissspidy.
Fixes #40794.


git-svn-id: https://develop.svn.wordpress.org/trunk@41096 602fd350-edb4-49c9-b593-d223f7449a82
2017-07-19 21:41:13 +00:00
Weston Ruter
6e30e93d7f Widgets: Improve Text widget's reliability in syncing Visual tab's contents with Text tab and with hidden sync inputs.
Amends [40631].
Props azaozz, westonruter, rinkuyadav999 for testing.
See #35243.
Fixes #40974 for trunk.


git-svn-id: https://develop.svn.wordpress.org/trunk@41094 602fd350-edb4-49c9-b593-d223f7449a82
2017-07-19 20:48:28 +00:00
Andrew Ozz
8dcb1d0b39 TinyMCE: remove unused code from the wpeditimage plugin.
Fixes #41369.

git-svn-id: https://develop.svn.wordpress.org/trunk@41092 602fd350-edb4-49c9-b593-d223f7449a82
2017-07-19 13:40:31 +00:00
Sergey Biryukov
f2adcb8e52 Docs: Add @access entry for Automatic_Upgrader_Skin::feedback().
Props akbarhusen.
Fixes #41365.

git-svn-id: https://develop.svn.wordpress.org/trunk@41091 602fd350-edb4-49c9-b593-d223f7449a82
2017-07-19 11:13:19 +00:00
James Nylen
db6b7c6257 Tests: Be more helpful when the wordpress-importer plugin is missing.
Link to some documentation that explains the problem and how to resolve it.

Props enrico.sorcinelli.
Fixes #41345.


git-svn-id: https://develop.svn.wordpress.org/trunk@41090 602fd350-edb4-49c9-b593-d223f7449a82
2017-07-19 10:37:41 +00:00
Weston Ruter
af66f0b03e Widgets: Check for existence of wp.customize.state before attempting to access in Text widget.
Amends [40631].
See #35243.
Fixes #41361 for trunk.


git-svn-id: https://develop.svn.wordpress.org/trunk@41088 602fd350-edb4-49c9-b593-d223f7449a82
2017-07-18 22:35:47 +00:00
Weston Ruter
c941da4468 Widgets: Replace adding balanceTags on widget_custom_html_content filter in favor of just applying widget_text filters in the Custom HTML widget.
Ensures that users who copy HTML from the Text widget in legacy mode over to the Custom HTML widget will continue to get all of the same filters applied, including tag balancing and shortcodes, if a plugin added support. Plugins still have the `widget_text_content` and `widget_custom_html_content` filters they can use to target the specific widget types.

Amends [40893].
See #40951.
Fixes #40907 for trunk.


git-svn-id: https://develop.svn.wordpress.org/trunk@41086 602fd350-edb4-49c9-b593-d223f7449a82
2017-07-18 22:10:41 +00:00
James Nylen
9ddb744f33 Build: Switch PHP 5.2 and 5.3 to Travis' Ubuntu precise image
Starting today, Travis will begin switching the default image to `trusty`, which does not support PHP 5.2 or 5.3.

This is not a full fix, because Travis will be dropping `precise` support entirely in September (https://github.com/travis-ci/travis-ci/issues/8072).  However, it buys us some time until then.

Props netweb.
Fixes #41292 for trunk.


git-svn-id: https://develop.svn.wordpress.org/trunk@41072 602fd350-edb4-49c9-b593-d223f7449a82
2017-07-18 08:24:35 +00:00
Weston Ruter
0822890218 Widgets: Discount shortcodes and leading/trailing line breaks for triggering Text widget legacy mode.
Since plugin-added shortcode handling is just-in-time deferred to run after `wpautop`, there is no need to retain the presence of shortcodes to trigger legacy mode. Also updates Text widget legacy mode notice informing of Custom HTML widget.

Amends [41050].
Props westonruter, melchoyce.
Fixes #40951 for trunk.


git-svn-id: https://develop.svn.wordpress.org/trunk@41070 602fd350-edb4-49c9-b593-d223f7449a82
2017-07-18 04:16:16 +00:00
Felix Arntz
83af67a0e1 Multisite: Remove help text duplication on Edit Site screens in the network admin.
Prior to this change, the similar help tab and sidebar for these screens were all duplicated for each respective screen. This changeset introduces two internal admin functions `get_site_screen_help_tab_args()` and `get_site_screen_help_sidebar_content()` that make these available in a centralized location.

Props atanasangelovdev.
Fixes #41167.


git-svn-id: https://develop.svn.wordpress.org/trunk@41065 602fd350-edb4-49c9-b593-d223f7449a82
2017-07-17 20:52:26 +00:00
Felix Arntz
ca95a827b8 Multisite: Fix a user-facing message when adding a new site with a new user as admin.
Previously the message would falsely state that the username and password would be sent to the new user. It is actually a link to set the password that they receive in the email.

Props nishitlangaliya.
Fixes #41169.


git-svn-id: https://develop.svn.wordpress.org/trunk@41064 602fd350-edb4-49c9-b593-d223f7449a82
2017-07-17 20:22:08 +00:00
Felix Arntz
03b9931b7a Multisite: Improve caching in WP_Network_Query by ignoring the $fields argument.
Prior to this change there were two different cache keys used for the same query. That is because regardless of the `$fields` argument, the query response will be the same. This was already fixed for `WP_Site_Query` in [41059].

Props spacedmonkey.
Fixes #41347.


git-svn-id: https://develop.svn.wordpress.org/trunk@41063 602fd350-edb4-49c9-b593-d223f7449a82
2017-07-17 20:15:27 +00:00
Aaron Jorbin
eb78c8e092 Update autoprefixer browser support matrix
WordPress no longer supports many old old browsers: https://make.wordpress.org/core/2017/04/23/target-browser-coverage/

This also removes alot of no longer necessary CSS. It served us well, but we are never getting back together with IE8,9,10.

So, in the (paraphrased) words of Taylor Swift:

I remember when we dropped support  the first time
Saying, "This is it, I've had enough, " 'cause like
We hadn't seen many users in a month
When you said you needed flexbox. (What?)
Then you postMessage again and say
"IE8, I miss you and I swear I'm gonna change, trust me."
Remember how that lasted for a day?
I say, "I hate the box model, " we break up, you call me, "I love css-grids."
Ooh, we called it off again last night
But ooh, this time I'm telling you, I'm telling you

We are never ever ever supporting IE 8,9,10,
We are never ever ever supporting IE 8,9,10,
You go talk to EDGE, talk to my FIREFOX, talk to CHROME
But we are never ever ever ever getting back together
Like, ever...

Fixes #37651.
Props stunnedbeast, netweb, jorbin.




git-svn-id: https://develop.svn.wordpress.org/trunk@41062 602fd350-edb4-49c9-b593-d223f7449a82
2017-07-16 01:14:36 +00:00
Adam Silverstein
d2e18ea761 Move sanitizeText and stripTags from press this to wp.sanitize.
Introduce the `wp.sanitize` namespace and add two helpers for text sanitization. `stripTags` strips HTML tags from a string using regex.

Fixes #40635.


git-svn-id: https://develop.svn.wordpress.org/trunk@41061 602fd350-edb4-49c9-b593-d223f7449a82
2017-07-15 15:47:16 +00:00
Felix Arntz
55bb567e0f Multisite: Introduce a self_admin_url filter to adjust the URL to an administration panel.
Props j.hoffmann.
Fixes #37446.


git-svn-id: https://develop.svn.wordpress.org/trunk@41060 602fd350-edb4-49c9-b593-d223f7449a82
2017-07-14 23:00:55 +00:00
Felix Arntz
c8e811cc7e Multisite: Improve caching in WP_Site_Query by ignoring the $fields argument.
Prior to this change there were two different cache keys used for the same query. That is because regardless of the `$fields` argument, the query response will be the same.

Props spacedmonkey.
Fixes #41197.


git-svn-id: https://develop.svn.wordpress.org/trunk@41059 602fd350-edb4-49c9-b593-d223f7449a82
2017-07-14 21:24:03 +00:00
Felix Arntz
d18c6696c2 Multisite: Use get_network_option() for language in wpmu_create_blog().
Before this changeset, the language of a new site would always result in the language of the current network, regardless of the `$site_id` parameter passed that actually determines the network for the site. Now the correct `WPLANG` value is used in such cases.

Alongside this change, a few minor documentation changes around the function have been made to account for the current naming conventions of sites and networks.

Props spacedmonkey.
Fixes #40503.


git-svn-id: https://develop.svn.wordpress.org/trunk@41058 602fd350-edb4-49c9-b593-d223f7449a82
2017-07-14 21:07:17 +00:00
Weston Ruter
e85f291a79 Widgets: Add legacy mode for Text widget and add usage pointers to default visual mode.
The Text widget in legacy mode omits TinyMCE and retains old behavior for matching pre-existing Text widgets. Usage pointers added to default visual mode appear when attempting to paste HTML code into the Visual tab and when clicking on the Text tab, informing users of the new Custom HTML widget.

Props westonruter, melchoyce, gitlost for testing, obenland for testing, dougal for testing, afercia for testing.
See #35243.
Fixes #40951.


git-svn-id: https://develop.svn.wordpress.org/trunk@41050 602fd350-edb4-49c9-b593-d223f7449a82
2017-07-14 17:08:20 +00:00
Weston Ruter
b60a603d50 REST API: Ensure maxwidth and maxheight params are forwarded to oEmbed provider in proxy requests.
Also correct phpdoc return tag on `WP_oEmbed_Controller::get_proxy_item()` and remove dead code in oEmbed controller phpunit tests.

Amends [40628].
See #40450.
Fixes #41299.


git-svn-id: https://develop.svn.wordpress.org/trunk@41047 602fd350-edb4-49c9-b593-d223f7449a82
2017-07-14 16:04:04 +00:00
Gary Pendergast
dac056e135 Emoji: Store the results of the emoji_url and emoji_ext filters in statics.
Previously, these filters were being run once per post, but the changes in [41043] caused them to be run once per emoji found.

We will not stand idly by while this kind of unfair performance penalty is placed on the emoji literate. The filters are now run once only, emoji aficionados everywhere can rest easy, knowing their posts will be just as performant as their emoji-less cousins.

Props ocean90 for noticing this severe oversight.
See #35293.



git-svn-id: https://develop.svn.wordpress.org/trunk@41046 602fd350-edb4-49c9-b593-d223f7449a82
2017-07-14 12:44:49 +00:00
Gary Pendergast
4bad064c24 Emoji: Fix some failing unit tests in PHP 5.2 and 5.3.
- Older versions of PHP don't know how to `html_entity_decode()` emoji.
- The fall back regex was a little too broad, catching characters that aren't emoji.

See #35293.



git-svn-id: https://develop.svn.wordpress.org/trunk@41045 602fd350-edb4-49c9-b593-d223f7449a82
2017-07-14 11:49:34 +00:00
Gary Pendergast
f780ce0a49 Emoji: Port the Twemoji regex to PHP.
Previously, `wp_encode_emoji()` and `wp_staticize_emoji()` used inaccurate regular expressions to find emoji, and transform then into HTML entities or `<img>`s, respectively. This would result in emoji not being correctly transformed, or occasionally, non-emoji being incorrectly transformed.

This commit adds a new `grunt` task - `grunt precommit:emoji`. It finds the regex in `twemoji.js`, transforms it into a PHP-friendly version, and adds it to `formatting.php`. This task is also automatically run by `grunt precommit`, when it detects that `twemoji.js` has changed.

The new regex requires features introduced in PCRE 8.32, which was introduced in PHP 5.4.14, though it was also backported to later releases of the PHP 5.3 series. For versions of PHP that don't support this, it will fall back to an updated version of the loose-matching regex.

For short posts, the performance difference between the old and new regex is negligible. As the posts get longer, however, the new method is exponentially faster.

Fixes #35293.



git-svn-id: https://develop.svn.wordpress.org/trunk@41043 602fd350-edb4-49c9-b593-d223f7449a82
2017-07-14 05:46:19 +00:00
Drew Jaynes
666b9d7ccd Docs: Improve the DocBlock summary for WP_Query::parse_orderby().
See #41017.


git-svn-id: https://develop.svn.wordpress.org/trunk@41042 602fd350-edb4-49c9-b593-d223f7449a82
2017-07-13 15:43:12 +00:00
Drew Jaynes
f72de4fff3 Docs: Document usage of the $wpdb global in WP_Query::parse_search() and WP_Query::parse_orderby().
Props avinapatel.
Fixes #41313.


git-svn-id: https://develop.svn.wordpress.org/trunk@41041 602fd350-edb4-49c9-b593-d223f7449a82
2017-07-13 15:41:15 +00:00
Sergey Biryukov
d3f21c09f8 Docs: Add a @global entry for $tinymce_version in _WP_Editors::editor_js().
Props jontyravi.
Fixes #41311.

git-svn-id: https://develop.svn.wordpress.org/trunk@41040 602fd350-edb4-49c9-b593-d223f7449a82
2017-07-13 14:32:57 +00:00
Sergey Biryukov
517e11f834 Docs: Add a @global entry for $wpdb in is_user_member_of_blog().
Props ajayghaghretiya1.
Fixes #41308.

git-svn-id: https://develop.svn.wordpress.org/trunk@41039 602fd350-edb4-49c9-b593-d223f7449a82
2017-07-13 13:53:28 +00:00
Boone Gorges
834c29fbc6 Taxonomy: Avoid duplicates when querying for terms in taxonomies registered with $args parameter.
[40514] introduced a bug that caused term queries to return some duplicates
when the `$taxonomies` array contained only taxonomies that were originally
registered with an `$args` array. We fix this bug by ensuring that
recursive `get_terms()` queries stop when all queried `$taxonomies` have
already been referenced.

Props bor0, atanasangelovdev.
Fixes #41010.

git-svn-id: https://develop.svn.wordpress.org/trunk@41037 602fd350-edb4-49c9-b593-d223f7449a82
2017-07-13 13:40:39 +00:00
Sergey Biryukov
5b384419f6 Docs: Add missing @since tags for WP_Post properties and methods.
Props keesiemeijer.
Fixes #41306.

git-svn-id: https://develop.svn.wordpress.org/trunk@41036 602fd350-edb4-49c9-b593-d223f7449a82
2017-07-13 12:07:56 +00:00
Weston Ruter
f57be206f7 REST API: Remove _wpnonce value from being used in hashed oEmbed proxy cache key.
Amends [40628].
Props r-a-y, westonruter.
See #40450.
Fixes #41048.


git-svn-id: https://develop.svn.wordpress.org/trunk@41035 602fd350-edb4-49c9-b593-d223f7449a82
2017-07-12 22:50:57 +00:00
Drew Jaynes
f628aaacda Docs: Use a hash notation for the $args parameter to describe the fields argument in the DocBlock for wp_get_post_terms().
Also, the `$taxonomy` parameter can accept either a string or array of taxonomies.

Props ohryan for the initial tip.
See #41017.


git-svn-id: https://develop.svn.wordpress.org/trunk@41034 602fd350-edb4-49c9-b593-d223f7449a82
2017-07-12 22:20:16 +00:00
Drew Jaynes
994ef530d1 Docs: Default for the orderby argument in wp_list_categories() is actually 'name', not 'ID'.
Props uicestone.
See #41017.


git-svn-id: https://develop.svn.wordpress.org/trunk@41033 602fd350-edb4-49c9-b593-d223f7449a82
2017-07-12 22:05:54 +00:00
Sergey Biryukov
7e8d932935 Docs: Add a @global entry for $allowed_files in get_file_description().
Props div33, ajayghaghretiya1.
Fixes #41294.

git-svn-id: https://develop.svn.wordpress.org/trunk@41032 602fd350-edb4-49c9-b593-d223f7449a82
2017-07-12 21:39:37 +00:00
Sergey Biryukov
cf4b8bc85f Docs: Fix typo in wp_suspend_cache_invalidation() description.
Props euthelup, milana_cap.
Fixes #41301.

git-svn-id: https://develop.svn.wordpress.org/trunk@41031 602fd350-edb4-49c9-b593-d223f7449a82
2017-07-12 21:25:20 +00:00
Sergey Biryukov
90aca8c4d7 Docs: Add a @global entry for $wpdb in display_setup_form().
Props mitraval192.
Fixes #41300.

git-svn-id: https://develop.svn.wordpress.org/trunk@41030 602fd350-edb4-49c9-b593-d223f7449a82
2017-07-12 21:02:35 +00:00
Peter Westwood
4741b13009 Tests: Rename this file to match our coding standards.
git-svn-id: https://develop.svn.wordpress.org/trunk@41029 602fd350-edb4-49c9-b593-d223f7449a82
2017-07-12 20:55:36 +00:00
Weston Ruter
6daeb23005 Widgets: Enqueue assets needed by media and text widgets in their _register_one() methods.
The `WP_Widget::_register_one()` method is more guaranteed to be called as opposed to its wrapper `WP_Widget::_register()` which plugins may bypass for performance reasons.

Amends [40631], [40640].
See #35243, #32417.
Fixes #41021.


git-svn-id: https://develop.svn.wordpress.org/trunk@41028 602fd350-edb4-49c9-b593-d223f7449a82
2017-07-11 22:46:45 +00:00
Sergey Biryukov
1c017250b7 Users: Add a "View" link to users listed on the Users screen that points to the user's author archive.
Props ryanplas, johnjamesjacoby, viralsampat, Girishpanchal, xkon.
Fixes #38085.

git-svn-id: https://develop.svn.wordpress.org/trunk@41027 602fd350-edb4-49c9-b593-d223f7449a82
2017-07-11 13:29:51 +00:00
Sergey Biryukov
e4bfc8ca90 Shortcodes: Allow using single quotes for empty value attributes.
Props enrico.sorcinelli.
Fixes #37304.

git-svn-id: https://develop.svn.wordpress.org/trunk@41026 602fd350-edb4-49c9-b593-d223f7449a82
2017-07-11 00:53:33 +00:00