'. __('Your theme settings were saved.', 'building-blocks' ) .'
'); //Save the theme options //Loop through the $_POST checkboxes and set the corresponding wordpress options to true if they are checked //This method is more compact than using if/else for each method $fields = array( 'boilerplate_hide_admin_bar', 'boilerplate_hide_admin_bar_logo', 'boilerplate_hide_posts_menu', 'boilerplate_hide_pages_menu', 'boilerplate_hide_media_menu', 'boilerplate_hide_links_menu', 'boilerplate_hide_comments_menu', 'boilerplate_hide_profile_menu', 'boilerplate_hide_tools_menu', 'boilerplate_hide_comments_disabled', 'boilerplate_use_human_readable_dates', 'boilerplate_use_dynamic_descriptions', 'boilerplate_use_dynamic_suffixes', 'boilerplate_hide_attachment_link', 'boilerplate_hide_attachment_description', 'boilerplate_hide_attachment_caption', 'boilerplate_hide_attachment_library' ); //Loop through the checkboxes and save their value foreach($fields as $field) { update_option($field, isset($_POST[$field])); } //The URL to the custom logo on the login page if ( isset($_POST['boilerplate_custom_logo_url'] ) && $_POST['boilerplate_custom_logo_url']!="" ) //Validate the URL before saving this option. Display an error if invalid. if ( is_valid_url($_POST['boilerplate_custom_logo_url']) ) update_option('boilerplate_custom_logo_url',$_POST['boilerplate_custom_logo_url']); else echo(''. __('The logo URL is invalid. Other settings were saved.', 'building-blocks' ) .'