When a plugin adds custom content or inserts styling tags to a post or page's existing content, as was done in the previous recipe showing how to create an enclosing shortcode, it usually needs to load a custom style sheet to style these new elements. This recipe shows how to add a style sheet in the WordPress style queue to format the private output created in the previous recipe. This queue is processed when the page header is rendered, listing all the style sheets that need to be loaded to display the site correctly.
You should have already followed the Creating a new enclosing shortcode recipe to have a starting point for this recipe and the resulting plugin should still be active in your development site. Alternatively, you can download the resulting code (
Chapter 2/ch2-private-item-text/ch2-private-item-text.php) of that recipe from the Packt website (https://www.packtpub.com/support).