Skip to content

Instantly share code, notes, and snippets.

@davidtowoju
Created January 11, 2021 15:49
Show Gist options
  • Save davidtowoju/97009dc159ccea07ae755953da460aa1 to your computer and use it in GitHub Desktop.
Save davidtowoju/97009dc159ccea07ae755953da460aa1 to your computer and use it in GitHub Desktop.
Hooks for adding/extending MemberPress Courses Classroom features
<?php
// Filters
function edit_classroom_header_html ($html, $classes, $back_url){ // header
}
add_filter('mpcs_classroom_header', 'edit_classroom_header_html', 10, 3);
function edit_classroom_sidebar_html ($html){ // sidebar
}
add_filter('mpcs_classroom_header', 'edit_classroom_sidebar_html');
// Actions
add_action('mpcs_classroom_start_header', 'before_header_content');
add_action('mpcs_classroom_preview_menu', 'preview_menu_items');
add_action('mpcs_classroom_user_menu', 'main_menu_items');
add_action('mpcs_classroom_start_header', 'after_header_content');
add_action('mpcs_classroom_start_sidebar', 'before_sidebar_content');
add_action('mpcs_classroom_end_sidebar', 'after_sidebar_content');
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment