apache2ctl configtest
- Configtest before restarting Apache.
service apache restart
- Restart Apache.
service apache restart
- Restart MySQL.
<?php | |
/** | |
* Wrap with Link if URL passed | |
*/ | |
function wrap_if_linked($text, $url) { | |
if($url) { | |
echo('<a href="' . $url . '">' . $text . '</a>'); | |
} else { | |
echo($text); | |
} |
<?php | |
/* | |
* Validate Facebook URL field | |
* URL field must be named "facebook_video_url" or you can change is in the filter below. | |
* Source: https://www.advancedcustomfields.com/resources/acf-validate_value/ | |
*/ | |
function acf_validate_facebook_url( $valid, $value, $field, $input ){ | |
// If already not valid, then exit | |
if( !$valid ) { | |
return $valid; |
#!/bin/bash -e | |
## | |
# WordPress Installation and VirtualHost Creation | |
# | |
# Description: Installs a WordPress website in the ~/Sites folder, creates a homepage, | |
# cleans up the WP install a bit, deletes the akismet and hello dolly plugins, creates the permalinks, | |
# clones the roots/sage theme framework to the theme folder, deletes all the other WP default themes, | |
# installs/runs npm and bower and runs gulp to create the initial assets, adds a custom gitignore file | |
# to /wp-content, installs the roots/soil plugin, creates a git repo in wp-content, saves the WordPress |
# Redirect to homepage | |
RewriteEngine on | |
RewriteCond %{REQUEST_FILENAME} !-f | |
RewriteCond %{REQUEST_FILENAME} !-d | |
RewriteRule .? http://example.com/ [R=301,L] |
These instructions will guide you through the process of setting up a wildcard SSL for your local virtualhosts for offline development. Most importantly, this configuration will give you the happy, green lock in Chrome.
These instructions have only been tested on Mac OS Sierra using the pre-installed Apache and PHP versions. These instructions also assume you have virtualhosts set up locally already.
head.ready(function() { | |
if(navigator.userAgent.match('CriOS')) head.feature("chrome-ios", true); | |
else head.feature("chrome-ios", false); | |
}); |