mirror of
https://github.com/gosticks/wordpress-develop.git
synced 2026-08-11 12:20:22 +00:00
Remove the usage of @$_GET and @$_POST and just check to see if the indicies are set. Fixes #22429
git-svn-id: https://develop.svn.wordpress.org/trunk@25025 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
@@ -647,7 +647,10 @@ function preview_theme_ob_filter_callback( $matches ) {
|
||||
)
|
||||
return $matches[1] . "#$matches[2] onclick=$matches[2]return false;" . $matches[4];
|
||||
|
||||
$link = add_query_arg( array( 'preview' => 1, 'template' => $_GET['template'], 'stylesheet' => @$_GET['stylesheet'], 'preview_iframe' => 1 ), $matches[3] );
|
||||
$stylesheet = isset( $_GET['stylesheet'] ) ? $_GET['stylesheet'] : '';
|
||||
$template = isset( $_GET['template'] ) ? $_GET['template'] : '';
|
||||
|
||||
$link = add_query_arg( array( 'preview' => 1, 'template' => $template, 'stylesheet' => $stylesheet, 'preview_iframe' => 1 ), $matches[3] );
|
||||
if ( 0 === strpos($link, 'preview=1') )
|
||||
$link = "?$link";
|
||||
return $matches[1] . esc_attr( $link ) . $matches[4];
|
||||
|
||||
Reference in New Issue
Block a user