get_id example


    protected static function prepare_simplepie_object_for_cache($data)
    {
        $items = $data->get_items();
        $items_by_id = array();

        if (!empty($items))
        {
            foreach ($items as $item)
            {
                $items_by_id[$item->get_id()] = $item;
            }

            if (count($items_by_id) !== count($items))
            {
                $items_by_id = array();
                foreach ($items as $item)
                {
                    $items_by_id[$item->get_id(true)] = $item;
                }
            }

            
Home | Imprint | This part of the site doesn't use cookies.