You are here

unpublished_404.module in Unpublished 404 8

Same filename and directory in other branches
  1. 7 unpublished_404.module

Module file for Unpublished 404.

File

unpublished_404.module
View 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

Namesort descending Description
unpublished_404_help Implements hook_help().