Docs: Replace multiple single line comments with multi-line comments.
This changeset updates various comments as per WordPress PHP Inline Documentation Standards. See https://developer.wordpress.org/coding-standards/inline-documentation-standards/php/#5-inline-comments. Follow-up to [56174], [56175], [56176], [56177], [56178], [56179], [56180], [56191], [56192], [56193], [56194]. Props costdev, audrasjb. See #58459. Built from https://develop.svn.wordpress.org/trunk@56195 git-svn-id: http://core.svn.wordpress.org/trunk@55707 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
parent
b89f155a10
commit
58ebfc61f1
|
@ -261,8 +261,10 @@ class WP_REST_Sidebars_Controller extends WP_REST_Controller {
|
|||
* @return true|WP_Error True if the request has read access, WP_Error object otherwise.
|
||||
*/
|
||||
protected function do_permissions_check() {
|
||||
// Verify if the current user has edit_theme_options capability.
|
||||
// This capability is required to access the widgets screen.
|
||||
/*
|
||||
* Verify if the current user has edit_theme_options capability.
|
||||
* This capability is required to access the widgets screen.
|
||||
*/
|
||||
if ( ! current_user_can( 'edit_theme_options' ) ) {
|
||||
return new WP_Error(
|
||||
'rest_cannot_manage_widgets',
|
||||
|
|
|
@ -101,8 +101,10 @@ class WP_REST_Templates_Controller extends WP_REST_Controller {
|
|||
sprintf(
|
||||
'/%s/(?P<id>%s%s)',
|
||||
$this->rest_base,
|
||||
// Matches theme's directory: `/themes/<subdirectory>/<theme>/` or `/themes/<theme>/`.
|
||||
// Excludes invalid directory name characters: `/:<>*?"|`.
|
||||
/*
|
||||
* Matches theme's directory: `/themes/<subdirectory>/<theme>/` or `/themes/<theme>/`.
|
||||
* Excludes invalid directory name characters: `/:<>*?"|`.
|
||||
*/
|
||||
'([^\/:<>\*\?"\|]+(?:\/[^\/:<>\*\?"\|]+)?)',
|
||||
// Matches the template name.
|
||||
'[\/\w%-]+'
|
||||
|
@ -177,8 +179,10 @@ class WP_REST_Templates_Controller extends WP_REST_Controller {
|
|||
* @return true|WP_Error True if the request has read access, WP_Error object otherwise.
|
||||
*/
|
||||
protected function permissions_check( $request ) {
|
||||
// Verify if the current user has edit_theme_options capability.
|
||||
// This capability is required to edit/view/delete templates.
|
||||
/*
|
||||
* Verify if the current user has edit_theme_options capability.
|
||||
* This capability is required to edit/view/delete templates.
|
||||
*/
|
||||
if ( ! current_user_can( 'edit_theme_options' ) ) {
|
||||
return new WP_Error(
|
||||
'rest_cannot_manage_templates',
|
||||
|
@ -502,8 +506,10 @@ class WP_REST_Templates_Controller extends WP_REST_Controller {
|
|||
);
|
||||
}
|
||||
|
||||
// (Note that internally this falls through to `wp_delete_post()`
|
||||
// if the Trash is disabled.)
|
||||
/*
|
||||
* (Note that internally this falls through to `wp_delete_post()`
|
||||
* if the Trash is disabled.)
|
||||
*/
|
||||
$result = wp_trash_post( $id );
|
||||
$template->status = 'trash';
|
||||
$response = $this->prepare_item_for_response( $template, $request );
|
||||
|
|
|
@ -683,8 +683,10 @@ class WP_REST_Users_Controller extends WP_REST_Controller {
|
|||
|
||||
$request_params = array_keys( $request->get_params() );
|
||||
sort( $request_params );
|
||||
// If only 'id' and 'roles' are specified (we are only trying to
|
||||
// edit roles), then only the 'promote_user' cap is required.
|
||||
/*
|
||||
* If only 'id' and 'roles' are specified (we are only trying to
|
||||
* edit roles), then only the 'promote_user' cap is required.
|
||||
*/
|
||||
if ( array( 'id', 'roles' ) === $request_params ) {
|
||||
return true;
|
||||
}
|
||||
|
|
|
@ -464,8 +464,10 @@ class WP_REST_Widget_Types_Controller extends WP_REST_Controller {
|
|||
);
|
||||
}
|
||||
|
||||
// Set the widget's number so that the id attributes in the HTML that we
|
||||
// return are predictable.
|
||||
/*
|
||||
* Set the widget's number so that the id attributes in the HTML that we
|
||||
* return are predictable.
|
||||
*/
|
||||
if ( isset( $request['number'] ) && is_numeric( $request['number'] ) ) {
|
||||
$widget_object->_set( (int) $request['number'] );
|
||||
} else {
|
||||
|
|
|
@ -69,8 +69,10 @@ abstract class WP_Sitemaps_Provider {
|
|||
|
||||
$object_subtypes = $this->get_object_subtypes();
|
||||
|
||||
// If there are no object subtypes, include a single sitemap for the
|
||||
// entire object type.
|
||||
/*
|
||||
* If there are no object subtypes, include a single sitemap for the
|
||||
* entire object type.
|
||||
*/
|
||||
if ( empty( $object_subtypes ) ) {
|
||||
$sitemap_data[] = array(
|
||||
'name' => '',
|
||||
|
|
|
@ -16,7 +16,7 @@
|
|||
*
|
||||
* @global string $wp_version
|
||||
*/
|
||||
$wp_version = '6.3-beta3-56194';
|
||||
$wp_version = '6.3-beta3-56195';
|
||||
|
||||
/**
|
||||
* Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.
|
||||
|
|
Loading…
Reference in New Issue