Ticket #2339: 2339.01.patch
File 2339.01.patch, 1.4 KB (added by , 12 years ago) |
---|
-
includes/extend/buddypress/group.php
class BBP_Forums_Group_Extension extends BP_Group_Extension { 95 95 96 96 // Saves the bbPress options if they come from the BuddyPress Group Admin UI 97 97 add_action( 'bp_group_admin_edit_after', array( $this, 'edit_screen_save' ) ); 98 99 // Adds a hidden input value to the "Group Settings" page 100 add_action( 'bp_before_group_settings_admin', array( $this, 'group_settings_hidden_field' ) ); 98 101 } 99 102 100 103 /** … … class BBP_Forums_Group_Extension extends BP_Group_Extension { 1067 1070 return $retval; 1068 1071 } 1069 1072 1073 /** 1074 * Add a hidden input field on the group settings page if the group forum is 1075 * enabled. 1076 * 1077 * Due to the way BuddyPress' group admin settings page saves its settings, we 1078 * need to let BP know that bbPress added a forum. 1079 * 1080 * @since bbPress (rxxxx) 1081 * 1082 * @see groups_screen_group_admin_settings() 1083 */ 1084 public function group_settings_hidden_field() { 1085 // if a forum is not enabled, we don't need to add this field 1086 if ( ! bp_group_is_forum_enabled() ) { 1087 return; 1088 } 1089 ?> 1090 <input type="hidden" name="group-show-forum" id="group-show-forum" value="1" /> 1091 1092 <?php 1093 } 1094 1070 1095 /** Permalink Mappers *****************************************************/ 1071 1096 1072 1097 /**