Indeed, like @hindmost said:
Use self::
instead of WP_City_Gender::
!
So for instance:
class WP_City_Gender {
....
public static function valid($str) {
return (isset($str) && strlen($str) > 0);
}
...
public static function user_register($user_id) {
if (self::valid($_POST[FIRST_NAME]))
...
}
}
Hindmost should have made that an answer :). Note that self
is WITHOUT the dollar prefix ($), in contrast to $this
which DOES have a dollar.