Line breaks with theme settings textarea I'm using the following to get a form field in the theme settings page    

function theme_form_system_theme_settings_alter(&amp;$form, $form_state) {
   $form['foo_example'] = array(
   '#type'          =&gt; 'textarea',
   '#title'         =&gt; t('Widget'),
   '#default_value' =&gt; theme_get_setting('foo_example'),
   '#description'   =&gt; t("Place this text in the widget spot on your site."),
 );
}


The problem is when I output the result in my theme file with this: 

$foo_example = theme_get_setting('foo_example');                             
print render($foo_example);


It doesn't respect the line break and puts it all in one p tag. I'd like it to respect the line break and put each line in a p tag if possible.
Try to use "text_format" type.

 $form['foo_example'] = array(
   '#type'          =&gt; 'text_format',
   '#title'         =&gt; t('Widget'),
   '#default_value' =&gt; theme_get_setting('foo_example'),
   '#description'   =&gt; t("Place this text in the widget spot on your site."),
   '#format' =&gt; null, //I think "null" saves the default text format of your website. If you want to see your changes you must put a dynamic value.
 );
}


NOTA BENE: the values saved by this type of textarea, is an array with "value" and "format" keys: 

$var_saved = array(
'value'=&gt; 'something', 
'format' =&gt; 'full_html', //could be filtered_html, plain_text or any custom text format you've created.
);

//in your field definition
'#default_value' =&gt; $var_saved['value'],
'#format' =&gt; $var_saved['format'],


I didn't test it for your case, but choosing the right format, will normally output the text with respect of the rules chosen for that format type.

If I understood well your problem...