From 632285ee0c7d9b8aa89c1197739b5a521f9c5e9c Mon Sep 17 00:00:00 2001 From: jamaa Date: Mon, 20 May 2013 22:19:34 +0200 Subject: add the image size (in pixels) to the info module adds a new variable "show_size", so had to increment the version number to 3 --- modules/info/helpers/info_block.php | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'modules/info/helpers/info_block.php') diff --git a/modules/info/helpers/info_block.php b/modules/info/helpers/info_block.php index 62aa0746..f4fe5a6e 100644 --- a/modules/info/helpers/info_block.php +++ b/modules/info/helpers/info_block.php @@ -72,6 +72,13 @@ class info_block_Core { ); } } + if (($theme->item->width && $theme->item->height) && module::get_var("info", "show_size")) { + $info["size"] = array( + "label" => t("Size:"), + "value" => $theme->item->width . " x " . $theme->item->height + ); + } + $block->content->metadata = $info; module::event("info_block_get_metadata", $block, $theme->item); -- cgit v1.2.3