PHP Class Give_HTML_Elements, Give

A helper class for outputting common HTML elements, such as product drop downs.
Since: 1.0
ファイルを表示 Open project: wordimpress/give

Public Methods

Method Description
ajax_user_search ( array $args = [] ) : string User Search Field
category_dropdown ( string $name = 'give_forms_categories', integer $selected ) : string Categories Dropdown
checkbox ( array $args = [] ) : string Checkbox
date_field ( array $args = [] ) : string Date Picker
donor_dropdown ( array $args = [] ) : string Donors Dropdown
forms_dropdown ( array $args = [] ) : string Give Forms Dropdown
month_dropdown ( string $name = 'month', integer $selected ) : string Months Dropdown
select ( array $args = [] ) : string Dropdown
text ( array $args = [] ) : string Text Field
textarea ( array $args = [] ) : string Textarea
transactions_dropdown ( array $args = [] ) : string Transactions Dropdown
year_dropdown ( string $name = 'year', integer $selected, integer $years_before = 5, integer $years_after ) : string Years Dropdown

Method Details

category_dropdown() public method

Renders an HTML Dropdown of all the Categories.
Since: 1.0
public category_dropdown ( string $name = 'give_forms_categories', integer $selected ) : string
$name string Name attribute of the dropdown. Default is 'give_forms_categories'.
$selected integer Category to select automatically. Default is 0.
return string Categories dropdown.

checkbox() public method

Renders an HTML Checkbox.
Since: 1.0
public checkbox ( array $args = [] ) : string
$args array Arguments for the Checkbox.
return string The checkbox.

date_field() public method

Renders a date picker field.
Since: 1.5
public date_field ( array $args = [] ) : string
$args array Arguments for the date picker.
return string The date picker.

donor_dropdown() public method

Renders an HTML Dropdown of all customers.
Since: 1.0
public donor_dropdown ( array $args = [] ) : string
$args array Arguments for the dropdown.
return string Donors dropdown.

forms_dropdown() public method

Renders an HTML Dropdown of all the Give Forms.
Since: 1.0
public forms_dropdown ( array $args = [] ) : string
$args array Arguments for the dropdown.
return string Give forms dropdown.

month_dropdown() public method

Renders an HTML Dropdown of months.
Since: 1.0
public month_dropdown ( string $name = 'month', integer $selected ) : string
$name string Name attribute of the dropdown. Default is 'month'.
$selected integer Month to select automatically. Default is 0.
return string Months dropdown.

select() public method

Renders an HTML Dropdown.
Since: 1.0
public select ( array $args = [] ) : string
$args array Arguments for the dropdown.
return string The dropdown.

text() public method

Renders an HTML Text field.
Since: 1.0
public text ( array $args = [] ) : string
$args array Arguments for the text field.
return string The text field.

textarea() public method

Renders an HTML textarea.
Since: 1.0
public textarea ( array $args = [] ) : string
$args array Arguments for the textarea.
return string The textarea.

transactions_dropdown() public method

Renders an HTML Dropdown of all the donation transactions.
Since: 1.0
public transactions_dropdown ( array $args = [] ) : string
$args array Arguments for the dropdown.
return string Transactions dropdown.

year_dropdown() public method

Renders an HTML Dropdown of years.
Since: 1.0
public year_dropdown ( string $name = 'year', integer $selected, integer $years_before = 5, integer $years_after ) : string
$name string Name attribute of the dropdown. Default is 'year'.
$selected integer Year to select automatically. Default is 0.
$years_before integer Number of years before the current year the dropdown should start with. Default is 5.
$years_after integer Number of years after the current year the dropdown should finish at. Default is 0.
return string Years dropdown.