Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Fixing spelling on sanitize functions and adding deprecated functions…

… for misspelled function names
  • Loading branch information...
commit cecbb3db4f9291c00eaec9e76436ac10c1b29512 1 parent c5091b1
Kevin Langley authored
Showing with 16 additions and 3 deletions.
  1. +12 −2 sanitize-callbacks.php
  2. +4 −1 voce-settings-api.php
View
14 sanitize-callbacks.php
@@ -6,7 +6,7 @@
* @param array $args
* @return variable
*/
-function vs_santize_checkbox($value, $setting, $args) {
+function vs_sanitize_checkbox($value, $setting, $args) {
return !is_null($value);
}
@@ -17,7 +17,7 @@ function vs_santize_checkbox($value, $setting, $args) {
* @param array $args
* @return variable
*/
-function vs_santize_text($value, $setting, $args) {
+function vs_sanitize_text($value, $setting, $args) {
return trim(strip_tags($value));
}
@@ -46,4 +46,14 @@ function vs_sanitize_email($value, $setting, $args) {
return null;
}
return $value;
+}
+
+function vs_santize_checkbox($value, $setting, $args) {
+
+ return vs_sanitize_checkbox($value, $setting, $args);
+}
+
+function vs_santize_text($value, $setting, $args) {
+ _deprecated_function( __FUNCTION__, '0.2', 'vs_sanitize_text()' );
+ return vs_sanitize_text($value, $setting, $args);
}
View
5 voce-settings-api.php
@@ -2,6 +2,7 @@
/**
* A simplification of the settings API
* @author Michael Pretty (prettyboymp)
+ * @version 0.2
*/
if(!class_exists('Voce_Settings_API')) {
@@ -12,6 +13,8 @@ class Voce_Settings_API {
private static $instance;
private $settings_pages;
+
+ CONST VERSION = 0.2;
/**
* Returns singleton instance of api
@@ -277,7 +280,7 @@ public function __construct($group, $title, $setting_key, $args = array()) {
'capability' => $this->group->capability,
'default_value' => '',
'display_callback' => '',
- 'sanitize_callbacks' => array('vs_santize_text'),
+ 'sanitize_callbacks' => array('vs_sanitize_text'),
'description' => ''
));

0 comments on commit cecbb3d

Please sign in to comment.
Something went wrong with that request. Please try again.