Similar to a filter function, enclosing shortcodes receive a copy of the text that has been wrapped with the new tags. It is then possible to return this text with additional HTML code, or completely replace it with new content. In this specific case, we used the is_user_logged_in WordPress function to determine whether the current visitor is logged in to the site. Based on the result of that query, the code determines whether the original content should be displayed with some additional styling code, or if the visitor should see a message encouraging them to join the website.