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 // For implementation instructions see: https://aceplugins.com/how-to-add-a-code-snippet/ | |
/** | |
* Add link icons. | |
* | |
* Adds a external-link icon to external links only. | |
* Related post: https://jeroensormani.com/adding-a-icon-to-external-links/ | |
*/ | |
function ace_add_external_link_icon( ) { | |
wp_register_script( 'external-link-icon', 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 /* Template Name: Contact Page */ | |
$response = ""; | |
//function to generate response | |
function my_contact_form_generate_response($type, $message){ | |
global $response; | |
if($type == "success") $response = "<div class='alert alert-success'>{$message}</div>"; | |
else $response = "<div class='alert alert-danger'>{$message}</div>"; |
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
# /etc/nginx/snippets/wordpress/common.conf | |
index index.php; | |
# Deny all attempts to access hidden files such as .htaccess, .htpasswd, .DS_Store (Mac). | |
location ~ /\. { | |
deny all; | |
} | |
# Block PHP files in uploads, content, and includes directory. | |
location ~* /(?:uploads|files|wp-content|wp-includes)/.*\.php$ { |
NewerOlder