PluginProbe
Edit Flow / 0.9
Edit Flow v0.9
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.9, at vipgo-helper.php

28 lines 1005 B
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
1 <?php
2 /**
3 * Ensure Edit Flow is instantiated
4 */
5 add_action( 'after_setup_theme', 'EditFlow' );
6
7 /**
8 * Caps don't get loaded on install on VIP Go. Instead, let's add
9 * them via filters.
10 */
11 add_filter( 'ef_kill_add_caps_to_role', '__return_true' );
12 add_filter( 'ef_view_calendar_cap', function() {return 'edit_posts'; } );
13 add_filter( 'ef_view_story_budget_cap', function() { return 'edit_posts'; } );
14 add_filter( 'ef_edit_post_subscriptions_cap', function() { return 'edit_others_posts'; } );
15 add_filter( 'ef_manage_usergroups_cap', function() { return 'manage_options'; } );
16
17 /**
18 * Edit Flow loads modules after plugins_loaded, which has already been fired when loading via wpcom_vip_load_plugins
19 * Let's run the method at after_setup_themes
20 */
21 add_filter( 'after_setup_theme', 'edit_flow_wpcom_load_modules' );
22 function edit_flow_wpcom_load_modules() {
23 global $edit_flow;
24 if ( method_exists( $edit_flow, 'action_ef_loaded_load_modules' ) ) {
25 $edit_flow->action_ef_loaded_load_modules();
26 }
27 }
28