';
echo '';
}
}
+
/**
+ * Print out the default text field for add_settings_field()
+ *
+ * This outputs the default text field for callback "text".
+ *
+ * @since 3.5.0
+ *
+ * @param array $field Field arguments
+ */
+function do_settings_text( $field ) {
+
+ $value = get_option( $field['id'] );
+ if( ! empty( $field['args']['default'] ) )
+ $value = $value !== false ? $value : $field['args']['default'];
+
+ echo '';
+
+ if( !empty( $field['args']['description'] ) )
+ echo '
' . $field['args']['description'] . '
';
+
+}
+
+
+/**
+ * Print out the default textarea field for add_settings_field()
+ *
+ * This outputs the default text field for callback "texarea".
+ *
+ * @since 3.5.0
+ *
+ * @param array $field Field arguments
+ */
+function do_settings_textarea( $field ) {
+
+ $value = get_option( $field['id'] );
+ if( ! empty( $field['args']['default'] ) )
+ $value = $value !== false ? $value : $field['args']['default'];
+
+ echo '';
+
+ if( !empty( $field['args']['description'] ) )
+ echo '
' . $field['args']['description'] . '
';
+
+}
+
+
+/**
+ * Print out the default select field for add_settings_field()
+ *
+ * This outputs the default text field for callback "select".
+ *
+ * @since 3.5.0
+ *
+ * @param array $field Field arguments
+ */
+function do_settings_select( $field ) {
+
+ if( empty( $field['args']['choices'] ) )
+ return;
+
+ $option = get_option( $field['id'] );
+ if( ! $option )
+ $option = ! empty( $field['args']['default'] ) ? $option : $field['args']['default'];
+
+ echo '';
+
+ if( !empty( $field['args']['description'] ) )
+ echo '
' . $field['args']['description'] . '
';
+
+}
+
+
+/**
+ * Print out the default radio field for add_settings_field()
+ *
+ * This outputs the default text field for callback "radio".
+ *
+ * @since 3.5.0
+ *
+ * @param array $field Field arguments
+ */
+function do_settings_radio( $field ) {
+
+ if( empty( $field['args']['choices'] ) )
+ return;
+
+ $option = get_option( $field['id'] );
+ if( ! empty( $field['args']['default'] ) )
+ $option = $option !== false ? $option : $field['args']['default'];
+
+
+ foreach( $field['args']['choices'] as $key => $choice ) {
+ echo ' ';
+ }
+
+ if( !empty( $field['args']['description'] ) )
+ echo '
' . $field['args']['description'] . '
';
+
+}
+
+
+/**
+ * Print out the default checkbox field for add_settings_field()
+ *
+ * This outputs the default text field for callback "checkbox".
+ *
+ * @since 3.5.0
+ *
+ * @param array $field Field arguments
+ */
+function do_settings_checkbox( $field ) {
+
+ $description = !empty( $field['args']['description'] ) ? $field['args']['description'] : '';
+
+ echo '';
+
+}
+
+
+/**
+ * Print out the default radio field for add_settings_field()
+ *
+ * This outputs the default text field for callback "radio".
+ *
+ * @since 3.5.0
+ *
+ * @param array $field Field arguments
+ */
+function do_settings_checkbox_group( $field ) {
+
+ if( empty( $field['args']['choices'] ) )
+ return;
+
+ $options = get_option( $field['id'] );
+ $options = is_array( $options ) ? $options : array();
+
+ foreach( $field['args']['choices'] as $key => $choice ) {
+ echo ' ';
+ }
+
+ if( !empty( $field['args']['description'] ) )
+ echo '
' . $field['args']['description'] . '
';
+
+}
+
+
+/**
* Register a settings error to be displayed to the user
*
* Part of the Settings API. Use this to show messages to users about settings validation