function _maxlength_limit_body in Maxlength 5
Same name and namespace in other branches
- 6 maxlength.module \_maxlength_limit_body()
1 call to _maxlength_limit_body()
File
- ./
maxlength.module, line 96
Code
function _maxlength_limit_body() {
if (arg(0) == 'node') {
if (arg(1) == 'add') {
$type = str_replace('-', '_', arg(2));
return strlen(variable_get(MAXLENGTH_NODE_TYPE . $type . '_b', '')) > 0;
}
if (arg(2) == 'edit') {
$nid = intval(arg(1));
return strlen(variable_get(MAXLENGTH_NODE_TYPE . _maxlength_node_type_from_id($nid) . '_b', '')) > 0;
}
}
return FALSE;
}