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”

What Will 2019 Bring For Gutenberg in WordPress

GutenbergBack towards the end of last year, I did a few posts on Gutenberg for WordPress. Since then there’s been a bit more clarity around what 2019 will bring for Gutenberg in WordPress.

A post on the Make WordPress blog explains how phase 2 will be about introducing Gutenberg to the Customizer:

Gutenberg phase 1 and 2

This means that the sidebar, widgets, and menus will all be moved to Gutenberg.

Assurances that the Classic Editor will be supported until 31st December 2021 are largely worthless, as Gutenberg will be rolling out into Customizer in 2019 and this will fundamentally change WordPress.

Themes already need to be updated for Gutenberg as a post editor; entire new themes, or huge rewrites, will be required when the Customizer changes.

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.

Is Newspack The Reason for Gutenberg in WordPress?

WordPressAutomattic/Wordpress.com have just announced Newspack by WordPress.com — A New Publishing Solution for News Organizations.

Newspack by WordPress.com is a new platform aimed at small and medium-sized news organisations, receiving a total of $2.4m funding, with half of that from from Google. Other contributors include The Lenfest Institute for Journalism, ConsenSys and The John S. and James L. Knight Foundation.

Google have a post on how a new publishing platform can help local news. I do wonder about the intentions behind this, as Google have a history of opposition from news organisations around the world who don’t like the aggregation which Google does.

Continue reading “Is Newspack The Reason for Gutenberg in WordPress?”

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.

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”