0
votes
2answers
159 views

Syntax for a function in order to get post's title in JSON encoded response [closed]

I use the following code in functions.php in order to obtain all the images attached to a post so I can retrieve them via AJAX. <?php function get_all_images($post_id=0, $size='bigger', ...
-2
votes
1answer
327 views

How can I json_encode the output of my function?

How can I json_encode the output of this function I use to get all attached images of a post? <?php function get_all_images($postid=0, $size='bigger', $attributes='') { if ($postid<1) ...