-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
12 changed files
with
182 additions
and
128 deletions.
There are no files selected for viewing
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
<?php | ||
if(!defined("ABSPATH")){ | ||
http_response_code(403); | ||
die; | ||
} | ||
|
||
/* Limit heartbeat control. */ | ||
add_filter( 'heartbeat_settings', function(){ | ||
// Set the interval to 60 seconds (default is 15 seconds). | ||
$seconds = apply_filters("pw_heartbeat_seconds", 60); | ||
if(!is_numeric($seconds) || $seconds < 10){ | ||
if(is_admin()){ | ||
wp_die( | ||
__("The heartbeat interval must be a numeric value and cannot be set to less than 10 seconds, as doing so may significantly impact your site's performance.", "perpetual-wp"), | ||
__("Invalid heartbeat value", "perpetual-wp"), | ||
[ | ||
"response" => 503, | ||
"exit" => true | ||
] | ||
); | ||
}else{ | ||
$seconds = 60; | ||
} | ||
} | ||
|
||
$settings['interval'] = $seconds; | ||
|
||
return $settings; | ||
}, PHP_INT_MAX); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
<?php | ||
http_response_code(403); | ||
die; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
<?php | ||
if(!defined("ABSPATH")){ | ||
http_response_code(403); | ||
die; | ||
} | ||
|
||
// Users will no longer see the option to filter media files by upload month. | ||
// TO-DO: Only display this option when there is at least one year available or a substantial number of files. | ||
add_filter( 'media_library_months_with_files', function() { return array(); }); | ||
|
||
// Disables the ability to create audio playlists. | ||
add_filter( 'media_library_show_audio_playlist', function() { return false; }); | ||
|
||
// Disables the ability to create video playlists. | ||
add_filter( 'media_library_show_video_playlist', function() { return false; }); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
<?php | ||
if(!defined("ABSPATH")){ | ||
http_response_code(403); | ||
die; | ||
} | ||
|
||
add_action("init", function(){ | ||
load_plugin_textdomain('perpetual-wp', false, 'perpetual-wp/lang/' ); | ||
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
<?php | ||
if(!defined("ABSPATH")){ | ||
http_response_code(403); | ||
die; | ||
} | ||
|
||
if(!defined('DISALLOW_FILE_EDIT')){ | ||
// Disables the built-in WordPress file editor for themes and plugins in the admin dashboard for enhanced security. | ||
define('DISALLOW_FILE_EDIT', TRUE); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
<?php | ||
if(!defined("ABSPATH")){ | ||
http_response_code(403); | ||
die; | ||
} | ||
|
||
if(!defined("FORCE_SSL_ADMIN")){ | ||
// Forces SSL on the admin panel | ||
define("FORCE_SSL_ADMIN", TRUE); | ||
|
||
if(isset($_SERVER["HTTP_X_FORWARDED_PROTO"]) && strpos($_SERVER["HTTP_X_FORWARDED_PROTO"], "https") !== FALSE){ | ||
$_SERVER['HTTPS'] = 'on'; | ||
} | ||
} | ||
|
||
if(!defined("FORCE_SSL_LOGIN")){ | ||
// Forces SSL on 'wp-login.php' | ||
define("FORCE_SSL_LOGIN", true); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
<?php | ||
http_response_code(403); | ||
exit; |
Oops, something went wrong.