Search icon CANCEL
Subscription
0
Cart icon
Your Cart (0 item)
Close icon
You have no products in your basket yet
Save more on your purchases! discount-offer-chevron-icon
Savings automatically calculated. No voucher code required.
Arrow left icon
All Products
Best Sellers
New Releases
Books
Videos
Audiobooks
Learning Hub
Newsletter Hub
Free Learning
Arrow right icon
timer SALE ENDS IN
0 Days
:
00 Hours
:
00 Minutes
:
00 Seconds
Arrow up icon
GO TO TOP
Wordpress Web Application  Development

You're reading from   Wordpress Web Application Development Building robust web apps easily and efficiently

Arrow left icon
Product type Paperback
Published in May 2017
Publisher Packt
ISBN-13 9781787126800
Length 536 pages
Edition 3rd Edition
Languages
Arrow right icon
Author (1):
Arrow left icon
 Ratnayake Ratnayake
Author Profile Icon Ratnayake
Ratnayake
Arrow right icon
View More author details
Toc

Table of Contents (20) Chapters Close

Title Page
Credits
About the Author
About the Reviewer
www.PacktPub.com
Customer Feedback
Preface
1. WordPress as a Web Application Framework FREE CHAPTER 2. Implementing Membership Roles, Permissions, and Features 3. Planning and Customizing the Core Database 4. Building Blocks of Web Applications 5. Implementing Application Content Restrictions 6. Developing Pluggable Modules 7. Customizing the Dashboard for Powerful Backends 8. Adjusting Theme for Amazing Frontends 9. Enhancing the Power of Open Source Libraries and Plugins 10. Listening to Third-Party Applications 11. Integrating and Finalizing the Forum Management Application 12. Supplementary Modules for Web Development 13. Configurations, Tools, and Resources

Preface

The rise of WordPress-powered websites is one of the standout trends in the modern web development world. WordPress has taken over 25% of all the websites in the world. The power of the plugin-based architecture and the flexibility of the built-in features offered by WordPress has made developers use this framework for advanced web development. The official plugin directory contains over forty thousand plugins, covering most of the areas required in application development. Therefore, WordPress becomes one of the top solutions for rapid application development with existing plugins. This book will act as a comprehensive resource for building web applications with this amazing framework.

WordPress Web Application Development is a practical guide focused on incorporating and extending the core WordPress features into typical web application development. This book is structured toward building a complete web application from scratch. With this book, you will learn to use and extend WordPress core features to build a forum management application with the latest trending technologies.

This book follows a example-based approach while discussing each WordPress core modules, for pushing the limits of WordPress to create web applications beyond your imagination.

It begins by exploring the role of existing WordPress core features and discussing the reasons for choosing WordPress for web application development. As we move on, more focus will be put into adapting WordPress features into web applications with the help of an informal use-case-based model for discussing the most prominent built-in features.  Along with core features, you will also learn the integration of new features into existing features through plugins. While striving for web development with WordPress, you will also learn about the integration of popular client-side technologies, such as Backbone.js, Underscore, jQuery, and server-side technologies and techniques such as template engines and OpenAuth integration.

After reading this book, you will possess the ability to develop powerful web applications rapidly within limited time frames with the crucial advantage of benefiting low-budget and time-critical projects.

What this book covers

Chapter 1, WordPress As a Web Application Framework, walks you through the existing modules and techniques to identify their usage in web applications. Identification of WordPress features beyond the conventional CMS and planning the forum management application are the highlights of this chapter.

Chapter 2, Implementing Membership Roles, Permissions, and Features, covers the built-in user management features and user permission concepts. Beginning the development of forum management application, implementing basic user management features such as login, registration and introduction to the MVC process through custom routing are the highlights of this chapter.

Chapter 3, Planning and Customizing Core Database, serves as an extensive guide for understanding the core database structure and the role of custom database tables in web applications. Database querying with built-in functions, creating custom tables, and identifying the limitations in core database tables are the highlights of this chapter.

Chapter 4, Building Blocks of Web Applications, explores the possibilities of using custom post types to extend WordPress posts beyond its conventional usage. Managing custom post types, loading custom templates and learn to speed up development process with existing custom post type plugins are the highlights of this chapter.

Chapter 5, Implementing Application Content Restrictions, focuses on identifying the different user types in applications and the possibilities of providing different content permissions based on those user types. Applying content restrictions to WordPress core features, implementing basic content restriction techniques, and innovating new content restriction strategies are the highlights of this chapter.

Chapter 6, Developing Pluggable Modules, introduces the techniques of creating highly reusable and extensible plugins to enhance the flexibility of web applications. Developing various flexible plugins, handling plugin dependencies, and the use of WordPress actions and filters in applications are the highlight of this chapter.

Chapter 7, Customizing Dashboard for Powerful Backends, walks you through the process of customizing the WordPress admin panel for adding new features as well as changing existing features and design. Building flexible data lists with WordPress admin tables, designing an admin panel with various different techniques, and understanding useful admin section settings are the highlights of this chapter.

Chapter 8, Adjusting Theme for Amazing Frontends, dives into the techniques of designing amazing layouts, thereby opening them for future extension. Widgetizing layouts and building reusable templates are the highlights of this chapter.

Chapter 9, Enhancing the Power of Open Source Libraries and Plugins, explores the use of the latest trending open source technologies and libraries within and outside WordPress core . Integrating open authentication in to your web application, structuring the application at the client side, and identify the proper usage of open source plugins in application development, are the highlights of this chapter.

Chapter 10, Listening to Third-party Applications, demonstrates how to use WordPress XML-RPC API and REST API to create custom API’s for your web application. Building a simple XML-RPC API, identifying support for REST in WordPress core and building custom REST API’s are highlights of this chapter.

Chapter 11, Integrating and Finalizing Forum Management Application, guides you through the integration of modules and adds new features to the existing modules, while refactoring the code developed throughout this book. Identifying the use of proper theme templates and completing the features developed throughout the previous chapters are the highlights of this chapter

Chapter 12, Supplementary Modules for Web Development, introduces the advanced application features such as E-commerce, multisite, and the non-functional WordPress features that defines the quality of a web applications. Introduction to important concepts in application development, such as internationalization, caching, security, performance, version control, site migration, and testing are the highlight of this chapter.

Appendix, Configurations, Tools, and Resources, provides an application setup guide with necessary links to download the plugins and libraries used throughout the book.

What you need for this book

Technically, you need a computer, browser, and an Internet connection with the following working environment:

  • The Apache web server
  • PHP Version 5.4 or higher
  • WordPress Version 4.7.2
  • MySQL Version 5.6 or higher

Once you have the preceding environment, you can download the Responsive theme from http://wordpress.org/themes/responsive and activate it from the Themes section. Finally, you can activate the plugin developed for this book to get things started.

Refer to Appendix A, Configurations, Tools, and Resources, for the application setup guide, required software, and plugins.

Who this book is for

This book is intended for WordPress developers or designers, who know how to create a basic CMS site and looking for ways to learn the complex web application development in a reusable, maintainable, and modular way. Also, this book is quite useful for non-technical users who want to develop advanced applications by incorporating existing plugins. Basic knowledge of WordPress theme and plugin development is expected, although it’s not a must for experienced PHP developers to go through this book.

Conventions

In this book, you will find a number of text styles that distinguish between different kinds of information. Here are some examples of these styles and an explanation of their meaning.

Code words in text, database table names, folder names, filenames, file extensions, pathnames, dummy URLs, user input, and Twitter handles are shown as follows: "We can set additional parameters to the search query using $query->set function and restrict the search features to limited posts."

A block of code is set as follows:

    add_action('pre_get_posts', 'search_restrictions');
    function search_restrictions($query) {
      if($query->is_search && $query->is_main_query() && !is_admin()){ 
       $search_blocked_ids = array('24','100');
       $search_allowed_types = array('wpwaf_topic','wpwaf_forum');
       $query->set('post__not_in', $search_blocked_ids );
       $query->set('post_type', $search_allowed_types );
      }
      return $query;
    }

When we wish to draw your attention to a particular part of a code block, the relevant lines or items are set in bold:

    add_action('pre_get_posts', 'search_restrictions');
    function search_restrictions($query) {
      if($query->is_search && $query->is_main_query() && !is_admin()){ 
       $search_blocked_ids = array('24','100');
       $search_allowed_types = array('wpwaf_topic','wpwaf_forum');
       $query->set('post__not_in', $search_blocked_ids );
       $query->set('post_type', $search_allowed_types );
      }
      return $query;
    }

Any command-line input or output is written as follows:

select option_value from wp_users where option_name='wp_user_roles'

New terms and important words are shown in bold. Words that you see on the screen, for example, in menus or dialog boxes, appear in the text like this: "Clicking the Next button moves you to the next screen."

Note

Warnings or important notes appear in a box like this.

Note

Tips and tricks appear like this.

Reader feedback

Feedback from our readers is always welcome. Let us know what you think about this book-what you liked or disliked. Reader feedback is important for us as it helps us develop titles that you will really get the most out of.

To send us general feedback, simply e-mail [email protected], and mention the book's title in the subject of your message.

If there is a topic that you have expertise in and you are interested in either writing or contributing to a book, see our author guide at www.packtpub.com/authors.

Customer support

Now that you are the proud owner of a Packt book, we have a number of things to help you to get the most from your purchase.

Downloading the example code

You can download the example code files for this book from your account at http://www.packtpub.com. If you purchased this book elsewhere, you can visit http://www.packtpub.com/support and register to have the files e-mailed directly to you.

You can download the code files by following these steps:

  1. Log in or register to our website using your e-mail address and password.
  2. Hover the mouse pointer on the SUPPORT tab at the top.
  3. Click on Code Downloads & Errata.
  4. Enter the name of the book in the Search box.
  5. Select the book for which you're looking to download the code files.
  6. Choose from the drop-down menu where you purchased this book from.
  7. Click on Code Download.

Once the file is downloaded, please make sure that you unzip or extract the folder using the latest version of:

  • WinRAR / 7-Zip for Windows
  • Zipeg / iZip / UnRarX for Mac
  • 7-Zip / PeaZip for Linux

The code bundle for the book is also hosted on GitHub at https://github.com/PacktPublishing/Wordpress-Web-Application-Development-Third-Edition. We also have other code bundles from our rich catalog of books and videos available at https://github.com/PacktPublishing/. Check them out!

Errata

Although we have taken every care to ensure the accuracy of our content, mistakes do happen. If you find a mistake in one of our books-maybe a mistake in the text or the code-we would be grateful if you could report this to us. By doing so, you can save other readers from frustration and help us improve subsequent versions of this book. If you find any errata, please report them by visiting http://www.packtpub.com/submit-errata, selecting your book, clicking on the Errata Submission Form link, and entering the details of your errata. Once your errata are verified, your submission will be accepted and the errata will be uploaded to our website or added to any list of existing errata under the Errata section of that title.

To view the previously submitted errata, go to https://www.packtpub.com/books/content/support and enter the name of the book in the search field. The required information will appear under the Errata section.

Piracy

Piracy of copyrighted material on the Internet is an ongoing problem across all media. At Packt, we take the protection of our copyright and licenses very seriously. If you come across any illegal copies of our works in any form on the Internet, please provide us with the location address or website name immediately so that we can pursue a remedy.

Please contact us at [email protected] with a link to the suspected pirated material.

 

We appreciate your help in protecting our authors and our ability to bring you valuable content.

Questions

If you have a problem with any aspect of this book, you can contact us at [email protected], and we will do our best to address the problem.

lock icon The rest of the chapter is locked
Register for a free Packt account to unlock a world of extra content!
A free Packt account unlocks extra newsletters, articles, discounted offers, and much more. Start advancing your knowledge today.
Unlock this book and the full library FREE for 7 days
Get unlimited access to 7000+ expert-authored eBooks and videos courses covering every tech area you can think of
Renews at £13.99/month. Cancel anytime
Visually different images