<?php
	function wpfresh5_get_plugin_settings() {
		return get_option( 'wpfresh5_settings' );
	}

	function wpfresh5_save_plugin_settings( $settings ) {
		return update_option( 'wpfresh5_settings', $settings );
	}

	function wpfresh5_get_settings( $path = array(), $settings = false ) {
		if( !$settings )
			$settings = wpfresh5_get_plugin_settings();

		if( empty( $path ) )
			return array();
		$val = $settings;
		foreach( $path as $field ) {
			$val = isset( $val[ $field ] ) ? $val[ $field ] : false;
		}
		return $val;
	}
?>