Commit Graph

18 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
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
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
ryan e3b46b25d3 Lose EOF ?>. Clean up EOF newlines. fixes #12307
git-svn-id: http://svn.automattic.com/wordpress/trunk@19712 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2012-01-08 17:01:11 +00:00
nacin a717edca97 Always exit after wp_redirect. props filosofo, fixes #15518.
git-svn-id: http://svn.automattic.com/wordpress/trunk@16847 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2010-12-09 18:02:54 +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
nacin 34c1fa6d0b target=blank for help. props jorbin, see #13467
git-svn-id: http://svn.automattic.com/wordpress/trunk@15132 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2010-06-03 21:00:39 +00:00
ryan 17129fb62e Cut 'em out, move 'em on, trailing whitespace
git-svn-id: http://svn.automattic.com/wordpress/trunk@15116 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2010-06-02 20:04:07 +00:00
nacin 8caed1c2a1 Help for multisite. props andrea_r, dougwrites, duck_. see #13467.
git-svn-id: http://svn.automattic.com/wordpress/trunk@15004 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2010-05-27 21:20:23 +00:00
nacin 185ae53008 Fix typo in [14926]
git-svn-id: http://svn.automattic.com/wordpress/trunk@14927 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2010-05-26 02:59:08 +00:00
nacin 262545acd5 Missing translated string in ms-upgrade-network. props dd32.
git-svn-id: http://svn.automattic.com/wordpress/trunk@14926 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2010-05-26 02:57:40 +00:00
nacin 64c5bb0a26 Use upgrade_db instead of step=1 in ms-upgrade-network. Also, no need to check spam/deleted/archived as that is in the query. see #11869.
git-svn-id: http://svn.automattic.com/wordpress/trunk@14678 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2010-05-15 21:36:38 +00:00
nacin 6ec7cb4540 Use relative paths when including files, avoiding include_path. fixes #12594, props sorich87.
git-svn-id: http://svn.automattic.com/wordpress/trunk@14139 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2010-04-18 06:14:45 +00:00
dd32 442d41291a Tweak new strings for better typography. Props demetris. Fixes #12962
git-svn-id: http://svn.automattic.com/wordpress/trunk@14070 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2010-04-11 10:41:54 +00:00
nacin c449adb237 File-level phpdoc for multisite files.
git-svn-id: http://svn.automattic.com/wordpress/trunk@13998 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2010-04-04 13:29:35 +00:00
nacin 9492517abd Check for empty(), not !is_array(), when trying to determine if wpdb::get_results() returned results. See #10607
git-svn-id: http://svn.automattic.com/wordpress/trunk@13681 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2010-03-12 00:26:31 +00:00
wpmuguru dec2715ca4 UI upgrade -> update, see #12517
git-svn-id: http://svn.automattic.com/wordpress/trunk@13590 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2010-03-04 23:28:15 +00:00
wpmuguru a5a9f32b73 multisite UX, see #11644, add manage_ caps for super_admin, fixes #11803
git-svn-id: http://svn.automattic.com/wordpress/trunk@13301 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2010-02-22 18:41:38 +00:00