[buddypress-trac] [BuddyPress Trac] #2432: display multiple messages / notices via bp_core_render_message

buddypress-trac noreply at wordpress.org
Thu Jul 3 11:33:23 UTC 2014


#2432: display multiple messages / notices via bp_core_render_message
-------------------------+-----------------------------
 Reporter:  aesqe        |       Owner:
     Type:  enhancement  |      Status:  new
 Priority:  normal       |   Milestone:  Future Release
Component:  Theme        |     Version:
 Severity:  normal       |  Resolution:
 Keywords:               |
-------------------------+-----------------------------
Changes (by boonebgorges):

 * severity:   => normal


Comment:

 Just found this ticket and still think it's a good idea, but it obviously
 needs a refresh. My proposal:

 - Use json_encode() to create the cookie value instead of base64. This
 will allow us to store structured data more reliably.
 - Store the cookie data like this:

 {{{
 [
     'success': [
         'This is the first success message in the stack',
         'This is the second'
     ],
     'error': [
         'Oh no! An error',
         'Sheesh! Another'
     ]
 ]
 }}}

 - When parsing for display, stack all the success messages in a single
 success box, and put all the error messages in a separate error box. (This
 will take some reworking of the way that content is sanitized, so that we
 can use, say, `<ul><li>` in the error box.)

 Only real concern here is backward compatibility. Any plugins or themes
 that are directly referencing the message values in the global or in the
 cookie will be broken. I'd be surprised if anyone were actually doing
 this, but still. There may be issues with creating more than one 'message'
 box, because I think we might use `#message` rather than `.message` (and
 breaking the selector will break custom styling). And if anyone has a
 message stored in their cookie prior to an upgrade, and then visits the
 site after the upgrade, it won't be displayed correctly (very very edge
 case that we can fail out of gracefully, I suppose).

 Anyone have thoughts about the above before I patch it?

--
Ticket URL: <https://buddypress.trac.wordpress.org/ticket/2432#comment:4>
BuddyPress Trac <http://buddypress.org/>
BuddyPress Trac


More information about the buddypress-trac mailing list