[wp-trac] [WordPress Trac] #23625: Add function to extract or parse chat as structured data

WordPress Trac noreply at wordpress.org
Mon Mar 4 02:51:55 UTC 2013


#23625: Add function to extract or parse chat as structured data
-----------------------------+------------------
 Reporter:  wonderboymusic   |       Owner:
     Type:  feature request  |      Status:  new
 Priority:  normal           |   Milestone:  3.6
Component:  Post Formats     |     Version:
 Severity:  normal           |  Resolution:
 Keywords:  has-patch        |
-----------------------------+------------------

Comment (by wonderboymusic):

 Refreshed against test scenarios. There is no `post_format_compat` for
 posts or themes that explicitly support the `chat` post format.
 `get_the_chat( $id = 0 )` or `get_content_chat( &$content, $remove = false
 )` can be used by themes that support `structured-post-formats` instead of
 calling `the_content()`. There are at least 8 scenarios that those
 functions have to consider:

 - One Stanza, no messages are multiline
 - One Stanza, no messages are multiline, followed by commentary
 - One Stanza, contains one of more multiline messages with or without `:`s
 that are not usernames
 - One Stanza, contains one of more multiline messages with or without `:`s
 that are not usernames, followed by commentary with or without `:`s that
 are not usernames
 - Multi-stanza, no messages are multiline
 - Multi-stanze, no messages are multiline, followed by commentary
 - Multi-stanza, contains one of more multiline messages with or without
 `:`s that are not usernames
 - Multi-stanza, contains one of more multiline messages with or without
 `:`s that are not usernames, followed by commentary with or without `:`s
 that are not usernames

 The resulting `array()` is a list of stanzas which each contain a list of
 messages, each is an associative array that contains `author` and
 `message` data

-- 
Ticket URL: <http://core.trac.wordpress.org/ticket/23625#comment:2>
WordPress Trac <http://core.trac.wordpress.org/>
WordPress blogging software


More information about the wp-trac mailing list