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 | |
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> |
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
#!/bin/bash | |
# Copyright © 2015 Bjørn Johansen | |
# This work is free. You can redistribute it and/or modify it under the | |
# terms of the Do What The Fuck You Want To Public License, Version 2, | |
# as published by Sam Hocevar. See http://www.wtfpl.net/ for more details. | |
WP_PATH="/path/to/wp" | |
# Check if WP-CLI is available | |
if ! hash wp 2>/dev/null; then |
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
#!/usr/bin/php | |
<?php | |
/** | |
* @license http://www.wtfpl.net/txt/copying/ WTFPL | |
*/ | |
date_default_timezone_set( 'UTC' ); | |
$sitemaps = array( |
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 | |
/** | |
* 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) | |
*/ |
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 | |
/** | |
* Based on an idea and code by webdev studios: https://webdevstudios.com/2015/11/03/loading-the-optimal-wordpress-object-cache-implementation-in-your-production-staging-and-local-development-environments/ | |
*/ | |
$plugin_dir = ( defined( 'WP_PLUGIN_DIR' ) ? WP_PLUGIN_DIR : WP_CONTENT_DIR . '/plugins' ); | |
// If Redis exists and redis server is configured, |
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
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 { |
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 | |
/** | |
* 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) | |
*/ |
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 | |
/** | |
* Reorder the visible attributes on the frontend. | |
*/ | |
add_filter( 'woocommerce_product_get_attributes', function( $old_attributes, $obj ) { | |
$order = [ 'pa_colour', 'pa_size' ]; | |
$new_attributes = []; |
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 | |
/** | |
* Authentication customizations. | |
* | |
* @package BJ\Auth | |
*/ | |
/** | |
* Filters the duration of the authentication cookie expiration period. | |
* |
NewerOlder