'edit_posts', 'view_report' => 'edit_posts', 'manage_links' => 'edit_posts', // META capability (see docblock above) — every other entry here is // a primitive capability WordPress checks without the post id. 'edit_target_post' => 'edit_post', 'manage_settings' => 'manage_options', 'manage_broken' => 'manage_options', 'run_tools' => 'manage_options', 'export' => 'manage_options', ); $capability = $map[ $action ] ?? 'manage_options'; /** * Filters the capability required for a Postlinkly action. * * @since 1.0.0 * * @param string $capability Default capability for the action. * @param string $action The action keyword being mapped. */ return (string) apply_filters( 'postlinkly_capability_for', $capability, $action ); } }