GithubHelp home page GithubHelp logo

convissor / oop-plugin-template-solution Goto Github PK

View Code? Open in Web Editor NEW
84.0 8.0 20.0 31 KB

A well engineered template for creating WordPress plugins using object-oriented programming practices. Uses Settings API, multisite, i18n, PHPUnit tests.

Shell 6.49% PHP 93.51%

oop-plugin-template-solution's People

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

oop-plugin-template-solution's Issues

It stops after requiring wp-load.php

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

Extend Settings API support

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

Unused local variable $admin_notices

Just reviewing the code, noticed the following.

Two lines set the value $admin_notices but the value is never read or used.
Line 130 and Line 134

Is there some functionality that has not been completed or should these be removed?

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.