Version 1.0.1
-
Added
$this->options
, and replaced all references toget_options
with this arg. -
Added
get();
, andshow();
functions for option retrieval. -
Added a conditional
if(!class_exists('NHP_Options')){require_once....}
in the example theme-options.php file (ready for when we port this for plugins as well) -
theme-options.php now uses a global reference for creating the class to use the
get();
andshow();
functions -
Added transient for settings saved messages (removes reliance on
$_GET['settings-updated']
parameter being set to true, and prevents the message being shown if the$_GET
param is manually set) -
Added
pages_select
andpages_multi_select
field types -
Added
posts_select
andposts_multi_select
field types -
Added
tags_select
andtags_multi_select
field types -
Added
cats_select
andcats_multi_select
field types -
Added
menu_select
field type -
Added
menu_location_select
field type -
Added
post_type_select
field type -
Added
checkbox_hide_below
field type (if not checked below field is hidden) -
Added
select_hide_below
field type (each option can be set to allow, or disallow the below field, see the example theme-options.php file for detail) -
Multiple DEBUG Notices have been addressed (by using some simple isset() conditionals)
-
Added validation class for
date
-
Added validation class for
color
-
Added a "force" validate of field types
color
anddate
(no need to set the "validate" attribute in the field array, its validated by default) -
Added validation class for
comma_numeric
(must be numeric values seperated by comma's, white space is removed) -
Added validation class for
no_special_chars
(strip special characters) -
Added validation class for
str_replace
(provide the search and replacement values) -
Added validation class for
preg_replace
(provide the pattern and replacement values) -
Added validation callback option (for one off validation needs), simply ommit the "validate" attribute and provide the "validate_callback" attribute when defining the fields)