Property | Type | Description | |
---|---|---|---|
$instance | Instance of this class | ||
$option_name | string | ||
$options | array |
Method | Description | |
---|---|---|
admin_footer ( boolean $submit = true, boolean $show_sidebar = true ) | Generates the footer for admin pages | |
admin_header ( boolean $form = true, string $option = 'wpseo', boolean $contains_files = false, boolean $option_long_name = false ) | Generates the header for admin pages | |
admin_sidebar ( ) | Generates the sidebar for admin pages. | |
checkbox ( string $var, string $label, boolean $label_left = false ) | Create a Checkbox input field. | |
file_upload ( string $var, string $label ) | Create a File upload field. | |
get_instance ( ) : Yoast_Form | Get the singleton instance of this class | |
hidden ( string $var, string $id = '' ) | Create a hidden input field. | |
label ( string $text, array $attr ) | Output a label element | |
legend ( string $text, array $attr ) | Output a legend element. | |
light_switch ( string $var, string $label, array $buttons = [], boolean $reverse = true ) | Create a light switch input field. | |
media_input ( string $var, string $label ) | Media input | |
radio ( string $var, array $values, string $legend = '', array $legend_attr = [] ) | Create a Radio input field. | |
select ( string $field_name, string $label, array $select_options ) | Create a Select Box. | |
set_option ( string $option_name ) | Set the option used in output for form elements | |
textarea ( string $var, string $label, array $attr = [] ) | Create a textarea. | |
textinput ( string $var, string $label, array | string $attr = [] ) | Create a Text input field. | |
toggle_switch ( string $var, array $values, string $label ) | Create a toggle switch input field. |
Method | Description | |
---|---|---|
get_option ( ) : array | Retrieve options based on whether we're on multisite or not. | |
get_plugin_banners ( ) : WPSEO_Admin_Banner_Spot | Returns two random selected plugin banners. | |
get_service_banners ( ) : WPSEO_Admin_Banner_Spot | Returns two random selected service banners. |
public admin_header ( boolean $form = true, string $option = 'wpseo', boolean $contains_files = false, boolean $option_long_name = false ) | ||
$form | boolean | Whether or not the form start tag should be included. |
$option | string | The short name of the option to use for the current page. |
$contains_files | boolean | Whether the form should allow for file uploads. |
$option_long_name | boolean | Group name of the option. |
public file_upload ( string $var, string $label ) | ||
$var | string | The variable within the option to create the file upload field for. |
$label | string | The label to show for the variable. |
public static get_instance ( ) : Yoast_Form | ||
return | Yoast_Form |
public light_switch ( string $var, string $label, array $buttons = [], boolean $reverse = true ) | ||
$var | string | The variable within the option to create the checkbox for. |
$label | string | The label to show for the variable. |
$buttons | array | Array of two labels for the buttons (defaults Off/On). |
$reverse | boolean | Reverse order of buttons (default true). |
public media_input ( string $var, string $label ) | ||
$var | string | Option name. |
$label | string | Label message. |
public radio ( string $var, array $values, string $legend = '', array $legend_attr = [] ) | ||
$var | string | The variable within the option to create the radio button for. |
$values | array | The radio options to choose from. |
$legend | string | Optional. The legend to show for the field set, if any. |
$legend_attr | array | Optional. The attributes for the legend, if any. |
public set_option ( string $option_name ) | ||
$option_name | string | Option key. |