Sanitize tab key in tutorials
This commit is contained in:
@@ -145,7 +145,7 @@ class SportsPress_Tutorials {
|
|||||||
'advanced' => __( 'Advanced', 'sportspress' ),
|
'advanced' => __( 'Advanced', 'sportspress' ),
|
||||||
) );
|
) );
|
||||||
if ( isset( $_GET['tab'] ) && array_key_exists( $_GET['tab'], $tabs ) ) {
|
if ( isset( $_GET['tab'] ) && array_key_exists( $_GET['tab'], $tabs ) ) {
|
||||||
$current_tab = $_GET['tab'];
|
$current_tab = sanitize_key( $_GET['tab'] );
|
||||||
} else {
|
} else {
|
||||||
$current_tab = key( $tabs );
|
$current_tab = key( $tabs );
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user