didn't add file

This commit is contained in:
John Bintz 2009-11-19 21:04:01 -05:00
parent 8aed3b1727
commit e6e91e3eb6
1 changed files with 23 additions and 0 deletions

View File

@ -0,0 +1,23 @@
<h1>Media Embedding Template Tags</h1>
<p>
<em>ComicPress Core</em> provides a handful of template tags to access the media attached to each post.
</p>
<h2>M()</h2>
<p>
<code>M()</code> retrieves the attachment info from the current post.
Attachment info is returned as an array of IDs that the various backends can identify and work with:
</p>
<pre class="prettyprint lang-php">
// we're in a Loop, so grab the current post's media and embed it
foreach (M() as $image) { echo EM($image); }
// we have a post and want its media
$first_post = R('first');
foreach (M($first_post) as $image) { echo EM($image); }
var_dump(M());
</pre>