Commit Graph

18 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 004ff0e1a7 I18N: Update translator comments after [45674].
See #47771.

git-svn-id: https://develop.svn.wordpress.org/trunk@45676 602fd350-edb4-49c9-b593-d223f7449a82
2019-07-25 22:51:53 +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 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
John Blackbourn 8df2151660 General: Improve terminology used when referring to installations of WordPress and its extensions.
"Install" is not a noun, and while it might be acceptable to use the verb as a noun, it is not correct. Using the correct
noun, "installation", increases clarity, especially for non-native English speakers.

This change fixes the usage in user-facing text and in developer documentation.

Fixes #41620


git-svn-id: https://develop.svn.wordpress.org/trunk@41289 602fd350-edb4-49c9-b593-d223f7449a82
2017-08-22 11:51:11 +00:00
Dion Hulse 7e9848df2b Drop the requirement for the entry points to WordPress to be parsable by PHP4.
Previously we ensured that the entry points to WordPress were parsable by PHP4 in order to display a friendly not-supported-php error message.
However, for the last two years the main entry points have not actually parsed, and we've only added extra parse errors since it last worked in 3.9, so it's time we just remove this 'feature'.
The PHP version checks are still there for PHP 5.0/5.1, and so it's inplace when we eventually drop PHP 5.2 support.

See #29489.


git-svn-id: https://develop.svn.wordpress.org/trunk@38899 602fd350-edb4-49c9-b593-d223f7449a82
2016-10-25 03:14:31 +00:00
Sergey Biryukov 75fe71a13f Bootstrap/Load: Allow for `ABSPATH` to be defined outside of `wp-load.php`, e.g. in a script loaded via `auto_prepend_file`.
Props barry.
Fixes #26592.

git-svn-id: https://develop.svn.wordpress.org/trunk@37207 602fd350-edb4-49c9-b593-d223f7449a82
2016-04-14 17:52:02 +00:00
Sergey Biryukov 5081c05c00 Remove `<code>` tags from translatable strings in `wp-load.php`.
Add translator comments.

Props ramiy.
Fixes #34574.

git-svn-id: https://develop.svn.wordpress.org/trunk@35547 602fd350-edb4-49c9-b593-d223f7449a82
2015-11-05 23:58:20 +00:00
Scott Taylor 719f51b19d Setup/Config: some `dirname( ABSPATH )` file lookups should have errors suppressed due to possibility of `open_basedir` restrictions on hosts.
Props chriscct7, misterunknown.
Fixes #29680.


git-svn-id: https://develop.svn.wordpress.org/trunk@34867 602fd350-edb4-49c9-b593-d223f7449a82
2015-10-06 14:19:17 +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
Drew Jaynes c77e726eef Add inline documentation to clarify the reasoning behind the various conditions that control how WP is loaded.
Props mattheweppelsheimer for the initial patch.
Fixes #30935.


git-svn-id: https://develop.svn.wordpress.org/trunk@31463 602fd350-edb4-49c9-b593-d223f7449a82
2015-02-14 11:38:41 +00:00
Drew Jaynes (DrewAPicture) e862e3cf6d Inline docs syntax fixes following [28978].
See #28740.


git-svn-id: https://develop.svn.wordpress.org/trunk@29015 602fd350-edb4-49c9-b593-d223f7449a82
2014-07-07 16:41:43 +00:00
Andrew Nacin a7c3b23f1c Simplify the setup-config.php UI flow and load process.
When no configuration file is detected, we now redirect to setup-config.php. This process now uses the WordPress bootstrap, rather than a set of fragile hacks.

fixes #28740.


git-svn-id: https://develop.svn.wordpress.org/trunk@28978 602fd350-edb4-49c9-b593-d223f7449a82
2014-07-03 19:56:37 +00:00
Dion Hulse cccac649d5 Fix wp_guess_url() to work in every scenario I could find, allows us to use it to determine the correct path to the WordPress Site URL before installation for install.php and setup-config.php redirects. Fixes #24480 Fixes #16884
git-svn-id: https://develop.svn.wordpress.org/trunk@25396 602fd350-edb4-49c9-b593-d223f7449a82
2013-09-12 06:56:20 +00:00
Dion Hulse 66aa532da5 When the WordPress files are in a subdirectory, correctly redirect the user to the setup-config.php page from the parent directories index.php. Fixes #24480
git-svn-id: https://develop.svn.wordpress.org/trunk@25385 602fd350-edb4-49c9-b593-d223f7449a82
2013-09-12 05:12:51 +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