O'Reilly logo

WordPress 3 Plugin Development Essentials by Everett Griffiths, Brian Bondari

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Appendix B. WordPress API Reference

The following is a compendium of functions, actions, and filters referenced within this book.

PHP functions

There are over 700 functions built into PHP. The following are seven that we used, with examples.

dirname

string dirname( string $path);

Returns parent directory's path. Often this is used to determine the path to the current script.

Example:

print dirname(__FILE__); // prints something like '/users/me'

file_get_contents

string file_get_contents( string $filename [, bool $use_include_path = false [, resource $context [, int $offset = -1 [, int $maxlen ]]]] )

Reads an entire file into a string. This is a useful way to read static, non-PHP files. It can even work for downloading remote files, but it's better ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required