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
# Generated automatically by: htaccess.php | |
# This PHP script should work only a local machine. | |
# Code: d9015a. | |
# Created: 2019-03-14 | |
# Updated: 2019-06-17 | |
# Time: 21:11:32 EDT | |
# SECURITY BEGIN (Deny First, Then Allow) | |
<FilesMatch "xmlrpc.php|config|error|debug|changelog|readme|license"> |
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
<?php | |
/** | |
* Htaccess Printer | |
* | |
* Prints an `.htaccess` file. | |
* | |
* @package Earth3300\EC01 | |
* @since 1.0.1 | |
* @author Clarence J. Bos <cbos@tnoep.ca> | |
* @copyright Copyright (c) 2018, Clarence J. Bos |
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
/** | |
* A non-filtered, non-cached version of wp_upload_dir() that doesn't check the path. | |
* | |
* @since 4.5.0 | |
* @access private | |
* | |
* @param string $time Optional. Time formatted in 'yyyy/mm'. Default null. | |
* @return array See wp_upload_dir() | |
*/ | |
function _wp_upload_dir( $time = null ) { |
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
<?php | |
class SecureSessionHandler extends SessionHandler { | |
protected $key, $name, $cookie; | |
public function __construct($key, $name = 'MY_SESSION', $cookie = []) | |
{ | |
$this->key = $key; | |
$this->name = $name; |
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
p { | |
max-width: 14.5cm !important; | |
font-size: 3mm !important; | |
text-indent: 4mm !important; | |
line-height: 1.5 !important; | |
text-align: justify !important; | |
margin: 0 !important; | |
} |
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
# Rewrite to the cached file if it exists and is not a post or attachment. | |
<IfModule mod_rewrite.c> | |
RewriteEngine On | |
RewriteBase / | |
# RewriteCond %{REQUEST_METHOD} !=POST | |
# RewriteCond %{QUERY_STRING} !.*=.* | |
# RewriteCond %{DOCUMENT_ROOT}/$1/index.html -f | |
# RewriteRule ^(.*) /$1/index.html [L] | |
</IfModule> |
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
/** | |
* Get the Paths Used in the Current Project | |
* | |
* Uses options values if these are set. Modify on a per-project basis. | |
* Intended to be used to save and retrieve files, but can be used more | |
* generically as it sets and standardizes the document root and the relative | |
* path to the directory in which the containing file resides. | |
* | |
* Last updated: 2020-03-06 | |
* No. of lines: 42 |
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
if ( ! function_exists( 'pre_dump' ) ) { | |
/** | |
* Uses var_dump with <pre>...</pre> to dump and format an array or string when debugging (usually locally). | |
* | |
* Requires the debug flag to be set `?debug` AND a file named .security | |
* to be present in the same directory to function. This prevents it from | |
* inadvertangly working online UNLESS the `.security` file is present. | |
* Converts &, ", ', < and > to their corresponding HTML entities. | |
* | |
* @link https://www.php.net/manual/en/function.htmlspecialchars.php |
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
# ALWAYS rewrite to the specified directory (excluding the directory itself). | |
<IfModule mod_rewrite.c> | |
RewriteEngine on | |
RewriteCond %{REQUEST_URI} !^/main/ | |
RewriteRule ^(.*)$ /main/$1 | |
</IfModule> |
NewerOlder