| 1 |
<?php |
| 2 |
/** |
| 3 |
* VIP Go helper for Edit Flow. |
| 4 |
* |
| 5 |
* Ensures Edit Flow is instantiated and provides necessary |
| 6 |
* capability filters for the VIP Go environment. |
| 7 |
* |
| 8 |
* @package EditFlow |
| 9 |
*/ |
| 10 |
|
| 11 |
// Ensure Edit Flow is instantiated. |
| 12 |
add_action( 'after_setup_theme', 'EditFlow' ); |
| 13 |
|
| 14 |
/** |
| 15 |
* Caps don't get loaded on install on VIP Go. Instead, let's add |
| 16 |
* them via filters. |
| 17 |
*/ |
| 18 |
add_filter( 'ef_kill_add_caps_to_role', '__return_true' ); |
| 19 |
add_filter( 'ef_view_calendar_cap', function () { |
| 20 |
return 'edit_posts'; |
| 21 |
} ); |
| 22 |
add_filter( 'ef_view_story_budget_cap', function () { |
| 23 |
return 'edit_posts'; |
| 24 |
} ); |
| 25 |
add_filter( 'ef_edit_post_subscriptions_cap', function () { |
| 26 |
return 'edit_others_posts'; |
| 27 |
} ); |
| 28 |
add_filter( 'ef_manage_usergroups_cap', function () { |
| 29 |
return 'manage_options'; |
| 30 |
} ); |
| 31 |
|