diff --git a/.gitignore b/.gitignore index aa4e0e9..e39ba90 100644 --- a/.gitignore +++ b/.gitignore @@ -2,4 +2,6 @@ /.idea /.vscode .DS_Store -*/.DS_Store \ No newline at end of file +*/.DS_Store +Makefile +init_script.sh diff --git a/init_script.sh b/init_script.sh new file mode 100644 index 0000000..d900412 --- /dev/null +++ b/init_script.sh @@ -0,0 +1,57 @@ +RED='\033[0;31m' +GREEN='\033[0;32m' +YELLOW='\033[0;33m' +NC='\033[0m' # No Color + +# ——— PROJECT NAME ——— +echo "——${RED} Quel est le nom du client ?${NC} " +read clientName +projectName="Deligraph_${clientName}" + + +# ——— RECONFIGURATION DE L'URL HOME LOCALE ——— +echo "##### ${GREEN}RECONFIGURATION DE L'URL HOME LOCALE${NC} ##### " +# Manually change my db host sur ma machine pour wp-cli fonctionne en local (pour bien préciser le socket) +# define('DB_HOST', 'localhost:/Users/martoni_sato/Library/Application Support/Local/run/nFQk01MlZ/mysql/mysqld.sock'); + +# ——— PLUGINS ——— +echo "##### ${GREEN}INSTALLATION DES PLUGINS ${NC} #####" +wp plugin install ./wp-database-tools-main.zip --activate +wp plugin install duplicator --activate +wp plugin install advanced-custom-fields-pro --activate + +composer require wpengine/advanced-custom-fields-pro +wp plugin activate advanced-custom-fields-pro +wp eval 'acf_pro_update_license("b3JkZXJfaWQ9NTg3Nzd8dHlwZT1kZXZlbG9wZXJ8ZGF0ZT0yMDE1LTA2LTI1IDA4OjE5OjUx");' + +# ——— LANGUE ——— +wp language core install fr_FR +wp language core activate fr_FR + + +# ——— THEME ——— +echo "##### ${GREEN}INSTALLATION DU THEME ${NC} #####" +git clone https://gitlab.com/deligraph/wp_starter.git +mv wp_starter $projectName +cd $projectName +sed -i "s/Deligraph_theme/$projectName/g" style.css +wp theme activate projectName + +# ——— DEFAULT CONTENT ——— +wp post create --post_type=page --post_title='Home' --post_status='publish' +wp post create --post_type=page --post_title='News' --post_status='publish' + +wp option update show_on_front "page" +wp option update page_on_front "4" +# wp option update page_for_posts "5" + + +# ——— DESCATIVER LES COMMENTAIREs——— + +# make all comments disabled +wp option update disable_comments_options --format=json '{"disabled_post_types":["post","page","attachment"],"remove_everywhere":true,"permanent":false,"extra_post_types":false,"db_version":6}' + + + +wp menu create "Main Menu" +wp menu location assign main-menu primary diff --git a/style.css b/style.css index b8dca33..bdbd8c1 100644 --- a/style.css +++ b/style.css @@ -1,5 +1,5 @@ /* -Theme Name: Deligraph ⤍ +Theme Name: Deligraph_melanieRutten Author: Deligraph Author URI: https://deligraph.com/ Version: 1.0.0