Skip to content

Commit fde31ab

Browse files
committed
Merge pull request #16 from ThatGerber/chris-dev
Repo Cleanup
2 parents c83e1f5 + 11e7f35 commit fde31ab

19 files changed

+29
-62
lines changed

.jshintrc

+4-9
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,6 @@
33
"passfail" : false, // Stop on first error.
44
"maxerr" : 100, // Maximum error before stopping.
55

6-
76
// Predefined globals whom JSHint will ignore.
87
"browser" : true, // Standard browser globals e.g. `window`, `document`.
98

@@ -13,15 +12,11 @@
1312
"wsh" : true, // Windows Scripting Host.
1413

1514
"jquery" : true,
16-
"ender" : true,
17-
"prototypejs" : false,
18-
"mootools" : false,
19-
"dojo" : false,
2015

21-
"predef" : [ // Custom globals.
22-
//"exampleVar",
23-
//"anotherCoolGlobal",
24-
//"iLoveDouglas"
16+
// Custom globals.
17+
"predef" : [
18+
"googletag",
19+
"dfp_ad_object"
2520
],
2621

2722

assets/js/dfp-ads.js

+10-10
Original file line numberDiff line numberDiff line change
@@ -20,16 +20,6 @@ googletag.cmd.push(function() {
2020
define_ad_slot(positions[ad_pos]);
2121
}
2222
}
23-
// Generates Ad Slots
24-
load_ad_positions(dfp_ad_data.positions);
25-
// Collapse Empty Divs
26-
googletag.pubads().collapseEmptyDivs(true);
27-
// Targeting
28-
set_targeting(dfp_ad_data.page_targeting);
29-
// Asynchronous Loading
30-
googletag.pubads().enableAsyncRendering();
31-
// Go
32-
googletag.enableServices();
3323
/**
3424
* Loads Ad Position
3525
*
@@ -58,4 +48,14 @@ googletag.cmd.push(function() {
5848
googletag.pubads().setTargeting(key, targeting[target]);
5949
}
6050
}
51+
// Generates Ad Slots
52+
load_ad_positions(dfp_ad_data.positions);
53+
// Collapse Empty Divs
54+
googletag.pubads().collapseEmptyDivs(true);
55+
// Targeting
56+
set_targeting(dfp_ad_data.page_targeting);
57+
// Asynchronous Loading
58+
googletag.pubads().enableAsyncRendering();
59+
// Go
60+
googletag.enableServices();
6161
});

assets/js/google-ads.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ googletag.cmd = googletag.cmd || [];
77
var gads = document.createElement('script');
88
gads.async = true;
99
gads.type = 'text/javascript';
10-
var useSSL = 'https:' == document.location.protocol;
10+
var useSSL = 'https:' === document.location.protocol;
1111
gads.src = (useSSL ? 'https:' : 'http:') +
1212
'//www.googletagservices.com/tag/js/gpt.js';
1313
var node = document.getElementsByTagName('script')[0];

assets/js/google-ads.min.js

+1-1
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

build/wordpress-files.txt

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
index.php
22
plugin.php
33
readme.txt
4-
js/
5-
src/
4+
assets/
5+
includes/
66
widget/

build/wordpress_build.sh

+1-7
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ cd $BUILD/../;
1313
###
1414
# Move vendor files to lib folder
1515
###
16-
rsync -vah --exclude ".*/" vendor/ "$REPO_DIR/lib"
16+
rsync -vah --exclude ".*/" vendor/ "$REPO_DIR/vendor"
1717

1818
###
1919
# Make directory of files to import
@@ -26,12 +26,6 @@ rsync -hav --exclude ".*/" --files-from=build/wordpress-files.txt . "$REPO_DIR/"
2626
echo "Updating version to $VERSION";
2727
sed -i '' "s|\* Version: *.*.*|\* Version: $VERSION|" "$REPO_DIR/plugin.php"
2828

29-
###
30-
# Change autoload
31-
###
32-
echo "Changing location of autoload";
33-
sed -i '' "s|require_once 'vendor/autoload.php'|require_once 'lib/autoload.php'|" "$REPO_DIR/plugin.php"
34-
3529
###
3630
# Updating Repo
3731
###

gulpfile.js

+1-14
Original file line numberDiff line numberDiff line change
@@ -5,24 +5,11 @@
55

66
var gulp = require( 'gulp' ),
77
plumber = require( 'gulp-plumber' ),
8-
watch = require( 'gulp-watch' ),
9-
livereload = require( 'gulp-livereload' ),
10-
minifycss = require( 'gulp-minify-css' ),
118
concat = require('gulp-concat'),
129
jshint = require( 'gulp-jshint' ),
13-
notify = require( 'gulp-notify' ),
14-
include = require( 'gulp-include' ),
15-
autoprefixer = require('gulp-autoprefixer'),
16-
imagemin = require('gulp-imagemin'),
1710
stylish = require( 'jshint-stylish' ),
1811
uglify = require( 'gulp-uglify' ),
19-
rename = require( 'gulp-rename' ),
20-
sass = require( 'gulp-sass' );
21-
22-
var onError = function( err ) {
23-
console.log( 'An error occurred:', err.message );
24-
this.emit( 'end' );
25-
};
12+
rename = require( 'gulp-rename' );
2613

2714
// Lint Task
2815
gulp.task('lint', function() {
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.

index.php

-1
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,2 @@
11
<?php
2-
32
// Silence is Golden...

package.json

-8
Original file line numberDiff line numberDiff line change
@@ -7,23 +7,15 @@
77
"test": "tests"
88
},
99
"dependencies": {
10-
"gulp-autoprefixer": "^2.3.1",
1110
"del": "^1.2.0",
1211
"gulp": "^3.9.0",
1312
"gulp-cache": "^0.2.10",
14-
"gulp-imagemin": "^2.3.0",
1513
"gulp-concat": "^2.6.0",
1614
"gulp-jshint": "^1.11.1",
1715
"gulp-include": "^1.1.1",
18-
"gulp-livereload": "^3.8.0",
19-
"gulp-minify-css": "^1.2.0",
20-
"gulp-notify": "^2.2.0",
2116
"gulp-plumber": "^1.0.1",
22-
"gulp-sass": "^2.0.3",
2317
"gulp-rename": "^1.2.2",
24-
"gulp-ruby-sass": "^1.0.5",
2518
"gulp-uglify": "^1.2.0",
26-
"gulp-watch": "^4.2.4",
2719
"jshint-stylish": "^2.0.1"
2820
},
2921
"devDependencies": {},

plugin.php

+9-9
Original file line numberDiff line numberDiff line change
@@ -27,15 +27,15 @@
2727
require_once 'vendor/autoload.php';
2828

2929
/* Library */
30-
include( 'src/helper_functions.php' );
31-
include( 'src/abstract.dfp_ads_form.php' );
32-
include( 'src/class.dfp_ads.php' );
33-
include( 'src/class.dfp_ads_post_type.php' );
34-
include( 'src/class.dfp_ads_input.php' );
35-
include( 'src/class.dfp_ad_position.php' );
36-
include( 'src/class.dfp_ads_settings_form.php' );
37-
include( 'src/class.dfp_ads_import_form.php' );
38-
include( 'src/class.dfp_ads_admin.php' );
30+
include( 'includes/helper_functions.php' );
31+
include( 'includes/abstract.dfp_ads_form.php' );
32+
include( 'includes/class.dfp_ads.php' );
33+
include( 'includes/class.dfp_ads_post_type.php' );
34+
include( 'includes/class.dfp_ads_input.php' );
35+
include( 'includes/class.dfp_ad_position.php' );
36+
include( 'includes/class.dfp_ads_settings_form.php' );
37+
include( 'includes/class.dfp_ads_import_form.php' );
38+
include( 'includes/class.dfp_ads_admin.php' );
3939
include( 'widget/widget.ad_position.php' );
4040

4141
/*

0 commit comments

Comments
 (0)