Skip to content

Commit

Permalink
Handle icon query param to select icon
Browse files Browse the repository at this point in the history
  • Loading branch information
sirreal committed Jul 24, 2024
1 parent 4f3195c commit b33aa49
Showing 1 changed file with 4 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,10 @@
$icons_sections[] = $icon_section;
}

$selected_icon = array_rand( $icons );
$selected_icon = $_GET['icon'] ?? '';
if ( ! array_key_exists( $selected_icon, $icons ) ) {
$selected_icon = array_rand( $icons );
}

wp_interactivity_config(
'wporg/dashicons-page',
Expand Down

0 comments on commit b33aa49

Please sign in to comment.