Commit Graph

42 Commits

Author SHA1 Message Date
Sergey Biryukov
7a6f44b979 Docs: Add missing description for $post global.
Props immeet94.
Fixes #46503. See #47110.

git-svn-id: https://develop.svn.wordpress.org/trunk@45742 602fd350-edb4-49c9-b593-d223f7449a82
2019-08-04 12:27:02 +00:00
Sergey Biryukov
d19f4d7ff4 Docs: Add missing description for $wp_query and $wp_the_query globals.
Props mukesh27.
See #45604, #47110.

git-svn-id: https://develop.svn.wordpress.org/trunk@45739 602fd350-edb4-49c9-b593-d223f7449a82
2019-08-04 01:58:03 +00:00
Sergey Biryukov
3c73c7a56f Taxonomy: Fix deprecated calls to get_terms().
The taxonomy should be passed as part of `$args`, rather than as its own argument.

Props sgastard, mukesh27, SergeyBiryukov.
Fixes #47819.

git-svn-id: https://develop.svn.wordpress.org/trunk@45723 602fd350-edb4-49c9-b593-d223f7449a82
2019-08-03 03:34:54 +00:00
Gary Pendergast
18ec05e23a Coding Standards: Fix all WordPress.DB.PreparedSQLPlaceholders issues.
See #47632.



git-svn-id: https://develop.svn.wordpress.org/trunk@45603 602fd350-edb4-49c9-b593-d223f7449a82
2019-07-05 05:42:57 +00:00
Gary Pendergast
9a1549767e Coding Standards: Fix the Squiz.PHP.DisallowMultipleAssignments violations in wp-admin.
See #47632.



git-svn-id: https://develop.svn.wordpress.org/trunk@45583 602fd350-edb4-49c9-b593-d223f7449a82
2019-07-01 12:50:14 +00:00
Sergey Biryukov
10855438ea Date/Time: Replace all instances of date() with gmdate().
Use of `date()` in core depends on PHP timezone set to UTC and not changed by third party code (which cannot be guaranteed).

`gmdate()` is functionally equivalent, but is not affected by PHP timezone setting: it's always UTC, which is the exact behavior the core needs.

Props nielsdeblaauw, Rarst.
Fixes #46438. See #44491.

git-svn-id: https://develop.svn.wordpress.org/trunk@45424 602fd350-edb4-49c9-b593-d223f7449a82
2019-05-26 00:11:37 +00:00
Sergey Biryukov
c295378ecd Export: Remove extra whitespace from <title>, <content:encoded>, and <excerpt:encoded> elements in WXR files.
Props sgastard, juliarrr, aristath, SergeyBiryukov.
Fixes #46575.

git-svn-id: https://develop.svn.wordpress.org/trunk@45216 602fd350-edb4-49c9-b593-d223f7449a82
2019-04-16 15:56:48 +00:00
Gary Pendergast
33caf61b8b Coding Standards: Fix the Squiz.ControlStructures.ControlSignature.SpaceAfterCloseBrace violations.
See #45934.



git-svn-id: https://develop.svn.wordpress.org/trunk@44566 602fd350-edb4-49c9-b593-d223f7449a82
2019-01-11 06:39:55 +00:00
Gary Pendergast
a75d153eee Coding Standards: Upgrade WPCS to 1.0.0
WPCS 1.0.0 includes a bunch of new auto-fixers, which drops the number of coding standards issues across WordPress significantly. Prior to running the auto-fixers, there were 15,312 issues detected. With this commit, we now drop to 4,769 issues.

This change includes three notable additions:
- Multiline function calls must now put each parameter on a new line.
- Auto-formatting files is now part of the `grunt precommit` script. 
- Auto-fixable coding standards issues will now cause Travis failures.

Fixes #44600.



git-svn-id: https://develop.svn.wordpress.org/trunk@43571 602fd350-edb4-49c9-b593-d223f7449a82
2018-08-17 01:50:26 +00:00
John Blackbourn
d541798a64 Docs: Document more parameters and properties using typed array notation.
See #41756


git-svn-id: https://develop.svn.wordpress.org/trunk@42875 602fd350-edb4-49c9-b593-d223f7449a82
2018-03-25 18:09:56 +00:00
Gary Pendergast
8f95800d52 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.



git-svn-id: https://develop.svn.wordpress.org/trunk@42343 602fd350-edb4-49c9-b593-d223f7449a82
2017-11-30 23:09:33 +00:00
Sergey Biryukov
021d5ba403 Docs: Add missing backtick character in export_wp() DocBlock.
Props pbiron.
Fixes #41178.

git-svn-id: https://develop.svn.wordpress.org/trunk@40958 602fd350-edb4-49c9-b593-d223f7449a82
2017-06-27 00:57:56 +00:00
Dion Hulse
cedd323452 Docs: Correct a number of typos/spelling mistakes in inline comments.
Props ottok.
Fixes #38464.


git-svn-id: https://develop.svn.wordpress.org/trunk@38893 602fd350-edb4-49c9-b593-d223f7449a82
2016-10-25 00:37:50 +00:00
Drew Jaynes
19a85950ad Docs: Add a period missed in an argument description in [38253] for #36338.
git-svn-id: https://develop.svn.wordpress.org/trunk@38254 602fd350-edb4-49c9-b593-d223f7449a82
2016-08-13 17:43:42 +00:00
Drew Jaynes
77aa4a8b72 Docs: Add documentation for all arguments accepted by export_wp().
Props theMikeD for the initial patch.
Fixes #36338.


git-svn-id: https://develop.svn.wordpress.org/trunk@38253 602fd350-edb4-49c9-b593-d223f7449a82
2016-08-13 17:42:05 +00:00
Drew Jaynes
ea78fbdcdb Docs: Fix minor formatting and syntax for wp-admin/* elements introduced in 4.6.
See #37318.


git-svn-id: https://develop.svn.wordpress.org/trunk@38024 602fd350-edb4-49c9-b593-d223f7449a82
2016-07-09 13:59:16 +00:00
Drew Jaynes
1cd420af5e Docs: Standardize hook docs in wp-admin/* to use third-person singular verbs per the inline documentation standards for PHP.
See #36913.


git-svn-id: https://develop.svn.wordpress.org/trunk@37488 602fd350-edb4-49c9-b593-d223f7449a82
2016-05-22 18:00:23 +00:00
Boone Gorges
07fa16713d Include taxonomy term metadata in WXR export.
Because term XML nodes now include termmeta and can thus be much larger, this
changeset also includes adds some newlines and indentation to make the XML
easier to read.

Props Chouby.
See #34062.

git-svn-id: https://develop.svn.wordpress.org/trunk@37240 602fd350-edb4-49c9-b593-d223f7449a82
2016-04-18 03:37:04 +00:00
Drew Jaynes
0cb7c0bd9f Docs: Add missing descriptions for the $wpdb global in DocBlocks all the places.
See #32246.


git-svn-id: https://develop.svn.wordpress.org/trunk@35170 602fd350-edb4-49c9-b593-d223f7449a82
2015-10-14 23:43:10 +00:00
Scott Taylor
0fdbaecbc6 Export: Add late-escaping to the contents of several nodes to avoid creating invalid XML and XML parse errors.
Props westonruter.
Fixes #33732.


git-svn-id: https://develop.svn.wordpress.org/trunk@34333 602fd350-edb4-49c9-b593-d223f7449a82
2015-09-19 18:52:27 +00:00
Scott Taylor
1b550d9fb2 Reinstate [34327]. minus the unit test deletion.
git-svn-id: https://develop.svn.wordpress.org/trunk@34329 602fd350-edb4-49c9-b593-d223f7449a82
2015-09-19 17:48:18 +00:00
Scott Taylor
1e7832cc3b Revert [34327] to fix the accidental deletion of some unit tests.
git-svn-id: https://develop.svn.wordpress.org/trunk@34328 602fd350-edb4-49c9-b593-d223f7449a82
2015-09-19 17:45:46 +00:00
Scott Taylor
750c22abf8 Export: Add a filer, 'export_wp_filename' to change the filename of the file to download when exporting.
Props MikeHansenMe, wonderboymusic.
Fixes #29500.


git-svn-id: https://develop.svn.wordpress.org/trunk@34327 602fd350-edb4-49c9-b593-d223f7449a82
2015-09-19 17:43:52 +00:00
Scott Taylor
3624366045 Export: allow Media to exported separately from other types.
Props PhilipLakin.
Fixes #32230.


git-svn-id: https://develop.svn.wordpress.org/trunk@34326 602fd350-edb4-49c9-b593-d223f7449a82
2015-09-19 16:46:17 +00:00
Scott Taylor
5936394bb6 In WP_User, add @property docs for description, first_name, and last_name. user_firstname and user_lastname only exist for back-compat.
See #33491.


git-svn-id: https://develop.svn.wordpress.org/trunk@33958 602fd350-edb4-49c9-b593-d223f7449a82
2015-09-09 01:12:41 +00:00
Scott Taylor
60ba8b05e4 Introduce WP_Comment class to model/strongly-type rows from the comments database table. Inclusion of this class is a pre-req for some more general comment cleanup and sanity.
* Takes inspiration from `WP_Post` and adds sanity to comment caching. 
* Clarifies when the current global value for `$comment` is returned. The current implementation in `get_comment()` introduces side effects and an occasion stale global value for `$comment` when comment caches are cleaned.
* Strongly-types `@param` docs
* This class is marked `final` for now

Props wonderboymusic, nacin.

See #32619.


git-svn-id: https://develop.svn.wordpress.org/trunk@33891 602fd350-edb4-49c9-b593-d223f7449a82
2015-09-03 18:16:35 +00:00
Scott Taylor
f162be6046 For doc block types, favor bool over the few remaining booleans
See #32444.


git-svn-id: https://develop.svn.wordpress.org/trunk@32964 602fd350-edb4-49c9-b593-d223f7449a82
2015-06-27 01:02:12 +00:00
Scott Taylor
3f29a2101d Don't loosely compare functions that return bool against a literal bool.
See #32444.


git-svn-id: https://develop.svn.wordpress.org/trunk@32730 602fd350-edb4-49c9-b593-d223f7449a82
2015-06-12 17:18:38 +00:00
Scott Taylor
60e5c90e62 Add (more) missing doc blocks to wp-admin/includes/*.
See #32444.


git-svn-id: https://develop.svn.wordpress.org/trunk@32655 602fd350-edb4-49c9-b593-d223f7449a82
2015-05-29 21:16:59 +00:00
Scott Taylor
23ce2efd12 Add @global annotations for wp-admin/*.
See #32444.


git-svn-id: https://develop.svn.wordpress.org/trunk@32642 602fd350-edb4-49c9-b593-d223f7449a82
2015-05-28 21:40:27 +00:00
Scott Taylor
6fd11624d1 The keyword elseif should be used instead of else if so that all control keywords look like single words.
This was a mess, is now standardized across the codebase, except for a few 3rd-party libs. 

See #30799.


git-svn-id: https://develop.svn.wordpress.org/trunk@31090 602fd350-edb4-49c9-b593-d223f7449a82
2015-01-08 07:04:40 +00:00
John Blackbourn
7082b703b2 Improve various hook and filter docs so they are correctly parsed for the code reference.
Fixes #30558
Props DrewAPicture


git-svn-id: https://develop.svn.wordpress.org/trunk@30754 602fd350-edb4-49c9-b593-d223f7449a82
2014-12-06 21:31:41 +00:00
Scott Taylor
c8acddfdc8 Improve some post_status-related documentation.
Props ericlewis.
See #30230.


git-svn-id: https://develop.svn.wordpress.org/trunk@30155 602fd350-edb4-49c9-b593-d223f7449a82
2014-11-01 20:19:26 +00:00
Andrew Nacin
d395f64117 Export: Add wxr_export_skip_commentmeta filter to match the _postmeta filter.
props cfinke.
fixes #28745.


git-svn-id: https://develop.svn.wordpress.org/trunk@29573 602fd350-edb4-49c9-b593-d223f7449a82
2014-08-22 01:47:59 +00:00
Drew Jaynes (DrewAPicture)
6ddc1e5f6d Fix syntax for single- and multi-line comments in wp-admin-directory files.
See #28931.


git-svn-id: https://develop.svn.wordpress.org/trunk@29206 602fd350-edb4-49c9-b593-d223f7449a82
2014-07-17 09:13:53 +00:00
John Blackbourn
f02e878bb0 Only include relevant post authors in WXR exports. Fixes #20206. Props jeremyfelt.
git-svn-id: https://develop.svn.wordpress.org/trunk@28731 602fd350-edb4-49c9-b593-d223f7449a82
2014-06-10 19:14:26 +00:00
Scott Taylor
e43d2a73d8 Fix some hackificator odds and ends in wp-admin:
* `wp-activate.php` and `wp-admin/themes.php` don't need the closing PHP tag
* Switch single quotes for HTML attribute values to double in a few places
* Convert `include_once file.php` syntax to `include_once( 'file.php' )`
* Add access modifiers to methods/members in: `_WP_List_Table_Compat`, `Walker_Nav_Menu_Edit`, `Walker_Nav_Menu_Checklist`, `WP_Screen`, `Walker_Category_Checklist`
* `edit_user()` doesn't need to import the `$wpdb` global
* `wp_list_widgets()` doesn't need to import the `$sidebars_widgets` global
* switch/endswitch syntax is not supported in Hack
* A `<ul>` in `wp-admin/users.php` is unclosed

See #27881.


git-svn-id: https://develop.svn.wordpress.org/trunk@28500 602fd350-edb4-49c9-b593-d223f7449a82
2014-05-19 05:03:44 +00:00
Drew Jaynes
9224a141f3 Inline documentation for hooks in wp-admin/includes/export.php.
Props cmmarslender, kpdesign.
Fixes #26894.


git-svn-id: https://develop.svn.wordpress.org/trunk@27048 602fd350-edb4-49c9-b593-d223f7449a82
2014-01-28 08:09:13 +00:00
Scott Taylor
5643e3ca17 Pass $args to the export_wp action in export_wp(), which is currently passed no arguments.
Props nickdaugherty.
Fixes #25574.



git-svn-id: https://develop.svn.wordpress.org/trunk@26011 602fd350-edb4-49c9-b593-d223f7449a82
2013-11-05 01:26:49 +00:00
Andrew Nacin
c87ad6023d Spell out duplicate hook locations.
props DrewAPicture.
fixes #25658.


git-svn-id: https://develop.svn.wordpress.org/trunk@25868 602fd350-edb4-49c9-b593-d223f7449a82
2013-10-22 17:21:32 +00:00
Scott Taylor
d141191598 Consistently wrap author and excerpt nodes with CDATA in feeds.
Fixes #18056.



git-svn-id: https://develop.svn.wordpress.org/trunk@25315 602fd350-edb4-49c9-b593-d223f7449a82
2013-09-10 16:54:16 +00:00
Andrew Nacin
b43712e0f7 New develop.svn.wordpress.org repository based on the old core.svn repository.
* All WordPress files move to a src/ directory.
 * New task runner (Grunt), configured to copy a built WordPress to build/.
 * svn:ignore and .gitignore for Gruntfile.js, wp-config.php, and node.js.
 * Remove Akismet external from develop.svn. Still exists in core.svn.
 * Drop minified files from src/. The build process will now generate these.

props koop.
see #24976.

and see http://wp.me/p2AvED-1AI.



git-svn-id: https://develop.svn.wordpress.org/trunk@25001 602fd350-edb4-49c9-b593-d223f7449a82
2013-08-07 05:25:25 +00:00