Skip to content

Instantly share code, notes, and snippets.

@Gumster
Gumster / wp-config.php
Created June 28, 2019 13:03
Wordpress environment
/**
* Add file local-config.php with the following:
*
* define('DB_NAME', '');
* define('DB_USER', '');
* define('DB_PASSWORD', '');
* define('DB_HOST', '');
* define('WP_DEBUG', true);
* define('SCRIPT_DEBUG', true);
*
/*
* Bootstrap menu helper
* renders menu and optionally 1 sub menu deep
* Config array is same as for fuel_nav()
*/
function bootstrap_menu($config = NULL, $float = NULL, $toggle = TRUE) {
$menu = (is_array($config)) ? fuel_nav(array_merge($config, array('render_type' => 'array'))) : fuel_nav(array('render_type' => 'array'));
if (is_array($menu)) {
$container_class = isset($config['container_tag_class']) ? 'nav navbar-nav ' . $config['container_tag_class'] : 'nav navbar-nav';
$container_id = isset($config['container_tag_id']) ? ' id="' . $config['container_tag_id'] . '"' : '';