unpublished_404.module in Unpublished 404 8
Same filename and directory in other branches
Module file for Unpublished 404.
File
unpublished_404.moduleView source
<?php
/**
* @file
* Module file for Unpublished 404.
*/
use Drupal\Core\Routing\RouteMatchInterface;
/**
* Implements hook_help().
*/
function unpublished_404_help($route_name, RouteMatchInterface $route_match) {
switch ($route_name) {
case 'help.page.unpublished_404':
$output = '';
$output .= '<h3>' . t('About') . '</h3>';
$output .= '<p>' . t('This module modifies the behavior of the node system to return HTTP status 404 instead of 403 if a user does not have permission to view the unpublished node page. By default, whenever a user tries to access an unpublished node page it shows 403 (access denied) error. So this module changes the default behavior of node system that emits 404 (page not found) error instead of 403.') . '</p>';
return $output;
}
}
Functions
Name | Description |
---|---|
unpublished_404_help | Implements hook_help(). |