diff --git a/.gitignore b/.gitignore index 1d5e1d3..f196db5 100644 --- a/.gitignore +++ b/.gitignore @@ -1,8 +1,9 @@ build-config.cfg composer.lock -src/assets/style.css -src/assets/style.css.map -src/assets/scss/.sass-cache -src/assets/vendor/ -src/style.css -vendor/ \ No newline at end of file +/vendor/ +/src/assets/style.css +/src/assets/style.css.map +/src/assets/scss/.sass-cache +/src/assets/vendor/ +/src/style.css +/src/vendor/ \ No newline at end of file diff --git a/composer.json b/composer.json index aa07d55..a0417e4 100644 --- a/composer.json +++ b/composer.json @@ -6,7 +6,8 @@ } ], "require": { - "twbs/bootstrap": "4.0.0" + "twbs/bootstrap": "4.0.0", + "wp-bootstrap/wp-bootstrap-navwalker": "*" }, "scripts": { "post-install-cmd": "bash install.sh", diff --git a/install.sh b/install.sh index d6e9b35..a257f2e 100644 --- a/install.sh +++ b/install.sh @@ -4,15 +4,20 @@ echo "\n ..::Tainacan Theme::..\n"; echo "\nStarting installation with composer ... please wait!!"; -echo "\nChecking if project folders exist ...\n\n"; +echo "\nChecking if bootstrap folders exist ...\n\n"; -if (!file_exists("vendor/bootstrap")) { +if (!file_exists("src/assets/bootstrap")) { mkdir("src/assets/vendor/bootstrap/", 0777, true); mkdir("src/assets/vendor/bootstrap/scss", 0777, true); mkdir("src/assets/vendor/bootstrap/js", 0777, true); } -echo "\nVerification completed...\n"; +echo "\m Checking if file bootstrap navwalker exist ... \n\n"; + +if (!file_exists("src/vendor/class-wp-bootstrap-navwalker.php")) { + echo "\m Copy Boostrap Navwalker ... \n\n"; + copy("vendor/wp-bootstrap/wp-bootstrap-navwalker/class-wp-bootstrap-navwalker.php", "src/vendor/class-wp-bootstrap-navwalker.php"); +} echo "\nStarting Copying Files...\n"; diff --git a/src/functions.php b/src/functions.php index 9285841..0b2b8fd 100644 --- a/src/functions.php +++ b/src/functions.php @@ -95,6 +95,7 @@ function tainacan_change_logo_class( $html ) { } add_filter( 'get_custom_logo', 'tainacan_change_logo_class' ); +require_once get_template_directory() . '/vendor/class-wp-bootstrap-navwalker.php'; require get_template_directory() . '/functions/enqueues.php'; require get_template_directory() . '/functions/customize.php'; require get_template_directory() . '/functions/pagination.php';