﻿id,summary,reporter,owner,description,type,status,priority,milestone,component,version,severity,resolution,keywords,cc
23625,Add function to extract or parse chat as structured data,wonderboymusic,,"Scenarios

1. You have a blob of content representing a chat transcript and optionally some commentary and you want to extract the chat as structured data, and optionally, remove it from the content
2. You want to extract the chat from a post's content to theme it, with or without the optional commentary, outside of `the_content()`

Introduce `get_the_chat( $id = 0 )` and `get_content_chat( &$content, $remove = false )`

Here is an example to test:

{{{
$chat =<<<CHAT
Scott: Hey, let's chat!
	This is more text
Helen: No.

Nacin: Cool.

Scott: Hey, let's chat!
Helen: No.

Scott: Hey, let's chat!
Helen: No.

Scott: Hey, let's chat!
Helen: No.

This is the commentary on the chat.
CHAT;

print_r( get_content_chat( $chat, true ) );
echo $chat;
exit();
}}}

Here is the format of the structured chat data:

{{{
$stanzas = array(
      array(
          array(
              'author' => 'Scott',
              'messsage' => ""Hey, let's chat!""
          ),
          array(
              'author' => 'Helen',
              'message' => 'No.'
          )
      )
  )
}}}",feature request,closed,normal,3.6,Post Formats,,normal,fixed,has-patch needs-codex,mdhansen@… kontakt@…
