Overview

Classes

  • Quform
  • Quform_Admin_InsertForm
  • Quform_Admin_Page
  • Quform_Admin_Page_Controller
  • Quform_Admin_Page_Dashboard
  • Quform_Admin_Page_Entries
  • Quform_Admin_Page_Entries_Edit
  • Quform_Admin_Page_Entries_List
  • Quform_Admin_Page_Entries_View
  • Quform_Admin_Page_Factory
  • Quform_Admin_Page_Forms_Add
  • Quform_Admin_Page_Forms_Edit
  • Quform_Admin_Page_Forms_List
  • Quform_Admin_Page_Help
  • Quform_Admin_Page_Preview
  • Quform_Admin_Page_Settings
  • Quform_Admin_Page_Tools
  • Quform_Admin_Page_Tools_ExportEntries
  • Quform_Admin_Page_Tools_ExportForm
  • Quform_Admin_Page_Tools_Home
  • Quform_Admin_Page_Tools_ImportForm
  • Quform_Admin_Page_Tools_Migrate
  • Quform_Admin_Page_Tools_Uninstall
  • Quform_Api
  • Quform_Block
  • Quform_Builder
  • Quform_Captcha
  • Quform_ClassLoader
  • Quform_Confirmation
  • Quform_Container
  • Quform_Dashboard_Widget
  • Quform_Dispatcher
  • Quform_Element
  • Quform_Element_Captcha
  • Quform_Element_Checkbox
  • Quform_Element_Column
  • Quform_Element_Container
  • Quform_Element_Container_Iterator
  • Quform_Element_Date
  • Quform_Element_Email
  • Quform_Element_Factory
  • Quform_Element_Field
  • Quform_Element_File
  • Quform_Element_Group
  • Quform_Element_Hidden
  • Quform_Element_Honeypot
  • Quform_Element_Html
  • Quform_Element_Multi
  • Quform_Element_Multiselect
  • Quform_Element_Name
  • Quform_Element_Page
  • Quform_Element_Password
  • Quform_Element_Radio
  • Quform_Element_Recaptcha
  • Quform_Element_Row
  • Quform_Element_Select
  • Quform_Element_Submit
  • Quform_Element_Text
  • Quform_Element_Textarea
  • Quform_Element_Time
  • Quform_Entry_Controller
  • Quform_Entry_Exporter
  • Quform_Entry_List_Settings
  • Quform_Entry_List_Table
  • Quform_Entry_Processor
  • Quform_Entry_UserSearcher
  • Quform_Filter_Abstract
  • Quform_Filter_Alpha
  • Quform_Filter_AlphaNumeric
  • Quform_Filter_Digits
  • Quform_Filter_Regex
  • Quform_Filter_Static
  • Quform_Filter_StripTags
  • Quform_Filter_Trim
  • Quform_Form
  • Quform_Form_Controller
  • Quform_Form_Exporter
  • Quform_Form_Factory
  • Quform_Form_Importer
  • Quform_Form_Iterator
  • Quform_Form_List_Settings
  • Quform_Form_List_Table
  • Quform_Form_Processor
  • Quform_License
  • Quform_Migrator
  • Quform_NonceRefresher
  • Quform_Notification
  • Quform_Notification_Resender
  • Quform_Options
  • Quform_Permissions
  • Quform_Repository
  • Quform_ScriptLoader
  • Quform_Session
  • Quform_Settings
  • Quform_Shortcode
  • Quform_Themes
  • Quform_TokenReplacer
  • Quform_Toolbar
  • Quform_Translations
  • Quform_Updater
  • Quform_Upgrader
  • Quform_Uploader
  • Quform_Validator_Abstract
  • Quform_Validator_Alpha
  • Quform_Validator_AlphaNumeric
  • Quform_Validator_Array
  • Quform_Validator_Captcha
  • Quform_Validator_Date
  • Quform_Validator_Digits
  • Quform_Validator_Duplicate
  • Quform_Validator_Email
  • Quform_Validator_FileUpload
  • Quform_Validator_GreaterThan
  • Quform_Validator_Honeypot
  • Quform_Validator_Identical
  • Quform_Validator_InArray
  • Quform_Validator_Length
  • Quform_Validator_LessThan
  • Quform_Validator_Recaptcha
  • Quform_Validator_Regex
  • Quform_Validator_Required
  • Quform_Validator_Static
  • Quform_Validator_Time
  • Quform_View
  • Quform_ViewFactory
  • Quform_Widget_Form
  • Quform_Widget_Popup

Interfaces

  • Quform_Attachable
  • Quform_Element_Editable
  • Quform_Filter_Interface
  • Quform_Validator_Interface
  • Overview
  • Class

Class Quform

Copyright: Copyright (c) 2009-2022 ThemeCatcher (https://www.themecatcher.net)
Located at Quform.php
Methods summary
public static
# onActivation( )

On plugin activation set the activated flag

On plugin activation set the activated flag

public static
# bootstrap( )

Bootstrap the plugin

Bootstrap the plugin

public static mixed
# getService( string $name )

Get a service from the container

Get a service from the container

Parameters

$name
The service name

Returns

mixed
The service instance
public static string
# url( string $path = '' )

Get the URL to the plugin folder

Get the URL to the plugin folder

Parameters

$path
Extra path to append to the URL

Returns

string
public static string
# adminUrl( string $path = '' )

Get the URL to the plugin admin folder

Get the URL to the plugin admin folder

Parameters

$path
Extra path to append to the URL

Returns

string
public static string
# getPluginName( )

Allow users to white-label the plugin name on Quform pages

Allow users to white-label the plugin name on Quform pages

Returns

string
The plugin name
public static string
# getClientIp( )

Get the IP address of the visitor

Get the IP address of the visitor

Returns

string
public static string
# getCurrentUrl( )

Get the current URL

Get the current URL

Returns

string
public static string
# getHttpReferer( )

Get the HTTP referer

Get the HTTP referer

Returns

string
public static WP_Post|null
# getCurrentPost( )

Get the current post

Get the current post

Returns

WP_Post|null
public static string
# getPostProperty( string $property = 'ID', integer|null $postId = null )

Get a property from the current post object

Get a property from the current post object

Parameters

$property
Which property to get
$postId
The post ID or null to use the current post

Returns

string
public static mixed|string
# getPostMeta( string $key, integer|null $postId = null )

Get the post meta value with the given key from the given post ID or the current post

Get the post meta value with the given key from the given post ID or the current post

Parameters

$key
The post meta key
$postId
The post ID, if null the current post will be used

Returns

mixed|string
public static string
# getUserProperty( string $property = 'ID' )

Get a property from the current user object

Get a property from the current user object

Parameters

$property
Which property to get

Returns

string
public static mixed|string
# getUserMeta( string $key )

Get the user meta value with the given key for the current user

Get the user meta value with the given key for the current user

Parameters

$key
The user meta key

Returns

mixed|string
public static string
# studlyCase( string $value )

Convert the given string to studly case

Convert the given string to studly case

Parameters

$value

Returns

string
public static boolean
# isGetRequest( )

Is the current request a GET request?

Is the current request a GET request?

Returns

boolean
public static boolean
# isPostRequest( )

Is the current request a POST request?

Is the current request a POST request?

Returns

boolean
public static string
# escape( string $value, integer $flags = ENT_QUOTES )

Escaping for strings in HTML

Escaping for strings in HTML

Identical to esc_html but with double encoding true

Parameters

$value
$flags

Returns

string
public static string
# sanitizeClass( string|array $classes )

Sanitize multiple classes

Sanitize multiple classes

Parameters

$classes
Classes to sanitize

Returns

string
The sanitized classes
public static string
# sanitizeTextareaField( string $str )

Sanitizes a multiline string

Sanitizes a multiline string

Parameters

$str

Returns

string
public static mixed
# get( array $array, string $key = null, mixed $default = null )

Get a value from an array, allowing dot notation

Get a value from an array, allowing dot notation

Parameters

$array
$key
$default

Returns

mixed
public static array
# set( array & $array, string $key, mixed $value )

Set an array item to a given value using "dot" notation.

Set an array item to a given value using "dot" notation.

If no key is given to the method, the entire array will be replaced.

Parameters

$array
$key
$value

Returns

array
public static
# forget( array & $array, array|string $keys )

Remove one or many array items from a given array using "dot" notation.

Remove one or many array items from a given array using "dot" notation.

Parameters

$array
$keys
public static boolean
# isNonEmptyString( mixed $value )

Returns true if and only if the given value is a string with at least one character

Returns true if and only if the given value is a string with at least one character

Parameters

$value

Returns

boolean
public static
# dd( )

Die and dump arguments, debugging helper method

Die and dump arguments, debugging helper method

public static
# log( )

Log arguments to the PHP error log

Log arguments to the PHP error log

public static
# debug( )

Log arguments to the PHP error log only if WP_DEBUG is enabled

Log arguments to the PHP error log only if WP_DEBUG is enabled

public static integer
# strlen( string $string )

Get the length of the given string (multibyte aware)

Get the length of the given string (multibyte aware)

Parameters

$string

Returns

integer
public static string
# substr( string $string, integer $start, integer|null $length = null )

Get part of the given string (multibyte aware)

Get part of the given string (multibyte aware)

Parameters

$string
$start
$length

Returns

string
public static string
# getHtmlTag( string $tag, array $attributes = array(), string $content = '' )

Generates an HTML tag

Generates an HTML tag

Parameters

$tag
The HTML tag
$attributes
Attributes key => value list for the tag
$content
Content for non-void elements (not escaped)

Returns

string
public static string
# parseHtmlAttributes( array $attributes )

Parse an array of HTML attributes into an attribute string

Parse an array of HTML attributes into an attribute string

Parameters

$attributes
Attributes key => value list for the tag

Returns

string
public static string
# randomBytes( integer $length )

Get random bytes with the given $length

Get random bytes with the given $length

Parameters

$length

Returns

string
public static string
# randomString( integer $length )

Generate a random string with the given $length

Generate a random string with the given $length

Parameters

$length

Returns

string
public static
# setCookie( string $name, string $value, integer $expire, boolean $secure = false, boolean $httpOnly = false, boolean $logFailure = false )

Set a cookie

Set a cookie

Parameters

$name
The name of the cookie
$value
The value of the cookie
$expire
The time the cookie expires as Unix timestamp
$secure
Send the cookie over HTTPS only
$httpOnly
Make the cookie only accessible over the HTTP protocol
$logFailure
Make a log entry if the cookie could not be created because headers already sent
public static
# setCookieHeader( string $name, string $value, integer $expire, boolean $secure = false, boolean $httpOnly = false, boolean $sameSite = 'Lax' )

Set a cookie using a header

Set a cookie using a header

Parameters

$name
The name of the cookie
$value
The value of the cookie
$expire
The time the cookie expires as Unix timestamp
$secure
Whether the cookie should be sent over HTTPS only
$httpOnly
Whether the cookie will be made accessible only through the HTTP protocol
$sameSite
Whether the cookie will be available for cross-site requests
public static mixed
# clamp( mixed $x, mixed $min, mixed $max )

Ensure the given number $x is between $min and $max inclusive

Ensure the given number $x is between $min and $max inclusive

Parameters

$x
$min
$max

Returns

mixed
public static string
# pathExtra( string $path, string $extra = '' )

Get the given path with $extra appended

Get the given path with $extra appended

Parameters

$path
The path
$extra
Extra path to append to the path

Returns

string
The combined path (no trailing slash is added)
public static string
# getTempDir( string $extra = '' )

Get a writable temporary directory

Get a writable temporary directory

Parameters

$extra
Extra path to append to the path

Returns

string
Path without trailing slash
public static string
# getUploadsUrl( string $extra = '' )

Get the URL to the WP uploads directory

Get the URL to the WP uploads directory

Parameters

$extra
Extra path to append to the path

Returns

string
public static string|false
# getUploadsDir( string $extra = '' )

Get the absolute path to the WordPress upload directory. If the path is not writable it will return false.

Get the absolute path to the WordPress upload directory. If the path is not writable it will return false.

Parameters

$extra
Extra path to append to the path

Returns

string|false
The upload path or false on failure
public static boolean
# hasPcreUnicodeSupport( )

Is PCRE compiled with Unicode support?

Is PCRE compiled with Unicode support?

Returns

boolean
public static array
# getLocales( )

Get the available locales for Kendo scripts

Get the available locales for Kendo scripts

Returns

array
public static array
# getLocale( string $locale = '' )

Get the locale data with the given locale code

Get the locale data with the given locale code

If the locale does not exist, the default en-US locale will be returned

Parameters

$locale

Returns

array
public static string
# getPluginIcon( string $color = '' )

Get the plugin icon SVG in the given color

Get the plugin icon SVG in the given color

Parameters

$color

Returns

string
public static boolean
# currentUserCan( array|string $caps )

Does the current user have any of the given capabilities?

Does the current user have any of the given capabilities?

Deprecated

2.1.0

Parameters

$caps

Returns

boolean
public static string
# addCssUnit( string $value )

If the value is a non-zero number it will append 'px' otherwise return the value unchanged

If the value is a non-zero number it will append 'px' otherwise return the value unchanged

Parameters

$value

Returns

string
public static string
# formatCount( integer $count )

Format the given count into thousands if necessary e.g. 1100 becomes 1.1k

Format the given count into thousands if necessary e.g. 1100 becomes 1.1k

Parameters

$count

Returns

string
public static string
# base64UrlEncode( mixed $data )

Base 64 encode the given data in a format safe for URLs

Base 64 encode the given data in a format safe for URLs

Credit: http://php.net/manual/en/function.base64-encode.php#103849

Parameters

$data

Returns

string
public static array
# getPages( )

Get all pages in an array formatted for select2

Get all pages in an array formatted for select2

Deprecated

2.10.0

Returns

array
public static array
# getPosts( )

Get all posts in an array formatted for select2

Get all posts in an array formatted for select2

Deprecated

2.10.0

Returns

array
public static string
# getPostTitle( WP_Post $post )

Get the title of the given post

Get the title of the given post

Deprecated

2.10.0

Parameters

$post

Returns

string
public static string
# getPostTitleById( integer $id )

Get the title of the post by ID

Get the title of the post by ID

Parameters

$id
The post ID

Returns

string
The post title
public static array
# searchPosts( string $search )

Search all public post types for the given search term

Search all public post types for the given search term

Parameters

$search

Returns

array
public static array
# searchUsers( string $search )

Search all users for the given search term

Search all users for the given search term

Parameters

$search

Returns

array
public static string|false
# date( string $format, DateTime $date = null, DateTimeZone $timezone = null )

Format a date

Format a date

Parameters

$format
The format of the returned date
$date
The DateTime instance representing the moment of time in UTC, or null for the current time
$timezone
The timezone of the returned date, will default to the WP timezone if omitted

Returns

string|false
The formatted date or false if there was an error
public static DateTimeZone
# getTimezone( )

Get the WP timezone as a DateTimeZone instance

Get the WP timezone as a DateTimeZone instance

Duplicate of wp_timezone() for WP <5.3.

Returns

DateTimeZone
public static string
# getTimezoneString( )

Get the WP timezone as a string

Get the WP timezone as a string

Duplicate of wp_timezone_string() for WP <5.3.

Returns

string
public static integer|boolean
# compareDates( string $first, string $second )

Compare the two given dates

Compare the two given dates

Returns: -1 if first is before second 0 if the dates are the same 1 if first is after the second false if either date is invalid

Parameters

$first
The first date in YYYY-MM-DD format
$second
The second date in YYYY-MM-DD format

Returns

integer|boolean
API documentation generated by ApiGen