| 1 |
<?php |
| 2 |
if ($posts = get_posts ()) |
| 3 |
{ |
| 4 |
foreach ($posts as $post) |
| 5 |
{ |
| 6 |
if (!is_permitted_by_s2member ($post->ID, "post")) |
| 7 |
continue; |
| 8 |
/* Skip it. The current User/Member |
| 9 |
CANNOT access this particular Post. */ |
| 10 |
|
| 11 |
$post_or_page_id = $post->ID; |
| 12 |
if (!is_permitted_by_s2member ($post_or_page_id, "singular")) |
| 13 |
continue; |
| 14 |
/* The "singular" attribute can check both Pages and Posts the same time. |
| 15 |
So if this was actually a "Page", that would be valid, w/ "singular". */ |
| 16 |
} |
| 17 |
} |
| 18 |
?> |