[buddypress-trac] [BuddyPress] #934: Friends with Bears Patch 1.0
buddypress-trac at lists.automattic.com
buddypress-trac at lists.automattic.com
Mon Aug 24 17:31:30 UTC 2009
#934: Friends with Bears Patch 1.0
----------------------------+-----------------------------------------------
Reporter: johnjamesjacoby | Owner: johnjamesjacoby
Type: defect | Status: new
Priority: major | Milestone: 1.1
Keywords: has-patch |
----------------------------+-----------------------------------------------
Comment(by apeatling):
A few things for next time, hopefully this will help:
Functions like bp_group_member_is_banned() should always echo. Each of
those functions should have a get_() function
bp_get_group_member_is_banned() that will always return.
if ( !$id ) will validate false on zero values. No need for ( !$id || $id
== 0 )
The home template can be bypassed by adding <?php load_template(
TEMPLATEPATH . '/index.php' ) ?> to that file in the child theme.
Templates should always try and avoid using curly braces. Stick to the
<?php if ( ) : else : endif; ?> as it's less daunting and easier to follow
for non-programmers.
Don't invoke actions in the template - so bp_core_delete_existing_avatar()
shouldn't be called in the template. The URL should be checked in a screen
function in the plugin, then that function run if needed.
Translation functions won't work with variables. They might work at run-
time, however to translate the application a script runs and pulls out the
translation text from the files. If that translation text is a variable
then this cannot happen, as the script is not running and that value is
obviously varies.
Hope that stuff helps, thanks for the patch.
--
Ticket URL: <https://trac.buddypress.org/ticket/934#comment:4>
BuddyPress <http://buddypress.org/>
BuddyPress
More information about the buddypress-trac
mailing list