CHF32.70
Download steht sofort bereit
Extend WordPress with plugins using this advanced WordPress development book, updated for the current version
This significantly updated edition of Professional WordPress Plugin Development addresses modern plugin development for WordPress, the highly popular content management system (CMS). If you're using WordPress to create and manage websites, WordPress plugins are the software that can extend or enhance CMS functionality. This book offers guidance on writing plugins for WordPress sites to share or sell to other users.
The second edition of Professional WordPress Plugin Development covers the building of advanced plugin development scenarios. It discusses the plugin framework and coding standards as well as dashboards, settings, menus, and related application programming interfaces (APIs). Additional topics include security, performance, data validation, and SQL statements.
Learn about the power of hooks in WordPress
Discover how JavaScript and Ajax will work in your site
Understand key technologies: Block Editor/Gutenberg, JS/React, PHP, and the REST API
Create and use custom post types and taxonomies.
Creating custom dashboard menus and plugin settings
Work with users and user data
Schedule tasks and utilizing Cron
Performance and security considerations
Written by experienced plugin developers, Professional WordPress Plugin Development also helps you internationalize and localize your WordPress website. Find out about debugging systems and optimizing your site for speed. As WordPress use continues to increase, you can elevate your professional knowledge of how to extend WordPress through plugins.
Autorentext
About the authors Brad Williams is CEO and cofounder of WebDevStudios, a WordPress design and development firm. He is coauthor of Professional WordPress Design and Development. Justin Tadlock is a plugin and theme developer with over a decade of professional experience. He currently writes for WP Tavern. John James Jacoby has authored dozens of popular WordPress plugins and leads the development of bbPress and BuddyPress. He has contributed to every major WordPress version since 2008.
Klappentext
Required reading for WordPress plugin developers This is one of the most extensive available resources on developing plugins for WordPressthe world's most popular web content management system. The authors have prepared this updated edition, which builds from the basics of plugin development to more advanced scenarios. You'll follow a hands-on approach, with real-world examples covering situations you'll encounter as you develop custom plugins for your clients or your own sites. Additionally, you'll learn to write future-proof code that will continue to function well for years to come. Professional WordPress Plugin Development:
Inhalt
Introduction xxxi
Chapter 1: An Introduction to Plugins 1
What is a Plugin? 1
How Plugins Interact with WordPress 2
When are Plugins Loaded? 3
Available Plugins 4
Official Plugin Directory 4
Popular Plugin Examples 4
Popular Plugin Tags 5
Advantages of Plugins 5
Not Modifying Core 5
Why Reinvent the Wheel? 5
Separating Plugins and Themes 6
Easy Updates 7
Easier to Share and Reuse 7
Plugin Sandbox 7
Plugin Community 7
Installing and Managing Plugins 8
Installing a Plugin 8
Managing Plugins 9
Editing Plugins 9
Plugin Directories 9
Types of Plugins 10
Summary 11
Chapter 2: Plugin Framework 13
Requirements for Plugins 13
Naming Your Plugin 14
Using a Folder 14
Best Practices 14
Namespace Everything 14
File Organization 15
Folder Structure 16
Plugin Header 17
Creating the Header 17
Plugin License 18
Determining Paths 19
Plugin Paths 19
Local Paths 19
URL Paths 20
Activate/Deactivate Functions 22
Plugin Activation Function 22
Plugin Deactivation Function 23
Deactivate is Not Uninstall 23
Uninstall Methods 24
Why Uninstall is Necessary 24
Uninstall.php 24
Uninstall Hook 25
Coding Standards 25
Document Your Code 26
Naming Variables and Functions 27
Naming Classes and Methods 27
Naming Files 28
Single and Double Quotes 28
Indentation 28
Brace Style 29
Space Usage 29
Shorthand PHP 30
SQL Statements 30
Summary 30
Chapter 3: Dashboard And Settings 31
Adding Menus and Submenus 31
Creating a Top-Level Menu 32
Adding a Submenu 33
Adding a Menu Item to an Existing Menu 34
Plugin Settings 36
The Options API 36
Saving Options 36
Saving an Array of Options 37
Updating Options 37
Retrieving Options 38
Loading an Array of Options 39
Deleting Options 40
The Autoload Parameter 40
Segregating Plugin Options 41
Toggling the Autoload Parameter 42
The Settings API 42
Benefits of the Settings API 42
Settings API Functions 43
Creating the Plugin Administration Page 43
Registering New Settings 44
Defining Sections and Settings 44
Validating User Input 46
Rendering the Form 47
All Done! 48
Wrapping It Up: A Complete Plugin Management Page 48
Improving Feedback on Validation Errors 51
Expanding with Additional Field Types 52
Adding Fields to an Existing Page 59
How It Works 59
Adding a Section to an Existing Page 59
Adding Only Fields 60
WordPress' Sections and Setting Fields 61
User Interface Concerns 62
Removing Settings 62
Keeping It Consistent 63
Using the WordPress UI 64
Headings 64
Dashicons 64
Messages 65
Buttons 66
Form Fields 67
Tables 68
Pagination 69
Summary 70
Chapter 4: Security And Performance 71
Security Overview 72
What Securing Your Plugin is 72
What Securing Your Plugin is Not 72
User Permissions 72
How to Check current_user_can() 73
Do Not Check Too Early 73
Nonces 74
Authority vs. Intention 74
What is a Nonce? 75 <...