commit a6ba7562e756e70526a2d158f00ee6fea3164727 parent f7a57d10f077f0d99171e2b022b8d5e0bab08a40 Author: rsiddharth <rsiddharth@ninthfloor.org> Date: Sun, 27 Mar 2016 17:43:53 +0000 /utils.php: Add get_captions function. Diffstat:
utils.php | | | 9 | +++++++++ |
1 file changed, 9 insertions(+), 0 deletions(-)
diff --git a/utils.php b/utils.php @@ -35,6 +35,15 @@ function get_images($directory) { return $images; } +function get_captions($file) { + if(file_exists($file)) { + $json_string = file_get_contents($file); + if($json_string) + return json_decode($json_string, true); + } + return false; +} + function register($email, $other_email) { $to = $email; $other_to = $other_email;