Commit Graph

21 Commits

Author SHA1 Message Date
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
Dominik Schilling (ocean90)
37acff86ca Import: Avoid counting an uncountable type when reading arguments passed to a script.
Props josephscott.
Fixes #42898.

git-svn-id: https://develop.svn.wordpress.org/trunk@42771 602fd350-edb4-49c9-b593-d223f7449a82
2018-03-02 17:16:37 +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
Gary Pendergast
f5c4c69bf1 Database: Don't quote placeholders in queries going through $wpdb->prepare()
To bring Core into line with the changes to `$wpdb->prepare()` in WordPress 4.8.2, query placeholders shouldn't be quoted.

Props jrf, johnjamesjacoby.
Fixes #41983.



git-svn-id: https://develop.svn.wordpress.org/trunk@41628 602fd350-edb4-49c9-b593-d223f7449a82
2017-09-28 04:31:05 +00:00
Drew Jaynes
83abe4dbfc Docs: Use a third-person singular verb in the DocBlock summary for WP_Importer::stop_the_insanity().
Also add a missing `@since` tag. Introduced in 3.0.0, see [14760].

See #41017.


git-svn-id: https://develop.svn.wordpress.org/trunk@41195 602fd350-edb4-49c9-b593-d223f7449a82
2017-07-30 15:45:50 +00:00
Drew Jaynes
8e453de898 Docs: Add a missing description for the $wpdb global notation in the DocBlock for WP_Importer::stop_the_insanity().
Props tejas5989.
Fixes #41447.


git-svn-id: https://develop.svn.wordpress.org/trunk@41194 602fd350-edb4-49c9-b593-d223f7449a82
2017-07-30 15:42:17 +00:00
Jeremy Felt
eeef1da9e1 Multisite: Replace get_blog_details() in WP_Importer::set_blog() with get_site().
Props spacedmonkey, iamfriendly.
See #37102.
Fixes #38345.


git-svn-id: https://develop.svn.wordpress.org/trunk@38820 602fd350-edb4-49c9-b593-d223f7449a82
2016-10-19 05:44:21 +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
Dominik Schilling (ocean90)
05e0f92632 Remove unnecessary feedback message from WP_Importer::is_user_over_quota().
fixes #32021.

git-svn-id: https://develop.svn.wordpress.org/trunk@33008 602fd350-edb4-49c9-b593-d223f7449a82
2015-06-30 20:31:13 +00:00
Scott Taylor
ec5758225c Add missing doc blocks to wp-admin/includes/*.
Fix some egregious uses of tabbing.
Some functions can simply return `apply_filters(...)` instead of setting a variable that is immediately returned.

See #32444.


git-svn-id: https://develop.svn.wordpress.org/trunk@32654 602fd350-edb4-49c9-b593-d223f7449a82
2015-05-29 20:16:22 +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
357fa4131a Fix some internal types that are passed to functions to avoid changing the acceptable types passed as arguments to those functions:
* In `WP_Importer->is_user_over_quota()`, the default value for the first argument for `upload_is_user_over_quota()` is `true`. Don't bother passing `1`.
* When calling `submit_button()` with no `$name`, pass empty string instead of `false`.
* The default value for the 2nd argument to `get_edit_post_link()` is `'display'`. Because PHP is PHP, passing `true` is the same as passing `'display'` or nothing. Don't bother passing `true`. 
* In `WP_User_Meta_Session_Tokens::drop_sessions()`, pass `0` instead of `false` to `delete_metadata()` as the value for `$object_id`, which expects an int. 

See #30799.


git-svn-id: https://develop.svn.wordpress.org/trunk@31220 602fd350-edb4-49c9-b593-d223f7449a82
2015-01-16 22:50:20 +00:00
Scott Taylor
cb85e15f06 Adding a @return annotation to constructors is generally not recommended as a constructor does not have a meaningful return value - anything that is returned is discarded.
See #30799.


git-svn-id: https://develop.svn.wordpress.org/trunk@31125 602fd350-edb4-49c9-b593-d223f7449a82
2015-01-10 06:12:25 +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
Andrew Nacin
ca32a2d410 Pinking shears.
git-svn-id: https://develop.svn.wordpress.org/trunk@29707 602fd350-edb4-49c9-b593-d223f7449a82
2014-09-04 15:22:58 +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
Scott Taylor
e996a74984 Restore $val in WP_Importer::bump_request_timeout() - even though the parent class and WP_Import ignore the parameter, it creates an incompatible interface notice in the plugin.
See [28629].



git-svn-id: https://develop.svn.wordpress.org/trunk@28637 602fd350-edb4-49c9-b593-d223f7449a82
2014-05-30 19:34:53 +00:00
Scott Taylor
7ab6b096e6 Remove some dead variable assignments.
See #27882.



git-svn-id: https://develop.svn.wordpress.org/trunk@28629 602fd350-edb4-49c9-b593-d223f7449a82
2014-05-30 16:58:36 +00:00
Scott Taylor
99c99b77e3 Add access modifier (public) to methods in WP_Importer.
See #27881, #22234.


git-svn-id: https://develop.svn.wordpress.org/trunk@28492 602fd350-edb4-49c9-b593-d223f7449a82
2014-05-19 00:19:00 +00:00
Scott Taylor
16ef2c2e36 Remove lingering instances of call time pass-by-reference, limited to instances of callable - use $this instead of &$this.
Props jdgrimes.
See #25160.



git-svn-id: https://develop.svn.wordpress.org/trunk@25254 602fd350-edb4-49c9-b593-d223f7449a82
2013-09-05 16:33:50 +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