Description
Check overriding authority to view this opted-in pageFor some pages we allow logged in users to see the content For others we still require them to have registered.
Usage
$bool = oiksp_check_authority( $atts );Parameters
- $atts
- ( array ) required – array of attributes – must include "oiksp_id" – the ID of the post being viewed
Returns
bool whether or not the user has authority to view this regardlessSource
File name: oik-squeeze/shortcodes/oik-squeeze.phpLines:
1 to 8 of 8
function oiksp_check_authority( $atts ) { $result = false; $userview = get_post_meta( $atts["oiksp_id"], "_oiksp_userview", true ); if ( $userview ) { $result = is_user_logged_in(); } return( $result ); }View on GitHub
