function ess_api_random($request) { $instance = $request->get_param('instance') ?: 'default'; $category = $request->get_param('category'); $exclude_post_id = $request->get_param('exclude_post_id'); $args = array( 'post_type' => 'post', 'post_status' => 'publish', 'posts_per_page' => 1, 'orderby' => 'rand', 'no_found_rows' => true, ); if (!empty($category)) { $args['category_name'] = $category; } if (!empty($exclude_post_id)) { $args['post__not_in'] = array((int) $exclude_post_id); } $posts = get_posts($args); if (empty($posts)) { return array('error' => 'No stories found'); } $post = $posts[0]; $categories = wp_get_post_categories($post->ID, array('fields' => 'names')); $category_list = implode(', ', $categories); if (!empty($post->post_excerpt)) { $excerpt = wp_trim_words($post->post_excerpt, 55, '...'); } else { $words = explode(' ', strip_tags($post->post_content)); $first_40_words = implode(' ', array_slice($words, 0, 40)); $excerpt = $first_40_words . '...'; } return array( 'id' => $post->ID, 'title' => $post->post_title, 'excerpt' => $excerpt, 'link' => get_permalink($post->ID), 'image' => get_the_post_thumbnail_url($post->ID, 'large'), 'impression_id' => 0, 'categories' => $category_list ); }
On a soft little bed, by an open window, sat a teddy bear named Bunno. He had soft brown fur and one button eye that sparkled in the moonlight.
Every night, Bunno sat on the windowsill and looked up at the stars.
"My friend Aru used to count stars with me," Bunno said quietly. "But she moved far away. I miss her."
A little firefly landed on the windowsill beside him. "Why do you look so sad, Bunno?"
"I feel lonely," said Bunno. "Aru isn't here anymore. Maybe she's forgotten all about me."
The firefly blinked her soft light. "Do you see that bright star up there?"
Bunno looked up. One star shone brighter than all the others.
"That's the same star Aru sees too," said the firefly. "Even far away, you're both looking at the very same sky."
Bunno thought about this. "Do you really think she's looking at it right now?"
"I think," said the firefly gently, "that the people who love us think of us more than we know."
Just then, far away in another room, a little girl named Aru looked out of her own window. She smiled and whispered, "Goodnight, Bunno. I hope you're watching the stars too."
Bunno didn't hear her words. But somehow, his heart felt warm and full.
He hugged his soft paw close to his chest and looked at the bright star one more time.
"Goodnight, Aru," he whispered. "I knew you wouldn't forget."
And under the same wide sky, two friends, far apart, fell asleep happy.
MCQs
True/False
Fill in the Blanks
Short Answer Questions
Finish the worksheet first, then reveal the answer key to check your work.
This short delay helps you finish the worksheet before peeking.Join our readers by email and WhatsApp. Free, no spam.