ToppaWPFunctionsA collection of static methods facilitating common tasks for WordPress plugins.
Located in /ToppaWPFunctions.php (line 21)
static boolean|array
parseFeed
(array $feed_content, array $ref_data, [string $match_field = null], [string $match_value = null], [string $key = null])
static mixed
sqlInsert
(string $table, array $fields, [array $values = null], [string $update = false])
static mixed
sqlSelect
(string $table, [string|array $keywords = null], [string|array $conditions = null], [string $other = null], [string $type = 'get_row'], [string $return = ARRAY_A])
static string
_sqlPrepare
(array $conditions, [string $glue = " and "], [boolean $values_only = false])
static createTable (line 33)
Creates or updates a WordPress table, based on ref_data in a passed-in object. Note that dbDelta is very picky about formatting - see http://codex.wordpress.org/Creating_Tables_with_Plugins
static displayInput (line 346)
Generates and echoes xhtml for form inputs.
Checkbox groups are currently hardcoded to a 3 column display.
static parseFeed (line 444)
The function is for parsing the Picasa RSS feed. It assumes an
array of items, with keys that may have a : dividing the names of related items, and containing an array with a 'data' value and a possible 'attrs' array
static readFeed (line 424)
Reads an RSS feed. Uses the included ToppaXMLParser.
static sqlDelete (line 267)
Creates and executes a SQL delete statement based on passed-in parameters.
If $conditions is an array, it will escape values. If it's a string, it must contain the WHERE keyword, and the values must be escaped before calling this function.
static sqlInsert (line 220)
Creates and executes a SQL insert statement based on passed-in parameters.
If you pass $fields and $values, they are treated as the name-value pairs to update, and are related positionally. If you pass $fields only, it assumes its actually a hash of key-value pairs. All values are escaped. Note the update option currently works only if $fields contains key- value pairs.
static sqlSelect (line 95)
Creates and executes a SQL select statement based on passed-in parameters.
If $conditions is an array, it will escape values. If it's a string, it must contain the WHERE keyword, and the values must be escaped before calling this function.
static sqlUpdate (line 170)
Creates and executes a SQL update statement based on passed-in parameters.
It will escape values in the $fields array. If $conditions is an array, it will escape values. If it's a string, it must contain the WHERE keyword, and the values must be escaped before calling this function.
static _sqlEscape (line 330)
Escapes and quotes values for safe inserting/updating to the database
static _sqlPrepare (line 306)
Builds a properly formatted partial SQL clause of key-value pairs, with values escaped.
Documentation generated on Wed, 01 Jul 2009 07:48:18 -0400 by phpDocumentor 1.4.2