WP-Parsidatev6.2.1 developer reference
/
111 classes776 methods50 functions100 properties40 JS functions17 SCSS mixins50 SCSS variables89 hooks
WP-Parsidate 6.2.1 developer reference. Generated from the plugin source. Type in the search box to filter every class, method, function, JS function, SCSS symbol and hook at once. Click any header to expand or collapse it, press / to jump to search, click # next to a symbol to copy a direct link.
Legend: publicprotectedprivate staticabstract auto = description inferred from the code because the source has no docblock action init = WordPress hook this callback is attached to

Bootstrap 1 classes, 4 callables

wp-parsidate.php defines the plugin constants, loads composer autoload and boots the Plugin class.

publicstatic
$instance
L67
publicauto
__construct(())#
L69
Constructor.
private
define(()) : void#
L80
Define constant
private
instance(()) : void#
L136
Instant classes
publicstatic
getInstance(()) : ?self#
L167
Returns an instance of WP_Parsidate class, makes instance if not exists

Public API functions 0 classes, 12 callables

Global helper functions you can call from themes and other plugins. Functions/Core.php holds the current API, Functions/Old.php keeps legacy names for backward compatibility.

Convert gregorian datetime to persian datetime
parsidate(( $format, $dateTime = 'now', $lang = 'per' )) : string#
L12
Convert gregorian datetime to persian datetime
gregdate(( $format, $datetime )) : false|string#
L28
Convert persian datetime to gregorian datetime
Gets an option name and check that option is active or not
wpp_is_active(( $option_name )) : bool#
L16
Gets an option name and check that option is active or not
disable_wpp(()) : bool#
L27
Check hook deactivator enable in current call back trace
wpp_date_is(( $dateString, $format = 'Y-m-d\TH:i:sP' )) : array#
L41
Validate date string
wpp_is_time_validate(( $time, string $default_seconds = '00' )) : false|string#
L55
Validate time string
wpp_is_postal_code_validate(( $postalCode, bool $checkSum = false )) : bool#
L69
Check value is postal code
wpp_is_sitemap(()) : bool#
L80
Checks is WordPress sitemap
fix_number(( string $content )) : array|string|string[]|null#
L93
Fix numbers and convert them to Persian digits style
wpp_is_feed(()) : bool#
L104
Detects current page is feed or not
per_number(( string $number )) : string#
L117
Converts English digits to Persian digits
eng_number(( string $number )) : string#
L130
Converts Persian digits to English digits

Core 6 classes, 25 callables

The date engine. WPP_ParsiDate does the Gregorian to Jalali math, Calendar and Archive build the calendar and archive markup.

publicstatic
getPostTypeArchives(( $args = '' )) : void#
L20
Create Persian Archives
publicstaticauto
getPostArchives(( $args = '' )) : void#
L69
Returns post archives.
privatestatic
printYearArchive(( $year, $format, $before, $count, $show_post_count, $args )) : void#
L114
Yearly archive
privatestatic
printMonthArchive(( $old_date, $format, $before, $count, $show_post_count, $args )) : void#
L135
Monthly archive
privatestaticauto
printArchive(( $results, $args )) : void#
L153
Builds and outputs the archive markup.
publicstatic
printCalendar(( string $postType = 'post', string $theme = 'none' )) : void#
L25
Create Persian Calendar
publicauto
__construct(())#
L8
Constructor.
Months class
publicstatic
getGregorianMonths(( ?string $type = null, bool $short = false )) : array|mixed|null#
L22
Get Gregorian month names, Months type is persian, dari, kurdish, pashto
publicstatic
getMonths(( ?string $type = null )) : array|mixed|null#
L122
Get month names, Months type is persian, dari, kurdish, pashto
publicstatic
getWeekDays(( ?string $type = null )) : array|mixed|null#
L214
Get week day names, Week day type is persian, dari, kurdish, pashto
publicstatic
getGregorianWeekDays(( ?string $type = null, bool $short = false )) : array|mixed|null#
L273
Get Gregorian week day names, Week day type is persian, dari, kurdish, pashto
publicauto
__construct(())#
L15
Constructor, hooks the class into WordPress with 1 action.
publicstatic
getPostsWhere(( $where, $wp_query = '' )) : string#
L27
Converts post date pointer to Jalali pointer
Posts class
editPostHooks(()) : void#
L158
Hooks admin functions for restrict posts in edit pages
action load-edit.php
adminPostsWhere(( $where )) : string#
L170
Limits posts to a certain date, if date set
filter posts_where
addMonthYearSelectPostFilter(()) : void#
L185
Restrict posts to given date
action restrict_manage_posts
Parsi date main conversation class
protectedstatic
$instance
L18
public
$sessions
L20
public
$persian_day_names
L22
public
$persian_day_small
L23
public
$j_days_in_month
L25
private
$j_days_sum_month
L26
private
$g_days_sum_month
L27
public
IsPerLeapYear(( $year )) : bool#
L36
Check year is leaped
private
IsLeapYear(( $year )) : bool#
L50
WPP_ParsiDate::IsLeapYear() check year is leap
public
persian_date(( $format, $date = 'now', $lang = 'per' )) : string#
L64
WPP_ParsiDate::persian_date() convert gregorian datetime to persian datetime
public
gregorian_to_persian(( $gy, $gm, $gd )) : array#
L231
WPP_ParsiDate::gregorian_to_persian() convert gregorian date to persian date
private
week_day(( $wday )) : int#
L274
Get day of the week shamsi/jalali
public
trim_number(( $num, $sp = '٫' )) : string#
L287
WPP_ParsiDate::trim_number() convert english number to persian number
publicstatic
getInstance(()) : WPP_ParsiDate#
L301
WPP_ParsiDate::getInstance() create instance of WPP_ParsiDate class
public
gregorian_date(( $format, $persianDate = '' )) : false|string#
L318
WPP_ParsiDate::gregorian_date() convert persian datetime to gregorian datetime
public
persian_to_gregorian(( $jy, $jm, $jd )) : array#
L356
WPP_ParsiDate::persian_to_gregorian() convert persian date to gregorian date

Helpers 21 classes, 178 callables

Static utility namespaces used across the plugin: HTML field builders, sanitizing, validating, number conversion, caching, templates and more.

publicstatic
getVersion(()) : string#
L13
Get assets version, if plugin or WP debug mode activated add timestamp to version string.
publicstatic
url(( string $path )) : string#
L24
Get asset url
publicstaticauto
path(( string $path )) : string#
L28
Builds and returns path.
publicstatic
isImageString(( string $string )) : bool#
L39
Determines whether the string is HTML image string
publicstatic
isSvgImageString(( string $string, bool $clean = true )) : bool#
L51
Determines whether the string is HTML image string
publicstatic
cleanSvgImageString(( string $svg )) : string#
L66
Clean HTML SVG string
publicstatic
setSvgDimensions(( string $svg, int $width, ?int $height = null, bool $clean = true )) : string#
L87
Set HTML SVG image string width and height
Constants: cacheGroup
publicstatic
exists(( string $key, bool $useDBCache = true )) : bool#
L18
Determines cache is existing
publicstatic
set(( string $key, $value, int $expireTime = 0, bool $useDBCache = true )) : bool#
L32
Set cache value
publicstatic
get(( string $key, bool $useDBCache = true )) : mixed Cache value, Return false if not exists#
L50
Get cache value
publicstatic
delete(( string $key, bool $deleteDBCache = true )) : bool#
L71
Delete cache
publicstatic
getTimeZoneOffset(( $timezone )) : float|int#
L17
Get time zone offset base on timezone input
publicstatic
getLocalOffset(()) : string#
L30
Will return an offset using the WordPress timezone set by the user Example return values: -04:00, +00:00, or +5:45
publicstatic
changeDateFormat(( string $date, string $dateFormat, string $returnFormat )) : string#
L68
Change date format
publicstatic
isDateString(( string $dateString, string $format = 'Y-m-d\TH:i:sP' )) : array#
L80
Determines is gregorian/shamsi date string
publicstatic
isTimeString(( $time, string $seconds = '00' )) : false|string Return time string if is time, Otherwise false#
L130
Determines is time string
publicstaticauto
check(()) : bool#
L8
Validates the given value.
publicstaticauto
plugin(()) : bool#
L12
Builds and returns plugin.
publicstaticauto
wp(()) : bool#
L16
Builds and returns wp.
private
$args
L11
private
$defaultArgs
L16
private
$feedItems
L21
private
$error
L26
private
$replaceDescText
L31
publicauto
__construct(( array $args ))#
L36
Constructor, initializes the object properties.
public
setArgs(( array $args )) : void#
L55
Set feed arguments
public
getError(()) : \WP_Error#
L70
Get Error
public
getFeedItems(()) : array#
L79
Get feed Items
public
replaceDescText(( $replaceTexts )) : self#
L90
Set replace text value
public
read(( bool $useCache = true )) : self#
L154
Read feed
publicauto
setEmptyFeedDesc(( $desc ))#
L267
Sets empty feed desc.
private
replaceText(( array $feedItem, array $replaceTexts, string $field = 'description' )) : array#
L280
Replace text in feed fields
Constants: prefixprefixNamesaveFieldscheckIconcrossIcon
privatestatic
wrap(( $field, $data )) : string#
L55
Wraps a settings field in its row markup with label, description and layout classes.
publicstaticauto
textarea(( $data )) : string#
L67
Builds and returns the HTML markup for a textarea settings field.
publicstaticauto
inputText(( $data )) : string#
L91
Builds and returns the HTML markup for a input text settings field.
publicstaticauto
color(( $data )) : string#
L118
Builds and returns the HTML markup for a color settings field.
publicstaticauto
wpcolorpicker(( $data )) : string#
L122
Builds and returns the HTML markup for a wpcolorpicker settings field.
publicstatic
text(( $data )) : string#
L126
Builds and returns the HTML markup for a plain text input field.
publicstaticauto
email(( $data )) : string#
L130
Builds and returns the HTML markup for a email settings field.
publicstaticauto
tel(( $data )) : string#
L134
Builds and returns the HTML markup for a tel settings field.
publicstaticauto
url(( $data )) : string#
L138
Builds and returns the HTML markup for a url settings field.
publicstaticauto
number(( $data )) : string#
L142
Builds and returns the HTML markup for a number settings field.
publicstaticauto
password(( $data )) : string#
L146
Builds and returns the HTML markup for a password settings field.
publicstaticauto
select(( $data )) : string#
L154
Builds and returns the HTML markup for a select settings field.
publicstaticauto
imagesizeselect(( $data )) : string#
L191
Builds and returns the HTML markup for a imagesizeselect settings field.
publicstaticauto
userselect(( $data )) : string#
L200
Builds and returns the HTML markup for a userselect settings field.
publicstaticauto
userroleselect(( $data )) : string#
L223
Builds and returns the HTML markup for a userroleselect settings field.
publicstaticauto
taxonomyselect(( $data )) : string#
L236
Builds and returns the HTML markup for a taxonomyselect settings field.
publicstaticauto
termselect(( $data )) : string#
L251
Builds and returns the HTML markup for a termselect settings field.
publicstaticauto
posttypeselect(( $data )) : string#
L272
Builds and returns the HTML markup for a posttypeselect settings field.
publicstaticauto
postselect(( $data )) : string#
L287
Builds and returns the HTML markup for a postselect settings field.
publicstaticauto
menuselect(( $data )) : string#
L318
Builds and returns the HTML markup for a menuselect settings field.
publicstaticauto
orderstatusselect(( $data )) : string#
L334
Builds and returns the HTML markup for a orderstatusselect settings field.
publicstaticauto
currencyselect(( $data )) : string#
L344
Builds and returns the HTML markup for a currencyselect settings field.
publicstaticauto
media(( $data )) : string#
L359
Builds and returns the HTML markup for a media settings field.
publicstaticauto
range(( $data )) : string#
L481
Builds and returns the HTML markup for a range settings field.
publicstaticauto
hidden(( $data )) : string#
L504
Builds and returns the HTML markup for a hidden settings field.
publicstaticauto
radio(( $data )) : string#
L508
Builds and returns the HTML markup for a radio settings field.
publicstaticauto
radioinline(( $data )) : string#
L520
Builds and returns the HTML markup for a radioinline settings field.
publicstaticauto
checkboxinline(( $data )) : string#
L544
Builds and returns the HTML markup for a checkboxinline settings field.
publicstaticauto
checkbox(( $data )) : string#
L572
Builds and returns the HTML markup for a checkbox settings field.
publicstaticauto
toggle(( $data )) : string#
L585
Builds and returns the HTML markup for a toggle settings field.
publicstaticauto
button(( $data )) : string#
L602
Builds and returns the HTML markup for a button settings field.
publicstaticauto
hr(()) : string#
L612
Builds and returns the HTML markup for a hr settings field.
publicstaticauto
space(( $data )) : string#
L616
Builds and returns the HTML markup for a space settings field.
publicstaticauto
startinlineelements(( $data )) : string#
L624
Builds and returns the HTML markup for a startinlineelements settings field.
publicstaticauto
endinlineelements(( $data )) : string#
L645
Builds and returns the HTML markup for a endinlineelements settings field.
publicstaticauto
startrepeatable(( $data )) : string#
L649
Builds and returns the HTML markup for a startrepeatable settings field.
publicstaticauto
endrepeatable(( $data )) : string#
L661
Builds and returns the HTML markup for a endrepeatable settings field.
publicstaticauto
startrepeatableelements(( $data )) : string#
L672
Builds and returns the HTML markup for a startrepeatableelements settings field.
publicstaticauto
endrepeatableelements(( $data )) : string#
L702
Builds and returns the HTML markup for a endrepeatableelements settings field.
publicstaticauto
startgrid(( $data )) : string#
L706
Builds and returns the HTML markup for a startgrid settings field.
publicstaticauto
endgrid(( $data )) : string#
L716
Builds and returns the HTML markup for a endgrid settings field.
publicstaticauto
h2(( $data )) : string#
L720
Builds and returns the HTML markup for a h2 settings field.
publicstaticauto
tinyaddon(( $data )) : string#
L724
Builds and returns the HTML markup for a tinyaddon settings field.
publicstaticauto
addon(( $data )) : string#
L767
Builds and returns the HTML markup for a addon settings field.
publicstaticauto
startaddons(( $data )) : string#
L826
Builds and returns the HTML markup for a startaddons settings field.
publicstaticauto
endaddons(( $data )) : string#
L830
Builds and returns the HTML markup for a endaddons settings field.
publicstaticauto
notice(( $data )) : string#
L834
Builds and returns the HTML markup for a notice settings field.
action wp_parsidate_admin_init
publicstaticauto
table(( $data )) : string#
L844
Builds and returns the HTML markup for a table settings field.
publicstaticauto
paragraph(( $data )) : string#
L915
Builds and returns the HTML markup for a paragraph settings field.
publicstaticauto
image(( $data )) : string#
L925
Builds and returns the HTML markup for a image settings field.
publicstaticauto
gradientcolorpicker(( $data )) : string#
L934
Builds and returns the HTML markup for a gradientcolorpicker settings field.
publicstaticauto
colorpalette(( $data ))#
L1023
Builds and returns the HTML markup for a colorpalette settings field.
publicstaticauto
datatable(( $data ))#
L1062
Builds and returns the HTML markup for a datatable settings field.
publicstaticauto
printFields(( $fields, $echo = true ))#
L1074
Builds and outputs the fields markup.
privatestatic
checkData(( array $data )) : bool|array#
L1102
Check input data
publicstaticauto
getAttributes(( $data, $default = [] )) : string#
L1280
Returns attributes.
privatestaticauto
getClass(( $data, $default = '' )) : string#
L1296
Returns class.
publicstatic
reorderArray(( $array, $orders )) : array|false Reordered array#
L14
Reorder array list
publicstatic
randomString(( $length, $smallAlphabet = true, $largeAlphabet = true, $numbers = true )) : false|string Random string, Otherwise return false if empty#
L41
Random string
publicstatic
arrayInsertAfter(( array $haystack, int $needle = 0, array $stuff = [] )) : array#
L77
Inserts any number of scalars or arrays at the point in the haystack immediately after the search key ($needle) was found,
publicstatic
urlToKey(( string $url, $hostOnly = false )) : false|string Key string, if url isn't valid return false#
L91
URL to key Use for cache base on url string
publicstaticauto
decode(( string $json, ?bool $associative = null, int $depth = 512, int $flags = 0 ))#
L45
Builds and returns decode.
publicstaticauto
encode(( $value, int $flags = 0, int $depth = 512 ))#
L89
Builds and returns encode.
publicstatic
validate(( $value )) : bool#
L105
Validate JSON value
publicstatic
create(( string $action = WP_PARSI_KEY )) : string#
L13
Create nonce
publicstatic
verify(( ?string $nonce = null, $action = WP_PARSI_KEY )) : int|false 1 if the nonce is valid and generated between 0-12 hours ago,#
L29
Verifies that a correct security nonce was used with time limit.
privatestatic
$messages
L8
publicstatic
addAndDisplay(( string $key, array $notices, bool $echo = true )) : string#
L19
Add notice and display immediately
publicstatic
add(( string $key, string $message, ?string $type = null, ?string $linkTitle = null, ?string $link = null )) : void#
L43
Add notice
publicstatic
clear(( string $key )) : void#
L70
Clear notice(s) by the Key
publicstatic
display(( string $key, ?string $type = null, bool $echo = true )) : string#
L83
Display notice(s)
publicstatic
html(( string $type, string $message, ?string $linkTitle = '', ?string $link = '' )) : string#
L125
Get HTML of a notice
privatestatic
getIcon(( $type )) : string#
L140
Get notice icon base on type
privatestatic
getType(( $type )) : string#
L178
Get type of notice
publicstatic
fixNumber(( string $content )) : string#
L13
Fix numbers and convert them to Persian digits style
publicstatic
persianNumber(( string $content )) : string#
L29
Converts English numbers to Persian numbers in post contents
publicstatic
toPersian(( string $number )) : string#
L40
Converts English digits to Persian digits
publicstatic
toEnglish(( string $number )) : string#
L55
Converts Persian digits to English digits
Constants: PROTECTED_TAGSSKIP_TEXT_INSIDE_TAGSSKIP_CLASSESROOT_ID
publicstatic
convertContent(( string $content )) : string#
L70
Public API.
privatestatic
containsAsciiDigit(( string $content )) : bool#
L108
Quick ASCII digit test.
privatestatic
containsPersianOrArabic(( string $content )) : bool#
L118
Check whether the content contains Persian/Arabic script characters.
privatestatic
protectFragileBlocks(( string $html, array &$protected )) : string#
L130
Replace fragile blocks with placeholders so DOM parsing never touches them.
privatestatic
restoreFragileBlocks(( string $html, array $protected )) : string#
L152
Restore protected placeholders.
privatestaticauto
makePlaceholder(( int $index )) : string#
L160
Builds placeholder.
privatestatic
convertHtmlTextNodes(( string $html )) : ?string#
L175
Parse fragment HTML and convert eligible text nodes.
privatestaticauto
shouldSkipTextNode(( DOMText $node )) : bool#
L262
Checks whether to skip text node, returns true or false.
privatestaticauto
elementHasSkipClass(( DOMElement $element )) : bool#
L292
Checks whether element has skip class, returns true or false.
privatestaticauto
convertNumbersInText(( string $text )) : string#
L331
Converts numbers in text to its Persian or Jalali form.
privatestaticauto
toPersianNumber(( string $value )) : string#
L341
Converts to persian number to its Persian or Jalali form.
Param class.
publicstatic
get(( $id, $default = false, $filter = FILTER_DEFAULT, $flag = [] )) : mixed#
L22
Get field from query string.
publicstatic
post(( $id, $default = false, $filter = FILTER_DEFAULT, $flag = [] )) : mixed#
L38
Get field from FORM post.
publicstatic
request(( $id, $default = false, $filter = FILTER_DEFAULT, $flag = [] )) : mixed#
L61
Get field from request.
publicstatic
server(( $id, $default = false, $filter = FILTER_DEFAULT, $flag = [] )) : mixed#
L77
Get field from FORM server.
publicstatic
decodeSerialize(( $queryString )) : array#
L87
Decode form.serelize() jQuery Post String Return like $_POST['Form_Input_Name or ID']
publicstaticauto
getTypes(( $args = [], $ignore = [ 'attachment', 'page' ] )) : array#
L6
Returns types.
publicstaticauto
getTypeSelect(( $id, $name, $selected, $args = [], $ignore = [ 'attachment', 'page' ] )) : string#
L22
Returns type select.
publicstatic
svg(( string $svg )) : string#
L17
Sanitize SVG
publicstatic
clean(( $value )) : array|mixed|string#
L32
Clean scalar value
publicstatic
jsonArray(( string $value )) : array#
L48
JSON to Array
publicstatic
bool(( $value )) : bool#
L76
Convert to bool value
publicstatic
absint(( $value )) : int#
L89
Converts a value to non-negative integer.
publicstatic
int(( $value )) : int#
L100
Converts a value to integer
publicstatic
float(( $value )) : float#
L111
Converts a value to float
publicstatic
title(( string $value )) : string#
L122
Sanitizes a string into a slug, which can be used in URLs or HTML attributes.
publicstatic
color(( $value )) : string#
L133
Sanitizes a hex color.
publicstatic
colorNoHash(( string $value )) : string#
L145
Sanitizes a hex color without a hash. Use sanitize_hex_color() when possible.
publicstatic
text(( string $value )) : string#
L156
Sanitizes a string from user input or from the database.
publicstatic
email(( string $value )) : string#
L167
Strips out all characters that are not allowable in an email.
publicstatic
filename(( string $value )) : string#
L178
Sanitizes a filename, replacing whitespace with dashes.
publicstatic
url(( string $value )) : string#
L189
Sanitizes a URL for database or redirect usage.
publicstatic
textarea(( string $value )) : string#
L200
Sanitizes a multiline string from user input or from the database.
publicstatic
mimeType(( string $value )) : string#
L222
Sanitizes a mime type
publicstatic
sqlOrderBy(( string $value )) : string#
L233
Ensures a string is a valid SQL 'order by' clause.
publicstatic
username(( string $value )) : string#
L244
Sanitizes a username, stripping out unsafe characters.
publicstatic
kses(( string $content )) : string#
L13
Filters text content and strips out disallowed HTML.
publicstatic
removeHtmlComments(( string $html )) : string#
L24
Remove HTML comments
publicstatic
removeHtmlDoctype(( string $html )) : string#
L35
Remove HTML Document type
publicstatic
load(( string $file, array $args = [], bool $loadOnce = false, bool $echo = true )) : false|string|void#
L16
Load template file
publicstatic
getPath(( $template, $dir = 'plugin' )) : string#
L38
Get path of template file
publicstatic
pathCorrection(( $path )) : string#
L51
Fix template path
publicstatic
getData(( $field = null, $userID = 0 )) : false|int|mixed|string|\WP_User#
L16
Get user data
publicstatic
isTimeStamp(( $timestamp )) : bool#
L15
Validating timestamp number
publicstatic
isUrl(( $url )) : bool#
L28
Validating URL
publicstatic
hposEnabled(()) : bool#
L11
Check WC custom order tables are enabled or not
publicstatic
isPostalCode(( $postalCode, $checkSum = false )) : bool#
L23
Check value is postal code
publicstatic
getOrderStatuses(()) : array#
L59
Get WC order statuses
publicstaticauto
debug(()) : bool#
L6
Builds and returns debug.
publicstatic
getPageName(()) : string#
L15
Get current page name
publicstatic
getCurrentAction(()) : string#
L47
Retrieves the name of the current action hook.
publicstatic
isAction(( $actions )) : bool#
L58
Check action
publicstatic
isRTL(()) : bool#
L74
Determines whether the current locale is right-to-left (RTL).
publicstatic
isUserLoggedIn(()) : bool#
L83
Determines whether the current visitor is a logged in user.
publicstatic
getCurrentUserID(()) : int#
L92
Gets the current user's ID.
publicstatic
blogInfo(( $show = '', $filter = 'raw' )) : string Mostly string values, might be empty.#
L104
Retrieves information about the current site.
publicstatic
isAjax(()) : bool#
L115
Determines whether the current request is a WordPress Ajax request.
publicstatic
isHome(()) : bool#
L124
Check current page is Home page
publicstatic
isBlog(()) : bool#
L133
Check current page is Blog page
publicstatic
isSinglePost(()) : bool#
L142
Check current page is Single Post page
publicstatic
isSingle(( $post = '' )) : bool#
L154
Determines whether the query is for an existing single post.
publicstatic
isSingular(( $postTypes = '' )) : bool#
L167
Determines whether the query is for an existing single post of any post type * (post, attachment, page, custom post types).
publicstatic
is404(()) : bool#
L176
Determines whether the query has resulted in a 404 (returns no results).
publicstatic
isPage(( $page = '' )) : bool#
L188
Determines whether the query is for an existing single page.
publicstatic
isCategory(( $category = '' )) : bool#
L199
Determines whether the query is for an existing category archive page.
publicstatic
isTag(( $tag = '' )) : bool#
L210
Determines whether the query is for an existing tag archive page.
publicstatic
isFeed(()) : bool#
L220
Detects current page is feed or not
publicstatic
isSitemap(()) : bool#
L242
Checks is WordPress sitemap
publicstatic
pluginPathToSlug(( string $pluginFile )) : string#
L255
Converts a plugin filepath to a slug.
publicstatic
isPluginActivated(( string $plugin )) : bool#
L272
Determines whether a plugin is active.
publicstatic
isMultilingualActive(()) : bool#
L286
Checks WPML or PolyLang plugins is active

Admin 10 classes, 68 callables

Everything for the wp-admin side: settings screens, dashboard page, tools, converter and asset loading.

publicauto
__construct(())#
L8
Constructor.
Constants: tabicon
publicauto
__construct(())#
L18
Constructor, hooks the class into WordPress with 3 actions and 1 filter.
publicauto
content(()) : void#
L25
Outputs the content section markup for this screen.
action wp_parsidate_dashboard_tab_content
privatestaticauto
getTeamMembers(()) : array#
L217
Returns team members.
privatestaticauto
getGithubContributors(()) : array#
L283
Returns github contributors.
privateauto
getSocialIcon(( $key ))#
L314
Returns social icon.
publicauto
header(()) : void#
L368
Outputs the header section markup for this screen.
publicauto
notice(()) : void#
L376
Outputs the notice section markup for this screen.
action wp_parsidate_admin_init
publicauto
addMenu(( $menus ))#
L382
Adds this module's tab to the WP-Parsidate settings menu.
filter wp_parsidate_menusaction admin_menu
publicauto
__construct(())#
L10
Constructor, hooks the class into WordPress with 1 action.
publicauto
enqueueScripts(()) : void#
L14
Enqueues the admin scripts and styles for this module.
action admin_enqueue_scripts
publicstaticauto
imageUrl(( $path )) : string#
L47
Builds and returns image url.
Constants: tabicon
privatestatic
$settings
L11
publicauto
__construct(())#
L13
Constructor, hooks the class into WordPress with 3 filters.
publicauto
addMenu(( $menus ))#
L19
Adds this module's tab to the WP-Parsidate settings menu.
filter wp_parsidate_menusaction admin_menu
publicauto
allSettings(( $settings )) : array#
L28
Adds this module's settings group to the plugin settings array.
filter wp_parsidate_settings
publicauto
settings(()) : array#
L34
Builds and returns this module settings screen definition, title, description and sections.
filter wp_parsidate_convert_settings_options
Constants: tabicon
privatestatic
$settings
L11
publicauto
__construct(())#
L13
Constructor, hooks the class into WordPress with 3 filters.
publicauto
addMenu(( $menus ))#
L19
Adds this module's tab to the WP-Parsidate settings menu.
filter wp_parsidate_menusaction admin_menu
publicauto
allSettings(( $settings )) : array#
L28
Adds this module's settings group to the plugin settings array.
filter wp_parsidate_settings
publicauto
settings(()) : array#
L34
Builds and returns this module settings screen definition, title, description and sections.
filter wp_parsidate_convert_settings_options
Constants: tabicon
publicauto
__construct(())#
L14
Constructor, hooks the class into WordPress with 2 actions and 1 filter.
publicauto
addMenu(( $menus ))#
L20
Adds this module's tab to the WP-Parsidate settings menu.
filter wp_parsidate_menusaction admin_menu
publicauto
notice(()) : void#
L29
Outputs the notice section markup for this screen.
action wp_parsidate_admin_init
publicauto
content(()) : void#
L33
Outputs the content section markup for this screen.
action wp_parsidate_dashboard_tab_content
privateauto
getAddons(()) : array#
L71
Returns addons.
Constants: tabicon
privatestatic
$settings
L11
publicauto
__construct(())#
L13
Constructor, hooks the class into WordPress with 5 filters.
publicauto
addMenu(( $menus ))#
L21
Adds this module's tab to the WP-Parsidate settings menu.
filter wp_parsidate_menusaction admin_menu
publicauto
allSettings(( $settings )) : array#
L33
Adds this module's settings group to the plugin settings array.
filter wp_parsidate_settings
publicauto
settings(()) : array#
L39
Builds and returns this module settings screen definition, title, description and sections.
filter wp_parsidate_convert_settings_options
publicauto
__construct(())#
L10
Constructor, hooks the class into WordPress with 9 actions.
publicauto
flushRewriteRules(()) : void#
L22
Flushes rewrite rules.
action admin_initaction admin_footer
publicauto
checkSubmitForm(()) : void#
L28
Validates submit form.
action wp_parsidate_admin_init
publicauto
pageHeader(( $currentTab )) : void#
L35
Handles page header for this module.
action wp_parsidate_header
publicauto
pageContent(( $currentTab )) : void#
L39
Handles page content for this module.
action wp_parsidate_content
publicauto
init(()) : void#
L58
Initializes this module.
action admin_initaction initaction plugins_loaded
publicauto
adminMenuInit(()) : void#
L64
Handles admin menu init for this module.
action admin_menu
publicauto
displayNotices(( $tab )) : void#
L70
Builds and outputs the notices markup.
action wp_parsidate_notice
publicauto
addMenu(()) : void#
L77
Adds this module's tab to the WP-Parsidate settings menu.
filter wp_parsidate_menusaction admin_menu
publicauto
mainPage(()) : void#
L85
Outputs the main page markup.
publicstaticauto
getMenus(()) : array#
L172
Returns menus.
publicstaticauto
menuItem(( $tab, $menu, $link = null )) : string#
L176
Builds and returns menu item.
publicstaticauto
getActiveTab(()) : string#
L190
Returns active tab.
privatestaticauto
defaultTabs(()) : array#
L198
Builds and returns default tabs.
publicstaticauto
isSettingPage(()) : bool#
L202
Checks whether setting page, returns true or false.
privatestatic
$settings
L11
publicauto
__construct(())#
L13
Constructor, hooks the class into WordPress with 1 action.
publicauto
saveForm(( $tab )) : void#
L17
Saves form.
action wp_parsidate_submit_settings_form
privatestaticauto
saveRepeatableSettings(( $settings, $optionsName ))#
L89
Saves repeatable settings.
publicstaticauto
getSettingDefault(( $setting ))#
L157
Returns setting default.
publicstaticauto
sanitizeOptionsSetting(( $value, $setting ))#
L191
Sanitizes options setting before it is saved or used.
publicstaticauto
sanitizeSetting(( $value, $setting ))#
L225
Sanitizes setting before it is saved or used.
publicstaticauto
getSettings(( $tab ))#
L300
Returns settings.
publicstaticauto
allSettings(( $tab = null ))#
L308
Adds this module's settings group to the plugin settings array.
filter wp_parsidate_settings
publicstaticauto
printPage(( $currentTab, $settings )) : void#
L318
Builds and outputs the page markup.
privatestaticauto
printSettings(( $settings, $optionsName )) : void#
L337
Builds and outputs the settings markup.
privatestaticauto
checkRepeatableSettings(( $settings, $optionsName )) : array#
L359
Validates repeatable settings.
publicstaticauto
headerSettings(( $currentTab, $settings )) : void#
L448
Outputs the header settings markup.
publicstaticauto
footerSettings(( $currentTab, $currentSection )) : void#
L479
Outputs the footer settings markup.
privatestaticauto
printSections(( $currentTab, $settings )) : void#
L515
Builds and outputs the sections markup.
privatestaticauto
getSections(( $sections )) : array#
L544
Returns sections.
publicstaticauto
getCurrentSettings(( $settings ))#
L556
Returns current settings.
publicstaticauto
getActiveSection(( $settings ))#
L567
Returns active section.
privatestaticauto
isSectionMode(( $settings )) : bool#
L580
Checks whether section mode, returns true or false.
Constants: tabicon
privatestatic
$settings
L11
publicauto
__construct(())#
L13
Constructor, hooks the class into WordPress with 5 filters.
publicauto
addMenu(( $menus ))#
L21
Adds this module's tab to the WP-Parsidate settings menu.
filter wp_parsidate_menusaction admin_menu
publicauto
allSettings(( $settings )) : array#
L30
Adds this module's settings group to the plugin settings array.
filter wp_parsidate_settings
publicauto
settings(()) : array#
L36
Builds and returns this module settings screen definition, title, description and sections.
filter wp_parsidate_convert_settings_options

App runtime 41 classes, 266 callables

Front-end runtime. Core fixes dates, permalinks and titles. Convert handles Arabic characters and digits. Integration adapts third-party plugins, including WooCommerce with four Iranian bank gateways.

inc/App

publicauto
__construct(())#
L13
Constructor, hooks the class into WordPress with 1 action.
publicauto
init(()) : void#
L23
Initializes this module.
action admin_initaction initaction plugins_loaded
publicauto
__construct(())#
L17
Constructor, hooks the class into WordPress with 4 actions and 3 filters.
publicauto
blockEditorAssets(()) : void#
L42
Builds and returns block editor assets.
action enqueue_block_editor_assets
public
localizeMonthsName(()) : void#
L78
Localize name of months after date picker enqueued
action wpp_jalali_datepicker_enqueued
public
addFontToThemeJson(( $themeJson )) : \WP_Theme_JSON_Data#
L100
Change theme JSON data for global styles and settings.
filter wp_theme_json_data_theme
public
addThemeSupport(()) : void#
L191
Add theme support
action after_setup_theme
public
fixThemeFilePath(( $path, $file )) : string#
L208
Fix theme path file when in plugin dir
filter theme_file_path
public
fixTinyMceFont(()) : void#
L222
Fixes TinyMCE font
filter admin_init
publicauto
adminEnqueueScripts(()) : void#
L239
Enqueues the admin scripts and styles for this module.
action admin_enqueue_scripts

inc/App/Convert

publicauto
__construct(())#
L6
Constructor, hooks the class into WordPress with 1 filter.
publicauto
settings(()) : array#
L13
Builds and returns this module settings screen definition, title, description and sections.
filter wp_parsidate_convert_settings_options
Fix Arabic
publicauto
__construct(())#
L14
Constructor, hooks the class into WordPress with 6 filters.
public
fixArabic(( $content )) : string#
L32
Fix arabic foreign characters
filter the_contentfilter the_titlefilter comment_textfilter wp_list_categoriesfilter the_excerptfilter wp_title
Fix Numbers
publicauto
__construct(())#
L15
Constructor, hooks the class into WordPress with 8 filters.
public
fixPostContentNumbers(( $content )) : string#
L56
Fix numbers in content (Post content with HTML) and convert them to Persian digits
filter the_content
privatestatic
shouldRunContentNumberConverter(( string $content )) : bool#
L73
Decide whether filter should run in current request context.
public
fixNumbersToPersian(( $content )) : string#
L118
Fix numbers and convert them to Persian digits style
filter the_excerptfilter comment_textfilter wp_list_categoriesfilter edd_rial_currency_filter_afterfilter wc_pricefilter woocommerce_get_price_html
public
changeNumbersToPersian(( $string )) : string#
L129
Converts English digits to Persian digits
filter number_format_i18nfilter wp_titlefilter the_titlefilter comments_number

inc/App/Core

Core settings
publicauto
__construct(())#
L13
Constructor.
Constants: sectionID
publicauto
__construct(())#
L11
Constructor, hooks the class into WordPress with 1 action and 1 filter.
publicauto
addNotice(( $tab )) : void#
L16
Adds notice.
action wp_parsidate_admin_init
publicauto
addSectionSettings(( array $sections )) : array#
L22
Adds section settings.
filter wp_parsidate_core_settings_sectionsfilter wp_parsidate_tools_settings_sections
publicauto
__construct(())#
L17
Constructor, hooks the class into WordPress with 11 filters.
publicauto
addDateHooksToDeactivator(( $rawList )) : string#
L39
Adds date hooks to deactivator.
filter wp_parsidate_hook_deactivator_raw_list
public
fixWpDate(( $date, $format, $timestamp, $timezone )) : string#
L54
Fixes wp_date date formatting and convert them to Jalali
filter wp_date
public
fixDateI18n(( $date, $format, $timestamp, $gmt )) : string#
L95
Fixes i18n date formatting and convert them to Jalali
filter date_i18n
public
fixMediaViewSettings(( $settings, $post )) : array#
L115
Fixes Media view Select box and returns in Jalali Format Date
filter media_view_settings
public
fixCommentDate(( $comment_date, $format, $comment ))#
L140
Fixes comment date and returns in Jalali format
filter get_comment_date
public
fixCommentTime(( $time, $format = '' )) : string#
L163
Fixes comment time and returns to Jalali format
filter get_comment_time
public
fixModifiedDate(( $time, $format, $post )) : string#
L190
Fixes post modified date and returns to Jalali format
filter get_the_modified_date
public
fixPostTime(( $time, $format = '', $post = null )) : string#
L210
Fixes post time and returns to Jalali format
filter the_timefilter get_the_time
public
fixPostDate(( $time, $format = '', $post = null )) : string#
L240
Fixes post date and returns to Jalali format
filter the_datefilter get_the_date
private
formatDate(( string $format, $dateTime, string $fallbackGregorianDate = '' )) : string#
L274
Converts a date/time value to a Jalali-formatted string, optionally appending the Gregorian date.
private
appendGregorianDate(( string $jalaliDate, string $format, $dateTime, string $fallbackGregorianDate = '' )) : string#
L294
Appends the Gregorian date to a Jalali date string when dual-date mode is enabled.
private
isDualDateFormat(( string $format )) : bool#
L318
Determines whether a given date format is suitable for dual-date display.
private
formatGregorianDate(( string $format, $dateTime, string $fallbackGregorianDate = '' )) : string#
L358
Formats a date/time value as a Gregorian date string, optionally converting digits to Persian.
private
translateGregorianDateNames(( string $date, int $timestamp )) : string#
L383
Replaces English month and weekday names in a formatted date string with their Persian equivalents.
private
getTimestamp(( $dateTime )) : ?int#
L454
Resolves a date/time value to a Unix timestamp.
publicauto
__construct(())#
L15
Constructor, hooks the class into WordPress with 2 filters.
public
fixWpTitle(( ?string $title, $sep = '-', $seplocation = 'right' )) : string#
L29
Fixes titles for archives
filter wp_titlefilter pre_get_document_title
Constants: sectionID
publicauto
__construct(())#
L11
Constructor, hooks the class into WordPress with 1 action and 1 filter.
public
disableGutenbergBlocksWidget(()) : void#
L21
disable wp widget block that introduced in WordPress 5.8
action init
publicauto
addSectionSettings(( array $sections )) : array#
L28
Adds section settings.
filter wp_parsidate_core_settings_sectionsfilter wp_parsidate_tools_settings_sections

inc/App/Integration

public
$addonID
L19
public
$currentTab
L20
publicauto
initM1Action(()) : void#
L22
Addon callback for the init action, runs only while this addon is active.
publicauto
addDateHooksToDeactivator(( $rawList )) : string#
L38
Adds date hooks to deactivator.
filter wp_parsidate_hook_deactivator_raw_list
publicauto
fixDatePickerScript(()) : void#
L44
Converts date picker script to its Persian or Jalali form.
action admin_enqueue_scripts
publicauto
addOptionToDatePickerSettings(( $field )) : void#
L62
Adds option to date picker settings.
action acf/render_field_settings
publicauto
formatDatePickerValue(( $currentValue, $value, $postID, $field, $escapeHTML )) : ?string#
L74
Builds and returns format date picker value.
filter acf/pre_format_value
publicauto
loadDatePickerField(( $field ))#
L82
Initializes date picker field.
filter acf/load_field
publicauto
loadDatePickerValue(( $value, $postID, $field ))#
L90
Initializes date picker value.
filter acf/load_value
publicauto
updateDatePickerValue(( $value, $postID, $field ))#
L103
Saves date picker value.
filter acf/update_value
public
includeField(( $version = false )) : void#
L127
This function will include the field type class
action acf/include_field_typesaction acf/register_fields
publicauto
addSectionSettings(( $sections ))#
L134
Adds section settings.
filter wp_parsidate_core_settings_sectionsfilter wp_parsidate_tools_settings_sections
publicauto
info(()) : array#
L168
Builds and returns info.
Adds Jalali Datepicker field to ACF
public
__construct(())#
L20
Hooks required tags
public
create_options(( $field ))#
L41
Create extra settings for your field. These are visible when editing a field
public
create_field(( $field ))#
L70
Create the HTML interface for your field
public
input_admin_enqueue_scripts(())#
L86
This action is called in the admin_enqueue_scripts action on the edit screen where your field is created. Use this action to add CSS + JavaScript to assist your render_field() action.
public
load_value(( $value, $post_id, $field )) : int|string $value#
L108
This filter is applied to the $value after it is loaded from the db
public
update_value(( $value, $post_id, $field )) : false|string $value#
L126
This filter is applied to the $value before it is saved in the db
public
format_value_for_api(( $value, $post_id, $field )) : mixed|void $value - the modified value#
L144
This filter is applied to the $value after it is loaded from the db and, before it is passed back to the API functions such as the_field
Adds Jalali Datepicker field to ACF
public
__construct(())#
L21
Hooks required tags
public
render_field_settings(( $field ))#
L46
Create extra settings for your field. These are visible when editing a field
public
render_field(( $field ))#
L62
Create the HTML interface for your field
public
input_admin_enqueue_scripts(())#
L75
This action is called in the admin_enqueue_scripts action on the edit screen where your field is created. Use this action to add CSS + JavaScript to assist your render_field() action.
public
load_value(( $value, $post_id, $field )) : int|string $value#
L100
This filter is applied to the $value after it is loaded from the db
public
update_value(( $value, $post_id, $field )) : false|string $value#
L118
This filter is applied to the $value before it is saved in the db
public
format_value(( $value, $post_id, $field )) : mixed $value (mixed) the modified value#
L136
This filter is applied to the $value after it is loaded from the db and, before it is returned to the template
publicauto
validate_value(( $valid, $value, $field, $input ))#
L158
Validates value.
public
load_field(( $field )) : mixed $field#
L170
This filter is applied to the $field after it is loaded from the database
public
update_field(( $field )) : mixed $field#
L182
This filter is applied to the $field before it is saved to the database
Adds Jalali Datepicker field to ACF
public
__construct(())#
L20
Hooks required tags
public
create_options(( $field ))#
L41
Create extra settings for your field. These are visible when editing a field
public
create_field(( $field ))#
L70
Create the HTML interface for your field
public
input_admin_enqueue_scripts(())#
L86
This action is called in the admin_enqueue_scripts action on the edit screen where your field is created. Use this action to add CSS + JavaScript to assist your render_field() action.
public
load_value(( $value, $post_id, $field )) : int|string $value#
L108
This filter is applied to the $value after it is loaded from the db
public
update_value(( $value, $post_id, $field )) : false|string $value#
L126
This filter is applied to the $value before it is saved in the db
public
format_value_for_api(( $value, $post_id, $field )) : mixed|void $value - the modified value#
L144
This filter is applied to the $value after it is loaded from the db and, before it is passed back to the API functions such as the_field
Adds Timepicker field to ACF
public
__construct(())#
L20
Hooks required tags
public
render_field_settings(( $field ))#
L46
Create extra settings for your field. These are visible when editing a field
public
render_field(( $field ))#
L73
Create the HTML interface for your field
public
input_admin_enqueue_scripts(())#
L97
This action is called in the admin_enqueue_scripts action on the edit screen where your field is created. Use this action to add CSS + JavaScript to assist your render_field() action.
public
load_value(( $value, $post_id, $field )) : int|string $value#
L121
This filter is applied to the $value after it is loaded from the db
public
update_value(( $value, $post_id, $field )) : false|string $value#
L135
This filter is applied to the $value before it is saved in the db
public
format_value(( $value, $post_id, $field )) : mixed $value (mixed) the modified value#
L149
This filter is applied to the $value after it is loaded from the db and, before it is returned to the template
publicauto
validate_value(( $valid, $value, $field, $input ))#
L171
Validates value.
public
load_field(( $field )) : mixed $field#
L183
This filter is applied to the $field after it is loaded from the database
public
update_field(( $field )) : mixed $field#
L195
This filter is applied to the $field before it is saved to the database
public
$addonID
L16
publicauto
initAction(()) : void#
L18
Addon callback for the init action, runs only while this addon is active.
publicauto
addDateHooksToDeactivator(( $rawList )) : string#
L22
Adds date hooks to deactivator.
filter wp_parsidate_hook_deactivator_raw_list
publicauto
info(()) : array#
L28
Builds and returns info.
public
$addonID
L18
public
$currentTab
L19
publicauto
initAction(()) : void#
L21
Addon callback for the init action, runs only while this addon is active.
publicauto
removeDecimals(( $decimals, $amount, $currencyCode )) : int#
L40
Removes decimals.
filter edd_format_amount_decimals
publicauto
addTomanCurrency(( $currencies ))#
L48
Adds toman currency.
filter edd_currencies
public
fixNumbersToPersian(( $content )) : string#
L57
Change english number to persian
filter the_excerptfilter comment_textfilter wp_list_categoriesfilter edd_rial_currency_filter_afterfilter wc_pricefilter woocommerce_get_price_html
public
fixCurrency(( $price, $did ))#
L64
RIAL fix for EDD
filter edd_rial_currency_filter_afterfilter edd_toman_currency_filter_after
publicauto
addSectionSettings(( $sections ))#
L68
Adds section settings.
filter wp_parsidate_core_settings_sectionsfilter wp_parsidate_tools_settings_sections
publicauto
info(()) : array#
L124
Builds and returns info.
public
$addonID
L16
publicauto
initAction(()) : void#
L18
Addon callback for the init action, runs only while this addon is active.
publicauto
fixEditorStyle(()) : void#
L22
Converts editor style to its Persian or Jalali form.
action elementor/editor/after_enqueue_styles
publicauto
info(()) : array#
L34
Builds and returns info.
public
$addonID
L16
publicauto
initAction(()) : void#
L18
Addon callback for the init action, runs only while this addon is active.
publicauto
addDateHooksToDeactivator(( $rawList )) : string#
L22
Adds date hooks to deactivator.
filter wp_parsidate_hook_deactivator_raw_list
publicauto
info(()) : array#
L28
Outputs the info markup.
publicauto
__construct(())#
L6
Constructor.
public
$addonID
L18
public
$currentTab
L19
publicauto
initAction(()) : void#
L21
Addon callback for the init action, runs only while this addon is active.
public
convertTableBuilderDateMeta(( $value, $metaKey, $objectId )) : mixed#
L42
Convert dates in Table Builder cells and metabox display Handles dates retrieved from post/term/user/comment meta
filter jet-engine/listing/data/get-post-metafilter jet-engine/listing/data/get-term-metafilter jet-engine/listing/data/get-user-metafilter jet-engine/listing/data/get-comment-meta
public
convertDateMeta(( ?string $value, array $settings, Jet_Engine_Render_Dynamic_Field $dynamicField )) : ?string#
L59
Convert date/datetime meta value to Shamsi date in Dynamic Fields
filter jet-engine/listings/dynamic-field/custom-value
private
convertDate(( $date )) : string#
L89
Convert date base on input format
publicauto
addSectionSettings(( $sections ))#
L108
Adds section settings.
filter wp_parsidate_core_settings_sectionsfilter wp_parsidate_tools_settings_sections
publicauto
info(()) : array#
L166
Builds and returns info.
public
$addonID
L16
publicauto
initAction(()) : void#
L18
Addon callback for the init action, runs only while this addon is active.
publicauto
addDateHooksToDeactivator(( $rawList )) : string#
L22
Adds date hooks to deactivator.
filter wp_parsidate_hook_deactivator_raw_list
publicauto
info(()) : array#
L28
Builds and returns info.
public
$addonID
L16
publicauto
initAction(()) : void#
L18
Addon callback for the init action, runs only while this addon is active.
publicauto
addDateHooksToDeactivator(( $rawList )) : string#
L22
Adds date hooks to deactivator.
filter wp_parsidate_hook_deactivator_raw_list
publicauto
info(()) : array#
L28
Builds and returns info.
public
$addonID
L19
publicauto
initAction(()) : void#
L21
Addon callback for the init action, runs only while this addon is active.
publicauto
convert(( $datetime, $format = 'c' ))#
L29
Converts convert to its Persian or Jalali form.
publicauto
convert_date_time(( $content ))#
L34
Converts date time to its Persian or Jalali form.
filter rank_math/opengraph/facebook/article_published_timefilter rank_math/opengraph/facebook/article_modified_time
publicauto
json_ld(( $data, $jsonld ))#
L39
Builds and returns json ld.
filter rank_math/json_ld
privateauto
fixDate(( $date )) : string#
L101
Converts date to its Persian or Jalali form.
publicauto
fix_price_currency(( $entity ))#
L120
Converts price currency to its Persian or Jalali form.
filter rank_math/snippet/rich_snippet_product_entity
publicauto
info(()) : array#
L133
Outputs the info markup.
public
$addonID
L16
publicauto
initAction(()) : void#
L18
Addon callback for the init action, runs only while this addon is active.
publicauto
addDateHooksToDeactivator(( $rawList )) : string#
L22
Adds date hooks to deactivator.
filter wp_parsidate_hook_deactivator_raw_list
publicauto
info(()) : array#
L28
Builds and returns info.
public
$addonID
L16
publicauto
initAction(()) : void#
L18
Addon callback for the init action, runs only while this addon is active.
publicauto
addDateHooksToDeactivator(( $rawList )) : string#
L22
Adds date hooks to deactivator.
filter wp_parsidate_hook_deactivator_raw_list
publicauto
info(()) : array#
L28
Builds and returns info.
public
$addonID
L20
public
$currentTab
L22
publicauto
initM1Action(()) : void#
L24
Addon callback for the init action, runs only while this addon is active.
publicauto
initAction(()) : void#
L34
Addon callback for the init action, runs only while this addon is active.
publicauto
convertEmailContentNumbers(( $message )) : string#
L94
Converts email content numbers to its Persian or Jalali form.
filter woocommerce_mail_content
public
beforeWooCommerceInit(()) : void#
L101
Init Before WooCommerce Loaded
action before_woocommerce_init
publicauto
validatePhoneNumber(( $data, $errors )) : void#
L119
Validates phone number.
action woocommerce_after_checkout_validation
public
validatePhone(( $valid, $phone, $country )) : bool#
L133
Validate phone number
filter woocommerce_validate_phone
public
validatePostcode(( $valid, $postcode, $country )) : bool#
L152
Validate Iranian customer postal code
filter woocommerce_validate_postcode
public
convertNonPersianValuesInCheckout(( $data )) : array#
L171
Convert Non-Persian Values in checkout to Persian
filter woocommerce_checkout_posted_data
publicstatic
fixPersianCharacters(( $string )) : string#
L221
replace Arabic characters with equivalent character in Persian
public
acceptPersianNumbersInCheckout(()) : void#
L254
Fix persian postal code & phone numbers in WooCommerce checkout
filter woocommerce_checkout_process
public
acceptPersianNumbersInPostCode(( $postcode, $country ))#
L281
Fix persian postal code in WooCommerce checkout
filter woocommerce_format_postcode
public
fixPersianNumbersInPhone(( $phone, $order )) : string#
L297
Fix non-persian numbers in checkout phone field
filter woocommerce_order_get_shipping_phone
public
changeReportDates(()) : void#
L311
Changes gregorian dates to Jalali date on wc report screen
action admin_init
public
fixShowCreatedOrderDate(()) : void#
L332
Changes order_date field in "Edit order" screen using JS
action admin_footer
public
removeCouponExpiryDateColumn(( $columns )) : mixed#
L434
Remove default wc expire date column in coupons screen and add our custom column
filter manage_edit-shop_coupon_columns
public
printCouponExpiryDateColumn(( $column, $postID )) : void#
L450
Fill our custom date expires column value
action manage_shop_coupon_posts_custom_column
public
changeOrderDateAndCouponExpiresMeta(( $metadata, $object_id, $meta_key, $single )) : int|mixed|string#
L471
Changes coupon expire date on load coupon data We use $wpdb to avoid creating an infinite loop
filter get_post_metadata
publicauto
validateCouponsDate(( $coupon_id )) : void#
L499
Validates coupons date.
action woocommerce_process_shop_coupon_meta
public
validateVariableProductDates(( $product_id )) : void#
L520
Converts variations selected Jalali dates to gregorian
action woocommerce_ajax_save_product_variations
public
validateNonVariableProductDates(( $product_id )) : void#
L575
Convert selected Jalali dates to gregorian on woocommerce save non-variable products
filter woocommerce_process_product_meta
public
changeOrderDateOnSave(( $order_id )) : void#
L617
Convert order date to gregorian before saved at database
action woocommerce_process_shop_order_meta
public
adminEnqueueScripts(()) : void#
L665
enqueue jalali date picker assets
action admin_enqueue_scripts
public
fixEmailTime(( $style, $email )) : string#
L699
Fixes jalali order date direction in WooCommerce emails (Issue: https://github.com/wordpress-parsi/wp-parsidate/issues/154)
filter woocommerce_email_styles
public
fixDateTimeDirection(()) : void#
L709
Fixes jalali order date direction in WooCommerce my-account endpoints (Issue: https://github.com/wordpress-parsi/wp-parsidate/issues/154)
action wp_head
publicauto
fixNumbersToPersian(( $content )) : string#
L715
Converts numbers to persian to its Persian or Jalali form.
filter the_excerptfilter comment_textfilter wp_list_categoriesfilter edd_rial_currency_filter_afterfilter wc_pricefilter woocommerce_get_price_html
publicauto
fixOrderReportQueryDate(( $report_data )) : mixed#
L724
Converts order report query date to its Persian or Jalali form.
filter woocommerce_reports_get_order_report_query
publicauto
fixOrderReportQueryDateCallback(( $date )) : array|mixed|string|string[]#
L736
Converts order report query date callback to its Persian or Jalali form.
private
getCurrentScreen(()) : ?string#
L767
Check the current screen is the WooCommerce order edit page
publicauto
addTabSettings(()) : array#
L798
Adds tab settings.
publicauto
info(()) : array#
L889
Builds and returns info.
Add Iranian payment gateways to WP-Parsidate
publicstatic
$instance
L17
public
__construct(())#
L22
Hooks required tags
publicauto
gateways(()) : array#
L29
Builds and returns gateways.
public
includeFiles(()) : void#
L44
Includes files for plugin
action before_woocommerce_init
publicstatic
getInstance(()) : ?WcGateways#
L64
Returns an instance of class
public
addSettings(( $wooSettings )) : array#
L80
Adds settings for toggle fixing
filter wp_parsidate_woocommerce_settings_options
publicauto
registerSelectedGateways(( $methods )) : mixed#
L115
Registers selected gateways with WordPress.
filter woocommerce_payment_gateways
publicauto
registerOrderApprovalPaymentMethodType(()) : void#
L129
Registers order approval payment method type with WordPress.
action woocommerce_blocks_loaded
publicauto
is_soap_enabled(())#
L156
Checks whether soap enabled, returns true or false.
privateauto
getSelectedGateways(())#
L160
Returns selected gateways.
Constants: VERSION
private
$plugin_path
L23
private
$plugin_url
L24
private
$cities
L26
private
$dropdown_cities
L27
publicauto
__construct(())#
L29
Constructor, hooks the class into WordPress with 1 action and 3 filters.
publicauto
billing_fields(( $fields, $country ))#
L41
Builds and returns billing fields.
filter woocommerce_billing_fields
publicauto
shipping_fields(( $fields, $country ))#
L47
Builds and returns shipping fields.
filter woocommerce_shipping_fields
publicauto
get_cities(( $cc = null ))#
L53
Returns cities.
publicauto
load_country_cities(())#
L65
Initializes country cities.
privateauto
add_to_dropdown(( $item ))#
L82
Adds to dropdown.
publicauto
form_field_city(( $field, $key, $args, $value ))#
L86
Builds and returns form field city.
filter woocommerce_form_field_city
publicauto
load_scripts(())#
L175
Initializes scripts.
action wp_enqueue_scripts
publicauto
get_plugin_path(())#
L194
Returns plugin path.
publicauto
get_plugin_url(())#
L202
Returns plugin url.
private
$gateway
L11
protected
$name
L18
Payment method name/id/slug.
public
initialize(())#
L24
Initializes the payment method type.
is_active(()) : boolean#
L35
Returns if this payment method should be active. If false, the scripts will not be enqueued.
get_payment_method_script_handles(()) : array#
L44
Returns an array of scripts/handles to be registered for this payment method.
get_payment_method_data(()) : array#
L74
Returns an array of key=>value pairs of data made available to the payment methods script.
private
$gateway
L11
protected
$name
L18
Payment method name/id/slug.
public
initialize(())#
L24
Initializes the payment method type.
is_active(()) : boolean#
L35
Returns if this payment method should be active. If false, the scripts will not be enqueued.
get_payment_method_script_handles(()) : array#
L44
Returns an array of scripts/handles to be registered for this payment method.
get_payment_method_data(()) : array#
L74
Returns an array of key=>value pairs of data made available to the payment methods script.
private
$gateway
L11
protected
$name
L18
Payment method name/id/slug.
public
initialize(())#
L24
Initializes the payment method type.
is_active(()) : boolean#
L35
Returns if this payment method should be active. If false, the scripts will not be enqueued.
get_payment_method_script_handles(()) : array#
L44
Returns an array of scripts/handles to be registered for this payment method.
get_payment_method_data(()) : array#
L74
Returns an array of key=>value pairs of data made available to the payment methods script.
private
$gateway
L11
protected
$name
L18
Payment method name/id/slug.
public
initialize(())#
L24
Initializes the payment method type.
is_active(()) : boolean#
L35
Returns if this payment method should be active. If false, the scripts will not be enqueued.
get_payment_method_script_handles(()) : array#
L44
Returns an array of scripts/handles to be registered for this payment method.
get_payment_method_data(()) : array#
L74
Returns an array of key=>value pairs of data made available to the payment methods script.
WPP_WC_Mellat_Gateway class to add Mellat Bank payment gateway to WooCommerce
private
$gateway_name
L20
public
$method_title
L21
public
$terminal_id
L22
public
$username
L23
public
$password
L24
public
$title
L25
public
$description
L26
public
$failed_massage
L27
publicauto
__construct(())#
L29
Constructor, hooks the class into WordPress with 2 actions.
publicauto
get_class(())#
L56
Returns class.
publicauto
init_form_fields(())#
L60
Initializes form fields.
publicauto
get_icon(())#
L116
Returns icon.
publicauto
process_payment(( $order_id ))#
L122
Builds and returns process payment.
publicauto
get_ref_id_from_mellat(( $order ))#
L163
Returns ref id from mellat.
publicauto
handle_gateway_response(())#
L238
Builds and returns handle gateway response.
publicauto
redirect_to_gateway(( $order ))#
L256
Outputs the redirect to gateway markup.
publicauto
verify_payment(( $order ))#
L286
Validates payment.
publicauto
get_amount(( $order ))#
L351
Returns amount.
publicauto
set_failed_payment(( $order ))#
L377
Sets failed payment.
publicauto
verify(( $params, $method = 'bpVerifyRequest' )) : array#
L384
Validates the given value.
publicauto
get_error_message(( $resCode ))#
L438
Returns error message.
auto
wpp_mellat_payment_gateway_init(())#
L9
Bootstraps the Mellat bank payment gateway, defines the gateway class and registers it with WooCommerce.
action before_woocommerce_init
WPP_WC_Melli_Gateway class to add Melli Bank payment gateway to WooCommerce
private
$gateway_name
L19
public
$terminal_id
L20
public
$merchant_id
L21
public
$key
L22
public
$title
L23
public
$description
L24
public
$failed_massage
L25
publicauto
__construct(())#
L27
Constructor, hooks the class into WordPress with 2 actions.
publicauto
get_class(())#
L55
Returns class.
publicauto
init_form_fields(())#
L59
Initializes form fields.
publicauto
get_icon(())#
L116
Returns icon.
publicauto
is_available(())#
L122
Checks whether available, returns true or false.
publicauto
encrypt_pkcs7(( $str, $key )) : string#
L126
Builds and returns encrypt pkcs7.
publicauto
api(( $url, $data = false ))#
L133
Builds and returns api.
publicauto
is_enable_open_ssl(()) : bool#
L161
Checks whether enable open ssl, returns true or false.
publicauto
process_payment(( $order_id ))#
L165
Builds and returns process payment.
publicauto
get_ref_id_from_melli(( $order )) : array#
L198
Returns ref id from melli.
publicauto
handle_gateway_response(())#
L239
Builds and returns handle gateway response.
publicauto
redirect_to_gateway(( $order ))#
L253
Handles redirect to gateway for this module.
publicauto
verify_payment(( $order ))#
L257
Validates payment.
publicauto
get_amount(( $order ))#
L298
Returns amount.
publicauto
set_failed_payment(( $order ))#
L324
Sets failed payment.
auto
wpp_melli_payment_gateway_init(())#
L9
Bootstraps the Melli bank payment gateway, defines the gateway class and registers it with WooCommerce.
action before_woocommerce_init
WPP_WC_Parsian_Gateway class to add Parsian Bank payment gateway to WooCommerce
private
$gateway_name
L21
public
$redirect_uri
L22
public
$description
L23
public
$success_massage
L24
public
$failed_massage
L25
public
$cancelled_massage
L26
public
$title
L27
public
$parsian_login_account
L28
publicauto
__construct(())#
L30
Constructor, hooks the class into WordPress with 3 actions.
publicauto
get_class(())#
L57
Returns class.
publicauto
init_form_fields(())#
L61
Initializes form fields.
publicstaticauto
send_pay_request(( $login_account, $amount, $order_id, $redirect, $additional = '' ))#
L120
Sends pay request.
publicstaticauto
verify_request(( $login_account, $token ))#
L158
Validates request.
publicstaticauto
reversal_request(( $login_account, $token ))#
L185
Builds and returns reversal request.
publicstaticauto
error_response_handler(( $code = '' ))#
L212
Builds and returns error response handler.
publicstaticauto
display_error(( $pay_status = '', $tran_id = '', $order_id = '', $is_callback = 1 ))#
L341
Builds and outputs the error markup.
publicstaticauto
redirect_to_bank(( $url = '' )) : void#
L476
Outputs the redirect to bank markup.
publicauto
process_payment(( $order_id ))#
L488
Builds and returns process payment.
publicauto
receipt_page(( $order_id ))#
L497
Builds and returns receipt page.
publicauto
callback(())#
L541
Outputs the callback markup.
auto
wpp_parsian_payment_gateway_init(())#
L9
Bootstraps the Parsian bank payment gateway, defines the gateway class and registers it with WooCommerce.
action before_woocommerce_init
WPP_WC_Pasargad_Gateway class to add Pasargad Bank payment gateway to WooCommerce
private
$gateway_name
L21
public
$redirect_uri
L22
public
$pasargad_terminal_id
L23
public
$pasargad_merchant_id
L24
public
$description
L25
public
$success_massage
L26
public
$failed_massage
L27
public
$cancelled_massage
L28
publicauto
__construct(())#
L30
Constructor, hooks the class into WordPress with 3 actions.
publicauto
init_form_fields(())#
L58
Initializes form fields.
publicstaticauto
send_pay_request(( $invoice_number, $TerminalCode, $MerchantCode, $Amount, $RedirectAddress, $Mobile = '', $Email = '' ))#
L124
Sends pay request.
publicstaticauto
check_transaction_result(( $transaction_ref_id, $invoice_number = '', $invoice_date = '', $TerminalCode = '', $MerchantCode = '' ))#
L174
Validates transaction result.
publicstaticauto
verify_request(( $invoice_number, $invoice_date, $TerminalCode, $MerchantCode, $Amount ))#
L209
Validates request.
publicstaticauto
reversal_request(( $invoice_number, $invoice_date, $TerminalCode, $MerchantCode ))#
L253
Builds and returns reversal request.
publicstaticauto
error_response_handler(( $code = '' ))#
L296
Builds and returns error response handler.
publicstaticauto
display_error(( $pay_status = '', $tran_id = '', $order_id = '', $is_callback = 1 ))#
L426
Builds and outputs the error markup.
publicstaticauto
redirect_to_bank(( $url = '' ))#
L562
Outputs the redirect to bank markup.
publicauto
process_payment(( $order_id ))#
L574
Builds and returns process payment.
publicauto
receipt_page(( $order_id ))#
L583
Builds and returns receipt page.
publicauto
callback(())#
L627
Builds and returns callback.
auto
wpp_pasargad_payment_gateway_init(())#
L9
Bootstraps the Pasargad bank payment gateway, defines the gateway class and registers it with WooCommerce.
action before_woocommerce_init

inc/App/Tools

Constants: sectionID
publicauto
__construct(())#
L22
Constructor, hooks the class into WordPress with 1 filter.
publicstatic
checkDisable(()) : bool#
L31
Check hook list for deactivating WP-Parsidate functionality, If disable return True.
publicstaticauto
getList(()) : array#
L106
Returns list.
publicauto
addSectionSettings(( array $sections )) : array#
L133
Adds section settings.
filter wp_parsidate_core_settings_sectionsfilter wp_parsidate_tools_settings_sections
Constants: sectionID
publicauto
__construct(())#
L11
Constructor, hooks the class into WordPress with 2 actions and 1 filter.
public
addDateToAdminBar(( $adminBar )) : void#
L27
Add Jalali date to WordPress admin bar
action admin_bar_menu
publicauto
adminBarDateStyle(()) : void#
L41
Outputs the admin bar date style markup.
action admin_head
publicauto
addSectionSettings(( array $sections )) : array#
L55
Adds section settings.
filter wp_parsidate_core_settings_sectionsfilter wp_parsidate_tools_settings_sections
Tools settings
publicauto
__construct(())#
L11
Constructor.

Addons framework 2 classes, 39 callables

Base classes for modular addons. Extend Addon, set addonID, and the base constructor wires all WordPress hooks through the bridge callbacks.

public
$addonID
L12
public
$currentTab
L14
public
$currentSection
L16
publicauto
__construct(())#
L18
Constructor, hooks the class into WordPress with 10 actions and 9 filters.
publicauto
registerAddSectionSettings(( $sections )) : array#
L55
Hook bridge, delegates to the matching child addon callback when the addon is active.
publicauto
registerQueryVarsFilter(( $vars ))#
L63
Hook bridge, runs the child addon's queryVarsFilter() callback when the addon is active.
filter query_vars
publicauto
registerWooAccountMenuItemsFilter(( $items ))#
L71
Hook bridge, runs the child addon's wooAccountMenuItemsFilter() callback when the addon is active.
filter woocommerce_account_menu_items
publicauto
registerAdminBodyClassFilter(( $classes ))#
L79
Hook bridge, runs the child addon's adminBodyClassFilter() callback when the addon is active.
filter admin_body_class
publicauto
registerWpFooterAction(()) : void#
L87
Hook bridge, runs the child addon's wpFooterAction() callback when the addon is active.
action wp_footer
publicauto
registerWpBodyOpenAction(()) : void#
L93
Hook bridge, runs the child addon's wpBodyOpenAction() callback when the addon is active.
action wp_body_open
publicauto
registerAdminEnqueueScriptsAction(()) : void#
L99
Hook bridge, runs the child addon's adminEnqueueScriptsAction() callback when the addon is active.
action admin_enqueue_scripts
publicauto
registerWpEnqueueScriptsAction(()) : void#
L105
Hook bridge, runs the child addon's wpEnqueueScriptsAction() callback when the addon is active.
action wp_enqueue_scripts
publicauto
registerAdminInitAction(()) : void#
L111
Hook bridge, runs the child addon's adminInitAction() callback when the addon is active.
action admin_init
publicauto
registerInitM1Action(()) : void#
L117
Hook bridge, runs the child addon's initM1Action() callback when the addon is active.
action init
publicauto
registerInitAction(()) : void#
L123
Hook bridge, runs the child addon's initAction() callback when the addon is active.
action init
publicauto
registerTemplateRedirectAction(()) : void#
L129
Hook bridge, runs the child addon's templateRedirectAction() callback when the addon is active.
action template_redirect
publicauto
registerWpAction(()) : void#
L135
Hook bridge, runs the child addon's wpAction() callback when the addon is active.
action wp
publicauto
registerMenu(()) : void#
L141
Hook bridge, delegates to the matching child addon callback when the addon is active.
action wp_parsidate_admin_init
publicauto
displayContentHeader(()) : void#
L160
Builds and outputs the content header markup.
publicauto
allSettings(( $settings )) : array#
L166
Hook bridge, delegates to the matching child addon callback when the addon is active.
filter wp_parsidate_settings
publicauto
addMenu(( $menus ))#
L174
Adds this module's tab to the WP-Parsidate settings menu.
filter wp_parsidate_menusaction admin_menu
publicauto
registerAddon(( $addons ))#
L219
Adds this addon to the plugin's addon registry list.
filter wp_parsidate_addons
privateauto
getInfo(( $key = null, $default = null ))#
L225
Returns info.
publicauto
isActivated(()) : bool#
L240
Checks whether activated, returns true or false.
publicauto
getSettingsKey(())#
L273
Returns settings key.
publicauto
getSetting(( $key = null, $default = null, $useCache = true ))#
L277
Returns setting.
publicauto
saveSetting(( $key, $value )) : bool#
L281
Saves setting.
publicauto
savesSetting(( $options )) : bool#
L285
Saves setting.
publicauto
deleteSetting(( $key )) : bool#
L289
Removes setting.
publicauto
addToArraySetting(( $key, $value, $reverse = false )) : bool#
L293
Adds to array setting.
publicauto
deleteFromArraySetting(( $key, $index )) : bool#
L297
Removes from array setting.
Constants: tabicon
publicauto
__construct(())#
L14
Constructor, hooks the class into WordPress with 2 actions and 9 filters.
publicauto
flushRewriteRules(()) : void#
L42
Flushes rewrite rules.
action admin_initaction admin_footer
publicauto
addRefreshNotice(( $tab )) : void#
L50
Adds refresh notice.
action wp_parsidate_admin_init
publicauto
addMenu(( $menus ))#
L64
Adds this module's tab to the WP-Parsidate settings menu.
filter wp_parsidate_menusaction admin_menu
publicauto
saveMessage(( $message, $tab ))#
L73
Saves message.
filter wp_parsidate_save_settings_success_message
publicauto
changeAddonCatTitle(( $title, $cat ))#
L81
Changes addon cat title before WordPress uses it.
filter wp_parsidate_addons_page_cat_title
publicauto
settings(()) : array#
L89
Builds and returns this module settings screen definition, title, description and sections.
filter wp_parsidate_convert_settings_options
publicstaticauto
getAddonCats(()) : ?array#
L237
Returns addon cats.
publicauto
changeSubmitButtonTitle(( $title, $tab ))#
L265
Changes submit button title before WordPress uses it.
filter wp_parsidate_settings_submit_button_title

Gutenberg blocks 4 classes, 10 callables

Server side registration for the Jalali archive and calendar blocks. The block UI lives in the TypeScript files below.

protected
$editorScript
L15
protected
$blockJsonPath
L17
protected
$scriptBaseName
L19
protected
$dataVar
L21
protectedauto
renderContent(( $attributes )) : string#
L23
Builds and outputs the content markup.
protected
$editorScript
L17
protected
$blockJsonPath
L19
protected
$scriptBaseName
L21
protected
$dataVar
L23
protected
$deps
L25
publicauto
__construct(())#
L34
Constructor, hooks the class into WordPress with 1 action.
publicauto
registerBlock(()) : void#
L38
Registers block with WordPress.
action init
publicauto
editorAssets(()) : void#
L60
Handles editor assets for this module.
action enqueue_block_editor_assets
publicauto
renderBlock(( $attributes )) : string#
L71
Builds and outputs the block markup.
protectedabstractauto
renderContent(( $attributes )) : string#
L79
Builds and outputs the content markup.
protectedauto
postTypeOptions(()) : array#
L81
Sends type options.
publicauto
__construct(())#
L6
Constructor.
Constants: STYLE
protected
$editorScript
L18
protected
$blockJsonPath
L20
protected
$scriptBaseName
L22
protected
$dataVar
L24
publicauto
registerBlock(()) : void#
L26
Registers block with WordPress.
action init
protectedauto
renderContent(( $attributes )) : string#
L37
Builds and outputs the content markup.

Widgets 4 classes, 25 callables

Classic widgets for the Jalali archive and calendar plus the admin dashboard news widget.

publicauto
__construct(())#
L21
Constructor.
public
form(( $instance )) : void Default return is 'noform'.#
L32
Outputs the settings update form.
publicauto
update(( $new_instance, $old_instance )) : array#
L116
Saves the data.
public
widget(( $args, $instance ))#
L137
Echoes the widget content.
publicstatic
$printStyle
L21
publicauto
__construct(())#
L23
Constructor, hooks the class into WordPress with 2 actions.
publicauto
printStyle(( $title, $postType, $theme, $widgetID ))#
L30
Builds and outputs the style markup.
action wp_parsidate_calendar_widget_endaction wp_parsidate_calendar_block_end
public
form(( $instance )) : void Default return is 'noform'.#
L51
Outputs the settings update form.
publicauto
update(( $new_instance, $old_instance ))#
L113
Saves the data.
public
widget(( $args, $instance ))#
L132
Echoes the widget content.
publicauto
__construct(())#
L15
Constructor, hooks the class into WordPress with 3 actions and 4 filters.
public
ajaxDashboardWidgets(()) : void#
L30
Handles dashboard widgets via AJAX.
action wp_ajax_wpp-dashboard-widgets
public
addDashboardWidget(()) : void#
L53
Add Parsi-Date events and news widget
action wp_dashboard_setup
public
dashboardWidgetContent(()) : void#
L72
Put our content into the new widget
public
dashboardEventsNews(()) : void#
L108
Renders the Events and News dashboard widget.
public
printDashboardWidgetPrimary(()) : void#
L160
'WordPress Events and News' dashboard widget.
public
printDashboardWidgetPrimaryOutput(( $widget_id, $feeds )) : void#
L259
Displays the WordPress events and news feeds.
public
enqueueScripts(( $hook )) : void#
L278
Enqueue our assets to WP admin dashboard
action admin_enqueue_scripts
private
getMockedSponsors(()) : array#
L305
Get mocked sponsors
privateauto
getRemoteSponsors(()) : array#
L335
Returns remote sponsors.
privateauto
getDataSponsors(()) : array#
L365
Returns data sponsors.
public
changeDashboardSecondaryFeedUrl(()) : string#
L383
Widget secondary feed
filter dashboard_secondary_feed
public
changeDashboardFeedUrl(()) : string#
L403
Widget primary feed
filter dashboard_primary_feed
Widget class
publicauto
__construct(())#
L11
Constructor, hooks the class into WordPress with 1 action.

Plugin lifecycle and settings 3 classes, 18 callables

Install and upgrade routines and the Settings engine that renders every option screen from array definitions.

publicauto
__construct(())#
L15
Constructor, hooks the class into WordPress with 1 action.
publicauto
init(())#
L19
Initializes this module.
action admin_initaction initaction plugins_loaded
privatestaticauto
install(())#
L31
Handles install for this module.
publicstaticauto
update(()) : void#
L43
Saves the data.
privatestatic
isEnable(( $array, $key )) : bool#
L134
Check old setting is enable
publicauto
__construct(())#
L16
Constructor, hooks the class into WordPress with 3 actions and 3 filters.
public
limitWpParsiTimeout(( array $args, string $url )) : array#
L33
Limits the timeout for requests to wp-parsi.com to prevent dashboard lag.
filter http_request_args
public
loadTextDomain(()) : void#
L48
Load plugin translations from the local languages directory.
action init
public
activationAdminNotice(()) : void#
L64
Notice for the activation. Added dismiss feature.
action admin_notices
public
dismissActivationNotice(()) : void#
L88
Dismiss the notice action
action admin_init
publicstaticauto
addToArray(( $key, $value, $optionsName = null, $reverse = false )) : bool#
L10
Adds to array.
publicstaticauto
deleteFromArray(( $key, $index, $optionsName = null )) : bool#
L25
Removes from array.
publicstaticauto
save(( $key, $value, $optionsName = null )) : bool#
L39
Saves the data.
publicstaticauto
saves(( $options, $optionsName = null )) : bool#
L43
Saves the data.
publicstaticauto
get(( ?string $key = null, $default = null, $optionsName = null, bool $useCache = true ))#
L62
Returns the value.
publicstaticauto
delete(( string $key, $optionsName = null )) : bool#
L79
Removes .

Templates and misc 0 classes, 0 callables

Bundled third-party libraries 19 classes, 181 callables

Ships inside the plugin for the bank gateways. NuSOAP is the SOAP client used by Mellat, class-rsa signs Pasargad requests. Do not edit these, replace upstream if needed.

publicstaticauto
rsa_encrypt(( $message, $public_key, $modulus, $keylength ))#
L8
Builds and returns rsa encrypt.
publicstaticauto
rsa_decrypt(( $message, $private_key, $modulus, $keylength ))#
L16
Builds and returns rsa decrypt.
publicstaticauto
rsa_sign(( $message, $private_key, $modulus, $keylength ))#
L24
Builds and returns rsa sign.
publicstaticauto
rsa_verify(( $message, $public_key, $modulus, $keylength ))#
L32
Builds and returns rsa verify.
publicstaticauto
rsa_kyp_verify(( $message, $public_key, $modulus, $keylength ))#
L36
Builds and returns rsa kyp verify.
publicstaticauto
pow_mod(( $p, $q, $r ))#
L44
Builds and returns pow mod.
publicstaticauto
add_PKCS1_padding(( $data, $isPublicKey, $blocksize ))#
L76
Adds pkcs1 padding.
publicstaticauto
remove_PKCS1_padding(( $data, $blocksize ))#
L93
Removes pkcs1 padding.
publicstaticauto
remove_KYP_padding(( $data, $blocksize ))#
L105
Removes kyp padding.
publicstaticauto
binary_to_number(( $data ))#
L112
Builds and returns binary to number.
publicstaticauto
number_to_binary(( $number, $blocksize ))#
L126
Builds and returns number to binary.
private
$public_key
L141
private
$private_key
L142
private
$modulus
L143
private
$key_length
L144
publicauto
__construct(( $xmlRsakey = null, $type = null ))#
L146
Constructor, initializes the object properties.
publicauto
getPublicKey(())#
L160
Returns public key.
publicauto
getPrivateKey(())#
L164
Returns private key.
publicauto
getKeyLength(())#
L168
Returns key length.
publicauto
getModulus(())#
L172
Returns modulus.
publicauto
encrypt(( $data ))#
L176
Builds and returns encrypt.
publicauto
dencrypt(( $data ))#
L180
Builds and returns dencrypt.
publicauto
sign(( $data ))#
L184
Builds and returns sign.
publicauto
verify(( $data ))#
L188
Validates the given value.
Constants: XMLFileXMLString
auto
makeXMLTree(( $data ))#
L198
Builds xmltree.
auto
post2https(( $fields_arr, $url ))#
L228
Builds and returns post2https.
nusoap_base
public
__construct(())#
L298
constructor
public
getGlobalDebugLevel(()) : integer Debug level 0-9, where 0 turns off#
L308
gets the global debug level, which applies to future instances
public
setGlobalDebugLevel(( $level ))#
L319
sets the global debug level, which applies to future instances
public
getDebugLevel(()) : int Debug level 0-9, where 0 turns off#
L329
gets the debug level for this instance
public
setDebugLevel(( $level ))#
L340
sets the debug level for this instance
public
debug(( $string ))#
L351
adds debug data to the instance debug string with formatting
public
appendDebug(( $string ))#
L364
adds debug data to the instance debug string without formatting
public
clearDebug(())#
L377
clears the current debug data for this instance
public
expandEntities(( $val ))#
L420
expands entities, e.g. changes '<' to '&lt;'.
public
getError(()) : false|string error string or false#
L438
returns error string if present
public
setError(( $str )) : void#
L452
sets error string
public
isArraySimpleOrStruct(( $val )) : string (arraySimple|arrayStruct)#
L464
detect if array is a simple array or a struct (associative array)
publicauto
serialize_val(( $val, $name = false, $type = false, $name_ns = false, $type_ns = false, $attributes = false, $use = 'encoded', $soapval = false ))#
L491
Builds and returns serialize val.
public
serializeEnvelope(( $body, $headers = false, $namespaces = array(), $style = 'rpc', $use = 'encoded', $encodingStyle = 'http://schemas.xmlsoap.org/soap/encoding/' )) : string the message#
L771
serializes a message
public
formatDump(( $str )) : string The formatted string#
L836
formats a string to be inserted into an HTML stream
public
contractQname(( $qname )) : string contracted qname#
L850
contracts (changes namespace to prefix) a qualified name
public
expandQname(( $qname )) : string expanded qname#
L875
expands (changes prefix to namespace) a qualified name
public
getLocalPart(( $str )) : string The local part#
L901
returns the local part of a prefixed string returns the original string, if not prefixed
public
getPrefix(( $str )) : false|string The prefix or false if there is no prefix#
L919
returns the prefix part of a prefixed string returns false, if not prefixed
public
getNamespaceFromPrefix(( $prefix )) : mixed The namespace, false if no namespace has the specified prefix#
L936
pass it a prefix, it returns a namespace
public
getPrefixFromNamespace(( $ns )) : false|string The prefix, false if the namespace has no prefixes#
L954
returns the prefix for a given namespace (or prefix) or false if no prefixes registered for the given namespace
public
getmicrotime(()) : string The time in ODBC canonical form with microseconds#
L972
returns the time in ODBC canonical form with microseconds
public
varDump(( $data )) : string The output of var_dump#
L995
Returns a string with the output of var_dump
public
__toString(()) : string#
L1010
represents the object as a string
Contains information for a SOAP fault. Mainly used for returning faults from deployed functions
public
__construct(( $faultcode, $faultactor = '', $faultstring = '', $faultdetail = '' ))#
L1168
constructor
public
serialize(()) : string The serialization of the fault instance.#
L1182
serialize a fault
Backward compatibility
parses an XML Schema, allows access to it's data, other utility methods. imperfect, no validation... yet, but quite functional.
public
__construct(( $schema = '', $xml = '', $namespaces = array() ))#
L1259
constructor
public
parseFile(( $xml, $type )) : boolean#
L1293
parse an XML file
public
parseString(( $xml, $type ))#
L1323
parse an XML string
public
CreateTypeName(( $ename )) : string A type name for an unnamed type#
L1372
gets a type name for an unnamed type
public
schemaStartElement(( $parser, $name, $attrs ))#
L1390
start-element handler
public
schemaEndElement(( $parser, $name ))#
L1708
end-element handler
public
schemaCharacterData(( $parser, $data ))#
L1742
element content handler
public
serializeSchema(())#
L1752
serialize the schema
public
xdebug(( $string ))#
L1871
adds debug data to the clas level debug string
public
getPHPType(( $type, $ns )) : mixed#
L1888
get the PHP type of a user defined type in the schema PHP type is kind of a misnomer since it actually returns 'struct' for assoc. arrays
publicauto
getTypeDef(( $type ))#
L1923
Returns type def.
public
serializeTypeDef(( $type )) : false|string#
L2008
returns a sample serialization of a given type, or false if no type by the given name
public
typeToForm(( $name, $type )) : string#
L2048
returns HTML form elements that allow a user to enter values for creating an instance of the given type.
publicauto
addComplexType(( $name, $typeClass = 'complexType', $phpType = 'array', $compositor = '', $restrictionBase = '', $elements = array(), $attrs = array(), $arrayType = '' ))#
L2117
Adds complex type.
public
addSimpleType(( $name, $restrictionBase = '', $typeClass = 'simpleType', $phpType = 'scalar', $enumeration = array() ))#
L2155
adds a simple type to the schema
public
addElement(( $attrs ))#
L2182
adds an element to the schema
Backward compatibility
For creating serializable abstractions of native PHP types. This class allows element name/namespace, XSD type, and XML attributes to be
public
__construct(( $name = 'soapval', $type = false, $value = - 1, $element_ns = false, $type_ns = false, $attributes = false ))#
L2271
constructor
public
serialize(( $use = 'encoded' )) : string XML data#
L2296
return serialized value
public
decode(()) : mixed#
L2307
decodes a soapval object into a PHP native type
transport class for sending/receiving data via HTTP and HTTPS NOTE: PHP must be compiled with the CURL extension for HTTPS support
public
__construct(( $url, $curl_options = null, $use_curl = false ))#
L2374
constructor
public
setCurlOption(( $option, $value ))#
L2395
sets a cURL option
public
setHeader(( $name, $value ))#
L2409
sets an HTTP header
public
unsetHeader(( $name ))#
L2421
unsets an HTTP header
public
setURL(( $url ))#
L2435
sets the URL to which to connect
public
io_method(()) : string I/O method to use (socket|curl|unknown)#
L2479
gets the I/O method to use
public
connect(( $connection_timeout = 0, $response_timeout = 30 )) : boolean true if connected, false if not#
L2499
establish an HTTP connection
public
send(( $data, $timeout = 0, $response_timeout = 30, $cookies = null )) : string data#
L2746
sends the SOAP request and gets the SOAP response via HTTP[S]
public
sendHTTPS(( $data, $timeout = 0, $response_timeout = 30, $cookies = null )) : string data#
L2788
sends the SOAP request and gets the SOAP response via HTTPS using CURL
public
setCredentials(( $username, $password, $authtype = 'basic', $digestRequest = array(), $certRequest = array() ))#
L2803
if authenticating, set user credentials here
public
setSOAPAction(( $soapaction ))#
L2887
set the soapaction value
public
setEncoding(( $enc = 'gzip, deflate' ))#
L2898
use http encoding
public
setProxy(( $proxyhost, $proxyport, $proxyusername = '', $proxypassword = '', $proxyauthtype = 'basic' ))#
L2923
set proxy info here
public
isSkippableCurlHeader(( $data ))#
L2951
Test if the given string starts with a header that is to be skipped. Skippable headers result from chunked transfer and proxy requests.
public
decodeChunked(( $buffer, $lb ))#
L2984
decode a string that is encoded w/ "chunked' transfer encoding as defined in RFC2068 19.4.6
public
buildPayload(( $data, $cookie_str = '' )) : void#
L3040
Writes the payload, including HTTP headers, to $this->outgoing_payload.
public
sendRequest(( $data, $cookies = null )) : boolean true if OK, false if problem#
L3090
sends the SOAP request via HTTP[S]
public
getResponse(()) : string the response (also sets member variables like incoming_payload)#
L3152
gets the SOAP response via HTTP[S]
public
setContentType(( $type, $charset = false ))#
L3546
sets the content-type for the SOAP message to be sent
public
usePersistentConnection(()) : boolean whether the request was honored by this method.#
L3556
specifies that an HTTP persistent connection should be used
public
parseCookie(( $cookie_str )) : array with data of that cookie#
L3578
parse an incoming Cookie into it's parts
public
getCookiesForRequest(( $cookies, $secure = false )) : string for Cookie-HTTP-Header#
L3645
sort out cookies for the current request
nusoap_server allows the user to create a SOAP server that is capable of receiving messages and returning responses
public
__construct(( $wsdl = false ))#
L3896
constructor the optional parameter is a path to a WSDL file that you'd like to bind the server instance to.
public
service(( $data ))#
L3960
processes request and returns response
Backward compatibility
parses a WSDL file, allows access to it's data, other utility methods. also builds WSDL structures programmatically.
publicauto
__construct(( $wsdl = '', $proxyhost = false, $proxyport = false, $proxyusername = false, $proxypassword = false, $timeout = 0, $response_timeout = 30, $curl_options = null, $use_curl = false ))#
L5001
Constructor, initializes the object properties.
public
fetchWSDL(( $wsdl ))#
L5032
fetches the WSDL document and parses it
public
parseWSDL(( $wsdl = '' ))#
L5139
parses the wsdl document
public
start_element(( $parser, $name, $attrs ))#
L5252
start-element handler
public
end_element(( $parser, $name ))#
L5474
end-element handler
public
character_data(( $parser, $data ))#
L5507
element content handler
public
setCredentials(( $username, $password, $authtype = 'basic', $certRequest = array() ))#
L5527
if authenticating, set user credentials here
publicauto
getBindingData(( $binding ))#
L5536
Returns binding data.
public
getOperations(( $portName = '', $bindingType = 'soap' )) : array#
L5553
returns an assoc array of operation names => operation data
public
getOperationData(( $operation, $bindingType = 'soap' )) : array#
L5595
returns an associative array of data necessary for calling an operation
public
getOperationDataForSoapAction(( $soapAction, $bindingType = 'soap' )) : array#
L5626
returns an associative array of data necessary for calling an operation
publicauto
getTypeDef(( $type, $ns ))#
L5666
Returns type def.
public
webDescription(())#
L5728
prints html description of services
public
serialize(( $debug = 0 )) : string serialization of WSDL#
L5865
serialize the parsed wsdl
public
parametersMatchWrapped(( $type, $parameters )) : boolean whether they parameters are unwrapped (and should be wrapped)#
L6005
determine whether a set of parameters are unwrapped when they are expect to be wrapped, Microsoft-style.
publicauto
serializeRPCParameters(( $operation, $direction, $parameters, $bindingType = 'soap' ))#
L6093
Builds and returns serialize rpcparameters.
publicauto
serializeParameters(( $operation, $direction, $parameters ))#
L6196
Builds and returns serialize parameters.
public
serializeType(( $name, $type, $value, $use = 'encoded', $encodingStyle = false, $unqualified = false )) : string value serialized as an XML string#
L6277
serializes a PHP value according a given type definition
public
serializeComplexTypeAttributes(( $typeDef, $value, $ns, $uqType )) : string value serialized as an XML string#
L6605
serializes the attributes for a complexType
public
serializeComplexTypeElements(( $typeDef, $value, $ns, $uqType, $use = 'encoded', $encodingStyle = false )) : string value serialized as an XML string#
L6670
serializes the elements for a complexType
publicauto
addComplexType(( $name, $typeClass = 'complexType', $phpType = 'array', $compositor = '', $restrictionBase = '', $elements = array(), $attrs = array(), $arrayType = '' ))#
L6785
Adds complex type.
public
addSimpleType(( $name, $restrictionBase = '', $typeClass = 'simpleType', $phpType = 'scalar', $enumeration = array() ))#
L6845
adds an XML Schema simple type to the WSDL types
public
addElement(( $attrs ))#
L6866
adds an element to the WSDL types
publicauto
addOperation(( $name, $in = false, $out = false, $namespace = false, $soapaction = false, $style = 'rpc', $use = 'encoded', $documentation = '', $encodingStyle = '', $customResponseTagName = '' ))#
L6887
Adds operation.
nusoap_parser class parses SOAP XML messages into native PHP values
public
__construct(( $xml, $encoding = 'UTF-8', $method = '', $decode_utf8 = true ))#
L7038
constructor that actually does the parsing
public
start_element(( $parser, $name, $attrs ))#
L7215
start-element handler
public
end_element(( $parser, $name ))#
L7369
end-element handler
public
character_data(( $parser, $data ))#
L7484
element content handler
public
get_response(()) : mixed#
L7511
get the parsed message (SOAP Body)
public
get_soapbody(()) : mixed#
L7521
get the parsed SOAP Body (null if there was none)
public
get_soapheader(()) : mixed#
L7531
get the parsed SOAP Header (null if there was none)
public
getHeaders(()) : string XML or empty if no Header#
L7541
get the unparsed SOAP Header
public
decodeSimple(( $value, $type, $typens )) : mixed PHP value#
L7555
decodes simple types into PHP variables
public
buildVal(( $pos )) : mixed PHP value#
L7604
builds response structures for compound values (arrays/structs) and scalars
Backward compatibility
publicauto
__construct(( $endpoint, $wsdl = false, $proxyhost = false, $proxyport = false, $proxyusername = false, $proxypassword = false, $timeout = 0, $response_timeout = 30, $portName = '' ))#
L7829
Constructor, initializes the object properties.
publicauto
call(( $operation, $params = array(), $namespace = 'http://tempuri.org', $soapAction = '', $headers = false, $rpcParams = null, $style = 'rpc', $use = 'encoded' ))#
L7899
Builds and returns call.
public
checkWSDL(())#
L8132
check WSDL passed as an instance or pulled from an endpoint
public
loadWSDL(())#
L8166
instantiate wsdl object and parse wsdl file
public
getOperationData(( $operation )) : array|false array of data pertaining to the operation, false on error or no data#
L8183
get available data pertaining to an operation
publicauto
send(( $msg, $soapaction = '', $timeout = 0, $response_timeout = 30 ))#
L8213
Sends .
public
parseResponse(( $headers, $data )) : mixed value of the message, decoded into a PHP type#
L8294
processes SOAP message returned from server
public
setCurlOption(( $option, $value ))#
L8357
sets user-specified cURL options
public
setEndpoint(( $endpoint ))#
L8370
sets the SOAP endpoint, which can override WSDL
public
setHeaders(( $headers ))#
L8382
set the SOAP headers
public
getHeaders(()) : string#
L8394
get the SOAP response headers (namespace resolution incomplete)
public
getHeader(()) : mixed#
L8404
get the SOAP response Header (parsed)
public
setHTTPProxy(( $proxyhost, $proxyport, $proxyusername = '', $proxypassword = '' ))#
L8418
set proxy info here
public
setCredentials(( $username, $password, $authtype = 'basic', $certRequest = array() ))#
L8435
if authenticating, set user credentials here
public
setHTTPEncoding(( $enc = 'gzip, deflate' ))#
L8451
use HTTP encoding
public
setUseCURL(( $use ))#
L8463
Set whether to try to use cURL connections if possible
public
useHTTPPersistentConnection(())#
L8473
use HTTP persistent connections if possible
public
getDefaultRpcParams(()) : boolean#
L8489
gets the default RPC parameter setting. If true, default is that call params are like RPC even for document style.
public
setDefaultRpcParams(( $rpcParams ))#
L8505
sets the default RPC parameter setting. If true, default is that call params are like RPC even for document style
public
getProxy(()) : object soap_proxy object#
L8516
dynamically creates an instance of a proxy class, allowing user to directly call methods from wsdl
public
_getProxyClassCode(( $r )) : string PHP/NuSOAP code for the proxy class#
L8567
dynamically creates proxy class code
public
getProxyClassCode(()) : string PHP/NuSOAP code for the proxy class#
L8624
dynamically creates proxy class code
public
getHTTPBody(( $soapmsg )) : string The HTTP body, which includes the SOAP payload#
L8638
gets the HTTP body for the current request.
public
getHTTPContentType(()) : string the HTTP content type for the current request.#
L8650
gets the HTTP content type for the current request.
public
setHTTPContentType(( $contentTypeNew = "text/xml" )) : void#
L8661
allows you to change the HTTP ContentType of the request.
public
getHTTPContentTypeCharset(()) : string the HTTP content type charset for the current request.#
L8674
gets the HTTP content type charset for the current request. returns false for non-text content types.
publicauto
decodeUTF8(( $bool ))#
L8684
Builds and returns decode utf8.
public
setCookie(( $name, $value )) : boolean if cookie-set was successful returns true, else false#
L8699
adds a new Cookie into $this->cookies array
public
getCookies(()) : array with all internal cookies#
L8714
gets all Cookies
public
checkCookies(()) : boolean always return true#
L8724
checks all Cookies and delete those which are expired
public
UpdateCookies(( $cookies )) : boolean always return true#
L8759
updates the current cookies with a new set
For backwards compatiblity, define soapclient unless the PHP SOAP extension is loaded.
caches instances of the wsdl class
public
__construct(( $cache_dir = '.', $cache_lifetime = 0 ))#
L8867
constructor
public
createFilename(( $wsdl )) : string The filename used to cache the instance#
L8881
creates the filename used to cache a wsdl instance
public
debug(( $string ))#
L8892
adds debug data to the class level debug string
public
get(( $wsdl )) : object wsdl The cached wsdl instance, null if the instance is not in the cache#
L8904
gets a wsdl instance from the cache
public
obtainMutex(( $filename, $mode )) : boolean Lock successfully obtained ?!#
L8952
obtains the local mutex
public
put(( $wsdl_instance )) : boolean WSDL successfully cached#
L8974
adds a wsdl instance to the cache
public
releaseMutex(( $filename )) : boolean Lock successfully released#
L9006
releases the local mutex
public
remove(( $wsdl )) : boolean Whether there was an instance to remove#
L9025
removes a wsdl instance from the cache
For backward compatibility
nusoap_base
timestamp_to_iso8601(( $timestamp, $utc = true )) : false|string ISO 8601 date string or false#
L1028
convert unix timestamp to ISO 8601 compliant date string
iso8601_to_timestamp(( $datestr )) : false|int Unix timestamp (int) or false#
L1069
convert ISO 8601 compliant date string to unix timestamp
usleepWindows(( $usec ))#
L1110
sleeps some number of microseconds
parse_http_headers(())#
L4038
parses HTTP request headers.
auto
parse_request(( $data = '' ))#
L4172
Builds and returns parse request.
auto
invoke_method(())#
L4221
Builds and returns invoke method.
serialize_return(())#
L4391
serializes the return value from a PHP function into a full SOAP Envelope
send_response(())#
L4495
sends an HTTP response
verify_method(( $operation, $request )) : boolean Whether the operation was found#
L4575
takes the value that was created by parsing the request and compares to the method's signature, if available.
parseRequest(( $headers, $data )) : false|void void or false on error#
L4596
processes SOAP message received from client
getHTTPBody(( $soapmsg )) : string The HTTP body, which includes the SOAP payload#
L4661
gets the HTTP body for the current response.
getHTTPContentType(()) : string the HTTP content type for the current response.#
L4673
gets the HTTP content type for the current response.
getHTTPContentTypeCharset(()) : string the HTTP content type charset for the current response.#
L4686
gets the HTTP content type charset for the current response. returns false for non-text content types.
add_to_map(( $methodname, $in, $out ))#
L4700
add a method to the dispatch map (this has been replaced by the register method)
auto
register(( $name, $in = array(), $out = array(), $namespace = false, $soapaction = false, $style = false, $use = false, $documentation = '', $encodingStyle = '', $customResponseTagName = '' ))#
L4720
Registers .
fault(( $faultcode, $faultstring, $faultactor = '', $faultdetail = '' ))#
L4809
Specify a fault to be returned to the client. This also acts as a flag to the server that a fault has occured.
configureWSDL(( $serviceName, $namespace = false, $endpoint = false, $style = 'rpc', $transport = 'http://schemas.xmlsoap.org/soap/http', $schemaTargetNamespace = false ))#
L4828
Sets up wsdl object. Acts as a flag to enable internal WSDL generation

JavaScript and TypeScript 40 functions

Source files only. Files in assets/js-admin are compiled output of assets/js-admin-src, edit the src and rebuild with webpack.

auto
IsLeapYear(year)#
L7
Handles is leap year in the admin or front-end UI.
auto
persian_to_gregorian(jy, jm, jd)#
L11
Handles persian to gregorian in the admin or front-end UI.
auto
gregorian_to_persian(gy, gm, gd)#
L31
Handles gregorian to persian in the admin or front-end UI.
create_stampdiv(year, mon, day, hour, minu)#
L57
Edit inline
auto
change_date()#
L126
Handles change date in the admin or front-end UI.
show(i, id)#
L47
Fetch the latest representation of the widget via Ajax and show it. @param {number} i Number of half-seconds to use as the timeout. @param {string} id ID of the element which is going to be checked for changes. @return {
auto
wppInitSponsors()#
L657
Initializes the wpp sponsors behavior on page load.
auto
wppSponsorsIndex(sponsorsCount)#
L684
Handles wpp sponsors index in the admin or front-end UI.
auto
createSlides(slidesData)#
L706
Builds the slides markup or elements.
auto
initWPPSSlider()#
L719
Initializes the wppsslider behavior on page load.
auto
clearNextTimeout()#
L730
Handles clear next timeout in the admin or front-end UI.
auto
nextTimeout()#
L734
Handles next timeout in the admin or front-end UI.
auto
wppsNavigation(slider)#
L761
Handles wpps navigation in the admin or front-end UI.
auto
markup(remove)#
L764
Handles markup in the admin or front-end UI.
auto
removeElement(elment)#
L770
Handles remove element in the admin or front-end UI.
auto
createDiv(className)#
L774
Builds the div markup or elements.
auto
arrowMarkup(remove)#
L781
Handles arrow markup in the admin or front-end UI.
auto
wrapperMarkup(remove)#
L796
Handles wrapper markup in the admin or front-end UI.
auto
dotMarkup(remove)#
L810
Handles dot markup in the admin or front-end UI.
auto
updateClasses()#
L824
Updates classes.
auto
wppdActiveSettingsForm()#
L85
Handles wppd active settings form in the admin or front-end UI.
arrowauto
wppdSettingsFormChangeAlert(event)#
L94
Handles wppd settings form change alert in the admin or front-end UI.
auto
wpColorPickerInit()#
L121
Initializes the wp color picker behavior on page load.
wppdMediaInit()#
L143
Media methods
wppdCopyTextInit()#
L281
Copy text
auto
wppdWcConv2EnNum(str)#
L2
Handles wppd wc conv2 en num in the admin or front-end UI.
auto
wppdWcOrderDateFix()#
L5
Handles wppd wc order date fix in the admin or front-end UI.
Gutenberg block script, registers the `wp-parsidate/archive` block.
auto
archiveTypeLabel(type: string)#
L32
Handles archive type label in the admin or front-end UI.
auto
archivePlaceholder(attributes: ArchiveBlockAttributes)#
L40
Handles archive placeholder in the admin or front-end UI.
Gutenberg block script, registers the `wp-parsidate/calendar` block.
auto
calendarPlaceholder(attributes: CalendarBlockAttributes)#
L31
Handles calendar placeholder in the admin or front-end UI.
auto
getEnhancedSelectFormatString()#
L8
Returns enhanced select format string.
auto
wc_city_select_select2()#
L62
Handles wc city select select2 in the admin or front-end UI.
auto
cityToInput($citybox)#
L127
Handles city to input in the admin or front-end UI.
auto
disableCity($citybox)#
L142
Handles disable city in the admin or front-end UI.
auto
cityToSelect($citybox, current_cities)#
L147
Handles city to select in the admin or front-end UI.
WooCommerce Blocks payment method registration for the checkout block.
arrowauto
wppMellatPG_content(wppMellatPG_data)#
L4
Handles wpp mellat pg content in the admin or front-end UI.
WooCommerce Blocks payment method registration for the checkout block.
arrowauto
wppMelliPG_content(wppMelliPG_data)#
L4
Handles wpp melli pg content in the admin or front-end UI.
WooCommerce Blocks payment method registration for the checkout block.
arrowauto
wppParsianPG_content(wppParsianPG_data)#
L4
Handles wpp parsian pg content in the admin or front-end UI.
WooCommerce Blocks payment method registration for the checkout block.
arrowauto
wppPasargadPG_content(wppPasargadPG_data)#
L4
Handles wpp pasargad pg content in the admin or front-end UI.
Webpack build configuration, compiles the TypeScript block sources into assets/js-admin.
arrowauto
addFiles(dirpath)#
L57
Handles add files in the admin or front-end UI.
assets/js-admin/gutenberg-jalali-calendar.build.js Compiled React bundle for the Gutenberg Jalali calendar date picker. No readable source ships in the repo, treat as a build artifact.
assets/js-admin/*.js and *.min.js Compiled and minified copies of the files in assets/js-admin-src. Edit the src files and rebuild, do not edit these.

SCSS 17 mixins, 50 variables

Entry files compile to assets/css-admin. Component partials each expose one wppd mixin that the entries include.

Entry stylesheets

Uses: components/global components/notice admin/admin_menu components/form components/badges components/modal components/loading admin/media admin/panel admin/responsive admin/rtl
$vazirFontVazir, tahoma, arial, serifL1

Partials

Uses: sass:color ../utilities/variables
mixin
@mixin about#
L4
Styles for the about UI piece, included by the entry stylesheets.
Uses: ../utilities/variables
Uses: sass:color ../utilities/variables
mixin
@mixin dashboard#
L4
Styles for the dashboard UI piece, included by the entry stylesheets.
Uses: sass:color ../utilities/variables
Uses: sass:color ../utilities/variables ../components/list_links dashboard about
Uses: sass:color ../utilities/variables
Uses: sass:color ../utilities/variables
Uses: sass:color ../utilities/variables
mixin
@mixin wppd-addons#
L4
Styles for the wppd addons UI piece, included by the entry stylesheets.
Uses: sass:color ../utilities/variables
Uses: sass:color ../utilities/variables
mixin
@mixin wppd-button#
L4
Styles for the wppd button UI piece, included by the entry stylesheets.
Uses: sass:color ../utilities/variables
mixin
@mixin wppd-checkbox#
L4
Styles for the wppd checkbox UI piece, included by the entry stylesheets.
Uses: sass:color ../utilities/variables
mixin
@mixin wppd-color-palette#
L4
Styles for the wppd color palette UI piece, included by the entry stylesheets.
Uses: ../utilities/variables
mixin
@mixin wppd-data-table-ui#
L3
Styles for the wppd data table ui UI piece, included by the entry stylesheets.
Uses: ../utilities/variables
Uses: ../utilities/variables
Uses: ../utilities/variables toggle button input textarea checkbox radio range select addons wp repeatable color_palette gradient_color_picker data_table_ui
Uses: sass:color ../utilities/variables
Uses: sass:color ../utilities/variables
mixin
@mixin wppd-gradient-color-picker#
L6
Styles for the wppd gradient color picker UI piece, included by the entry stylesheets.
$height100pxL4
Uses: sass:color ../utilities/variables
mixin
@mixin wppd-input#
L4
Styles for the wppd input UI piece, included by the entry stylesheets.
Uses: sass:color ../utilities/variables
Uses: sass:color ../utilities/variables
Uses: sass:color ../utilities/variables
mixin
@mixin wppd-radio#
L4
Styles for the wppd radio UI piece, included by the entry stylesheets.
Uses: ../utilities/variables
mixin
@mixin wppd-range#
L3
Styles for the wppd range UI piece, included by the entry stylesheets.
Uses: ../utilities/variables
mixin
@mixin wppd-repeatable#
L3
Styles for the wppd repeatable UI piece, included by the entry stylesheets.
Uses: sass:color ../utilities/variables
mixin
@mixin wppd-select#
L4
Styles for the wppd select UI piece, included by the entry stylesheets.
Uses: sass:color ../utilities/variables
mixin
@mixin wppd-textarea#
L4
Styles for the wppd textarea UI piece, included by the entry stylesheets.
Uses: sass:color ../utilities/variables
mixin
@mixin wppd-toggle#
L4
Styles for the wppd toggle UI piece, included by the entry stylesheets.
Uses: ../utilities/variables
mixin
@mixin wppd-wp#
L3
Styles for the wppd wp UI piece, included by the entry stylesheets.
Uses: sass:color
$plugin_key"wp-parsidate"L3
$woo_purple_10#d1c1ffL6
$woo_purple_40#873effL7
$woo_purple_50#720eecL8
$woo_purple_70#5007aaL9
$woo_purple_90#2c045dL10
$blue_10#c3ddf8L12
$blue_40#64aeffL13
$blue_50#2577d7L14
$blue_70#2b6eb7L15
$blue_90#10539bL16
$primary$blue_50L18
$primary_light#E1CEFFL19
$dark#2B2B2BL21
$gray#525252L22
$gray_light#8A8A8AL23
$gray_light_two#D3D3D3L24
$gray_light_three#f3f3f3L25
$text$darkL26
$meta$grayL27
$whitecolor.adjust(#fff)L29
$white2color.scale($white, $lightness: -3%)L30
$red#b04b55L31
$default$blue_50L33
$default_light#f0f7fdL34
$warning#8c6d29L35
$warning_light#FFF8E3L36
$error$redL37
$error_light#FFEEECL38
$success#207b34L39
$success_light#E2F3E6L40
$info#356aa3L41
$info_light#DCEBFBL42
$link$primaryL44
$link_hovercolor.scale($primary, $lightness: -40%)L45
$background_side#f5f7f9L48
$background_lightcolor.scale($background_side, $lightness: 50%)L49
$background_menu#e5edf3L50
$background_input$default_lightL51
$background_input_2$gray_lightL52
$background_disabled$gray_light_threeL53
$border_color$gray_light_threeL56
$input_border_colorcolor.scale($border_color, $lightness: -10%)L57
$default__badge#818181L60
$info__badge#3f7cffL61
$success__badge#1bb034L62
$warning__badge#ff6c3fL63
$danger__badge#fd2828L64

Hooks fired by the plugin 89 unique tags

Every do_action and apply_filters call with a literal tag. Dynamic tags built from variables are not listed. Use these to extend the plugin without touching core files.

action
acf/create_field
inc/App/Integration/ACF/class-wpp-acf-datepicker-v4.php:51 inc/App/Integration/ACF/class-wpp-acf-timepicker-v4.php:51
2×
filter
dashboard_primary_title
inc/Widget/DashboardWidget.php:192
1×
filter
disable_months_dropdown
inc/App/AppAssets.php:260 inc/Core/Posts.php:188
2×
filter
document_title_separator
inc/App/Core/FixTitle.php:42
1×
filter
post_link_category
inc/App/Core/FixPermalink.php:308
1×
filter
the_title
inc/Core/Calendar.php:253
1×
filter
wc_city_select_cities
inc/App/Integration/WooCommerce/WooCommerceCitySelect.php:79
1×
filter
widget_title
inc/Widget/ArchiveWidget.php:155 inc/Widget/CalendarWidget.php:149
2×
filter
woocommerce_gateway_icon
inc/App/Integration/WooCommerce/wc-gateways/wpp-mellat-gateway.php:119 inc/App/Integration/WooCommerce/wc-gateways/wpp-melli-gateway.php:119
2×
filter
wp_parsidate_
inc/Admin/AdminConvert.php:39 inc/Admin/AdminCore.php:39 inc/Admin/AdminIntegration.php:44 inc/Admin/AdminPages.php:71 +6 more
10×
action
wp_parsidate_
inc/Admin/AdminPages.php:149 inc/Admin/AdminPages.php:155 inc/Admin/AdminPages.php:158 inc/Admin/AdminPages.php:163
4×
filter
wp_parsidate_addon_cats
inc/Addons/Addons.php:256
1×
filter
wp_parsidate_addons
inc/Addons/Addons.php:90
1×
action
wp_parsidate_addons_load
inc/App/App.php:24
1×
filter
wp_parsidate_addons_page_cat_title
inc/Addons/Addons.php:206
1×
action
wp_parsidate_admin_init
inc/Admin/AdminPages.php:60
1×
action
wp_parsidate_admin_init_menu
inc/Admin/AdminPages.php:66
1×
action
wp_parsidate_archive_block_end
inc/Block/ArchiveBlock.php:55
1×
action
wp_parsidate_archive_block_start
inc/Block/ArchiveBlock.php:39
1×
action
wp_parsidate_archive_widget_end
inc/Widget/ArchiveWidget.php:175
1×
action
wp_parsidate_archive_widget_start
inc/Widget/ArchiveWidget.php:160
1×
action
wp_parsidate_calendar_block_end
inc/Block/CalendarBlock.php:53
1×
action
wp_parsidate_calendar_block_start
inc/Block/CalendarBlock.php:51
1×
action
wp_parsidate_calendar_widget_end
inc/Widget/CalendarWidget.php:156
1×
action
wp_parsidate_calendar_widget_start
inc/Widget/CalendarWidget.php:154
1×
action
wp_parsidate_content
inc/Admin/AdminPages.php:159
1×
filter
wp_parsidate_dashboard_addon_links
inc/Admin/AdminDashboard.php:72
1×
filter
wp_parsidate_dashboard_custom_links
inc/Admin/AdminDashboard.php:36
1×
filter
wp_parsidate_day_link
inc/App/Core/FixPermalink.php:63
1×
filter
wp_parsidate_display_section_description
inc/Admin/AdminSettings.php:535
1×
filter
wp_parsidate_display_tab_settings
inc/Admin/AdminPages.php:42
1×
filter
wp_parsidate_dual_date_gregorian
inc/App/Core/FixDates.php:372
1×
filter
wp_parsidate_dual_date_separator
inc/App/Core/FixDates.php:304
1×
action
wp_parsidate_end_menus
inc/Admin/AdminPages.php:133
1×
filter
wp_parsidate_fix_post_content_numbers
inc/App/Convert/FixNumbers.php:63
1×
action
wp_parsidate_footer
inc/Admin/AdminPages.php:164
1×
filter
wp_parsidate_get_setting
inc/Settings/Settings.php:73
1×
filter
wp_parsidate_get_settings
inc/Settings/Settings.php:76
1×
action
wp_parsidate_header
inc/Admin/AdminPages.php:150
1×
filter
wp_parsidate_hook_deactivator_check_disable
inc/App/Tools/HookDeactivator.php:32
1×
filter
wp_parsidate_hook_deactivator_list
inc/App/Tools/HookDeactivator.php:130
1×
filter
wp_parsidate_hook_deactivator_raw_list
inc/App/Tools/HookDeactivator.php:114
1×
filter
wp_parsidate_image_sizes_select_items
inc/Helper/HTML.php:195
1×
action
wp_parsidate_init
inc/App/App.php:25
1×
filter
wp_parsidate_menus
inc/Admin/AdminPages.php:173
1×
filter
wp_parsidate_name_of_gregorian_months
inc/Core/Names.php:109
1×
filter
wp_parsidate_name_of_gregorian_week_days
inc/Core/Names.php:326
1×
filter
wp_parsidate_name_of_months
inc/Core/Names.php:201
1×
filter
wp_parsidate_name_of_week_days
inc/Core/Names.php:259
1×
action
wp_parsidate_notice
inc/Admin/AdminPages.php:154
1×
filter
wp_parsidate_save_settings_error_message
inc/Admin/AdminSettings.php:82
1×
action
wp_parsidate_save_settings_success
inc/Admin/AdminSettings.php:80
1×
filter
wp_parsidate_save_settings_success_message
inc/Admin/AdminSettings.php:78
1×
action
wp_parsidate_section_content
inc/Admin/AdminSettings.php:328
1×
filter
wp_parsidate_setting_value_before_save
inc/Admin/AdminSettings.php:66
1×
filter
wp_parsidate_settings
inc/Admin/AdminSettings.php:309
1×
filter
wp_parsidate_settings_before_save
inc/Admin/AdminSettings.php:72
1×
filter
wp_parsidate_settings_display_footer
inc/Admin/AdminSettings.php:480
1×
filter
wp_parsidate_settings_header_image
inc/Admin/AdminSettings.php:454
1×
filter
wp_parsidate_settings_page_refresh_url
inc/Admin/AdminAssets.php:40
1×
filter
wp_parsidate_settings_page_refreshed_after
inc/Admin/AdminAssets.php:39
1×
filter
wp_parsidate_settings_reset_button_title
inc/Admin/AdminSettings.php:504
1×
filter
wp_parsidate_settings_submit_button_title
inc/Admin/AdminSettings.php:491
1×
action
wp_parsidate_start_menus
inc/Admin/AdminPages.php:121
1×
action
wp_parsidate_submit_settings_form
inc/Admin/AdminPages.php:31
1×
filter
wp_parsidate_template_path
inc/Helper/Templates.php:41
1×
filter
wp_parsidate_validate_postal_code_checksum
inc/App/Integration/WooCommerce.php:158
1×
filter
wpp_acf_after_load_date_field
inc/App/Integration/ACF/class-wpp-acf-datepicker-v5.php:171
1×
filter
wpp_acf_after_load_jalali_date
inc/App/Integration/ACF/class-wpp-acf-datepicker-v4.php:113 inc/App/Integration/ACF/class-wpp-acf-datepicker-v4.php:149 inc/App/Integration/ACF/class-wpp-acf-datepicker-v5.php:105 inc/App/Integration/ACF/class-wpp-acf-timepicker-v4.php:113 +1 more
5×
filter
wpp_acf_after_load_time
inc/App/Integration/ACF/class-wpp-acf-timepicker-v5.php:122
1×
filter
wpp_acf_after_load_time_field
inc/App/Integration/ACF/class-wpp-acf-timepicker-v5.php:184
1×
filter
wpp_acf_before_jalali_date_render
inc/App/Integration/ACF/class-wpp-acf-datepicker-v5.php:141
1×
filter
wpp_acf_before_save_date_field
inc/App/Integration/ACF/class-wpp-acf-datepicker-v5.php:183
1×
filter
wpp_acf_before_save_time_field
inc/App/Integration/ACF/class-wpp-acf-timepicker-v5.php:196
1×
filter
wpp_acf_before_time_render
inc/App/Integration/ACF/class-wpp-acf-timepicker-v5.php:154
1×
filter
wpp_acf_before_update_jalali_date
inc/App/Integration/ACF/class-wpp-acf-datepicker-v4.php:131 inc/App/Integration/ACF/class-wpp-acf-datepicker-v5.php:123 inc/App/Integration/ACF/class-wpp-acf-timepicker-v4.php:131
3×
filter
wpp_acf_before_update_time
inc/App/Integration/ACF/class-wpp-acf-timepicker-v5.php:136
1×
filter
wpp_acf_validate_date_value
inc/App/Integration/ACF/class-wpp-acf-datepicker-v5.php:159
1×
filter
wpp_acf_validate_time_value
inc/App/Integration/ACF/class-wpp-acf-timepicker-v5.php:172
1×
filter
wpp_arabic_persian_characters_list
inc/App/Integration/WooCommerce.php:244
1×
filter
wpp_elementor_css
inc/App/Integration/Elementor.php:30
1×
filter
wpp_get_selected_wc_payment_gateways
inc/App/Integration/WooCommerce/WcGateways.php:174
1×
action
wpp_jalali_datepicker_enqueued
inc/App/Integration/ACF/class-wpp-acf-datepicker-v4.php:95 inc/App/Integration/ACF/class-wpp-acf-datepicker-v5.php:86 inc/App/Integration/ACF/class-wpp-acf-timepicker-v4.php:95 inc/App/Integration/WooCommerce.php:683
4×
filter
wpp_rank_math_product_price
inc/App/Integration/RankMath.php:125
1×
filter
wpp_rank_math_product_variant_price
inc/App/Integration/RankMath.php:81
1×
filter
wpp_wc_
inc/App/Integration/WooCommerce/wc-gateways/wpp-mellat-gateway.php:61 inc/App/Integration/WooCommerce/wc-gateways/wpp-mellat-gateway.php:181 inc/App/Integration/WooCommerce/wc-gateways/wpp-melli-gateway.php:60 inc/App/Integration/WooCommerce/wc-gateways/wpp-melli-gateway.php:206 +2 more
6×
action
wpp_wc_
inc/App/Integration/WooCommerce/wc-gateways/wpp-mellat-gateway.php:130 inc/App/Integration/WooCommerce/wc-gateways/wpp-mellat-gateway.php:328 inc/App/Integration/WooCommerce/wc-gateways/wpp-mellat-gateway.php:345 inc/App/Integration/WooCommerce/wc-gateways/wpp-mellat-gateway.php:379 +4 more
8×
filter
wpp_woocommerce_checkout_modified_persian_fields
inc/App/Integration/WooCommerce.php:208
1×
filter
wpp_woocommerce_checkout_persian_fields
inc/App/Integration/WooCommerce.php:200
1×

Appendix

composervendor/ packages, not documented above
enshrined/svg-sanitize 0.22.0
An SVG sanitizer for PHP
symfony/polyfill-php80 v1.37.0
Symfony polyfill backporting some PHP 8.0+ features to lower PHP versions
symfony/polyfill-php81 v1.38.1
Symfony polyfill backporting some PHP 8.1+ features to lower PHP versions
symfony/polyfill-php83 v1.38.2
Symfony polyfill backporting some PHP 8.3+ features to lower PHP versions
Excluded from this reference: everything under vendor/ (composer packages listed above), *.min.* files, *.map files, the compiled gutenberg-jalali-calendar.build.js bundle, block.json manifests, template partials in inc/Templates (markup only, no functions), languages/common-strings.php (translation string list) and binary assets. Generated from wp-parsidate-master.zip, plugin version 6.2.1.
Nothing matches. Clear the search or filters.