3 edited body
source | link

You can try post_row_actions hook:

/**
 * Hide quick edit
 *
 * @internal  Used as a callback.
 *
 * @see  https://developer.wordpress.org/reference/hooks/post_row_actions/
 */
function wpse288663_hide_quick_edit($actions, $post)
{
    // Replace `{$cap}` with your specific capability.
    if (CPT_SLUG === $post->post_type && current_user_can({$cap})) {
        unset($actions['inline hide-if-no-js']);
    }

    return $actions;
}

// Hook up.
add_actionadd_filter('post_row_actions', 'wpse288663_hide_quick_edit', 10, 2);

You can try post_row_actions hook:

/**
 * Hide quick edit
 *
 * @internal  Used as a callback.
 *
 * @see  https://developer.wordpress.org/reference/hooks/post_row_actions/
 */
function wpse288663_hide_quick_edit($actions, $post)
{
    // Replace `{$cap}` with your specific capability.
    if (CPT_SLUG === $post->post_type && current_user_can({$cap})) {
        unset($actions['inline hide-if-no-js']);
    }

    return $actions;
}

// Hook up.
add_action('post_row_actions', 'wpse288663_hide_quick_edit', 10, 2);

You can try post_row_actions hook:

/**
 * Hide quick edit
 *
 * @internal  Used as a callback.
 *
 * @see  https://developer.wordpress.org/reference/hooks/post_row_actions/
 */
function wpse288663_hide_quick_edit($actions, $post)
{
    // Replace `{$cap}` with your specific capability.
    if (CPT_SLUG === $post->post_type && current_user_can({$cap})) {
        unset($actions['inline hide-if-no-js']);
    }

    return $actions;
}

// Hook up.
add_filter('post_row_actions', 'wpse288663_hide_quick_edit', 10, 2);
2 deleted 38 characters in body
source | link

You can try post_row_actions hook:

/**
 * Hide quick edit
 *
 * @internal  Used as a callback.
 *
 * @see  https://developer.wordpress.org/reference/hooks/post_row_actions/
 */
function wpse288663_hide_quick_edit($actions, $post)
{
    $user = wp_get_current_user();

    // Replace `$cap``{$cap}` with your specific capability.
    if (CPT_SLUG === $post->post_type && $user->has_capcurrent_user_can({$cap})) {
        unset($actions['inline hide-if-no-js']);
    }

    return $actions;
}

// Hook up.
add_action('post_row_actions', 'wpse288663_hide_quick_edit', 10, 2);

You can try post_row_actions hook:

/**
 * Hide quick edit
 *
 * @internal  Used as a callback.
 *
 * @see  https://developer.wordpress.org/reference/hooks/post_row_actions/
 */
function wpse288663_hide_quick_edit($actions, $post)
{
    $user = wp_get_current_user();

    // Replace `$cap` with your specific capability.
    if (CPT_SLUG === $post->post_type && $user->has_cap({$cap})) {
        unset($actions['inline hide-if-no-js']);
    }

    return $actions;
}

// Hook up.
add_action('post_row_actions', 'wpse288663_hide_quick_edit', 10, 2);

You can try post_row_actions hook:

/**
 * Hide quick edit
 *
 * @internal  Used as a callback.
 *
 * @see  https://developer.wordpress.org/reference/hooks/post_row_actions/
 */
function wpse288663_hide_quick_edit($actions, $post)
{
    // Replace `{$cap}` with your specific capability.
    if (CPT_SLUG === $post->post_type && current_user_can({$cap})) {
        unset($actions['inline hide-if-no-js']);
    }

    return $actions;
}

// Hook up.
add_action('post_row_actions', 'wpse288663_hide_quick_edit', 10, 2);
1
source | link

You can try post_row_actions hook:

/**
 * Hide quick edit
 *
 * @internal  Used as a callback.
 *
 * @see  https://developer.wordpress.org/reference/hooks/post_row_actions/
 */
function wpse288663_hide_quick_edit($actions, $post)
{
    $user = wp_get_current_user();

    // Replace `$cap` with your specific capability.
    if (CPT_SLUG === $post->post_type && $user->has_cap({$cap})) {
        unset($actions['inline hide-if-no-js']);
    }

    return $actions;
}

// Hook up.
add_action('post_row_actions', 'wpse288663_hide_quick_edit', 10, 2);