Install
This is the repository archive. It installs, but the folder name will carry the branch suffix and updates will not flow.
Install straight from GitHub with WP-CLI:
wp plugin install https://github.com/considbrs-webdev/pitea-customisation/archive/refs/heads/main.zipOn Packagist as considbrs-webdev/pitea-customisation:
composer require considbrs-webdev/pitea-customisationNo built-in updater. New versions won't appear under Dashboard → Updates. Install new releases yourself, or let Git Updater track the repository.
A WordPress plugin for custom functionality and modifications for the Pitea WordPress installation.
Features
- Modular PHP architecture with Composer autoloading
- Vite for modern CSS and JavaScript building
- SCSS support with variables and mixins
- Separate frontend and admin asset bundles
Requirements
- PHP 8.0+
- Node.js 18+
- Composer
Installation
-
Navigate to the plugin directory:
cd wp-content/plugins/pitea-customisation -
Install PHP dependencies:
composer install -
Install Node.js dependencies:
npm install -
Build assets:
npm run build -
Activate the plugin in WordPress admin.
Development
Watch for changes
npm run dev
Or for production watch:
npm run watch
Build for production
npm run build
Adding Custom Classes
-
Create a new PHP class in
source/php/Customisations/:<?php namespace PiteaCustomisation\Customisations; class MyCustomClass { public function __construct() { // Your hooks and initialization here } } -
Register the class in
source/php/App.php:private function registerInstances(): void { $classes = [ Customisations\IconReplacer::class, Customisations\MyCustomClass::class, // Add your class here ]; // ... } -
Run
composer dump-autoloadto update the autoloader.
Directory Structure
pitea-customisation/
├── dist/ # Built assets (generated)
├── source/
│ ├── js/
│ │ ├── main.js # Frontend JavaScript entry
│ │ └── admin.js # Admin JavaScript entry
│ ├── php/
│ │ ├── App.php # Main plugin class
│ │ └── Customisations/ # Custom functionality classes
│ │ └── IconReplacer.php
│ └── sass/
│ ├── style.scss # Frontend styles entry
│ ├── admin.scss # Admin styles entry
│ └── abstracts/ # Variables, mixins, etc.
├── composer.json
├── package.json
├── vite.config.js
└── pitea-customisation.php # Main plugin file
License
MIT