Skip to content

Instantly share code, notes, and snippets.

@dotherightthing
Created August 14, 2019 06:05
Show Gist options
  • Save dotherightthing/f2ff23c80fc7b78a688add23ea49eb61 to your computer and use it in GitHub Desktop.
Save dotherightthing/f2ff23c80fc7b78a688add23ea49eb61 to your computer and use it in GitHub Desktop.
[Plugins vs Theme functions] Reasons to create plugins. #wordpress

Plugins vs Theme functions

Created: 2017.07.09

Public Plugins

  • quick solution to problem
  • no insight into how to solve problems via WordPress programming

Theme functions

  • separate blocks of functionality into separate includes
  • faster to set up codebase (if plugins don't exist already)

Custom Plugins

  • separate out blocks of functionality to ensure that the system is not tightly coupled
  • make it easier to search and debug functionality after a period away from a project
  • centralise documentation of core functions and workarounds
  • share versioned code between projects
  • put common programming utilities in one place to keep the system DRY, efficient and predictable
  • reusable on other projects (maybe)
  • strict authoring criteria
  • can be bundled with themes as MU (Must Use) plugins
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment