ClassicPress PetitionsClassicPress Petitions
This is a read-only archive. Post or comment on the live version of this page on our forums.

Keep ClassicPress & WordPress versions separate in plugin readme header

5 months ago · zigpress

Right now the WordPress plugin readme header can have these elements (among others):

Requires at least: 4.9.5
Tested up to: 5.4

(the numbers shown are just examples)

These are used by the WordPress API when it returns plugin lists on the plugin-install.php admin page, to advise admins whether plugins are likely to work with their installation.

As I understand it, the unofficial but useful Code Potent Update Manager plugin specifies that the 'Requires at least' number should be the required ClassicPress version, but that the 'Tested up to' number should follow WordPress versioning (for example 4.9.99). I'm sure there's a good reason for this.

However, before the official ClassicPress plugin directory is built, I'd like to suggest that CP and WP versions are kept separate in the readme header, so that plugin authors who want to support both platforms can do so with one zip file.

For example, this is how it could work:

Requires at least: 4.9
Tested up to: 5.4
CP core min: 1.1.0
CP core max: 1.2

The first 2 lines above would be read and used by WordPress installations, but ignored by ClassicPress. The last 2 lines would be ignored by WordPress but used by ClassicPress.

Note that the last 2 lines are named very differently (while their purpose is still obvious) to avoid any possibility of the WordPress API using them.

And to maintain consistency with WordPress, if the CP core max value contains an "X.X" version number, it would be interpreted to mean "X.X.Anything".

Elisabetta Carrara (Emc2)

Makes sense. But also does not. In case the plugin relies heavily on gb presence it is pretty clear that two versions of it has to be served not to bloat one CMS with the code needed for the other.... IMHO (this is just my opinion, from a not-so-techie point of view. I think that having in CP a plugin bloated with WP stuff and viceversa Is not convenient)


Yes, this would be for plugins where the codebase doesn't leverage GB and can be (virtually) identical for either platform. There will be many such plugins.

James Nylen

Yes, this is going to be necessary for the CP directory. We would probably just re-use the same names: "ClassicPress requires at least" and "ClassicPress tested up to". In particular the "Tested up to" is not really a hard "max" version.

I am not very concerned about the WordPress API here, I would be pretty surprised if this caused issues. ClassicPress will also need to make sure it does not even ask for updates to plugins that were installed via the CP directory.