BuddyPress - Version 2.7.2

Version Description

See: https://codex.buddypress.org/releases/version-2-7-2/

Download this release

Release Info

Developer johnjamesjacoby
Plugin Icon 128x128 BuddyPress
Version 2.7.2
Comparing to
See all releases

Code changes from version 2.7.0 to 2.7.2

Files changed (44) hide show
  1. bp-core/admin/images/activity-embeds.png +0 -0
  2. bp-core/admin/images/default-themes.png +0 -0
  3. bp-core/admin/images/group-type-pop.png +0 -0
  4. bp-core/admin/images/new-nav-api.png +0 -0
  5. bp-core/admin/images/user-frontpage.png +0 -0
  6. bp-core/bp-core-dependency.php +0 -15
  7. bp-core/classes/class-bp-attachment-cover-image.php +291 -291
  8. bp-core/css/admin-bar-rtl.css +13 -0
  9. bp-core/css/admin-bar-rtl.min.css +1 -1
  10. bp-core/css/admin-bar.css +13 -0
  11. bp-core/css/admin-bar.min.css +1 -1
  12. bp-core/js/cover-image.js +277 -277
  13. bp-groups/bp-groups-functions.php +12 -3
  14. bp-loader.php +4 -5
  15. bp-templates/bp-legacy/buddypress/assets/_attachments/cover-images/index.php +36 -36
  16. bp-templates/bp-legacy/buddypress/groups/single/admin/delete-group.php +41 -41
  17. bp-templates/bp-legacy/buddypress/groups/single/admin/edit-details.php +53 -53
  18. bp-templates/bp-legacy/buddypress/groups/single/admin/group-avatar.php +67 -67
  19. bp-templates/bp-legacy/buddypress/groups/single/admin/group-cover-image.php +33 -33
  20. bp-templates/bp-legacy/buddypress/groups/single/admin/group-settings.php +124 -124
  21. bp-templates/bp-legacy/buddypress/groups/single/admin/manage-members.php +332 -332
  22. bp-templates/bp-legacy/buddypress/groups/single/admin/membership-requests.php +35 -35
  23. bp-templates/bp-legacy/buddypress/groups/single/cover-image-header.php +129 -129
  24. bp-templates/bp-legacy/buddypress/members/single/cover-image-header.php +106 -106
  25. bp-templates/bp-legacy/buddypress/members/single/profile/change-cover-image.php +33 -33
  26. bp-templates/bp-legacy/css/twentyeleven-rtl.css +184 -184
  27. bp-templates/bp-legacy/css/twentyeleven.css +184 -184
  28. bp-templates/bp-legacy/css/twentyeleven.scss +2577 -2577
  29. bp-templates/bp-legacy/css/twentysixteen-rtl.css +183 -183
  30. bp-templates/bp-legacy/css/twentysixteen.css +183 -183
  31. bp-templates/bp-legacy/css/twentysixteen.scss +2435 -2435
  32. bp-templates/bp-legacy/css/twentyten-rtl.css +184 -184
  33. bp-templates/bp-legacy/css/twentyten.css +184 -184
  34. bp-templates/bp-legacy/css/twentyten.scss +2478 -2478
  35. bp-templates/bp-legacy/css/twentythirteen-rtl.css +188 -188
  36. bp-templates/bp-legacy/css/twentythirteen.css +188 -188
  37. bp-templates/bp-legacy/css/twentythirteen.scss +2427 -2427
  38. bp-templates/bp-legacy/css/twentytwelve-rtl.css +188 -188
  39. bp-templates/bp-legacy/css/twentytwelve.css +188 -188
  40. bp-templates/bp-legacy/css/twentytwelve.scss +2517 -2517
  41. bp-xprofile/bp-xprofile-caps.php +20 -1
  42. bp-xprofile/classes/class-bp-xprofile-field-type-datebox.php +2 -1
  43. buddypress.pot +33 -37
  44. readme.txt +17 -10
bp-core/admin/images/activity-embeds.png DELETED
Binary file
bp-core/admin/images/default-themes.png DELETED
Binary file
bp-core/admin/images/group-type-pop.png DELETED
Binary file
bp-core/admin/images/new-nav-api.png DELETED
Binary file
bp-core/admin/images/user-frontpage.png DELETED
Binary file
bp-core/bp-core-dependency.php CHANGED
@@ -207,27 +207,12 @@ function bp_setup_cache_groups() {
207
/**
208
* Set up the currently logged-in user.
209
*
210
- * We white-list the WordPress Customizer which purposely loads the user early.
211
- * If the current user is being setup before the "init" action has fired,
212
- * strange (and difficult to debug) role/capability issues will occur.
213
- *
214
* @since 1.7.0
215
*
216
* @link https://buddypress.trac.wordpress.org/ticket/6046
217
* @link https://core.trac.wordpress.org/ticket/24169
218
*/
219
function bp_setup_current_user() {
220
- $skip_warning = (
221
- ( isset( $_REQUEST['wp_customize'] ) && 'on' === $_REQUEST['wp_customize'] ) ||
222
- ( is_admin() && 'customize.php' === basename( $_SERVER['PHP_SELF'] ) )
223
- );
224
-
225
- if ( ! $skip_warning && ! did_action( 'after_setup_theme' ) ) {
226
- $e = new Exception;
227
- $trace = $e->getTraceAsString();
228
-
229
- _doing_it_wrong( __FUNCTION__, __( 'The current user is being initialized without using $wp->init().', 'buddypress' ) . "\n===\nTrace:\n" . substr( $trace, strpos( $trace, '#6' ) ) . "\n===\n", '1.7' );
230
- }
231
232
/**
233
* Fires to set up the current user setup process.
207
/**
208
* Set up the currently logged-in user.
209
*
210
* @since 1.7.0
211
*
212
* @link https://buddypress.trac.wordpress.org/ticket/6046
213
* @link https://core.trac.wordpress.org/ticket/24169
214
*/
215
function bp_setup_current_user() {
216
217
/**
218
* Fires to set up the current user setup process.
bp-core/classes/class-bp-attachment-cover-image.php CHANGED
@@ -1,291 +1,291 @@
1
- <?php
2
- /**
3
- * Core Cover Image attachment class.
4
- *
5
- * @package BuddyPress
6
- * @subpackage Core
7
- * @since 2.4.0
8
- */
9
-
10
- // Exit if accessed directly.
11
- defined( 'ABSPATH' ) || exit;
12
-
13
- /**
14
- * BP Attachment Cover Image class.
15
- *
16
- * Extends BP Attachment to manage the cover images uploads.
17
- *
18
- * @since 2.4.0
19
- */
20
- class BP_Attachment_Cover_Image extends BP_Attachment {
21
- /**
22
- * The constuctor.
23
- *
24
- * @since 2.4.0
25
- */
26
- public function __construct() {
27
- // Allowed cover image types & upload size.
28
- $allowed_types = bp_attachments_get_allowed_types( 'cover_image' );
29
- $max_upload_file_size = bp_attachments_get_max_upload_file_size( 'cover_image' );
30
-
31
- parent::__construct( array(
32
- 'action' => 'bp_cover_image_upload',
33
- 'file_input' => 'file',
34
- 'original_max_filesize' => $max_upload_file_size,
35
- 'base_dir' => bp_attachments_uploads_dir_get( 'dir' ),
36
- 'required_wp_files' => array( 'file', 'image' ),
37
-
38
- // Specific errors for cover images.
39
- 'upload_error_strings' => array(
40
- 11 => sprintf( __( 'That image is too big. Please upload one smaller than %s', 'buddypress' ), size_format( $max_upload_file_size ) ),
41
- 12 => sprintf( _n( 'Please upload only this file type: %s.', 'Please upload only these file types: %s.', count( $allowed_types ), 'buddypress' ), self::get_cover_image_types( $allowed_types ) ),
42
- ),
43
- ) );
44
- }
45
-
46
- /**
47
- * Gets the available cover image types.
48
- *
49
- * @since 2.4.0
50
- *
51
- * @param array $allowed_types Array of allowed cover image types.
52
- * @return string $value Comma-separated list of allowed cover image types.
53
- */
54
- public static function get_cover_image_types( $allowed_types = array() ) {
55
- $types = array_map( 'strtoupper', $allowed_types );
56
- $comma = _x( ',', 'cover image types separator', 'buddypress' );
57
- return join( $comma . ' ', $types );
58
- }
59
-
60
- /**
61
- * Cover image specific rules.
62
- *
63
- * Adds an error if the cover image size or type don't match BuddyPress needs.
64
- * The error code is the index of $upload_error_strings.
65
- *
66
- * @since 2.4.0
67
- *
68
- * @param array $file The temporary file attributes (before it has been moved).
69
- * @return array $file The file with extra errors if needed.
70
- */
71
- public function validate_upload( $file = array() ) {
72
- // Bail if already an error.
73
- if ( ! empty( $file['error'] ) ) {
74
- return $file;
75
- }
76
-
77
- // File size is too big.
78
- if ( $file['size'] > $this->original_max_filesize ) {
79
- $file['error'] = 11;
80
-
81
- // File is of invalid type.
82
- } elseif ( ! bp_attachments_check_filetype( $file['tmp_name'], $file['name'], bp_attachments_get_allowed_mimes( 'cover_image' ) ) ) {
83
- $file['error'] = 12;
84
- }
85
-
86
- // Return with error code attached.
87
- return $file;
88
- }
89
-
90
- /**
91
- * Set the directory when uploading a file.
92
- *
93
- * @since 2.4.0
94
- *
95
- * @param array $upload_dir The original Uploads dir.
96
- * @return array $value Upload data (path, url, basedir...).
97
- */
98
- public function upload_dir_filter( $upload_dir = array() ) {
99
- // Default values are for profiles.
100
- $object_id = bp_displayed_user_id();
101
-
102
- if ( empty( $object_id ) ) {
103
- $object_id = bp_loggedin_user_id();
104
- }
105
-
106
- $object_directory = 'members';
107
-
108
- // We're in a group, edit default values.
109
- if ( bp_is_group() || bp_is_group_create() ) {
110
- $object_id = bp_get_current_group_id();
111
- $object_directory = 'groups';
112
- }
113
-
114
- // Set the subdir.
115
- $subdir = '/' . $object_directory . '/' . $object_id . '/cover-image';
116
-
117
- /**
118
- * Filters the cover image upload directory.
119
- *
120
- * @since 2.4.0
121
- *
122
- * @param array $value Array containing the path, URL, and other helpful settings.
123
- * @param array $upload_dir The original Uploads dir.
124
- */
125
- return apply_filters( 'bp_attachments_cover_image_upload_dir', array(
126
- 'path' => $this->upload_path . $subdir,
127
- 'url' => $this->url . $subdir,
128
- 'subdir' => $subdir,
129
- 'basedir' => $this->upload_path,
130
- 'baseurl' => $this->url,
131
- 'error' => false
132
- ), $upload_dir );
133
- }
134
-
135
- /**
136
- * Adjust the cover image to fit with advised width & height.
137
- *
138
- * @since 2.4.0
139
- *
140
- * @param string $file The absolute path to the file.
141
- * @param array $dimensions Array of dimensions for the cover image.
142
- * @return mixed
143
- */
144
- public function fit( $file = '', $dimensions = array() ) {
145
- if ( empty( $dimensions['width'] ) || empty( $dimensions['height'] ) ) {
146
- return false;
147
- }
148
-
149
- // Get image size.
150
- $cover_data = parent::get_image_data( $file );
151
-
152
- // Init the edit args.
153
- $edit_args = array();
154
-
155
- // Do we need to resize the image?
156
- if ( ( isset( $cover_data['width'] ) && $cover_data['width'] > $dimensions['width'] ) ||
157
- ( isset( $cover_data['height'] ) && $cover_data['height'] > $dimensions['height'] ) ) {
158
- $edit_args = array(
159
- 'max_w' => $dimensions['width'],
160
- 'max_h' => $dimensions['height'],
161
- 'crop' => true,
162
- );
163
- }
164
-
165
- // Do we need to rotate the image?
166
- $angles = array(
167
- 3 => 180,
168
- 6 => -90,
169
- 8 => 90,
170
- );
171
-
172
- if ( isset( $cover_data['meta']['orientation'] ) && isset( $angles[ $cover_data['meta']['orientation'] ] ) ) {
173
- $edit_args['rotate'] = $angles[ $cover_data['meta']['orientation'] ];
174
- }
175
-
176
- // No need to edit the avatar, original file will be used.
177
- if ( empty( $edit_args ) ) {
178
- return false;
179
-
180
- // Add the file to the edit arguments.
181
- } else {
182
- $edit_args = array_merge( $edit_args, array( 'file' => $file, 'save' => false ) );
183
- }
184
-
185
- // Get the editor so that we can use a specific save method.
186
- $editor = parent::edit_image( 'cover_image', $edit_args );
187
-
188
- if ( is_wp_error( $editor ) ) {
189
- return $editor;
190
- } elseif ( ! is_a( $editor, 'WP_Image_Editor' ) ) {
191
- return false;
192
- }
193
-
194
- // Save the new image file.
195
- return $editor->save( $this->generate_filename( $file ) );
196
- }
197
-
198
- /**
199
- * Generate a filename for the cover image.
200
- *
201
- * @since 2.4.0
202
- *
203
- * @param string $file The absolute path to the file.
204
- * @return string $value The absolute path to the new file name.
205
- */
206
- public function generate_filename( $file = '' ) {
207
- if ( empty( $file ) || ! file_exists( $file ) ) {
208
- return false;
209
- }
210
-
211
- $info = pathinfo( $file );
212
- $ext = strtolower( $info['extension'] );
213
- $name = wp_unique_filename( $info['dirname'], uniqid() . "-bp-cover-image.$ext" );
214
-
215
- return trailingslashit( $info['dirname'] ) . $name;
216
- }
217
-
218
- /**
219
- * Build script datas for the Uploader UI.
220
- *
221
- * @since 2.4.0
222
- *
223
- * @return array The javascript localization data
224
- */
225
- public function script_data() {
226
- // Get default script data.
227
- $script_data = parent::script_data();
228
-
229
- if ( bp_is_user() ) {
230
- $item_id = bp_displayed_user_id();
231
-
232
- $script_data['bp_params'] = array(
233
- 'object' => 'user',
234
- 'item_id' => $item_id,
235
- 'has_cover_image' => bp_attachments_get_user_has_cover_image( $item_id ),
236
- 'nonces' => array(
237
- 'remove' => wp_create_nonce( 'bp_delete_cover_image' ),
238
- ),
239
- );
240
-
241
- // Set feedback messages.
242
- $script_data['feedback_messages'] = array(
243
- 1 => __( 'Your new cover image was uploaded successfully.', 'buddypress' ),
244
- 2 => __( 'There was a problem deleting your cover image. Please try again.', 'buddypress' ),
245
- 3 => __( 'Your cover image was deleted successfully!', 'buddypress' ),
246
- );
247
- } elseif ( bp_is_group() ) {
248
- $item_id = bp_get_current_group_id();
249
-
250
- $script_data['bp_params'] = array(
251
- 'object' => 'group',
252
- 'item_id' => bp_get_current_group_id(),
253
- 'has_cover_image' => bp_attachments_get_group_has_cover_image( $item_id ),
254
- 'nonces' => array(
255
- 'remove' => wp_create_nonce( 'bp_delete_cover_image' ),
256
- ),
257
- );
258
-
259
- // Set feedback messages.
260
- $script_data['feedback_messages'] = array(
261
- 1 => __( 'The group cover image was uploaded successfully.', 'buddypress' ),
262
- 2 => __( 'There was a problem deleting the group cover image. Please try again.', 'buddypress' ),
263
- 3 => __( 'The group cover image was deleted successfully!', 'buddypress' ),
264
- );
265
- } else {
266
-
267
- /**
268
- * Filters the cover image params to include specific BuddyPress params for your object.
269
- * e.g. Cover image for blogs single item.
270
- *
271
- * @since 2.4.0
272
- *
273
- * @param array $value The cover image specific BuddyPress parameters.
274
- */
275
- $script_data['bp_params'] = apply_filters( 'bp_attachment_cover_image_params', array() );
276
- }
277
-
278
- // Include our specific js & css.
279
- $script_data['extra_js'] = array( 'bp-cover-image' );
280
- $script_data['extra_css'] = array( 'bp-avatar' );
281
-
282
- /**
283
- * Filters the cover image script data.
284
- *
285
- * @since 2.4.0
286
- *
287
- * @param array $script_data Array of data for the cover image.
288
- */
289
- return apply_filters( 'bp_attachments_cover_image_script_data', $script_data );
290
- }
291
- }
1
+ <?php
2
+ /**
3
+ * Core Cover Image attachment class.
4
+ *
5
+ * @package BuddyPress
6
+ * @subpackage Core
7
+ * @since 2.4.0
8
+ */
9
+
10
+ // Exit if accessed directly.
11
+ defined( 'ABSPATH' ) || exit;
12
+
13
+ /**
14
+ * BP Attachment Cover Image class.
15
+ *
16
+ * Extends BP Attachment to manage the cover images uploads.
17
+ *
18
+ * @since 2.4.0
19
+ */
20
+ class BP_Attachment_Cover_Image extends BP_Attachment {
21
+ /**
22
+ * The constuctor.
23
+ *
24
+ * @since 2.4.0
25
+ */
26
+ public function __construct() {
27
+ // Allowed cover image types & upload size.
28
+ $allowed_types = bp_attachments_get_allowed_types( 'cover_image' );
29
+ $max_upload_file_size = bp_attachments_get_max_upload_file_size( 'cover_image' );
30
+
31
+ parent::__construct( array(
32
+ 'action' => 'bp_cover_image_upload',
33
+ 'file_input' => 'file',
34
+ 'original_max_filesize' => $max_upload_file_size,
35
+ 'base_dir' => bp_attachments_uploads_dir_get( 'dir' ),
36
+ 'required_wp_files' => array( 'file', 'image' ),
37
+
38
+ // Specific errors for cover images.
39
+ 'upload_error_strings' => array(
40
+ 11 => sprintf( __( 'That image is too big. Please upload one smaller than %s', 'buddypress' ), size_format( $max_upload_file_size ) ),
41
+ 12 => sprintf( _n( 'Please upload only this file type: %s.', 'Please upload only these file types: %s.', count( $allowed_types ), 'buddypress' ), self::get_cover_image_types( $allowed_types ) ),
42
+ ),
43
+ ) );
44
+ }
45
+
46
+ /**
47
+ * Gets the available cover image types.
48
+ *
49
+ * @since 2.4.0
50
+ *
51
+ * @param array $allowed_types Array of allowed cover image types.
52
+ * @return string $value Comma-separated list of allowed cover image types.
53
+ */
54
+ public static function get_cover_image_types( $allowed_types = array() ) {
55
+ $types = array_map( 'strtoupper', $allowed_types );
56
+ $comma = _x( ',', 'cover image types separator', 'buddypress' );
57
+ return join( $comma . ' ', $types );
58
+ }
59
+
60
+ /**
61
+ * Cover image specific rules.
62
+ *
63
+ * Adds an error if the cover image size or type don't match BuddyPress needs.
64
+ * The error code is the index of $upload_error_strings.
65
+ *
66
+ * @since 2.4.0
67
+ *
68
+ * @param array $file The temporary file attributes (before it has been moved).
69
+ * @return array $file The file with extra errors if needed.
70
+ */
71
+ public function validate_upload( $file = array() ) {
72
+ // Bail if already an error.
73
+ if ( ! empty( $file['error'] ) ) {
74
+ return $file;
75
+ }
76
+
77
+ // File size is too big.
78
+ if ( $file['size'] > $this->original_max_filesize ) {
79
+ $file['error'] = 11;
80
+
81
+ // File is of invalid type.
82
+ } elseif ( ! bp_attachments_check_filetype( $file['tmp_name'], $file['name'], bp_attachments_get_allowed_mimes( 'cover_image' ) ) ) {
83
+ $file['error'] = 12;
84
+ }
85
+
86
+ // Return with error code attached.
87
+ return $file;
88
+ }
89
+
90
+ /**
91
+ * Set the directory when uploading a file.
92
+ *
93
+ * @since 2.4.0
94
+ *
95
+ * @param array $upload_dir The original Uploads dir.
96
+ * @return array $value Upload data (path, url, basedir...).
97
+ */
98
+ public function upload_dir_filter( $upload_dir = array() ) {
99
+ // Default values are for profiles.
100
+ $object_id = bp_displayed_user_id();
101
+
102
+ if ( empty( $object_id ) ) {
103
+ $object_id = bp_loggedin_user_id();
104
+ }
105
+
106
+ $object_directory = 'members';
107
+
108
+ // We're in a group, edit default values.
109
+ if ( bp_is_group() || bp_is_group_create() ) {
110
+ $object_id = bp_get_current_group_id();
111
+ $object_directory = 'groups';
112
+ }
113
+
114
+ // Set the subdir.
115
+ $subdir = '/' . $object_directory . '/' . $object_id . '/cover-image';
116
+
117
+ /**
118
+ * Filters the cover image upload directory.
119
+ *
120
+ * @since 2.4.0
121
+ *
122
+ * @param array $value Array containing the path, URL, and other helpful settings.
123
+ * @param array $upload_dir The original Uploads dir.
124
+ */
125
+ return apply_filters( 'bp_attachments_cover_image_upload_dir', array(
126
+ 'path' => $this->upload_path . $subdir,
127
+ 'url' => $this->url . $subdir,
128
+ 'subdir' => $subdir,
129
+ 'basedir' => $this->upload_path,
130
+ 'baseurl' => $this->url,
131
+ 'error' => false
132
+ ), $upload_dir );
133
+ }
134
+
135
+ /**
136
+ * Adjust the cover image to fit with advised width & height.
137
+ *
138
+ * @since 2.4.0
139
+ *
140
+ * @param string $file The absolute path to the file.
141
+ * @param array $dimensions Array of dimensions for the cover image.
142
+ * @return mixed
143
+ */
144
+ public function fit( $file = '', $dimensions = array() ) {
145
+ if ( empty( $dimensions['width'] ) || empty( $dimensions['height'] ) ) {
146
+ return false;
147
+ }
148
+
149
+ // Get image size.
150
+ $cover_data = parent::get_image_data( $file );
151
+
152
+ // Init the edit args.
153
+ $edit_args = array();
154
+
155
+ // Do we need to resize the image?
156
+ if ( ( isset( $cover_data['width'] ) && $cover_data['width'] > $dimensions['width'] ) ||
157
+ ( isset( $cover_data['height'] ) && $cover_data['height'] > $dimensions['height'] ) ) {
158
+ $edit_args = array(
159
+ 'max_w' => $dimensions['width'],
160
+ 'max_h' => $dimensions['height'],
161
+ 'crop' => true,
162
+ );
163
+ }
164
+
165
+ // Do we need to rotate the image?
166
+ $angles = array(
167
+ 3 => 180,
168
+ 6 => -90,
169
+ 8 => 90,
170
+ );
171
+
172
+ if ( isset( $cover_data['meta']['orientation'] ) && isset( $angles[ $cover_data['meta']['orientation'] ] ) ) {
173
+ $edit_args['rotate'] = $angles[ $cover_data['meta']['orientation'] ];
174
+ }
175
+
176
+ // No need to edit the avatar, original file will be used.
177
+ if ( empty( $edit_args ) ) {
178
+ return false;
179
+
180
+ // Add the file to the edit arguments.
181
+ } else {
182
+ $edit_args = array_merge( $edit_args, array( 'file' => $file, 'save' => false ) );
183
+ }
184
+
185
+ // Get the editor so that we can use a specific save method.
186
+ $editor = parent::edit_image( 'cover_image', $edit_args );
187
+
188
+ if ( is_wp_error( $editor ) ) {
189
+ return $editor;
190
+ } elseif ( ! is_a( $editor, 'WP_Image_Editor' ) ) {
191
+ return false;
192
+ }
193
+
194
+ // Save the new image file.
195
+ return $editor->save( $this->generate_filename( $file ) );
196
+ }
197
+
198
+ /**
199
+ * Generate a filename for the cover image.
200
+ *
201
+ * @since 2.4.0
202
+ *
203
+ * @param string $file The absolute path to the file.
204
+ * @return string $value The absolute path to the new file name.
205
+ */
206
+ public function generate_filename( $file = '' ) {
207
+ if ( empty( $file ) || ! file_exists( $file ) ) {
208
+ return false;
209
+ }
210
+
211
+ $info = pathinfo( $file );
212
+ $ext = strtolower( $info['extension'] );
213
+ $name = wp_unique_filename( $info['dirname'], uniqid() . "-bp-cover-image.$ext" );
214
+
215
+ return trailingslashit( $info['dirname'] ) . $name;
216
+ }
217
+
218
+ /**
219
+ * Build script datas for the Uploader UI.
220
+ *
221
+ * @since 2.4.0
222
+ *
223
+ * @return array The javascript localization data
224
+ */
225
+ public function script_data() {
226
+ // Get default script data.
227
+ $script_data = parent::script_data();
228
+
229
+ if ( bp_is_user() ) {
230
+ $item_id = bp_displayed_user_id();
231
+
232
+ $script_data['bp_params'] = array(
233
+ 'object' => 'user',
234
+ 'item_id' => $item_id,
235
+ 'has_cover_image' => bp_attachments_get_user_has_cover_image( $item_id ),
236
+ 'nonces' => array(
237
+ 'remove' => wp_create_nonce( 'bp_delete_cover_image' ),
238
+ ),
239
+ );
240
+
241
+ // Set feedback messages.
242
+ $script_data['feedback_messages'] = array(
243
+ 1 => __( 'Your new cover image was uploaded successfully.', 'buddypress' ),
244
+ 2 => __( 'There was a problem deleting your cover image. Please try again.', 'buddypress' ),
245
+ 3 => __( 'Your cover image was deleted successfully!', 'buddypress' ),
246
+ );
247
+ } elseif ( bp_is_group() ) {
248
+ $item_id = bp_get_current_group_id();
249
+
250
+ $script_data['bp_params'] = array(
251
+ 'object' => 'group',
252
+ 'item_id' => bp_get_current_group_id(),
253
+ 'has_cover_image' => bp_attachments_get_group_has_cover_image( $item_id ),
254
+ 'nonces' => array(
255
+ 'remove' => wp_create_nonce( 'bp_delete_cover_image' ),
256
+ ),
257
+ );
258
+
259
+ // Set feedback messages.
260
+ $script_data['feedback_messages'] = array(
261
+ 1 => __( 'The group cover image was uploaded successfully.', 'buddypress' ),
262
+ 2 => __( 'There was a problem deleting the group cover image. Please try again.', 'buddypress' ),
263
+ 3 => __( 'The group cover image was deleted successfully!', 'buddypress' ),
264
+ );
265
+ } else {
266
+
267
+ /**
268
+ * Filters the cover image params to include specific BuddyPress params for your object.
269
+ * e.g. Cover image for blogs single item.
270
+ *
271
+ * @since 2.4.0
272
+ *
273
+ * @param array $value The cover image specific BuddyPress parameters.
274
+ */
275
+ $script_data['bp_params'] = apply_filters( 'bp_attachment_cover_image_params', array() );
276
+ }
277
+
278
+ // Include our specific js & css.
279
+ $script_data['extra_js'] = array( 'bp-cover-image' );
280
+ $script_data['extra_css'] = array( 'bp-avatar' );
281
+
282
+ /**
283
+ * Filters the cover image script data.
284
+ *
285
+ * @since 2.4.0
286
+ *
287
+ * @param array $script_data Array of data for the cover image.
288
+ */
289
+ return apply_filters( 'bp_attachments_cover_image_script_data', $script_data );
290
+ }
291
+ }
bp-core/css/admin-bar-rtl.css CHANGED
@@ -56,3 +56,16 @@
56
height: 64px;
57
width: 64px;
58
}
56
height: 64px;
57
width: 64px;
58
}
59
+
60
+ /* Remove additional arrows from appearing on the BuddyPress' `my_account_menu`
61
+ * on large screens. Add back arrows for screen widths 600px and lower.
62
+ */
63
+ #wpadminbar .wp-admin-bar-arrow-right {
64
+ display: none;
65
+ }
66
+
67
+ @media screen and (max-width: 600px) {
68
+ #wpadminbar .wp-admin-bar-arrow-right {
69
+ display: block;
70
+ }
71
+ }
bp-core/css/admin-bar-rtl.min.css CHANGED
@@ -1 +1 @@
1
- #wpadminbar .quicklinks li#wp-admin-bar-group-admin-with-avatar>a img,#wpadminbar .quicklinks li#wp-admin-bar-user-admin-with-avatar>a img{width:16px;height:16px;display:inline;border:1px solid #999;vertical-align:middle;margin:-2px -5px 0 10px;padding:0;background:#eee;float:none}#wpadminbar .quicklinks li#wp-admin-bar-group-admin-with-avatar ul,#wpadminbar .quicklinks li#wp-admin-bar-group-admin-with-avatar ul ul{right:0}#wpadminbar .quicklinks li#wp-admin-bar-bp-notifications #ab-pending-notifications,#wpadminbar .quicklinks li#wp-admin-bar-my-account a span.count,#wpadminbar .quicklinks li#wp-admin-bar-my-account-with-avatar a span.count{background:#21759B;color:#fff;text-shadow:none;display:inline;padding:2px 5px;font-size:10px;font-weight:700;-moz-border-radius:10px;-khtml-border-radius:10px;-webkit-border-radius:10px;border-radius:10px}#wpadminbar .quicklinks li#wp-admin-bar-bp-notifications #ab-pending-notifications{background:#ddd;color:#333;margin:0}#wpadminbar .quicklinks li#wp-admin-bar-bp-notifications #ab-pending-notifications.alert{background-color:#1fb3dd;color:#fff}#wpadminbar .quicklinks li#wp-admin-bar-bp-notifications>a{padding:0 .5em}#wp-admin-bar-user-info img.avatar{height:64px;width:64px}
1
+ #wpadminbar .quicklinks li#wp-admin-bar-group-admin-with-avatar>a img,#wpadminbar .quicklinks li#wp-admin-bar-user-admin-with-avatar>a img{width:16px;height:16px;display:inline;border:1px solid #999;vertical-align:middle;margin:-2px -5px 0 10px;padding:0;background:#eee;float:none}#wpadminbar .quicklinks li#wp-admin-bar-group-admin-with-avatar ul,#wpadminbar .quicklinks li#wp-admin-bar-group-admin-with-avatar ul ul{right:0}#wpadminbar .quicklinks li#wp-admin-bar-bp-notifications #ab-pending-notifications,#wpadminbar .quicklinks li#wp-admin-bar-my-account a span.count,#wpadminbar .quicklinks li#wp-admin-bar-my-account-with-avatar a span.count{background:#21759B;color:#fff;text-shadow:none;display:inline;padding:2px 5px;font-size:10px;font-weight:700;-moz-border-radius:10px;-khtml-border-radius:10px;-webkit-border-radius:10px;border-radius:10px}#wpadminbar .quicklinks li#wp-admin-bar-bp-notifications #ab-pending-notifications{background:#ddd;color:#333;margin:0}#wpadminbar .quicklinks li#wp-admin-bar-bp-notifications #ab-pending-notifications.alert{background-color:#1fb3dd;color:#fff}#wpadminbar .quicklinks li#wp-admin-bar-bp-notifications>a{padding:0 .5em}#wp-admin-bar-user-info img.avatar{height:64px;width:64px}#wpadminbar .wp-admin-bar-arrow-right{display:none}@media screen and (max-width:600px){#wpadminbar .wp-admin-bar-arrow-right{display:block}}
bp-core/css/admin-bar.css CHANGED
@@ -56,3 +56,16 @@
56
height: 64px;
57
width: 64px;
58
}
56
height: 64px;
57
width: 64px;
58
}
59
+
60
+ /* Remove additional arrows from appearing on the BuddyPress' `my_account_menu`
61
+ * on large screens. Add back arrows for screen widths 600px and lower.
62
+ */
63
+ #wpadminbar .wp-admin-bar-arrow-right {
64
+ display: none;
65
+ }
66
+
67
+ @media screen and (max-width: 600px) {
68
+ #wpadminbar .wp-admin-bar-arrow-right {
69
+ display: block;
70
+ }
71
+ }
bp-core/css/admin-bar.min.css CHANGED
@@ -1 +1 @@
1
- #wpadminbar .quicklinks li#wp-admin-bar-group-admin-with-avatar>a img,#wpadminbar .quicklinks li#wp-admin-bar-user-admin-with-avatar>a img{width:16px;height:16px;display:inline;border:1px solid #999;vertical-align:middle;margin:-2px 10px 0 -5px;padding:0;background:#eee;float:none}#wpadminbar .quicklinks li#wp-admin-bar-group-admin-with-avatar ul,#wpadminbar .quicklinks li#wp-admin-bar-group-admin-with-avatar ul ul{left:0}#wpadminbar .quicklinks li#wp-admin-bar-bp-notifications #ab-pending-notifications,#wpadminbar .quicklinks li#wp-admin-bar-my-account a span.count,#wpadminbar .quicklinks li#wp-admin-bar-my-account-with-avatar a span.count{background:#21759B;color:#fff;text-shadow:none;display:inline;padding:2px 5px;font-size:10px;font-weight:700;-moz-border-radius:10px;-khtml-border-radius:10px;-webkit-border-radius:10px;border-radius:10px}#wpadminbar .quicklinks li#wp-admin-bar-bp-notifications #ab-pending-notifications{background:#ddd;color:#333;margin:0}#wpadminbar .quicklinks li#wp-admin-bar-bp-notifications #ab-pending-notifications.alert{background-color:#1fb3dd;color:#fff}#wpadminbar .quicklinks li#wp-admin-bar-bp-notifications>a{padding:0 .5em}#wp-admin-bar-user-info img.avatar{height:64px;width:64px}
1
+ #wpadminbar .quicklinks li#wp-admin-bar-group-admin-with-avatar>a img,#wpadminbar .quicklinks li#wp-admin-bar-user-admin-with-avatar>a img{width:16px;height:16px;display:inline;border:1px solid #999;vertical-align:middle;margin:-2px 10px 0 -5px;padding:0;background:#eee;float:none}#wpadminbar .quicklinks li#wp-admin-bar-group-admin-with-avatar ul,#wpadminbar .quicklinks li#wp-admin-bar-group-admin-with-avatar ul ul{left:0}#wpadminbar .quicklinks li#wp-admin-bar-bp-notifications #ab-pending-notifications,#wpadminbar .quicklinks li#wp-admin-bar-my-account a span.count,#wpadminbar .quicklinks li#wp-admin-bar-my-account-with-avatar a span.count{background:#21759B;color:#fff;text-shadow:none;display:inline;padding:2px 5px;font-size:10px;font-weight:700;-moz-border-radius:10px;-khtml-border-radius:10px;-webkit-border-radius:10px;border-radius:10px}#wpadminbar .quicklinks li#wp-admin-bar-bp-notifications #ab-pending-notifications{background:#ddd;color:#333;margin:0}#wpadminbar .quicklinks li#wp-admin-bar-bp-notifications #ab-pending-notifications.alert{background-color:#1fb3dd;color:#fff}#wpadminbar .quicklinks li#wp-admin-bar-bp-notifications>a{padding:0 .5em}#wp-admin-bar-user-info img.avatar{height:64px;width:64px}#wpadminbar .wp-admin-bar-arrow-right{display:none}@media screen and (max-width:600px){#wpadminbar .wp-admin-bar-arrow-right{display:block}}
bp-core/js/cover-image.js CHANGED
@@ -1,277 +1,277 @@
1
- /* global bp, BP_Uploader, _, Backbone */
2
-
3
- window.bp = window.bp || {};
4
-
5
- ( function( exports, $ ) {
6
-
7
- // Bail if not set
8
- if ( typeof BP_Uploader === 'undefined' ) {
9
- return;
10
- }
11
-
12
- bp.Models = bp.Models || {};
13
- bp.Collections = bp.Collections || {};
14
- bp.Views = bp.Views || {};
15
-
16
- bp.CoverImage = {
17
- start: function() {
18
-
19
- // Init some vars
20
- this.views = new Backbone.Collection();
21
- this.warning = null;
22
-
23
- // The Cover Image Attachment object.
24
- this.Attachment = new Backbone.Model();
25
-
26
- // Set up views
27
- this.uploaderView();
28
-
29
- // Inform about the needed dimensions
30
- this.displayWarning( BP_Uploader.strings.cover_image_warnings.dimensions );
31
-
32
- // Set up the delete view if needed
33
- if ( true === BP_Uploader.settings.defaults.multipart_params.bp_params.has_cover_image ) {
34
- this.deleteView();
35
- }
36
- },
37
-
38
- uploaderView: function() {
39
- // Listen to the Queued uploads
40
- bp.Uploader.filesQueue.on( 'add', this.uploadProgress, this );
41
-
42
- // Create the BuddyPress Uploader
43
- var uploader = new bp.Views.Uploader();
44
-
45
- // Add it to views
46
- this.views.add( { id: 'upload', view: uploader } );
47
-
48
- // Display it
49
- uploader.inject( '.bp-cover-image' );
50
- },
51
-
52
- uploadProgress: function() {
53
- // Create the Uploader status view
54
- var coverImageUploadProgress = new bp.Views.coverImageUploadProgress( { collection: bp.Uploader.filesQueue } );
55
-
56
- if ( ! _.isUndefined( this.views.get( 'status' ) ) ) {
57
- this.views.set( { id: 'status', view: coverImageUploadProgress } );
58
- } else {
59
- this.views.add( { id: 'status', view: coverImageUploadProgress } );
60
- }
61
-
62
- // Display it
63
- coverImageUploadProgress.inject( '.bp-cover-image-status' );
64
- },
65
-
66
- deleteView: function() {
67
- // Create the delete model
68
- var delete_model = new Backbone.Model( _.pick( BP_Uploader.settings.defaults.multipart_params.bp_params,
69
- ['object', 'item_id', 'nonces']
70
- ) );
71
-
72
- // Do not add it if already there!
73
- if ( ! _.isUndefined( this.views.get( 'delete' ) ) ) {
74
- return;
75
- }
76
-
77
- // Create the delete view
78
- var deleteView = new bp.Views.DeleteCoverImage( { model: delete_model } );
79
-
80
- // Add it to views
81
- this.views.add( { id: 'delete', view: deleteView } );
82
-
83
- // Display it
84
- deleteView.inject( '.bp-cover-image-manage' );
85
- },
86
-
87
- deleteCoverImage: function( model ) {
88
- var self = this,
89
- deleteView;
90
-
91
- // Remove the delete view
92
- if ( ! _.isUndefined( this.views.get( 'delete' ) ) ) {
93
- deleteView = this.views.get( 'delete' );
94
- deleteView.get( 'view' ).remove();
95
- this.views.remove( { id: 'delete', view: deleteView } );
96
- }
97
-
98
- // Remove the cover image !
99
- bp.ajax.post( 'bp_cover_image_delete', {
100
- json: true,
101
- item_id: model.get( 'item_id' ),
102
- object: model.get( 'object' ),
103
- nonce: model.get( 'nonces' ).remove
104
- } ).done( function( response ) {
105
- var coverImageStatus = new bp.Views.CoverImageStatus( {
106
- value : BP_Uploader.strings.feedback_messages[ response.feedback_code ],
107
- type : 'success'
108
- } );
109
-
110
- self.views.add( {
111
- id : 'status',
112
- view : coverImageStatus
113
- } );
114
-
115
- coverImageStatus.inject( '.bp-cover-image-status' );
116
-
117
- // Reset the header of the page
118
- if ( '' === response.reset_url ) {
119
- $( '#header-cover-image' ).css( {
120
- 'background-image': 'none'
121
- } );
122
- } else {
123
- $( '#header-cover-image' ).css( {
124
- 'background-image': 'url( ' + response.reset_url + ' )'
125
- } );
126
- }
127
-
128
- // Reset the has_cover_image bp_param
129
- BP_Uploader.settings.defaults.multipart_params.bp_params.has_cover_image = false;
130
-
131
- /**
132
- * Reset the Attachment object
133
- *
134
- * You can run extra actions once the cover image is set using:
135
- * bp.CoverImage.Attachment.on( 'change:url', function( data ) { your code } );
136
- *
137
- * In this case data.attributes will include the default url for the
138
- * cover image (most of the time: ''), the object and the item_id concerned.
139
- */
140
- self.Attachment.set( _.extend(
141
- _.pick( model.attributes, ['object', 'item_id'] ),
142
- { url: response.reset_url, action: 'deleted' }
143
- ) );
144
-
145
- } ).fail( function( response ) {
146
- var feedback = BP_Uploader.strings.default_error;
147
- if ( ! _.isUndefined( response ) ) {
148
- feedback = BP_Uploader.strings.feedback_messages[ response.feedback_code ];
149
- }
150
-
151
- var coverImageStatus = new bp.Views.CoverImageStatus( {
152
- value : feedback,
153
- type : 'error'
154
- } );
155
-
156
- self.views.add( {
157
- id : 'status',
158
- view : coverImageStatus
159
- } );
160
-
161
- coverImageStatus.inject( '.bp-cover-image-status' );
162
-
163
- // Put back the delete view
164
- bp.CoverImage.deleteView();
165
- } );
166
- },
167
-
168
- removeWarning: function() {
169
- if ( ! _.isNull( this.warning ) ) {
170
- this.warning.remove();
171
- }
172
- },
173
-
174
- displayWarning: function( message ) {
175
- this.removeWarning();
176
-
177
- this.warning = new bp.Views.uploaderWarning( {
178
- value: message
179
- } );
180
-
181
- this.warning.inject( '.bp-cover-image-status' );
182
- }
183
- };
184
-
185
- // Custom Uploader Files view
186
- bp.Views.coverImageUploadProgress = bp.Views.uploaderStatus.extend( {
187
- className: 'files',
188
-
189
- initialize: function() {
190
- bp.Views.uploaderStatus.prototype.initialize.apply( this, arguments );
191
-
192
- this.collection.on( 'change:url', this.uploadResult, this );
193
- },
194
-
195
- uploadResult: function( model ) {
196
- var message, type;
197
-
198
- if ( ! _.isUndefined( model.get( 'url' ) ) ) {
199
-
200
- // Image is too small
201
- if ( 0 === model.get( 'feedback_code' ) ) {
202
- message = BP_Uploader.strings.cover_image_warnings.dimensions;
203
- type = 'warning';
204
-
205
- // Success, Rock n roll!
206
- } else {
207
- message = BP_Uploader.strings.feedback_messages[ model.get( 'feedback_code' ) ];
208
- type = 'success';
209
- }
210
-
211
- this.views.set( '.bp-uploader-progress', new bp.Views.CoverImageStatus( {
212
- value : message,
213
- type : type
214
- } ) );
215
-
216
- // Update the header of the page
217
- $( '#header-cover-image' ).css( {
218
- 'background-image': 'url( ' + model.get( 'url' ) + ' )'
219
- } );
220
-
221
- // Add the delete view
222
- bp.CoverImage.deleteView();
223
-
224
- /**
225
- * Set the Attachment object
226
- *
227
- * You can run extra actions once the cover image is set using:
228
- * bp.CoverImage.Attachment.on( 'change:url', function( data ) { your code } );
229
- *
230
- * In this case data.attributes will include the url to the newly
231
- * uploaded cover image, the object and the item_id concerned.
232
- */
233
- bp.CoverImage.Attachment.set( _.extend(
234
- _.pick( BP_Uploader.settings.defaults.multipart_params.bp_params, ['object', 'item_id'] ),
235
- { url: model.get( 'url' ), action: 'uploaded' }
236
- ) );
237
- }
238
- }
239
- } );
240
-
241
- // BuddyPress Cover Image Feedback view
242
- bp.Views.CoverImageStatus = bp.View.extend( {
243
- tagName: 'p',
244
- className: 'updated',
245
- id: 'bp-cover-image-feedback',
246
-
247
- initialize: function() {
248
- this.el.className += ' ' + this.options.type;
249
- this.value = this.options.value;
250
- },
251
-
252
- render: function() {
253
- this.$el.html( this.value );
254
- return this;
255
- }
256
- } );
257
-
258
- // BuddyPress Cover Image Delete view
259
- bp.Views.DeleteCoverImage = bp.View.extend( {
260
- tagName: 'div',
261
- id: 'bp-delete-cover-image-container',
262
- template: bp.template( 'bp-cover-image-delete' ),
263
-
264
- events: {
265
- 'click #bp-delete-cover-image': 'deleteCoverImage'
266
- },
267
-
268
- deleteCoverImage: function( event ) {
269
- event.preventDefault();
270
-
271
- bp.CoverImage.deleteCoverImage( this.model );
272
- }
273
- } );
274
-
275
- bp.CoverImage.start();
276
-
277
- })( bp, jQuery );
1
+ /* global bp, BP_Uploader, _, Backbone */
2
+
3
+ window.bp = window.bp || {};
4
+
5
+ ( function( exports, $ ) {
6
+
7
+ // Bail if not set
8
+ if ( typeof BP_Uploader === 'undefined' ) {
9
+ return;
10
+ }
11
+
12
+ bp.Models = bp.Models || {};
13
+ bp.Collections = bp.Collections || {};
14
+ bp.Views = bp.Views || {};
15
+
16
+ bp.CoverImage = {
17
+ start: function() {
18
+
19
+ // Init some vars
20
+ this.views = new Backbone.Collection();
21
+ this.warning = null;
22
+
23
+ // The Cover Image Attachment object.
24
+ this.Attachment = new Backbone.Model();
25
+
26
+ // Set up views
27
+ this.uploaderView();
28
+
29
+ // Inform about the needed dimensions
30
+ this.displayWarning( BP_Uploader.strings.cover_image_warnings.dimensions );
31
+
32
+ // Set up the delete view if needed
33
+ if ( true === BP_Uploader.settings.defaults.multipart_params.bp_params.has_cover_image ) {
34
+ this.deleteView();
35
+ }
36
+ },
37
+
38
+ uploaderView: function() {
39
+ // Listen to the Queued uploads
40
+ bp.Uploader.filesQueue.on( 'add', this.uploadProgress, this );
41
+
42
+ // Create the BuddyPress Uploader
43
+ var uploader = new bp.Views.Uploader();
44
+
45
+ // Add it to views
46
+ this.views.add( { id: 'upload', view: uploader } );
47
+
48
+ // Display it
49
+ uploader.inject( '.bp-cover-image' );
50
+ },
51
+
52
+ uploadProgress: function() {
53
+ // Create the Uploader status view
54
+ var coverImageUploadProgress = new bp.Views.coverImageUploadProgress( { collection: bp.Uploader.filesQueue } );
55
+
56
+ if ( ! _.isUndefined( this.views.get( 'status' ) ) ) {
57
+ this.views.set( { id: 'status', view: coverImageUploadProgress } );
58
+ } else {
59
+ this.views.add( { id: 'status', view: coverImageUploadProgress } );
60
+ }
61
+
62
+ // Display it
63
+ coverImageUploadProgress.inject( '.bp-cover-image-status' );
64
+ },
65
+
66
+ deleteView: function() {
67
+ // Create the delete model
68
+ var delete_model = new Backbone.Model( _.pick( BP_Uploader.settings.defaults.multipart_params.bp_params,
69
+ ['object', 'item_id', 'nonces']
70
+ ) );
71
+
72
+ // Do not add it if already there!
73
+ if ( ! _.isUndefined( this.views.get( 'delete' ) ) ) {
74
+ return;
75
+ }
76
+
77
+ // Create the delete view
78
+ var deleteView = new bp.Views.DeleteCoverImage( { model: delete_model } );
79
+
80
+ // Add it to views
81
+ this.views.add( { id: 'delete', view: deleteView } );
82
+
83
+ // Display it
84
+ deleteView.inject( '.bp-cover-image-manage' );
85
+ },
86
+
87
+ deleteCoverImage: function( model ) {
88
+ var self = this,
89
+ deleteView;
90
+
91
+ // Remove the delete view
92
+ if ( ! _.isUndefined( this.views.get( 'delete' ) ) ) {
93
+ deleteView = this.views.get( 'delete' );
94
+ deleteView.get( 'view' ).remove();
95
+ this.views.remove( { id: 'delete', view: deleteView } );
96
+ }
97
+
98
+ // Remove the cover image !
99
+ bp.ajax.post( 'bp_cover_image_delete', {
100
+ json: true,
101
+ item_id: model.get( 'item_id' ),
102
+ object: model.get( 'object' ),
103
+ nonce: model.get( 'nonces' ).remove
104
+ } ).done( function( response ) {
105
+ var coverImageStatus = new bp.Views.CoverImageStatus( {
106
+ value : BP_Uploader.strings.feedback_messages[ response.feedback_code ],
107
+ type : 'success'
108
+ } );
109
+
110
+ self.views.add( {
111
+ id : 'status',
112
+ view : coverImageStatus
113
+ } );
114
+
115
+ coverImageStatus.inject( '.bp-cover-image-status' );
116
+
117
+ // Reset the header of the page
118
+ if ( '' === response.reset_url ) {
119
+ $( '#header-cover-image' ).css( {
120
+ 'background-image': 'none'
121
+ } );
122
+ } else {
123
+ $( '#header-cover-image' ).css( {
124
+ 'background-image': 'url( ' + response.reset_url + ' )'
125
+ } );
126
+ }
127
+
128
+ // Reset the has_cover_image bp_param
129
+ BP_Uploader.settings.defaults.multipart_params.bp_params.has_cover_image = false;
130
+
131
+ /**
132
+ * Reset the Attachment object
133
+ *
134
+ * You can run extra actions once the cover image is set using:
135
+ * bp.CoverImage.Attachment.on( 'change:url', function( data ) { your code } );
136
+ *
137
+ * In this case data.attributes will include the default url for the
138
+ * cover image (most of the time: ''), the object and the item_id concerned.
139
+ */
140
+ self.Attachment.set( _.extend(
141
+ _.pick( model.attributes, ['object', 'item_id'] ),
142
+ { url: response.reset_url, action: 'deleted' }
143
+ ) );
144
+
145
+ } ).fail( function( response ) {
146
+ var feedback = BP_Uploader.strings.default_error;
147
+ if ( ! _.isUndefined( response ) ) {
148
+ feedback = BP_Uploader.strings.feedback_messages[ response.feedback_code ];
149
+ }
150
+
151
+ var coverImageStatus = new bp.Views.CoverImageStatus( {
152
+ value : feedback,
153
+ type : 'error'
154
+ } );
155
+
156
+ self.views.add( {
157
+ id : 'status',
158
+ view : coverImageStatus
159
+ } );
160
+
161
+ coverImageStatus.inject( '.bp-cover-image-status' );
162
+
163
+ // Put back the delete view
164
+ bp.CoverImage.deleteView();
165
+ } );
166
+ },
167
+
168
+ removeWarning: function() {
169
+ if ( ! _.isNull( this.warning ) ) {
170
+ this.warning.remove();
171
+ }
172
+ },
173
+
174
+ displayWarning: function( message ) {
175
+ this.removeWarning();
176
+
177
+ this.warning = new bp.Views.uploaderWarning( {
178
+ value: message
179
+ } );
180
+
181
+ this.warning.inject( '.bp-cover-image-status' );
182
+ }
183
+ };
184
+
185
+ // Custom Uploader Files view
186
+ bp.Views.coverImageUploadProgress = bp.Views.uploaderStatus.extend( {
187
+ className: 'files',
188
+
189
+ initialize: function() {
190
+ bp.Views.uploaderStatus.prototype.initialize.apply( this, arguments );
191
+
192
+ this.collection.on( 'change:url', this.uploadResult, this );
193
+ },
194
+
195
+ uploadResult: function( model ) {
196
+ var message, type;
197
+
198
+ if ( ! _.isUndefined( model.get( 'url' ) ) ) {
199
+
200
+ // Image is too small
201
+ if ( 0 === model.get( 'feedback_code' ) ) {
202
+ message = BP_Uploader.strings.cover_image_warnings.dimensions;
203
+ type = 'warning';
204
+
205
+ // Success, Rock n roll!
206
+ } else {
207
+ message = BP_Uploader.strings.feedback_messages[ model.get( 'feedback_code' ) ];
208
+ type = 'success';
209
+ }
210
+
211
+ this.views.set( '.bp-uploader-progress', new bp.Views.CoverImageStatus( {
212
+ value : message,
213
+ type : type
214
+ } ) );
215
+
216
+ // Update the header of the page
217
+ $( '#header-cover-image' ).css( {
218
+ 'background-image': 'url( ' + model.get( 'url' ) + ' )'
219
+ } );
220
+
221
+ // Add the delete view
222
+ bp.CoverImage.deleteView();
223
+
224
+ /**
225
+ * Set the Attachment object
226
+ *
227
+ * You can run extra actions once the cover image is set using:
228
+ * bp.CoverImage.Attachment.on( 'change:url', function( data ) { your code } );
229
+ *
230
+ * In this case data.attributes will include the url to the newly
231
+ * uploaded cover image, the object and the item_id concerned.
232
+ */
233
+ bp.CoverImage.Attachment.set( _.extend(
234
+ _.pick( BP_Uploader.settings.defaults.multipart_params.bp_params, ['object', 'item_id'] ),
235
+ { url: model.get( 'url' ), action: 'uploaded' }
236
+ ) );
237
+ }
238
+ }
239
+ } );
240
+
241
+ // BuddyPress Cover Image Feedback view
242
+ bp.Views.CoverImageStatus = bp.View.extend( {
243
+ tagName: 'p',
244
+ className: 'updated',
245
+ id: 'bp-cover-image-feedback',
246
+
247
+ initialize: function() {
248
+ this.el.className += ' ' + this.options.type;
249
+ this.value = this.options.value;
250
+ },
251
+
252
+ render: function() {
253
+ this.$el.html( this.value );
254
+ return this;
255
+ }
256
+ } );
257
+
258
+ // BuddyPress Cover Image Delete view
259
+ bp.Views.DeleteCoverImage = bp.View.extend( {
260
+ tagName: 'div',
261
+ id: 'bp-delete-cover-image-container',
262
+ template: bp.template( 'bp-cover-image-delete' ),
263
+
264
+ events: {
265
+ 'click #bp-delete-cover-image': 'deleteCoverImage'
266
+ },
267
+
268
+ deleteCoverImage: function( event ) {
269
+ event.preventDefault();
270
+
271
+ bp.CoverImage.deleteCoverImage( this.model );
272
+ }
273
+ } );
274
+
275
+ bp.CoverImage.start();
276
+
277
+ })( bp, jQuery );
bp-groups/bp-groups-functions.php CHANGED
@@ -43,9 +43,18 @@ function bp_groups_has_directory() {
43
* @return BP_Groups_Group $group The group object.
44
*/
45
function groups_get_group( $group_id ) {
46
- // Backward compatibilty.
47
- if ( is_array( $group_id ) && isset( $group_id['group_id'] ) ) {
48
- $group_id = $group_id['group_id'];
49
}
50
51
$group = new BP_Groups_Group( $group_id );
43
* @return BP_Groups_Group $group The group object.
44
*/
45
function groups_get_group( $group_id ) {
46
+ /*
47
+ * Backward compatibilty.
48
+ * Old-style arguments take the form of an array or a query string.
49
+ */
50
+ if ( ! is_numeric( $group_id ) ) {
51
+ $r = wp_parse_args( $group_id, array(
52
+ 'group_id' => false,
53
+ 'load_users' => false,
54
+ 'populate_extras' => false,
55
+ ) );
56
+
57
+ $group_id = $r['group_id'];
58
}
59
60
$group = new BP_Groups_Group( $group_id );
bp-loader.php CHANGED
@@ -15,7 +15,7 @@
15
* Description: BuddyPress helps site builders and WordPress developers add community features to their websites, with user profile fields, activity streams, messaging, and notifications.
16
* Author: The BuddyPress Community
17
* Author URI: https://buddypress.org/
18
- * Version: 2.7.0
19
* Text Domain: buddypress
20
* Domain Path: /bp-languages/
21
* License: GPLv2 or later (license.txt)
@@ -308,7 +308,7 @@ class BuddyPress {
308
309
// Whether to refrain from loading deprecated functions
310
if ( ! defined( 'BP_IGNORE_DEPRECATED' ) ) {
311
- define( 'BP_IGNORE_DEPRECATED', true );
312
}
313
314
// The search slug has to be defined nice and early because of the way
@@ -330,7 +330,7 @@ class BuddyPress {
330
331
/** Versions **********************************************************/
332
333
- $this->version = '2.7.0';
334
$this->db_version = 11105;
335
336
/** Loading ***********************************************************/
@@ -339,7 +339,6 @@ class BuddyPress {
339
* Whether to load deprecated code or not.
340
*
341
* @since 2.0.0
342
- * @since 2.7.0 Defaults to false (do not load deprecated code) for new installs.
343
*
344
* @const constant BP_IGNORE_DEPRECATED Whether or not to ignore deprecated functionality.
345
*/
@@ -510,7 +509,7 @@ class BuddyPress {
510
}
511
512
// Skip or load deprecated content
513
- if ( $this->load_deprecated || ! bp_get_option( '_bp_ignore_deprecated_code' ) ) {
514
require( $this->plugin_dir . 'bp-core/deprecated/1.2.php' );
515
require( $this->plugin_dir . 'bp-core/deprecated/1.5.php' );
516
require( $this->plugin_dir . 'bp-core/deprecated/1.6.php' );
15
* Description: BuddyPress helps site builders and WordPress developers add community features to their websites, with user profile fields, activity streams, messaging, and notifications.
16
* Author: The BuddyPress Community
17
* Author URI: https://buddypress.org/
18
+ * Version: 2.7.2
19
* Text Domain: buddypress
20
* Domain Path: /bp-languages/
21
* License: GPLv2 or later (license.txt)
308
309
// Whether to refrain from loading deprecated functions
310
if ( ! defined( 'BP_IGNORE_DEPRECATED' ) ) {
311
+ define( 'BP_IGNORE_DEPRECATED', false );
312
}
313
314
// The search slug has to be defined nice and early because of the way
330
331
/** Versions **********************************************************/
332
333
+ $this->version = '2.7.2';
334
$this->db_version = 11105;
335
336
/** Loading ***********************************************************/
339
* Whether to load deprecated code or not.
340
*
341
* @since 2.0.0
342
*
343
* @const constant BP_IGNORE_DEPRECATED Whether or not to ignore deprecated functionality.
344
*/
509
}
510
511
// Skip or load deprecated content
512
+ if ( true === $this->load_deprecated ) {
513
require( $this->plugin_dir . 'bp-core/deprecated/1.2.php' );
514
require( $this->plugin_dir . 'bp-core/deprecated/1.5.php' );
515
require( $this->plugin_dir . 'bp-core/deprecated/1.6.php' );
bp-templates/bp-legacy/buddypress/assets/_attachments/cover-images/index.php CHANGED
@@ -1,36 +1,36 @@
1
- <?php
2
- /**
3
- * BuddyPress Cover Images main template.
4
- *
5
- * This template is used to inject the BuddyPress Backbone views
6
- * dealing with cover images.
7
- *
8
- * It's also used to create the common Backbone views.
9
- *
10
- * @since 2.4.0
11
- *
12
- * @package BuddyPress
13
- * @subpackage bp-attachments
14
- */
15
-
16
- ?>
17
-
18
- <div class="bp-cover-image"></div>
19
- <div class="bp-cover-image-status"></div>
20
- <div class="bp-cover-image-manage"></div>
21
-
22
- <?php bp_attachments_get_template_part( 'uploader' ); ?>
23
-
24
- <script id="tmpl-bp-cover-image-delete" type="text/html">
25
- <# if ( 'user' === data.object ) { #>
26
- <p><?php _e( "If you'd like to delete your current cover image but not upload a new one, please use the delete Cover Image button.", 'buddypress' ); ?></p>
27
- <p><a class="button edit" id="bp-delete-cover-image" href="#"><?php esc_html_e( 'Delete My Cover Image', 'buddypress' ); ?></a></p>
28
- <# } else if ( 'group' === data.object ) { #>
29
- <p><?php _e( "If you'd like to remove the existing group cover image but not upload a new one, please use the delete group cover image button.", 'buddypress' ); ?></p>
30
- <p><a class="button edit" id="bp-delete-cover-image" href="#"><?php esc_html_e( 'Delete Group Cover Image', 'buddypress' ); ?></a></p>
31
- <# } else { #>
32
- <?php do_action( 'bp_attachments_cover_image_delete_template' ); ?>
33
- <# } #>
34
- </script>
35
-
36
- <?php do_action( 'bp_attachments_cover_image_main_template' ); ?>
1
+ <?php
2
+ /**
3
+ * BuddyPress Cover Images main template.
4
+ *
5
+ * This template is used to inject the BuddyPress Backbone views
6
+ * dealing with cover images.
7
+ *
8
+ * It's also used to create the common Backbone views.
9
+ *
10
+ * @since 2.4.0
11
+ *
12
+ * @package BuddyPress
13
+ * @subpackage bp-attachments
14
+ */
15
+
16
+ ?>
17
+
18
+ <div class="bp-cover-image"></div>
19
+ <div class="bp-cover-image-status"></div>
20
+ <div class="bp-cover-image-manage"></div>
21
+
22
+ <?php bp_attachments_get_template_part( 'uploader' ); ?>
23
+
24
+ <script id="tmpl-bp-cover-image-delete" type="text/html">
25
+ <# if ( 'user' === data.object ) { #>
26
+ <p><?php _e( "If you'd like to delete your current cover image but not upload a new one, please use the delete Cover Image button.", 'buddypress' ); ?></p>
27
+ <p><a class="button edit" id="bp-delete-cover-image" href="#"><?php esc_html_e( 'Delete My Cover Image', 'buddypress' ); ?></a></p>
28
+ <# } else if ( 'group' === data.object ) { #>
29
+ <p><?php _e( "If you'd like to remove the existing group cover image but not upload a new one, please use the delete group cover image button.", 'buddypress' ); ?></p>
30
+ <p><a class="button edit" id="bp-delete-cover-image" href="#"><?php esc_html_e( 'Delete Group Cover Image', 'buddypress' ); ?></a></p>
31
+ <# } else { #>
32
+ <?php do_action( 'bp_attachments_cover_image_delete_template' ); ?>
33
+ <# } #>
34
+ </script>
35
+
36
+ <?php do_action( 'bp_attachments_cover_image_main_template' ); ?>
bp-templates/bp-legacy/buddypress/groups/single/admin/delete-group.php CHANGED
@@ -1,41 +1,41 @@
1
- <?php
2
- /**
3
- * BuddyPress - Groups Admin - Delete Group
4
- *
5
- * @package BuddyPress
6
- * @subpackage bp-legacy
7
- */
8
-
9
- ?>
10
-
11
- <h2 class="bp-screen-reader-text"><?php _e( 'Delete Group', 'buddypress' ); ?></h2>
12
-
13
- <?php
14
-
15
- /**
16
- * Fires before the display of group delete admin.
17
- *
18
- * @since 1.1.0
19
- */
20
- do_action( 'bp_before_group_delete_admin' ); ?>
21
-
22
- <div id="message" class="info">
23
- <p><?php _e( 'WARNING: Deleting this group will completely remove ALL content associated with it. There is no way back, please be careful with this option.', 'buddypress' ); ?></p>
24
- </div>
25
-
26
- <label for="delete-group-understand"><input type="checkbox" name="delete-group-understand" id="delete-group-understand" value="1" onclick="if(this.checked) { document.getElementById('delete-group-button').disabled = ''; } else { document.getElementById('delete-group-button').disabled = 'disabled'; }" /> <?php _e( 'I understand the consequences of deleting this group.', 'buddypress' ); ?></label>
27
-
28
- <?php
29
-
30
- /**
31
- * Fires after the display of group delete admin.
32
- *
33
- * @since 1.1.0
34
- */
35
- do_action( 'bp_after_group_delete_admin' ); ?>
36
-
37
- <div class="submit">
38
- <input type="submit" disabled="disabled" value="<?php esc_attr_e( 'Delete Group', 'buddypress' ); ?>" id="delete-group-button" name="delete-group-button" />
39
- </div>
40
-
41
- <?php wp_nonce_field( 'groups_delete_group' ); ?>
1
+ <?php
2
+ /**
3
+ * BuddyPress - Groups Admin - Delete Group
4
+ *
5
+ * @package BuddyPress
6
+ * @subpackage bp-legacy
7
+ */
8
+
9
+ ?>
10
+
11
+ <h2 class="bp-screen-reader-text"><?php _e( 'Delete Group', 'buddypress' ); ?></h2>
12
+
13
+ <?php
14
+
15
+ /**
16
+ * Fires before the display of group delete admin.
17
+ *
18
+ * @since 1.1.0
19
+ */
20
+ do_action( 'bp_before_group_delete_admin' ); ?>
21
+
22
+ <div id="message" class="info">
23
+ <p><?php _e( 'WARNING: Deleting this group will completely remove ALL content associated with it. There is no way back, please be careful with this option.', 'buddypress' ); ?></p>
24
+ </div>
25
+
26
+ <label for="delete-group-understand"><input type="checkbox" name="delete-group-understand" id="delete-group-understand" value="1" onclick="if(this.checked) { document.getElementById('delete-group-button').disabled = ''; } else { document.getElementById('delete-group-button').disabled = 'disabled'; }" /> <?php _e( 'I understand the consequences of deleting this group.', 'buddypress' ); ?></label>
27
+
28
+ <?php
29
+
30
+ /**
31
+ * Fires after the display of group delete admin.
32
+ *
33
+ * @since 1.1.0
34
+ */
35
+ do_action( 'bp_after_group_delete_admin' ); ?>
36
+
37
+ <div class="submit">
38
+ <input type="submit" disabled="disabled" value="<?php esc_attr_e( 'Delete Group', 'buddypress' ); ?>" id="delete-group-button" name="delete-group-button" />
39
+ </div>
40
+
41
+ <?php wp_nonce_field( 'groups_delete_group' ); ?>
bp-templates/bp-legacy/buddypress/groups/single/admin/edit-details.php CHANGED
@@ -1,53 +1,53 @@
1
- <?php
2
- /**
3
- * BuddyPress - Groups Admin - Edit Details
4
- *
5
- * @package BuddyPress
6
- * @subpackage bp-legacy
7
- */
8
-
9
- ?>
10
-
11
- <h2 class="bp-screen-reader-text"><?php _e( 'Manage Group Details', 'buddypress' ); ?></h2>
12
-
13
- <?php
14
-
15
- /**
16
- * Fires before the display of group admin details.
17
- *
18
- * @since 1.1.0
19
- */
20
- do_action( 'bp_before_group_details_admin' ); ?>
21
-
22
- <label for="group-name"><?php _e( 'Group Name (required)', 'buddypress' ); ?></label>
23
- <input type="text" name="group-name" id="group-name" value="<?php bp_group_name(); ?>" aria-required="true" />
24
-
25
- <label for="group-desc"><?php _e( 'Group Description (required)', 'buddypress' ); ?></label>
26
- <textarea name="group-desc" id="group-desc" aria-required="true"><?php bp_group_description_editable(); ?></textarea>
27
-
28
- <?php
29
-
30
- /**
31
- * Fires after the group description admin details.
32
- *
33
- * @since 1.0.0
34
- */
35
- do_action( 'groups_custom_group_fields_editable' ); ?>
36
-
37
- <p>
38
- <label for="group-notify-members">
39
- <input type="checkbox" name="group-notify-members" id="group-notify-members" value="1" /> <?php _e( 'Notify group members of these changes via email', 'buddypress' ); ?>
40
- </label>
41
- </p>
42
-
43
- <?php
44
-
45
- /**
46
- * Fires after the display of group admin details.
47
- *
48
- * @since 1.1.0
49
- */
50
- do_action( 'bp_after_group_details_admin' ); ?>
51
-
52
- <p><input type="submit" value="<?php esc_attr_e( 'Save Changes', 'buddypress' ); ?>" id="save" name="save" /></p>
53
- <?php wp_nonce_field( 'groups_edit_group_details' ); ?>
1
+ <?php
2
+ /**
3
+ * BuddyPress - Groups Admin - Edit Details
4
+ *
5
+ * @package BuddyPress
6
+ * @subpackage bp-legacy
7
+ */
8
+
9
+ ?>
10
+
11
+ <h2 class="bp-screen-reader-text"><?php _e( 'Manage Group Details', 'buddypress' ); ?></h2>
12
+
13
+ <?php
14
+
15
+ /**
16
+ * Fires before the display of group admin details.
17
+ *
18
+ * @since 1.1.0
19
+ */
20
+ do_action( 'bp_before_group_details_admin' ); ?>
21
+
22
+ <label for="group-name"><?php _e( 'Group Name (required)', 'buddypress' ); ?></label>
23
+ <input type="text" name="group-name" id="group-name" value="<?php bp_group_name(); ?>" aria-required="true" />
24
+
25
+ <label for="group-desc"><?php _e( 'Group Description (required)', 'buddypress' ); ?></label>
26
+ <textarea name="group-desc" id="group-desc" aria-required="true"><?php bp_group_description_editable(); ?></textarea>
27
+
28
+ <?php
29
+
30
+ /**
31
+ * Fires after the group description admin details.
32
+ *
33
+ * @since 1.0.0
34
+ */
35
+ do_action( 'groups_custom_group_fields_editable' ); ?>
36
+
37
+ <p>
38
+ <label for="group-notify-members">
39
+ <input type="checkbox" name="group-notify-members" id="group-notify-members" value="1" /> <?php _e( 'Notify group members of these changes via email', 'buddypress' ); ?>
40
+ </label>
41
+ </p>
42
+
43
+ <?php
44
+
45
+ /**
46
+ * Fires after the display of group admin details.
47
+ *
48
+ * @since 1.1.0
49
+ */
50
+ do_action( 'bp_after_group_details_admin' ); ?>
51
+
52
+ <p><input type="submit" value="<?php esc_attr_e( 'Save Changes', 'buddypress' ); ?>" id="save" name="save" /></p>
53
+ <?php wp_nonce_field( 'groups_edit_group_details' ); ?>
bp-templates/bp-legacy/buddypress/groups/single/admin/group-avatar.php CHANGED
@@ -1,67 +1,67 @@
1
- <?php
2
- /**
3
- * BuddyPress - Groups Admin - Group Avatar
4
- *
5
- * @package BuddyPress
6
- * @subpackage bp-legacy
7
- */
8
-
9
- ?>
10
-
11
- <h2 class="bp-screen-reader-text"><?php _e( 'Group Avatar', 'buddypress' ); ?></h2>
12
-
13
- <?php if ( 'upload-image' == bp_get_avatar_admin_step() ) : ?>
14
-
15
- <p><?php _e("Upload an image to use as a profile photo for this group. The image will be shown on the main group page, and in search results.", 'buddypress' ); ?></p>
16
-
17
- <p>
18
- <label for="file" class="bp-screen-reader-text"><?php
19
- /* translators: accessibility text */
20
- _e( 'Select an image', 'buddypress' );
21
- ?></label>
22
- <input type="file" name="file" id="file" />
23
- <input type="submit" name="upload" id="upload" value="<?php esc_attr_e( 'Upload Image', 'buddypress' ); ?>" />
24
- <input type="hidden" name="action" id="action" value="bp_avatar_upload" />
25
- </p>
26
-
27
- <?php if ( bp_get_group_has_avatar() ) : ?>
28
-
29
- <p><?php _e( "If you'd like to remove the existing group profile photo but not upload a new one, please use the delete group profile photo button.", 'buddypress' ); ?></p>
30
-
31
- <?php bp_button( array( 'id' => 'delete_group_avatar', 'component' => 'groups', 'wrapper_id' => 'delete-group-avatar-button', 'link_class' => 'edit', 'link_href' => bp_get_group_avatar_delete_link(), 'link_text' => __( 'Delete Group Profile Photo', 'buddypress' ) ) ); ?>
32
-
33
- <?php endif; ?>
34
-
35
- <?php
36
- /**
37
- * Load the Avatar UI templates
38
- *
39
- * @since 2.3.0
40
- */
41
- bp_avatar_get_templates(); ?>
42
-
43
- <?php wp_nonce_field( 'bp_avatar_upload' ); ?>
44
-
45
- <?php endif; ?>
46
-
47
- <?php if ( 'crop-image' == bp_get_avatar_admin_step() ) : ?>
48
-
49
- <h4><?php _e( 'Crop Profile Photo', 'buddypress' ); ?></h4>
50
-
51
- <img src="<?php bp_avatar_to_crop(); ?>" id="avatar-to-crop" class="avatar" alt="<?php esc_attr_e( 'Profile photo to crop', 'buddypress' ); ?>" />
52
-
53
- <div id="avatar-crop-pane">
54
- <img src="<?php bp_avatar_to_crop(); ?>" id="avatar-crop-preview" class="avatar" alt="<?php esc_attr_e( 'Profile photo preview', 'buddypress' ); ?>" />
55
- </div>
56
-
57
- <input type="submit" name="avatar-crop-submit" id="avatar-crop-submit" value="<?php esc_attr_e( 'Crop Image', 'buddypress' ); ?>" />
58
-
59
- <input type="hidden" name="image_src" id="image_src" value="<?php bp_avatar_to_crop_src(); ?>" />
60
- <input type="hidden" id="x" name="x" />
61
- <input type="hidden" id="y" name="y" />
62
- <input type="hidden" id="w" name="w" />
63
- <input type="hidden" id="h" name="h" />
64
-
65
- <?php wp_nonce_field( 'bp_avatar_cropstore' ); ?>
66
-
67
- <?php endif; ?>
1
+ <?php
2
+ /**
3
+ * BuddyPress - Groups Admin - Group Avatar
4
+ *
5
+ * @package BuddyPress
6
+ * @subpackage bp-legacy
7
+ */
8
+
9
+ ?>
10
+
11
+ <h2 class="bp-screen-reader-text"><?php _e( 'Group Avatar', 'buddypress' ); ?></h2>
12
+
13
+ <?php if ( 'upload-image' == bp_get_avatar_admin_step() ) : ?>
14
+
15
+ <p><?php _e("Upload an image to use as a profile photo for this group. The image will be shown on the main group page, and in search results.", 'buddypress' ); ?></p>
16
+
17
+ <p>
18
+ <label for="file" class="bp-screen-reader-text"><?php
19
+ /* translators: accessibility text */
20
+ _e( 'Select an image', 'buddypress' );
21
+ ?></label>
22
+ <input type="file" name="file" id="file" />
23
+ <input type="submit" name="upload" id="upload" value="<?php esc_attr_e( 'Upload Image', 'buddypress' ); ?>" />
24
+ <input type="hidden" name="action" id="action" value="bp_avatar_upload" />
25
+ </p>
26
+
27
+ <?php if ( bp_get_group_has_avatar() ) : ?>
28
+
29
+ <p><?php _e( "If you'd like to remove the existing group profile photo but not upload a new one, please use the delete group profile photo button.", 'buddypress' ); ?></p>
30
+
31
+ <?php bp_button( array( 'id' => 'delete_group_avatar', 'component' => 'groups', 'wrapper_id' => 'delete-group-avatar-button', 'link_class' => 'edit', 'link_href' => bp_get_group_avatar_delete_link(), 'link_text' => __( 'Delete Group Profile Photo', 'buddypress' ) ) ); ?>
32
+
33
+ <?php endif; ?>
34
+
35
+ <?php
36
+ /**
37
+ * Load the Avatar UI templates
38
+ *
39
+ * @since 2.3.0
40
+ */
41
+ bp_avatar_get_templates(); ?>
42
+
43
+ <?php wp_nonce_field( 'bp_avatar_upload' ); ?>
44
+
45
+ <?php endif; ?>
46
+
47
+ <?php if ( 'crop-image' == bp_get_avatar_admin_step() ) : ?>
48
+
49
+ <h4><?php _e( 'Crop Profile Photo', 'buddypress' ); ?></h4>
50
+
51
+ <img src="<?php bp_avatar_to_crop(); ?>" id="avatar-to-crop" class="avatar" alt="<?php esc_attr_e( 'Profile photo to crop', 'buddypress' ); ?>" />
52
+
53
+ <div id="avatar-crop-pane">
54
+ <img src="<?php bp_avatar_to_crop(); ?>" id="avatar-crop-preview" class="avatar" alt="<?php esc_attr_e( 'Profile photo preview', 'buddypress' ); ?>" />
55
+ </div>
56
+
57
+ <input type="submit" name="avatar-crop-submit" id="avatar-crop-submit" value="<?php esc_attr_e( 'Crop Image', 'buddypress' ); ?>" />
58
+
59
+ <input type="hidden" name="image_src" id="image_src" value="<?php bp_avatar_to_crop_src(); ?>" />
60
+ <input type="hidden" id="x" name="x" />
61
+ <input type="hidden" id="y" name="y" />
62
+ <input type="hidden" id="w" name="w" />
63
+ <input type="hidden" id="h" name="h" />
64
+
65
+ <?php wp_nonce_field( 'bp_avatar_cropstore' ); ?>
66
+
67
+ <?php endif; ?>
bp-templates/bp-legacy/buddypress/groups/single/admin/group-cover-image.php CHANGED
@@ -1,33 +1,33 @@
1
- <?php
2
- /**
3
- * BuddyPress - Groups Admin - Group Cover Image Settings
4
- *
5
- * @package BuddyPress
6
- * @subpackage bp-legacy
7
- */
8
-
9
- ?>
10
-
11
- <h2><?php _e( 'Cover Image', 'buddypress' ); ?></h2>
12
-
13
- <?php
14
-
15
- /**
16
- * Fires before the display of profile cover image upload content.
17
- *
18
- * @since 2.4.0
19
- */
20
- do_action( 'bp_before_group_settings_cover_image' ); ?>
21
-
22
- <p><?php _e( 'The Cover Image will be used to customize the header of your group.', 'buddypress' ); ?></p>
23
-
24
- <?php bp_attachments_get_template_part( 'cover-images/index' ); ?>
25
-
26
- <?php
27
-
28
- /**
29
- * Fires after the display of group cover image upload content.
30
- *
31
- * @since 2.4.0
32
- */
33
- do_action( 'bp_after_group_settings_cover_image' ); ?>
1
+ <?php
2
+ /**
3
+ * BuddyPress - Groups Admin - Group Cover Image Settings
4
+ *
5
+ * @package BuddyPress
6
+ * @subpackage bp-legacy
7
+ */
8
+
9
+ ?>
10
+
11
+ <h2><?php _e( 'Cover Image', 'buddypress' ); ?></h2>
12
+
13
+ <?php
14
+
15
+ /**
16
+ * Fires before the display of profile cover image upload content.
17
+ *
18
+ * @since 2.4.0
19
+ */
20
+ do_action( 'bp_before_group_settings_cover_image' ); ?>
21
+
22
+ <p><?php _e( 'The Cover Image will be used to customize the header of your group.', 'buddypress' ); ?></p>
23
+
24
+ <?php bp_attachments_get_template_part( 'cover-images/index' ); ?>
25
+
26
+ <?php
27
+
28
+ /**
29
+ * Fires after the display of group cover image upload content.
30
+ *
31
+ * @since 2.4.0
32
+ */
33
+ do_action( 'bp_after_group_settings_cover_image' ); ?>
bp-templates/bp-legacy/buddypress/groups/single/admin/group-settings.php CHANGED
@@ -1,124 +1,124 @@
1
- <?php
2
- /**
3
- * BuddyPress - Groups Admin - Group Settings
4
- *
5
- * @package BuddyPress
6
- * @subpackage bp-legacy
7
- */
8
-
9
- ?>
10
-
11
- <h2 class="bp-screen-reader-text"><?php _e( 'Manage Group Settings', 'buddypress' ); ?></h2>
12
-
13
- <?php
14
-
15
- /**
16
- * Fires before the group settings admin display.
17
- *
18
- * @since 1.1.0
19
- */
20
- do_action( 'bp_before_group_settings_admin' ); ?>
21
-
22
- <?php if ( bp_is_active( 'forums' ) ) : ?>
23
-
24
- <?php if ( bp_forums_is_installed_correctly() ) : ?>
25
-
26
- <div class="checkbox">
27
- <label for="group-show-forum"><input type="checkbox" name="group-show-forum" id="group-show-forum" value="1"<?php bp_group_show_forum_setting(); ?> /> <?php _e( 'Enable discussion forum', 'buddypress' ); ?></label>
28
- </div>
29
-
30
- <hr />
31
-
32
- <?php endif; ?>
33
-
34
- <?php endif; ?>
35
-
36
- <fieldset class="group-create-privacy">
37
-
38
- <legend><?php _e( 'Privacy Options', 'buddypress' ); ?></legend>
39
-
40
- <div class="radio">
41
-
42
- <label for="group-status-public"><input type="radio" name="group-status" id="group-status-public" value="public"<?php if ( 'public' == bp_get_new_group_status() || !bp_get_new_group_status() ) { ?> checked="checked"<?php } ?> aria-describedby="public-group-description" /> <?php _e( 'This is a public group', 'buddypress' ); ?></label>
43
-
44
- <ul id="public-group-description">
45
- <li><?php _e( 'Any site member can join this group.', 'buddypress' ); ?></li>
46
- <li><?php _e( 'This group will be listed in the groups directory and in search results.', 'buddypress' ); ?></li>
47
- <li><?php _e( 'Group content and activity will be visible to any site member.', 'buddypress' ); ?></li>
48
- </ul>
49
-
50
- <label for="group-status-private"><input type="radio" name="group-status" id="group-status-private" value="private"<?php if ( 'private' == bp_get_new_group_status() ) { ?> checked="checked"<?php } ?> aria-describedby="private-group-description" /> <?php _e( 'This is a private group', 'buddypress' ); ?></label>
51
-
52
- <ul id="private-group-description">
53
- <li><?php _e( 'Only users who request membership and are accepted can join the group.', 'buddypress' ); ?></li>
54
- <li><?php _e( 'This group will be listed in the groups directory and in search results.', 'buddypress' ); ?></li>
55
- <li><?php _e( 'Group content and activity will only be visible to members of the group.', 'buddypress' ); ?></li>
56
- </ul>
57
-
58
- <label for="group-status-hidden"><input type="radio" name="group-status" id="group-status-hidden" value="hidden"<?php if ( 'hidden' == bp_get_new_group_status() ) { ?> checked="checked"<?php } ?> aria-describedby="hidden-group-description" /> <?php _e('This is a hidden group', 'buddypress' ); ?></label>
59
-
60
- <ul id="hidden-group-description">
61
- <li><?php _e( 'Only users who are invited can join the group.', 'buddypress' ); ?></li>
62
- <li><?php _e( 'This group will not be listed in the groups directory or search results.', 'buddypress' ); ?></li>
63
- <li><?php _e( 'Group content and activity will only be visible to members of the group.', 'buddypress' ); ?></li>
64
- </ul>
65
-
66
- </div>
67
-
68
- </fieldset>
69
-
70
- <?php // Group type selection ?>
71
- <?php if ( $group_types = bp_groups_get_group_types( array( 'show_in_create_screen' => true ), 'objects' ) ): ?>
72
-
73
- <fieldset class="group-create-types">
74
- <legend><?php _e( 'Group Types', 'buddypress' ); ?></legend>
75
-
76
- <p><?php _e( 'Select the types this group should be a part of.', 'buddypress' ); ?></p>
77
-
78
- <?php foreach ( $group_types as $type ) : ?>
79
- <div class="checkbox">
80
- <label for="<?php printf( 'group-type-%s', $type->name ); ?>">
81
- <input type="checkbox" name="group-types[]" id="<?php printf( 'group-type-%s', $type->name ); ?>" value="<?php echo esc_attr( $type->name ); ?>" <?php checked( bp_groups_has_group_type( bp_get_current_group_id(), $type->name ) ); ?>/> <?php echo esc_html( $type->labels['name'] ); ?>
82
- <?php
83
- if ( ! empty( $type->description ) ) {
84
- printf( __( '&ndash; %s', 'buddypress' ), '<span class="bp-group-type-desc">' . esc_html( $type->description ) . '</span>' );
85
- }
86
- ?>
87
- </label>
88
- </div>
89
-
90
- <?php endforeach; ?>
91
-
92
- </fieldset>
93
-
94
- <?php endif; ?>
95
-
96
- <fieldset class="group-create-invitations">
97
-
98
- <legend><?php _e( 'Group Invitations', 'buddypress' ); ?></legend>
99
-
100
- <p><?php _e( 'Which members of this group are allowed to invite others?', 'buddypress' ); ?></p>
101
-
102
- <div class="radio">
103
-
104
- <label for="group-invite-status-members"><input type="radio" name="group-invite-status" id="group-invite-status-members" value="members"<?php bp_group_show_invite_status_setting( 'members' ); ?> /> <?php _e( 'All group members', 'buddypress' ); ?></label>
105
-
106
- <label for="group-invite-status-mods"><input type="radio" name="group-invite-status" id="group-invite-status-mods" value="mods"<?php bp_group_show_invite_status_setting( 'mods' ); ?> /> <?php _e( 'Group admins and mods only', 'buddypress' ); ?></label>
107
-
108
- <label for="group-invite-status-admins"><input type="radio" name="group-invite-status" id="group-invite-status-admins" value="admins"<?php bp_group_show_invite_status_setting( 'admins' ); ?> /> <?php _e( 'Group admins only', 'buddypress' ); ?></label>
109
-
110
- </div>
111
-
112
- </fieldset>
113
-
114
- <?php
115
-
116
- /**
117
- * Fires after the group settings admin display.
118
- *
119
- * @since 1.1.0
120
- */
121
- do_action( 'bp_after_group_settings_admin' ); ?>
122
-
123
- <p><input type="submit" value="<?php esc_attr_e( 'Save Changes', 'buddypress' ); ?>" id="save" name="save" /></p>
124
- <?php wp_nonce_field( 'groups_edit_group_settings' ); ?>
1
+ <?php
2
+ /**
3
+ * BuddyPress - Groups Admin - Group Settings
4
+ *
5
+ * @package BuddyPress
6
+ * @subpackage bp-legacy
7
+ */
8
+
9
+ ?>
10
+
11
+ <h2 class="bp-screen-reader-text"><?php _e( 'Manage Group Settings', 'buddypress' ); ?></h2>
12
+
13
+ <?php
14
+
15
+ /**
16
+ * Fires before the group settings admin display.
17
+ *
18
+ * @since 1.1.0
19
+ */
20
+ do_action( 'bp_before_group_settings_admin' ); ?>
21
+
22
+ <?php if ( bp_is_active( 'forums' ) ) : ?>
23
+
24
+ <?php if ( bp_forums_is_installed_correctly() ) : ?>
25
+
26
+ <div class="checkbox">
27
+ <label for="group-show-forum"><input type="checkbox" name="group-show-forum" id="group-show-forum" value="1"<?php bp_group_show_forum_setting(); ?> /> <?php _e( 'Enable discussion forum', 'buddypress' ); ?></label>
28
+ </div>
29
+
30
+ <hr />
31
+
32
+ <?php endif; ?>
33
+
34
+ <?php endif; ?>
35
+
36
+ <fieldset class="group-create-privacy">
37
+
38
+ <legend><?php _e( 'Privacy Options', 'buddypress' ); ?></legend>
39
+
40
+ <div class="radio">
41
+
42
+ <label for="group-status-public"><input type="radio" name="group-status" id="group-status-public" value="public"<?php if ( 'public' == bp_get_new_group_status() || !bp_get_new_group_status() ) { ?> checked="checked"<?php } ?> aria-describedby="public-group-description" /> <?php _e( 'This is a public group', 'buddypress' ); ?></label>
43
+
44
+ <ul id="public-group-description">
45
+ <li><?php _e( 'Any site member can join this group.', 'buddypress' ); ?></li>
46
+ <li><?php _e( 'This group will be listed in the groups directory and in search results.', 'buddypress' ); ?></li>
47
+ <li><?php _e( 'Group content and activity will be visible to any site member.', 'buddypress' ); ?></li>
48
+ </ul>
49
+
50
+ <label for="group-status-private"><input type="radio" name="group-status" id="group-status-private" value="private"<?php if ( 'private' == bp_get_new_group_status() ) { ?> checked="checked"<?php } ?> aria-describedby="private-group-description" /> <?php _e( 'This is a private group', 'buddypress' ); ?></label>
51
+
52
+ <ul id="private-group-description">
53
+ <li><?php _e( 'Only users who request membership and are accepted can join the group.', 'buddypress' ); ?></li>
54
+ <li><?php _e( 'This group will be listed in the groups directory and in search results.', 'buddypress' ); ?></li>
55
+ <li><?php _e( 'Group content and activity will only be visible to members of the group.', 'buddypress' ); ?></li>
56
+ </ul>
57
+
58
+ <label for="group-status-hidden"><input type="radio" name="group-status" id="group-status-hidden" value="hidden"<?php if ( 'hidden' == bp_get_new_group_status() ) { ?> checked="checked"<?php } ?> aria-describedby="hidden-group-description" /> <?php _e('This is a hidden group', 'buddypress' ); ?></label>
59
+
60
+ <ul id="hidden-group-description">
61
+ <li><?php _e( 'Only users who are invited can join the group.', 'buddypress' ); ?></li>
62
+ <li><?php _e( 'This group will not be listed in the groups directory or search results.', 'buddypress' ); ?></li>
63
+ <li><?php _e( 'Group content and activity will only be visible to members of the group.', 'buddypress' ); ?></li>
64
+ </ul>
65
+
66
+ </div>
67
+
68
+ </fieldset>
69
+
70
+ <?php // Group type selection ?>
71
+ <?php if ( $group_types = bp_groups_get_group_types( array( 'show_in_create_screen' => true ), 'objects' ) ): ?>
72
+
73
+ <fieldset class="group-create-types">
74
+ <legend><?php _e( 'Group Types', 'buddypress' ); ?></legend>
75
+
76
+ <p><?php _e( 'Select the types this group should be a part of.', 'buddypress' ); ?></p>
77
+
78
+ <?php foreach ( $group_types as $type ) : ?>
79
+ <div class="checkbox">
80
+ <label for="<?php printf( 'group-type-%s', $type->name ); ?>">
81
+ <input type="checkbox" name="group-types[]" id="<?php printf( 'group-type-%s', $type->name ); ?>" value="<?php echo esc_attr( $type->name ); ?>" <?php checked( bp_groups_has_group_type( bp_get_current_group_id(), $type->name ) ); ?>/> <?php echo esc_html( $type->labels['name'] ); ?>
82
+ <?php
83
+ if ( ! empty( $type->description ) ) {
84
+ printf( __( '&ndash; %s', 'buddypress' ), '<span class="bp-group-type-desc">' . esc_html( $type->description ) . '</span>' );
85
+ }
86
+ ?>
87
+ </label>
88
+ </div>
89
+
90
+ <?php endforeach; ?>
91
+
92
+ </fieldset>
93
+
94
+ <?php endif; ?>
95
+
96
+ <fieldset class="group-create-invitations">
97
+
98
+ <legend><?php _e( 'Group Invitations', 'buddypress' ); ?></legend>
99
+
100
+ <p><?php _e( 'Which members of this group are allowed to invite others?', 'buddypress' ); ?></p>
101
+
102
+ <div class="radio">
103
+
104
+ <label for="group-invite-status-members"><input type="radio" name="group-invite-status" id="group-invite-status-members" value="members"<?php bp_group_show_invite_status_setting( 'members' ); ?> /> <?php _e( 'All group members', 'buddypress' ); ?></label>
105
+
106
+ <label for="group-invite-status-mods"><input type="radio" name="group-invite-status" id="group-invite-status-mods" value="mods"<?php bp_group_show_invite_status_setting( 'mods' ); ?> /> <?php _e( 'Group admins and mods only', 'buddypress' ); ?></label>
107
+
108
+ <label for="group-invite-status-admins"><input type="radio" name="group-invite-status" id="group-invite-status-admins" value="admins"<?php bp_group_show_invite_status_setting( 'admins' ); ?> /> <?php _e( 'Group admins only', 'buddypress' ); ?></label>
109
+
110
+ </div>
111
+
112
+ </fieldset>
113
+
114
+ <?php
115
+
116
+ /**
117
+ * Fires after the group settings admin display.
118
+ *
119
+ * @since 1.1.0
120
+ */
121
+ do_action( 'bp_after_group_settings_admin' ); ?>
122
+
123
+ <p><input type="submit" value="<?php esc_attr_e( 'Save Changes', 'buddypress' ); ?>" id="save" name="save" /></p>
124
+ <?php wp_nonce_field( 'groups_edit_group_settings' ); ?>
bp-templates/bp-legacy/buddypress/groups/single/admin/manage-members.php CHANGED
@@ -1,332 +1,332 @@
1
- <?php
2
- /**
3
- * BuddyPress - Groups Admin - Manage Members
4
- *
5
- * @package BuddyPress
6
- * @subpackage bp-legacy
7
- */
8
-
9
- ?>
10
-
11
- <h2 class="bp-screen-reader-text"><?php _e( 'Manage Members', 'buddypress' ); ?></h2>
12
-
13
- <?php
14
-
15
- /**
16
- * Fires before the group manage members admin display.
17
- *
18
- * @since 1.1.0
19
- */
20
- do_action( 'bp_before_group_manage_members_admin' ); ?>
21
-
22
- <div aria-live="polite" aria-relevant="all" aria-atomic="true">
23
-
24
- <div class="bp-widget group-members-list group-admins-list">
25
- <h3 class="section-header"><?php _e( 'Administrators', 'buddypress' ); ?></h3>
26
-
27
- <?php if ( bp_group_has_members( array( 'per_page' => 15, 'group_role' => array( 'admin' ), 'page_arg' => 'mlpage-admin' ) ) ) : ?>
28
-
29
- <?php if ( bp_group_member_needs_pagination() ) : ?>
30
-
31
- <div class="pagination no-ajax">
32
-
33
- <div id="member-count" class="pag-count">
34
- <?php bp_group_member_pagination_count(); ?>
35
- </div>
36
-
37
- <div id="member-admin-pagination" class="pagination-links">
38
- <?php bp_group_member_admin_pagination(); ?>
39
- </div>
40
-
41
- </div>
42
-
43
- <?php endif; ?>
44
-
45
- <ul id="admins-list" class="item-list">
46
- <?php while ( bp_group_members() ) : bp_group_the_member(); ?>
47
- <li>
48
- <div class="item-avatar">
49
- <?php bp_group_member_avatar_thumb(); ?>
50
- </div>
51
-
52
- <div class="item">
53
- <div class="item-title">
54
- <?php bp_group_member_link(); ?>
55
- </div>
56
- <p class="joined item-meta">
57
- <?php bp_group_member_joined_since(); ?>
58
- </p>
59
- <?php
60
-
61
- /**
62
- * Fires inside the item section of a member admin item in group management area.
63
- *
64
- * @since 1.1.0
65
- * @since 2.7.0 Added $section parameter.
66
- *
67
- * @param $section Which list contains this item.
68
- */
69
- do_action( 'bp_group_manage_members_admin_item', 'admins-list' ); ?>
70
- </div>
71
-
72
- <div class="action">
73
- <?php if ( count( bp_group_admin_ids( false, 'array' ) ) > 1 ) : ?>
74
- <a class="button confirm admin-demote-to-member" href="<?php bp_group_member_demote_link(); ?>"><?php _e( 'Demote to Member', 'buddypress' ); ?></a>
75
- <?php endif; ?>
76
-
77
- <?php
78
-
79
- /**
80
- * Fires inside the action section of a member admin item in group management area.
81
- *
82
- * @since 2.7.0
83
- *
84
- * @param $section Which list contains this item.
85
- */
86
- do_action( 'bp_group_manage_members_admin_actions', 'admins-list' ); ?>
87
- </div>
88
- </li>
89
- <?php endwhile; ?>
90
- </ul>
91
-
92
- <?php if ( bp_group_member_needs_pagination() ) : ?>
93
-
94
- <div class="pagination no-ajax">
95
-
96
- <div id="member-count" class="pag-count">
97
- <?php bp_group_member_pagination_count(); ?>
98
- </div>
99
-
100
- <div id="member-admin-pagination" class="pagination-links">
101
- <?php bp_group_member_admin_pagination(); ?>
102
- </div>
103
-
104
- </div>
105
-
106
- <?php endif; ?>
107
-
108
- <?php else: ?>
109
-
110
- <div id="message" class="info">
111
- <p><?php _e( 'No group administrators were found.', 'buddypress' ); ?></p>
112
- </div>
113
-
114
- <?php endif; ?>
115
- </div>
116
-
117
- <div class="bp-widget group-members-list group-mods-list">
118
- <h3 class="section-header"><?php _e( 'Moderators', 'buddypress' ); ?></h3>
119
-
120
- <?php if ( bp_group_has_members( array( 'per_page' => 15, 'group_role' => array( 'mod' ), 'page_arg' => 'mlpage-mod' ) ) ) : ?>
121
-
122
- <?php if ( bp_group_member_needs_pagination() ) : ?>
123
-
124
- <div class="pagination no-ajax">
125
-
126
- <div id="member-count" class="pag-count">
127
- <?php bp_group_member_pagination_count(); ?>
128
- </div>
129
-
130
- <div id="member-admin-pagination" class="pagination-links">
131
- <?php bp_group_member_admin_pagination(); ?>
132
- </div>
133
-
134
- </div>
135
-
136
- <?php endif; ?>
137
-
138
- <ul id="mods-list" class="item-list">
139
-
140
- <?php while ( bp_group_members() ) : bp_group_the_member(); ?>
141
- <li>
142
- <div class="item-avatar">
143
- <?php bp_group_member_avatar_thumb(); ?>
144
- </div>
145
-
146
- <div class="item">
147
- <div class="item-title">
148
- <?php bp_group_member_link(); ?>
149
- </div>
150
- <p class="joined item-meta">
151
- <?php bp_group_member_joined_since(); ?>
152
- </p>
153
- <?php
154
-
155
- /**
156
- * Fires inside the item section of a member admin item in group management area.
157
- *
158
- * @since 1.1.0
159
- * @since 2.7.0 Added $section parameter.
160
- *
161
- * @param $section Which list contains this item.
162
- */
163
- do_action( 'bp_group_manage_members_admin_item', 'admins-list' ); ?>
164
- </div>
165
-
166
- <div class="action">
167
- <a href="<?php bp_group_member_promote_admin_link(); ?>" class="button confirm mod-promote-to-admin"><?php _e( 'Promote to Admin', 'buddypress' ); ?></a>
168
- <a class="button confirm mod-demote-to-member" href="<?php bp_group_member_demote_link(); ?>"><?php _e( 'Demote to Member', 'buddypress' ); ?></a>
169
-
170
- <?php
171
-
172
- /**
173
- * Fires inside the action section of a member admin item in group management area.
174
- *
175
- * @since 2.7.0
176
- *
177
- * @param $section Which list contains this item.
178
- */
179
- do_action( 'bp_group_manage_members_admin_actions', 'mods-list' ); ?>
180
-
181
- </div>
182
- </li>
183
- <?php endwhile; ?>
184
-
185
- </ul>
186
-
187
- <?php if ( bp_group_member_needs_pagination() ) : ?>
188
-
189
- <div class="pagination no-ajax">
190
-
191
- <div id="member-count" class="pag-count">
192
- <?php bp_group_member_pagination_count(); ?>
193
- </div>
194
-
195
- <div id="member-admin-pagination" class="pagination-links">
196
- <?php bp_group_member_admin_pagination(); ?>
197
- </div>
198
-
199
- </div>
200
-
201
- <?php endif; ?>
202
-
203
- <?php else: ?>
204
-
205
- <div id="message" class="info">
206
- <p><?php _e( 'No group moderators were found.', 'buddypress' ); ?></p>
207
- </div>
208
-
209
- <?php endif; ?>
210
- </div>
211
-
212
- <div class="bp-widget group-members-list">
213
- <h3 class="section-header"><?php _e( "Members", 'buddypress' ); ?></h3>
214
-
215
- <?php if ( bp_group_has_members( array( 'per_page' => 15, 'exclude_banned' => 0 ) ) ) : ?>
216
-
217
- <?php if ( bp_group_member_needs_pagination() ) : ?>
218
-
219
- <div class="pagination no-ajax">
220
-
221
- <div id="member-count" class="pag-count">
222
- <?php bp_group_member_pagination_count(); ?>
223
- </div>
224
-
225
- <div id="member-admin-pagination" class="pagination-links">
226
- <?php bp_group_member_admin_pagination(); ?>
227
- </div>
228
-
229
- </div>
230
-
231
- <?php endif; ?>
232
-
233
- <ul id="members-list" class="item-list" aria-live="assertive" aria-relevant="all">
234
- <?php while ( bp_group_members() ) : bp_group_the_member(); ?>
235
-
236
- <li class="<?php bp_group_member_css_class(); ?>">
237
- <div class="item-avatar">
238
- <?php bp_group_member_avatar_thumb(); ?>
239
- </div>
240
-
241
- <div class="item">
242
- <div class="item-title">
243
- <?php bp_group_member_link(); ?>
244
- <?php
245
- if ( bp_get_group_member_is_banned() ) {
246
- echo ' <span class="banned">';
247
- _e( '(banned)', 'buddypress' );
248
- echo '</span>';
249
- } ?>
250
- </div>
251
- <p class="joined item-meta">
252
- <?php bp_group_member_joined_since(); ?>
253
- </p>
254
- <?php
255
-
256
- /**
257
- * Fires inside the item section of a member admin item in group management area.
258
- *
259
- * @since 1.1.0
260
- * @since 2.7.0 Added $section parameter.
261
- *
262
- * @param $section Which list contains this item.
263
- */
264
- do_action( 'bp_group_manage_members_admin_item', 'admins-list' ); ?>
265
- </div>
266
-
267
- <div class="action">
268
- <?php if ( bp_get_group_member_is_banned() ) : ?>
269
-
270
- <a href="<?php bp_group_member_unban_link(); ?>" class="button confirm member-unban" title="<?php esc_attr_e( 'Unban this member', 'buddypress' ); ?>"><?php _e( 'Remove Ban', 'buddypress' ); ?></a>
271
-
272
- <?php else : ?>
273
-
274
- <a href="<?php bp_group_member_ban_link(); ?>" class="button confirm member-ban"><?php _e( 'Kick &amp; Ban', 'buddypress' ); ?></a>
275
- <a href="<?php bp_group_member_promote_mod_link(); ?>" class="button confirm member-promote-to-mod"><?php _e( 'Promote to Mod', 'buddypress' ); ?></a>
276
- <a href="<?php bp_group_member_promote_admin_link(); ?>" class="button confirm member-promote-to-admin"><?php _e( 'Promote to Admin', 'buddypress' ); ?></a>
277
-
278
- <?php endif; ?>
279
-
280
- <a href="<?php bp_group_member_remove_link(); ?>" class="button confirm"><?php _e( 'Remove from group', 'buddypress' ); ?></a>
281
-
282
- <?php
283
-
284
- /**
285
- * Fires inside the action section of a member admin item in group management area.
286
- *
287
- * @since 2.7.0
288
- *
289
- * @param $section Which list contains this item.
290
- */
291
- do_action( 'bp_group_manage_members_admin_actions', 'members-list' ); ?>
292
- </div>
293
- </li>
294
-
295
- <?php endwhile; ?>
296
- </ul>
297
-
298
- <?php if ( bp_group_member_needs_pagination() ) : ?>
299
-
300
- <div class="pagination no-ajax">
301
-
302
- <div id="member-count" class="pag-count">
303
- <?php bp_group_member_pagination_count(); ?>
304
- </div>
305
-
306
- <div id="member-admin-pagination" class="pagination-links">
307
- <?php bp_group_member_admin_pagination(); ?>
308
- </div>
309
-
310
- </div>
311
-
312
- <?php endif; ?>
313
-
314
- <?php else: ?>
315
-
316
- <div id="message" class="info">
317
- <p><?php _e( 'No group members were found.', 'buddypress' ); ?></p>
318
- </div>
319
-
320
- <?php endif; ?>
321
- </div>
322
-
323
- </div>
324
-
325
- <?php
326
-
327
- /**
328
- * Fires after the group manage members admin display.
329
- *
330
- * @since 1.1.0
331
- */
332
- do_action( 'bp_after_group_manage_members_admin' ); ?>
1
+ <?php
2
+ /**
3
+ * BuddyPress - Groups Admin - Manage Members
4
+ *
5
+ * @package BuddyPress
6
+ * @subpackage bp-legacy
7
+ */
8
+
9
+ ?>
10
+
11
+ <h2 class="bp-screen-reader-text"><?php _e( 'Manage Members', 'buddypress' ); ?></h2>
12
+
13
+ <?php
14
+
15
+ /**
16
+ * Fires before the group manage members admin display.
17
+ *
18
+ * @since 1.1.0
19
+ */
20
+ do_action( 'bp_before_group_manage_members_admin' ); ?>
21
+
22
+ <div aria-live="polite" aria-relevant="all" aria-atomic="true">
23
+
24
+ <div class="bp-widget group-members-list group-admins-list">
25
+ <h3 class="section-header"><?php _e( 'Administrators', 'buddypress' ); ?></h3>
26
+
27
+ <?php if ( bp_group_has_members( array( 'per_page' => 15, 'group_role' => array( 'admin' ), 'page_arg' => 'mlpage-admin' ) ) ) : ?>
28
+
29
+ <?php if ( bp_group_member_needs_pagination() ) : ?>
30
+
31
+ <div class="pagination no-ajax">
32
+
33
+ <div id="member-count" class="pag-count">
34
+ <?php bp_group_member_pagination_count(); ?>
35
+ </div>
36
+
37
+ <div id="member-admin-pagination" class="pagination-links">
38
+ <?php bp_group_member_admin_pagination(); ?>
39
+ </div>
40
+
41
+ </div>
42
+
43
+ <?php endif; ?>
44
+
45
+ <ul id="admins-list" class="item-list">
46
+ <?php while ( bp_group_members() ) : bp_group_the_member(); ?>
47
+ <li>
48
+ <div class="item-avatar">
49
+ <?php bp_group_member_avatar_thumb(); ?>
50
+ </div>
51
+
52
+ <div class="item">
53
+ <div class="item-title">
54
+ <?php bp_group_member_link(); ?>
55
+ </div>
56
+ <p class="joined item-meta">
57
+ <?php bp_group_member_joined_since(); ?>
58
+ </p>
59
+ <?php
60
+
61
+ /**
62
+ * Fires inside the item section of a member admin item in group management area.
63
+ *
64
+ * @since 1.1.0
65
+ * @since 2.7.0 Added $section parameter.
66
+ *
67
+ * @param $section Which list contains this item.
68
+ */
69
+ do_action( 'bp_group_manage_members_admin_item', 'admins-list' ); ?>
70
+ </div>
71
+
72
+ <div class="action">
73
+ <?php if ( count( bp_group_admin_ids( false, 'array' ) ) > 1 ) : ?>
74
+ <a class="button confirm admin-demote-to-member" href="<?php bp_group_member_demote_link(); ?>"><?php _e( 'Demote to Member', 'buddypress' ); ?></a>
75
+ <?php endif; ?>
76
+
77
+ <?php
78
+
79
+ /**
80
+ * Fires inside the action section of a member admin item in group management area.
81
+ *
82
+ * @since 2.7.0
83
+ *
84
+ * @param $section Which list contains this item.
85
+ */
86
+ do_action( 'bp_group_manage_members_admin_actions', 'admins-list' ); ?>
87
+ </div>
88
+ </li>
89
+ <?php endwhile; ?>
90
+ </ul>
91
+
92
+ <?php if ( bp_group_member_needs_pagination() ) : ?>
93
+
94
+ <div class="pagination no-ajax">
95
+
96
+ <div id="member-count" class="pag-count">
97
+ <?php bp_group_member_pagination_count(); ?>
98
+ </div>
99
+
100
+ <div id="member-admin-pagination" class="pagination-links">
101
+ <?php bp_group_member_admin_pagination(); ?>
102
+ </div>
103
+
104
+ </div>
105
+
106
+ <?php endif; ?>
107
+
108
+ <?php else: ?>
109
+
110
+ <div id="message" class="info">
111
+ <p><?php _e( 'No group administrators were found.', 'buddypress' ); ?></p>
112
+ </div>
113
+
114
+ <?php endif; ?>
115
+ </div>
116
+
117
+ <div class="bp-widget group-members-list group-mods-list">
118
+ <h3 class="section-header"><?php _e( 'Moderators', 'buddypress' ); ?></h3>
119
+
120
+ <?php if ( bp_group_has_members( array( 'per_page' => 15, 'group_role' => array( 'mod' ), 'page_arg' => 'mlpage-mod' ) ) ) : ?>
121
+
122
+ <?php if ( bp_group_member_needs_pagination() ) : ?>
123
+
124
+ <div class="pagination no-ajax">
125
+
126
+ <div id="member-count" class="pag-count">
127
+ <?php bp_group_member_pagination_count(); ?>
128
+ </div>
129
+
130
+ <div id="member-admin-pagination" class="pagination-links">
131
+ <?php bp_group_member_admin_pagination(); ?>
132
+ </div>
133
+
134
+ </div>
135
+
136
+ <?php endif; ?>
137
+
138
+ <ul id="mods-list" class="item-list">
139
+
140
+ <?php while ( bp_group_members() ) : bp_group_the_member(); ?>
141
+ <li>
142
+ <div class="item-avatar">
143
+ <?php bp_group_member_avatar_thumb(); ?>
144
+ </div>
145
+
146
+ <div class="item">
147
+ <div class="item-title">
148
+ <?php bp_group_member_link(); ?>
149
+ </div>
150
+ <p class="joined item-meta">
151
+ <?php bp_group_member_joined_since(); ?>
152
+ </p>
153
+ <?php
154
+
155
+ /**
156
+ * Fires inside the item section of a member admin item in group management area.
157
+ *
158
+ * @since 1.1.0
159
+ * @since 2.7.0 Added $section parameter.
160
+ *
161
+ * @param $section Which list contains this item.
162
+ */
163
+ do_action( 'bp_group_manage_members_admin_item', 'admins-list' ); ?>
164
+ </div>
165
+
166
+ <div class="action">
167
+ <a href="<?php bp_group_member_promote_admin_link(); ?>" class="button confirm mod-promote-to-admin"><?php _e( 'Promote to Admin', 'buddypress' ); ?></a>
168
+ <a class="button confirm mod-demote-to-member" href="<?php bp_group_member_demote_link(); ?>"><?php _e( 'Demote to Member', 'buddypress' ); ?></a>
169
+
170
+ <?php
171
+
172
+ /**
173
+ * Fires inside the action section of a member admin item in group management area.
174
+ *
175
+ * @since 2.7.0
176
+ *
177
+ * @param $section Which list contains this item.
178
+ */
179
+ do_action( 'bp_group_manage_members_admin_actions', 'mods-list' ); ?>
180
+
181
+ </div>
182
+ </li>
183
+ <?php endwhile; ?>
184
+
185
+ </ul>
186
+
187
+ <?php if ( bp_group_member_needs_pagination() ) : ?>
188
+
189
+ <div class="pagination no-ajax">
190
+
191
+ <div id="member-count" class="pag-count">
192
+ <?php bp_group_member_pagination_count(); ?>
193
+ </div>
194
+
195
+ <div id="member-admin-pagination" class="pagination-links">
196
+ <?php bp_group_member_admin_pagination(); ?>
197
+ </div>
198
+
199
+ </div>
200
+
201
+ <?php endif; ?>
202
+
203
+ <?php else: ?>
204
+
205
+ <div id="message" class="info">
206
+ <p><?php _e( 'No group moderators were found.', 'buddypress' ); ?></p>
207
+ </div>
208
+
209
+ <?php endif; ?>
210
+ </div>
211
+
212
+ <div class="bp-widget group-members-list">
213
+ <h3 class="section-header"><?php _e( "Members", 'buddypress' ); ?></h3>
214
+
215
+ <?php if ( bp_group_has_members( array( 'per_page' => 15, 'exclude_banned' => 0 ) ) ) : ?>
216
+
217
+ <?php if ( bp_group_member_needs_pagination() ) : ?>
218
+
219
+ <div class="pagination no-ajax">
220
+
221
+ <div id="member-count" class="pag-count">
222
+ <?php bp_group_member_pagination_count(); ?>
223
+ </div>
224
+
225
+ <div id="member-admin-pagination" class="pagination-links">
226
+ <?php bp_group_member_admin_pagination(); ?>
227
+ </div>
228
+
229
+ </div>
230
+
231
+ <?php endif; ?>
232
+
233
+ <ul id="members-list" class="item-list" aria-live="assertive" aria-relevant="all">
234
+ <?php while ( bp_group_members() ) : bp_group_the_member(); ?>
235
+
236
+ <li class="<?php bp_group_member_css_class(); ?>">
237
+ <div class="item-avatar">
238
+ <?php bp_group_member_avatar_thumb(); ?>
239
+ </div>
240
+
241
+ <div class="item">
242
+ <div class="item-title">
243
+ <?php bp_group_member_link(); ?>
244
+ <?php
245
+ if ( bp_get_group_member_is_banned() ) {
246
+ echo ' <span class="banned">';
247
+ _e( '(banned)', 'buddypress' );
248
+ echo '</span>';
249
+ } ?>
250
+ </div>
251
+ <p class="joined item-meta">
252
+ <?php bp_group_member_joined_since(); ?>
253
+ </p>
254
+ <?php
255
+
256
+ /**
257
+ * Fires inside the item section of a member admin item in group management area.
258
+ *
259
+ * @since 1.1.0
260
+ * @since 2.7.0 Added $section parameter.
261
+ *
262
+ * @param $section Which list contains this item.
263
+ */
264
+ do_action( 'bp_group_manage_members_admin_item', 'admins-list' ); ?>
265
+ </div>
266
+
267
+ <div class="action">
268
+ <?php if ( bp_get_group_member_is_banned() ) : ?>
269
+
270
+ <a href="<?php bp_group_member_unban_link(); ?>" class="button confirm member-unban" title="<?php esc_attr_e( 'Unban this member', 'buddypress' ); ?>"><?php _e( 'Remove Ban', 'buddypress' ); ?></a>
271
+
272
+ <?php else : ?>
273
+
274
+ <a href="<?php bp_group_member_ban_link(); ?>" class="button confirm member-ban"><?php _e( 'Kick &amp; Ban', 'buddypress' ); ?></a>
275
+ <a href="<?php bp_group_member_promote_mod_link(); ?>" class="button confirm member-promote-to-mod"><?php _e( 'Promote to Mod', 'buddypress' ); ?></a>
276
+ <a href="<?php bp_group_member_promote_admin_link(); ?>" class="button confirm member-promote-to-admin"><?php _e( 'Promote to Admin', 'buddypress' ); ?></a>
277
+
278
+ <?php endif; ?>
279
+
280
+ <a href="<?php bp_group_member_remove_link(); ?>" class="button confirm"><?php _e( 'Remove from group', 'buddypress' ); ?></a>
281
+
282
+ <?php
283
+
284
+ /**
285
+ * Fires inside the action section of a member admin item in group management area.
286
+ *
287
+ * @since 2.7.0
288
+ *
289
+ * @param $section Which list contains this item.
290
+ */
291
+ do_action( 'bp_group_manage_members_admin_actions', 'members-list' ); ?>
292
+ </div>
293
+ </li>
294
+
295
+ <?php endwhile; ?>
296
+ </ul>
297
+
298
+ <?php if ( bp_group_member_needs_pagination() ) : ?>
299
+
300
+ <div class="pagination no-ajax">
301
+
302
+ <div id="member-count" class="pag-count">
303
+ <?php bp_group_member_pagination_count(); ?>
304
+ </div>
305
+
306
+ <div id="member-admin-pagination" class="pagination-links">
307
+ <?php bp_group_member_admin_pagination(); ?>
308
+ </div>
309
+
310
+ </div>
311
+
312
+ <?php endif; ?>
313
+
314
+ <?php else: ?>
315
+
316
+ <div id="message" class="info">
317
+ <p><?php _e( 'No group members were found.', 'buddypress' ); ?></p>
318
+ </div>
319
+
320
+ <?php endif; ?>
321
+ </div>
322
+
323
+ </div>
324
+
325
+ <?php
326
+
327
+ /**
328
+ * Fires after the group manage members admin display.
329
+ *
330
+ * @since 1.1.0
331
+ */
332
+ do_action( 'bp_after_group_manage_members_admin' ); ?>
bp-templates/bp-legacy/buddypress/groups/single/admin/membership-requests.php CHANGED
@@ -1,35 +1,35 @@
1
- <?php
2
- /**
3
- * BuddyPress - Groups Admin - Membership Requests
4
- *
5
- * @package BuddyPress
6
- * @subpackage bp-legacy
7
- */
8
-
9
- ?>
10
-
11
- <h2 class="bp-screen-reader-text"><?php _e( 'Manage Membership Requests', 'buddypress' ); ?></h2>
12
-
13
- <?php
14
-
15
- /**
16
- * Fires before the display of group membership requests admin.
17
- *
18
- * @since 1.1.0
19
- */
20
- do_action( 'bp_before_group_membership_requests_admin' ); ?>
21
-
22
- <div class="requests">
23
-
24
- <?php bp_get_template_part( 'groups/single/requests-loop' ); ?>
25
-
26
- </div>
27
-
28
- <?php
29
-
30
- /**
31
- * Fires after the display of group membership requests admin.
32
- *
33
- * @since 1.1.0
34
- */
35
- do_action( 'bp_after_group_membership_requests_admin' ); ?>
1
+ <?php
2
+ /**
3
+ * BuddyPress - Groups Admin - Membership Requests
4
+ *
5
+ * @package BuddyPress
6
+ * @subpackage bp-legacy
7
+ */
8
+
9
+ ?>
10
+
11
+ <h2 class="bp-screen-reader-text"><?php _e( 'Manage Membership Requests', 'buddypress' ); ?></h2>
12
+
13
+ <?php
14
+
15
+ /**
16
+ * Fires before the display of group membership requests admin.
17
+ *
18
+ * @since 1.1.0
19
+ */
20
+ do_action( 'bp_before_group_membership_requests_admin' ); ?>
21
+
22
+ <div class="requests">
23
+
24
+ <?php bp_get_template_part( 'groups/single/requests-loop' ); ?>
25
+
26
+ </div>
27
+
28
+ <?php
29
+
30
+ /**
31
+ * Fires after the display of group membership requests admin.
32
+ *
33
+ * @since 1.1.0
34
+ */
35
+ do_action( 'bp_after_group_membership_requests_admin' ); ?>
bp-templates/bp-legacy/buddypress/groups/single/cover-image-header.php CHANGED
@@ -1,129 +1,129 @@
1
- <?php
2
- /**
3
- * BuddyPress - Groups Cover Image Header.
4
- *
5
- * @package BuddyPress
6
- * @subpackage bp-legacy
7
- */
8
-
9
- /**
10
- * Fires before the display of a group's header.
11
- *
12
- * @since 1.2.0
13
- */
14
- do_action( 'bp_before_group_header' ); ?>
15
-
16
- <div id="cover-image-container">
17
- <a id="header-cover-image" href="<?php echo esc_url( bp_get_group_permalink() ); ?>"></a>
18
-
19
- <div id="item-header-cover-image">
20
- <?php if ( ! bp_disable_group_avatar_uploads() ) : ?>
21
- <div id="item-header-avatar">
22
- <a href="<?php echo esc_url( bp_get_group_permalink() ); ?>" title="<?php echo esc_attr( bp_get_group_name() ); ?>">
23
-
24
- <?php bp_group_avatar(); ?>
25
-
26
- </a>
27
- </div><!-- #item-header-avatar -->
28
- <?php endif; ?>
29
-
30
- <div id="item-header-content">
31
-
32
- <div id="item-buttons"><?php
33
-
34
- /**
35
- * Fires in the group header actions section.
36
- *
37
- * @since 1.2.6
38
- */
39
- do_action( 'bp_group_header_actions' ); ?></div><!-- #item-buttons -->
40
-
41
- <?php
42
-
43
- /**
44
- * Fires before the display of the group's header meta.
45
- *
46
- * @since 1.2.0
47
- */
48
- do_action( 'bp_before_group_header_meta' ); ?>
49
-
50
- <div id="item-meta">
51
-
52
- <?php
53
-
54
- /**
55
- * Fires after the group header actions section.
56
- *
57
- * @since 1.2.0
58
- */
59
- do_action( 'bp_group_header_meta' ); ?>
60
-
61
- <span class="highlight"><?php bp_group_type(); ?></span>
62
- <span class="activity" data-livestamp="<?php bp_core_iso8601_date( bp_get_group_last_active( 0, array( 'relative' => false ) ) ); ?>"><?php printf( __( 'active %s', 'buddypress' ), bp_get_group_last_active() ); ?></span>
63
-
64
- <?php bp_group_description(); ?>
65
-
66
- <?php bp_group_type_list(); ?>
67
- </div>
68
- </div><!-- #item-header-content -->
69
-
70
- <div id="item-actions">
71
-
72
- <?php if ( bp_group_is_visible() ) : ?>
73
-
74
- <h2><?php _e( 'Group Admins', 'buddypress' ); ?></h2>
75
-
76
- <?php bp_group_list_admins();
77
-
78
- /**
79
- * Fires after the display of the group's administrators.
80
- *
81
- * @since 1.1.0
82
- */
83
- do_action( 'bp_after_group_menu_admins' );
84
-
85
- if ( bp_group_has_moderators() ) :
86
-
87
- /**
88
- * Fires before the display of the group's moderators, if there are any.
89
- *
90
- * @since 1.1.0
91
- */
92
- do_action( 'bp_before_group_menu_mods' ); ?>
93
-
94
- <h2><?php _e( 'Group Mods' , 'buddypress' ); ?></h2>
95
-
96
- <?php bp_group_list_mods();
97
-
98
- /**
99
- * Fires after the display of the group's moderators, if there are any.
100
- *
101
- * @since 1.1.0
102
- */
103
- do_action( 'bp_after_group_menu_mods' );
104
-
105
- endif;
106
-
107
- endif; ?>
108
-
109
- </div><!-- #item-actions -->
110
-
111
- </div><!-- #item-header-cover-image -->
112
- </div><!-- #cover-image-container -->
113
-
114
- <?php
115
-
116
- /**
117
- * Fires after the display of a group's header.
118
- *
119
- * @since 1.2.0
120
- */
121
- do_action( 'bp_after_group_header' ); ?>
122
-
123
- <div id="template-notices" role="alert" aria-atomic="true">
124
- <?php
125
-
126
- /** This action is documented in bp-templates/bp-legacy/buddypress/activity/index.php */
127
- do_action( 'template_notices' ); ?>
128
-
129
- </div>
1
+ <?php
2
+ /**
3
+ * BuddyPress - Groups Cover Image Header.
4
+ *
5
+ * @package BuddyPress
6
+ * @subpackage bp-legacy
7
+ */
8
+
9
+ /**
10
+ * Fires before the display of a group's header.
11
+ *
12
+ * @since 1.2.0
13
+ */
14
+ do_action( 'bp_before_group_header' ); ?>
15
+
16
+ <div id="cover-image-container">
17
+ <a id="header-cover-image" href="<?php echo esc_url( bp_get_group_permalink() ); ?>"></a>
18
+
19
+ <div id="item-header-cover-image">
20
+ <?php if ( ! bp_disable_group_avatar_uploads() ) : ?>
21
+ <div id="item-header-avatar">
22
+ <a href="<?php echo esc_url( bp_get_group_permalink() ); ?>" title="<?php echo esc_attr( bp_get_group_name() ); ?>">
23
+
24
+ <?php bp_group_avatar(); ?>
25
+
26
+ </a>
27
+ </div><!-- #item-header-avatar -->
28
+ <?php endif; ?>
29
+
30
+ <div id="item-header-content">
31
+
32
+ <div id="item-buttons"><?php
33
+
34
+