PluginProbe
WP Coder – Insert & Manage Code Snippets / 4.1
WP Coder – Insert & Manage Code Snippets v4.1
4.5.1 1.1 2.3.1 2.3.2 2.4.1 2.5.1 2.5.2 2.5.3 2.5.4 2.5.5 2.5.6 3.0 3.0.1 3.0.2 3.0.3 3.0.4 3.0.5 3.1 3.1.1 3.2 3.2.1 3.3 3.4 3.5 3.5.1 All 39 releases
wp-coder / classes / Snippets / pages / optimization.php

optimization.php in WP Coder – Insert & Manage Code Snippets 4.1, at classes/Snippets/pages/optimization.php

46 lines 1.1 KB
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
1 <?php
2 defined( 'ABSPATH' ) || exit;
3
4 ?>
5
6 <div class="wowp-snippets__header">
7 <h3 class="wowp-snippets__header-title">Cleanup & Optimization</h3>
8 <p class="wowp-snippets__header-description">Reduce bloat and improve performance.</p>
9 </div>
10
11 <?php
12
13 $snippets = [
14 'remove_wp_version' => [
15 'Remove WordPress Version Number',
16 'Hide version info from site source and feeds.',
17 ],
18 'disable_attachment_pages' => [
19 'Disable Attachment Pages',
20 'Redirect attachment pages to the parent post or homepage.',
21 ],
22 'disable_rss_feeds' => [
23 'Disable RSS Feeds',
24 'Disable all default WordPress RSS feeds.',
25 ],
26 'disable_search' => [
27 'Disable Search',
28 'Disable WordPress built-in search functionality.',
29 ],
30 'disable_wlwmanifest_link' => [
31 'Disable wlwmanifest link',
32 'Remove the Windows Live Writer manifest tag.',
33 ],
34
35 'disable_automatic_trash' => [
36 'Disable Automatic Trash Emptying',
37 'Stop automatic emptying of trash every 30 days.',
38 ],
39
40 'enable_redirect_404_to_home' => [
41 'Redirect 404 to Homepage',
42 'Automatically redirect all 404 error pages to the homepage using a 301 redirect.',
43 ],
44 ];
45
46 self::create_options( $snippets );