[#20404] Address code review feedback

This commit is contained in:
Fulvio Notarstefano 2018-06-07 23:33:13 +09:00
parent 264c83a166
commit e68aa7c027
1 changed files with 5 additions and 2 deletions

View File

@ -85,8 +85,11 @@ if ( ! defined( 'ABSPATH' ) ) {
);
foreach ( $topics as $topic_slug => $topic_name ) :
?>
<option value="<?php echo esc_attr( $topic_slug ); ?>" <?php selected( $topic_data['resource'] . '.' . $topic_data['event'], $topic_slug, true ); ?>><?php echo esc_html( $topic_name ); ?></option>
$selected = $topic_slug === $topic_data['topic'] || $topic_slug === $topic_data['resource'] . '.' . $topic_data['event'];
?>
<option value="<?php echo esc_attr( $topic_slug ); ?>" <?php selected( $selected, true, true ); ?>><?php echo esc_html( $topic_name ); ?></option>
<?php endforeach; ?>
</select>
</td>