Skip to content

Instantly share code, notes, and snippets.

@joshfeck
Last active August 29, 2015 14:11
Show Gist options
  • Select an option

  • Save joshfeck/bc142af122836b3a081b to your computer and use it in GitHub Desktop.

Select an option

Save joshfeck/bc142af122836b3a081b to your computer and use it in GitHub Desktop.
Allows any event editor set up with the EE3 Roles and Permission plugin to be able to use any questions in the system.
<?php
//* Please do NOT include the opening php tag, except of course if you're starting with a blank file
//remove r&P question group filter so any event editor has all the questions:
add_action( 'init', 'ee3_modify_permissions_questions' );
function ee3_modify_permissions_questions() {
remove_filter('espresso_get_question_groups_for_event_where', 'espresso_rp_basic_get_question_groups_for_event_where', 10, 3);
}
add_action( 'init', 'ee3_modify_permissions_pro_questions', 10 );
function ee3_modify_permissions_pro_questions() {
remove_filter('espresso_get_question_groups_for_event_where', 'espresso_rp_basic_get_question_groups_for_event_where', 10, 3);
remove_filter('espresso_get_question_groups_for_event_where', 'espresso_rp_pro_get_question_groups_for_event_where', 15, 3);
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment