Closed CatEntangler closed 8 years ago
Many thanks for your contribution, I've added this and released 1.10.3 with some modifications, the filter is now:
$selected = apply_filters(
'groups_access_restrictions_capability_selected',
in_array( $capability->capability, $read_caps ),
$capability->capability,
$capability->capability_id,
$read_caps,
$post_id,
$post_type
);
where the first argument is boolean instead of the text and it takes two additional ones for the post ID and type.
@proaktion works great! thanks for the pull request acceptance.
Filter: groups_edit_post_selected_caps Purpose: Allow for the automatic pre-selection of capabilities for posts. Example use: Setting up a custom post type that requires default read capabilities without requiring site/content managers to have to remember to edit the meta box every time. Variables: 4 example usage: