mirror of
https://github.com/WordPress/WordPress.git
synced 2025-03-02 11:21:57 +01:00
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.
|
* @return true|WP_Error True if the request has read access, WP_Error object otherwise.
|
||||||
*/
|
*/
|
||||||
protected function do_permissions_check() {
|
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' ) ) {
|
if ( ! current_user_can( 'edit_theme_options' ) ) {
|
||||||
return new WP_Error(
|
return new WP_Error(
|
||||||
'rest_cannot_manage_widgets',
|
'rest_cannot_manage_widgets',
|
||||||
|
@ -101,8 +101,10 @@ class WP_REST_Templates_Controller extends WP_REST_Controller {
|
|||||||
sprintf(
|
sprintf(
|
||||||
'/%s/(?P<id>%s%s)',
|
'/%s/(?P<id>%s%s)',
|
||||||
$this->rest_base,
|
$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.
|
// Matches the template name.
|
||||||
'[\/\w%-]+'
|
'[\/\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.
|
* @return true|WP_Error True if the request has read access, WP_Error object otherwise.
|
||||||
*/
|
*/
|
||||||
protected function permissions_check( $request ) {
|
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' ) ) {
|
if ( ! current_user_can( 'edit_theme_options' ) ) {
|
||||||
return new WP_Error(
|
return new WP_Error(
|
||||||
'rest_cannot_manage_templates',
|
'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 );
|
$result = wp_trash_post( $id );
|
||||||
$template->status = 'trash';
|
$template->status = 'trash';
|
||||||
$response = $this->prepare_item_for_response( $template, $request );
|
$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() );
|
$request_params = array_keys( $request->get_params() );
|
||||||
sort( $request_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 ) {
|
if ( array( 'id', 'roles' ) === $request_params ) {
|
||||||
return true;
|
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'] ) ) {
|
if ( isset( $request['number'] ) && is_numeric( $request['number'] ) ) {
|
||||||
$widget_object->_set( (int) $request['number'] );
|
$widget_object->_set( (int) $request['number'] );
|
||||||
} else {
|
} else {
|
||||||
|
@ -69,8 +69,10 @@ abstract class WP_Sitemaps_Provider {
|
|||||||
|
|
||||||
$object_subtypes = $this->get_object_subtypes();
|
$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 ) ) {
|
if ( empty( $object_subtypes ) ) {
|
||||||
$sitemap_data[] = array(
|
$sitemap_data[] = array(
|
||||||
'name' => '',
|
'name' => '',
|
||||||
|
@ -16,7 +16,7 @@
|
|||||||
*
|
*
|
||||||
* @global string $wp_version
|
* @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.
|
* Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.
|
||||||
|
Loading…
Reference in New Issue
Block a user