1 path.module | path_verbose_message($message = NULL, $messages_enabled = NULL) |
Output a helpful message if verbose output is enabled.
Verbose message output is only enabled when:
- The Path 'verbose' setting is enabled.
- The current user has the 'notify of path changes' permission.
- It has not been specifically disabled by setting $messages_enabled to FALSE (as before a bulk operation).
Parameters
string $message: An optional string of the verbose message to display. This string should already be run through t().
bool $messages_enabled: Disable all messages temporarily for this request by setting to FALSE, or re-enable messages by setting to TRUE.
Return value
TRUE if verbose output is enabled, or FALSE otherwise.:
File
- core/
modules/ path/ path.module, line 1017 - Enables users to customize URLs and provide automatic URL alias patterns.
Code
function path_verbose_message($message = NULL, $messages_enabled = NULL) {
static $verbose;
if (isset($messages_enabled) && $messages_enabled === FALSE) {
$verbose = FALSE;
}
if (!isset($verbose) || $messages_enabled === TRUE) {
$verbose = config_get('path.settings', 'verbose') && user_access('notify of path changes');
}
if (!$verbose || (isset($op) && in_array($op, array('bulkupdate', 'return')))) {
return FALSE;
}
if ($message) {
backdrop_set_message($message);
}
return $verbose;
}