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
Explore 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 3 Plugin Development Essentials

You're reading from   WordPress 3 Plugin Development Essentials Create your own powerful, interactive plugins to extend and add features to your WordPress site

Arrow left icon
Product type Paperback
Published in Mar 2011
Publisher Packt
ISBN-13 9781849513524
Length 300 pages
Edition 1st Edition
Languages
Concepts
Arrow right icon
Toc

Table of Contents (19) Chapters Close

WordPress 3 Plugin Development Essentials
Credits
About the Authors
About the Reviewers
www.PacktPub.com
Preface
1. Preparing for WordPress Development FREE CHAPTER 2. Anatomy of a Plugin 3. Social Bookmarking 4. Ajax Search 5. Content Rotator 6. Standardized Custom Content 7. Custom Post Types 8. Versioning Your Code with Subversion (SVN) 9. Preparing Your Plugin for Distribution 10. Publishing Your Plugin Recommended Resources WordPress API Reference Index

WordPress Functions


The following are a number of functions within WordPress that we utilized, with examples.

__

string __( string $text [, string $domain ])

Retrieves the translated string into the current locale. The $domain is "default" by default, but when authoring your own plugin, you should define your own text domain.

Example:

print __('Hello', 'my_text_domain'); // Might print "Hola" in a Spanish speaking locale.

_e

_e( $text, $domain )

Prints the translated string into the current locale. The result is the same as if you had done:

echo __('your-string');

add_action

add_action( $event, $function_to_add, $priority, $accepted_args );

Hooks an action event to a user-defined callback function; normally, no values are returned from these callback functions.

Example:

add_action('wp_head', 'MyClass::my_static_function');

add_filter

add_filter( $event, $function_to_add, $priority, $accepted_args );

Hooks a filter event to a user-defined callback function; filter events normally accept a string as input...

lock icon The rest of the chapter is locked
CONTINUE READING
83
Tech Concepts
36
Programming languages
73
Tech Tools
Icon Unlimited access to the largest independent learning library in tech of over 8,000 expert-authored tech books and videos.
Icon Innovative learning tools, including AI book assistants, code context explainers, and text-to-speech.
Icon 50+ new titles added per month and exclusive early access to books as they are being written.
WordPress 3 Plugin Development Essentials
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 $19.99/month. Cancel anytime
Modal Close icon
Modal Close icon