Added the bootstrap navwalker to project theme

This commit is contained in:
Fabiano Alencar 2018-03-29 14:59:55 -03:00
parent 5575e5580d
commit c5384d47c2
4 changed files with 18 additions and 10 deletions

13
.gitignore vendored
View File

@ -1,8 +1,9 @@
build-config.cfg build-config.cfg
composer.lock composer.lock
src/assets/style.css /vendor/
src/assets/style.css.map /src/assets/style.css
src/assets/scss/.sass-cache /src/assets/style.css.map
src/assets/vendor/ /src/assets/scss/.sass-cache
src/style.css /src/assets/vendor/
vendor/ /src/style.css
/src/vendor/

View File

@ -6,7 +6,8 @@
} }
], ],
"require": { "require": {
"twbs/bootstrap": "4.0.0" "twbs/bootstrap": "4.0.0",
"wp-bootstrap/wp-bootstrap-navwalker": "*"
}, },
"scripts": { "scripts": {
"post-install-cmd": "bash install.sh", "post-install-cmd": "bash install.sh",

View File

@ -4,15 +4,20 @@ echo "\n ..::Tainacan Theme::..\n";
echo "\nStarting installation with composer ... please wait!!"; 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/", 0777, true);
mkdir("src/assets/vendor/bootstrap/scss", 0777, true); mkdir("src/assets/vendor/bootstrap/scss", 0777, true);
mkdir("src/assets/vendor/bootstrap/js", 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"; echo "\nStarting Copying Files...\n";

View File

@ -95,6 +95,7 @@ function tainacan_change_logo_class( $html ) {
} }
add_filter( 'get_custom_logo', 'tainacan_change_logo_class' ); 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/enqueues.php';
require get_template_directory() . '/functions/customize.php'; require get_template_directory() . '/functions/customize.php';
require get_template_directory() . '/functions/pagination.php'; require get_template_directory() . '/functions/pagination.php';