input
stringlengths 10
828
| output
stringlengths 5
107
|
|---|---|
public boolean wp defer comment counting object defer if is bool defer wp defer comment counting defer booleanval defer flush any deferred counts if booleanval defer wp update comment count intval null true return wp defer comment counting defer
|
wp defer comment counting whether to defer comment counting
|
public void parse query vars this parse query
|
reparse the query vars
|
public string privacy ping filter object sites if equal 0 get included functions page class get option blog public return strval sites else return
|
privacy ping filter
|
public void clean comment cache object id get included cache page class wp cache delete id comment
|
clean comment cache removes comment id from the comment cache
|
public void update comment cache object comments std class comment null for map entry java entry437 new array comments entry set comment std class java entry437 get value get included cache page class wp cache add std class get comment comment id comment comment 0
|
update comment cache updates the comment cache of given comments
|
public object get bookmark field object field int bookmark object context bookmark intval bookmark object bookmark obj get bookmark bookmark g consts get object raw do not change type if get included classes page class is wp error bookmark obj return bookmark obj if is object bookmark obj return if isset std class bookmark obj fields get field return return sanitize bookmark field strval field std class bookmark obj fields get field std class bookmark obj fields get link id strval context
|
get bookmark field gets single bookmark data item or field
|
public object get link int bookmark id object output string filter return get bookmark bookmark id output filter
|
get link returns bookmark data based on id
|
public void delete get bookmark cache object deprecated get included cache page class wp cache delete get bookmarks bookmark
|
delete get bookmark cache deletes entire bookmark cache
|
public boolean is admin if g consts is wp admindefined return g consts get wp admin return false
|
query type checks
|
public object get attached file int attachment id boolean unfiltered object file get post meta attachment id wp attached file true if unfiltered return file return get included plugin page class apply filters get attached file file attachment id
|
get attached file get metadata for an attached file
|
public boolean is home return g vars wp query is home
|
is home is it the blog view homepage
|
public object update attached file int attachment id string file object old file null if booleanval get post attachment id g consts get object raw return false old file get attached file attachment id true file strval get included plugin page class apply filters update attached file file attachment id if booleanval old file return update post meta attachment id wp attached file file old file else return add post meta attachment id wp attached file file false
|
update attached file update attached file metadata
|
public string escape string string return strings addslashes string disable rest for now causing problems if this dbh version compare phpversion 4 3 0 1 return mysql escape string string else return mysql real escape string string this dbh
|
escapes content for insertion into the database for security
|
public void escape by ref ref object s s value this escape strval s value
|
escapes content by reference for insertion into the database for
|
public string prepare object args string query if strict equal null args return null modified by numiton array args array new array new array args array put all args query strval array array shift args array query strings str replace s s query in case someone mistakenly already singlequoted it query strings str replace s s query doublequote unquoting query strings str replace s s query quote the strings array array walk args array new callback escape by ref this return qstrings vsprintf query args array
|
prepares a sql query for safe use using sprintf syntax
|
public string get the author string deprecated return strval get included plugin page class apply filters the author std class get g vars authordata display name
|
get the author get the author of the current post in the loop
|
public string get the author description return strval std class get g vars authordata description
|
get the author description get the description of the author of the
|
public int insert string table array data array fields data get included functions page class add magic quotes data fields array array keys data return this query insert into table strings implode fields values strings implode data
|
insert an array of data into a table
|
public void the author description echo get the author description
|
the author description echo the description of the author of the
|
public string get the author login return strval std class get g vars authordata user login
|
get the author login get the login name of the author of the
|
public array get post ancestors object post std class post obj std class get post null g consts get object raw if empty std class get post obj ancestors return post obj fields get array ancestors return new array
|
get post ancestors retrieve ancestors for a post
|
public void the author login echo get the author login
|
the author login echo the login name of the author of the current
|
public string get the author firstname return strval std class get g vars authordata first name
|
get the author firstname get the first name of the author of the
|
public void the author firstname echo get the author firstname
|
the author firstname echo the first name of the author of the
|
public object get var string query int x int y array values new array this func call db get var query strval x strval y if booleanval query this query query extract var out of cached results based x y vals if empty this last result get y values array array values class handling get object vars this last result get y if there is a value return it else return null return isset values get x strict equal values get x values get x null
|
get one variable from the database
|
public string get the author lastname return strval std class get g vars authordata last name
|
get the author lastname get the last name of the author of the
|
public void the author lastname echo get the author lastname
|
the author lastname echo the last name of the author of the current
|
public string get the author nickname return strval std class get g vars authordata nickname
|
get the author nickname get the nickname of the author of the
|
public void the author nickname echo get the author nickname
|
the author nickname echo the nickname of the author of the current
|
public object get post field string field int post id string context post intval post object post get post post id do not change type g consts get object raw if get included classes page class is wp error post return post if is object post return if isset std class post fields get field return return sanitize post field field std class post fields get field intval std class post fields get id context
|
get post field retrieve a field based on a post id
|
public string get the author email return strval std class get g vars authordata user email
|
get the author email get the email of the author of the current
|
public void the author email echo get included plugin page class apply filters the author email get the author email
|
the author email echo the email of the author of the current post
|
public string get post mime type object id object post null do not change type post get post id g consts get object raw if is object post return strval std class post fields get post mime type return
|
get post mime type takes a post id returns its mime type
|
public array get col string query int x array new array new array int i 0 if booleanval query this query query new array new array extract the column values for i 0 i array count this last result i new array put i this get var null x i return new array
|
gets one column from the database
|
public void the author icq echo get the author icq
|
the author icq echo the icq number of the author of the current
|
public string get post status object id object post null post get post id g consts get object raw if is object post if equal attachment std class post fields get post type booleanval std class post fields get post parent equal std class post fields get id std class post fields get post parent return get post status intval std class post fields get post parent else return strval std class post fields get post status return
|
get post status takes a post id and returns its status
|
public object get col info string info type int col offset int i 0 array new array new array std class col null if booleanval this col info if equal col offset 1 i 0 for map entry java entry678 this col info entry set col std class java entry678 get value new array put i std class get col info type i return new array else return this col info get std class class col offset fields get info type return null
|
grabs column metadata from the last query
|
public void the author msn echo get the author msn
|
the author msn echo the msn address of the author of the current
|
public boolean timer start array mtime new array string mtime str strval date time microtime mtime strings explode mtime str this time start intval mtime get 1 intval mtime get 0 return true
|
starts the timer for debugging purposes
|
public int timer stop array mtime new array int time end 0 int time total 0 string mtime str strval date time microtime mtime strings explode mtime str time end intval mtime get 1 intval mtime get 0 time total time end this time start return time total
|
stops the debugging timer
|
public void the author posts echo get the author posts
|
the author posts echo the number of posts by the author of the
|
public array get post statuses array status new array status new array new array entry draft get included l10n page class draft default new array entry pending get included l10n page class pending review default new array entry private get included l10n page class private default new array entry publish get included l10n page class published default return status
|
get post statuses retuns the possible user post status values
|
public string get author name int auth id std class authordata authordata get included pluggable page class get userdata auth id return strval std class get authordata display name
|
get author name get the specified authors preferred display name
|
public object check database version make sure the server has my sql 4 0 string mysql version qreg ex perl preg replace 0 9 my sql mysql get server info this dbh if booleanval options version compare mysql version 4 0 0 return new wp error g vars g consts database version qstrings sprintf get included l10n page class strong error strong n word press s requires my sql 4 0 0 or higher default g vars wp version return
|
checks wether of not the database version is high enough to support the
|
public boolean supports collation return booleanval options version compare my sql mysql get server info this dbh 4 1 0
|
this function is called when word press is generating the table schema
|
public array get page statuses array status new array status new array new array entry draft get included l10n page class draft default new array entry private get included l10n page class private default new array entry publish get included l10n page class published default return status
|
get page statuses retuns the possible user page status values
|
public void start lvl ref string output int depth array args string indent null if equal list args get style return indent strings str repeat t depth output value output value indent ul class children n
|
todo decouple this todo decouple this
|
public int set post type int post id string post type int return 0 post type strval sanitize post field post type post type post id db return g vars wpdb query g vars wpdb prepare update g vars wpdb posts set post type s where id d post type post id if equal page post type clean page cache post id else clean post cache post id return return
|
set post type set post type
|
public int absint object maybeint return math abs intval maybeint
|
converts input to an absolute integer
|
public boolean add object id object data string group int expire if empty group group default if strict equal null this get id group false return false return this set id data group expire
|
adds data to the cache if it doesnt already exist
|
public boolean url is accessable via ssl string url string ssl int ch 0 string status null if true modified by numiton ssl qreg ex perl preg replace http https url ch curl curl init curl curl setopt ch curl curlopt url ssl curl curl setopt ch curl curlopt failonerror true curl curl setopt ch curl curlopt returntransfer true curl curl setopt ch curl curlopt ssl verifypeer false curl curl exec ch status curl curl getinfo ch curl curlinfo http code curl curl close ch if equal status 200 equal status 401 return true return false
|
determines if the blog can be accessed over ssl
|
public boolean delete object id string group boolean force if empty group group default if force strict equal null this get id group false return false this cache get array group array unset id this non existant objects get array group put id true return true
|
remove the contents of the cache id in the group
|
public boolean flush this cache new array return true
|
clears the object cache of all data
|
public object get object id string group if empty group group default if isset this cache get array group get id this cache hits this cache hits 1 return this cache get array group get id if isset this non existant objects get array group get id return null this non existant objects get array group put id true this cache misses this cache misses 1 return null
|
retrieves the cache contents if it exists
|
public boolean replace object id object data string group int expire if empty group group default if strict equal null this get id group false return false return this set id data group expire
|
replace the contents in the cache if contents already exist
|
public boolean set object id object data string group int expire if empty group group default if strict equal null data data this cache get array group put id data if isset this non existant objects get array group get id this non existant objects get array group array unset id return true
|
sets the data contents into the cache
|
public void stats object group null object cache null echo p echo strong cache hits strong strval this cache hits br echo strong cache misses strong strval this cache misses br echo p for map entry java entry384 this cache entry set group java entry384 get key cache java entry384 get value echo p echo strong group strong strval group br echo strong cache strong echo pre print r cache echo pre
|
echos the stats of the caching
|
public boolean delete post meta by key object post meta key if booleanval g vars wpdb query g vars wpdb prepare delete from g vars wpdb postmeta where meta key s post meta key todo get post ids and delete cache wp cache delete post id post meta return true return false
|
delete post meta by key delete everything from post meta matching
|
public boolean destruct return true
|
will save the object cache before object is completely destroyed
|
public array get post custom int post id if booleanval post id post id intval g vars id post id intval post id if booleanval get included cache page class wp cache get post id post meta update postmeta cache post id return array get included cache page class wp cache get post id post meta
|
get post custom retrieve post custom fields
|
public array get post custom keys int post id object custom null do not change type array keys new array custom get post custom post id if is array custom return null if booleanval keys array array keys array custom return keys return new array
|
get post custom keys retrieve post custom field names
|
public boolean is lighttpd before 150 array server parts new array server parts strings explode isset g vars web env get server software g vars web env get server software server parts put 1 isset server parts get 1 server parts get 1 return equal lighttpd server parts get 0 equal 1 options version compare server parts get str 1 1 5 0
|
is lighttpd before 150 is the server running earlier than 1
|
public string wp kses hook string string array allowed html array allowed protocols string strval get included plugin page class apply filters pre kses string allowed html allowed protocols return string
|
wp kses hook you add any kses hooks here
|
public string wp kses version return 0 2 2
|
wp kses version this function returns kses version number
|
public string wp kses split string string array allowed html array allowed protocols modified by numiton replace allowed html allowed html replace allowed protocols allowed protocols return reg ex perl preg replace callback new callback replace split this string
|
wp kses split searches for html tags no matter how malformed
|
public boolean apache mod loaded string mod boolean default array mods new array string phpinfo null if g vars is apache return false if false modified by numiton mods unsupported apache get modules if array in array mod mods return true else if false modified by numiton output control ob start unsupported phpinfo strval 8 phpinfo output control ob get clean if strict equal boolean false strings strpos phpinfo mod return true return default
|
apache mod loaded does the specified module exist in the apache
|
public string wp kses bad protocol string string array allowed protocols object string2 null string wp kses no null string string qreg ex perl preg replace u00ad string deals with opera feature string2 string a while equal string string2 string2 string string wp kses bad protocol once string allowed protocols while return string
|
wp kses bad protocol sanitize string from bad protocols
|
public string wp kses no null string string string qreg ex perl preg replace 0 string string qreg ex perl preg replace 0 string return string
|
wp kses no null removes any null characters in string
|
public string wp kses stripslashes string string return qreg ex perl preg replace string
|
wp kses stripslashes strips slashes from in front of quotes
|
public string wp kses js entities string string return qreg ex perl preg replace s s string
|
wp kses js entities removes the html java script entities found in
|
public string wp kses html error string string return qreg ex perl preg replace s s string
|
wp kses html error handles parsing errors in wp kses hair
|
public string wp kses bad protocol once string string array allowed protocols array string2 new array kses allowed protocols allowed protocols string2 qreg ex perl preg split 58 x3a i string 2 if isset string2 get 1 qreg ex perl preg match string2 get str 0 string wp kses bad protocol once2 string2 get str 0 allowed protocols strings trim string2 get str 1 else string reg ex perl preg replace callback s a za z0 9 58 xx 3 aa s new callback create function get protocol this string return string
|
wp kses bad protocol once sanitizes content from bad protocols and
|
public string wp kses bad protocol once2 string string array allowed protocols string string2 null boolean allowed false string one protocol null string2 wp kses decode entities string string2 qreg ex perl preg replace s string2 string2 wp kses no null string2 string2 qreg ex perl preg replace u00ad string2 deals with opera feature string2 strings strtolower string2 allowed false for map entry java entry504 allowed protocols entry set one protocol strval java entry504 get value if equal strings strtolower one protocol string2 allowed true break if allowed return string2 else return
|
wp kses bad protocol once2 callback for wp kses bad protocol once
|
public string wp kses normalize entities string string disarm all entities by converting to amp string strings str replace amp string change back the allowed entities in our entity whitelist string qreg ex perl preg replace amp a za z a za z0 9 0 19 1 string string reg ex perl preg replace callback amp 0 0 9 1 5 new callback create function normalize this string string qreg ex perl preg replace amp xx 0 0 9 a fa f 2 1 2 1 2 string return string
|
wp kses normalize entities converts and fixes html entities
|
public string wp kses normalize entities2 int i return i 65535 amp strval i strval i
|
wp kses normalize entities2 callback for
|
public object wp get post categories int post id array args array defaults new array object cats null post id value intval post id defaults new array new array entry fields ids args get included functions page class wp parse args args defaults cats get included taxonomy page class wp get object terms post id category args return cats
|
wp get post categories retrieve the list of categories for a post
|
public string wp kses decode entities string string modified by numiton string reg ex perl preg replace callback 0 9 new callback replace chr callback utils class string modified by numiton string reg ex perl preg replace callback xx 0 9 a fa f new callback replace chr hex dec callback utils class string return string
|
wp kses decode entities convert all entities to their character
|
public string wp filter kses string data return strings addslashes wp kses strings stripslashes data g vars allowedtags new array new array entry http new array entry https new array entry ftp new array entry ftps new array entry mailto new array entry news new array entry irc new array entry gopher new array entry nntp new array entry feed new array entry telnet
|
wp filter kses sanitize content with allowed html kses rules
|
public string wp filter post kses string data return strings addslashes wp kses strings stripslashes data allowedposttags new array new array entry http new array entry https new array entry ftp new array entry ftps new array entry mailto new array entry news new array entry irc new array entry gopher new array entry nntp new array entry feed new array entry telnet
|
wp filter post kses sanitize content for allowed html tags for post
|
public object wp get post tags int post id array args array defaults new array object tags null post id value intval post id defaults new array new array entry fields all args get included functions page class wp parse args args defaults tags get included taxonomy page class wp get object terms post id post tag args return tags
|
wp get post tags retrieve the post tags
|
public string wp filter nohtml kses string data return strings addslashes wp kses strings stripslashes data new array new array new array entry http new array entry https new array entry ftp new array entry ftps new array entry mailto new array entry news new array entry irc new array entry gopher new array entry nntp new array entry feed new array entry telnet
|
wp filter nohtml kses strips all of the html in the content
|
public array wp get recent posts int num string limit null string sql null array result new array set the limit clause if we got a limit num intval num if booleanval num limit limit strval num sql select from g vars wpdb posts where post type post order by post date desc limit result g vars wpdb get results sql g consts get array a return booleanval result result new array
|
wp get recent posts get the num most recent posts
|
public void kses remove filters normal filtering get included plugin page class remove filter pre comment content wp filter kses 10 1 get included plugin page class remove filter title save pre wp filter kses 10 1 post filtering get included plugin page class remove filter content save pre wp filter post kses 10 1 get included plugin page class remove filter excerpt save pre wp filter post kses 10 1 get included plugin page class remove filter content filtered save pre wp filter post kses 10 1
|
kses remove filters removes all kses input form content filters
|
public void kses init kses remove filters if equal get included capabilities page class current user can unfiltered html false kses init filters
|
kses init sets up most of the kses filters for input form content
|
public object wp get single post int postid string mode object post postid value intval postid post get post postid mode raw set categories and tags if equal mode g consts get object std class post fields put post category wp get post categories postid new array std class post fields put tags input wp get post tags postid new array new array entry fields names else array post put post category wp get post categories postid new array array post put tags input wp get post tags postid new array new array entry fields names return post
|
wp get single post get one post
|
public void start lvl ref string output int depth array args string indent null indent strings str repeat t depth output value output value n indent ul n
|
todo decouple this todo decouple this
|
public string get stylesheet return strval get included plugin page class apply filters stylesheet get included functions page class get option stylesheet
|
theme template stylesheet functions
|
public object get taxonomy string taxonomy if is taxonomy taxonomy return false return g vars wp taxonomies get taxonomy
|
get taxonomy returns the taxonomy object of taxonomy
|
public boolean is taxonomy string taxonomy return isset g vars wp taxonomies get taxonomy
|
is taxonomy checks that the taxonomy name exists
|
public boolean is taxonomy hierarchical string taxonomy if is taxonomy taxonomy return false std class taxonomy obj std class get taxonomy taxonomy return booleanval std class get taxonomy obj hierarchical
|
is taxonomy hierarchical whether the taxonomy object is
|
public object get term children object term string taxonomy array terms new array array children new array object child null if is taxonomy taxonomy return new wp error g vars g consts invalid taxonomy get included l10n page class invalid taxonomy default terms get term hierarchy taxonomy if isset terms get term return new array children terms get array term for map entry java entry601 terms get array term entry set child java entry601 get value if isset terms get child children array array merge children array get term children child taxonomy return children
|
get term children merge all term children into a single array
|
public object get term field string field int term int string taxonomy string context term intval term object term do not change type get term term int taxonomy g consts get object raw if get included classes page class is wp error term return term if is object term return if isset std class term fields get field return return sanitize term field field std class term fields get field intval std class term fields get term id taxonomy context
|
get term field get sanitized term field
|
public void wp transition post status string new status string old status std class post if equal new status old status get included plugin page class do action transition post status new status old status post get included plugin page class do action old status to new status post get included plugin page class do action new status std class get post post type std class get post id post
|
wp set post categories wp set post categories
|
public object get term to edit int id string taxonomy object term null do not change type term get term id taxonomy g consts get object raw if get included classes page class is wp error term return term if is object term return return sanitize term term taxonomy edit
|
get term to edit sanitizes term for editing
|
public array get pung int post id string pung null pung strval g vars wpdb get var g vars wpdb prepare select pinged from g vars wpdb posts where id d post id pung strings trim pung array pung array qreg ex perl preg split s pung pung array array get included plugin page class apply filters get pung pung array return pung array
|
get pung get urls already pinged for a post
|
public int wp count terms string taxonomy object args array defaults new array string where null object ignore empty null defaults new array new array entry ignore empty false args get included functions page class wp parse args args defaults ignore empty array extract var array args ignore empty ignore empty array extr skip where if booleanval ignore empty where and count 0 taxonomy g vars wpdb escape taxonomy return intval g vars wpdb get var select count from g vars wpdb term taxonomy where taxonomy taxonomy where
|
wp count terms count how many terms are in taxonomy
|
public string get to ping object post id string to ping null to ping strval g vars wpdb get var g vars wpdb prepare select to ping from g vars wpdb posts where id d post id to ping strings trim to ping to ping strval qreg ex perl preg split s to ping 1 reg ex perl preg split no empty to ping strval get included plugin page class apply filters get to ping to ping return to ping
|
get to ping get any urls in the todo list
|
public array get all page ids array page ids new array if booleanval page ids array get included cache page class wp cache get all page ids posts page ids g vars wpdb get col select id from g vars wpdb posts where post type page get included cache page class wp cache add all page ids page ids posts 0 return page ids
|
get all page ids get a list of page ids
|
public object get page int page string output string filter if empty page if isset g vars page commented by numiton isset g vars page id return get post g vars page output filter else return null return get post page output filter
|
get page retrieves page data given a page id or page object
|
public string get comment author string author null if empty std class get g vars comment comment author author get included l10n page class anonymous default else author strval std class get g vars comment comment author return strval get included plugin page class apply filters get comment author author
|
get comment author retrieve the author of the current comment
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.