When developing WordPress plugins, comments in the plugin files – such as the version number – should adhere to the format specified by WordPress to ensure that the plugin functions correctly and can be updated seamlessly.
Specifically, the plugin file should contain comments similar to the one below, where Plugin Name、Plugin URI、Description、Author、Author URI、Version、License、License URI Required field:
/**
* Plugin Name: My Plugin
* Plugin URI: https://example.com/my-plugin/
* Description: A brief description of the plugin.
* Version: 1.0.0
* Author: John Doe
* Author URI: https://example.com/
* License: GPL-2.0-or-later
* License URI: https://www.gnu.org/licenses/gpl-2.0.html
*/In this example,Plugin Name The plugin name.Plugin URI The official website URL for the plugin.Description A brief description of the plugin.Version The plugin version number.Author The author's name of the plugin.Author URI The author's website address.License Plugin license,License URI The website URL for the license.
Please note that the version number must be used. x.x.x The format, where x For example, a number. 1.0.0If you need to update the plugin, please ensure that the new version number is written into the plugin file and update the plugin's version history. This helps users determine whether the plugin requires an update.