Skip to content

Commit 8e3458e

Browse files
committed
Correct coding standards issues
1 parent 93049ba commit 8e3458e

File tree

2 files changed

+7
-6
lines changed

2 files changed

+7
-6
lines changed

inc/admin/profile/namespace.php

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -77,7 +77,7 @@ function render_profile_section( WP_User $user ) {
7777
* Render a single row.
7878
*/
7979
function render_token_row( WP_User $user, Access_Token $token ) {
80-
$client = $token->get_client();
80+
$client = $token->get_client();
8181
$is_personal = $client instanceof PersonalClient;
8282

8383
if ( $is_personal ) {
@@ -106,6 +106,7 @@ function render_token_row( WP_User $user, Access_Token $token ) {
106106
// Build actions.
107107
if ( $is_personal ) {
108108
$button_title = sprintf(
109+
/* translators: %s: personal token name */
109110
__( 'Revoke personal token "%s"', 'oauth2' ),
110111
esc_html( $token_name )
111112
);

inc/admin/profile/personaltokens/namespace.php

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -20,9 +20,9 @@ function bootstrap() {
2020
* @return string
2121
*/
2222
function get_page_url( $args = [] ) {
23-
$url = admin_url( 'profile.php' );
23+
$url = admin_url( 'profile.php' );
2424
$args['action'] = ACCESS_TOKENS_PAGE_SLUG;
25-
$url = add_query_arg( urlencode_deep( $args ), $url );
25+
$url = add_query_arg( urlencode_deep( $args ), $url );
2626
return $url;
2727
}
2828

@@ -34,7 +34,7 @@ function get_page_url( $args = [] ) {
3434
function bootstrap_profile_page() {
3535
global $user_id, $submenu_file, $parent_file;
3636
$user_id = null;
37-
if ( ! empty( $_REQUEST['user_id'] ) ) {
37+
if ( ! empty( $_REQUEST['user_id'] ) ) { // WPCS: CSRF OK
3838
$user_id = (int) $_REQUEST['user_id'];
3939
}
4040

@@ -166,10 +166,10 @@ function handle_page_action( WP_User $user ) {
166166
*/
167167
function handle_create( WP_User $user, $name ) {
168168
$client = PersonalClient::get_instance();
169-
$meta = [
169+
$meta = [
170170
'name' => $name,
171171
];
172-
$token = $client->issue_token( $user, $meta );
172+
$token = $client->issue_token( $user, $meta );
173173

174174
render_create_success( $user, $token );
175175
}

0 commit comments

Comments
 (0)