Skip to content

Commit

Permalink
Reformatting
Browse files Browse the repository at this point in the history
  • Loading branch information
lloc committed Sep 24, 2024
1 parent 869f15e commit 7db782e
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 10 deletions.
2 changes: 1 addition & 1 deletion includes/ContentImport/LogWriters/AdminNoticeLogger.php
Original file line number Diff line number Diff line change
Expand Up @@ -141,7 +141,7 @@ public function show_last_log( $echo = true ): ?string {
}

if ( $echo ) {
echo $html;
echo wp_kses_post( $html );
}

// we've shown it, no reason to keep it
Expand Down
1 change: 1 addition & 0 deletions includes/MslsCustomFilter.php
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,7 @@ public function add_filter(): void {

$id = MslsRequest::get( MslsFields::FIELD_MSLS_FILTER, 0 );

// phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped
echo ( new Select( MslsFields::FIELD_MSLS_FILTER, $options, $id ) )->render();
}
}
Expand Down
19 changes: 10 additions & 9 deletions includes/MslsMetaBox.php
Original file line number Diff line number Diff line change
Expand Up @@ -62,6 +62,7 @@ public static function suggest(): void {
restore_current_blog();
}

// phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped
wp_die( $json->encode() );
}

Expand Down Expand Up @@ -200,20 +201,20 @@ public function render_select(): void {
*/
$args = (array) apply_filters( 'msls_meta_box_render_select_hierarchical', $args );

$selects .= wp_dropdown_pages( $args );
$selects .= wp_dropdown_pages( $args ); // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped
} else {
$selects .= sprintf(
'<select name="msls_input_%s"><option value="0"></option>%s</select>',
$language,
$this->render_options( $type, $mydata->$language )
'<select name="msls_input_%1$s"><option value="0"></option>%2$s</select>',
esc_attr( $language ),
$this->render_options( $type, $mydata->$language ) // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped
);
}

$lis .= sprintf(
'<li><label for="msls_input_%s msls-icon-wrapper %4$s">%s</label>%s</li>',
$language,
$icon,
$selects,
'<li><label for="msls_input_%1$s msls-icon-wrapper %4$s">%2$s</label>%3$s</li>',
esc_attr( $language ),
$icon, // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped
$selects, // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped
esc_attr( $icon_type )
);

Expand Down Expand Up @@ -269,7 +270,7 @@ public function render_options( $type, $msls_id ): string {
public function render_option( int $post_id, int $msls_id ): string {
return sprintf(
'<option value="%d" %s>%s</option>',
$post_id,
esc_attr( $post_id ),
selected( $post_id, $msls_id, false ),
get_the_title( $post_id )
);
Expand Down

0 comments on commit 7db782e

Please sign in to comment.