get_editable_authors
Filter HookDescription
Gets author users who can edit posts.Hook Information
File Location |
wp-admin/includes/deprecated.php
View on GitHub
|
Hook Type | Filter |
Line Number | 270 |
Hook Parameters
Type | Name | Description |
---|---|---|
int
|
$user_id
|
User ID. |
Usage Examples
Basic Usage
<?php
// Hook into get_editable_authors
add_filter('get_editable_authors', 'my_custom_filter', 10, 1);
function my_custom_filter($user_id) {
// Your custom filtering logic here
return $user_id;
}
Source Code Context
wp-admin/includes/deprecated.php:270
- How this hook is used in WordPress core
<?php
265 } else {
266 $editable = join(',', $editable);
267 $authors = $wpdb->get_results( "SELECT * FROM $wpdb->users WHERE ID IN ($editable) ORDER BY display_name" );
268 }
269
270 return apply_filters('get_editable_authors', $authors);
271 }
272
273 /**
274 * Gets the IDs of any users who can edit posts.
275 *
PHP Documentation
<?php
/**
* Gets author users who can edit posts.
*
* @deprecated 3.1.0 Use get_users()
*
* @global wpdb $wpdb WordPress database abstraction object.
*
* @param int $user_id User ID.
* @return array|false List of editable authors. False if no editable users.
*/
Quick Info
- Hook Type: Filter
- Parameters: 1
- File: wp-admin/includes/deprecated.php
Related Hooks
Related hooks will be displayed here in future updates.