Title: WP_Posts_List_Table::ajax_user_can
Published: April 25, 2014
Last modified: April 28, 2025

---

# WP_Posts_List_Table::ajax_user_can(): bool

## In this article

 * [Return](https://developer.wordpress.org/reference/classes/wp_posts_list_table/ajax_user_can/?output_format=md#return)
 * [Source](https://developer.wordpress.org/reference/classes/wp_posts_list_table/ajax_user_can/?output_format=md#source)
 * [Related](https://developer.wordpress.org/reference/classes/wp_posts_list_table/ajax_user_can/?output_format=md#related)

[ Back to top](https://developer.wordpress.org/reference/classes/wp_posts_list_table/ajax_user_can/?output_format=md#wp--skip-link--target)

## 󠀁[Return](https://developer.wordpress.org/reference/classes/wp_posts_list_table/ajax_user_can/?output_format=md#return)󠁿

 bool

## 󠀁[Source](https://developer.wordpress.org/reference/classes/wp_posts_list_table/ajax_user_can/?output_format=md#source)󠁿

    ```php
    public function ajax_user_can() {
    	return current_user_can( get_post_type_object( $this->screen->post_type )->cap->edit_posts );
    }
    ```

[View all references](https://developer.wordpress.org/reference/files/wp-admin/includes/class-wp-posts-list-table.php/)
[View on Trac](https://core.trac.wordpress.org/browser/tags/6.9.4/src/wp-admin/includes/class-wp-posts-list-table.php#L144)
[View on GitHub](https://github.com/WordPress/wordpress-develop/blob/6.9.4/src/wp-admin/includes/class-wp-posts-list-table.php#L144-L146)

## 󠀁[Related](https://developer.wordpress.org/reference/classes/wp_posts_list_table/ajax_user_can/?output_format=md#related)󠁿

| Uses | Description | 
| [current_user_can()](https://developer.wordpress.org/reference/functions/current_user_can/)`wp-includes/capabilities.php` |

Returns whether the current user has the specified capability.

  | 
| [get_post_type_object()](https://developer.wordpress.org/reference/functions/get_post_type_object/)`wp-includes/post.php` |

Retrieves a post type object by name.

  |

## User Contributed Notes

You must [log in](https://login.wordpress.org/?redirect_to=https%3A%2F%2Fdeveloper.wordpress.org%2Freference%2Fclasses%2Fwp_posts_list_table%2Fajax_user_can%2F)
before being able to contribute a note or feedback.