Introduce get_field_key method for settings API

This commit is contained in:
Shiva Poudel 2015-05-25 16:18:28 +05:45
parent b8bcd24edd
commit 597b152407
1 changed files with 10 additions and 0 deletions

View File

@ -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.
*