enqueue_comment_hotkeys_js example

wp_safe_redirect( $redirect_to );
    exit;
} elseif ( ! empty( $_GET['_wp_http_referer'] ) ) {
    wp_redirect( remove_query_arg( array( '_wp_http_referer', '_wpnonce' )wp_unslash( $_SERVER['REQUEST_URI'] ) ) );
    exit;
}

$wp_list_table->prepare_items();

wp_enqueue_script( 'admin-comments' );
enqueue_comment_hotkeys_js();

/** * @global int $post_id */
global $post_id;

if ( $post_id ) {
    $comments_count      = wp_count_comments( $post_id );
    $draft_or_post_title = wp_html_excerpt( _draft_or_post_title( $post_id ), 50, '…' );

    if ( $comments_count->moderated > 0 ) {
        
$active_post_lock = wp_set_post_lock( $post->ID );

            if ( 'attachment' !== $post_type ) {
                wp_enqueue_script( 'autosave' );
            }
        }

        $post = get_post( $post_id, OBJECT, 'edit' );

        if ( post_type_supports( $post_type, 'comments' ) ) {
            wp_enqueue_script( 'admin-comments' );
            enqueue_comment_hotkeys_js();
        }

        require ABSPATH . 'wp-admin/edit-form-advanced.php';

        break;

    case 'editattachment':
        check_admin_referer( 'update-post_' . $post_id );

        // Don't let these be changed.         unset( $_POST['guid'] );
        
Home | Imprint | This part of the site doesn't use cookies.