public function getValue() { $_aParams = func_get_args(); $_aDimensionalKeys = $_aParams + array(null, null); $_mDefault = null; if (is_array($_aDimensionalKeys[0])) { $_mDefault = $_aDimensionalKeys[1]; $_aDimensionalKeys = $_aDimensionalKeys[0]; } return AdminPageFramework_WPUtility::getOption($this->oProp->sOptionKey, empty($_aParams) ? null : $_aDimensionalKeys, $_mDefault, $this->getSavedOptions() + $this->oProp->getDefaultOptions($this->oForm->aFields)); }
public static function getOption($sOptionKey, $asKey = null, $vDefault = null) { return AdminPageFramework_WPUtility::getOption($sOptionKey, $asKey, $vDefault); }
/** * Retrieves the specified field value stored in the options by field ID. * * <h4>Example</h4> * <code> * $this->addSettingFields( * 'number_section', // section id * array( * 'field_id' => 'preset_field', * 'title' => __( 'Preset', 'admin-page-framework-demo' ), * 'type' => 'number', * ), * array( * 'field_id' => 'value_based_on_preset', * 'title' => __( 'Value Based on Preset', 'admin-page-framework-demo' ), * 'type' => 'number', * 'default' => 10 + ( int ) $this->getValue( * 'number_section', // section id * 'preset_field' // field id * ), * ), * ); * </code> * * @since 3.3.0 * @since 3.3.5 Made it respect last input arrays. * @param The key that points the dimensional array key of the options array. */ public function getValue() { $_aParams = func_get_args(); return AdminPageFramework_WPUtility::getOption($this->oProp->sOptionKey, $_aParams, null, $this->getSavedOptions() + $this->oProp->getDefaultOptions($this->oForm->aFields)); }
public function getValue() { $_aDimensionalKeys = func_get_args(); return AdminPageFramework_WPUtility::getOption($this->oProp->sOptionKey, empty($_aDimensionalKeys) ? null : $_aDimensionalKeys, null, $this->getSavedOptions() + $this->oProp->getDefaultOptions($this->oForm->aFields)); }