PluginProbe
Edit Flow / 0.11.0
Edit Flow v0.11.0
0.11.1 0.11.0 0.7.2 0.7.3 0.7.4 0.7.5 0.7.6 0.8 0.8.1 0.8.2 0.9 0.9.1 0.9.2 0.9.3 0.9.4 0.9.5 0.9.6 0.9.7 0.9.8 0.9.9 trunk 0.1.5 0.10.0 0.10.1 0.10.2 All 44 releases
edit-flow / vipgo-helper.php

vipgo-helper.php in Edit Flow 0.11.0, at vipgo-helper.php

31 lines 760 B
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
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