This commit is contained in:
Frey Mansikkaniemi 2020-09-06 21:00:45 +08:00
parent 2c589eda57
commit 544529348a

View File

@ -60,6 +60,8 @@ function its_wpf_add_class( $methods ){
add_action( 'init', 'its_wpf_qrcode_catch', 0 );
function its_wpf_qrcode_catch()
{
if(isset($_REQUEST['generate_fps_qrcode']) && isset($_REQUEST['_wpnonce']))
{
$qrcode_string = $_REQUEST['generate_fps_qrcode'];
$nonce = $_REQUEST['_wpnonce'];
if( $qrcode_string && $nonce && wp_verify_nonce( $nonce, ITS_WPF_PLUGIN_ID ) )
@ -70,6 +72,7 @@ function its_wpf_qrcode_catch()
QRcode::png($qrcode_string,false,QR_ECLEVEL_H);
exit();
}
}
}
/**