Allow contents listings to also show private contents that are authored by the current connected user

Since 7.7.0

By default, WP Customer Area is only displaying contents assigned to the current user on listing pages. There is a feature that allows you to also display contents created by the current user, but it is disabled by default.

This code snippet will allow you to also display contents authored by the currently connected user.

/**
 * Re-enable display of contents authored by the currently connect user on listing pages
 *
 * @param bool $disabled The actual state of the feature
 * @return bool $disabled The new state of the feature
 */
function custom_cuar_disable_contents_created_by_user($disabled)
{
    $disabled = false;
    return $disabled;
}

add_filter('cuar/core/page/query-disable-authored-by', 'custom_cuar_disable_contents_created_by_user');

The cool thing is that there is another filter that will allow you to (de)activate this feature again, by only selecting a given post type.
This filter also pass a second parameter `$query` that will contain the actual object of the query being triggered.

/**
 * Re-deactivate display of contents authored by the currently connect user on conversations listing pages
 *
 * @param bool $disabled The actual state of the feature
 * @param object $query The current query object
 * @return bool $disabled The new state of the feature
 */
function custom_cuar_disable_contents_created_by_user_for_conversations($disabled, $query)
{
    $disabled = true;
    return $disabled;
}

add_filter('cuar/core/page/query-disable-authored-by?post_type=cuar_conversation', 'custom_cuar_disable_contents_created_by_user_for_conversations');