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
Sergey Biryukov
139387b7e5
Docs: Use 3-digit, x.x.x-style semantic versioning for `_doing_it_wrong()`, `_deprecated_function()`, `_deprecated_argument()`, and `_deprecated_file()` throughout core.
...
Props metodiew.
Fixes #36495 .
Built from https://develop.svn.wordpress.org/trunk@37985
git-svn-id: http://core.svn.wordpress.org/trunk@37926 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-07-06 12:40:29 +00:00
Drew Jaynes
cd8cedc40d
First there were two, and now there are three -- in the @since versions that came before and that shall be. And so it will be, says nacin.
...
Props JustinSainton, SergeyBiryukov, DrewAPicture.
Fixes #26713 .
Built from https://develop.svn.wordpress.org/trunk@26868
git-svn-id: http://core.svn.wordpress.org/trunk@26754 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2013-12-24 18:57:12 +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
westi
7f894ae416
phpdoc for wp-admin. See #7496 props santosj.
...
git-svn-id: http://svn.automattic.com/wordpress/trunk@8645 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2008-08-14 06:30:38 +00:00
westi
075b9e764e
Mark files as deprecated. See #4960 .
...
git-svn-id: http://svn.automattic.com/wordpress/trunk@7448 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2008-03-21 09:29:22 +00:00
ryan
159ea09341
Resurrect admin-functions.php and upgrade-functions.php for back compat. fixes #4956
...
git-svn-id: http://svn.automattic.com/wordpress/trunk@6090 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2007-09-12 02:36:04 +00:00
ryan
770613e763
Admin includes reorg. see #4334
...
git-svn-id: http://svn.automattic.com/wordpress/trunk@5542 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2007-05-25 07:16:21 +00:00
ryan
6445fc55a2
Category/tag to taxonomy upgrade. First cut.
...
git-svn-id: http://svn.automattic.com/wordpress/trunk@5539 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2007-05-24 22:40:24 +00:00
ryan
fec23e1837
Cast to array to avoid warning.
...
git-svn-id: http://svn.automattic.com/wordpress/trunk@5432 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2007-05-10 16:32:11 +00:00
rob1n
69f36791f1
Use WP_HOME and WP_SITEURL in upgrading. Props filosofo. fixes #4211
...
git-svn-id: http://svn.automattic.com/wordpress/trunk@5394 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2007-05-05 00:17:05 +00:00
rob1n
61059a3dc7
Check basename(). see #4169
...
git-svn-id: http://svn.automattic.com/wordpress/trunk@5345 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2007-04-29 21:00:54 +00:00
rob1n
32c3de1779
Automattically deactivate Automattic Widgets, if activated. see #4169
...
git-svn-id: http://svn.automattic.com/wordpress/trunk@5344 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2007-04-29 20:53:29 +00:00
rob1n
ea9d389751
Add unfiltered_upload cap, and allow for admins. Props Nazgul. fixes #4136
...
git-svn-id: http://svn.automattic.com/wordpress/trunk@5303 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2007-04-24 23:27:20 +00:00
ryan
eed1eedc5f
Allow siteurl and home to be defined as constants in wp-config, bypassing the DB. Props filosofo and charleshooper. fixes #4003
...
git-svn-id: http://svn.automattic.com/wordpress/trunk@5093 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2007-03-23 17:45:40 +00:00
markjaquith
3320dd1380
Use strpos instead of strstr where ever possible, for speed. Props rob1n. fixes #3920
...
git-svn-id: http://svn.automattic.com/wordpress/trunk@4990 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2007-03-07 05:29:15 +00:00
ryan
15354bef0b
Drop linkcategories table for those upgrading from previous alphas and betas.
...
git-svn-id: http://svn.automattic.com/wordpress/trunk@4772 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2007-01-19 20:33:11 +00:00
markjaquith
f15b11bc7f
Make sure the server has MySQL 4.0.0 before attempting upgrade or install. fixes #3615
...
git-svn-id: http://svn.automattic.com/wordpress/trunk@4771 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2007-01-19 09:28:02 +00:00
ryan
ec648ae332
Cleanup link upgrade code. Drop linkcategories table.
...
git-svn-id: http://svn.automattic.com/wordpress/trunk@4738 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2007-01-16 01:54:50 +00:00
ryan
995d839bfb
Attachment data abstraction from mdawaffe. fixes #3440
...
git-svn-id: http://svn.automattic.com/wordpress/trunk@4612 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2006-12-05 22:37:19 +00:00
markjaquith
42529f4516
Remember old post slugs and automatically redirect to the new slug. fixes #3202
...
git-svn-id: http://svn.automattic.com/wordpress/trunk@4556 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2006-11-30 08:48:56 +00:00
ryan
9f534ebae6
Remove trailing spaces and convert spaces to tabs. Props Nazgul. fixes #986
...
git-svn-id: http://svn.automattic.com/wordpress/trunk@4495 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2006-11-19 07:56:05 +00:00
markjaquith
91b84a04f4
Less run-on first comment. fixes #3196
...
git-svn-id: http://svn.automattic.com/wordpress/trunk@4366 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2006-10-10 04:48:49 +00:00
ryan
287467334e
Change cron arg passing. Props masquerade. fixes #3169 .
...
git-svn-id: http://svn.automattic.com/wordpress/trunk@4362 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2006-10-08 17:50:21 +00:00
ryan
829a3570c4
Quote weblog title in email From header. Props graeme and Nazgul. fixes #1716
...
git-svn-id: http://svn.automattic.com/wordpress/trunk@4286 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2006-10-04 03:03:41 +00:00
ryan
550956ddf2
Grammar fix. Props Nazgul. fixes #3196
...
git-svn-id: http://svn.automattic.com/wordpress/trunk@4282 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2006-10-04 02:02:22 +00:00
ryan
6c68ddb70e
Oopsie.
...
git-svn-id: http://svn.automattic.com/wordpress/trunk@3877 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2006-06-15 08:56:53 +00:00
ryan
a43e9ca36f
Update Donncha's link.
...
git-svn-id: http://svn.automattic.com/wordpress/trunk@3876 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2006-06-15 08:56:12 +00:00
ryan
f94f2f0bcf
Use the correct filename. Props Mark Jaquith. fixes #2815
...
git-svn-id: http://svn.automattic.com/wordpress/trunk@3863 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2006-06-11 17:55:18 +00:00
ryan
dac809b5a4
Add more fine grained user management caps. Part 1. #2775
...
git-svn-id: http://svn.automattic.com/wordpress/trunk@3846 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2006-06-05 16:52:21 +00:00
ryan
2f68889eb6
Remove private posts from front page query. Aadd private posts and page caps. fixes #2613
...
git-svn-id: http://svn.automattic.com/wordpress/trunk@3772 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2006-05-11 23:13:35 +00:00
ryan
3d45520fff
Make sure we have links to iterate over. fixes #2675
...
git-svn-id: http://svn.automattic.com/wordpress/trunk@3734 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2006-04-21 05:00:58 +00:00
ryan
6a1fbbfdd9
Accommodate multi-blog setups that share user tables by checking to see if the admin user already exists during install.
...
git-svn-id: http://svn.automattic.com/wordpress/trunk@3692 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2006-04-04 02:26:02 +00:00
ryan
6123ea7eb7
Some optimization of the post query. #2604
...
git-svn-id: http://svn.automattic.com/wordpress/trunk@3678 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2006-04-02 00:33:10 +00:00
ryan
8a751c591d
Pluggable install functions. fixes #2616
...
git-svn-id: http://svn.automattic.com/wordpress/trunk@3670 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2006-03-31 08:07:39 +00:00
ryan
bc44b1b75d
Cron fixes from masquerade. #2425
...
git-svn-id: http://svn.automattic.com/wordpress/trunk@3635 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2006-03-07 22:34:05 +00:00
ryan
eaea1c6e70
prefix not table_prefix. Props Kafkaesqui. fixes #2528
...
git-svn-id: http://svn.automattic.com/wordpress/trunk@3604 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2006-03-03 20:36:40 +00:00
ryan
df35b1041b
Use table prefix from wpdb. Props Mark J. #2524
...
git-svn-id: http://svn.automattic.com/wordpress/trunk@3603 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2006-03-03 17:19:05 +00:00
ryan
6452ec1bbc
What's up front? #2515
...
git-svn-id: http://svn.automattic.com/wordpress/trunk@3581 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2006-03-01 07:08:04 +00:00
ryan
e9c75f4bd2
Bookmark/link rework. #2499
...
git-svn-id: http://svn.automattic.com/wordpress/trunk@3570 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2006-02-27 04:57:30 +00:00
ryan
941ec0ff97
Blog privacy. fixes #2480
...
git-svn-id: http://svn.automattic.com/wordpress/trunk@3548 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2006-02-18 07:40:43 +00:00
ryan
e9442d2d08
schedule future posts with cron when upgrading.
...
git-svn-id: http://svn.automattic.com/wordpress/trunk@3534 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2006-02-14 23:48:44 +00:00
ryan
521f99d371
Correct inverted logic.
...
git-svn-id: http://svn.automattic.com/wordpress/trunk@3533 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2006-02-14 23:37:28 +00:00
ryan
e91aa85ce7
Bump db ver check.
...
git-svn-id: http://svn.automattic.com/wordpress/trunk@3532 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2006-02-14 23:25:36 +00:00
ryan
a37a1d7440
Give future posts a post_status of future when upgrading.
...
git-svn-id: http://svn.automattic.com/wordpress/trunk@3531 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2006-02-14 23:22:22 +00:00
ryan
dd202ce1f9
Death to trailing tabs. Props Mark J. fixes #2405
...
git-svn-id: http://svn.automattic.com/wordpress/trunk@3517 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2006-02-12 07:53:23 +00:00
ryan
a5fc1e9ebe
Post status = future. #2426
...
git-svn-id: http://svn.automattic.com/wordpress/trunk@3514 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2006-02-12 07:41:56 +00:00
ryan
d6d431c1be
Add new page caps now that pages can be draft or publish. Brings page caps to parity with posts. Add delete caps for posts and pages. fixes #2382 #2336 #2301
...
git-svn-id: http://svn.automattic.com/wordpress/trunk@3513 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2006-02-11 09:56:02 +00:00
ryan
f812294867
Allow draft pages. Use post_type for object types. Reserve post_status strictly for status. fixes #1820
...
git-svn-id: http://svn.automattic.com/wordpress/trunk@3510 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2006-02-09 10:03:48 +00:00