Title: get_users_drafts
Published: April 25, 2014
Last modified: August 20, 2026

---

# apply_filters( ‘get_users_drafts’, string $query )

## In this article

 * [Parameters](https://developer.wordpress.org/reference/hooks/get_users_drafts/?output_format=md#parameters)
 * [Source](https://developer.wordpress.org/reference/hooks/get_users_drafts/?output_format=md#source)
 * [Related](https://developer.wordpress.org/reference/hooks/get_users_drafts/?output_format=md#related)
 * [Changelog](https://developer.wordpress.org/reference/hooks/get_users_drafts/?output_format=md#changelog)

Filters the SQL query string for the user’s drafts query.

## 󠀁[Parameters](https://developer.wordpress.org/reference/hooks/get_users_drafts/?output_format=md#parameters)󠁿

 `$query`string

The user’s drafts query string.

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

    ```php
    $query = apply_filters( 'get_users_drafts', $query );
    ```

[View all references](https://developer.wordpress.org/reference/file/wp-admin/includes/user.php/)
[View on Trac](https://core.trac.wordpress.org/browser/tags/7.1/src/wp-admin/includes/user.php#L328)
[View on GitHub](https://github.com/WordPress/wordpress-develop/blob/7.1/src/wp-admin/includes/user.php#L328-L328)

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

| Used by | Description | 
| [get_users_drafts()](https://developer.wordpress.org/reference/functions/get_users_drafts/)`wp-admin/includes/user.php` |

Retrieve the user’s drafts.

  |

## 󠀁[Changelog](https://developer.wordpress.org/reference/hooks/get_users_drafts/?output_format=md#changelog)󠁿

| Version | Description | 
| [2.0.0](https://developer.wordpress.org/reference/since/2.0.0/) | Introduced. |

## User Contributed Notes

You must [log in](https://login.wordpress.org/?redirect_to=https%3A%2F%2Fsummer-heart-0930.chufeiyun1688.workers.dev%3A443%2Fhttps%2Fdeveloper.wordpress.org%2Freference%2Fhooks%2Fget_users_drafts%2F)
before being able to contribute a note or feedback.