Жанры
Авторы
Контакты
О сайте
Книжные новинки
Популярные книги
Найти
Главная
Авторы
Brad Williams
Professional WordPress Plugin Development
Читать книгу Professional WordPress Plugin Development - Brad Williams - Страница 1
Оглавление
Предыдущая
Следующая
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
...
115
Оглавление
Купить и скачать книгу
Вернуться на страницу книги Professional WordPress Plugin Development
Оглавление
Страница 1
Table of Contents
List of Tables
List of Illustrations
Guide
Pages
PROFESSIONAL WORDPRESS
®
PLUGIN DEVELOPMENT
FOREWORD
Страница 9
1 An Introduction to Plugins WHAT'S IN THIS CHAPTER?
WHAT IS A PLUGIN?
How Plugins Interact with WordPress
When Are Plugins Loaded?
AVAILABLE PLUGINS
Official Plugin Directory
Popular Plugin Examples
Popular Plugin Tags
ADVANTAGES OF PLUGINS
Not Modifying Core
Why Reinvent the Wheel?
Separating Plugins and Themes
Easy Updates
Easier to Share and Reuse
Plugin Sandbox
Plugin Community
INSTALLING AND MANAGING PLUGINS
Installing a Plugin
Managing Plugins
Editing Plugins
Plugin Directories
Types of Plugins
SUMMARY
2 Plugin Framework WHAT'S IN THIS CHAPTER?
CODE DOWNLOADS FOR THIS CHAPTER
REQUIREMENTS FOR PLUGINS
Naming Your Plugin
Using a Folder
BEST PRACTICES
Namespace Everything
File Organization
Folder Structure
PLUGIN HEADER
Creating the Header
Plugin License
DETERMINING PATHS
Plugin Paths
Local Paths
URL Paths
ACTIVATE/DEACTIVATE FUNCTIONS
Plugin Activation Function
Plugin Deactivation Function
Deactivate Is Not Uninstall
UNINSTALL METHODS
Why Uninstall Is Necessary
Uninstall.php
Uninstall Hook
CODING STANDARDS
Document Your Code
Naming Variables and Functions
Naming Classes and Methods
Naming Files
Single and Double Quotes
Indentation
Brace Style
Space Usage
Shorthand PHP
SQL Statements
SUMMARY
3 Dashboard and Settings WHAT'S IN THIS CHAPTER?
CODE DOWNLOADS FOR THIS CHAPTER
ADDING MENUS AND SUBMENUS
Creating a Top‐Level Menu
Adding a Submenu
Adding a Menu Item to an Existing Menu
PLUGIN SETTINGS
THE OPTIONS API
Saving Options
Saving an Array of Options
Updating Options
Retrieving Options
Loading an Array of Options
Deleting Options
The Autoload Parameter
Segregating Plugin Options
Toggling the Autoload Parameter
THE SETTINGS API
Benefits of the Settings API
Settings API Functions
Creating the Plugin Administration Page
Registering New Settings
Defining Sections and Settings
Validating User Input
Rendering the Form
All Done!
Wrapping It Up: A Complete Plugin Management Page
Improving Feedback on Validation Errors
Expanding with Additional Field Types
Adding Fields to an Existing Page
How It Works
Adding a Section to an Existing Page
Adding Only Fields
WordPress’ Sections and Setting Fields
User Interface Concerns
Removing Settings
KEEPING IT CONSISTENT
Using the WordPress UI
Headings
Dashicons
Messages
Buttons
Form Fields
Tables
Pagination
SUMMARY
{buyButton}
Подняться наверх