wp_original_referer_field example

<?php echo esc_attr( $form_action ); ?>" /> <input type="hidden" id="originalaction" name="originalaction" value="<?php echo esc_attr( $form_action ); ?>" /> <input type="hidden" id="post_author" name="post_author" value="<?php echo esc_attr( $post->post_author ); ?>" /> <input type="hidden" id="post_type" name="post_type" value="<?php echo esc_attr( $post_type ); ?>" /> <input type="hidden" id="original_post_status" name="original_post_status" value="<?php echo esc_attr( $post->post_status ); ?>" /> <input type="hidden" id="referredby" name="referredby" value="<?php echo $referer ? esc_url( $referer ) : ''; ?>" /> <?php if ( ! empty( $active_post_lock ) ) { ?> <input type="hidden" id="active_post_lock" value="<?php echo esc_attr( implode( ':', $active_post_lock ) ); ?>" /> <?php }
if ( 'draft' !== get_post_status( $post ) ) {
    wp_original_referer_field( true, 'previous' );
}

echo $form_extra;

wp_nonce_field( 'meta-box-order', 'meta-box-order-nonce', false );
wp_nonce_field( 'closedpostboxes', 'closedpostboxesnonce', false );
?> <?php /** * Fires at the beginning of the edit form. * * At this point, the required hidden fields and nonces have already been output. * * @since 3.7.0 * * @param WP_Post $post Post object. */

    ?> <input type="hidden" id="user-id" name="user_ID" value="<?php echo (int) $user_id; ?>" /> <input type="hidden" id="hiddenaction" name="action" value="<?php echo esc_attr( $form_action ); ?>" /> <input type="hidden" id="originalaction" name="originalaction" value="<?php echo esc_attr( $form_action ); ?>" /> <input type="hidden" id="post_type" name="post_type" value="<?php echo esc_attr( $post->post_type ); ?>" /> <input type="hidden" id="original_post_status" name="original_post_status" value="<?php echo esc_attr( $post->post_status ); ?>" /> <input type="hidden" id="referredby" name="referredby" value="<?php echo $referer ? esc_url( $referer ) : ''; ?>" /> <?php     if ( 'draft' !== get_post_status( $post ) ) {
        wp_original_referer_field( true, 'previous' );
    }
    echo $form_extra;
    wp_nonce_field( 'meta-box-order', 'meta-box-order-nonce', false );
    wp_nonce_field( 'closedpostboxes', 'closedpostboxesnonce', false );
    // Permalink title nonce.     wp_nonce_field( 'samplepermalink', 'samplepermalinknonce', false );

    /** * Adds hidden input fields to the meta box save form. * * Hook into this action to print `<input type="hidden" ... />` fields, which will be POSTed back to * the server when meta boxes are saved. * * @since 5.0.0 * * @param WP_Post $post The post that is being edited. */

do_action( "{$taxonomy}_term_edit_form_tag" );
?> > <input type="hidden" name="action" value="editedtag" /> <input type="hidden" name="tag_ID" value="<?php echo esc_attr( $tag_ID ); ?>" /> <input type="hidden" name="taxonomy" value="<?php echo esc_attr( $taxonomy ); ?>" /> <?php wp_original_referer_field( true, 'previous' );
wp_nonce_field( 'update-tag_' . $tag_ID );

/** * Fires at the beginning of the Edit Term form. * * At this point, the required hidden fields and nonces have already been output. * * The dynamic portion of the hook name, `$taxonomy`, refers to the taxonomy slug. * * Possible hook names include: * * - `category_term_edit_form_top` * - `post_tag_term_edit_form_top` * * @since 4.5.0 * * @param WP_Term $tag Current taxonomy term object. * @param string $taxonomy Current $taxonomy slug. */
do_action( 'add_meta_boxes_comment', $comment );

do_meta_boxes( null, 'normal', $comment );

$referer = wp_get_referer();
?> </div> <input type="hidden" name="c" value="<?php echo esc_attr( $comment->comment_ID ); ?>" /> <input type="hidden" name="p" value="<?php echo esc_attr( $comment->comment_post_ID ); ?>" /> <input name="referredby" type="hidden" id="referredby" value="<?php echo $referer ? esc_url( $referer ) : ''; ?>" /> <?php wp_original_referer_field( true, 'previous' ); ?> <input type="hidden" name="noredir" value="1" /> </div><!-- /post-body --> </div> </div> </form> <?php if ( ! wp_is_mobile() ) : ?> <script type="text/javascript"> try{document.post.name.focus();}catch(e){} </script>
Home | Imprint | This part of the site doesn't use cookies.