Cargando…

WordPress 3 Plugin Development Essentials.

Create your own powerful, interactive plugins to extend and add features to your WordPress site.

Detalles Bibliográficos
Clasificación:Libro Electrónico
Autor principal: Bondari, Brian
Otros Autores: Griffiths, Everett
Formato: Electrónico eBook
Idioma:Inglés
Publicado: Birmingham : Packt Pub., 2011.
Temas:
Acceso en línea:Texto completo
Tabla de Contenidos:
  • WordPress 3 Plugin Development Essentials; Copyright; Credits; About the Authors; About the Reviewers; www.PacktPub.com; Support files, eBooks, discount offers and more; Why Subscribe?; Free Access for Packt account holders; 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 for this book; Errata; Piracy; Questions; 1. Preparing for WordPress Development; WordPress background; Extending WordPress; Understanding WordPress architecture; Templating; Introducing plugins.
  • Summarizing architectureTools for web development; WordPress; Mac; Windows; Text editor; Using an IDE; FTP client; MySQL client; Coding best practices; Basic organization; Isolate tasks into functions; Use classes; Use descriptive variable names; Use descriptive function names; Separate logic and display layers; Go modular, to a point; Avoid short tags; Planning ahead / starting development; Interfaces; Localization; Documentation for the developer; Version control; Environment; Tests; Security; Printing user-supplied data to a page; Using user-supplied data to construct database queries.
  • DebuggingClearing your browser cache; Updating your php.ini file; Configuring your wp-config.php file; Checking your syntax; Checking values; Exercise; Summary; 2. Anatomy of a Plugin; Deconstructing an existing plugin: ""Hello Dolly""; Activating the plugin; Examining the hello.php file; Information header; Exercise-breaking the header; Location, name, and format; Understanding the Includes; Exercise parse errors; Bonus for the curious; User-defined functions; Exercise-an evil functionless plugin; What just happened; Omitting the closing ""?>"" PHP tag; A better example: Adding functions.
  • Referencing hooks via add_action() and add_filter()Actions versus Filters; Exercise-actions and filters; Exercise-filters; Reading more; Summary; 3. Social Bookmarking; The overall plan; Proof of concept; Avoiding conflicting function names; The master plugin outline; The plugin information header; In your browser-information header; Adding a link to the post content; Documenting our functions; In your browser-linking to the post content; Adding JavaScript to the head; Making our link dynamic; In your browser-dynamic links; Adding a button template; Getting the post URL.
  • In your browser-getting the post URLGetting the post title; Getting the description; Getting the media type; Getting the post topic; In your browser-title, description, and topic; Checking WordPress versions; Summary; 4. Ajax Search; What is Ajax?; The overall plan; The proof of concept mock up; Hooking up jQuery; Test that jQuery has loaded; What happened?; Using the FireBug console directly; Writing HTML dynamically to a target div; Multi-line strings; Create a listener; Fetching data from another page; Viewing the generated page; Anonymous functions; Adding a div on the fly.