CC106 02
CC106 02
CC106 02
Emerging Technologies
Slide_02
WordPress as an Application Framework
Content management systems like WordPress, Drupal, and Joomla often get left
out of the framework discussion, but in reality, WordPress (in particular) is
really great for what frameworks are supposed to be about: quickly building
applications.
Within minutes, you can set up WordPress and have a fully functional app with
user signups, session management, content management, and a dashboard to
monitor site activity.
The various APls, common objects, and helper functions are allow you to code
complex applications faster without having to worry about lower level systems
integration
WordPress as an Application Framework
The shows that right triangle from Mullengweg's 2013 'State of WordPress' presentation
depicting a table WordPress platform with a CMS layer built on top and a blogging application
built on top of the CMS layer. The reality is that the majority of the current WordPress
codebase supports the underlying application platform. You can think of each WordPress
release as an application framework with a sample blogging app bundled in
WordPress Basics
• There are a couple of reasons WordPress has gained so much popularity over
the years. The first is that WordPress is open source software and has an
entire community of people who are invested in improving it and continually
contributing new code to extend its functionality. WordPress users,
developers, and designers are always thinking of new creative ways to use
WordPress and creating plugins for these new features, which are then made
available to the community.
Let's take a quick top level look at the folders and files that are included within a typical
WordPress install.
Any time you find yourself wanting to hack a core WordPress file, think again. There is probably a
hook you could use to accomplish the same goal. lf there isn't a hook available to do what you
need, add one and try to get it added to core. The core WordPress developers are very responsive
about adding in new hooks and filters.
Directory Structure
• /wp-admin
This directory contains core directories and files for managing the WordPress admin interface. Another
key file in this directory is admin-ajax.php, which all AJAX requests should be run through.
• /wp-includes
This directory contains core directories and files for various WordPress functionality.
• /wp-content
This directory contains subdirectories for the plugins and themes you have installed on your site and
any media files you upload to your site. lf you create a plugin that needs to store dynamic files of its
own, it is a best practice to place them somewhere inlhe wp-content folder so they are included in a
content backup.
Directory Structure
• /wp-content/plugins
Any WordPress plugin you install on your WordPress site will be located in this directory. By
default, WordPress comes with the Hello Dolly and Akismet plugins.
• /wp-content/themes
Any WordPress themes you install on your WordPress site will be located in this directory By
default, WordPress comes with the Twenty Eleven, Twenty Twelve, Twenty Thirteen, and Twenty
Fourteen themes.
• /wp-content/uploads
Once you start uploading any photos or files to your media library, you will start seeing this
directory being populated with those uploaded files. All uploaded media is stored in the upload
directory.
Directory Structure
• /wp-content/mu-plugins
ln WordPress, you can force the use of any plugin by creating a mu-plugins directory inside of the
wp-content directory. This directory does not exist unless you create it, The 'mu" stands for "must
use," and any plugin you put in the mu-plugins folder will automatically run without needing to be
manually activated on the admin plugins page. ln fact, you won't even see any must use plugins
listed there.
Must use plugins are especially useful on multisite installs of WordPress so you can use plugins
that your individual network site admins wonl be able to deactivate.