• Resolved albaran

    (@albaran)


    I have protected my Dotclear flatimport importer using

    • check_admin_referer(‘import-flatimport’);
    • wp_nonce_field(‘import-flatimport’);
    • attribute_escape()

    Refreshing the current page using
    echo '<meta http-equiv="refresh" content="0">';
    to do an automatic recovery no longer works! This order is intercepted by WP issuing the message Are you sure you want to do this?

    How to refresh the current page without this WP interception?

Viewing 1 replies (of 1 total)
  • Thread Starter albaran

    (@albaran)

    function wp_nonce_meta_refresh($action = -1, $name = "_wpnonce", $referer = true) {
    	$name = attribute_escape($name);
    	echo '<meta http-equiv="refresh" content="0;admin.php?import=flatimport&step=3&'.$name.'='.wp_create_nonce($action).'">';
    	if ( $referer )
    		wp_referer_field();
    }

    Replacing echo ‘<meta http-equiv=”refresh” content=”0″>’;

    by wp_nonce_meta_refresh(‘import-flatimport’); do the meta refresh.

    It will be appreciate if a dev can comment on this function.

Viewing 1 replies (of 1 total)
  • The topic ‘wp_nonce and meta refresh’ is closed to new replies.