View reorder-attributes.php
<?php | |
/** | |
* Reorder the visible attributes on the frontend. | |
*/ | |
add_filter( 'woocommerce_product_get_attributes', function( $old_attributes, $obj ) { | |
$order = [ 'pa_colour', 'pa_size' ]; | |
$new_attributes = []; |
View gravityforms-privacyactions.php
<?php | |
/** | |
* Personal data exporter and eraser for Gravity Forms. | |
* | |
* @package BJ\GravityForms\PrivacyActions | |
* @author bjornjohansen | |
* @version 0.1.1 | |
* @license https://www.gnu.org/licenses/old-licenses/gpl-2.0.html GNU General Public License version 2 (GPLv2) | |
*/ |
View class-assetspusher.php
<?php | |
/** | |
* HTTP/2 server push WordPress assets. | |
* | |
* @package BJ\AssetsPusher | |
* @author bjornjohansen | |
* @version 0.1.0 | |
* @license https://www.gnu.org/licenses/old-licenses/gpl-2.0.html GNU General Public License version 2 (GPLv2) | |
*/ |
View wordpress.conf
index index.php index.html; | |
# Don’t log favicon requests | |
location /favicon.ico { | |
log_not_found off; | |
access_log off; | |
} | |
# Disallow access to readme.html | |
location /readme.html { |
View logging.php
<?php | |
/** | |
* Simple logging for WordPress. | |
* | |
* @package BJ\Log | |
* @author bjornjohansen | |
* @version 0.1.0 | |
* @license https://www.gnu.org/licenses/old-licenses/gpl-2.0.html GNU General Public License version 2 (GPLv2) | |
*/ |
View auth.php
<?php | |
/** | |
* Authentication customizations. | |
* | |
* @package BJ\Auth | |
*/ | |
/** | |
* Filters the duration of the authentication cookie expiration period. | |
* |
View maintenance.php
<?php | |
wp_load_translations_early(); | |
$protocol = wp_get_server_protocol(); | |
header( "$protocol 503 Service Unavailable", true, 503 ); | |
header( 'Content-Type: text/html; charset=utf-8' ); | |
header( 'Retry-After: 30' ); | |
?> | |
<!DOCTYPE html> | |
<html> |
NewerOlder