PluginProbe
Admin and Site Enhancements (ASE) / 7.5.3
Admin and Site Enhancements (ASE) v7.5.3
9.1.1 9.1.0 9.0.2 9.0.1 9.0.0 8.9.2 8.9.1 8.9.0 8.8.8 8.8.7 8.8.6 8.8.5 8.8.4 8.8.3 8.8.2 8.8.1 8.8.0 8.7.3 8.7.2 8.7.1 8.2.1 8.2.2 8.2.3 8.3.0 8.3.1 All 273 releases
admin-site-enhancements / classes / class-disable-feeds.php
class-disable-feeds.php
24 lines 488 B
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
1 <?php
2
3 namespace ASENHA\Classes;
4
5 /**
6 * Class for Disable Feeds module
7 *
8 * @since 6.9.5
9 */
10 class Disable_Feeds {
11
12 /**
13 * Ensure /feed/ page outputs a 403 Forbidden header and message
14 *
15 * @since 5.5.2
16 */
17 public function redirect_feed_to_403() {
18 if ( is_feed() ) {
19 status_header( 403 ); // Send an HTTP 403 Forbidden status header
20 die( '403 Forbidden' ); // End execution and display a 403 Forbidden message
21 }
22 }
23
24 }