<?php //* do not include php tag
/**
* Callback for WordPress register_meta() sanitize parameter.
*
* Sanitize the 'sample_count' meta value before saved to the database.
*
* @see https://codex.wordpress.org/Function_Reference/register_meta
*
* @uses absint()
* @see https://codex.wordpress.org/Function_Reference/absint
*
* @param mixed $meta_value The meta value.
* @param string $meta_key The meta key.
* @param string $meta_type The meta type.
* @return mixed The meta value.
*/
function sanitize_sample_count_meta( $meta_value, $meta_key, $meta_type ) {
return absint( $meta_value );
}
-
-
Save Lovor01/25cf052eb0e60fa48b5be7dc9c260b90 to your computer and use it in GitHub Desktop.
Sanitize callback for WordPress register_meta() function.
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment