source/php/Module/Posts/Posts.php
public static function getManualInputPosts($data)
    {
        $posts = array();

        foreach ($data as $key => $item) {
            $posts[] = array_merge((array)$item, array(
                'ID' => $key,
                'post_name' => $key,
                'post_excerpt' => $item->post_content
            ));
        }

        $posts = json_decode(json_encode($posts));

        return $posts;
    }
public static function getManualInputPosts($data)
    {
        $posts = array();

        foreach ($data as $key => $item) {
            $posts[] = array_merge((array)$item, array(
                'ID' => $key,
                'post_name' => $key,
                'post_excerpt' => $item->post_content
            ));
        }

        $posts = json_decode(json_encode($posts));

        return $posts;
    }
public static function getManualInputPosts ( $ data ) { $ posts = array ( ) ; foreach ( $ data as $ key => $ item ) { $ posts [ ] = array_merge ( ( array ) $ item , array ( 'ID' => $ key , 'post_name' => $ key , 'post_excerpt' => $ item -> post_content ) ) ; } $ posts = json_decode ( json_encode ( $ posts ) ) ; return $ posts ; }
"Fake" WP_POST objects for manually inputted posts
@param  array $data The data to "fake"
@return array        Faked data
Fake WP_POST objects for manually inputted posts