ClassicPress Plugins Available From azurecurve | Development in 2023: Snippets

ClassicPressIn this series of articles, I am going to introduce each of the plugins I have developed for ClassicPress, a hard-fork of WordPress, which was originally created to provide an alternative, yet compatible, CMS without the Gutenberg block editor.

The 42nd plugin is Snippets.

Snippets
Allows snippets of HTML, PHP, JavaScript and CSS to be created; an alternative to using a functions.php file or adding styles to a child theme.

Snippets can be used to create re-usable HTML or JavaScript snippets or to create PHP to add_actions or add_filters without needing to add them to the functions.php file or create a plugin.

The following types of snippet can be created:

  • HTML – can be loaded using the shortcode.
  • Internal CSS – automatically added as internal stylesheet.
  • CSS Stylesheet – automatically loaded.
  • Internal JavaScript – automatically added as internal JavaScript.
  • JavaScript File – automatically loaded.
  • PHP – can be loaded using the shortcode.
  • PHP File – automatically loaded.

Shortcode usage is either [snippet id=1013] (where the supplied id value is a snippet post_id) or [snippet slug='hello-world'].

All snippets are loaded only on the site frontend; this protects the admin dashboard from white screen errors caused by badly formed PHP.

Download

The current release of the plugin can be downloaded from GitHub

More information

More information on this plugin can be found on the azurecurve | Development page for the plugin.

Click to show/hide the ClassicPress Plugins Available From azurecurve | Development in 2023 Series Index

What should we write about next?

If there is a topic which fits the typical ones of this site, which you would like to see me write about, please use the form, below, to submit your idea.

Your Name

Your Email

Suggested Topic

Suggestion Details

Leave a Reply

Your email address will not be published. Required fields are marked *