azurecurve ClassicPress Plugins: BBCode

ClassicPress PluginsThis is part of the azurecurve ClassicPress Plugins which introduces the plugins I have available for ClassicPress.

The plugin I am going to cover in this post, is an existing one which has been standardised; BBCode.

Functionality

This plugin allows the use of bbcode to format posts and pages rather than HTML. BBCode may not be as popular as it was, but it is a fairly friendly way of formatting text.

Standard bbcodes are supported (full list of supported bbcodes can be found here).

You can combine this plugin with Shortcodes in Comments to allow your readers to use BBCodes when they leave a comment.

Download

The plugin can be downloaded via my Development site.

azurecurve ClassicPress Plugins: Avatars

ClassicPress PluginsThis is part of the azurecurve ClassicPress Plugins which introduces the plugins I have available for ClassicPress.

The plugin I am going to cover in this post, is a brand new one; Avatars.

Functionality

The Avatars plugin has three key pieces of functionality:

  • Upload an image file using an FTP client, to the plugins images folder, called CustomAvatar.png and, via the Discussion settings page, set this as the default avatar to replace the Gravatars used by default.
  • The admin can, via the plugin Settings page, set an option to allow only local avatars which will use the default avatar rather than any Gravatar a user might be using.
  • Users can upload their own avatar which is stored in the media library.

Demo

This site is using the Avatars plugin; you can see this in the first comment of this post where you can see my IG avatar.

Download

The plugin can be downloaded via my Development site.

azurecurve ClassicPress Plugins: Series Index

ClassicPress PluginsI’ve been involved with the ClassicPress project for a while now in a few different ways (such as writing FAQs and drafting plugin directory rules).

One of the things I have been working on is rewriting my plugins, to both improve the functionality and also to improve their adherence to coding standards and best practice. There was quite a few ways where I was not following best practice or where I had code which was not very secure.

Some plugins have had a near total rewrite while others have just been updated to do things in a more standardised and recommend way. Part of the reason I have done this, in fact been able to do this, is how welcoming and willing to offer advice the people in the ClassicPress community have been.

I have also written a number of new plugins which are all available for ClassicPress (they will also work with WordPress, but I have not submitted them to the WordPress Plugin Repository.

There have been quite a few people who have been willing to answer questions and offer assistance, but I will single out John Alarcon, known in the ClassicPress Community as Code Potent, who has gone out of his way to be of great help.

In this series of posts, I am going to give a brief introduction to each of the plugins I have available, along with links to plugin demos or examples and to my Development site where further details, download and support links are available.

Continue reading “azurecurve ClassicPress Plugins: Series Index”

WordPress/ClassicPress Plugin Development: Checking If Function Exists In Namespace

WordPress PluginI’ve been developing my own plugins for WordPress and, more reently, ClassicPress. At times it’s been necessary to check if a function exists.

It’s fairly straightforward to do this check:

if (!function_exists('azrcrv_get_breadrumbs')){
	// code here
}

I also use a few plugins developed by other people. One of the ones I’ve been reviewing recently is Estimated Read Time by CodePotent.

John uses namespaces in his plugins which means the check also needs to include the namespace. You can check for this using the following syntax (the highlighted section is the namespace defined in the plugin):

if (function_exists('CodePotent\EstimatedReadTime\process_shortcode')){
	// code here
}

I’m posting this as a reminder to myself as it took me a few minutes of searching before I found the right answer.

Migrating to ClassicPress: Using Migration Plugin With Unsupported WordPress Version

ClassicPressThis post is part of a series on migrating to ClassicPress from WordPress.

ClassicPress provide a migration plugin which you can use to migrate from WordPress to ClassicPress. The developers working on ClassicPress are also keeping the plugin updated for new releases of WordPress, but will lag a little behind as they need to wait for WordPress to release the new version before they can update the migration plugin.

I’ve been doing testing on ClassicPress and this has also included testing the plugin. Sometimes I’ve wanted to upgrade from an version not supported by the plugin.

The easiest way, in my experience, to use the plugin on a new version of WordPress before it is officially supported, is to amend the plugin to change the value to which the $wp_version_max parameter is being set:

admin-page.php showing line 318

Changing the value from 5.0.2 to 5.0.3 will allow the migration plugin to be run against the latest version of WordPress.

Instead of updating the plugin, you can also add the following line to your theme’s functions.php:

add_filter( 'classicpress_ignore_wp_version', '__return_true' );

I’ve tended to go with updating the plugin code, rather than adding the code to my functions file as I prefer to only have code in my theme that is for the benefit of the theme itself.

GitHub Announces New Unlimited Repos & Unitifed Enterprise Offering

GitHubI’ve recently been taking a look at ClassicPress and one of the subjects that came up was that it might, for the plugin directory, use GutHub instead of SVN like WordPress.

I create an account and started looking into creating repositories for my plugins. Hot all of my plugins are on that site however, as not all have been released to the public. Some of them are only going to be usable to me (for example plugins drive both the GP Table Reference and my distilleries website) and you were limited on GitHub to a certain number of private repositories.

However, GitHub yesterday announced the following:

  • GitHub Free now includes unlimited private repositories. For the first time, developers can use GitHub for their private projects with up to three collaborators per repository for free. Many developers want to use private repos to apply for a job, work on a side project, or try something out in private before releasing it publicly. Starting today, those scenarios, and many more, are possible on GitHub at no cost. Public repositories are still free (of course—no changes there) and include unlimited collaborators.
  • GitHub Enterprise is the new unified product for Enterprise Cloud (formerly GitHub Business Cloud) and Enterprise Server (formerly GitHub Enterprise). Organizations that want the flexibility to use GitHub in a cloud or self-hosted configuration can now access both at one per-seat price. And with GitHub Connect, these products can be securely linked, providing a hybrid option so developers can work seamlessly across both environments.

The second point isn’t relevant to me, but the first might be useful as it will allow me to store both my public and private plugins in the same place.

More details are available from the GitHub blog.

Migrating to ClassicPress: What About The Plugins and Themes I Use?

ClassicPressThis post is part of a series on migrating to ClassicPress from WordPress.

As ClassicPress is based off WordPress 4.9.8, all current, non-Gutenberg, WordPress plugins and themes will be compatible with ClassicPress.

A growing number of plugins are stating that they are and will continue to be compatible with ClassicPress. There is a < forum post listing plugins confirmed as working with ClassicPress v1 on the ClassicPress forums; this is not to say that other plugins won’t work, but they haven’t been confirmed yet. This thread will be maintained for v2 of ClassicPress as well, which is when potentially breaking changes could be introduced.

If you think you might migrate to ClassicPress and want to confirm if the plugins you use will be supported with it, reach out to the authors of your favourite plugins and ask them to support ClassicPress. There is even a sample email message you can adapt and use.

Migrating to ClassicPress: Backup Before Running the Migrate Plugin

ClassicPressThis post is part of a series on migrating to ClassicPress from WordPress.

Before running the migration plugin, it’s recommend to make a complete backup of your site; both files and database should have a good backup made. This isn’t particular to migrating to ClassicPress; I make the same recommendation for any process which is going to impact on files and/or database.

By a good backup, I mean verifying that the backup has worked (e.g. all the expected files are downloaded and the database backup file contains the relevant tables. Without this you won’t be able to restore in case of need.

Migrating to ClassicPress: ClassicPress Migration Plugin Now Supports WordPress 5

ClassicPressThis post is part of a series on migrating to ClassicPress from WordPress.

I mentioned yesterday that the ClassicPress migration plugin was not ready yet for WordPress v5, but was coming soon.

Apparently I should have waited a day and posted today, as the migration plugin is now supported with WordPress 5.

Migrating to ClassicPress: Run ClassicPress Migration Plugin

ClassicPressThis post is part of a series on migrating to ClassicPress from WordPress.

With the migration plugin installed, the next step is to complete the site migration.

The activated plugin is available from the Tools menu in the sidebar; select Switch to ClassicPress:

Migration Plugin on Tools menu - Switch to ClassicPress

Continue reading “Migrating to ClassicPress: Run ClassicPress Migration Plugin”