options = get_option('alojapro_settings', array()); ?>
$value) { switch ($key) { case 'propertyId': $new_input[$key] = sanitize_text_field($value); break; case 'numberOfComments': $new_input[$key] = sanitize_text_field($value); break; default: $new_input[$key] = sanitize_text_field($value); break; } } return $new_input; } /** * Print the Section Widget text */ public function print_section_info_widget() { print __('Enter the comment plugin configuration parameters:', 'alojapro-comments'); } /** * Get the settings option array and print one of its values * @param array $params */ public function input_callback(array $params) { list($id, $type, $default, $settingsGroup, $labels) = $params; switch ($type) { case 'textarea': printf( '', isset($this->options[$id]) ? esc_attr($this->options[$id]) : $default ); break; case 'radio': for ($i=0; $i < count($default); $i++) { if ($this->options[$id] == $default[$i] || (!isset($this->options[$id]) && $i == 0)) { printf( '' ); }else{ printf( '' ); } printf( '
' ); } break; default: printf( '', isset($this->options[$id]) ? esc_attr($this->options[$id]) : $default ); break; } } }