Commit Graph

389 Commits

Author SHA1 Message Date
Sergey Biryukov 38676936ba Coding Standards: Use strict type check for `in_array()` and `array_search()` where strings are involved.
This reduces the number of `WordPress.PHP.StrictInArray.MissingTrueStrict` issues from 486 to 50.

Includes minor code layout fixes for better readability.

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


git-svn-id: http://core.svn.wordpress.org/trunk@47325 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2020-04-05 03:02:11 +00:00
Sergey Biryukov 63ed0401a0 Privacy: Revert [47269] for now to address side effects on Multisite installations.
See #44176.
Built from https://develop.svn.wordpress.org/trunk@47280


git-svn-id: http://core.svn.wordpress.org/trunk@47080 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2020-02-11 21:48:06 +00:00
Sergey Biryukov 30c7bb621c Privacy: Un-map privacy capabilities to make them available to be assigned for custom roles:
* `erase_others_personal_data`
* `export_others_personal_data`
* `manage_privacy_options`

Previously mapped to `manage_options` or `manage_network` (on Multisite), these are now added to the Administrator role separately.

Additionally, `manage_privacy_options` is added to the Editor role.

Props garrett-eclipse, xkon, pbiron, desrosj, johnbillion, flixos90, juliobox, lakenh, Ov3rfly, ianatkins.
Fixes #44176.
Built from https://develop.svn.wordpress.org/trunk@47269


git-svn-id: http://core.svn.wordpress.org/trunk@47069 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2020-02-11 18:36:06 +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 4edec193bc Users: When creating the first user on installation, populate the Website profile field with the site URL.
Skip setting the field if the user already exists, which is the case when the user tables are being shared among multiple sites.

Props EFAREM, eclare, darrenlambert, zachflauaus, viralsampat.
Fixes #35778.
Built from https://develop.svn.wordpress.org/trunk@46989


git-svn-id: http://core.svn.wordpress.org/trunk@46789 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2019-12-18 02:26:03 +00:00
Sergey Biryukov bbd898b1dd Upgrade/Install: Remove unused global in `upgrade_430_fix_comments()`.
Props adnan.limdi.
Fixes #41970.
Built from https://develop.svn.wordpress.org/trunk@46972


git-svn-id: http://core.svn.wordpress.org/trunk@46772 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2019-12-17 16:45:03 +00:00
John Blackbourn eda6a9e111 Docs: Docs on docs. Further improve documentation of known return types, plus other docs fixes.
See #48303

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


git-svn-id: http://core.svn.wordpress.org/trunk@46462 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2019-11-05 21:30:03 +00:00
desrosj 894e133d0c Build/Test Tools: Introduce automated PHP compatibility checking.
This change introduces a new Composer script, `compat` that will scan the codebase for (detectable) potential PHP compatibility issues using the `PHP_CodeSniffer` and a custom ruleset based off of the `PHPCompayibilityWP` ruleset (`phpcompat.xml.dist`).

The command will be run as a separate job within each Travis build. While many compatibility issues and false positives have already been corrected in this commit and other Trac tickets, there are still some remaining. For that reason, the job is allowed to fail while the remainder of the potential compatibility issues are investigated and addressed. After those are resolved, the job should be set as required to pass to help prevent new compatibility issues from being introduced.

Props desrosj, jrf, all PHPCompatibilityWP and PHPCompatibility contributors.
Fixes #46152.
Built from https://develop.svn.wordpress.org/trunk@46290


git-svn-id: http://core.svn.wordpress.org/trunk@46102 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2019-09-25 13:47:58 +00:00
Sergey Biryukov a943fd64bc Coding Standards: Fix WPCS issue in [46283].
See #48110.
Built from https://develop.svn.wordpress.org/trunk@46284


git-svn-id: http://core.svn.wordpress.org/trunk@46096 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2019-09-23 23:24:57 +00:00
Sergey Biryukov 75ca249558 Twenty Twenty: Rename widget areas to `sidebar-1` and `sidebar-2`.
This ensures that widgets are mapped correctly and is consistent with the previous default themes.

See https://github.com/WordPress/twentytwenty/issues/481.

Reverts [46282].

Props ocean90, garrett-eclipse, desrosj, SergeyBiryukov.
See #48110.
Built from https://develop.svn.wordpress.org/trunk@46283


git-svn-id: http://core.svn.wordpress.org/trunk@46095 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2019-09-23 23:17:58 +00:00
desrosj 098455b06f Bundled Themes: Make Twenty Twenty the new default theme.
After being imported in [46271], Twenty Twenty can now be set as the default theme in WordPress.

See #48110.
Props desrosj, ocean90.
Built from https://develop.svn.wordpress.org/trunk@46278


git-svn-id: http://core.svn.wordpress.org/trunk@46090 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2019-09-23 21:00:58 +00:00
whyisjake a014bd21c1 Multisite: Remove the redundant `blog_versions` table.
As part of the Multisite installation process, a `blog_versions` table is created. This table is never read from (except immediately prior to updating it), it's only ever inserted into or updated. It is not used to determine which blogs need to be upgraded.
This table was introduced in 3.0 when the WPMU schema was merged #11644 and it appears the table has never been used in core and is therefore redundant and may as well be removed.

Props johnbillion, nacin, ryan, johnjamesjacoby, whyisjake.

Fixes #19755. See #41685.


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


git-svn-id: http://core.svn.wordpress.org/trunk@46006 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2019-09-19 22:07:57 +00:00
whyisjake 250eb42802 Networks and Sites: Save database version in site meta (Multisite)
Currently there is there a table in multisite called blog_versions. All this table stores is the database version as number and the date updated. With plans to add site meta in #37923 this new table should be used. This has a number of benefits, including functions to CRUD these values in the database. Once this data is in the blogmeta, table, the blog_versions table can be removed all together. If require a SQL view can be used blog_versions from data stored in blogmeta.

Props spacedmonkey, leogermani.

Fixes #41685. See #19755.


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


git-svn-id: http://core.svn.wordpress.org/trunk@46005 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2019-09-19 21:42:58 +00:00
desrosj 5329411f6d General: Ensure the arguments passed to `implode()` are in the correct order.
The `implode()` function accepts two. parameters, `$glue` and `$pieces`. For historical reasons, these parameters have been accepted in any order, though it was recommended that the documented order of `$glue, $pieces` be used.

Starting in PHP 7.4, specifying the parameters in the reverse order will trigger a deprecation notice with the plan to remove this tolerance in PHP 8.0.

This change fixes the occurrences of reversed arguments in Core with the exception of those contained in included external libraries. These will be handled separately.

Props jrf, jorbin.
See #47746.
Built from https://develop.svn.wordpress.org/trunk@46155


git-svn-id: http://core.svn.wordpress.org/trunk@45967 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2019-09-17 13:40:57 +00:00
Sergey Biryukov 3591f1ad60 Text Changes: Correct "up-to-date" vs. "up to date" usage in a database update string and inline comments.
* "Up to date" is an adverb phrase that describes an action that brings something in line with the latest information.
* "Up-to-date" is an adjective phrase that is used as a synonym for "current".

Props socalchristina, hareesh-pillai, garrett-eclipse, desrosj, aprea.
Fixes #38998.
Built from https://develop.svn.wordpress.org/trunk@46096


git-svn-id: http://core.svn.wordpress.org/trunk@45908 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2019-09-12 13:06:57 +00:00
Sergey Biryukov e199663322 I18N: Capitalize translator comments consistently, add trailing punctuation.
Includes minor code layout fixes.

See #44360.
Built from https://develop.svn.wordpress.org/trunk@45932


git-svn-id: http://core.svn.wordpress.org/trunk@45743 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2019-09-03 00:41:05 +00:00
Sergey Biryukov 16b8d91baa I18N: Improve translator comments.
* Add missing translator comments.
* Fix placement of some translator comments. Translator comments should be on the line directly above the line containing the translation function call for optimal compatibility with various `.pot` file generation tools. The CS auto-fixing, which changed some inconsistent function calls to multi-line function calls, is part of the reason why this was no longer the case for a select group of translator comments.

Includes minor code layout fixes.

Polyglots, rejoice! All WordPress core files now have translator comments for all strings with placeholders!

Props jrf, subrataemfluence, GaryJ, webdados, Dency, swissspidy, alvarogois, marcomartins, mihaiiceyro, vladwtz, niq1982, flipkeijzer, michielatyoast, chandrapatel, thrijith, joshuanoyce, FesoVik, tessak22, bhaktirajdev, cleancoded, dhavalkasvala, garrett-eclipse, bibliofille, socalchristina, priyankkpatel, 5hel2l2y, adamsilverstein, JeffPaul, pierlo, SergeyBiryukov.
Fixes #44360.
Built from https://develop.svn.wordpress.org/trunk@45926


git-svn-id: http://core.svn.wordpress.org/trunk@45737 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2019-09-01 17:13:59 +00:00
Andrew Ozz 400ed5add0 Remove trailing white space in upgrade.php.
See #46349.
Built from https://develop.svn.wordpress.org/trunk@45789


git-svn-id: http://core.svn.wordpress.org/trunk@45600 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2019-08-13 19:53:55 +00:00
Andrew Ozz 197b4a829b Admin email verification:
- Add the `admin_email_lifespan` option when installing. Fixes a bug where the verification screen is shown right after installation.
- Reset the same option when upgrading and the user doing the DB upgrade is not an admin. This will ensure the email verification is shown next time an admin logs in.
- Use `site_url()` instead of `network_site_url()` for the form action. The latter seems needed only for password reset.

See #46349.
Built from https://develop.svn.wordpress.org/trunk@45788


git-svn-id: http://core.svn.wordpress.org/trunk@45599 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2019-08-13 17:40:55 +00:00
Andrew Ozz 52c53ae6f8 Remove trailing white space in upgrade.php after [45757].
See #46349.
Built from https://develop.svn.wordpress.org/trunk@45758


git-svn-id: http://core.svn.wordpress.org/trunk@45569 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2019-08-07 01:01:57 +00:00
Andrew Ozz fff56d219f Add admin email verification screen. Shown every six months after an admin has logged in.
Also includes WPCS fixes for wp-login.php.

Props andraganescu, boemedia, lessbloat, azaozz.
See #46349.
Built from https://develop.svn.wordpress.org/trunk@45757


git-svn-id: http://core.svn.wordpress.org/trunk@45568 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2019-08-07 00:04:56 +00:00
Sergey Biryukov f7b8423b12 Upgrade/Install: Make sure `translate_level_to_role()` always returns a value.
Props diddledan.
Fixes #46848.
Built from https://develop.svn.wordpress.org/trunk@45747


git-svn-id: http://core.svn.wordpress.org/trunk@45558 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2019-08-05 07:48:58 +00:00
Sergey Biryukov b1e34ccc1f Docs: Add missing description for `$wp_rewrite` global.
See #45604, #47110.
Built from https://develop.svn.wordpress.org/trunk@45735


git-svn-id: http://core.svn.wordpress.org/trunk@45546 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2019-08-04 01:19:56 +00:00
Sergey Biryukov 29b072e706 Docs: Add missing description for `$wpdb`, `$wp_db_version`, and `$wp_current_db_version` globals.
Props mukesh27, utsav72640, immeet94, SergeyBiryukov.
See #45604.
Built from https://develop.svn.wordpress.org/trunk@45734


git-svn-id: http://core.svn.wordpress.org/trunk@45545 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2019-08-04 01:12:56 +00:00
Gary Pendergast abcbee954f Coding Standards: Fix instances of `WordPress.PHP.NoSilencedErrors.Discouraged`.
Noteable changes:
- The `magic_quotes_runtime` and `magic_quotes_sybase` settings were removed in PHP 5.4, so no longer need to be set.
- Some functions that use external libraries can generate errors that can't be tested for, so are globally allowed to silence errors.
- Quite a few functions would cause errors if `safe_mode` was set. This setting was removed in PHP 5.4.
- Only a handful of `header()` calls needed corresponding `headers_sent()` checks for unit tests to pass, but more may need to be added as the nightlies builds are tested.

See #46732.

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


git-svn-id: http://core.svn.wordpress.org/trunk@45422 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2019-07-09 05:45:58 +00:00
Gary Pendergast 87675d288b Coding Standards: Fix all `WordPress.WhiteSpace.PrecisionAlignment` issues.
See #47632.


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


git-svn-id: http://core.svn.wordpress.org/trunk@45413 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2019-07-05 05:21:56 +00:00
Gary Pendergast cf3fa9f7c8 Coding Standards: Fix the `Squiz.PHP.DisallowMultipleAssignments` violations in `wp-admin`.
See #47632.


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


git-svn-id: http://core.svn.wordpress.org/trunk@45394 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2019-07-01 12:52:01 +00:00
Gary Pendergast 55af0f0d0a Coding Standards: Fix/ignore the `WordPress.NamingConventions.ValidFunctionName` violations.
See #47632


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


git-svn-id: http://core.svn.wordpress.org/trunk@45391 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2019-07-01 08:01:57 +00:00
Andrew Ozz 87acdab81d Privacy tools: Organize privacy functions into logical files and classes.
Props xkon, birgire, desrosj, garrett-eclipse, azaozz.
See #43895.
Built from https://develop.svn.wordpress.org/trunk@45448


git-svn-id: http://core.svn.wordpress.org/trunk@45259 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2019-05-26 20:50:53 +00:00
Sergey Biryukov c77e771c84 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.
Built from https://develop.svn.wordpress.org/trunk@45424


git-svn-id: http://core.svn.wordpress.org/trunk@45235 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2019-05-26 00:12:54 +00:00
Sergey Biryukov b2e3f517e1 Database: Use `wp_die()` instead of `die()` in `wp_check_mysql_version()`, for more flexibility and consistency with other error messages in core.
Props spacedmonkey.
Fixes #45975.
Built from https://develop.svn.wordpress.org/trunk@45030


git-svn-id: http://core.svn.wordpress.org/trunk@44839 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2019-03-27 14:03:51 +00:00
Peter Wilson c4505be534 Install/upgrade: Remove Gutenberg plugin deactivation from upgrade process.
The Gutenberg plugin will not be deactivated on sites upgrading to WordPress 5.1. This deprecates the `upgrade_500_was_gutenberg_active` option and the `upgrade_500()` function as they are no longer required.

Props peterwilsoncc.
Fixes #46029.


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


git-svn-id: http://core.svn.wordpress.org/trunk@44563 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2019-02-08 00:16:50 +00:00
Gary Pendergast 6d5cd6842a Coding Standards: Document intentional `case` block fall-throughs.
Fixes `PSR2.ControlStructures.SwitchDeclaration.TerminatingComment` violations.

See #45934.


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


git-svn-id: http://core.svn.wordpress.org/trunk@44396 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2019-01-11 06:26:50 +00:00
Felix Arntz 035877708d Multisite: Update `@since` tags for site meta introduction.
Fixes #37923. Fixes #40229.

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


git-svn-id: http://core.svn.wordpress.org/trunk@44298 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2019-01-08 08:18:50 +00:00
Gary Pendergast 363cfc4301 General: Replace "Happy blogging" with "Happy publishing".
As of this commit, WordPress is no longer a simple blogging platform. It's now a comprehensive publishing solution.

This also replaces a couple of other "blog" references that were missed previously.

Props igmoweb, Valer1e, audrasjb, pento.
Fixes #41000.


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


git-svn-id: http://core.svn.wordpress.org/trunk@44286 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2019-01-08 04:30:50 +00:00
desrosj 9cd64e1341 Help/About: WordPress 5.0 About Page.
The About page describes all the great changes in WordPress 5.0.

Highlights:

- Warn users of Gutenberg plugin of its deactivation upon 5.0 upgrade.
- Added illustrations to the Four Freedoms page.
- Include a link to wporg user’s plugin favorites as a way to display only the classic plugin as a suggestion for install.
- Detail the Classic Editor plugin and the support timeline.

Props pixelverbieger, ocean90, karmatosed, pento, boemedia, lonelyvegan, sami.keijonen, TimothyBlynJacobs, xkon, afercia, laurelfulford, joostdevalk, ipstenu, matveb, joen, tinkerbelly, chanthaboune, kjellr, alexislloyd, melchoyce, mcsf, courtney0burton, Otto42, cathibosco, tobifjellner, helen, audrasjb, antpb, jjj, elrae, desrosj, azaozz, joemcgill, skithund, gziolo.

Merges [43913], [43921-43922], [43937-43938], [43946-43947], [43952-43953], [43967-43969] into trunk.

Fixes #45178.
Built from https://develop.svn.wordpress.org/trunk@44264


git-svn-id: http://core.svn.wordpress.org/trunk@44094 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2018-12-17 16:36:59 +00:00
Gary Pendergast 4739b8147b Upgrade/Install: Convert `Sample Page`, `Hello World`, and `Privacy Policy` to block content.
Merges [43820,43912] from the 5.0 branch to trunk.

Props desrosj, garrett-eclipse, danielbachhuber, dd32, ocean90.
Fixes #45151.


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


git-svn-id: http://core.svn.wordpress.org/trunk@43998 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2018-12-14 05:43:52 +00:00
Gary Pendergast 5e62e6b203 Bundled Themes: Make twentynineteen the default theme.
After [44149], we can now make twentynineteen the default theme. Twentyseventeen has been a great default, but 5.0 and twentynineteen is guten.

Merges [43809,43954] from the 5.0 branch to trunk.

Fixes #45152.
Props jorbin, SergeyBiryukov, pento, mcsf.


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


git-svn-id: http://core.svn.wordpress.org/trunk@43981 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2018-12-14 02:49:38 +00:00
desrosj e125a29326 Upgrade/Install: Deactivate Gutenberg plugin on update to 5.0.
Props mcsf.

Merges [43765] to trunk.

Fixes #45123.
Built from https://develop.svn.wordpress.org/trunk@44125


git-svn-id: http://core.svn.wordpress.org/trunk@43955 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2018-12-13 22:27:04 +00:00
Gary Pendergast 56c162fbc9 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.


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


git-svn-id: http://core.svn.wordpress.org/trunk@43400 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2018-08-17 01:51:36 +00:00
Andrew Ozz 1b1cc0b371 Privacy: make creating a privacy policy page on install multisite compatible.
See #43491.
Built from https://develop.svn.wordpress.org/trunk@43243


git-svn-id: http://core.svn.wordpress.org/trunk@43072 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2018-05-11 15:44:21 +00:00
Andrew Ozz 280aeff5d2 Fix typo (missing `!`).
See #43491.
Built from https://develop.svn.wordpress.org/trunk@42982


git-svn-id: http://core.svn.wordpress.org/trunk@42811 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2018-04-16 10:14:21 +00:00
Andrew Ozz f1e065b13b Privacy: automatically create a Privacy Policy page when installing WordPress.
Props fclaussen, azaozz.

Fixes #43491.
Built from https://develop.svn.wordpress.org/trunk@42981


git-svn-id: http://core.svn.wordpress.org/trunk@42810 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2018-04-16 09:00:20 +00:00
John Blackbourn b13e73d05c Docs: Document more parameters and properties using typed array notation.
See #41756

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


git-svn-id: http://core.svn.wordpress.org/trunk@42705 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2018-03-25 18:10:32 +00:00
Felix Arntz 176a289050 Multisite: Introduce metadata for sites.
A new global multisite table `wp_blogmeta` is added to the database schema, and a set of `*_site_meta()` API functions are introduced.

The implementation fails gracefully when the new table is not yet available, which may happen especially shortly after the core update, before the network has been upgraded to the new database schema. The presence of the table is detected once and stored as a global setting on the main network.

Core does not yet use site metadata, but there are several use-cases to be implemented or explored in the near future, and it allows plugins to extend sites with arbitrary data, which will come in particularly handy with the upcoming REST API endpoint for sites.

Props spacedmonkey, johnjamesjacoby, jeremyfelt, flixos90.
Fixes #37923.

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


git-svn-id: http://core.svn.wordpress.org/trunk@42666 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2018-03-16 02:15:31 +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
Gary Pendergast 882db52bdd General: Add inline PHPCS options to leave regex indentation.
We have a handful of super long regexen that are written over multiple lines, as a collection of strings concatenated together. Each string is indented appropriately for the regex, but PHPCS doesn't recognised this, so defaults to removing the extra whitespace.

Disabling the `Squiz.Strings.ConcatenationSpacing.PaddingFound` rule for these blocks stops the extra whitespace from being removed.

See #41057.


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


git-svn-id: http://core.svn.wordpress.org/trunk@42078 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-11-28 04:24:57 +00:00