Skip to:

Opened 15 years ago

Closed 15 years ago

#895 closed defect (bug) (worksforme)

bp_wire_get_post_form has dependency on bp_has_wire_posts

Reported by: prettyboymp's profile prettyboymp Owned by:
Milestone: 1.1 Priority: minor
Severity: Version:
Component: Keywords:
Cc: prettyboymp


Since the bp_has_wire_posts method is sets up the $wire_posts_template global, bp_wire_get_post_form can't be called without first making a call to bp_has_wire_posts. This means having to add an extra call to bp_has_wire_posts if you want to place the post to wire form before the wire loop.

Because I think the use of super globals becomes a major maintenance problem, I'd like to suggest adding get_instance methods to replace the use. That way, instead of functions like bp_wire_get_post_form calling the super global $wire_posts_template, it could call something like get_wire_posts_template_instance method that would create the instance if it doesn't yet exist.

Of course, creating instance methods for every single global variable would be overwhelming, but many of the global variables could be grouped together to create an object with settings.

Change History (2)

#1 @DJPaul
15 years ago

  • Milestone set to 1.1

#2 @apeatling
15 years ago

  • Resolution set to worksforme
  • Status changed from new to closed

Long term, sure, but the default theme and framework has fixed this issue for now.

Note: See TracTickets for help on using tickets.