Skip to content

Instantly share code, notes, and snippets.

View millipedia's full-sized avatar

millipedia millipedia

View GitHub Profile
@millipedia
millipedia / calculate_reading_time.php
Last active December 20, 2021 12:23
Processwire hook to calculate article reading time
<?php
/**
*
* Calculate reading time on page save.
* Add this to your ready.php file.
* Uses a field called 'article_read_time' to store the value
* and the field 'page_content' as the readable content.
* You'll need to update those field names if yours are different.
*
@millipedia
millipedia / import_example.php
Created September 10, 2021 11:47
Processwire example import scrip
<?php namespace ProcessWire;
/**
*
* Import images from a CSV from WP (or wherever).
* In this case CSV has image path and page alias.
*
*/
include("index.php");