Commit Graph

30 Commits

Author SHA1 Message Date
John Blackbourn
9bc7d0a776 Docs: Another pass at some inline docs fixes mostly made by PHPCBF.
See #49572, #50744
Built from https://develop.svn.wordpress.org/trunk@48590


git-svn-id: http://core.svn.wordpress.org/trunk@48352 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2020-07-23 21:11:05 +00:00
John Blackbourn
1fbcdb2213 Docs: Various corrections to inline docblocks.
See #49572
Built from https://develop.svn.wordpress.org/trunk@48573


git-svn-id: http://core.svn.wordpress.org/trunk@48335 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2020-07-23 00:48:06 +00:00
Sergey Biryukov
b16368c268 Docs: Remove @staticvar tags from core.
The tag was supported in phpDocumentor 1.x, but is no longer supported in 2.x and 3.x.

Usage of static variables is considered an internal implementation detail and has no information value for someone reading the docs.

Props alishanvr, jrf.
Fixes #50426.
Built from https://develop.svn.wordpress.org/trunk@48109


git-svn-id: http://core.svn.wordpress.org/trunk@47878 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2020-06-20 12:40:12 +00:00
Sergey Biryukov
7932193708 Coding Standards: Use strict comparison where static strings are involved.
This reduces the number of `WordPress.PHP.StrictComparisons.LooseComparison` issues in half, from 1897 to 890.

Includes minor code layout fixes for better readability.

See #49542.
Built from https://develop.svn.wordpress.org/trunk@47808


git-svn-id: http://core.svn.wordpress.org/trunk@47584 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2020-05-16 18:42:12 +00:00
Sergey Biryukov
641c632b0c Coding Standards: Use Yoda conditions where appropriate.
See #49222.
Built from https://develop.svn.wordpress.org/trunk@47219


git-svn-id: http://core.svn.wordpress.org/trunk@47019 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2020-02-09 16:55:09 +00:00
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
Sergey Biryukov
001ffe81fb Docs: Improve inline comments per the documentation standards.
Includes minor code layout fixes for better readability.

See #48303.
Built from https://develop.svn.wordpress.org/trunk@47122


git-svn-id: http://core.svn.wordpress.org/trunk@46922 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2020-01-29 00:45:18 +00:00
Sergey Biryukov
dd4d98a368 Docs: In various @return tags, list the expected type first, instead of false.
Follow-up to [46696].

See #48303.
Built from https://develop.svn.wordpress.org/trunk@47060


git-svn-id: http://core.svn.wordpress.org/trunk@46860 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2020-01-11 18:32:05 +00:00
Sergey Biryukov
d4cec569fe Docs: Fix typo in @return value for PO::trim_quotes().
Props diddledan.
Fixes #48572.
Built from https://develop.svn.wordpress.org/trunk@46730


git-svn-id: http://core.svn.wordpress.org/trunk@46530 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2019-11-13 13:45:02 +00:00
Sergey Biryukov
08227812a0 Docs: Remove @static notations from method DocBlocks in wp-includes/* classes.
This tag has been used in the past, but should no longer be used. Just using the `static` keyword in code is enough for PhpDocumentor on PHP5+ to recognize static variables and methods, and PhpDocumentor will mark them as static.

Props birgire.
See #42803.
Built from https://develop.svn.wordpress.org/trunk@42746


git-svn-id: http://core.svn.wordpress.org/trunk@42576 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2018-02-25 20:22:30 +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
John Blackbourn
9fdbe6538e Docs: Remove & prefixes from parameter documentation to avoid doc parsing errors.
Props sudar for the original patch.

See #35974

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


git-svn-id: http://core.svn.wordpress.org/trunk@41520 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-10-02 22:03:33 +00:00
Ryan McCue
20aa5d7150 General: Correctly detect trailing newline when prepending.
We need to check that the final line is actually an artifact of explode(), not just an empty input string.

See #37082.

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


git-svn-id: http://core.svn.wordpress.org/trunk@39532 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-12-13 02:48:41 +00:00
Ryan McCue
fbc00b31ef General: Remove most uses of create_function()
create_function() is equivalent to eval(), and most of our uses can be refactored. This is simpler, more secure, and slightly more performant.

Props sgolemon.
Fixes #37082.

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


git-svn-id: http://core.svn.wordpress.org/trunk@39531 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-12-13 01:49:39 +00:00
Dion Hulse
048f327bfc Merge the changes to GlotPress's POMO from upstream to WordPress's copy.
Fixes #34748

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


git-svn-id: http://core.svn.wordpress.org/trunk@35678 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-11-20 04:34:25 +00:00
Scott Taylor
84da11d918 Pass false as the 2nd argument to class_exists() to disable autoloading and to not cause problems for those who define __autoload().
Fixes #20523.

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


git-svn-id: http://core.svn.wordpress.org/trunk@34312 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-09-20 03:52:25 +00:00
Scott Taylor
19a3aacc94 Add @static* annotations where they are missing.
Initialize all static vars that are not, most to `null`.

See #32444.

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


git-svn-id: http://core.svn.wordpress.org/trunk@32620 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-05-29 15:43:29 +00:00
Scott Taylor
b35cbbfac7 Add missing @params to src/wp-includes/pomo files.
See #30224.


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


git-svn-id: http://core.svn.wordpress.org/trunk@30653 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2014-11-30 21:41:22 +00:00
Sergey Biryukov
928d7679b3 Fix strict notices in Tests_POMO_PO.
props markoheijnen for initial patch.
fixes #25631.
Built from https://develop.svn.wordpress.org/trunk@26500


git-svn-id: http://core.svn.wordpress.org/trunk@26394 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2013-12-01 12:48:10 +00:00
Nikolay Bachiyski
8a2548a137 Replace gp_endswith() with working implementation
In [22349] we introduced a call to gp_endswith(),
whcih doesn't exist in WordPress, only in GlotPress.

See #22337


git-svn-id: http://core.svn.wordpress.org/trunk@22350 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2012-10-31 22:26:20 +00:00
Nikolay Bachiyski
dcc0729a6c Sync POMO with GlotPress
See http://glotpress.trac.wordpress.org/browser/trunk/pomo/


git-svn-id: http://core.svn.wordpress.org/trunk@22349 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2012-10-31 22:13:51 +00:00
nbachiyski
688eebdc26 Sync pomo library with the current GlotPress version
git-svn-id: http://svn.automattic.com/wordpress/trunk@18528 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2011-08-11 04:29:35 +00:00
nacin
40773a776b Remove trailing whites and double semicolons.
git-svn-id: http://svn.automattic.com/wordpress/trunk@13830 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2010-03-26 19:36:49 +00:00
markjaquith
09e8d27130 Whitespace cleanup
git-svn-id: http://svn.automattic.com/wordpress/trunk@13316 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2010-02-22 23:12:48 +00:00
ryan
3b98150c82 Sync pomo. Props nbachiyski. fixes #11832
git-svn-id: http://svn.automattic.com/wordpress/trunk@13228 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2010-02-19 18:01:50 +00:00
westi
17c7533b72 Swap out ;; for ;. Fixes #11618 props demetris and nacin.
git-svn-id: http://svn.automattic.com/wordpress/trunk@12548 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2009-12-26 16:53:17 +00:00
westi
cd36d71ed9 Merge updated pomo code. Includes new NOOP_Translations class see #10971 props nbachiyski.
git-svn-id: http://svn.automattic.com/wordpress/trunk@12079 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2009-10-21 07:06:55 +00:00
ryan
4c0207a772 Merge latest pomo. Works around mbstring.func_overload. Props nbachiyski. fixes #10236 for trunk
git-svn-id: http://svn.automattic.com/wordpress/trunk@11626 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2009-06-23 16:32:52 +00:00
ryan
e8b6fe7347 Trim trailing whitespace
git-svn-id: http://svn.automattic.com/wordpress/trunk@10810 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2009-03-18 02:43:45 +00:00
ryan
5dfddd7b18 Switch to pomo lib. Support gettext contexts. Deprecate long form functions. Props nbachiyski. fixes #9112 #9111
git-svn-id: http://svn.automattic.com/wordpress/trunk@10584 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2009-02-17 05:03:29 +00:00