Commit Graph

115 Commits

Author SHA1 Message Date
John Blackbourn
1079647d30 Docs: Various docblock improvements related to user and site signup functionality.
See #50768

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


git-svn-id: http://core.svn.wordpress.org/trunk@48840 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2020-09-30 21:54:07 +00:00
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
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
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
45286c5bb3 Accessibility: Login and Registration: Add a role="main" landmark to the container div in wp-signup.php.
Props SteelWagstaff, audrasjb.
Fixes #48657.
Built from https://develop.svn.wordpress.org/trunk@47075


git-svn-id: http://core.svn.wordpress.org/trunk@46875 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2020-01-16 03:44:05 +00:00
Sergey Biryukov
06f90e098a Login and Registration: Remove duplicate <label> tag from show_blog_form() in wp-signup.php.
Props vaishalipanchal, audrasjb.
Fixes #49174.
Built from https://develop.svn.wordpress.org/trunk@47074


git-svn-id: http://core.svn.wordpress.org/trunk@46874 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2020-01-16 00:34:05 +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
d784ebbcb4 Coding Standards: Use strict comparison and Yoda conditions in the root directory files.
Props pikamander2.
Fixes #48965.
Built from https://develop.svn.wordpress.org/trunk@47054


git-svn-id: http://core.svn.wordpress.org/trunk@46854 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2020-01-09 00:55:05 +00:00
Sergey Biryukov
3d623995a8 Docs: In various @return tags, list the expected type first, instead of WP_Error.
See #48303.
Built from https://develop.svn.wordpress.org/trunk@46696


git-svn-id: http://core.svn.wordpress.org/trunk@46496 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2019-11-11 02:43:03 +00:00
Sergey Biryukov
f60094679f Coding Standards: Consistently use do_action_deprecated() and apply_filters_deprecated() for deprecated hooks.
Props jrf.
See #48255.
Built from https://develop.svn.wordpress.org/trunk@46684


git-svn-id: http://core.svn.wordpress.org/trunk@46484 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2019-11-09 12:59:03 +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
8662d9a74d I18N: Split translatable strings located on the same line preceded with a translator comment, where the first string needs that comment, but the second does not.
Props johnbillion.
See #44360.
Built from https://develop.svn.wordpress.org/trunk@45927


git-svn-id: http://core.svn.wordpress.org/trunk@45738 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2019-09-02 00:43:55 +00:00
desrosj
601d13a657 Coding Standards: Manually fix coding standards violations in wp-signup.php.
Props GaryJ, jrf, netweb, desrosj.
Fixes #43405.
Built from https://develop.svn.wordpress.org/trunk@44626


git-svn-id: http://core.svn.wordpress.org/trunk@44457 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2019-01-16 16:51:52 +00:00
Gary Pendergast
7a617078fa Coding Standards: Upgrade WPCS to 1.2.1.
This upgrade fixes quite a few false positives, as well as auto-fixing some indenting issues.

Fixes #45956.


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


git-svn-id: http://core.svn.wordpress.org/trunk@44405 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2019-01-12 06:41:52 +00:00
jrf
c952f8f98f I18n: Improve translators comments [1].
* Add missing translators comments.
* Fix placement of some translators comments.
  Translators 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 translators comments.

Patch `44360-src.2.diff` of the series.

Props garyj, alvarogois, michielatyoast
See #44360
Built from https://develop.svn.wordpress.org/trunk@43595


git-svn-id: http://core.svn.wordpress.org/trunk@43424 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2018-08-30 12:14:24 +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
Jeremy Felt
3ab90ab858 Docs: Document globals in validate_another_blog_signup().
Props mukesh27.
Fixes #43594.

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


git-svn-id: http://core.svn.wordpress.org/trunk@43154 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2018-06-28 02:21:21 +00:00
Andrea Fercia
eac393b6f1 Coding standards: Change a few occurrences of font weight 700 to 600 in multisite signup and activate.
Props chetan200891.
Amends [43018].
See #43897.

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


git-svn-id: http://core.svn.wordpress.org/trunk@42870 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2018-04-30 07:05:21 +00:00
Sergey Biryukov
bc5a539c4d Login and Registration: Send nocache_headers() on Multisite signup pages.
Props herregroen.
Fixes #43843.
Built from https://develop.svn.wordpress.org/trunk@43030


git-svn-id: http://core.svn.wordpress.org/trunk@42859 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2018-04-29 23:05:21 +00:00
Sergey Biryukov
0e802a627d General: Introduce WP_Error::has_errors() method and use it where appropriate.
Props robdxw, DrewAPicture, SergeyBiryukov.
Fixes #42742.
Built from https://develop.svn.wordpress.org/trunk@42761


git-svn-id: http://core.svn.wordpress.org/trunk@42591 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2018-02-27 02:31: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
a779284c00 General: Reformat inline if () statements inside HTML tags.
This pattern occurs a handful of times across the codebase:

`<div class="foo<?php if ( $bar ) { echo ' baz'; } ?>">`

Unfortunately, it doesn't really play nicely with `phpcbf`, so all instances need to be removed in preperation for auto code formatting.

See #41057.


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


git-svn-id: http://core.svn.wordpress.org/trunk@42046 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-11-23 04:09:49 +00:00
Sergey Biryukov
53dba84ec7 I18N: Remove <a> tag from a translatable string in confirm_another_blog_signup().
Props ramiy.
Fixes #41694.
Built from https://develop.svn.wordpress.org/trunk@41911


git-svn-id: http://core.svn.wordpress.org/trunk@41745 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-10-18 17:36:50 +00:00
Sergey Biryukov
c70492e5d1 Docs: Remove "in in", "this this", and "containing containing" dittography from inline comments.
Props Presskopp.
Fixes #41841.
Built from https://develop.svn.wordpress.org/trunk@41353


git-svn-id: http://core.svn.wordpress.org/trunk@41186 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-09-09 13:19:45 +00:00
Felix Arntz
473e1ba73b Multisite: Remove references to $wpdb->siteid and use get_current_network_id() instead.
Props sathyapulse, spacedmonkey.
Fixes #41507.

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


git-svn-id: http://core.svn.wordpress.org/trunk@41082 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-08-12 13:11:43 +00:00
Drew Jaynes
0401cee8b3 Docs: Reduce confusion in @since MU notationss by indicating the WP version (3.0.0) the code was merged into core while retaining the original context.
Props sathyapulse.
Fixes #41509.

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


git-svn-id: http://core.svn.wordpress.org/trunk@41040 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-08-01 20:44:43 +00:00
Felix Arntz
ff74a4cb7b Multisite: Replace is_super_admin() with manage_network when showing a message to the network administrator in wp-signup.php.
Props jignesh.nakrani.
Fixes #39209. See #37616.

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


git-svn-id: http://core.svn.wordpress.org/trunk@39881 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-01-24 11:08:42 +00:00
Felix Arntz
8062df694f Multisite: Correct and improve i18n strings in wp-signup.php.
The strings addressing the network administrator in `wp-signup.php` were still using the old terminology of blogs and sites. Furthermore concatenation of the strings has been removed to make them i18n-friendly.

Props jignesh.nakrani, SergeyBiryukov.
Fixes #39611.

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


git-svn-id: http://core.svn.wordpress.org/trunk@39866 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-01-20 16:52:39 +00:00
Jeremy Felt
1560fbcbc5 Multisite: Use get_network() and get_current_network_id() for current network data.
`get_network()` falls back to the current network when called without any arguments. Between this and `get_current_network_id()`, we can replace almost all instances of the global `$current_site` and all instances of `get_current_site()`.

This effectively deprecates `get_current_site()`, something that we'll do in a future ticket.

Props flixos90.
Fixes #37414.

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


git-svn-id: http://core.svn.wordpress.org/trunk@38757 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-10-19 04:47:30 +00:00
Dominik Schilling
2d1c27e8b4 I18N: Add translators comments to wp-signup.php.
Props ramiy.
Fixes #35730.
Built from https://develop.svn.wordpress.org/trunk@37551


git-svn-id: http://core.svn.wordpress.org/trunk@37519 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-05-24 20:44:29 +00:00
Jeremy Felt
6c405b8f36 Multisite: Clean up WP_Error documentation and handling in wp-signup.php
Fixes #36927.

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


git-svn-id: http://core.svn.wordpress.org/trunk@37515 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-05-24 04:16:27 +00:00
Jeremy Felt
a021ab4ce0 Multisite: Disable autocapitalize and autocorrect for user_name input on signup
Props rafaelangeline.
Fixes #36833.

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


git-svn-id: http://core.svn.wordpress.org/trunk@37514 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-05-24 03:43:27 +00:00
Drew Jaynes
e52762a725 Docs: Apply inline @see tags to hooks referenced in DocBlocks for root directory files.
Applying these specially-crafted `@see` tags allows the Code Reference parser to recognize and link these elements as hooks.

See #36921.

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


git-svn-id: http://core.svn.wordpress.org/trunk@37504 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-05-23 17:07:28 +00:00
Drew Jaynes
f82641ad0e Docs: Standardize filter docs in root folder files to use third-person singular verbs per the inline documentation standards for PHP.
Fixes #36913.

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


git-svn-id: http://core.svn.wordpress.org/trunk@37503 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-05-23 16:44:27 +00:00
Eric Lewis
24adb71a56 Networks and sites: Replace "blog" usage with "site" in docs.
Multisite functions use the term "blog" to refer to what we now call a "site," e.g. `get_current_blog_id()`. These functions are here to stay because of our commitment to backwards compatibility. What we can do is set the documentation straight.

See #35417.

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


git-svn-id: http://core.svn.wordpress.org/trunk@36384 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-01-28 03:51:26 +00:00
Sergey Biryukov
1389f731b7 Don't use <strong> in translatable strings in wp-signup.php.
Add translator commments.

Props ramiy.
Fixes #34502.
Built from https://develop.svn.wordpress.org/trunk@35451


git-svn-id: http://core.svn.wordpress.org/trunk@35415 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-10-30 08:52:25 +00:00
Sergey Biryukov
044901e783 Don't use <strong> in translatable strings in wp-signup.php.
Add translator commments.

Props ramiy.
Fixes #34502.
Built from https://develop.svn.wordpress.org/trunk@35447


git-svn-id: http://core.svn.wordpress.org/trunk@35411 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-10-30 02:09:24 +00:00
Jeremy Felt
9dd1462fe3 MS: Introduce action before_signup_header.
This aligns `wp-signup.php` a bit more `with `wp-activate.php` and, among other things, allows a plugin to redirect signup requests.

Props pbearne.
Fixes #17630.

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


git-svn-id: http://core.svn.wordpress.org/trunk@35125 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-10-14 17:32:49 +00:00
John Blackbourn
8dd677a09f Introduce a language chooser to the site signup process on Multisite.
If your Multisite installation is one of the relatively few that allows new sites to be registered, either by existing users or by new visitors to your site, a 'Site Language' dropdown menu will now be presented if your network has additional languages installed. This option defaults to the value of the 'Default Language' setting on the Network Admin Settings screen, and is restricted to currently installed languages.

The languages available in this setting can be controlled via the `signup_get_available_languages` filter. To disable it completely, return an empty array.

Fixes #33844
Props DrewAPicture, johnbillion

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


git-svn-id: http://core.svn.wordpress.org/trunk@35118 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-10-13 23:46:25 +00:00
Jeremy Felt
9926983b66 Revert [34778], continue using _site_option() for the current network.
The `_network_option()` parameter order will be changing to accept `$network_id` first. The `_site_option()` functions will remain in use throughout core as our way of retrieving a network option for the current network.

See #28290.

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


git-svn-id: http://core.svn.wordpress.org/trunk@34877 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-10-07 17:11:25 +00:00
Jeremy Felt
ab5ea42aa2 MS: Pass context to get_header() and get_footer() in activation/signup.
Fixes #21712.

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


git-svn-id: http://core.svn.wordpress.org/trunk@34805 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-10-05 22:36:24 +00:00
Jeremy Felt
908b1f0b7d MS: Align HTML structure in wp-signup.php and wp-activate.php.
Assigns the `wp-activate-container` and `wp-signup-container` to the container inside `#signup-container` on each. This container already existed in `wp-signup.php` and is new in `wp-activate.php`.

Props ocean90.
Fixes #25478.

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


git-svn-id: http://core.svn.wordpress.org/trunk@34779 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-10-03 21:51:25 +00:00
John Blackbourn
cf5ac0b6bf Use wp_login_url() for login links when signing up for a new blog or activating a new blog on Multisite.
Fixes #31495
Props GregLone for the intial patch

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


git-svn-id: http://core.svn.wordpress.org/trunk@34755 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-10-03 00:34:25 +00:00
Jeremy Felt
54512d64cb MS: Use *_network_option() functions throughout core.
Replaces all uses of `*_site_option()` with the corresponding "network" function.

This excludes one usage in `wp-admin/admin-footer.php` that needs more investigation.

Props spacedmonkey.
See #28290.

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


git-svn-id: http://core.svn.wordpress.org/trunk@34743 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-10-02 19:08:26 +00:00
John Blackbourn
8d362918a8 Add a missing @param doc for confirm_another_blog_signup().
See #32246

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


git-svn-id: http://core.svn.wordpress.org/trunk@34629 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-09-28 17:58:26 +00:00
John Blackbourn
a9e5cfddc7 Implement wp_login_url() and wp_registration_url() in places where wp-login.php is currently hard-coded.
See #31495
Props GregLone

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


git-svn-id: http://core.svn.wordpress.org/trunk@34177 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-09-15 17:11:35 +00:00
Scott Taylor
d7d5789088 TwentyFifteen|Sixteen themes have a <div id="content"> in the header. Change the <div> IDs in wp-activate.php and wp-signup.php to be unique to each page.
Props jfarthing84.
Fixes #33843.

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


git-svn-id: http://core.svn.wordpress.org/trunk@34130 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-09-15 02:09:24 +00:00
Scott Taylor
a0e373ef80 For doc block types, favor bool over the few remaining booleans
See #32444.

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


git-svn-id: http://core.svn.wordpress.org/trunk@32935 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-06-27 01:03:25 +00:00
Scott Taylor
f888767c73 $status shouldn't be loosely compared to true in wp_xmlrpc_server::wp_deleteComment().
`$initial` shouldn't be loosely compared to `true` in `get_calendar()`.
`current_user_can()` shouldn't be loosely compared to `false` in `kses_init()`
`$get_all` shouldn't be loosely compared to `true` in `get_blog_details()`.
`is_array()` and `in_array()` shouldn't be loosely compared in `wpmu_validate_user_signup()`.
`$result` should by strictly compared in `check_ajax_referer()`.
`wp_verify_nonce()` should by strictly compared in `_show_post_preview()`.
`is_user_logged_in()` should not be loosly compared against `false` in `wp-signup.php`.

See #32444.

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


git-svn-id: http://core.svn.wordpress.org/trunk@32704 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-06-12 17:48:26 +00:00