Download the PHP package mjkhajeh/changelog without Composer

On this page you can find all versions of the php package mjkhajeh/changelog. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.

FAQ

After the download, you have to make one include require_once('vendor/autoload.php');. After that you have to import the classes with use statements.

Example:
If you use only one package a project is not needed. But if you use more then one package, without a project it is not possible to import the classes with use statements.

In general, it is recommended to use always a project to download your libraries. In an application normally there is more than one library needed.
Some PHP packages are not free to download and because of that hosted in private repositories. In this case some credentials are needed to access such packages. Please use the auth.json textarea to insert credentials, if a package is coming from a private repository. You can look here for more information.

  • Some hosting areas are not accessible by a terminal or SSH. Then it is not possible to use Composer.
  • To use Composer is sometimes complicated. Especially for beginners.
  • Composer needs much resources. Sometimes they are not available on a simple webspace.
  • If you are using private repositories you don't need to share your credentials. You can set up everything on our site and then you provide a simple download link to your team member.
  • Simplify your Composer build process. Use our own command line tool to download the vendor folder as binary. This makes your build process faster and you don't need to expose your credentials for private repositories.
Please rate this library. Is it a good library?

Informations about the package changelog

MJ Changelog

A lightweight WordPress admin changelog viewer for plugins and themes.

MJ\Changelog\AbstractChangelog lets you add a dedicated changelog page to the WordPress admin area and show update notices after a product version changes. Changelog entries are stored as simple JSON files, so releases can be documented without creating custom database tables.

Features

Requirements

Installation

Composer

After the package is published on Packagist, install it with Composer:

Then load Composer's autoloader in your plugin or theme:

Replace mj/changelog with the final package name used on Packagist.

Manual Installation

You can also copy these files into your plugin or theme:

Then include the abstract class manually:

Basic Usage

Create a class that extends MJ\Changelog\AbstractChangelog, configure the static properties, return translated labels from i18n(), and call init().

The repository also includes a working example in example/example.php.

Changelog JSON Files

Each release needs a JSON file inside the directory configured by static::$dir.

File Name Format

Use this format:

Examples:

The class converts file names like V1_2_0_0.json to version 1.2.0.0.

File Content Format

Fields:

The included example file is available at example/V1_2_0_0.json.

Configuration

Your child class must define these static properties:

Property Description
$name Unique name used in generated notice CSS classes.
$dev_mode When true, loads {$js_file}.js; when false, loads {$js_file}.min.js.
$current_version Current product version.
$dir Directory path where changelog JSON files are stored.
$menu_parent WordPress admin parent menu slug, such as options-general.php.
$menu_slug Slug for the changelog submenu page.
$logo_url Logo URL displayed in the sidebar and update notice.
$css_url URL to changelog.min.css.
$js_file URL/path to the changelog script without .js or .min.js.
$rtl_page Product page URL used by the logo and rating button.
$last_updated_version_option_name WordPress option that stores the latest updated version.
$last_showed_changelog_option_name WordPress option that stores the latest version already shown to the user.

How Update Notices Work

AbstractChangelog::notice() compares two WordPress options:

If WordPress has a newer updated version than the last shown changelog version, the class loads all matching JSON changelog files and displays an admin notice.

After displaying notices, it updates $last_showed_changelog_option_name to $current_version.

You should update $last_updated_version_option_name from your own plugin or theme update logic when your product is upgraded.

Example:

Registered WordPress Hooks

Calling Changelog::init() registers these hooks:

Hook Method Purpose
admin_menu add_menu() Adds the changelog submenu page.
admin_enqueue_scripts enqueue() Loads CSS and JavaScript only on the changelog page.
admin_notices notice() Shows update notices when needed.

Assets

Included assets:

If $dev_mode is false, the class tries to load a minified JavaScript file named:

If you use production mode, create this minified file or change the enqueue logic to match your build process.

Notes

License

This project is licensed under the MIT License. See the LICENSE file or MIT License for details.


All versions of changelog with dependencies

PHP Build Version
Package Version
Requires php Version >=7.4
Composer command for our command line client (download client) This client runs in each environment. You don't need a specific PHP version etc. The first 20 API calls are free. Standard composer command

The package mjkhajeh/changelog contains the following files

Loading the files please wait ...