Commit Graph

35485 Commits

Author SHA1 Message Date
Aaron Jorbin
4484e2d2c3 Formatting: Allow KSES custom elements with hyphens
The W3C Custom Elements spec (http://www.w3.org/TR/custom-elements/#concepts) allows you to use your own custom DOM elements/tags. One of the main requirements is that the tag name "must contain a U+002D HYPHEN-MINUS character". This adjusts KSES to allow it.

Fixes #34105.
Props batmoo.



git-svn-id: https://develop.svn.wordpress.org/trunk@38511 602fd350-edb4-49c9-b593-d223f7449a82
2016-09-02 04:16:00 +00:00
Sergey Biryukov
cce5a95dfa I18N: Add translator comments for XML-RPC strings with placeholders.
See #37792.

git-svn-id: https://develop.svn.wordpress.org/trunk@38510 602fd350-edb4-49c9-b593-d223f7449a82
2016-09-02 04:12:52 +00:00
Aaron Jorbin
a5cc61ef67 Text Changes: Improve Error messages in XML-RPC
Three changes to the error message strings:
 * add some missing periods.
 * merge similar translation strings.
 * remove the "Something wrong happened" suffix.

Fixes #37792.
Props ramiy.



git-svn-id: https://develop.svn.wordpress.org/trunk@38509 602fd350-edb4-49c9-b593-d223f7449a82
2016-09-02 03:56:22 +00:00
Aaron Jorbin
43ca412094 Toolbar: Add unit tests for edit links.
When there is no post ID, there should be no edit link. This adds unit tests for it.

Fixes #22247.
Props akibjorklund.


git-svn-id: https://develop.svn.wordpress.org/trunk@38508 602fd350-edb4-49c9-b593-d223f7449a82
2016-09-02 03:51:01 +00:00
Gary Pendergast
4afafbde25 Database: Find the correct table names in DELETE queries with table aliases
Previously, `wpdb::get_table_from_query()` would not find the correct table name in the query `DELETE a FROM table a`, due to not recognising the table alias immediately after the `DELETE` as correct syntax.

Fixes #37660.



git-svn-id: https://develop.svn.wordpress.org/trunk@38507 602fd350-edb4-49c9-b593-d223f7449a82
2016-09-02 00:18:49 +00:00
Gary Pendergast
6d59b289a9 Shortcodes: Add the pre_do_shortcode_tag filter.
This filter allows the shortcode generation process to be short-circuited, so expensive short codes can be cached and returned immediately.

Props ideag.
Fixes #37906.



git-svn-id: https://develop.svn.wordpress.org/trunk@38506 602fd350-edb4-49c9-b593-d223f7449a82
2016-09-02 00:09:42 +00:00
Sergey Biryukov
74cee3d59c Docs: Correct @since entry for the smilies filter added in [38504].
See #35905.

git-svn-id: https://develop.svn.wordpress.org/trunk@38505 602fd350-edb4-49c9-b593-d223f7449a82
2016-09-02 00:07:22 +00:00
Gary Pendergast
5b85aa163f Smilies: Add the smilies filter.
This new filter allows the smilies array to be modified with a filter, instead of having to directly access the global.

Props mte90, jorbin.
Fixes #35905.



git-svn-id: https://develop.svn.wordpress.org/trunk@38504 602fd350-edb4-49c9-b593-d223f7449a82
2016-09-01 23:59:59 +00:00
Andrea Fercia
770a150b42 Accessibility: Make links in the Customizer underlined by default.
Links within lines or blocks of text should always be underlined since they can't
rely on color alone to be distinguished from the surrounding text. Exceptions
can be handled on a case-by-case basis.

Props Presskopp for the initial patch.
Fixes #37527.


git-svn-id: https://develop.svn.wordpress.org/trunk@38503 602fd350-edb4-49c9-b593-d223f7449a82
2016-09-01 22:01:44 +00:00
Aaron Jorbin
5387a52a0b Administration: Use a bool when when a bool is called for
The third parameter of `date_i18n` is a bool.  Currently, it's a weak check, otherwise the call showing the universal time on the "General Settings" screen would be messed up. Use an actual bool so we call our own functions correctly.

Fixes #37634.
Props fronaldaraujo.



git-svn-id: https://develop.svn.wordpress.org/trunk@38502 602fd350-edb4-49c9-b593-d223f7449a82
2016-09-01 18:33:07 +00:00
Aaron Jorbin
f9e9854395 Administration: Use #fff instead of white
Cleans up a few places where the CSS coding standards were not being followed.

Fixes #37576.
Props Presskopp, johnpgreen, netweb



git-svn-id: https://develop.svn.wordpress.org/trunk@38501 602fd350-edb4-49c9-b593-d223f7449a82
2016-09-01 18:13:21 +00:00
Boone Gorges
78df32df4e Query: 'orderby=include' should support comma-separated lists.
[30052] assumed that 'include' would be an array.

Props TimothyBlynJacobs.
Fixes #37904.

git-svn-id: https://develop.svn.wordpress.org/trunk@38500 602fd350-edb4-49c9-b593-d223f7449a82
2016-09-01 16:50:47 +00:00
Gary Pendergast
4d4f78ae97 Bootstrap: class-wp-locale.php needs to be require_once()-ed.
After [38364], the inclusion of `class-wp-locale.php` was changed from a `require_once()` to a `require()`. This caused problems for anything that called `load_text_domain_early()` prior to the `require()` but didn't bail, as it was now being `require()`-ed a second time.

With the use of `require_once()`, it doesn't really matter where it's loaded, so it has been moved next to the related `l10n.php` load.

See #37827.



git-svn-id: https://develop.svn.wordpress.org/trunk@38496 602fd350-edb4-49c9-b593-d223f7449a82
2016-09-01 12:35:37 +00:00
Sergey Biryukov
dc5951f460 Docs: Move term_description() reference from filter docblock to get_the_archive_description() function docblock.
Props dlh.
See #37259.

git-svn-id: https://develop.svn.wordpress.org/trunk@38495 602fd350-edb4-49c9-b593-d223f7449a82
2016-09-01 12:31:22 +00:00
Sergey Biryukov
c43b1d16ae Users: After [33766], don't reset the password when clicking "Show Password" and then "Cancel" on Add New User screen.
Props smerriman for reporting.
Fixes #37902. See #33419.

git-svn-id: https://develop.svn.wordpress.org/trunk@38494 602fd350-edb4-49c9-b593-d223f7449a82
2016-09-01 12:23:50 +00:00
Sergey Biryukov
b024ec7c46 Template: After [38486], actually use the $description variable in get_the_archive_description().
Props dlh.
Fixes #37259.

git-svn-id: https://develop.svn.wordpress.org/trunk@38493 602fd350-edb4-49c9-b593-d223f7449a82
2016-09-01 11:46:58 +00:00
Weston Ruter
db0fedd69f Customize: Introduce paneVisible state and ensure pane is visible when a construct is expanded (or focused).
Fixes issue whereby a user would see nothing happen if the pane is collapsed while they shift-click to edit an element in the preview.

Props curdin, celloexpressions, westonruter.
See #27403.
Fixes #36678.


git-svn-id: https://develop.svn.wordpress.org/trunk@38492 602fd350-edb4-49c9-b593-d223f7449a82
2016-09-01 05:54:32 +00:00
Dion Hulse
0b67b63857 Query: Use AND in a SQL query rather than &&.
This appears to have been the only instance of `&&` being used in SQL, so for consistency lets remove it.

Props scrappy@hub.org.
Fixes #37903.


git-svn-id: https://develop.svn.wordpress.org/trunk@38491 602fd350-edb4-49c9-b593-d223f7449a82
2016-09-01 05:10:07 +00:00
John Blackbourn
2781473733 Taxonomy: Correct the function description for wp_ajax_add_link_category().
See #37770


git-svn-id: https://develop.svn.wordpress.org/trunk@38490 602fd350-edb4-49c9-b593-d223f7449a82
2016-09-01 00:48:42 +00:00
John Blackbourn
f30caa604d Taxonomy: Update various docs for parameters which are now WP_Term objects.
See #37770
See #14162


git-svn-id: https://develop.svn.wordpress.org/trunk@38489 602fd350-edb4-49c9-b593-d223f7449a82
2016-09-01 00:39:44 +00:00
Sergey Biryukov
ca40b18e81 Template: In get_the_archive_description(), add support for author archives.
Props henry.wright.
Fixes #37259.

git-svn-id: https://develop.svn.wordpress.org/trunk@38486 602fd350-edb4-49c9-b593-d223f7449a82
2016-08-31 23:00:36 +00:00
Sergey Biryukov
b08ba54e61 Taxonomy: Introduce wp_insert_term_data and wp_update_term_data filters for altering term data before it is inserted/updated in the database.
Props atimmer, SergeyBiryukov.
Fixes #22293.

git-svn-id: https://develop.svn.wordpress.org/trunk@38484 602fd350-edb4-49c9-b593-d223f7449a82
2016-08-31 21:40:18 +00:00
Andrea Fercia
2dcc7bc665 Text Changes: Improve the timezone setting description in General Settings.
Makes more clear users can set either a city or a UTC timezone offset.

Props GrantDerepas, andrew.p.
Fixes #34789.


git-svn-id: https://develop.svn.wordpress.org/trunk@38483 602fd350-edb4-49c9-b593-d223f7449a82
2016-08-31 21:36:25 +00:00
John Blackbourn
f5bb93e4ac Role/Capability: Add two missing meta capabilities to the caps tests.
See #32394


git-svn-id: https://develop.svn.wordpress.org/trunk@38482 602fd350-edb4-49c9-b593-d223f7449a82
2016-08-31 21:33:44 +00:00
Sergey Biryukov
6c1e64d76d Users: Pass $profileuser parameter to user_profile_picture_description filter on "Edit User" screen.
Props turtlepod, deremohan.
Fixes #37379.

git-svn-id: https://develop.svn.wordpress.org/trunk@38481 602fd350-edb4-49c9-b593-d223f7449a82
2016-08-31 21:12:29 +00:00
Scott Taylor
50625a3180 Bootstrap: goodnight sweet prince.
See #36335.


git-svn-id: https://develop.svn.wordpress.org/trunk@38480 602fd350-edb4-49c9-b593-d223f7449a82
2016-08-31 20:35:58 +00:00
Weston Ruter
1dfd45923e Customize: Fix i18n by re-using the add_new_item post type label instead of using a post type name in a generic string.
Props afercia, westonruter.
See #34923.
Fixes #37895.


git-svn-id: https://develop.svn.wordpress.org/trunk@38479 602fd350-edb4-49c9-b593-d223f7449a82
2016-08-31 19:14:54 +00:00
Weston Ruter
6631163639 Customize: Use new $status_code parameter for wp_send_json_error() instead of calling status_header() separately.
Props johnbillion.
See #35666.
Fixes #37897.


git-svn-id: https://develop.svn.wordpress.org/trunk@38478 602fd350-edb4-49c9-b593-d223f7449a82
2016-08-31 19:00:59 +00:00
Sergey Biryukov
73c5683903 Login and Registration: Change login label to Username or Email Address for clarity.
Props GaryJ.
Fixes #37871.

git-svn-id: https://develop.svn.wordpress.org/trunk@38477 602fd350-edb4-49c9-b593-d223f7449a82
2016-08-31 18:50:34 +00:00
Sergey Biryukov
171cea125a Help/About: Remove an outdated help sentence on "My Sites" screen.
Props johnjamesjacoby.
Fixes #37896.

git-svn-id: https://develop.svn.wordpress.org/trunk@38474 602fd350-edb4-49c9-b593-d223f7449a82
2016-08-31 17:43:07 +00:00
Scott Taylor
8f7de7118d Query: r38356, you were not long for this world.
Fixes #37830.


git-svn-id: https://develop.svn.wordpress.org/trunk@38471 602fd350-edb4-49c9-b593-d223f7449a82
2016-08-31 16:52:05 +00:00
Scott Taylor
cba0e2c8f7 Bootstrap: do not go gentle into that good night r38411, r38412, and parts of r38389.
See #36335.


git-svn-id: https://develop.svn.wordpress.org/trunk@38470 602fd350-edb4-49c9-b593-d223f7449a82
2016-08-31 16:30:48 +00:00
Scott Taylor
09856f3a5c General: revert [38386], functions.php was probably too tempting for some people to not load by itself.
See #36335.


git-svn-id: https://develop.svn.wordpress.org/trunk@38469 602fd350-edb4-49c9-b593-d223f7449a82
2016-08-31 15:23:57 +00:00
Scott Taylor
683d828d42 General: revert [38467], wp_is_IE() should not exist.
See #37699.


git-svn-id: https://develop.svn.wordpress.org/trunk@38468 602fd350-edb4-49c9-b593-d223f7449a82
2016-08-31 15:21:04 +00:00
Scott Taylor
f9278a9364 General: use a new function, wp_is_IE(), instead of the $is_IE global in a number of places.
See #37699.


git-svn-id: https://develop.svn.wordpress.org/trunk@38467 602fd350-edb4-49c9-b593-d223f7449a82
2016-08-31 06:41:07 +00:00
Scott Taylor
97ea98f145 Press This: don't check for already-hoisted global in press-this.php.
See #37699.


git-svn-id: https://develop.svn.wordpress.org/trunk@38466 602fd350-edb4-49c9-b593-d223f7449a82
2016-08-31 06:28:19 +00:00
Scott Taylor
2748d489f0 Press This: in wp_ajax_press_this_save_post() and wp_ajax_press_this_add_category(), don't check for a global instance. WP_Press_This is a Controller, but not really a Singleton. This also keeps it from being a pluggable class, which it is right now.
See #37699.


git-svn-id: https://develop.svn.wordpress.org/trunk@38465 602fd350-edb4-49c9-b593-d223f7449a82
2016-08-31 06:24:57 +00:00
Weston Ruter
f9feaf1778 Customize: Improve handling of active state for dynamically-created controls/sections/panels.
When a customizer construct (panel, section, control) is not added in PHP, the JS has interpreted this to mean that a given construct should be deactivated (because it is gone). This is problematic for dynamically-created constructs in JS, as it has meant that the construct would also have to be created in PHP to ensure the `active` callback is called, or else a hack would be required to add a `construct.active.validate = function() { return true };` to forcibly prevent the construct from getting deactivated. 

These workarounds can be eliminated by treating constructs differently when they are created dynamically in JS (after page load) as opposed to being created statically in PHP (on the server). Namely, if a construct is dynamically-created then its absence in a preview refresh should not signal that the construct should be deactivated. Rather, a dynamic construct should only have its activation state toggled if it has a corresponding construct created in PHP when the preview refreshes to explicitly indicate its `active` state. Otherwise, the management of the `active` state for a construct created in JS should also be the responsibility of client-side code.

Props westonruter, sayedwp.
Fixes #37270.


git-svn-id: https://develop.svn.wordpress.org/trunk@38464 602fd350-edb4-49c9-b593-d223f7449a82
2016-08-31 06:20:33 +00:00
wonderboymusic
9851ab5ded Query: in wp_old_slug_redirect(), use get_query_var() instead of importing and touching the global $wp_query directly.
See #37699.


git-svn-id: https://develop.svn.wordpress.org/trunk@38463 602fd350-edb4-49c9-b593-d223f7449a82
2016-08-31 06:20:03 +00:00
wonderboymusic
988752b138 Press This: in get_shortcut_link(), just check a class constant on WP_Press_This instead of instantiating the object and reading an instance prop.
See #37699.


git-svn-id: https://develop.svn.wordpress.org/trunk@38462 602fd350-edb4-49c9-b593-d223f7449a82
2016-08-31 06:07:01 +00:00
Scott Taylor
1825eff382 General: use get_bloginfo( 'version' ) instead of global $wp_version in several locations - excluding those locations which reload version.php mid-flight.
See #37699.


git-svn-id: https://develop.svn.wordpress.org/trunk@38459 602fd350-edb4-49c9-b593-d223f7449a82
2016-08-31 05:48:49 +00:00
Scott Taylor
2078dda129 Multisite: use get_current_site() instead of $GLOBALS['current_site'] (stop yelling!) in a few remaining spots.
See #37699.


git-svn-id: https://develop.svn.wordpress.org/trunk@38458 602fd350-edb4-49c9-b593-d223f7449a82
2016-08-31 05:03:37 +00:00
Scott Taylor
3605bd7633 Multisite: use get_current_blog_id() where applicable, in lieu of plucking the $blog_id global from outer space.
See #37699.


git-svn-id: https://develop.svn.wordpress.org/trunk@38457 602fd350-edb4-49c9-b593-d223f7449a82
2016-08-31 04:55:01 +00:00
John Blackbourn
84c2742175 HTTP API: Revert changes to wp_parse_url() while PHP 5.2 errors are investigated.
See #36356


git-svn-id: https://develop.svn.wordpress.org/trunk@38456 602fd350-edb4-49c9-b593-d223f7449a82
2016-08-31 00:23:26 +00:00
Scott Taylor
6d894b4274 List Tables: AJAX actions for List Tables do not need to declare global $wp_list_table. List tables on admin screens are in global scope, and they contain hooks that don't pass the the list table as context, hence using globals there so that functions can import them. That problem does not exist in the AJAX actions, which are virtually impossible to hook into as is.
See #37699.


git-svn-id: https://develop.svn.wordpress.org/trunk@38455 602fd350-edb4-49c9-b593-d223f7449a82
2016-08-30 20:06:30 +00:00
Scott Taylor
7ca480cc4e OEmbed: add unit tests. @group external-oembed is not run by default.
Props johnbillion, wonderboymusic.
See #32360.


git-svn-id: https://develop.svn.wordpress.org/trunk@38454 602fd350-edb4-49c9-b593-d223f7449a82
2016-08-30 18:54:53 +00:00
John Blackbourn
7734c6ac24 HTTP API: Separate the test for wp_parse_url() with -1 as its component into a separate test, so the remaining tests can use strict type checking. This helps avoid gotches with the potentially empty values (ie. null) that we're testing for.
See #36356


git-svn-id: https://develop.svn.wordpress.org/trunk@38453 602fd350-edb4-49c9-b593-d223f7449a82
2016-08-30 18:30:51 +00:00
John Blackbourn
8a6568945a HTTP API: The tests for wp_parse_url() can't be strict on type because this causes the tests to fail on PHP 5.2 which, bizarrely, returns the results of parse_url() (when called with a $component parameter) in a different order to later PHP versions.
Fixes #36356


git-svn-id: https://develop.svn.wordpress.org/trunk@38452 602fd350-edb4-49c9-b593-d223f7449a82
2016-08-30 17:48:06 +00:00
John Blackbourn
1135308324 Posts, Post Types: Introduce a missing private query var that should have been introduced as part of #15459.
This private query var allows the hierarchical page query on the Pages listing screen to query for `wp_posts.ID, wp_posts.post_parent` instead of `wp_posts.*`. This introduces large memory and time savings when the site contains a large number of Pages. Combined with the processing time savings introduced in [31730] this makes the Pages listing screen considerably more performant.

Fixes #34982
Props rodrigosprimo


git-svn-id: https://develop.svn.wordpress.org/trunk@38451 602fd350-edb4-49c9-b593-d223f7449a82
2016-08-30 17:39:38 +00:00
John Blackbourn
ba5803c16e HTTP API: Prevent a fatal error on PHP < 5.4.7 due to changes introduced in [38449].
Fixes #36356


git-svn-id: https://develop.svn.wordpress.org/trunk@38450 602fd350-edb4-49c9-b593-d223f7449a82
2016-08-30 17:15:54 +00:00