Skip to content

Commit

Permalink
fix PHPCS errors (yoda condition, xss)
Browse files Browse the repository at this point in the history
  • Loading branch information
Paul Schreiber committed Jun 22, 2015
1 parent f56e2c0 commit a1f612d
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions mathjax-latex-admin.php
Original file line number Diff line number Diff line change
@@ -50,7 +50,7 @@ function admin_page_init() {

function plugin_options_menu() {
if ( ! current_user_can( 'manage_options' ) ) {
wp_die( __( 'You do not have sufficient permissions to access this page.' ) );
wp_die( __( 'You do not have sufficient permissions to access this page.' ) ); //xss ok
}

$this->table_head();
@@ -126,7 +126,7 @@ function plugin_options_menu() {
$select_string = "<select name='kblog_mathjax_config' id='kblog_mathjax_config'>\n";

foreach ( $options as $i ) {
$selected = $i === get_option( 'kblog_mathjax_config', 'default' ) ? "selected='true'" : '';
$selected = get_option( 'kblog_mathjax_config', 'default' ) === $i ? "selected='true'" : '';
$select_string .= "<option value='$i' " . esc_attr( $selected ) . ">$i</option>\n";
}

0 comments on commit a1f612d

Please sign in to comment.