| Conditions | 1 |
| Paths | 1 |
| Total Lines | 21 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 0 | ||
| 1 | <?php |
||
| 8 | function gcProfilePictureBadges_init(){ |
||
| 9 | |||
| 10 | //elgg_extend_view('icon/user/default', 'gcProfilePictureBadges/default'); |
||
| 11 | elgg_register_action( "avatar/crop", elgg_get_plugins_path() . "gcProfilePictureBadges/actions/avatar/crop.php" ); |
||
| 12 | |||
| 13 | //add pledge to group sidebar |
||
| 14 | elgg_extend_view('groups/sidebar/sidebar', 'groups/sidebar/pledge', 1); |
||
| 15 | |||
| 16 | //add style so badge doesnt break in admin menu |
||
| 17 | elgg_extend_view('admin/header', 'widgets/avatar_style', 1); |
||
| 18 | |||
| 19 | //pledge action to add badge to avatar without havign to edit avatar |
||
| 20 | elgg_register_action('badge/pledge', elgg_get_plugins_path() . "gcProfilePictureBadges/actions/pledge.php"); |
||
| 21 | |||
| 22 | //badge css |
||
| 23 | elgg_extend_view('css/elgg', 'gcProfilePictureBadges/css'); |
||
| 24 | |||
| 25 | //group control |
||
| 26 | elgg_extend_view('groups/edit', 'groups/edit/badge_tool', 329); |
||
| 27 | elgg_register_action('group/enable_badge', elgg_get_plugins_path() . "gcProfilePictureBadges/actions/group/enable_badge.php"); |
||
| 28 | } |
||
| 29 | |||
| 34 |
Using a closing tag in PHP files that only contain PHP code is not recommended as you might accidentally add whitespace after the closing tag which would then be output by PHP. This can cause severe problems, for example headers cannot be sent anymore.
A simple precaution is to leave off the closing tag as it is not required, and it also has no negative effects whatsoever.