Skip to content

Instantly share code, notes, and snippets.

View kunsang's full-sized avatar
🚽
Zähneputzen, Pullern und ab ins Bett

Kunsang Norbu Tsering kunsang

🚽
Zähneputzen, Pullern und ab ins Bett
  • Fabrik 19 AG
  • Germany
  • 13:07 (UTC +01:00)
View GitHub Profile
@kunsang
kunsang / wp.sh
Last active December 22, 2017 21:43 — forked from bgallagh3r/wp.sh
Wordpress: Bash Install Script -- Downloads latest WP version, updates wp-config with user supplied DB name, username and password, creates and CHMOD's uploads dir, copies all the files into the root dir you run the script from, then deletes itself!
#!/bin/bash -e
clear
echo "============================================"
echo "WordPress Install Script"
echo "============================================"
echo "Database Name: "
read -e dbname
echo "Database User: "
read -e dbuser
echo "Database Password: "
/*-----------------------------------------------------------------------------------*/
/* Adds new body classes
/*-----------------------------------------------------------------------------------*/
add_filter('body_class', 'add_browser_classes');
function add_browser_classes($classes){
if(is_singular()) {
global $post;
$classes[] = $post->post_name;
}