'.$arg['name'].''."\n"; } } return $output; } // Generate the settings panel's content function icefit_settings_machine($options) { global $icefit_settings_slug; $icefit_settings = get_option($icefit_settings_slug); $output = ""; foreach ($options as $arg) { $ids = array ('custom_css', 'page2', 'unlimited_sidebar', 'endpage2', 'headings_font', 'socialmedia', 'facebook_url', 'twitter_url', 'googleplus_url', 'linkedin_url', 'instagram_url', 'pinterest_url', 'tumblr_url', 'stumbleupon_url', 'dribbble_url', 'behance_url', 'deviantart_url', 'flickr_url', 'youtube_url', 'vimeo_url', 'yelp_url', 'rss_url', 'endpage4' ); if (isset($arg['id'])) { if (in_array($arg['id'], $ids)) continue; } if ( is_array($arg) && is_array($icefit_settings) ) { if ( array_key_exists('id', $arg) ) { if ( array_key_exists($arg['id'], $icefit_settings) ) $val = stripslashes($icefit_settings[$arg['id']]); else $val = ""; } else { $val = ""; } } else { $val = ""; } if ( $arg['type'] == "start_menu" ) { $output .= '
'; } elseif ( $arg['type'] == "text" ) { $val = esc_attr($val); $output .= '

'. $arg['name'] .'

'."\n"; if ( $val == "" && $arg['default'] != "") $icefit_settings[$arg['id']] = $val = $arg['default']; $output .= ''."\n"; $output .= '
'. $arg['desc'] .'

'."\n"; } elseif ( $arg['type'] == "textarea" ) { $val = esc_textarea($val); $output .= '

'. $arg['name'] .'

'."\n"; if ( $val == "" && $arg['default'] != "") $icefit_settings[$arg['id']] = $val = $arg['default']; $output .= ''."\n"; $output .= '
'."\n"; } elseif ( $arg['type'] == "radio" ) { $output .= '

'. $arg['name'] .'

'."\n"; if ( $val == "" && $arg['default'] != "") $icefit_settings[$arg['id']] = $val = $arg['default']; $values = $arg['values']; $output .= '
'; foreach ($values as $value) { $output .= ''.$value.'
'; } $output .= '
'; $output .= '
'."\n"; } elseif ( $arg['type'] == "select" ) { $output .= '

'. $arg['name'] .'

'."\n"; if ( $val == "" && $arg['default'] != "") $icefit_settings[$arg['id']] = $val = $arg['default']; $values = $arg['values']; $output .= ''; $output .= '
'. $arg['desc'] .'

'."\n"; } elseif ( $arg['type'] == "font" ) { $output .= '

'. $arg['name'] .'

'."\n"; if ( $val == "" && $arg['default'] != "") $icefit_settings[$arg['id']] = $val = $arg['default']; $output .= ''; $output .= '
'. $arg['desc'] .'

'."\n"; } elseif ( $arg['type'] == "image" ) { $output .= '

'. $arg['name'] .'

'."\n"; if ( $val == "" && $arg['default'] != "") $icefit_settings[$arg['id']] = $val = $arg['default']; $output .= ''."\n"; $output .= '
'. $arg['desc'] .'

'."\n"; $output .= ''."\n"; $output .= '
'."\n"; $output .= '
'."\n"; } elseif ( $arg['type'] == "color" ) { $val = esc_attr($val); $output .= '

'. $arg['name'] .'

'."\n"; if ( $val == "" && $arg['default'] != "") $icefit_settings[$arg['id']] = $val = $arg['default']; $output .= ''."\n"; $output .= '
'. $arg['desc'] .'

'."\n"; } elseif ( $arg['type'] == "gopro" ) { $output .= '

'. $arg['name'] .'

'."\n"; $output .= '

Unleash the full potential of BoldR by upgrading to BoldR Pro!

'; $output .= '

The Pro version comes with a great set of awesome features:

'; $output .= ''; $output .= 'Learn More and Upgrade Now!'; } elseif ( $arg['type'] == "end_menu" ) { $output .= '
'; } } update_option($icefit_settings_slug,$icefit_settings); return $output; } // AJAX callback function for the "reset" button (resets settings to default) function icefit_settings_reset_ajax_callback() { global $icefit_settings_slug; // Get settings from the database $icefit_settings = get_option($icefit_settings_slug); // Get the settings template $options = icefit_settings_template(); // Revert all settings to default value foreach($options as $arg){ if ($arg['type'] != 'start_menu' && $arg['type'] != 'end_menu') { $icefit_settings[$arg['id']] = $arg['default']; } } // Updates settings in the database update_option($icefit_settings_slug,$icefit_settings); } add_action('wp_ajax_icefit_settings_reset_ajax_post_action', 'icefit_settings_reset_ajax_callback'); // AJAX callback function for the "Save changes" button (updates user's settings in the database) function icefit_settings_ajax_callback() { global $icefit_settings_slug; // Check nonce check_ajax_referer('icefit_settings_ajax_post_action','icefit_settings_nonce'); // Get POST data $data = $_POST['data']; parse_str($data,$output); // Get current settings from the database $icefit_settings = get_option($icefit_settings_slug); // Get the settings template $options = icefit_settings_template(); // Updates all settings according to POST data foreach($options as $option_array){ $ids = array ('gopro', 'custom_css', 'page2', 'unlimited_sidebar', 'endpage2', 'headings_font', 'socialmedia', 'facebook_url', 'twitter_url', 'googleplus_url', 'linkedin_url', 'instagram_url', 'pinterest_url', 'tumblr_url', 'stumbleupon_url', 'dribbble_url', 'behance_url', 'deviantart_url', 'flickr_url', 'youtube_url', 'vimeo_url', 'yelp_url', 'rss_url', 'endpage4' ); if (in_array($option_array['id'], $ids)) { if ($option_array['type'] != 'start_menu' && $option_array['type'] != 'end_menu') { $id = $option_array['id']; $new_value = $option_array['default']; $icefit_settings[$id] = stripslashes($new_value); } } else { if ($option_array['type'] != 'start_menu' && $option_array['type'] != 'end_menu') { $id = $option_array['id']; if ($option_array['type'] == "text") { $new_value = esc_textarea($output[$option_array['id']]); } else { $new_value = $output[$option_array['id']]; } $icefit_settings[$id] = stripslashes($new_value); } } } // Updates settings in the database update_option($icefit_settings_slug,$icefit_settings); } add_action('wp_ajax_icefit_settings_ajax_post_action', 'icefit_settings_ajax_callback'); // NOJS fallback for the "Save changes" button function icefit_settings_save_nojs() { global $icefit_settings_slug; // Get POST data // parse_str($_POST,$output); // Get current settings from the database $icefit_settings = get_option($icefit_settings_slug); // Get the settings template $options = icefit_settings_template(); // Updates all settings according to POST data foreach($options as $option_array){ $ids = array ('gopro', 'custom_css', 'page2', 'unlimited_sidebar', 'endpage2', 'headings_font', 'socialmedia', 'facebook_url', 'twitter_url', 'googleplus_url', 'linkedin_url', 'instagram_url', 'pinterest_url', 'tumblr_url', 'stumbleupon_url', 'dribbble_url', 'behance_url', 'deviantart_url', 'flickr_url', 'youtube_url', 'vimeo_url', 'yelp_url', 'rss_url', 'endpage4' ); if (isset($option_array['id']) && in_array($option_array['id'], $ids)) { if ($option_array['type'] != 'start_menu' && $option_array['type'] != 'end_menu') { $id = $option_array['id']; $new_value = $option_array['default']; $icefit_settings[$id] = stripslashes($new_value); } } else { if ( isset($option_array['id']) && $option_array['type'] != 'start_menu' && $option_array['type'] != 'end_menu' ) { $id = $option_array['id']; if ($option_array['type'] == "text") { $new_value = esc_textarea($_POST[$option_array['id']]); } else { $new_value = $_POST[$option_array['id']]; } $icefit_settings[$id] = stripslashes($new_value); } } } // Updates settings in the database update_option($icefit_settings_slug,$icefit_settings); } // Update settings template in the database upon theme activation function icefit_settings_theme_activation() { global $icefit_settings_slug; // Get current settings from the database $icefit_settings = get_option($icefit_settings_slug); // Get the settings template $options = icefit_settings_template(); // Updates all settings foreach($options as $option_array){ if ($option_array['type'] != 'start_menu' && $option_array['type'] != 'end_menu') { $id = $option_array['id']; if ( !isset( $icefit_settings[$id] ) ) $icefit_settings[$id] = stripslashes($option_array['default']); } } // Updates settings in the database update_option($icefit_settings_slug,$icefit_settings); } add_action('after_switch_theme', 'icefit_settings_theme_activation'); // Outputs the settings panel function icefit_settings_page(){ wp_enqueue_script('media-upload'); wp_enqueue_script('thickbox'); wp_enqueue_style('thickbox'); global $icefit_settings_slug; global $icefit_settings_name; if (isset( $_POST['reset-no-js'] ) && $_POST['reset-no-js']) { icefit_settings_reset_ajax_callback(); echo '

Settings were reset to default.

'; } if (isset( $_POST['save-no-js'] ) && $_POST['save-no-js']) { icefit_settings_save_nojs(); echo '

Settings updated.

'; } ?>

Warning: Javascript is either disabled in your browser or broken in your WP installation.
This is ok, but it is highly recommended to activate javascript for a better experience.
If javascript is not blocked in your browser then this may be caused by a third party plugin.
Make sure everything is up to date or try to deactivate some plugins.