From e6e91e3eb607bb79dbca46b2a06aaea9c4534311 Mon Sep 17 00:00:00 2001 From: John Bintz Date: Thu, 19 Nov 2009 21:04:01 -0500 Subject: [PATCH] didn't add file --- docs/en_US/media-embed-template-tags.html | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) create mode 100644 docs/en_US/media-embed-template-tags.html diff --git a/docs/en_US/media-embed-template-tags.html b/docs/en_US/media-embed-template-tags.html new file mode 100644 index 0000000..900e3c8 --- /dev/null +++ b/docs/en_US/media-embed-template-tags.html @@ -0,0 +1,23 @@ +

Media Embedding Template Tags

+ +

+ ComicPress Core provides a handful of template tags to access the media attached to each post. +

+ +

M()

+ +

+ M() 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: +

+ +
+// 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());
+