-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Better seperating of functions in files. More clarity. Brevity. All t…
…he stuff.
- Loading branch information
1 parent
113bd1c
commit 01e2371
Showing
7 changed files
with
275 additions
and
484 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,43 +1,23 @@ | ||
|
||
<nav role="navigation" id="nav-main" class="nav-main js-nav-main"> | ||
<h2 class="is-hidden-visually">Menu</h2> | ||
<h2 class="is-hidden-visually"><?php _e( 'Menu', 'stickyrice' ); ?></h2> | ||
<?php wp_nav_menu(array( | ||
'container' => false, // remove nav container | ||
'menu' => __( 'Hoofdmenu', 'stickyricetheme' ), // nav name | ||
'menu_class' => 'nav-main__list', // adding custom nav class | ||
'theme_location' => 'main-nav', // where it's located in the theme | ||
'theme_location' => 'nav-main', // where it's located in the theme | ||
)); ?> | ||
<a href="#page-top" class="nav-main-toggle nav-main-toggle--close js-nav-main-hide">Terug naar boven</a> | ||
<a href="#page-top" class="nav-main-toggle nav-main-toggle--close js-nav-main-hide"><?php _e( 'Terug naar boven', 'stickyrice' ); ?></a> | ||
</nav> | ||
<footer role="contentinfo" class="contentinfo copy"> | ||
<p>© <?php echo get_bloginfo('name'); ?></p> | ||
</footer> | ||
|
||
<?php $theme_data = sr_get_theme_data(); ?> | ||
|
||
<?php | ||
$theme_location = 'stickyrice'; | ||
|
||
if(strpos($_SERVER['SERVER_NAME'],'.local') !== false || strpos($_SERVER['SERVER_NAME'],'staging.basboerman') !== false): | ||
$env_suffix = ''; | ||
else: | ||
$env_suffix = '.min'; | ||
endif; | ||
// Get variables form package.json | ||
$packagefile = file_get_contents($_SERVER['DOCUMENT_ROOT'] . '/wp-content/themes/' . $theme_location . '/package.json'); | ||
$packagejson = json_decode($packagefile, true); | ||
?> | ||
<script src="<?php echo get_template_directory_uri() . '/dist/main' . $env_suffix . '.js?v=' .$packagejson['version']; ?>" async></script> | ||
<script src="<?php echo get_template_directory_uri() . '/dist/main' . $theme_data['env_suffix'] . '.js?v=' .$theme_data['version']; ?>" async></script> | ||
|
||
<?php wp_footer(); ?> | ||
|
||
<!-- Global site tag (gtag.js) - Google Analytics --> | ||
<script async src="https://www.googletagmanager.com/gtag/js?id=UA-XXXXXXXXX-X"></script> | ||
<script> | ||
window.dataLayer = window.dataLayer || []; | ||
function gtag(){dataLayer.push(arguments);} | ||
gtag('js', new Date()); | ||
gtag('config', 'UA-XXXXXXXXX-X', { 'anonymize_ip': true }); | ||
</script> | ||
|
||
</body> | ||
</html> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.