Download the PHP package mercator/wn-themeupdater-plugin without Composer

On this page you can find all versions of the php package mercator/wn-themeupdater-plugin. 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 wn-themeupdater-plugin

Theme Updater

This is a WinterCMS plugin that supports the semi-automatic update of theme.

For the sake of this plugin, the term master theme relates to a theme template that that will be used in one or more websites. This template theme is located the themes directory of WinterCMS.

Note that themes installed with composer are not updated. In case you want your master theme to be re-installed in the latest version, use

instead.

The term child theme relates to a theme that is used by WinterCMS in displaying website content. The theme is again located in the themes directory of WinterCMS.

Installation

Use Composer to install the plugin by executing

Artisan commands

php artisan theme:copy master child

The command php artisan theme:copy master child produces a copy of the theme master and calls it child. Upon completion, it executes the script themekeeping/install.php located in the master theme, which allows modifications to the created child theme. See examples for a set of pre-defined commands.

php artisan theme:update master child

The command php artisan theme:update master child updates defined parts of the child theme with the master theme. It does so by calling the script themekeeping/install.php located in the child theme. See examples for a set of pre-defined commands.

Prepare your theme for auto updates

In the master theme, create a directory called themekeeping (themes housekeeping). This directory must one or both of the following files:

Commands

$updater->backup(location)

Backs up location of the child there to a temporary location. location can either be an individual file or a directory. location is relative to the root of the client, e.g., $updater->backup("asssts")backs up the assets directory.

$updater->restore(location)

Restores the directory or file specified in location to the child there. Again, location is relative to the root of the client, e.g., $updater->backup("asssts")backs up the assets directory.

$updater->remove(location)

Removes a file or directory from the child theme.

$updater->replace(location)

Replaces the file or directory from the child theme with the master theme after having first delete the file or directory in the child theme.

$updater->mastercopy(from, to )

Copies a file or directory from the master theme (from) to the child theme (to). Existing files will be overwritten.

$updater->childcopy(from, to )

Copies a file or directory locally in the child theme. Existing files will be overwritten. For example, if the master theme holds a config file in assets, that the user needs to adapt, you can copy it as follows:

And of course, you can use any other PHP command in install.php and update.php. The following two functions might come hany in that context:

$updater->master_path()

Returns the fully qualified name to the root directory of the master.

$updater->child_path()

Returns the fully qualified name to the root directory of the child.

file_exists_child(location)

Returns true if the file or directory exists in the child. False otherwise.

file_exists_master(location)

Returns true if the file or directory exists in the master. False otherwise.

Examples

If your theme follows a typical implementation, you often only want to update assets and theme.yaml. update.php would then look as follows

To update, call the following from the console:

If you want to update layouts from the master, but keep the existing default.htm, back it up and restore afterwards:

If you need to call a specific function yourFunction to configure a theme after it has been copied, your install.php could look as follows:

One more time

To get things running


All versions of wn-themeupdater-plugin with dependencies

PHP Build Version
Package Version
Requires php Version >=7.0
composer/installers Version ~1.0
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 mercator/wn-themeupdater-plugin contains the following files

Loading the files please wait ....