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 | |
/* | |
Plugin Name: Set Image Alt field | |
Plugin URI: https://www.damiencarbery.com | |
Description: Set the alt field of uploaded images to the title. Copy image title to alt when inserted into editor. Set alt of post thumbnail to post title. Code copied from various sources. | |
Author: Damien Carbery, Francisco Ruiz, Dan and Bojan Petrovic. | |
Version: 0.1 | |
*/ | |
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 | |
/* | |
Plugin Name: Maintenance Mode (Simple) | |
Plugin URI: http://www.damiencarbery.com | |
Description: Put site into maintenance mode for regular site visitors. Deactivate plugin to disable maintenance mode. | |
Author: Damien Carbery | |
Version: 0.3 | |
*/ | |
// Wait until 'wp' to allow login page to work. |
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
add_action( 'wp_footer', function() { ?> | |
<script> | |
( function( $ ) { | |
'use strict'; | |
$( document ).on( 'ready', function() { | |
$( '.back-button' ).click( function() { | |
parent.history.back(); | |
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
<?php | |
/* | |
Plugin Name: Limit Cart Weight to increments | |
Plugin URI: https://www.damiencarbery.com/ | |
Description: Prevent checkout unless cart is above a minimum weight and increments of a weight. | |
Author: Damien Carbery | |
Author URI: https://www.damiencarbery.com | |
Version: 0.1 | |
*/ |
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
#default | |
server { | |
listen 80; | |
server_name api.foo.com; | |
client_max_body_size 20m; | |
keepalive_timeout 30; |
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 | |
/** | |
* thim functions and definitions | |
* | |
* @package thim | |
*/ | |
define( 'THIM_DIR', trailingslashit( get_template_directory() ) ); | |
define( 'THIM_URI', trailingslashit( get_template_directory_uri() ) ); | |
define( 'THIM_THEME_VERSION', '3.4.3' ); |
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 | |
function wp_customize_admin_menu() { | |
remove_menu_page( 'edit.php' ); | |
remove_menu_page( 'edit-comments.php' ); | |
remove_submenu_page( 'themes.php', 'theme-editor.php' ); | |
remove_submenu_page( 'plugins.php', 'plugin-editor.php' ); | |
remove_submenu_page( 'tools.php', 'tools.php' ); | |
remove_submenu_page( 'tools.php', 'import.php' ); | |
remove_submenu_page( 'options-general.php', 'options-discussion.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
<?php | |
/******************************************************************************* | |
Add Centre meta box to the facilities - Centre plugin - facilities Post Type | |
*******************************************************************************/ | |
if(!function_exists('add_bwm_facilities_centre_meta_box')) | |
{ | |
function add_bwm_facilities_centre_meta_box() | |
{ |
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 | |
/** | |
* Remove IP collection in WordPress comments | |
* Source: http://www.wpbeginner.com/wp-tutorials/how-to-stop-storing-ip-address-in-wordpress-comments/ | |
*/ | |
function wpb_remove_commentsip( $comment_author_ip ) { | |
return ''; | |
} | |
add_filter( 'pre_comment_user_ip', 'wpb_remove_commentsip' ); |
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
add_header X-XSS-Protection "1; mode=block"; | |
add_header X-Frame-Options "SAMEORIGIN"; | |
add_header Referrer-Policy "strict-origin-when-cross-origin"; | |
add_header X-Download-Options "noopen"; | |
add_header Strict-Transport-Security "max-age=31536000; includeSubDomains"; | |
add_header X-Content-Type-Options "nosniff"; | |
add_header Content-Security-Policy-Report-Only ""; |