$posts = wp_cache_get( 'mycache-recent-photos' );
if ($posts == false) {
$posts = get_posts(array(
//"showposts"=>-1,
//"what_to_show"=>"posts",
"post_status"=>"inherit",
"numberposts"=>$rp_settings['rp_number'],
"post_type"=>"attachment",
"post_mime_type"=>"image/jpeg,image/gif,image/jpg,image/png",
"orderby"=>"menu_order ASC, ID ASC" ));
//Rev 0.0.2 - Adding Random feature
//Random feature if it is selected
wp_cache_set( 'mycache-recent-photos', $posts,'recent', 3600 ); // save feed content to key "mycache"
}
]]>
it shows the last X attachments. not only photos. and the randomize function only shuffles those pics around. not what I was looking for.
]]>