Introduce get_field_key method for settings API
This commit is contained in:
parent
b8bcd24edd
commit
597b152407
|
@ -193,6 +193,16 @@ abstract class WC_Settings_API {
|
|||
return $this->settings[ $key ];
|
||||
}
|
||||
|
||||
/**
|
||||
* Prefix key for settings.
|
||||
*
|
||||
* @param mixed $key
|
||||
* @return string
|
||||
*/
|
||||
public function get_field_key( $key ) {
|
||||
return $this->plugin_id . $this->id . '_' . $key;
|
||||
}
|
||||
|
||||
/**
|
||||
* Decode values for settings.
|
||||
*
|
||||
|
|
Loading…
Reference in New Issue