AnsPress_Common_Pages::edit_page()
Description #
Output edit page template
Source #
File: includes/common-pages.php
public static function edit_page() { $post_id = (int) ap_sanitize_unslash( 'id', 'r' ); if ( ! anspress_verify_nonce( 'edit-post-' . $post_id ) || empty( $post_id ) || ! ap_user_can_edit_answer( $post_id ) ) { echo '<p>' . esc_attr__( 'Sorry, you cannot edit this answer.', 'anspress-question-answer' ) . '</p>'; return; } global $editing_post; $editing_post = ap_get_post( $post_id ); ap_answer_form( $editing_post->post_parent, true ); }
Expand full source code Collapse full source code View on GitHub: includes/common-pages.php:186
Add your comment