input
stringlengths
10
828
output
stringlengths
5
107
public void links popup script object text object width object height object file object count
links popup script show the link to the links popup and the number
public string get linkcatname int id object cats do not change type int cat id 0 std class cat null get included functions page class deprecated function source code info get current function 0 0 get category if empty id return cats get included org numiton nwp wp admin includes bookmark page class wp get link cats id if empty cats is array cats return cat id intval array cats get 0 take the first cat cat std class get included category page class get category cat id g consts get object raw return strval std class get cat name
get linkcatname gets the name of category by id
public void comments rss link string link text object deprecated get included functions page class deprecated function source code info get current function 0 0 post comments feed link get included link template page class post comments feed link link text intval
comment rss link print rss comment feed link
public string get category rss link boolean echo int cat id object deprecated string link null get included functions page class deprecated function source code info get current function 0 0 get category feed link link get included link template page class get category feed link cat id rss2 if echo echo link return link
get category rss link print return link to category rss2 feed
public string get author rss link boolean echo int author id object deprecated string link null get included functions page class deprecated function source code info get current function 0 0 get author feed link link get included link template page class get author feed link author id if echo echo link return link
get author rss link print return link to author rss feed
public object comments rss object deprecated get included functions page class deprecated function source code info get current function 2 2 get post comments feed link return get included link template page class get post comments feed link intval
comments rss return link to the post rss feed
public int create user string username string password string email get included functions page class deprecated function source code info get current function 2 0 wp create user return get included registration page class wp create user username password email
create user an alias of wp create user
public void documentation link object deprecated get included functions page class deprecated function source code info get current function 2 5 return
documentation link unused admin function
public boolean gzip compression return false
gzip compression unused function
public string get weekday int weekday number return this weekday get str weekday number
retrieve the full translated weekday word
public string get weekday initial string weekday name return this weekday initial get str weekday name
retrieve the translated weekday initial
public string get weekday abbrev string weekday name return this weekday abbrev get str weekday name
retrieve the translated weekday abbreviation
public string get month int month number return this month get str get included formatting page class zeroise month number 2
retrieve the full translated month by month number
public string get month abbrev string month name return this month abbrev get str month name
retrieve translated version of month abbreviation string
public string get meridiem string meridiem return this meridiem get str meridiem
retrieve translated version of meridiem string
public void register globals commented by numiton weekday this weekday weekday initial this weekday initial weekday abbrev this weekday abbrev month this month month abbrev this month abbrev
global variables are deprecated
public void is html boolean bool if equal bool true this content type text html else this content type text plain
sets message type to html
public void is smtp this mailer smtp
sets mailer to send message using smtp
public void is mail this mailer mail
sets mailer to send message using php mail function
public void is sendmail this mailer sendmail
sets mailer to send message using the sendmail program
public void is qmail this sendmail var qmail bin sendmail this mailer sendmail
sets mailer to send message using the qmail mta
public void add address string address string name int cur 0 cur array count this to this to get array cur put 0 strings trim address this to get array cur put 1 name
adds a to address
public void add cc string address string name int cur 0 cur array count this cc this cc get array cur put 0 strings trim address this cc get array cur put 1 name
adds a cc address
public void add bcc string address string name int cur 0 cur array count this bcc this bcc get array cur put 0 strings trim address this bcc get array cur put 1 name
adds a bcc address
public void add reply to string address string name int cur 0 cur array count this reply to this reply to get array cur put 0 strings trim address this reply to get array cur put 1 name
adds a reply to address
public int readint ref array low end new ref array ref array big end new ref array if equal this byteorder 0 low endian low end value qmisc unpack v this stream read 4 return intval array array shift low end else big endian big end value qmisc unpack n this stream read 4 return intval array array shift big end
reads a 32bit integer from the stream
public array readintarray int count if equal this byteorder 0 low endian return qmisc unpack v strval count this stream read 4 count else big endian return qmisc unpack n strval count this stream read 4 count
reads an array of integers from the stream
public void smtp close if equal this smtp null if this smtp connected this smtp quit this smtp close
closes the active smtp session if one exists
public string get original string int num int length 0 int offset 0 string data null length this table originals get int num 2 1 offset this table originals get int num 2 2 if booleanval length return this stream seekto offset data this stream read length return data
returns a string from the originals table
public string get translation string int num int length 0 int offset 0 string data null length this table translations get int num 2 1 offset this table translations get int num 2 2 if booleanval length return this stream seekto offset data this stream read length return data
returns a string from the translations table
public string translate string string int num 0 if this short circuit return string this load tables if this enable cache caching enabled get translated string from cache if array array key exists string this cache translations return this cache translations get str string else return string else caching not enabled try to find string num this find string string if equal num 1 return string else return this get translation string num
translates a string
public boolean set language string lang type string lang path object phpmailer lang null if file system or socket file exists lang path phpmailer lang lang type php else commented by numiton this is never found if file system or socket file exists lang path phpmailer lang en php else commented by numiton this is never found this set error could not load language file return false modified by numiton phpmailer lang is always empty this language new array phpmailer lang return true
sets the language for all class error messages
public int select string int n string string null array matches new array if is null this select string function string this get plural forms if qreg ex perl preg match nplurals s s d s s plural s s string matches nplurals intval matches get 1 expression strval matches get 2 expression strings str replace n n expression else nplurals 2 expression n 1 0 1 this select string function function created return intval function handling call user func new callback create function select string function this n
detects which plural form to take
public string addr append string type array addr string addr str null int i 0 addr str type addr str addr str this addr format addr get array 0 if array count addr 1 for i 1 i array count addr i addr str addr str this addr format addr get array i addr str addr str this le return addr str
creates recipient headers
public string addr format array addr string formatted null if empty addr get 1 formatted strval addr get 0 else formatted this encode header strval addr get 1 phrase strval addr get 0 return formatted
formats an address correctly
public void set word wrap if this word wrap 1 return int java switch selector49 0 if equal this message type alt java switch selector49 1 if equal this message type alt attachments java switch selector49 2 switch java switch selector49 case 1 fall through case 2 this alt body this wrap text this alt body this word wrap break default this body this wrap text this body this word wrap break
set the body wrapping
public object get category object category string output string filter category get included taxonomy page class get term category category output filter if get included classes page class is wp error category return category make cat compat category return category
retrieves category data given a category id or category object
public int get cat id int cat name std class cat null cat std class get included taxonomy page class get term by name cat name category g consts get object raw if booleanval cat return intval std class get cat term id return 0
get the id of a category from its name
public string get cat name int cat id std class category null cat id intval cat id category std class get category cat id g consts get object raw return strval std class get category name
get the name of a category from its id
public string get boundary object boundary string char set string content type string encoding string result null result if equal char set char set this char set if equal content type content type this content type if equal encoding encoding this encoding result result this text line boundary result result qstrings sprintf content type s charset s content type char set result result this le result result this header line content transfer encoding encoding result result this le return result
returns the start of a message boundary
public string end boundary object boundary return this le strval boundary this le
returns the end of a message boundary
public void set message type if array count this attachment 1 strings strlen this alt body 1 this message type plain else if array count this attachment 0 this message type attachments if strings strlen this alt body 0 array count this attachment 1 this message type alt if strings strlen this alt body 0 array count this attachment 0 this message type alt attachments
sets the message type
public string header line string name object value return name value this le
returns a formatted header line
public boolean localize string handle string object name array l10n if isset this scripts get handle return false return this scripts get wp script class handle localize object name l10n
localizes a script
public string text line string value return value this le
returns a formatted mail line
public void get header get included plugin page class do action get header if file system or socket file exists g consts get templatepath header php todo add support for multiple themes get included theme page class load template g consts get templatepath header php header page class else get included theme page class load template g consts get abspath wp content themes default header php header page class
note these tags go anywhere in the template
public string encode file string path string encoding int fd 0 int magic quotes 0 string file buffer null if booleanval fd file system or socket fopen path rb this set error this lang file open path return magic quotes options get magic quotes runtime options set magic quotes runtime 0 file buffer file system or socket fread fd file system or socket filesize path file buffer this encode string file buffer encoding file system or socket fclose fd options set magic quotes runtime magic quotes return file buffer
encodes attachment in requested format
public void add string attachment object string object filename object encoding object type int cur 0 append to attachment array cur array count this attachment this attachment get array cur put 0 string this attachment get array cur put 1 filename this attachment get array cur put 2 filename this attachment get array cur put 3 encoding this attachment get array cur put 4 type this attachment get array cur put 5 true is string this attachment get array cur put 6 attachment this attachment get array cur put 7 0
adds a string or binary attachment non filesystem to the list
public boolean inline image exists boolean result false int i 0 result false for i 0 i array count this attachment i if equal this attachment get array i get 6 inline result true break return result
returns true if an inline attachment is present
public void clear addresses this to new array
clears all recipients assigned in the to array
public void clear ccs this cc new array
clears all recipients assigned in the cc array
public void clear bccs this bcc new array
clears all recipients assigned in the bcc array
public void clear reply tos this reply to new array
clears all recipients assigned in the reply to array
public void clear all recipients this to new array this cc new array this bcc new array
clears all recipients assigned in the to cc and bcc array
public void clear attachments this attachment new array
clears all previously set filesystem string and binary attachments
public void clear custom headers this custom header new array
clears all custom headers
public void set error string msg this error count this error info msg
adds the error message to the error container
public string rfcdate int tz string tzs null string result null tz intval date time date z tzs tz 0 tz math abs tz tz intval tz floatval 3600 floatval 100 floatval tz 3600 floatval 60 result qstrings sprintf s s 04d date time date d j m y h i s tzs tz return result
returns the proper rfc 822 formatted date
public float calendar week mod int num int base 0 base 7 return floatval num floatval base math floor floatval num floatval base
used in get calendar used in get calendar
public string server var string var name commented by numiton meaningless in java if isset g vars web env server g vars web env server http server vars if isset g vars web env get remote addr g vars web env server http env vars must be apache if isset g vars web env server get var name return strval g vars web env server get var name else return
returns the appropriate server variable
public string server hostname string result null if equal this hostname result this hostname else if equal this server var server name result this server var server name else result localhost localdomain return result
returns the server hostname or localhost
public string lang string key if array count this language 1 this set language en set the default language if isset this language get key return strval this language get key else return language string failed to load key
returns a message in the appropriate language
public boolean is error return this error count 0
returns true if an error occurred
public string fix eol string str str strings str replace r n n str str strings str replace r n str str strings str replace n this le str return str
changes every end of line from cr or lf to crlf
public void add custom header string custom header this custom header put strings explode custom header 2
adds a custom header
public void the date xml echo get included functions page class mysql2date y m d strval std class get g vars post post date true echo post post date
date time tags
public boolean wp cache close return true
wp cache close closes the cache
public boolean wp cache delete object id string flag return wp object cache delete id flag
wp cache delete removes the cache contents matching id and flag
public boolean wp cache flush return wp object cache flush
wp cache flush removes all cache items
public object wp cache get object id string flag modified by numiton if wp object cache null return wp object cache get id flag else return null
wp cache get retrieves the cache contents from the cache by id and
public void wp cache init wp object cache new wp object cache g vars g consts
wp cache init sets up object cache global and assigns it
public boolean wp cache replace object key object data string flag int expire return wp object cache replace key data flag expire
wp cache replace replaces the contents of the cache with new data
public boolean wp cache set object key object data string flag int expire return wp object cache set key data flag expire
wp cache set saves the data to the cache
public string user trailingslashit string string string type of url if g vars wp rewrite use trailing slashes string get included formatting page class trailingslashit string else string get included formatting page class untrailingslashit string note that type of url can be one of following single single trackback single feed single paged feed category page year month day paged string strval get included plugin page class apply filters user trailingslashit string type of url return string
conditionally adds a trailing slash if the permalink structure has a
public boolean add filter string tag array function to add int priority int accepted args string idx null idx wp filter build unique id tag function to add priority g vars wp filter get array tag get array priority put idx new array new array entry function function to add new array entry accepted args accepted args merged filters array unset tag return true
add filter hooks a function or method to a specific filter action
public object has filter object tag object function to check boolean has false string idx null object priority null has empty g vars wp filter get tag if equal false function to check equal false has return has if booleanval idx wp filter build unique id tag function to check intval false return false for map entry java entry518 array array keys g vars wp filter get array tag entry set priority java entry518 get value if isset g vars wp filter get array tag get array priority get idx return priority return false
has filter check if any filter has been registered for a hook
public string get page link int id boolean leavename string link null if booleanval id id intval std class get g vars post id if equal page get included functions page class get option show on front equal id get included functions page class get option page on front link strval get included functions page class get option home else modified by numiton fixme why is this necessary std class tmp post g vars post link get page link id leavename g vars post tmp post return strval get included plugin page class apply filters page link link id
respects page on front
public boolean remove filter string tag object function to remove int priority int accepted args boolean r false function to remove wp filter build unique id tag function to remove priority r isset g vars wp filter get array tag get array priority get function to remove if strict equal true r g vars wp filter get array tag get array priority array unset function to remove if empty g vars wp filter get array tag get priority g vars wp filter get array tag array unset priority merged filters array unset tag return r
remove filter removes a function from a specified filter hook
public object current filter return array end wp current filter
current filter return the name of the current filter or action
public boolean add action string tag array function to add int priority int accepted args return add filter tag function to add priority accepted args
add action hooks a function on to a specific action
public int did action string tag if empty wp actions return 0 return array count array array keys array wp actions tag
did action return the number times an action is fired
public object has action object tag object function to check return has filter tag function to check
has action check if any action has been registered for a hook
public boolean remove action string tag object function to remove int priority int accepted args return remove filter tag function to remove priority accepted args
remove action removes a function from a specified action hook
public string plugin basename string file file strings str replace file sanitize for win32 installs file qreg ex perl preg replace file remove any duplicate slash file qreg ex perl preg replace g consts get plugindir file get relative path from plugins dir return file
functions for handling plugins
public void register activation hook string file array function file plugin basename file add action activate file function 10 1
register activation hook hook a function on a plugin activation
public void register deactivation hook string file array function file plugin basename file add action deactivate file function 10 1
register deactivation hook hook a function on a plugin deactivation
public void wp call all hook array args array the new array array reset g vars wp filter get array all do for map entry java entry522 new array array current g vars wp filter get array all entry set the array java entry522 get value if is null the get function function handling call user func array new callback the get array function args while strict equal array next g vars wp filter get array all null
wp call all hook calls the all hook which will process the
public void post comments feed link string link text int post id string feed object url null url get post comments feed link post id feed if empty link text link text get included l10n page class comments feed default echo a href strval url link text a
post comments feed link output the comment feed link for a post
public array wp print scripts object handles get included plugin page class do action wp print scripts if equal handles for wp head handles if class handling is a wp scripts wp scripts if booleanval handles return new array no need to instantiate if nothing s there else wp scripts new wp scripts g vars g consts return wp scripts print scripts handles
prints script tags in document head
public boolean wp localize script string handle string object name array l10n if class handling is a wp scripts wp scripts return false return wp scripts localize handle object name l10n
localizes a script
public int username exists string username std class user if booleanval user get included pluggable page class get userdatabylogin username return intval std class get user id else return intval null
username exists checks whether the given username exists
public int email exists string email std class user if booleanval user get included pluggable page class get user by email email return intval std class get user id return intval false
email exists checks whether the given email exists
public boolean validate username string username object sanitized null object valid null sanitized get included formatting page class sanitize user username true valid equal sanitized username return booleanval get included plugin page class apply filters validate username valid username
validate username checks whether an username is valid
public int wp create user string username string password string email string user login null string user email null object user pass null array userdata new array user login g vars wpdb escape username user email g vars wpdb escape email user pass password userdata array compact new array entry user login user login new array entry user email user email new array entry user pass user pass return wp insert user userdata
wp create user a simpler way of inserting an user into the database
public array get approved comments object post id return g vars wpdb get results g vars wpdb prepare select from g vars wpdb comments where comment post id d and comment approved 1 order by comment date post id
get approved comments returns the approved comments for post
public string wp get comment status int comment id std class comment null object approved null comment std class get comment comment id g consts get object if booleanval comment return strval false approved std class get comment comment approved if equal approved null return deleted else if equal approved 1 return approved else if equal approved 0 return unapproved else if equal approved spam return spam else return strval false
wp get comment status the status of a comment by id
public void self link echo http equal g vars web env server get https on s g vars web env get http host get included formatting page class wp specialchars strings stripslashes g vars web env get request uri strval 1
self link generate a correct link for the atom self elemet
public void wp generator the generator get included plugin page class apply filters wp generator type xhtml
outputs the xhtml generator that is generated on the wp head hook
public boolean wp throttle comment flood object block object time lastcomment object time newcomment if booleanval block a plugin has already blocked we ll let that decision stand return booleanval block if intval time newcomment intval time lastcomment 15 return true return false
wp throttle comment flood
public void the generator object type echo get included plugin page class apply filters the generator get the generator type type n
outputs the generator xml or comment for rss atom etc