Download the PHP package plugin/pdc-leges without Composer

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

OWC PDC Leges

Getting started

Installation

For users

  1. Download the latest release from the releases page
  2. Unzip and move all files to the /wp-content/plugins/plugin-pdc-leges directory.
  3. Log into the WordPress admin and activate the 'PDC Leges' plugin through the 'plugins' menu

For developers

To contribute to this project, no dependencies are required. However, you will need to download Composer to run tests or create an optimized build of the plugin.

  1. Clone this repository to your machine and/or WordPress installation
  2. Use Composer (composer install) to install the dev dependencies
  3. Use NPM (npm install) to install de dev dependencies (node version defined in .nvmrc)

To create an optimized and zipped build, run the composer run package command. This requires Composer, rsync and zip to run.

Husky

We use Husky to manage our Git hooks. Husky helps to ensure that code quality is maintained by running scripts before certain Git actions, such as commits.

After you run npm install, Husky is automatically configured and ready to use. Before each commit, Husky will automatically run the composer run format command to ensure that your code is properly formatted. This helps maintain consistent code style and quality across the project.

To summarize:

  1. Automatic Setup: Husky is set up automatically when you run npm install.
  2. Pre-Commit Hook: Before committing, Husky runs composer run format to format the code.
  3. Ensures Code Quality: This pre-commit hook helps maintain consistent code style and quality.

By using Husky, we enforce code formatting rules, making collaboration easier and code more maintainable.

Commands

Since version 2.0.0, the commands have been replaced by WP Cron Events. This change requires less configuration on your server by eliminating the need to add server cron jobs. Just activate the plugin and you're all set. Remember to remove any previously configured cron jobs from your web server, as they have been deprecated since version 2.0.0.

REST API Endpoints

This plugin registers several REST API endpoints to retrieve information about "leges". Below is a description of the available endpoints and their corresponding parameters.

Endpoint: /wp-json/owc/pdc/v1/leges

Example Request:

Endpoint: /wp-json/owc/pdc/v1/leges/(?P<id>\d+)

Endpoint: /wp-json/owc/pdc/v1/leges/(?P<slug>[\w-]+)

WP Cron Events

Lege prices are automatically updated by a scheduled event registered by this plugin. Currently, this plugin registers one event, but more may be added in the future.

Event 'owc_pdc_leges_update_cron'

A lege has 3 settings:

The event queries all leges that have valid values in the "New lege price" and "Date active new lege price" fields. If the date in the "Date active new lege price" field has expired, the "Current lege price" field will be updated with the new price. If the update succeeds, the "New lege price" and "Date active new lege price" fields will be cleared.

Error Logging

Errors will be written to the WordPress debug.log file. To enable this, the WP_DEBUG constant needs to be defined as true. Currently, errors occurring while executing WP Cron Events are logged. In the future, logging will be expanded to cover the entire plugin at appropriate locations.

Filters & Actions

There are various hooks, which allows for changing the output.

Action for changing main Plugin object

Via the plugin object the following config settings can be adjusted

Filter the format of the shortcode output
Filter the output of the shortcode output
Add custom CMB2 metaboxes
Add meta values of custom CMB2 metaboxes to the output of the REST API
Filter allowed meta keys used for filtering the leges endpoint

Translations

If you want to use your own set of labels/names/descriptions and so on you can do so. All text output in this plugin is controlled via the gettext methods.

Please use your preferred way to make your own translations from the /wp-content/plugins/pdc-leges/languages/pdc-leges.pot file

Be careful not to put the translation files in a location which can be overwritten by a subsequent update of the plugin, theme or WordPress core.

We recommend using the 'Loco Translate' plugin. https://wordpress.org/plugins/loco-translate/

This plugin provides an easy interface for custom translations and a way to store these files without them getting overwritten by updates.

For instructions how to use the 'Loco Translate' plugin, we advise you to read the Beginner's guide page on their website: https://localise.biz/wordpress/plugin/beginners or start at the homepage: https://localise.biz/wordpress/plugin

Running tests

To run the Unit tests go to a command-line.

For code coverage report, generate report with command line command and view results with browser.

Contribution guidelines

Writing tests

Have a look at the code coverage reports to see where more coverage can be obtained. Write tests Create a Pull request to the OWC repository

Who do I talk to?

If you have questions about or suggestions for this plugin, please contact Holger Peters from Gemeente Buren.


All versions of pdc-leges with dependencies

PHP Build Version
Package Version
Requires php Version ^7.4|^8.0
plugin/pdc-base Version ^3.0
wp-cli/wp-cli Version ^2.0
wpackagist-plugin/cmb2 Version ^2.0
yahnis-elsts/plugin-update-checker Version ^5.1
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 plugin/pdc-leges contains the following files

Loading the files please wait ....