PHP Class Give_HTML_Elements, Give

A helper class for outputting common HTML elements, such as product drop downs.
Since: 1.0
Afficher le fichier Open project: wordimpress/give

Méthodes publiques

Méthode 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 méthode

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.
Résultat string Categories dropdown.

checkbox() public méthode

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

date_field() public méthode

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

donor_dropdown() public méthode

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

forms_dropdown() public méthode

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

month_dropdown() public méthode

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.
Résultat string Months dropdown.

select() public méthode

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

text() public méthode

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

textarea() public méthode

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

transactions_dropdown() public méthode

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

year_dropdown() public méthode

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.
Résultat string Years dropdown.