Skip to content

Instantly share code, notes, and snippets.

What would you like to do?
function wbxp_member_check_shortcode( $atts, $content = null ) {
$infotext = 'Please <a href="/wp-login.php">Login</a> to <b>Download the PDF</b> file.';
if ( is_user_logged_in() && !is_feed() ) {
return wpautop(do_shortcode($content));
else {
return '<blockquote>' . html_entity_decode($infotext) . '</blockquote>';
add_shortcode('member', 'wbxp_member_check_shortcode');
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment