万本电子书0元读

万本电子书0元读

顶部广告

WordPress Plugin Development Cookbook - Second Edition电子书

售       价:¥

10人正在读 | 0人评论 9.8

作       者:Yannick Lefebvre

出  版  社:Packt Publishing

出版时间:2017-07-26

字       数:46.5万

所属分类: 进口书 > 外文原版书 > 电脑/网络

温馨提示:数字商品不支持退换货,不提供源文件,不支持导出打印

为你推荐

  • 读书简介
  • 目录
  • 累计评论(0条)
  • 读书简介
  • 目录
  • 累计评论(0条)
Learn to create plugins for WordPress 4.x to deliver custom projects or share with the community through detailed step-by-step recipes and code examples About This Book ? Learn how to change and extend WordPress to perform virtually any task ? Explore the plugin API through approachable examples and detailed explanations ? Mold WordPress to your project’s needs or transform it to benefit the entire community Who This Book Is For If you are a WordPress user, developer, or a site integrator with basic knowledge of PHP and an interest to create new plugins to address your personal needs, client needs, or share with the community, then this book is for you. What You Will Learn ? Discover how to register user callbacks with WordPress, forming the basis of plugin creation ? Explore the creation of administration pages and adding new content management sections through custom post types and custom database tables ? Improve your plugins by customizing the post and page editors, categories and user profiles, and creating visitor-facing forms ? Make your pages dynamic using Java*, AJAX and adding new widgets to the platform ? Learn how to add support for plugin translation and distribute your work to the WordPress community In Detail WordPress is a popular, powerful, and open Content Management System. Learning how to extend its capabilities allows you to unleash its full potential, whether you're an administrator trying to find the right extension, a developer with a great idea to enhance the platform for the community, or a website developer working to fulfill a client's needs. This book shows readers how to navigate WordPress' vast set of API functions to create high-quality plugins with easy-to-configure administration interfaces. With new recipes and materials updated for the latest versions of WordPress 4.x, this second edition teaches you how to create plugins of varying complexity ranging from a few lines of code to complex extensions that provide intricate new capabilities. You'll start by using the basic mechanisms provided in WordPress to create plugins and execute custom user code. You will then see how to design administration panels, enhance the post editor with custom fields, store custom data, and modify site behavior based on the value of custom fields. You'll safely incorporate dynamic elements on web pages using *ing languages, and build new widgets that users will be able to add to WordPress sidebars and widget areas. By the end of this book, you will be able to create WordPress plugins to perform any task you can imagine. Style and approach This cookbook will take you through the creation of your first simple plugin to adding entirely new sections and widgets in the administration interface, so you can learn how to change and extend WordPress to perform virtually any task. Each topic is illustrated through realistic examples showing how to solve common problems, followed by detailed explanations of all concepts used
目录展开

Title Page

Second Edition

Copyright

WordPress Plugin Development Cookbook

Second Edition

Credits

About the Author

About the Reviewers

www.PacktPub.com

Why subscribe?

Customer Feedback

Dedication

Preface

What this book covers

What you need for this book

Who this book is for

Conventions

Reader feedback

Customer support

Downloading the example code

Errata

Piracy

Questions

Preparing a Local Development Environment

Introduction

Installing a web server on your computer

How to do it...

How it works...

There's more...

Creating a remote web development environment

See also

Downloading and configuring a local WordPress installation

Getting ready

How to do it...

How it works...

Creating a local Subversion repository

How to do it...

How it works...

There's more...

Manual repository creation

Other version control systems

See also

Importing initial files to a local Subversion repository

Getting ready

How to do it...

How it works...

See also

Checking out files from a Subversion repository

Getting ready

How to do it...

How it works...

There's more...

Subversion file statuses

See also

Committing changes to a Subversion repository

Getting ready

How to do it...

How it works...

There's more...

Viewing the differences in modified files

Updating files to latest repository version

Reverting uncommitted file changes

Viewing file history

Installing a dedicated code editor/text editor

Getting ready

How to do it...

How it works...

Plugin Framework Basics

Introduction

Creating a plugin file and header

Getting ready

How to do it...

How it works...

See also

Adding output content to page headers using plugin actions

How to do it...

How it works...

There's more...

Action hooks online listings

Searching for hooks in the WordPress source code

See also

Using WordPress path utility functions to load external files and images

How to do it...

How it works...

There's more...

See also

Modifying the site generator meta tag using plugin filters

How to do it...

How it works...

There's more...

preg_replace function

Filter hooks online listings and the apply_filters function

See also

Adding text after each item's content using plugin filters

How to do it...

How it works...

There's more...

get_the_title and get_permalink functions

See also

Inserting link statistics tracking code in page body using plugin filters

Getting ready

How to do it...

How it works...

See also

Troubleshooting coding errors and printing variable content

How to do it...

How it works...

There's more...

Built-in WordPress debugging features

See also

Creating a new simple shortcode

How to do it...

How it works...

See also

Creating a new shortcode with parameters

How to do it...

How it works...

See also

Creating a new enclosing shortcode

How to do it...

How it works...

See also

Loading a style sheet to format plugin output

Getting ready

How to do it...

How it works...

See also

Writing plugins using object-oriented PHP

Getting ready

How to do it...

How it works...

See also

User Settings and Administration Pages

Introduction

Creating default user settings on plugin initialization

How to do it...

How it works...

There's more...

Deactivation function

See also

Storing user settings using arrays

Getting ready

How to do it...

How it works...

See also

Removing plugin data on deletion

Getting ready

How to do it...

How it works...

See also

Creating an administration page menu item in the settings menu

Getting ready

How to do it...

How it works...

There's more...

Settings hook priority to determine menu order

See also

Creating a multi-level administration menu

How to do it...

How it works...

See also

Adding menu items leading to external pages

Getting ready

How to do it...

How it works...

See also

Hiding items which users should not access from the default menu

How to do it...

How it works...

Rendering the admin page contents using HTML

Getting ready

How to do it...

How it works...

There's more...

wp_nonce_field

See also

Processing and storing plugin configuration data

Getting ready

How to do it...

How it works...

See also

Displaying a confirmation message when options are saved

Getting ready

How to do it...

How it works...

See also

Adding custom help pages

Getting ready

How to do it...

How it works...

See also

Rendering the admin page contents using the Settings API

How to do it...

How it works...

There's more...

Rendering a drop-down list settings field

Rendering a text area settings field

See also

Accessing user settings from action and filter hooks

Getting ready

How to do it...

How it works...

See also

Formatting admin pages using meta boxes

Getting ready

How to do it...

How it works...

See also

Splitting admin code from the main plugin file to optimize site performance

Getting ready

How to do it...

How it works...

See also

Storing style sheet data in user settings

Getting ready

How to do it...

How it works...

See also

Managing multiple sets of user settings from a single admin page

Getting ready

How to do it...

How it works...

See also

Creating network-level admin pages

Getting ready

How to do it...

How it works...

See also

The Power of Custom Post Types

Introduction

Creating a custom post type

Getting ready

How to do it...

How it works...

There's more...

Changing the custom post type permalinks slug

Adding a new section to the custom post type editor

Getting ready

How to do it...

How it works...

See also

Displaying single custom post type items using a custom layout

Getting ready

How to do it...

How it works...

See also

Displaying custom post type data in shortcodes

Getting ready

How to do it...

How it works...

There's more...

do_shortcode function

Adding custom categories for custom post types

Getting ready

How to do it...

How it works...

See also

Adding custom fields to categories

Getting ready

How to do it...

How it works...

See also

Hiding the category editor from the custom post type editor

Getting ready

How to do it...

How it works...

See also

Displaying additional columns in the custom post list page

Getting ready

How to do it...

How it works...

See also

Adding filters for custom categories to the custom post list page

Getting ready

How to do it...

How it works...

See also

Adding Quick Edit fields for custom categories

Getting ready

How to do it...

How it works...

Updating page title to include custom post data using plugin filters

Getting ready

How to do it...

How it works...

Customizing Post and Page Editors

Introduction

Capturing and displaying information using custom meta boxes

Getting ready

How to do it...

How it works...

There's more...

Adding a new meta box to all post types (including custom ones)

Displaying custom post data using filter functions

Getting ready

How to do it...

How it works...

See also

Hiding the Custom Field section in the post editor

Getting ready

How to do it...

How it works...

Extending the post editor to allow users to upload files directly

Getting ready

How to do it...

How it works...

See also

Accepting User Content Submissions

Introduction

Creating a client-side content submission form

Getting ready

How to do it...

How it works...

See also

Saving user-submitted content in custom post types

Getting ready

How to do it...

How it works...

There's more...

Moderating user-submitted content

See also

Sending email notifications upon new submissions

Getting ready

How to do it...

How it works...

See also

Implementing a CAPTCHA on user forms using an online service

Getting ready

How to do it...

How it works...

See also

Using a local library to implement a CAPTCHA on user forms

Getting ready

How to do it...

How it works...

See also

Customizing User Data

Introduction

Adding custom fields to the user editor

Getting ready

How to do it...

How it works...

See also

Processing and storing user custom data

Getting ready

How to do it...

How it works...

See also

Displaying new user data in user list page

Getting ready

How to do it...

How it works...

See also

Using custom user data in containing shortcode

Getting ready

How to do it...

How it works...

See also

Creating Custom MySQL Database Tables

Introduction

Creating new database tables

Getting ready

How to do it...

How it works...

There's more...

Using phpMyAdmin to simplify code creation

Create tables in network installation

Deleting custom tables on plugin removal

Getting ready

How to do it...

How it works...

See also

Updating custom table structure on plugin upgrade

Getting ready

How to do it...

How it works...

See also

Displaying custom table data on an admin page

Getting ready

How to do it...

How it works...

See also

Inserting and updating records in custom tables

Getting ready

How to do it...

How it works...

See also

Deleting records from custom tables

Getting ready

How to do it...

How it works...

See also

Displaying custom database table data in shortcodes

Getting ready

How to do it...

How it works...

See also

Implementing a search function to retrieve custom table data

Getting ready

How to do it...

How it works...

See also

Importing data from a user file into custom tables

Getting ready

How to do it...

How it works...

See also

Leveraging JavaScript, jQuery, and AJAX Scripts

Introduction

Safely loading jQuery onto WordPress web pages

Getting ready

How to do it...

How it works...

There's more...

jQuery noconflict mode

Displaying a pop-up dialog using the built-in ThickBox plugin

Getting ready

How to do it...

How it works...

There's more...

Removing the dialog close button

Displaying pop-up dialogs on select pages

Controlling pop-up dialog display using shortcodes

Getting ready

How to do it...

How it works...

See also

Displaying a calendar day selector using the Datepicker plugin

Getting ready

How to do it...

How it works...

Adding tooltips to admin page form fields using the TipTip plugin

Getting ready

How to do it...

How it works...

See also

Using AJAX to dynamically update partial page contents

Getting ready

How to do it...

How it works...

See also

Adding New Widgets to the WordPress Library

Introduction

Creating a new widget in WordPress

Getting ready

How to do it...

How it works...

There's more...

Plugins extending other plugins

See also

Displaying configuration options

Getting ready

How to do it...

How it works...

See also

Validating configuration options

Getting ready

How to do it...

How it works...

See also

Implementing the widget display function

Getting ready

How to do it...

How it works...

See also

Adding a custom dashboard widget

Getting ready

How to do it...

How it works...

See also

Adding a custom widget to the network dashboard

Getting ready

How to do it...

How it works...

See also

Enabling Plugin Internationalization

Introduction

Changing the WordPress language configuration

Getting ready

How to do it...

How it works...

Adapting default user settings for translation

Getting ready

How to do it...

How it works...

See also

Making admin page code ready for translation

Getting ready

How to do it...

How it works...

See also

Modifying shortcode output for translation

Getting ready

How to do it...

How it works...

See also

Translating text strings using Poedit

Getting ready

How to do it...

How it works...

There's more...

Translation template file

See also

Loading a language file in the plugin initialization

Getting ready

How to do it...

How it works...

There's more...

Updating a translation file

Advanced translation functions

Localizing JavaScript files

See also

Distributing Your Plugin on wordpress.org

Introduction

Creating a README file for your plugin

Getting ready

How to do it...

How it works...

There's more...

Releasing specific plugin versions using tags

Applying for your plugin to be hosted on WordPress.org

How to do it...

How it works...

See also

Uploading your plugin using Subversion

Getting ready

How to do it...

How it works...

There's more...

Checking out plugins to your development installation

See also

Providing plugin banner and thumbnail images

Getting ready

How to do it...

How it works...

See also

累计评论(0条) 0个书友正在讨论这本书 发表评论

发表评论

发表评论,分享你的想法吧!

买过这本书的人还买过

读了这本书的人还在读

回顶部