From fcf54bb2a5c40b1374868eec64a9ae966da646fb Mon Sep 17 00:00:00 2001 From: Laury GvR Date: Mon, 26 Jan 2015 14:02:47 -0500 Subject: [PATCH] Gruntfile updates, searchFilter isset check, wordpress styles, cleaner glmPhotos template --- Gruntfile.js | 21 ++++-- functions.php | 8 ++- nggallery/gallery-glmphotos.php | 20 +----- scss/app.scss | 1 + scss/site/_structure.scss | 18 +++++ scss/site/_wordpress.scss | 124 ++++++++++++++++++++++++++++++++ 6 files changed, 163 insertions(+), 29 deletions(-) create mode 100644 scss/site/_wordpress.scss diff --git a/Gruntfile.js b/Gruntfile.js index 997e4d3..753734c 100644 --- a/Gruntfile.js +++ b/Gruntfile.js @@ -12,7 +12,7 @@ module.exports = function(grunt) { }, files: { 'css/app.css': 'scss/app.scss' - } + } } }, @@ -46,8 +46,9 @@ module.exports = function(grunt) { }, dist: { src: [ + 'js/dollarsign.js', 'js/foundation/js/foundation.min.js', - 'js/custom/*.js' + 'js/custom/*.js', ], dest: 'js/app.js' @@ -59,9 +60,15 @@ module.exports = function(grunt) { grunt: { files: ['Gruntfile.js'] }, sass: { - files: 'scss/**/*.scss', + files: 'scss/**/*.{scss,sass}', tasks: ['sass'] + }, + + scripts: { + files: ['js/custom/*.js'], + tasks: ['concat', 'uglify'] } + } }); @@ -71,7 +78,7 @@ module.exports = function(grunt) { grunt.loadNpmTasks('grunt-contrib-copy'); grunt.loadNpmTasks('grunt-contrib-uglify'); - grunt.registerTask('build', ['sass']); - grunt.registerTask('default', ['copy', 'uglify', 'concat', 'watch']); - -} \ No newline at end of file + grunt.registerTask('build', ['sass', 'copy', 'uglify', 'concat']); + grunt.registerTask('runwatch', ['sass','uglify', 'concat']); + grunt.registerTask('default', ['runwatch','watch']); +} diff --git a/functions.php b/functions.php index a0a78a5..c875b8d 100644 --- a/functions.php +++ b/functions.php @@ -44,9 +44,11 @@ function add_excerpts_to_pages() { } function SearchFilter($query) { - $searchType = $_GET["searchType"]; - if ($searchType == 'blog') { - $query->set('post_type', 'post'); + if(isset($_GET['search-type'])) { + $searchType = $_GET['searchType']; + if ($searchType == 'blog' && !is_admin()) { + $query->set('post_type', 'post'); + } } return $query; } diff --git a/nggallery/gallery-glmphotos.php b/nggallery/gallery-glmphotos.php index 122942b..8170730 100644 --- a/nggallery/gallery-glmphotos.php +++ b/nggallery/gallery-glmphotos.php @@ -15,28 +15,10 @@ Follow variables are useable :