input
stringlengths 10
828
| output
stringlengths 5
107
|
|---|---|
public void comment author object author null author get included plugin page class apply filters comment author get comment author echo author
|
comment author displays the author of the current comment
|
public string get comment author email return strval get included plugin page class apply filters get comment author email std class get g vars comment comment author email
|
get comment author email retrieve the email of the author of the
|
public void comment author email echo get included plugin page class apply filters author email get comment author email
|
comment author email display the email of the author of the current
|
public object get page by title string page title string output int page intval g vars wpdb get var g vars wpdb prepare select id from g vars wpdb posts where post title s and post type page page title if booleanval page return get page page output raw return null
|
get page by title retrieve a page given its title
|
public void comment author email link string linktext string before string after object email null object display null email get included plugin page class apply filters comment email std class get g vars comment comment author email if empty email equal email display equal linktext linktext strval email echo before echo a href mailto strval email strval display a echo after
|
comment author email link display the html email link to the author
|
public array get page children int page id array pages array page list new array std class page null array children new array page list new array for map entry java entry545 pages entry set page std class java entry545 get value if equal std class get page post parent page id page list put page if booleanval children get page children intval std class get page id pages page list array array merge page list children return page list
|
get page children retrieve child pages
|
public string get comment author link string url null string author null string return null todo only call these functions when they are needed include in if else blocks url get comment author url author get comment author if empty url equal http url return author else return a href url rel external nofollow author a return strval get included plugin page class apply filters get comment author link return
|
get comment author link retrieve the html link to the url of the
|
public void comment author link echo get comment author link
|
comment author link display the html link to the url of the author
|
public string get comment author ip return strval get included plugin page class apply filters get comment author ip std class get g vars comment comment author ip
|
get comment author ip retrieve the ip address of the author of the
|
public void comment author ip echo get comment author ip
|
comment author ip displays the ip address of the author of the
|
public string get comment author url return strval get included plugin page class apply filters get comment author url std class get g vars comment comment author url
|
get comment author url returns the url of the author of the current
|
public array get page hierarchy array posts int parent array result new array std class post null array children null result new array if booleanval posts for map entry java entry546 posts entry set post std class java entry546 get value if equal std class get post post parent parent result put std class get post id std class get post post name children get page hierarchy posts intval std class get post id result array array append result children append children to result return result
|
get page hierarchy
|
public void comment author url echo get included plugin page class apply filters comment url get comment author url
|
comment author url display the url of the author of the current
|
public string get page uri int page id std class page null string uri null page std class get page page id g consts get object raw uri url urldecode strval std class get page post name a page cannot be it s own parent if equal std class get page post parent std class get page id return uri while equal std class get page post parent 0 page std class get page intval std class get page post parent g consts get object raw uri url urldecode strval std class get page post name uri return uri
|
get page uri builds a page uri
|
public string get comment author url link string linktext string before string after string url null string display null string return null url get comment author url display equal linktext linktext url display strings str replace http www display display strings str replace http display if equal strings substr display 1 display strings substr display 0 1 return before a href url rel external display a after return strval get included plugin page class apply filters get comment author url link return
|
get comment author url link retrieves the html link of the url of
|
public void comment author url link string linktext string before string after echo get comment author url link linktext before after
|
comment author url link displays the html link of the url of the
|
public string get comment date string d string date null if equal d date get included functions page class mysql2date strval get included functions page class get option date format strval std class get g vars comment comment date true else date get included functions page class mysql2date d strval std class get g vars comment comment date true return strval get included plugin page class apply filters get comment date date d
|
get comment date retrieve the comment date of the current comment
|
public array get object term cache object id string taxonomy array cache cache array get included cache page class wp cache get id taxonomy relationships return array cache
|
get object term cache retrieves the taxonomy relationship to the
|
public void comment date string d echo get comment date d
|
comment date display the comment date of the current comment
|
public string get comment excerpt string comment text null array blah new array int k 0 int use dotdotdot 0 string excerpt null int i 0 comment text strings strip tags strval std class get g vars comment comment content blah strings explode comment text if array count blah 20 k 20 use dotdotdot 1 else k array count blah use dotdotdot 0 excerpt for i 0 i k i excerpt excerpt blah get i excerpt excerpt booleanval use dotdotdot return strval get included plugin page class apply filters get comment excerpt excerpt
|
get comment excerpt retrieve the excerpt of the current comment
|
public void comment excerpt echo get included plugin page class apply filters comment excerpt get comment excerpt
|
comment excerpt returns the excerpt of the current comment
|
public int get comment id return intval get included plugin page class apply filters get comment id intval std class get g vars comment comment id
|
get comment id retrieve the comment id of the current comment
|
public void comment id echo get comment id
|
comment id displays the comment id of the current comment
|
public string get comment link return get included link template page class get permalink intval std class get g vars comment comment post id false comment intval std class get g vars comment comment id
|
get comment link retrieve the link to the current comment
|
public void update term cache array terms string taxonomy string term taxonomy null std class term null for map entry java entry628 terms entry set term std class java entry628 get value term taxonomy taxonomy if empty term taxonomy term taxonomy strval std class get term taxonomy get included cache page class wp cache add std class get term term id term term taxonomy 0
|
update term cache updates terms to taxonomy in cache
|
public string get comments link return get included link template page class get permalink 0 false comments
|
get comments link retrieves the link to the current post comments
|
public int get comments number int post id std class post null int count 0 if booleanval post id post id intval g vars id post std class get included post page class get post post id g consts get object raw if isset std class get post comment count count 0 else count intval std class get post comment count return intval get included plugin page class apply filters get comments number count
|
get comments number retrieve the amount of comments a post has
|
public array wp get attachment metadata int post id boolean unfiltered std class post null array data null post id value intval post id if booleanval post std class get post post id g consts get object raw return null data array get post meta intval std class get post id wp attachment metadata true if unfiltered return data return array get included plugin page class apply filters wp get attachment metadata data std class get post id
|
wp get attachment metadata retrieve metadata for an attachment
|
public void comments number string zero string one string more string deprecated string output int number get comments number intval g vars id if number 1 output strings str replace strval number equal false more get included l10n page class comments default more else if equal number 0 output equal false zero get included l10n page class no comments default zero else must be one output equal false one get included l10n page class 1 comment default one echo get included plugin page class apply filters comments number output number
|
comments number display the language string for the number of
|
public string get comment text return strval get included plugin page class apply filters get comment text std class get g vars comment comment content
|
get comment text retrieve the text of the current comment
|
public void comment text echo get included plugin page class apply filters comment text get comment text
|
comment text displays the text of the current comment
|
public string wp get attachment url int post id std class post null string url null post id value intval post id if booleanval post std class get post post id g consts get object raw return url get included post template page class get the guid intval std class get post id if equal attachment std class get post post type booleanval url return return strval get included plugin page class apply filters wp get attachment url url std class get post id
|
wp get attachment url retrieve the url for an attachment
|
public string get comment time string d boolean gmt string comment date null string date null comment date strval gmt std class get g vars comment comment date gmt std class get g vars comment comment date if equal d date get included functions page class mysql2date strval get included functions page class get option time format comment date true else date get included functions page class mysql2date d comment date true return strval get included plugin page class apply filters get comment time date d gmt
|
get comment time retrieve the comment time of the current comment
|
public object post custom object key array custom new array custom get included post page class get post custom 0 if equal 1 array count custom get key return custom get array key get 0 else return custom get key
|
post meta custom per post fields
|
public void comment time string d echo get comment time d false
|
comment time display the comment time of the current comment
|
public string get comment type if equal std class get g vars comment comment type g vars comment fields put comment type comment return strval get included plugin page class apply filters get comment type std class get g vars comment comment type
|
get comment type retrieve the comment type of the current comment
|
public void comment type string commenttxt string trackbacktxt string pingbacktxt object type null type get comment type int java switch selector59 0 if equal type trackback java switch selector59 1 if equal type pingback java switch selector59 2 switch java switch selector59 case 1 echo trackbacktxt break case 2 echo pingbacktxt break default echo commenttxt
|
comment type display the comment type of the current comment
|
public string get trackback url string tb url null if equal get included functions page class get option permalink structure tb url get included formatting page class trailingslashit get included link template page class get permalink 0 false get included link template page class user trailingslashit trackback single trackback else tb url get included functions page class get option siteurl wp trackback php p strval g vars id return strval get included plugin page class apply filters trackback url tb url
|
get trackback url retrieve the current posts trackback url
|
public string trackback url boolean deprecated if deprecated echo get trackback url return else return get trackback url
|
trackback url displays the current posts trackback url
|
public string get attachment inner html int id boolean fullsize array max dims std class post string inner html if booleanval post std class get included post page class get post id g consts get object raw return if booleanval inner html get attachment icon intval std class get post id fullsize max dims return inner html inner html get included formatting page class attribute escape strval std class get post post title return strval get included plugin page class apply filters attachment inner html inner html std class get post id
|
deprecated use wp get attachment image
|
public boolean comments open int post id std class post null boolean open false post std class get included post page class get post post id g consts get object raw open equal open std class get post comment status return booleanval get included plugin page class apply filters comments open open post id
|
comments open whether the current post is open for comments
|
public void start el ref string output std class page int depth array args string pad null string title null pad strings str repeat nbsp depth 3 output value output value t option value std class get page id if equal std class get page id args get selected output value output value selected selected output value output value title get included formatting page class wp specialchars strval std class get page post title strval 0 output value output value pad title output value output value option n
|
todo decouple this
|
public boolean pings open int post id std class post null boolean open false post std class get included post page class get post new ref integer post id g consts get object raw open equal open std class get post ping status return booleanval get included plugin page class apply filters pings open open post id
|
pings open whether the current post is open for pings
|
public boolean current user can string capability object vargs wp user current user array args current user get included pluggable page class wp get current user if empty current user return false modified by numiton args function handling func get args vargs args array array merge new array new array entry capability args return booleanval function handling call user func array new callback has cap current user args
|
capability checking wrapper around the global current user object
|
public void wp comment form unfiltered html nonce object deprecated if get included capabilities page class current user can unfiltered html get included functions page class wp nonce field unfiltered html comment std class get g vars post id wp unfiltered html comment false true
|
wp comment form unfiltered html nonce displays form token for
|
public wp role get role string role if isset g vars wp roles g vars wp roles new wp roles g vars g consts return g vars wp roles get role role
|
convenience wrappers around wp roles
|
public string clean pre array matches return clean pre object matches
|
added by numiton
|
public void comments popup script int width int height string file string javascript null if empty file wpcommentspopupfile use the index else wpcommentspopupfile file wpcommentsjavascript 1 javascript script type text javascript nfunction wpopen macagna n window open macagna blank width strval width height strval height scrollbars yes status yes n n script n echo javascript
|
comments popup script displays the js popup script to show a
|
public void update post cache array posts std class post null if booleanval posts return for map entry java entry553 posts entry set post std class java entry553 get value get included cache page class wp cache add std class get post id post posts 0
|
update post cache updates posts in cache
|
public string get locale if isset g vars locale return strval get included plugin page class apply filters locale g vars locale wplang is defined in wp config if g consts is wplangdefined g vars locale g consts get wplang if empty g vars locale g vars locale g vars locale strval get included plugin page class apply filters locale g vars locale return g vars locale
|
get locale gets the current locale
|
public string translate string text string domain if isset l10n get domain return strval get included plugin page class apply filters gettext gettext reader l10n get domain translate text text else return text
|
translate retrieve the translated text
|
public string translate with context string text string domain string whole null int last bar 0 whole translate text domain last bar strings strrpos whole if equal false last bar return whole else return strings substr whole 0 last bar
|
translate with context retrieve the translated text and strip
|
public string string text string domain return translate text domain
|
retrieve a translated string
|
public void update page cache array pages update post cache pages
|
update page cache alias of update post cache
|
public string c string text string domain return translate with context text domain
|
c retrieve context translated string
|
public string ngettext string single string plural int number string domain if isset l10n get domain return strval get included plugin page class apply filters ngettext gettext reader l10n get domain ngettext single plural number single plural number else if equal number 1 return plural else return single
|
ngettext retrieve the plural or single form based on the amount
|
public array ngettext noop string single string plural int number string domain return new array new array entry single new array entry plural
|
ngettext noop register plural strings in pot file but dont translate them
|
public void load textdomain string domain string mofile cached file reader input null if isset l10n get domain return if file system or socket is readable mofile input new cached file reader g vars g consts mofile else return l10n put domain new gettext reader g vars g consts input
|
load textdomain loads mo file into the list of domains
|
public void load default textdomain string locale null string mofile null locale get locale if empty locale locale en us mofile g consts get abspath g consts get langdir locale mo load textdomain default mofile
|
load default textdomain loads default translated strings based on
|
public void load plugin textdomain string domain string path string locale null string mofile null locale get locale if empty locale locale en us if equal false path path g consts get plugindir mofile g consts get abspath path domain locale mo load textdomain domain mofile
|
load plugin textdomain loads the plugins translated strings
|
public void load theme textdomain object domain string locale null string mofile null locale get locale if empty locale locale en us mofile get included theme page class get template directory locale mo load textdomain strval domain mofile
|
load theme textdomain includes themes translated strings for the
|
public wp user set current user int id string name return wp set current user id name
|
set current user populates global user information for any user
|
public wp user wp set current user int id string name if isset g vars current user equal id g vars current user get id return g vars current user g vars current user new wp user g vars g consts id name get included user page class setup userdata g vars current user get id get included plugin page class do action set current user return g vars current user
|
wp set current user changes the current user by id or name
|
public void clean page cache int id clean post cache id get included cache page class wp cache delete all page ids posts get included cache page class wp cache delete get pages posts get included plugin page class do action clean page cache id
|
clean page cache will clean the page in the cache
|
public wp user wp get current user get currentuserinfo return g vars current user
|
wp get current user retrieve the current user object
|
public boolean get currentuserinfo int user if g consts is xmlrpc requestdefined g consts get xmlrpc request return false if empty g vars current user return false if booleanval user wp validate auth cookie wp set current user 0 return false wp set current user user return false
|
get currentuserinfo populate global variables with information about the currently logged in user
|
public std class get userdata int user id std class user user id get included functions page class absint user id if equal user id 0 return null user std class get included cache page class wp cache get user id users if booleanval user return user if booleanval user std class g vars wpdb get row g vars wpdb prepare select from g vars wpdb users where id d limit 1 user id return null get included user page class fill user user return user
|
get userdata retrieve user info by user id
|
public void update post caches array posts array post ids new array int i 0 no point in doing all this work if we didn t match any posts if booleanval posts return update post cache posts post ids new array for i 0 i array count posts i post ids put posts get std class class i fields get id get included taxonomy page class update object term cache post ids post update postmeta cache post ids
|
update post caches call major cache updating functions for list of
|
public boolean update user cache return true
|
update user cache updates a users cache when overridden by a plugin
|
public std class get user by email string email object user id null std class user user id get included cache page class wp cache get email useremail user null if strict equal null user id user std class get included cache page class wp cache get user id users if strict equal null user return user if booleanval user std class g vars wpdb get row g vars wpdb prepare select from g vars wpdb users where user email s email return null get included user page class fill user user return user
|
get user by email retrieve user info by email
|
public void wp logout wp clear auth cookie get included plugin page class do action wp logout
|
wp logout log the current user out
|
public void future post hook object deprecated std class post get included cron page class wp clear scheduled hook publish future post std class get post id get included cron page class wp schedule single event strval qdate time strtotime std class get post post date gmt gmt publish future post new array new array entry std class get post id
|
future post hook hook used to schedule publication for a post
|
public string wp generate auth cookie int user id int expiration std class user string key null string hash null string cookie null user get userdata user id key wp hash std class get user user login strval expiration hash compat page hash hmac md5 std class get user user login strval expiration key cookie std class get user user login strval expiration hash return strval get included plugin page class apply filters auth cookie cookie user id expiration
|
wp generate auth cookie generate authentication cookie contents
|
public void save post hook int post id std class post if equal std class get post post type page if empty std class get post page template if update post meta post id wp page template std class get post page template add post meta post id wp page template std class get post page template true clean page cache post id g vars wp rewrite flush rules else clean post cache post id
|
save post hook hook used to prevent page post cache and rewrite
|
public void auth redirect checks if a user is logged in if not redirects them to the login page if empty g vars web env cookie get g consts get auth cookie booleanval wp validate auth cookie strval g vars web env cookie get g consts get auth cookie empty g vars web env cookie get g consts get auth cookie get included functions page class nocache headers wp redirect get included functions page class get option siteurl wp login php redirect to url urlencode g vars web env get request uri 302 system exit
|
auth redirect checks if a user is logged in if not it redirects
|
public void add external rule object regex object redirect this non wp rules put regex redirect
|
add a rule that doesnt redirect to index
|
public int check admin referer string action string query arg string adminurl null string referer null int result 0 adminurl strings strtolower strval get included functions page class get option siteurl wp admin referer strings strtolower get included functions page class wp get referer result wp verify nonce g vars web env request get query arg action if booleanval result equal 1 action strict equal strings strpos referer adminurl boolean false get included functions page class wp nonce ays action system exit get included plugin page class do action check admin referer action result return result
|
check admin referer makes sure that a user was referred from
|
public void add endpoint object name object places this endpoints put new array new array entry places new array entry name g vars wp add query var strval name
|
add an endpoint like trackback to be inserted after certain url types
|
public int check ajax referer object action string query arg boolean die object nonce null int result 0 if booleanval query arg nonce g vars web env request get query arg else nonce booleanval g vars web env request get ajax nonce g vars web env request get ajax nonce g vars web env request get wpnonce result wp verify nonce nonce action if die equal false result system exit 1 get included plugin page class do action check ajax referer action result return result
|
check ajax referer verifies the ajax request to prevent processing
|
public boolean wp redirect string location int status location strval get included plugin page class apply filters wp redirect location status status intval get included plugin page class apply filters wp redirect status status location if booleanval location allows the wp redirect filter to cancel a redirect return false location wp sanitize redirect location if g vars is iis network header refresh 0 url location else if true modified by numiton get included functions page class status header status this causes problems on iis and some fast cgi setups network header location location return false
|
wp redirect redirects to another page with a workaround for the
|
public string wp sanitize redirect string location array strip new array boolean found false string val null location qreg ex perl preg replace a z0 9 i location location get included kses page class wp kses no null location remove 0d and 0a from location strip new array new array entry 0d new array entry 0a found true while found found false for map entry java entry517 strip entry set val strval java entry517 get value while strict equal strings strpos location val boolean false found true location strings str replace val location return location
|
wp sanitize redirect sanitizes a url for use in a redirect
|
public int wp nonce tick object nonce life null nonce life get included plugin page class apply filters nonce life 86400 return math ceil floatval date time time floatval nonce life floatval 2
|
wp nonce tick get the time dependent variable for nonce creation
|
public int wp verify nonce object nonce object action wp user user null int uid 0 int i 0 user wp get current user uid user get id i wp nonce tick nonce generated 0 12 hours ago if equal strings substr wp hash strval i strval action strval uid 12 10 nonce return 1 nonce generated 12 24 hours ago if equal strings substr wp hash strval i 1 strval action strval uid 12 10 nonce return 2 invalid nonce return intval false fixme temporary return intval true
|
wp verify nonce verify that correct nonce was used with time limit
|
public string wp create nonce object action wp user user null int uid 0 float i 0 user wp get current user uid user get id i wp nonce tick return strings substr wp hash strval i strval action strval uid 12 10
|
wp create nonce creates a random one time use token
|
public boolean connected array sock status new array if empty this smtp conn sock status file system or socket socket get status this smtp conn if booleanval sock status get eof hmm this is an odd situation the socket is valid but we aren t connected anymore if this do debug 1 echo smtp notice this crlf eof caught while checking if connected this close return false return true everything looks good return false
|
returns true if connected to a server otherwise false
|
public void close this error null so there is no confusion this helo rply null if empty this smtp conn close the connection and cleanup file system or socket fclose this smtp conn this smtp conn 0
|
closes the socket and cleans up the state of the class
|
public string wp salt string secret key null string salt null secret key if g consts is secret keydefined equal g consts get secret key equal g vars wp default secret key g consts get secret key secret key g consts get secret key if g consts is secret saltdefined salt g consts get secret salt else salt strval get included functions page class get option secret if empty salt salt wp generate password 12 get included functions page class update option secret salt return strval get included plugin page class apply filters salt secret key salt
|
wp salt get salt to add to hashes to help prevent attacks
|
public string wp hash string data string salt null salt wp salt return compat page hash hmac md5 data salt
|
wp hash get hash of given string
|
public string wp hash password string password if empty wp hasher by default use the portable hash from phpass wp hasher new password hash g vars g consts 8 true return wp hasher hash password password
|
wp hash password create a hash encrypt of a plain text password
|
public boolean hello string host this error null so no confusion is caused if this connected this error new array new array entry error called hello without being connected return false if a hostname for the helo wasn t specified determine a suitable one to send if empty host we need to determine some sort of appopiate default to send to the server host localhost send extended hello first rfc 2821 if this send hello ehlo host if this send hello helo host return false return true
|
sends the helo command to the smtp server
|
public string wp generate password int length string chars null string password null int i 0 chars abcdefghijklmnopqrstuvwxyz abcdefghijklmnopqrstuvwxyz0123456789 modified by numiton fix for word press bug http trac wordpress org ticket 6842 password for i 0 i length i password password strings substr chars math mt rand 0 strings strlen chars 1 1 return password
|
wp generate password generates a random password drawn from the
|
public void wp set password string password int user id string hash null string query null hash wp hash password password query g vars wpdb prepare update g vars wpdb users set user pass s user activation key where id d hash user id g vars wpdb query query get included cache page class wp cache delete user id users
|
wp set password updates the users password with a new encrypted
|
public boolean turn this error new array new array entry error this method turn of the smtp is not implemented if this do debug 1 echo smtp notice strval this error get error this crlf return false
|
this is an optional command for smtp that this class does not
|
public void wp setcookie string username string password boolean already md5 string home string siteurl boolean remember std class user get included functions page class deprecated function source code info get current function 2 5 wp set auth cookie user get userdatabylogin username wp set auth cookie intval std class get user id remember
|
wp setcookie sets a cookie for a user who just logged in
|
public string get lines string data null string str null data while booleanval str file system or socket fgets this smtp conn 515 if this do debug 4 echo smtp get lines data was data this crlf echo smtp get lines str is str this crlf data data str if this do debug 4 echo smtp get lines data is data this crlf if the 4th character is a space then we are done reading so just break the loop if equal strings substr str 3 1 break return data
|
read in as many lines as possible
|
public void wp clearcookie get included functions page class deprecated function source code info get current function 2 5 wp clear auth cookie wp clear auth cookie
|
wp clearcookie clears the authentication cookie logging the user
|
public array wp get cookie login get included functions page class deprecated function source code info get current function 2 5 return new array
|
wp get cookie login gets the user cookie login
|
public boolean wp login string username string password boolean deprecated object user null user wp authenticate username password if get included classes page class is wp error user return true g vars error wp error user get error message return false
|
wp login checks a users login information and logs them in if it
|
public string attribute escape string text string safe text null safe text wp specialchars text strval true return strval get included plugin page class apply filters attribute escape safe text text
|
escaping for html attributes escaping for html attributes
|
public string like escape string text return strings str replace new array new array entry new array entry new array new array entry new array entry text
|
escapes text for sql like special characters and
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.