Commit Graph

135 Commits

Author SHA1 Message Date
Sergey Biryukov b57af57210 Coding Standards: Escape the whole attribute in `wp-admin/export.php`.
It is best to always escape the complete value of an attribute, not a partial value, as otherwise the escaping could be (partially) undone when the values are joined together.

While the hardcoded hyphen in this case don't necessarily create that risk, it may change to a value which could be problematic, so making it a habit to escape the value in one go is best practice.

Escaping the complete value also means that a single `esc_attr()` call can be used instead of two.

Follow-up to [14444], [16652], [55616], [56632].

See #58831.
Built from https://develop.svn.wordpress.org/trunk@56633


git-svn-id: http://core.svn.wordpress.org/trunk@56145 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2023-09-20 09:47:18 +00:00
audrasjb 5cce7674ca Coding Standards: Add missing escaping functions in `wp-admin/export.php`
Props viralsampat.
See #58831.




Built from https://develop.svn.wordpress.org/trunk@56632


git-svn-id: http://core.svn.wordpress.org/trunk@56144 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2023-09-20 08:44:20 +00:00
audrasjb 9ffee539ab Docs: Use third-person singular verbs in various function descriptions, as per docblocks standards.
Follow-up to [55911], [55916].

Props costdev.
See #57840.



Built from https://develop.svn.wordpress.org/trunk@55917


git-svn-id: http://core.svn.wordpress.org/trunk@55429 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2023-06-14 14:08:18 +00:00
Sergey Biryukov 956be813b6 Coding Standards: Improve formatting of some SQL queries for better readability.
This corrects the placement of double quotes around the query and makes sure the alignment is consistent.

Props umeshmcakadi, mukesh27, krupalpanchal, dhrumilk, SergeyBiryukov.
Fixes #58372.
Built from https://develop.svn.wordpress.org/trunk@55857


git-svn-id: http://core.svn.wordpress.org/trunk@55369 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2023-05-25 12:55:19 +00:00
audrasjb 418a21fdbc Help/About: Use the new `/documentation/` URLs for HelpHub links in WordPress Admin.
As `https://wordpress.org/support/` was redirected to `https://wordpress.org/documentation/`, this changeset replaces various `/support/article/*` links with `/documentation/article/*` to avoid an extra redirect.

This also updates links to Support Forums by replacing `https://wordpress.org/support/` URLs with `https://wordpress.org/support/forums/`.

Props SergeyBiryukov, audrasjb, dhrupo, hasanmisbah, sakibmd, sabernhardt.
See #57726.

Built from https://develop.svn.wordpress.org/trunk@55412


git-svn-id: http://core.svn.wordpress.org/trunk@54945 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2023-02-23 10:38:21 +00:00
Sergey Biryukov 9c5d4ca8d1 I18N: Mark screen reader strings as such with translator comments.
This aims to provide better context for translators and make it easier to determine that some strings contain hidden accessibility text and are not displayed in the UI.

Props kebbet, mercime, pavelevap, ocean90, swissspidy, Chouby, jipmoors, afercia, desrosj, costdev, audrasjb, SergeyBiryukov.
Fixes #29748.
Built from https://develop.svn.wordpress.org/trunk@55276


git-svn-id: http://core.svn.wordpress.org/trunk@54809 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2023-02-07 17:10:21 +00:00
audrasjb 12fc2d9146 Administration: Remove self-reference ("we") in WordPress Admin.
This changes updates many strings to remove self-references to an undefined "we" collective across the WordPress Administration.

The goal of this change is to better match the guidelines and recommendations set forth in the make/core handbook, specifically:

> the word "we" should be avoided (…) unless its made very clear which group is speaking.

Props johnbillion, shital-patel, audrasjb, marybaum, SergeyBiryukov, peterwilsoncc, johnjamesjacoby, kebbet, costdev, chaion07, davidbaumwald.
Fixes #46057.

Built from https://develop.svn.wordpress.org/trunk@53131


git-svn-id: http://core.svn.wordpress.org/trunk@52720 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2022-04-11 11:42:04 +00:00
hellofromTonya 5c414db9ad External Libraries: Further fix jQuery deprecations in WordPress core.
Follow-up to [50001], [50270], [50367], [50383], [50410], [50420], [50429], [50547].

Props chaion07, Clorith, costdev, desrosj, malthert, peterwilsoncc, presskopp, promz, sabernhardt, SergeyBiryukov, toro_unit, wpnomad.
Fixes #51519.
Built from https://develop.svn.wordpress.org/trunk@52285


git-svn-id: http://core.svn.wordpress.org/trunk@51877 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2021-11-30 17:18:01 +00:00
Sergey Biryukov 8a90b8691f Docs: Add a comment about the `$title` global usage in various admin files.
This should make it clear that the variable is used as part of the HTML `<title>` tag on admin screens.

Props ravipatel, hellofromTonya, sabernhardt, audrasjb, SergeyBiryukov.
Fixes #53729.
Built from https://develop.svn.wordpress.org/trunk@51475


git-svn-id: http://core.svn.wordpress.org/trunk@51086 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2021-07-22 13:53:00 +00:00
Sergey Biryukov 9f12d7f575 External Libraries: First pass at fixing jQuery deprecations in WordPress core and bundled themes.
To be able to disable jQuery Migrate as step 3 of updating the jQuery version shipped with WordPress, all `JQMIGRATE` warnings in the browser console will have to be addressed.

This includes many minor adjustments to a wide array of core files.

Follow-up to:
* Step 1: Disabling jQuery Migrate 1.4.1 in WordPress 5.5: [48323], [48324]
* Step 2: Updating jQuery to 3.5.1 and adding jQuery Migrate 3.3.x in WordPress 5.6: [49101], [49338], [49615], [49649]

Props Clorith, azaozz.
See #51812.
Built from https://develop.svn.wordpress.org/trunk@50001


git-svn-id: http://core.svn.wordpress.org/trunk@49702 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2021-01-22 12:32:03 +00:00
Sergey Biryukov aa69c25d5f Coding Standards: Use strict comparison in some `wp-admin` files.
Props pikamander2, mukesh27, SergeyBiryukov.
Fixes #49239.
Built from https://develop.svn.wordpress.org/trunk@47785


git-svn-id: http://core.svn.wordpress.org/trunk@47561 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2020-05-12 18:32:08 +00:00
Sergey Biryukov ae102b2487 Export: Use correct context for the `Posts` label on the Export screen.
The string refers to the post type name specifically, not to a generic term to identify a publication on WordPress.

Props audrasjb, jdy68.
Fixes #49306.
Built from https://develop.svn.wordpress.org/trunk@47272


git-svn-id: http://core.svn.wordpress.org/trunk@47072 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2020-02-11 19:35:06 +00:00
Sergey Biryukov 47ed56f38f Code Modernization: Replace `dirname( __FILE__ )` calls with `__DIR__` magic constant.
This avoids the performance overhead of the function call every time `dirname( __FILE__ )` was used instead of `__DIR__`.

This commit also includes:

* Removing unnecessary parentheses from `include`/`require` statements. These are language constructs, not function calls.
* Replacing `include` statements for several files with `require_once`, for consistency:
 * `wp-admin/admin-header.php`
 * `wp-admin/admin-footer.php`
 * `wp-includes/version.php`

Props ayeshrajans, desrosj, valentinbora, jrf, joostdevalk, netweb.
Fixes #48082.
Built from https://develop.svn.wordpress.org/trunk@47198


git-svn-id: http://core.svn.wordpress.org/trunk@46998 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2020-02-06 06:33:11 +00:00
Sergey Biryukov e0311b76c7 Docs: Add missing description for `$wp_locale` global.
Props mukesh27.
See #45604, #47110.
Built from https://develop.svn.wordpress.org/trunk@45737


git-svn-id: http://core.svn.wordpress.org/trunk@45548 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2019-08-04 01:46:55 +00:00
Sergey Biryukov 8e85299a00 General: First pass at replacing Codex URLs with a corresponding HelpHub or DevHub article.
Props ianbelanger, tobifjellner, SergeyBiryukov.
See #47771.
Built from https://develop.svn.wordpress.org/trunk@45674


git-svn-id: http://core.svn.wordpress.org/trunk@45485 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2019-07-25 22:45:57 +00:00
Gary Pendergast 87675d288b Coding Standards: Fix all `WordPress.WhiteSpace.PrecisionAlignment` issues.
See #47632.


Built from https://develop.svn.wordpress.org/trunk@45602


git-svn-id: http://core.svn.wordpress.org/trunk@45413 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2019-07-05 05:21:56 +00:00
Gary Pendergast 4487551344 Help: Update support forum links.
There are a lot of places in Core that link to https://wordpress.org/support/ for the support forums, but that's now the URL for HelpHub. The new forums link is https://wordpress.org/support/forums/.

Props jitendrabanjara1991, dilipbheda, mukesh27, ianbelanger.
Fixes #46790.


Built from https://develop.svn.wordpress.org/trunk@45140


git-svn-id: http://core.svn.wordpress.org/trunk@44949 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2019-04-08 22:59:56 +00:00
Gary Pendergast 56c162fbc9 Coding Standards: Upgrade WPCS to 1.0.0
WPCS 1.0.0 includes a bunch of new auto-fixers, which drops the number of coding standards issues across WordPress significantly. Prior to running the auto-fixers, there were 15,312 issues detected. With this commit, we now drop to 4,769 issues.

This change includes three notable additions:
- Multiline function calls must now put each parameter on a new line.
- Auto-formatting files is now part of the `grunt precommit` script. 
- Auto-fixable coding standards issues will now cause Travis failures.

Fixes #44600.


Built from https://develop.svn.wordpress.org/trunk@43571


git-svn-id: http://core.svn.wordpress.org/trunk@43400 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2018-08-17 01:51:36 +00:00
Gary Pendergast aaf99e6913 Code is Poetry.
WordPress' code just... wasn't.
This is now dealt with.

Props jrf, pento, netweb, GaryJ, jdgrimes, westonruter, Greg Sherwood from PHPCS, and everyone who's ever contributed to WPCS and PHPCS.
Fixes #41057.


Built from https://develop.svn.wordpress.org/trunk@42343


git-svn-id: http://core.svn.wordpress.org/trunk@42172 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-11-30 23:11:00 +00:00
Andrea Fercia 86ad7855be Accessibility: Remove target=_blank from the help tab links on several admin screens.
Stop taking control of users' browsers.

Props rianrietveld.
Fixes #38145. See #23432.

Built from https://develop.svn.wordpress.org/trunk@38725


git-svn-id: http://core.svn.wordpress.org/trunk@38668 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-10-04 20:27:33 +00:00
Dominik Schilling 25e66e4f1e Text Changes: Unify permission error messages.
The new format looks like "Sorry, you are not allowed to <action>.". This provides a consistent experience for all error messages related to missing permissions. It also reduces the number of similar strings and allows translators to provide a consistent style in their language.

Props ramiy, Presskopp.
Fixes #34521.
Built from https://develop.svn.wordpress.org/trunk@37914


git-svn-id: http://core.svn.wordpress.org/trunk@37855 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-06-29 15:16:29 +00:00
Drew Jaynes c3055cc190 Docs: Standardize hook docs in wp-admin/* to use third-person singular verbs per the inline documentation standards for PHP.
See #36913.

Built from https://develop.svn.wordpress.org/trunk@37488


git-svn-id: http://core.svn.wordpress.org/trunk@37456 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-05-22 18:01:30 +00:00
Sergey Biryukov 7950c2de31 Export: Add a missing Oxford comma.
Props juhise.
Fixes #35275.
Built from https://develop.svn.wordpress.org/trunk@36140


git-svn-id: http://core.svn.wordpress.org/trunk@36106 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-12-31 19:33:25 +00:00
Boone Gorges 714be37ea5 Show user_login in Dashboard user dropdowns.
User dropdowns in wp-admin have traditionally shown the users' display names.
However, this causes ambiguity when users share display names. To correct this,
we now show the unique user_login in parentheses after the display name.

The new `display_name_with_login` value for the `show` parameter of
`wp_dropdown_users()` enables this functionality. The default value of `show`
has not been changed, for backward compatibility, but all instances of
`wp_dropdown_users()` in core wp-admin have been switched.

This changeset also reduces some duplicated logic when assembling a user list
when `include_selected` is true.

Props krogsgard, boonebgorges.
Fixes #31251.
Built from https://develop.svn.wordpress.org/trunk@35790


git-svn-id: http://core.svn.wordpress.org/trunk@35754 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-12-06 20:57:26 +00:00
Scott Taylor 47879dc83a Export: add missing labels and improvement accessibility of the Export screen.
Props afercia.
Fixes #33046.

Built from https://develop.svn.wordpress.org/trunk@35316


git-svn-id: http://core.svn.wordpress.org/trunk@35282 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-10-21 03:57:24 +00:00
Scott Taylor 0fd01b9057 Export: allow Media to exported separately from other types.
Props PhilipLakin.
Fixes #32230.

Built from https://develop.svn.wordpress.org/trunk@34326


git-svn-id: http://core.svn.wordpress.org/trunk@34290 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-09-19 16:47:25 +00:00
Sergey Biryukov a1050a58dc Add a missing Oxford comma on Export screen.
Props juhise.
Fixes #33906.
Built from https://develop.svn.wordpress.org/trunk@34249


git-svn-id: http://core.svn.wordpress.org/trunk@34213 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-09-16 21:34:39 +00:00
Scott Taylor 2a3be365e3 Bump H3 headings to H2 on Export screen for better accessibility.
Props metodiew.
Fixes #33608.

Built from https://develop.svn.wordpress.org/trunk@33914


git-svn-id: http://core.svn.wordpress.org/trunk@33883 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-09-05 20:09:24 +00:00
Konstantin Obenland 7dc1d06e64 Proper heading for admin screens.
First step towards restoring a good heading structure in wp-admin.
The previous `<h1>` contained the site title and a link to the front page and was removed with the toolbar refactoring in 3.2.

Props joedolson, afercia.
Fixes #31650.


Built from https://develop.svn.wordpress.org/trunk@32974


git-svn-id: http://core.svn.wordpress.org/trunk@32945 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-06-27 15:41:25 +00:00
Dominik Schilling 64fc7294b6 Use HTTPS URLs for codex.wordpress.org.
see #27115.
Built from https://develop.svn.wordpress.org/trunk@32116


git-svn-id: http://core.svn.wordpress.org/trunk@32095 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-04-12 21:29:32 +00:00
Scott Taylor 7f8b548df1 In HTML5, the `action` attribute is no longer required. Remove this attribute when empty.
The admin HTML is served with the HTML5 doctype.

"The action and formaction content attributes, if specified, must have a value that is a valid non-empty URL potentially surrounded by spaces." 
http://www.w3.org/html/wg/drafts/html/master/forms.html#attr-fs-action

Props voldemortensen.
Fixes #30126.

Built from https://develop.svn.wordpress.org/trunk@31200


git-svn-id: http://core.svn.wordpress.org/trunk@31181 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-01-16 04:16:24 +00:00
Scott Taylor 60b0cd7943 The keyword `elseif` should be used instead of `else if` so that all control keywords look like single words.
This was a mess, is now standardized across the codebase, except for a few 3rd-party libs. 

See #30799.

Built from https://develop.svn.wordpress.org/trunk@31090


git-svn-id: http://core.svn.wordpress.org/trunk@31071 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-01-08 07:05:25 +00:00
Scott Taylor af0e5cc851 Inline `<script>`s that are only printed in the admin for pages that are served with the HTML5 doctype absolutely do not need `CDATA` comments.
Props tw2113 for the initial patch.
See #18788.

Built from https://develop.svn.wordpress.org/trunk@31034


git-svn-id: http://core.svn.wordpress.org/trunk@31015 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-01-03 05:46:25 +00:00
Scott Taylor be08f576df Improve some `post_status`-related documentation.
Props ericlewis.
See #30230.

Built from https://develop.svn.wordpress.org/trunk@30155


git-svn-id: http://core.svn.wordpress.org/trunk@30155 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2014-11-01 20:20:23 +00:00
Drew Jaynes 66c47f29bb Correct references of `@uses $wpdb` in core documentation to use `@global`.
See #30191, [30105].
Fixes #30217.

Built from https://develop.svn.wordpress.org/trunk@30122


git-svn-id: http://core.svn.wordpress.org/trunk@30122 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2014-10-31 17:56:22 +00:00
Andrew Nacin dce0b9adea Use SSL when linking to WordPress.org. see #27115.
Built from https://develop.svn.wordpress.org/trunk@27469


git-svn-id: http://core.svn.wordpress.org/trunk@27314 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2014-03-08 04:14:15 +00:00
Andrew Ozz 8d6059b383 Remove all screen_icon() calls and deprecate the functions, props TobiasBg, fixes #26119
Built from https://develop.svn.wordpress.org/trunk@26518


git-svn-id: http://core.svn.wordpress.org/trunk@26411 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2013-12-02 03:53:11 +00:00
Andrew Nacin fd57b239d2 Don't rely on include_path to include files.
Always use dirname() or, once available, ABSPATH.

props ketwaroo, hakre.
fixes #17092.

Built from https://develop.svn.wordpress.org/trunk@25616


git-svn-id: http://core.svn.wordpress.org/trunk@25533 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2013-09-25 00:18:11 +00:00
Drew Jaynes 7b2584c71f Add missing phpdoc block for `export_date_options()`.
Props siobhan for the initial patch. See #20425

Built from https://develop.svn.wordpress.org/trunk@25490


git-svn-id: http://core.svn.wordpress.org/trunk@25411 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2013-09-19 02:09:08 +00:00
Sergey Biryukov bc1c732a16 Inline documentation for hooks in wp-admin/export.php.
props mordauk.
see #25229.
Built from https://develop.svn.wordpress.org/trunk@25435


git-svn-id: http://core.svn.wordpress.org/trunk@25357 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2013-09-14 01:02:10 +00:00
Jon Cave 1049edd0bc Rename filter on $args sent to export_wp() for clarity. See #19863.
git-svn-id: http://core.svn.wordpress.org/trunk@22402 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2012-11-06 14:51:45 +00:00
Andrew Nacin c9c8c0d214 Add the export_filters and wp_export_args hooks. props MartyThornley, brandondove. fixes #19863.
git-svn-id: http://core.svn.wordpress.org/trunk@22392 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2012-11-06 00:06:44 +00:00
Andrew Nacin 40bd91c86f @since for some internal functions. props SergeyBiryukov, fixes #21886.
git-svn-id: http://core.svn.wordpress.org/trunk@21994 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2012-09-25 02:24:58 +00:00
Andrew Nacin b523c3d597 Rename duplicately defined internal functions (add_js, display_header) for documentation purposes. props bpetty, fixes #21564.
git-svn-id: http://core.svn.wordpress.org/trunk@21856 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2012-09-15 19:49:21 +00:00
Ryan Boren 36755f8b3b Make the 'Download Export File' button primary. Props helenyhou. fixes #21781
git-svn-id: http://core.svn.wordpress.org/trunk@21749 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2012-09-04 21:11:17 +00:00
nacin e09d2e6f76 Add line breaks before most form field descriptions (the italicized gray text on General Settings and other screens). props johnbillion, helenyhou, fixes #17390.
git-svn-id: http://svn.automattic.com/wordpress/trunk@20605 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2012-04-26 00:58:16 +00:00
duck_ 29d5e3c83c Show correct export date range for pages. The query should use provided $post_type instead of always 'post'. Props sorich87. Fixes #19312.
git-svn-id: http://svn.automattic.com/wordpress/trunk@19626 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2011-12-22 12:08:26 +00:00
ryan 340e93324c Remove extraneous spaces. Props kenan3008, dimadin. fixes #19501 #19433
git-svn-id: http://svn.automattic.com/wordpress/trunk@19596 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2011-12-14 17:36:38 +00:00
nacin 3d51303ca3 Help tweaks for users, tools. props jane, see #19020.
git-svn-id: http://svn.automattic.com/wordpress/trunk@19509 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2011-12-01 01:17:14 +00:00
koopersmith 93808a4a55 Update help content for export page. props Ipstenu, see #19020.
git-svn-id: http://svn.automattic.com/wordpress/trunk@19462 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2011-11-28 16:40:36 +00:00