WordPress.org

Ready to get started?Download WordPress

Forums

Filter for post Quick Edit Author drop-down? (1 post)

  1. jdstudios
    Member
    Posted 2 years ago #

    Anybody know if there is a filter or way to access the Author drop-down in the Quick Edit area of a post?

    I have the following code working perfectly, but it only affected the regular post edit screen (not the Quick Edit)

    add_filter('wp_dropdown_users', 'theme_post_author_override');
    function theme_post_author_override($output) {
    if (!preg_match('/post_author_override/', $output)) return $output;
    if (preg_match ('/post_author_override_replaced/', $output)) return $output;
    $output = wp_dropdown_users(array(
    'echo' => 0,
    'name' => 'post_author_override_replaced',
    'selected' => empty($post->ID) ? $user_ID : $post->post_author,
    'include_selected' => true
    ));
    $output = preg_replace('/post_author_override_replaced/', 'post_author_override', $output);
    return $output;
    }

Topic Closed

This topic has been closed to new replies.

About this Topic