Laura Pigott

PORTFOLIO

Financial Reporter

December 2016


The aim of this project was to create a WordPress theme, that would allow for employees to register as subscribers and submit expense claims for approval. Employers were then to be given a higher level of access, so that they could approve or reject these expenses. This project was created using HTML, CSS, PHP, SQL, PDO, Bootstrap and WordPress 4.6.1.

View Project Development
Project Image

Interesting Parts


  • All requests to the server are made via AJAX requests, including the upload of receipts (images, PDFs etc.). This is not currently possible in libraries such as JQuery, and was custom written as part of this project
  • All pages required for the theme are dynamically created when the theme is activated, and deleted when the theme is deactivated
  • The structure of the theme is written with an OOP (Object Oriented Programming) approach, with separate classes created for each significant component i.e. the Database class allows the one connection to be shared across every area of the site
  • All theme tables are generated dynamically when the theme is activated. Admins have the choice of whether these tables will be removed upon theme deactivation
Project Image

What I learned


  • How to send media items using custom written AJAX requests in vanilla JavaScript
  • How to use WordPress hooks and filters to leverage the event cycle of the WordPress API
  • How to implement AJAX within the WordPress API, by including the action in the request body, creating an action on the server side to detect the request. Learned the hard way that in order to make these requests using a XMLHttpRequest in vanilla JavaScript, the "X-Requested-With" header must be explicitly set to "XMLHttpRequest".
  • This project gave me the opportunity to explore the WordPress API in depth, which helped to enhance my overall knowledge of PHP
Project Image