Commit Graph

93 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
ryan
5322be300a File file level phpdoc from jacobsantos. see #7037
git-svn-id: http://svn.automattic.com/wordpress/trunk@7992 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2008-05-25 20:33:13 +00:00
ryan
a6a1522a8d File file level phpdoc from jacobsantos. see #7037
git-svn-id: http://svn.automattic.com/wordpress/trunk@7991 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2008-05-25 15:50:15 +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
saxmatt
ad536c567e Better default behaviour for theme calling
git-svn-id: http://svn.automattic.com/wordpress/trunk@2303 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2005-02-13 20:38:28 +00:00
rboren
ab6ff7fee4 Relocate default theme to themes/default. Remove special casing of default theme. Do not look directly in wp-content/ for default theme files. Simplify, simplify.
git-svn-id: http://svn.automattic.com/wordpress/trunk@2032 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2005-01-02 02:47:45 +00:00
saxmatt
232e019cc6 Moving default template stuff into wp-includes, uncluttering root
git-svn-id: http://svn.automattic.com/wordpress/trunk@2009 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2004-12-30 10:58:06 +00:00
saxmatt
c6ba5da320 Title attribute can cause probs with markup.
git-svn-id: http://svn.automattic.com/wordpress/trunk@1668 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2004-09-16 10:58:33 +00:00
rboren
3fe8292a93 Localize more text. Bug 119.
git-svn-id: http://svn.automattic.com/wordpress/trunk@1588 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2004-09-03 22:40:37 +00:00
saxmatt
3c6bc4ae08 Header/footer template start
git-svn-id: http://svn.automattic.com/wordpress/trunk@1542 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2004-08-20 17:14:27 +00:00
rboren
73402f0741 WP Query class.
git-svn-id: http://svn.automattic.com/wordpress/trunk@1516 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2004-08-08 15:31:50 +00:00
rboren
2a1d84ef82 Simplify post paging. Remove "posts paged" setting. We should always page. Add posts_nav_link() to the default template.
git-svn-id: http://svn.automattic.com/wordpress/trunk@1500 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2004-07-29 03:34:08 +00:00
saxmatt
724a294df6 A nicer meta bar.
git-svn-id: http://svn.automattic.com/wordpress/trunk@1459 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2004-07-10 23:34:47 +00:00
saxmatt
2281378585 Some meta changes.
git-svn-id: http://svn.automattic.com/wordpress/trunk@1447 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2004-06-24 21:57:42 +00:00
rboren
25bdc0791c Mark some strings for translation and improve string consistency. From Albert. http://mosquito.wordpress.org/bug_view_page.php?bug_id=0000024
git-svn-id: http://svn.automattic.com/wordpress/trunk@1420 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2004-06-13 16:14:58 +00:00
saxmatt
6728151fd2 Move comments include into function.
git-svn-id: http://svn.automattic.com/wordpress/trunk@1398 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2004-06-10 07:42:48 +00:00
rboren
713e887711 Pass 'Edit This' string to edit_post_link so that it can be translated. http://wordpress.org/support/4/6976
git-svn-id: http://svn.automattic.com/wordpress/trunk@1390 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2004-06-06 15:39:23 +00:00
saxmatt
4e4cb4e004 Allow WordPress installation URI and blog URI to be different.
git-svn-id: http://svn.automattic.com/wordpress/trunk@1203 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2004-04-28 07:27:03 +00:00
saxmatt
ba7695637b Use different query number syntax and hide time and queries by default.
git-svn-id: http://svn.automattic.com/wordpress/trunk@1181 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2004-04-26 04:21:58 +00:00
saxmatt
08c6accba1 Things should be as simple as possible, but no more.
git-svn-id: http://svn.automattic.com/wordpress/trunk@1142 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2004-04-24 19:23:57 +00:00
rboren
c5925bcb6e s/this lines/this line/ so as to deny the IRC denizens their idle amusement.
git-svn-id: http://svn.automattic.com/wordpress/trunk@1133 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2004-04-23 04:05:26 +00:00
saxmatt
0fc3d11f7c Added new template function, the_permalink(). echoes get_permalink. We are now consistent in the templates.
git-svn-id: http://svn.automattic.com/wordpress/trunk@1112 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2004-04-21 04:12:55 +00:00
saxmatt
74c2872215 Plugin enhancements.
git-svn-id: http://svn.automattic.com/wordpress/trunk@1081 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2004-04-16 02:24:37 +00:00
rboren
e3e0e62cd7 gettext l10n.
git-svn-id: http://svn.automattic.com/wordpress/trunk@1080 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2004-04-16 01:56:04 +00:00
alex_t_king
e5248743f9 more localization
git-svn-id: http://svn.automattic.com/wordpress/trunk@1067 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2004-04-13 15:48:11 +00:00
alex_t_king
d30adf576c more localization
git-svn-id: http://svn.automattic.com/wordpress/trunk@1066 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2004-04-13 15:31:35 +00:00
alex_t_king
9e6a5ab947 added the first localization strings in index.php
git-svn-id: http://svn.automattic.com/wordpress/trunk@1065 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2004-04-13 06:56:38 +00:00
saxmatt
817fc58a6b Capitalization error
git-svn-id: http://svn.automattic.com/wordpress/trunk@1062 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2004-04-12 18:11:18 +00:00
saxmatt
db4d716fbc XFN profile.
git-svn-id: http://svn.automattic.com/wordpress/trunk@971 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2004-03-11 16:38:25 +00:00
saxmatt
b6aa1f6807 Migration to get_settings
git-svn-id: http://svn.automattic.com/wordpress/trunk@956 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2004-03-01 06:13:32 +00:00
saxmatt
f46175d614 Label on search form.
git-svn-id: http://svn.automattic.com/wordpress/trunk@950 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2004-02-27 19:22:56 +00:00
saxmatt
8927968849 Removed global $siteurl and $blogfilename, use get_settings. Syntax fix for wp-db.
git-svn-id: http://svn.automattic.com/wordpress/trunk@945 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2004-02-26 16:15:48 +00:00
saxmatt
5e9c38f1f4 Feed improvements and suggestions from Mark Pilgrim.
git-svn-id: http://svn.automattic.com/wordpress/trunk@901 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2004-02-21 12:28:36 +00:00
michelvaldrighi
0d178ed361 now using instead of iso-8859-1
git-svn-id: http://svn.automattic.com/wordpress/trunk@880 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2004-02-17 02:29:20 +00:00
saxmatt
ecbf95566b Show categories nested by default. New wp_list_cats function that uses parse_str.
git-svn-id: http://svn.automattic.com/wordpress/trunk@873 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2004-02-13 16:14:36 +00:00
alex_t_king
dc902731b0 added id's and classes to li's in the menu to help in skinning
git-svn-id: http://svn.automattic.com/wordpress/trunk@786 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2004-01-24 22:52:22 +00:00
saxmatt
6f44a5461d Performance optimizations.
git-svn-id: http://svn.automattic.com/wordpress/trunk@760 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2004-01-12 11:52:35 +00:00
emc3
824fb50f60 Fixed include path problem for links-update-xml
git-svn-id: http://svn.automattic.com/wordpress/trunk@737 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2004-01-07 21:02:26 +00:00
saxmatt
da306e01d5 Footer tweaks.
git-svn-id: http://svn.automattic.com/wordpress/trunk@699 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2004-01-03 03:12:05 +00:00
saxmatt
253f684253 Use modified get_links_list
git-svn-id: http://svn.automattic.com/wordpress/trunk@678 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2004-01-01 22:13:06 +00:00
saxmatt
9a4221ee46 Initial Atom syndication and autodiscovery support.
git-svn-id: http://svn.automattic.com/wordpress/trunk@666 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2003-12-30 12:05:25 +00:00
saxmatt
3bcdffad13 edit_this_post() from Ryan Boren. Cleaned up function and integrated into default template.
git-svn-id: http://svn.automattic.com/wordpress/trunk@665 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2003-12-30 10:48:06 +00:00
saxmatt
8d232849e3 New title code.
git-svn-id: http://svn.automattic.com/wordpress/trunk@652 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2003-12-25 00:01:31 +00:00
saxmatt
e7705d626b Formatting changes and version bump.
git-svn-id: http://svn.automattic.com/wordpress/trunk@629 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2003-12-18 09:45:34 +00:00
saxmatt
99a7358baf Renaming Reloaded.
git-svn-id: http://svn.automattic.com/wordpress/trunk@628 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2003-12-18 09:36:13 +00:00
mikelittle
b0db88d03a Some more b2->wp renaming
git-svn-id: http://svn.automattic.com/wordpress/trunk@617 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2003-12-16 01:58:39 +00:00
saxmatt
43e4a8a930 The great renaming.
git-svn-id: http://svn.automattic.com/wordpress/trunk@601 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2003-12-11 00:22:36 +00:00