Skip to content

Commit

Permalink
fix empty fields issue during sanitize call
Browse files Browse the repository at this point in the history
  • Loading branch information
R.Brown committed Sep 21, 2013
1 parent a5a5c6c commit 23bbf2b
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion options.php
Original file line number Diff line number Diff line change
Expand Up @@ -188,7 +188,9 @@ function sanitize($input)
*/

if (empty($input['ct_copyright_format'])) {
add_settings_error(CT_OPTIONS, 'empty-copyright-format', 'Please specify copyright format.');
if (is_admin()) {
add_settings_error(CT_OPTIONS, 'empty-copyright-format', 'Please specify copyright format.');
}
} else {
$input['ct_copyright_format'] = sanitize_text_field($input['ct_copyright_format']);
}
Expand Down

0 comments on commit 23bbf2b

Please sign in to comment.