This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <?php | |
| /** | |
| * Add the Job Listing Activity support! | |
| */ | |
| add_post_type_support( 'job_listing', 'buddypress-activity' ); | |
| /** | |
| * Track New Job Listing Posts. | |
| */ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <?php | |
| /** | |
| * Redirect buddypress pages to registration page for non logged in users | |
| */ | |
| function yz_redirect_bp_pages_to_register_page() { | |
| // if not logged in and on a bp page except registration or activation | |
| if ( ! is_user_logged_in() && | |
| ( | |
| ! bp_is_blog_page() && ! bp_is_activation_page() && ! bp_is_register_page() | |
| ) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <?php | |
| /** | |
| * Hide Posts Tab for other users but admin. | |
| */ | |
| function yz_hide_posts_tab_for_all_users_but_admin() { | |
| if ( bp_is_user() && bp_displayed_user_id() != 1 ) { | |
| // Delete Posts Tab. | |
| bp_core_remove_nav_item( 'posts' ); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <?php | |
| /** | |
| * Hide Dashboard Admin Bar For Non Admins. | |
| */ | |
| function yz_hide_dashboard_for_non_admins() { | |
| if ( current_user_can( 'administrator' ) ) { | |
| return false; | |
| } |