convissor / oop-plugin-template-solution Goto Github PK
View Code? Open in Web Editor NEWA well engineered template for creating WordPress plugins using object-oriented programming practices. Uses Settings API, multisite, i18n, PHPUnit tests.
A well engineered template for creating WordPress plugins using object-oriented programming practices. Uses Settings API, multisite, i18n, PHPUnit tests.
Hi Daniel,
I want to start using your template because I want to start using TDD but it stops when it loads wp-load.php.
I've added a few echos and this is what I get:
$ phpunit tests reading LoginTest.php reading TestCase.php it's after loading wp variables it's after wp_mail function it's after wp_redirect function $
But I don't get the "it's after wp load.php".
Do you know what can be wrong? It's reading it because if I delete the file, I get the error "The plugin must be in the 'wp-content/plugins' directory of a working WordPress installation."
I'm on OSX, using MAMP with a successfully installed phpunit.
This is going to be my first TDD plugin project, but as you can see I've not changed much, only the names with the script you provide:
https://github.com/LuisHerranz/db-size-checker
Hello Daniel,
I appreciate the work you've done on creating this plugin template. I'm trying to create a plugin based on it, but discovered the following.
Maybe it's an idea to extend your plugin template with more option types? At this time, it is limited to input fields (strings), ints and radio buttons. So for example dropdown lists are not included, as wel as (multiple) checkboxes.
I've found a plugin which includes this very nice (also take a look at the section navigation tabs at the top). The plugin can be found on https://github.com/tareq1988/wordpress-settings-api-class.
Any ideas to extend the plugin to support more option types? Or to include this "class.settings-api.php" with your plugin?
Thank you in advance!
Glenn
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.