static public add_class_action ( string $action, integer $priority = 10 ) | ||
$action | string | |
$priority | integer |
static function add_class_action($action, $priority = 10)
{
$method = str_replace(['-', ':'], '_', "_{$action}") . (10 !== intval($priority) ? "_{$priority}" : '');
add_action($action, array(get_called_class(), $method), $priority, 99);
}