Changeset 9124
- Timestamp:
- 11/05/2014 03:16:44 PM (11 years ago)
- File:
-
- 1 edited
-
trunk/src/bp-core/bp-core-avatars.php (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/bp-core/bp-core-avatars.php
r8677 r9124 182 182 global $current_blog; 183 183 184 $bp = buddypress(); 185 186 // Set a few default variables 187 $def_object = 'user'; 188 $def_type = 'thumb'; 189 $def_class = 'avatar'; 190 191 // Set the default variables array 184 // Set the default variables array and parse it against incoming $args array. 192 185 $params = wp_parse_args( $args, array( 193 186 'item_id' => false, 194 'object' => $def_object, // user/group/blog/custom type (if you use filters)195 'type' => $def_type, // thumb or full196 'avatar_dir' => false, // Specify a custom avatar directory for your object197 'width' => false, // Custom width (int)198 'height' => false, // Custom height (int)199 'class' => $def_class, // Custom <img> class (string)200 'css_id' => false, // Custom <img> ID (string)201 'alt' => '', // Custom <img> alt (string)202 'email' => false, // Pass the user email (for gravatar) to prevent querying the DB for it203 'no_grav' => false, // If there is no avatar found, return false instead of a grav?204 'html' => true, // Wrap the return img URL in <img />205 'title' => '' // Custom <img> title (string)187 'object' => 'user', 188 'type' => 'thumb', 189 'avatar_dir' => false, 190 'width' => false, 191 'height' => false, 192 'class' => 'avatar', 193 'css_id' => false, 194 'alt' => '', 195 'email' => false, 196 'no_grav' => false, 197 'html' => true, 198 'title' => '', 206 199 ) ); 207 200 extract( $params, EXTR_SKIP );
Note: See TracChangeset
for help on using the changeset viewer.