Changeset 13108 for trunk/src/bp-core/bp-core-avatars.php
- Timestamp:
- 09/12/2021 08:43:39 PM (4 years ago)
- File:
-
- 1 edited
-
trunk/src/bp-core/bp-core-avatars.php (modified) (4 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/bp-core/bp-core-avatars.php
r12943 r13108 232 232 233 233 // Set the default variables array and parse it against incoming $args array. 234 $params = wp_parse_args( $args, array( 235 'item_id' => false, 236 'object' => 'user', 237 'type' => 'thumb', 238 'avatar_dir' => false, 239 'width' => false, 240 'height' => false, 241 'class' => 'avatar', 242 'css_id' => false, 243 'alt' => '', 244 'email' => false, 245 'no_grav' => null, 246 'html' => true, 247 'title' => '', 248 'extra_attr' => '', 249 'scheme' => null, 250 'rating' => get_option( 'avatar_rating' ), 251 'force_default' => false, 252 ) ); 234 $params = bp_parse_args( 235 $args, 236 array( 237 'item_id' => false, 238 'object' => 'user', 239 'type' => 'thumb', 240 'avatar_dir' => false, 241 'width' => false, 242 'height' => false, 243 'class' => 'avatar', 244 'css_id' => false, 245 'alt' => '', 246 'email' => false, 247 'no_grav' => null, 248 'html' => true, 249 'title' => '', 250 'extra_attr' => '', 251 'scheme' => null, 252 'rating' => get_option( 'avatar_rating' ), 253 'force_default' => false, 254 ) 255 ); 253 256 254 257 /* Set item_id ***********************************************************/ … … 766 769 ); 767 770 768 $args = wp_parse_args( $args, $defaults ); 771 $args = bp_parse_args( 772 $args, 773 $defaults 774 ); 769 775 770 776 /** … … 1255 1261 function bp_core_avatar_handle_crop( $args = '' ) { 1256 1262 1257 $r = wp_parse_args( $args, array( 1258 'object' => 'user', 1259 'avatar_dir' => 'avatars', 1260 'item_id' => false, 1261 'original_file' => false, 1262 'crop_w' => bp_core_avatar_full_width(), 1263 'crop_h' => bp_core_avatar_full_height(), 1264 'crop_x' => 0, 1265 'crop_y' => 0 1266 ) ); 1263 $r = bp_parse_args( 1264 $args, 1265 array( 1266 'object' => 'user', 1267 'avatar_dir' => 'avatars', 1268 'item_id' => false, 1269 'original_file' => false, 1270 'crop_w' => bp_core_avatar_full_width(), 1271 'crop_h' => bp_core_avatar_full_height(), 1272 'crop_x' => 0, 1273 'crop_y' => 0, 1274 ) 1275 ); 1267 1276 1268 1277 /** … … 1308 1317 check_admin_referer( 'bp_avatar_cropstore', 'nonce' ); 1309 1318 1310 $avatar_data = wp_parse_args( $_POST, array( 1311 'crop_w' => bp_core_avatar_full_width(), 1312 'crop_h' => bp_core_avatar_full_height(), 1313 'crop_x' => 0, 1314 'crop_y' => 0 1315 ) ); 1319 $avatar_data = bp_parse_args( 1320 $_POST, 1321 array( 1322 'crop_w' => bp_core_avatar_full_width(), 1323 'crop_h' => bp_core_avatar_full_height(), 1324 'crop_x' => 0, 1325 'crop_y' => 0, 1326 ) 1327 ); 1316 1328 1317 1329 if ( empty( $avatar_data['object'] ) || empty( $avatar_data['item_id'] ) || empty( $avatar_data['original_file'] ) ) {
Note: See TracChangeset
for help on using the changeset viewer.