WP_Widget::get_field_name

SummerySummery

Constructs name attributes for use in form() fields

Syntax

WP_Widget::get_field_name( string $field_name )

DescriptionDescription

This function should be used in form() methods to create name attributes for fields to be saved by update()

ParametersParameters

$field_name

(string) (Required) Field name

ReturnReturn

(string) Name attribute for $field_name

SourceSource

File: wp-includes/class-wp-widget.php


			

ChangelogChangelog

Changelog
Version Description
4.4.0 Array format field names are now accepted.
2.8.0 Introduced.
Scroll to Top