get_editable_authors

The timeline below displays how wordpress function get_editable_authors has changed across different WordPress versions. If a version is not listed, refer to the next available version below.

WordPress Version: 5.7

/**
 * 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.
 */
function get_editable_authors($user_id)
{
    _deprecated_function(__FUNCTION__, '3.1.0', 'get_users()');
    global $wpdb;
    $editable = get_editable_user_ids($user_id);
    if (!$editable) {
        return false;
    } else {
        $editable = join(',', $editable);
        $authors = $wpdb->get_results("SELECT * FROM {$wpdb->users} WHERE ID IN ({$editable}) ORDER BY display_name");
    }
    return apply_filters('get_editable_authors', $authors);
}

WordPress Version: 4.9

/**
 * 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|bool List of editable authors. False if no editable users.
 */
function get_editable_authors($user_id)
{
    _deprecated_function(__FUNCTION__, '3.1.0', 'get_users()');
    global $wpdb;
    $editable = get_editable_user_ids($user_id);
    if (!$editable) {
        return false;
    } else {
        $editable = join(',', $editable);
        $authors = $wpdb->get_results("SELECT * FROM {$wpdb->users} WHERE ID IN ({$editable}) ORDER BY display_name");
    }
    return apply_filters('get_editable_authors', $authors);
}

WordPress Version: 4.6

/**
 * Gets author users who can edit posts.
 *
 * @deprecated 3.1.0 Use get_users()
 *
 * @param int $user_id User ID.
 * @return array|bool List of editable authors. False if no editable users.
 */
function get_editable_authors($user_id)
{
    _deprecated_function(__FUNCTION__, '3.1.0', 'get_users()');
    global $wpdb;
    $editable = get_editable_user_ids($user_id);
    if (!$editable) {
        return false;
    } else {
        $editable = join(',', $editable);
        $authors = $wpdb->get_results("SELECT * FROM {$wpdb->users} WHERE ID IN ({$editable}) ORDER BY display_name");
    }
    return apply_filters('get_editable_authors', $authors);
}

WordPress Version: 4.4

/**
 * Gets author users who can edit posts.
 *
 * @deprecated 3.1.0 Use get_users()
 *
 * @param int $user_id User ID.
 * @return array|bool List of editable authors. False if no editable users.
 */
function get_editable_authors($user_id)
{
    _deprecated_function(__FUNCTION__, '3.1', 'get_users()');
    global $wpdb;
    $editable = get_editable_user_ids($user_id);
    if (!$editable) {
        return false;
    } else {
        $editable = join(',', $editable);
        $authors = $wpdb->get_results("SELECT * FROM {$wpdb->users} WHERE ID IN ({$editable}) ORDER BY display_name");
    }
    return apply_filters('get_editable_authors', $authors);
}

WordPress Version: 3.7

/**
 * @deprecated 3.1.0
 *
 * @param int $user_id User ID.
 * @return array|bool List of editable authors. False if no editable users.
 */
function get_editable_authors($user_id)
{
    _deprecated_function(__FUNCTION__, '3.1', 'get_users()');
    global $wpdb;
    $editable = get_editable_user_ids($user_id);
    if (!$editable) {
        return false;
    } else {
        $editable = join(',', $editable);
        $authors = $wpdb->get_results("SELECT * FROM {$wpdb->users} WHERE ID IN ({$editable}) ORDER BY display_name");
    }
    return apply_filters('get_editable_authors', $authors);
}