Giter Club home page Giter Club logo

sample-wordpress-plugin's Introduction

Sample WordPress Plugin

This project is intended to be an introduction to plugin development, starting with a very simple plugin and then refactoring multiple times.

The problem:

Our client runs a blog in which most posts contain affiliate links. We have told our client that every post containing these links must contain a disclaimer, as per FTC Guidelines. Our client realizes that every time they miss a disclosure, it could cost them up to $16,000.

The solution:

We both agree that it is best to include a discolsure automatically for every blog post.

Repository folder guide:

(Each subfolder in this repository is the same plugin, but refactored in one way or another )

  • 1-basic-plugin

    This is the most basic version of our plugin. It gets the job done, but it can be optimized a bit.

  • 2-output-buffer

    We decided our code could be a little cleaner, so we use an output buffer.

  • 3-separate-view-and-logic

    We really want to avoid mixing logic and views, so we will put our view in a partials folder.

  • 4-internationalization-and-sanitization

    Our client would really like to use this in the future on another site that is in Spanish, so let's make that a possibility right from the start. We need to make sure to sanitize all translations, too!

sample-wordpress-plugin's People

Contributors

nateconley avatar

Stargazers

Jeffrey Zinn avatar

Watchers

 avatar

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.