Commit Graph

25 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 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 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
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
Jeremy Felt 9fb651d229 Block Editor: Fix meta boxes not showing.
The block editor needs to duplicate the classic meta box behaviour, so it can extract the registered meta boxes, and import them into the block editor.

To match the classic editor behaviour as closely as possible, this moves the relevant code from the classic editor, into a new function, so it can be called by both.

Merges [43837] from the 5.0 branch to trunk.

Props pento, peterwilsoncc.
Fixes #45172.


git-svn-id: https://develop.svn.wordpress.org/trunk@44214 602fd350-edb4-49c9-b593-d223f7449a82
2018-12-16 01:18:22 +00:00
Gary Pendergast a75d153eee 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.



git-svn-id: https://develop.svn.wordpress.org/trunk@43571 602fd350-edb4-49c9-b593-d223f7449a82
2018-08-17 01:50:26 +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
Andrea Fercia 0b9b3bc3f4 Accessibility: Remove inappropriate content from the Link Manager screens headings.
See #26601.


git-svn-id: https://develop.svn.wordpress.org/trunk@39537 602fd350-edb4-49c9-b593-d223f7449a82
2016-12-07 20:17:56 +00:00
Andrea Fercia 5ba47b2119 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.


git-svn-id: https://develop.svn.wordpress.org/trunk@38725 602fd350-edb4-49c9-b593-d223f7449a82
2016-10-04 20:26:09 +00:00
Andrea Fercia 359b826e2c Bump H3 headings to H2 on the legacy Link Manager screen for better accessibility.
Fixes #34285.

git-svn-id: https://develop.svn.wordpress.org/trunk@35158 602fd350-edb4-49c9-b593-d223f7449a82
2015-10-14 17:31:29 +00:00
Konstantin Obenland 8d40cdcb1b Use a less element-specific class name for links within page titles.
After [32974] these links are no longer within an `h2`, making the class name
inaccurate. `add-new-h1` has the potential to expose the same problem for in a
possible future change.

Fixes #31650.



git-svn-id: https://develop.svn.wordpress.org/trunk@33067 602fd350-edb4-49c9-b593-d223f7449a82
2015-07-03 16:41:18 +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
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
Scott Taylor 8af8f5f8f2 In `edit-link-form.php`, `hackificator` bails because there is a `</form>` with no open `<form>`. It exists, but is needlessly constructed with PHP. It always returns a `<form>`, only the `id` and `name` are different. The dynamic piece just returns the ID now.
See #27881.


git-svn-id: https://develop.svn.wordpress.org/trunk@28485 602fd350-edb4-49c9-b593-d223f7449a82
2014-05-18 22:06:22 +00:00
Drew Jaynes (DrewAPicture) 3e2904138e Ensure the `submitlink_box` action hook is only documented once.
See #26869.


git-svn-id: https://develop.svn.wordpress.org/trunk@28210 602fd350-edb4-49c9-b593-d223f7449a82
2014-04-25 06:34:00 +00:00
Andrew Nacin 4cf6fc1a99 Use SSL when linking to WordPress.org. see #27115.
git-svn-id: https://develop.svn.wordpress.org/trunk@27469 602fd350-edb4-49c9-b593-d223f7449a82
2014-03-08 04:13:28 +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
Sergey Biryukov a2aed7b119 Fix docblock formatting. fixes #25893.
git-svn-id: https://develop.svn.wordpress.org/trunk@26081 602fd350-edb4-49c9-b593-d223f7449a82
2013-11-11 13:31:19 +00:00
Sergey Biryukov eb8f223cd0 Inline documentation for hooks in wp-admin/edit-link-form.php.
props raamdev.
fixes #25447.

git-svn-id: https://develop.svn.wordpress.org/trunk@26080 602fd350-edb4-49c9-b593-d223f7449a82
2013-11-11 13:15:57 +00:00
Andrew Nacin c87ad6023d Spell out duplicate hook locations.
props DrewAPicture.
fixes #25658.


git-svn-id: https://develop.svn.wordpress.org/trunk@25868 602fd350-edb4-49c9-b593-d223f7449a82
2013-10-22 17:21:32 +00:00
Andrew Nacin 69a17e3469 Links manager: Restrict field length based on DB schema.
props solarissmoke, vinod-dalvi.
fixes #17296, #12264.


git-svn-id: https://develop.svn.wordpress.org/trunk@25670 602fd350-edb4-49c9-b593-d223f7449a82
2013-10-02 21:10:24 +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 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