This document provides an overview of WordPress and discusses how it can be used as a web application framework. It describes key aspects of the WordPress data model including custom post types, post meta, taxonomies, and relationships. It also covers templates, querying data, users, internationalization, AJAX, APIs, caching, and rewrite rules. Both advantages like its large community and plugins as well as disadvantages like performance overhead are acknowledged.
6. A web application framework is a software
framework that is designed to support the
development of dynamic websites, web applications,
web services and web resources. The framework
aims to alleviate the overhead associated with
common activities performed in web development.
For example, many frameworks provide libraries for
database access, templating frameworks and session
management, and they often promote code reuse.
from Wikipedia (2015, May 9)
8. • Custom Post Types
• Post Meta
• Taxonomies
• Posts 2 Posts
9. Custom Post Types
• Represent the model definition
• You can define:
• some content fields
• visibility (queryable, searchable, show in menus…)
• capabilities
• hierarchical
• rewrites & query vars
register_post_type( $post_type, $args );
10. Post Meta
• Adds extra fields to the model
• Extends the basic model data (title, editor,
image…) with extra fields (wysiwyg, embed,
field groups, repeatable fields…
• Plugins: CMB2, ACF, Custom-Meta-Boxes
11. Taxonomies
• Custom taxonomies
• Custom taxonomies can be attached to specific
content types
register_taxonomy( $taxonomy, $object_type, $args );
12. Posts 2 Posts
• Plugin
• Creates relationships between content types (including users)
• Supports cardinality
• Allows relationship meta data.
• Development of the plugin has not been active
• @link https://wordpress.org/plugins/posts-to-posts/
19. Users
• Supports user roles
• Supports user capabilities
• User information can be extended
• New roles and capabilities can be created
• Meta capabilities can be created
• Authentication method can be changed using hooks
30. WP REST API
• Provides a HTTP REST API to interact with WordPress
• Posts, Post Meta, Users, Media… can be created, read, changed, and deleted
• Basic Authentication and Oauth are available
• Currently the API is available as a plugin but soon it will be part of the WordPress core
• @link http://wp-api.org/
GET /posts
GET /posts/<id>
*POST /posts
*PUT /posts/<id>
*POST /posts/<id>/meta
32. Transients API
• Core API
• Similar to the Options API
• Data can be stored in the database, Redis,
Memcached…
• Can be used on the network level and site level
37. Rewrite API
• Allows you to create new rewrite rules and
permalink structures programatically
• You can create “pages” without having to create
a page in the dashboard.
• Uses WP_Rewrite API
40. More Tools
• WP_Error
• Options API
• Filesystem API
• Settings API
• Shortcode API
• Input Validation & Output Sanitization
• Media Management Functions
• Custom Post Statuses
• …