Commit Graph

44 Commits

Author SHA1 Message Date
Sergey Biryukov e72fff9cef 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.

git-svn-id: https://develop.svn.wordpress.org/trunk@47198 602fd350-edb4-49c9-b593-d223f7449a82
2020-02-06 06:31:22 +00:00
Sergey Biryukov 9e8a7292c1 Text Changes: Add missing periods to comment status update notices, for consistency.
Props Presskopp.
See #42735.

git-svn-id: https://develop.svn.wordpress.org/trunk@47152 602fd350-edb4-49c9-b593-d223f7449a82
2020-02-01 20:27:28 +00:00
Sergey Biryukov cfc3b57488 Docs: Improve inline comments per the documentation standards.
Includes minor code layout fixes for better readability.

See #48303.

git-svn-id: https://develop.svn.wordpress.org/trunk@47122 602fd350-edb4-49c9-b593-d223f7449a82
2020-01-29 00:43:23 +00:00
Sergey Biryukov 972ca00d2d Docs: Move the canonical DocBlock for `handle_bulk_actions-{$screen}` action to `wp-admin/edit.php`.
* Document accepted values for the `$items` parameter.
* Use interpolated syntax for the filter name.

Props dilipbheda, johnbillion, SergeyBiryukov.
Fixes #48857.

git-svn-id: https://develop.svn.wordpress.org/trunk@46811 602fd350-edb4-49c9-b593-d223f7449a82
2019-12-03 13:56:25 +00:00
Sergey Biryukov 00b03f2a6f I18N: Capitalize translator comments consistently, add trailing punctuation.
Includes minor code layout fixes.

See #44360.

git-svn-id: https://develop.svn.wordpress.org/trunk@45932 602fd350-edb4-49c9-b593-d223f7449a82
2019-09-03 00:39:13 +00:00
Sergey Biryukov a7513ac8e0 I18N: Improve translator comments.
* Add missing translator comments.
* Fix placement of some translator comments. Translator comments should be on the line directly above the line containing the translation function call for optimal compatibility with various `.pot` file generation tools. The CS auto-fixing, which changed some inconsistent function calls to multi-line function calls, is part of the reason why this was no longer the case for a select group of translator comments.

Includes minor code layout fixes.

Polyglots, rejoice! All WordPress core files now have translator comments for all strings with placeholders!

Props jrf, subrataemfluence, GaryJ, webdados, Dency, swissspidy, alvarogois, marcomartins, mihaiiceyro, vladwtz, niq1982, flipkeijzer, michielatyoast, chandrapatel, thrijith, joshuanoyce, FesoVik, tessak22, bhaktirajdev, cleancoded, dhavalkasvala, garrett-eclipse, bibliofille, socalchristina, priyankkpatel, 5hel2l2y, adamsilverstein, JeffPaul, pierlo, SergeyBiryukov.
Fixes #44360.

git-svn-id: https://develop.svn.wordpress.org/trunk@45926 602fd350-edb4-49c9-b593-d223f7449a82
2019-09-01 17:12:43 +00:00
Sergey Biryukov ae8a620efb General: First pass at replacing Codex URLs with a corresponding HelpHub or DevHub article.
Props ianbelanger, tobifjellner, SergeyBiryukov.
See #47771.

git-svn-id: https://develop.svn.wordpress.org/trunk@45674 602fd350-edb4-49c9-b593-d223f7449a82
2019-07-25 22:44:48 +00:00
Gary Pendergast 6acb0c6402 Coding Standards: Fix all `WordPress.WhiteSpace.PrecisionAlignment` issues.
See #47632.



git-svn-id: https://develop.svn.wordpress.org/trunk@45602 602fd350-edb4-49c9-b593-d223f7449a82
2019-07-05 05:20:52 +00:00
Gary Pendergast 6b61c34ded Coding Standards: Mark the handful of hook names with uppercase characters or hyphens as ignored.
See #47632.



git-svn-id: https://develop.svn.wordpress.org/trunk@45599 602fd350-edb4-49c9-b593-d223f7449a82
2019-07-05 01:44:41 +00:00
Gary Pendergast 9a1549767e Coding Standards: Fix the `Squiz.PHP.DisallowMultipleAssignments` violations in `wp-admin`.
See #47632.



git-svn-id: https://develop.svn.wordpress.org/trunk@45583 602fd350-edb4-49c9-b593-d223f7449a82
2019-07-01 12:50:14 +00:00
Gary Pendergast 8efcc32fde 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.



git-svn-id: https://develop.svn.wordpress.org/trunk@45140 602fd350-edb4-49c9-b593-d223f7449a82
2019-04-08 22:58:49 +00:00
Sergey Biryukov 1fddd69163 I18N: Use the actual placeholder instead of a number in translator comments if the corresponding string does not use numbered placeholders.
Add missing translator comments in `WP_Theme_Install_List_Table` and `wp_notify_postauthor()`.
Add missing commas in some translator comments.

Fixes #43523.

git-svn-id: https://develop.svn.wordpress.org/trunk@42827 602fd350-edb4-49c9-b593-d223f7449a82
2018-03-11 16:43:59 +00:00
Peter Wilson d002fde80e General: Further improve error messages following [42648].
Props kristastevens, melchoyce.
Fixes #38332 for trunk.



git-svn-id: https://develop.svn.wordpress.org/trunk@42719 602fd350-edb4-49c9-b593-d223f7449a82
2018-02-19 02:12:41 +00:00
Peter Wilson f317869c7f General: Replace `Cheatin’ uh?` with friendlier error messages.
While intended as a playful error message, `Cheatin’ uh?` can be interpreted as insulting or accusatory in an already stressful situation. This replaces Cheatin’ with more meaningful error messages, depending on the error that occurs.

Props ElectricFeet, EricMeyer, karmatosed, dd32, BandonRandon, melchoyce for language; dmsnell for original patch; peterwilsoncc.
Fixes #38332.



git-svn-id: https://develop.svn.wordpress.org/trunk@42648 602fd350-edb4-49c9-b593-d223f7449a82
2018-02-05 02:29:53 +00:00
Gary Pendergast 8f95800d52 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.



git-svn-id: https://develop.svn.wordpress.org/trunk@42343 602fd350-edb4-49c9-b593-d223f7449a82
2017-11-30 23:09:33 +00:00
Gary Pendergast 574821573a General: Fix some precision alignment formatting warnings.
The WPCS `WordPress.WhiteSpace.PrecisionAlignment` rule throws warnings for a bunch of code that will likely cause issues for `wpcbf`. Fixing these manually beforehand gives us better auto-fixed results later.

See #41057.



git-svn-id: https://develop.svn.wordpress.org/trunk@42228 602fd350-edb4-49c9-b593-d223f7449a82
2017-11-26 23:56:25 +00:00
John Blackbourn ca92da24da General: Use interpolation instead of concatenation for all dynamic hook names.
This fixes the rendering of the hook names on developer.wordpress.org.

Props keesiemeijer
Fixes #39148


git-svn-id: https://develop.svn.wordpress.org/trunk@39600 602fd350-edb4-49c9-b593-d223f7449a82
2016-12-14 04:17:38 +00:00
Andrea Fercia 25f40667d0 Accessibility: Remove inappropriate content from the Edit Comments screen heading.
See #26601.


git-svn-id: https://develop.svn.wordpress.org/trunk@39552 602fd350-edb4-49c9-b593-d223f7449a82
2016-12-09 18:58:51 +00:00
John Blackbourn 573912fcfd Administration: Standardise the docblocks for the `handle_bulk_actions-*` filters.
Props ericlewis, Veraxus
Fixes #16031


git-svn-id: https://develop.svn.wordpress.org/trunk@38958 602fd350-edb4-49c9-b593-d223f7449a82
2016-10-26 14:44:57 +00:00
Andrea Fercia 65e01d5951 Accessibility: Remove target=_blank from the comment/edit-comments help tabs links.
Stop taking control of users' browsers.

Props rianrietveld.
Fixes #38140. See #23432.


git-svn-id: https://develop.svn.wordpress.org/trunk@38718 602fd350-edb4-49c9-b593-d223f7449a82
2016-10-04 06:53:20 +00:00
Eric Andrew Lewis c75fb5e9ca Allow custom bulk actions in admin list tables.
Bulk action filtering was introduced in 3.1, but only to remove default bulk actions, not add new ones.

Bulk actions can now be registered for all admin list table dropdowns via the `bulk_actions-{get_current_screen()->id}` filter. Handling custom bulk actions can be performed in the corresponding and newly introduced `handle_bulk_actions-${get_current_screen()->id}` filter.

Props scribu, flixos90, Veraxus.
See #16031.



git-svn-id: https://develop.svn.wordpress.org/trunk@38647 602fd350-edb4-49c9-b593-d223f7449a82
2016-09-23 20:32:48 +00:00
Dominik Schilling (ocean90) 206380180e 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.

git-svn-id: https://develop.svn.wordpress.org/trunk@37914 602fd350-edb4-49c9-b593-d223f7449a82
2016-06-29 15:15:40 +00:00
Pascal Birchler cc6fe1179d Allow searching for `0` throughout the admin.
Fixes #31025.

git-svn-id: https://develop.svn.wordpress.org/trunk@36302 602fd350-edb4-49c9-b593-d223f7449a82
2016-01-14 20:05:06 +00:00
Sergey Biryukov 175d780e44 Add translator comments for strings in `wp-admin/edit-comments.php`.
Props ramiy for initial patch.
Fixes #34586.

git-svn-id: https://develop.svn.wordpress.org/trunk@35549 602fd350-edb4-49c9-b593-d223f7449a82
2015-11-06 00:22:44 +00:00
Scott Taylor 9e267b6e72 List Tables/WP_Screen: in `WP_Screen`, add methods to store, retrieve, and render screen reader text, primarily used by list table screens.
These additions are based on an audit and recommendations by the Accessibility team. #a11y'all

Props afercia.
Fixes #32147.


git-svn-id: https://develop.svn.wordpress.org/trunk@34891 602fd350-edb4-49c9-b593-d223f7449a82
2015-10-07 01:27:01 +00:00
Scott Taylor 821821c8b5 Comments: add `date` column to `WP_Comments_List_Table` to allow sorting and to break out the date/time from the comment content column.
Props jshreve.
Fixes #15520.


git-svn-id: https://develop.svn.wordpress.org/trunk@34504 602fd350-edb4-49c9-b593-d223f7449a82
2015-09-24 17:26:54 +00:00
Scott Taylor a9e1f79323 In the `edit-comments.php` admin handler, toggle `wp_defer_comment_counting()` so that only unique post IDs have their comment count updated. Currently, if you delete 50 comments from the same post, the count would get reset 50 times. Not joking.
See #33875.


git-svn-id: https://develop.svn.wordpress.org/trunk@34132 602fd350-edb4-49c9-b593-d223f7449a82
2015-09-14 22:23:43 +00:00
Sergey Biryukov 0299c00fbb Provide more helpful feedback than just "Cheatin' uh?" for permission errors in `wp-admin/edit-comments.php`.
props ericlewis, kraftbj, lukecarbis, mrmist.
fixes #33669. see #14530.

git-svn-id: https://develop.svn.wordpress.org/trunk@33860 602fd350-edb4-49c9-b593-d223f7449a82
2015-09-02 18:03:10 +00:00
Scott Taylor af101dec19 Comments: dynamically update the document title text of the Comments List Table page when dynamically updating the number of comments awaiting moderation.
Fixes #33414. 


git-svn-id: https://develop.svn.wordpress.org/trunk@33821 602fd350-edb4-49c9-b593-d223f7449a82
2015-08-31 17:57:32 +00:00
Dominik Schilling (ocean90) f29b25e104 Comments: Update help text for new comment bubbles.
props kraftbj.
fixes #33256.

git-svn-id: https://develop.svn.wordpress.org/trunk@33589 602fd350-edb4-49c9-b593-d223f7449a82
2015-08-06 08:02:53 +00:00
Sergey Biryukov 0fe4782373 Comment string tweaks:
* Merge two strings about an invalid comment ID.
* Add missing context to 'Mark as Spam' string.
* Merge two 'In Response To' strings, replace redundant context with a translator comment.

props pavelevap.
fixes #32334.

git-svn-id: https://develop.svn.wordpress.org/trunk@33436 602fd350-edb4-49c9-b593-d223f7449a82
2015-07-26 23:35:47 +00:00
Konstantin Obenland e59592f87e 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.



git-svn-id: https://develop.svn.wordpress.org/trunk@32974 602fd350-edb4-49c9-b593-d223f7449a82
2015-06-27 15:40:27 +00:00
Sergey Biryukov 2848b8a911 Replace `echo __()` with `_e()`.
props marsjaninzmarsa.
fixes #32239.

git-svn-id: https://develop.svn.wordpress.org/trunk@32333 602fd350-edb4-49c9-b593-d223f7449a82
2015-05-03 16:17:06 +00:00
Dominik Schilling (ocean90) b0d6757918 Use HTTPS URLs for codex.wordpress.org.
see #27115.

git-svn-id: https://develop.svn.wordpress.org/trunk@32116 602fd350-edb4-49c9-b593-d223f7449a82
2015-04-12 21:28:58 +00:00
Helen Hou-Sandi 35df5592f1 Admin notices: Make (most) core notices dismissible.
These no longer return upon refreshing the page when JS is on and working, so users should be able to dismiss them. This is particularly important on the post edit screen when DFW is triggered, but pretty much all notices can be dismissed if needed. A post on Make/Core will follow with information on how this can be leveraged in plugins.

props valendesigns, afercia, paulwilde, adamsilverstein, helen.
fixes #31233. see #23367.


git-svn-id: https://develop.svn.wordpress.org/trunk@31973 602fd350-edb4-49c9-b593-d223f7449a82
2015-04-01 22:05:17 +00:00
Dominik Schilling (ocean90) 3bb3d2f1a5 Screen Options: Improve items per page option label.
Previously the label just said "Posts", "Pages", or "Comments". This was bad in terms of accessibility and internationalization because of missing context.
This change adds a default label "Number of items per page:" to `WP_Screen->render_per_page_options()` and removes all the existing one-word labels.

props afercia.
fixes #31349, #15576.

git-svn-id: https://develop.svn.wordpress.org/trunk@31696 602fd350-edb4-49c9-b593-d223f7449a82
2015-03-10 15:31:54 +00:00
Scott Taylor 83b6fad852 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.


git-svn-id: https://develop.svn.wordpress.org/trunk@31200 602fd350-edb4-49c9-b593-d223f7449a82
2015-01-16 04:15:52 +00:00
John Blackbourn 4e1e4745ff Switch to a `403` response code in places where it is more appropriate than a `500` due to permissions errors.
Fixes #10551
Props nacin


git-svn-id: https://develop.svn.wordpress.org/trunk@30356 602fd350-edb4-49c9-b593-d223f7449a82
2014-11-16 06:15:29 +00:00
Andrew Nacin bc0bb40e5b Comments: Update border color and help text.
props bcworkz.
fixes #26967.


git-svn-id: https://develop.svn.wordpress.org/trunk@27774 602fd350-edb4-49c9-b593-d223f7449a82
2014-03-27 05:07:04 +00:00
Andrew Nacin f3a23fb43f Reference https://wordpress.org rather than http://wordpress.org in strings, links, comments, etc.
props Ipstenu, markjaquith.
see #27115.


git-svn-id: https://develop.svn.wordpress.org/trunk@27369 602fd350-edb4-49c9-b593-d223f7449a82
2014-03-03 02:33:24 +00:00
Andrew Ozz b33d0da84c Remove all screen_icon() calls and deprecate the functions, props TobiasBg, fixes #26119
git-svn-id: https://develop.svn.wordpress.org/trunk@26518 602fd350-edb4-49c9-b593-d223f7449a82
2013-12-02 03:52:23 +00:00
Andrew Nacin 8d72ad52ff Don't rely on include_path to include files.
Always use dirname() or, once available, ABSPATH.

props ketwaroo, hakre.
fixes #17092.


git-svn-id: https://develop.svn.wordpress.org/trunk@25616 602fd350-edb4-49c9-b593-d223f7449a82
2013-09-25 00:17:40 +00:00
Andrew Nacin 7fe981c578 Remove unnecessary printf(). fixes #25321.
git-svn-id: https://develop.svn.wordpress.org/trunk@25439 602fd350-edb4-49c9-b593-d223f7449a82
2013-09-14 19:11:37 +00:00
Andrew Nacin b43712e0f7 New develop.svn.wordpress.org repository based on the old core.svn repository.
* All WordPress files move to a src/ directory.
 * New task runner (Grunt), configured to copy a built WordPress to build/.
 * svn:ignore and .gitignore for Gruntfile.js, wp-config.php, and node.js.
 * Remove Akismet external from develop.svn. Still exists in core.svn.
 * Drop minified files from src/. The build process will now generate these.

props koop.
see #24976.

and see http://wp.me/p2AvED-1AI.



git-svn-id: https://develop.svn.wordpress.org/trunk@25001 602fd350-edb4-49c9-b593-d223f7449a82
2013-08-07 05:25:25 +00:00