Commit Graph

6 Commits

Author SHA1 Message Date
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
Jeremy Felt 3d19ab1ce2 Multisite: Remove redundant `is_multisite()` checks in network admin templates.
`wp-admin/network/admin.php` is required by all of the individual network templates and begins with an `is_multisite()` check of its own. Because of this, we can remove the 26 other checks in the individual templates.

Props flixos90.
Fixes #37447.

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


git-svn-id: http://core.svn.wordpress.org/trunk@38600 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-09-27 15:39:29 +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
nacin f269b75d7b Network admin multisite checks and docs. see #14435.
git-svn-id: http://svn.automattic.com/wordpress/trunk@16272 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2010-11-10 14:27:15 +00:00
nacin de9ce9e2fe Doc blocks for wp-admin/network. see #14435.
git-svn-id: http://svn.automattic.com/wordpress/trunk@15880 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2010-10-21 11:21:13 +00:00
ryan 21e3f0f7fa Network Admin, first pass. see #14435
git-svn-id: http://svn.automattic.com/wordpress/trunk@15481 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2010-07-30 20:34:54 +00:00