From: Steve Sutton Date: Thu, 11 Jun 2015 18:02:30 +0000 (-0400) Subject: Setting up glm-client-info plugin X-Git-Url: http://cvs2.gaslightmedia.com/gitweb/index.cgi?a=commitdiff_plain;h=d6aee826f9a26496693d154232d75cbe6d0f33b3;p=web%2FGruntInit%2FglmTheme.git Setting up glm-client-info plugin Now the theme will use the glm-client-info plugin to pull the name and address data out. Can be setup in the partial files in parts directory --- diff --git a/root/footer.php b/root/footer.php index e064c9f..d851020 100644 --- a/root/footer.php +++ b/root/footer.php @@ -3,14 +3,7 @@
- +
diff --git a/root/functions.php b/root/functions.php index 9765bde..de3c741 100644 --- a/root/functions.php +++ b/root/functions.php @@ -78,6 +78,29 @@ function glm_page_menu($parent = 0, $class = '') echo ''."\n"; } +/** + * Return the client info option for the given key + * + * @param type $name Name of the client info option to return + * + * @return string Option + */ +if (!function_exists('glm_get_clientinfo_option')) { + function glm_get_clientinfo_option($name) + { + $settings = get_option('glmclientinfo_settings'); + $states = get_option('glmclientinfo_states'); + if ($name == 'stateFull' && $settings['state']) { + return $states[$settings['state']]; + } + if ($name == 'state2Full' && $settings['state2']) { + return $states[$settings['state2']]; + } + return ($settings && $settings[$name]) + ? $settings[$name] + : null; + } +} function SearchFilter($query) { if(isset($_GET['searchType'])) { @@ -173,7 +196,7 @@ function glm_side_menu() { } else { $ID = $parent->ID; } - echo '

'.get_the_title($ID).'

'; + echo '

'.get_the_title($ID).'

'; echo ''."\n"; diff --git a/root/parts/client-info-footer.php b/root/parts/client-info-footer.php new file mode 100644 index 0000000..12e0e5c --- /dev/null +++ b/root/parts/client-info-footer.php @@ -0,0 +1,28 @@ + + diff --git a/root/parts/client-info-offcanvas.php b/root/parts/client-info-offcanvas.php new file mode 100644 index 0000000..24a6987 --- /dev/null +++ b/root/parts/client-info-offcanvas.php @@ -0,0 +1,24 @@ + + + diff --git a/root/parts/off-canvas-menu.php b/root/parts/off-canvas-menu.php index 82fba5c..c9f9451 100644 --- a/root/parts/off-canvas-menu.php +++ b/root/parts/off-canvas-menu.php @@ -1,3 +1,4 @@ diff --git a/template.js b/template.js index 80b0be5..a0e685c 100644 --- a/template.js +++ b/template.js @@ -1,11 +1,3 @@ -/*** - * Excerpted from "Automate with Grunt", - * published by The Pragmatic Bookshelf. - * Copyrights apply to this code. It may not be used to create training material, - * courses, books, articles, and the like. Contact us if you are in doubt. - * We make no guarantees that this code is fit for any purpose. - * Visit http://www.pragmaticprogrammer.com/titles/bhgrunt for more book information. -***/ exports.description = 'Creates Foundation template with SASS'; exports.notes = 'This project includes a default JavaScript and CSS file'; @@ -15,21 +7,15 @@ exports.warnOn = '*'; exports.template = function(grunt, init, done) { init.process({}, [ // input prompts go here - + // Prompt for these values. init.prompt('name' , 'ProjectNameNoSpaces'), - init.prompt('title', 'Site Name'), - init.prompt('street', 'Street'), - init.prompt('city', 'City'), - init.prompt('state', 'State'), - init.prompt('zip', 'ZIP'), - init.prompt('phone', 'Phone Number'), ], function(err, props) { // processing section var files = init.filesToCopy(props); - init.copyAndProcess(files, props); - + init.copyAndProcess(files, props); + init.writePackageJSON('package.json', { name: props.name, description: "Gaslight Media",