Version Description
- 01.25.2017 =
- New - Design tweaks.
- Fix - Thumbnails when displaying next/prev products from the same category.
- Fix - Don't display hidden products in next/prev links.
Download this release
Release Info
Developer | jameskoster |
Plugin | Storefront Product Pagination |
Version | 1.2.0 |
Comparing to | |
See all releases |
Code changes from version 1.1.3 to 1.2.0
- assets/css/style.css +74 -25
- assets/css/style.scss +52 -21
- config.codekit +0 -933
- readme.txt +7 -2
- storefront-product-pagination.php +71 -41
assets/css/style.css
CHANGED
@@ -16,48 +16,97 @@
|
|
16 |
position: absolute !important; }
|
17 |
.storefront-single-product-pagination a {
|
18 |
display: block;
|
19 |
-
width:
|
20 |
position: fixed;
|
21 |
float: none;
|
22 |
-
background-color: #
|
23 |
-
|
24 |
-
|
25 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
26 |
.storefront-single-product-pagination a img {
|
27 |
-
width:
|
28 |
-
|
29 |
-
-webkit-transition: all 0.5s ease;
|
30 |
-
-moz-transition: all 0.5s ease;
|
31 |
-
transition: all 0.5s ease; }
|
32 |
-
.storefront-single-product-pagination a:hover img {
|
33 |
-
opacity: 1; }
|
34 |
.storefront-single-product-pagination a .title {
|
35 |
-
width:
|
36 |
.storefront-single-product-pagination a[rel="prev"] {
|
37 |
-
left: -
|
38 |
border-left: 0;
|
39 |
-
-webkit-transition: left 0.
|
40 |
-
-moz-transition: left 0.
|
41 |
-
transition: left 0.
|
42 |
.storefront-single-product-pagination a[rel="prev"] img {
|
43 |
float: right;
|
44 |
margin-left: 1em; }
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
45 |
.storefront-single-product-pagination a[rel="prev"]:hover {
|
46 |
left: 0; }
|
47 |
.storefront-single-product-pagination a[rel="prev"] .title {
|
48 |
-
|
49 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
50 |
.storefront-single-product-pagination a[rel="next"] {
|
51 |
-
right: -
|
52 |
border-right: 0;
|
53 |
-
-webkit-transition: right 0.
|
54 |
-
-moz-transition: right 0.
|
55 |
-
transition: right 0.
|
56 |
.storefront-single-product-pagination a[rel="next"] img {
|
57 |
float: left;
|
58 |
margin-right: 1em; }
|
59 |
.storefront-single-product-pagination a[rel="next"]:hover {
|
60 |
right: 0; }
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
61 |
.storefront-single-product-pagination a[rel="next"] .title {
|
62 |
-
|
63 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
16 |
position: absolute !important; }
|
17 |
.storefront-single-product-pagination a {
|
18 |
display: block;
|
19 |
+
width: 500px;
|
20 |
position: fixed;
|
21 |
float: none;
|
22 |
+
background-color: #ffffff;
|
23 |
+
top: 50%;
|
24 |
+
z-index: 999999;
|
25 |
+
box-shadow: 0 0 1em rgba(0, 0, 0, 0.1);
|
26 |
+
-webkit-transform: translateY(-50%);
|
27 |
+
-moz-transform: translateY(-50%);
|
28 |
+
-ms-transform: translateY(-50%);
|
29 |
+
-o-transform: translateY(-50%);
|
30 |
+
transform: translateY(-50%);
|
31 |
+
line-height: 1.2;
|
32 |
+
overflow: hidden; }
|
33 |
.storefront-single-product-pagination a img {
|
34 |
+
width: 90px;
|
35 |
+
border-radius: 0; }
|
|
|
|
|
|
|
|
|
|
|
36 |
.storefront-single-product-pagination a .title {
|
37 |
+
width: 340px; }
|
38 |
.storefront-single-product-pagination a[rel="prev"] {
|
39 |
+
left: -455px;
|
40 |
border-left: 0;
|
41 |
+
-webkit-transition: left 0.3s ease-out;
|
42 |
+
-moz-transition: left 0.3s ease-out;
|
43 |
+
transition: left 0.3s ease-out; }
|
44 |
.storefront-single-product-pagination a[rel="prev"] img {
|
45 |
float: right;
|
46 |
margin-left: 1em; }
|
47 |
+
.storefront-single-product-pagination a[rel="prev"]:before {
|
48 |
+
display: block;
|
49 |
+
font-family: 'FontAwesome';
|
50 |
+
content: "\f104";
|
51 |
+
position: absolute;
|
52 |
+
top: 50%;
|
53 |
+
left: 1em;
|
54 |
+
height: 1em;
|
55 |
+
width: 1em;
|
56 |
+
-webkit-transform: translateY(-50%);
|
57 |
+
-moz-transform: translateY(-50%);
|
58 |
+
-ms-transform: translateY(-50%);
|
59 |
+
-o-transform: translateY(-50%);
|
60 |
+
transform: translateY(-50%);
|
61 |
+
line-height: 1;
|
62 |
+
text-align: center; }
|
63 |
.storefront-single-product-pagination a[rel="prev"]:hover {
|
64 |
left: 0; }
|
65 |
.storefront-single-product-pagination a[rel="prev"] .title {
|
66 |
+
display: block;
|
67 |
+
position: absolute;
|
68 |
+
right: 110px;
|
69 |
+
top: 50%;
|
70 |
+
-webkit-transform: translateY(-50%);
|
71 |
+
-moz-transform: translateY(-50%);
|
72 |
+
-ms-transform: translateY(-50%);
|
73 |
+
-o-transform: translateY(-50%);
|
74 |
+
transform: translateY(-50%); }
|
75 |
.storefront-single-product-pagination a[rel="next"] {
|
76 |
+
right: -455px;
|
77 |
border-right: 0;
|
78 |
+
-webkit-transition: right 0.3s ease-in;
|
79 |
+
-moz-transition: right 0.3s ease-in;
|
80 |
+
transition: right 0.3s ease-in; }
|
81 |
.storefront-single-product-pagination a[rel="next"] img {
|
82 |
float: left;
|
83 |
margin-right: 1em; }
|
84 |
.storefront-single-product-pagination a[rel="next"]:hover {
|
85 |
right: 0; }
|
86 |
+
.storefront-single-product-pagination a[rel="next"]:after {
|
87 |
+
display: block;
|
88 |
+
font-family: 'FontAwesome';
|
89 |
+
content: "\f105";
|
90 |
+
position: absolute;
|
91 |
+
top: 50%;
|
92 |
+
right: 1em;
|
93 |
+
height: 1em;
|
94 |
+
width: 1em;
|
95 |
+
-webkit-transform: translateY(-50%);
|
96 |
+
-moz-transform: translateY(-50%);
|
97 |
+
-ms-transform: translateY(-50%);
|
98 |
+
-o-transform: translateY(-50%);
|
99 |
+
transform: translateY(-50%);
|
100 |
+
line-height: 1;
|
101 |
+
text-align: center; }
|
102 |
.storefront-single-product-pagination a[rel="next"] .title {
|
103 |
+
display: block;
|
104 |
+
position: absolute;
|
105 |
+
left: 110px;
|
106 |
+
top: 50%;
|
107 |
+
-webkit-transform: translateY(-50%);
|
108 |
+
-moz-transform: translateY(-50%);
|
109 |
+
-ms-transform: translateY(-50%);
|
110 |
+
-o-transform: translateY(-50%);
|
111 |
+
transform: translateY(-50%);
|
112 |
+
text-align: right; } }
|
assets/css/style.scss
CHANGED
@@ -1,7 +1,7 @@
|
|
1 |
@import 'susy';
|
2 |
@import 'bourbon';
|
3 |
-
@import '../../../../themes/storefront/sass/utils/variables';
|
4 |
-
@import '../../../../themes/storefront/sass/utils/mixins';
|
5 |
|
6 |
// Styles for mobile
|
7 |
.storefront-single-product-pagination {
|
@@ -31,54 +31,67 @@
|
|
31 |
|
32 |
a {
|
33 |
display: block;
|
34 |
-
width:
|
35 |
position: fixed;
|
36 |
float: none;
|
37 |
background-color: $body-background;
|
38 |
-
|
39 |
-
top: 45%;
|
40 |
z-index: 999999;
|
|
|
|
|
|
|
|
|
41 |
|
42 |
img {
|
43 |
-
width:
|
44 |
-
|
45 |
-
@include transition(all .5s ease);
|
46 |
-
}
|
47 |
-
|
48 |
-
&:hover {
|
49 |
-
img {
|
50 |
-
opacity: 1;
|
51 |
-
}
|
52 |
}
|
53 |
|
54 |
.title {
|
55 |
-
width:
|
56 |
}
|
57 |
|
58 |
&[rel="prev"] {
|
59 |
-
left: -
|
60 |
border-left: 0;
|
61 |
-
@include transition(left .
|
62 |
|
63 |
img {
|
64 |
float: right;
|
65 |
margin-left: 1em;
|
66 |
}
|
67 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
68 |
&:hover {
|
69 |
left: 0;
|
70 |
}
|
71 |
|
72 |
.title {
|
73 |
-
float: left;
|
74 |
display: block;
|
|
|
|
|
|
|
|
|
75 |
}
|
76 |
}
|
77 |
|
78 |
&[rel="next"] {
|
79 |
-
right: -
|
80 |
border-right: 0;
|
81 |
-
@include transition(right .
|
82 |
|
83 |
img {
|
84 |
float: left;
|
@@ -89,9 +102,27 @@
|
|
89 |
right: 0;
|
90 |
}
|
91 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
92 |
.title {
|
93 |
-
float: right;
|
94 |
display: block;
|
|
|
|
|
|
|
|
|
|
|
95 |
}
|
96 |
}
|
97 |
}
|
1 |
@import 'susy';
|
2 |
@import 'bourbon';
|
3 |
+
@import '../../../../themes/storefront/assets/sass/utils/variables';
|
4 |
+
@import '../../../../themes/storefront/assets/sass/utils/mixins';
|
5 |
|
6 |
// Styles for mobile
|
7 |
.storefront-single-product-pagination {
|
31 |
|
32 |
a {
|
33 |
display: block;
|
34 |
+
width: 500px;
|
35 |
position: fixed;
|
36 |
float: none;
|
37 |
background-color: $body-background;
|
38 |
+
top: 50%;
|
|
|
39 |
z-index: 999999;
|
40 |
+
box-shadow: 0 0 1em rgba(0,0,0,.1);
|
41 |
+
@include transform(translateY(-50%));
|
42 |
+
line-height: 1.2;
|
43 |
+
overflow: hidden;
|
44 |
|
45 |
img {
|
46 |
+
width: 90px;
|
47 |
+
border-radius: 0;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
48 |
}
|
49 |
|
50 |
.title {
|
51 |
+
width: 340px;
|
52 |
}
|
53 |
|
54 |
&[rel="prev"] {
|
55 |
+
left: -455px;
|
56 |
border-left: 0;
|
57 |
+
@include transition(left .3s ease-out);
|
58 |
|
59 |
img {
|
60 |
float: right;
|
61 |
margin-left: 1em;
|
62 |
}
|
63 |
|
64 |
+
&:before {
|
65 |
+
display: block;
|
66 |
+
font-family: 'FontAwesome';
|
67 |
+
content: "\f104";
|
68 |
+
position: absolute;
|
69 |
+
top: 50%;
|
70 |
+
left: 1em;
|
71 |
+
height: 1em;
|
72 |
+
width: 1em;
|
73 |
+
@include transform(translateY(-50%));
|
74 |
+
line-height: 1;
|
75 |
+
text-align: center;
|
76 |
+
}
|
77 |
+
|
78 |
&:hover {
|
79 |
left: 0;
|
80 |
}
|
81 |
|
82 |
.title {
|
|
|
83 |
display: block;
|
84 |
+
position: absolute;
|
85 |
+
right: 110px;
|
86 |
+
top: 50%;
|
87 |
+
@include transform(translateY(-50%));
|
88 |
}
|
89 |
}
|
90 |
|
91 |
&[rel="next"] {
|
92 |
+
right: -455px;
|
93 |
border-right: 0;
|
94 |
+
@include transition(right .3s ease-in);
|
95 |
|
96 |
img {
|
97 |
float: left;
|
102 |
right: 0;
|
103 |
}
|
104 |
|
105 |
+
&:after {
|
106 |
+
display: block;
|
107 |
+
font-family: 'FontAwesome';
|
108 |
+
content: "\f105";
|
109 |
+
position: absolute;
|
110 |
+
top: 50%;
|
111 |
+
right: 1em;
|
112 |
+
height: 1em;
|
113 |
+
width: 1em;
|
114 |
+
@include transform(translateY(-50%));
|
115 |
+
line-height: 1;
|
116 |
+
text-align: center;
|
117 |
+
}
|
118 |
+
|
119 |
.title {
|
|
|
120 |
display: block;
|
121 |
+
position: absolute;
|
122 |
+
left: 110px;
|
123 |
+
top: 50%;
|
124 |
+
@include transform(translateY(-50%));
|
125 |
+
text-align: right;
|
126 |
}
|
127 |
}
|
128 |
}
|
config.codekit
DELETED
@@ -1,933 +0,0 @@
|
|
1 |
-
{
|
2 |
-
"CodeKitInfo": "This is a CodeKit 2.x project configuration file. It is designed to sync project settings across multiple machines. MODIFYING THE CONTENTS OF THIS FILE IS A POOR LIFE DECISION. If you do so, you will likely cause CodeKit to crash. This file is not useful unless accompanied by the project that created it in CodeKit 2. This file is not backwards-compatible with CodeKit 1.x. For more information, see: http:\/\/incident57.com\/codekit",
|
3 |
-
"creatorBuild": "19022",
|
4 |
-
"files": {
|
5 |
-
"\/assets\/css\/style.css": {
|
6 |
-
"fileType": 16,
|
7 |
-
"ignore": 1,
|
8 |
-
"ignoreWasSetByUser": 0,
|
9 |
-
"inputAbbreviatedPath": "\/assets\/css\/style.css",
|
10 |
-
"outputAbbreviatedPath": "No Output Path",
|
11 |
-
"outputPathIsOutsideProject": 0,
|
12 |
-
"outputPathIsSetByUser": 0
|
13 |
-
},
|
14 |
-
"\/assets\/css\/style.scss": {
|
15 |
-
"createSourceMap": 0,
|
16 |
-
"debugStyle": 0,
|
17 |
-
"decimalPrecision": 10,
|
18 |
-
"fileType": 4,
|
19 |
-
"ignore": 0,
|
20 |
-
"ignoreWasSetByUser": 0,
|
21 |
-
"inputAbbreviatedPath": "\/assets\/css\/style.scss",
|
22 |
-
"outputAbbreviatedPath": "\/assets\/css\/style.css",
|
23 |
-
"outputPathIsOutsideProject": 0,
|
24 |
-
"outputPathIsSetByUser": 0,
|
25 |
-
"outputStyle": 0,
|
26 |
-
"shouldRunAutoprefixer": 0,
|
27 |
-
"shouldRunBless": 0,
|
28 |
-
"useLibsass": 0
|
29 |
-
},
|
30 |
-
"\/assets\/js\/customizer.js": {
|
31 |
-
"fileType": 64,
|
32 |
-
"ignore": 0,
|
33 |
-
"ignoreWasSetByUser": 0,
|
34 |
-
"inputAbbreviatedPath": "\/assets\/js\/customizer.js",
|
35 |
-
"outputAbbreviatedPath": "\/assets\/js\/customizer.min.js",
|
36 |
-
"outputPathIsOutsideProject": 0,
|
37 |
-
"outputPathIsSetByUser": 1,
|
38 |
-
"outputStyle": 1,
|
39 |
-
"syntaxCheckerStyle": 1
|
40 |
-
},
|
41 |
-
"\/assets\/js\/customizer.min.js": {
|
42 |
-
"fileType": 64,
|
43 |
-
"ignore": 1,
|
44 |
-
"ignoreWasSetByUser": 0,
|
45 |
-
"inputAbbreviatedPath": "\/assets\/js\/customizer.min.js",
|
46 |
-
"outputAbbreviatedPath": "\/assets\/js\/min\/customizer.min-min.js",
|
47 |
-
"outputPathIsOutsideProject": 0,
|
48 |
-
"outputPathIsSetByUser": 0,
|
49 |
-
"outputStyle": 1,
|
50 |
-
"syntaxCheckerStyle": 1
|
51 |
-
},
|
52 |
-
"\/index.php": {
|
53 |
-
"fileType": 8192,
|
54 |
-
"ignore": 0,
|
55 |
-
"ignoreWasSetByUser": 0,
|
56 |
-
"inputAbbreviatedPath": "\/index.php",
|
57 |
-
"outputAbbreviatedPath": "No Output Path",
|
58 |
-
"outputPathIsOutsideProject": 0,
|
59 |
-
"outputPathIsSetByUser": 0
|
60 |
-
},
|
61 |
-
"\/storefront-product-pagination.php": {
|
62 |
-
"fileType": 8192,
|
63 |
-
"ignore": 0,
|
64 |
-
"ignoreWasSetByUser": 0,
|
65 |
-
"inputAbbreviatedPath": "\/storefront-product-pagination.php",
|
66 |
-
"outputAbbreviatedPath": "No Output Path",
|
67 |
-
"outputPathIsOutsideProject": 0,
|
68 |
-
"outputPathIsSetByUser": 0
|
69 |
-
}
|
70 |
-
},
|
71 |
-
"hooks": [
|
72 |
-
],
|
73 |
-
"lastSavedByUser": "James Koster",
|
74 |
-
"manualImportLinks": {
|
75 |
-
},
|
76 |
-
"projectAttributes": {
|
77 |
-
"bowerAbbreviatedPath": "",
|
78 |
-
"displayValue": "storefront-product-pagination",
|
79 |
-
"displayValueWasSetByUser": 0,
|
80 |
-
"iconImageName": "harddrive_orange"
|
81 |
-
},
|
82 |
-
"projectSettings": {
|
83 |
-
"alwaysUseExternalServer": 0,
|
84 |
-
"animateCSSInjections": 1,
|
85 |
-
"autoApplyPSLanguageSettingsStyle": 0,
|
86 |
-
"autoprefixerBrowserString": "> 1%, last 2 versions, Firefox ESR, Opera 12.1",
|
87 |
-
"autoSyncProjectSettingsFile": 1,
|
88 |
-
"browserRefreshDelay": 0,
|
89 |
-
"coffeeAutoOutputPathEnabled": 1,
|
90 |
-
"coffeeAutoOutputPathFilenamePattern": "*.js",
|
91 |
-
"coffeeAutoOutputPathRelativePath": "",
|
92 |
-
"coffeeAutoOutputPathReplace1": "",
|
93 |
-
"coffeeAutoOutputPathReplace2": "",
|
94 |
-
"coffeeAutoOutputPathStyle": 0,
|
95 |
-
"coffeeCreateSourceMap": 0,
|
96 |
-
"coffeeLintFlags2": {
|
97 |
-
"arrow_spacing": {
|
98 |
-
"active": 0,
|
99 |
-
"flagValue": -1
|
100 |
-
},
|
101 |
-
"camel_case_classes": {
|
102 |
-
"active": 1,
|
103 |
-
"flagValue": -1
|
104 |
-
},
|
105 |
-
"colon_assignment_spacing": {
|
106 |
-
"active": 0,
|
107 |
-
"flagValue": 1
|
108 |
-
},
|
109 |
-
"cyclomatic_complexity": {
|
110 |
-
"active": 0,
|
111 |
-
"flagValue": 10
|
112 |
-
},
|
113 |
-
"duplicate_key": {
|
114 |
-
"active": 1,
|
115 |
-
"flagValue": -1
|
116 |
-
},
|
117 |
-
"empty_constructor_needs_parens": {
|
118 |
-
"active": 0,
|
119 |
-
"flagValue": -1
|
120 |
-
},
|
121 |
-
"ensure_comprehensions": {
|
122 |
-
"active": 1,
|
123 |
-
"flagValue": -1
|
124 |
-
},
|
125 |
-
"indentation": {
|
126 |
-
"active": 1,
|
127 |
-
"flagValue": 2
|
128 |
-
},
|
129 |
-
"line_endings": {
|
130 |
-
"active": 0,
|
131 |
-
"flagValue": 0
|
132 |
-
},
|
133 |
-
"max_line_length": {
|
134 |
-
"active": 0,
|
135 |
-
"flagValue": 150
|
136 |
-
},
|
137 |
-
"missing_fat_arrows": {
|
138 |
-
"active": 0,
|
139 |
-
"flagValue": -1
|
140 |
-
},
|
141 |
-
"newlines_after_classes": {
|
142 |
-
"active": 0,
|
143 |
-
"flagValue": 3
|
144 |
-
},
|
145 |
-
"no_backticks": {
|
146 |
-
"active": 1,
|
147 |
-
"flagValue": -1
|
148 |
-
},
|
149 |
-
"no_debugger": {
|
150 |
-
"active": 1,
|
151 |
-
"flagValue": -1
|
152 |
-
},
|
153 |
-
"no_empty_functions": {
|
154 |
-
"active": 0,
|
155 |
-
"flagValue": -1
|
156 |
-
},
|
157 |
-
"no_empty_param_list": {
|
158 |
-
"active": 0,
|
159 |
-
"flagValue": -1
|
160 |
-
},
|
161 |
-
"no_implicit_braces": {
|
162 |
-
"active": 1,
|
163 |
-
"flagValue": -1
|
164 |
-
},
|
165 |
-
"no_implicit_parens": {
|
166 |
-
"active": 0,
|
167 |
-
"flagValue": -1
|
168 |
-
},
|
169 |
-
"no_interpolation_in_single_quotes": {
|
170 |
-
"active": 0,
|
171 |
-
"flagValue": -1
|
172 |
-
},
|
173 |
-
"no_plusplus": {
|
174 |
-
"active": 0,
|
175 |
-
"flagValue": -1
|
176 |
-
},
|
177 |
-
"no_stand_alone_at": {
|
178 |
-
"active": 1,
|
179 |
-
"flagValue": -1
|
180 |
-
},
|
181 |
-
"no_tabs": {
|
182 |
-
"active": 1,
|
183 |
-
"flagValue": -1
|
184 |
-
},
|
185 |
-
"no_throwing_strings": {
|
186 |
-
"active": 1,
|
187 |
-
"flagValue": -1
|
188 |
-
},
|
189 |
-
"no_trailing_semicolons": {
|
190 |
-
"active": 1,
|
191 |
-
"flagValue": -1
|
192 |
-
},
|
193 |
-
"no_trailing_whitespace": {
|
194 |
-
"active": 1,
|
195 |
-
"flagValue": -1
|
196 |
-
},
|
197 |
-
"no_unnecessary_double_quotes": {
|
198 |
-
"active": 0,
|
199 |
-
"flagValue": -1
|
200 |
-
},
|
201 |
-
"no_unnecessary_fat_arrows": {
|
202 |
-
"active": 1,
|
203 |
-
"flagValue": -1
|
204 |
-
},
|
205 |
-
"non_empty_constructor_needs_parens": {
|
206 |
-
"active": 0,
|
207 |
-
"flagValue": -1
|
208 |
-
},
|
209 |
-
"prefer_english_operator": {
|
210 |
-
"active": 0,
|
211 |
-
"flagValue": -1
|
212 |
-
},
|
213 |
-
"space_operators": {
|
214 |
-
"active": 0,
|
215 |
-
"flagValue": -1
|
216 |
-
},
|
217 |
-
"spacing_after_comma": {
|
218 |
-
"active": 1,
|
219 |
-
"flagValue": -1
|
220 |
-
}
|
221 |
-
},
|
222 |
-
"coffeeMinifyOutput": 1,
|
223 |
-
"coffeeOutputStyle": 0,
|
224 |
-
"coffeeSyntaxCheckerStyle": 1,
|
225 |
-
"externalServerAddress": "http:\/\/localhost:8888",
|
226 |
-
"externalServerPreviewPathAddition": "",
|
227 |
-
"genericWebpageFileExtensionsString": "html, htm, shtml, shtm, xhtml, php, jsp, asp, aspx, erb, ctp",
|
228 |
-
"hamlAutoOutputPathEnabled": 1,
|
229 |
-
"hamlAutoOutputPathFilenamePattern": "*.html",
|
230 |
-
"hamlAutoOutputPathRelativePath": "",
|
231 |
-
"hamlAutoOutputPathReplace1": "",
|
232 |
-
"hamlAutoOutputPathReplace2": "",
|
233 |
-
"hamlAutoOutputPathStyle": 0,
|
234 |
-
"hamlEscapeHTMLCharacters": 0,
|
235 |
-
"hamlNoEscapeInAttributes": 0,
|
236 |
-
"hamlOutputFormat": 2,
|
237 |
-
"hamlOutputStyle": 0,
|
238 |
-
"hamlUseCDATA": 0,
|
239 |
-
"hamlUseDoubleQuotes": 0,
|
240 |
-
"hamlUseUnixNewlines": 0,
|
241 |
-
"jadeAutoOutputPathEnabled": 1,
|
242 |
-
"jadeAutoOutputPathFilenamePattern": "*.html",
|
243 |
-
"jadeAutoOutputPathRelativePath": "",
|
244 |
-
"jadeAutoOutputPathReplace1": "",
|
245 |
-
"jadeAutoOutputPathReplace2": "",
|
246 |
-
"jadeAutoOutputPathStyle": 0,
|
247 |
-
"jadeCompileDebug": 1,
|
248 |
-
"jadeOutputStyle": 0,
|
249 |
-
"javascriptAutoOutputPathEnabled": 1,
|
250 |
-
"javascriptAutoOutputPathFilenamePattern": "*-min.js",
|
251 |
-
"javascriptAutoOutputPathRelativePath": "\/min",
|
252 |
-
"javascriptAutoOutputPathReplace1": "",
|
253 |
-
"javascriptAutoOutputPathReplace2": "",
|
254 |
-
"javascriptAutoOutputPathStyle": 2,
|
255 |
-
"javascriptCreateSourceMap": 1,
|
256 |
-
"javascriptOutputStyle": 1,
|
257 |
-
"javascriptSyntaxCheckerStyle": 1,
|
258 |
-
"jsCheckerReservedNamesString": "",
|
259 |
-
"jsHintFlags2": {
|
260 |
-
"asi": {
|
261 |
-
"active": 0,
|
262 |
-
"flagValue": -1
|
263 |
-
},
|
264 |
-
"bitwise": {
|
265 |
-
"active": 1,
|
266 |
-
"flagValue": -1
|
267 |
-
},
|
268 |
-
"boss": {
|
269 |
-
"active": 0,
|
270 |
-
"flagValue": -1
|
271 |
-
},
|
272 |
-
"browser": {
|
273 |
-
"active": 1,
|
274 |
-
"flagValue": -1
|
275 |
-
},
|
276 |
-
"browserify": {
|
277 |
-
"active": 0,
|
278 |
-
"flagValue": -1
|
279 |
-
},
|
280 |
-
"camelcase": {
|
281 |
-
"active": 0,
|
282 |
-
"flagValue": -1
|
283 |
-
},
|
284 |
-
"couch": {
|
285 |
-
"active": 0,
|
286 |
-
"flagValue": -1
|
287 |
-
},
|
288 |
-
"curly": {
|
289 |
-
"active": 1,
|
290 |
-
"flagValue": -1
|
291 |
-
},
|
292 |
-
"debug": {
|
293 |
-
"active": 0,
|
294 |
-
"flagValue": -1
|
295 |
-
},
|
296 |
-
"devel": {
|
297 |
-
"active": 0,
|
298 |
-
"flagValue": -1
|
299 |
-
},
|
300 |
-
"dojo": {
|
301 |
-
"active": 0,
|
302 |
-
"flagValue": -1
|
303 |
-
},
|
304 |
-
"elision": {
|
305 |
-
"active": 1,
|
306 |
-
"flagValue": -1
|
307 |
-
},
|
308 |
-
"eqeqeq": {
|
309 |
-
"active": 1,
|
310 |
-
"flagValue": -1
|
311 |
-
},
|
312 |
-
"eqnull": {
|
313 |
-
"active": 0,
|
314 |
-
"flagValue": -1
|
315 |
-
},
|
316 |
-
"es3": {
|
317 |
-
"active": 0,
|
318 |
-
"flagValue": -1
|
319 |
-
},
|
320 |
-
"esnext": {
|
321 |
-
"active": 0,
|
322 |
-
"flagValue": -1
|
323 |
-
},
|
324 |
-
"evil": {
|
325 |
-
"active": 0,
|
326 |
-
"flagValue": -1
|
327 |
-
},
|
328 |
-
"expr": {
|
329 |
-
"active": 0,
|
330 |
-
"flagValue": -1
|
331 |
-
},
|
332 |
-
"forin": {
|
333 |
-
"active": 0,
|
334 |
-
"flagValue": -1
|
335 |
-
},
|
336 |
-
"freeze": {
|
337 |
-
"active": 1,
|
338 |
-
"flagValue": -1
|
339 |
-
},
|
340 |
-
"funcscope": {
|
341 |
-
"active": 0,
|
342 |
-
"flagValue": -1
|
343 |
-
},
|
344 |
-
"futurehostile": {
|
345 |
-
"active": 0,
|
346 |
-
"flagValue": -1
|
347 |
-
},
|
348 |
-
"globalstrict": {
|
349 |
-
"active": 0,
|
350 |
-
"flagValue": -1
|
351 |
-
},
|
352 |
-
"immed": {
|
353 |
-
"active": 0,
|
354 |
-
"flagValue": -1
|
355 |
-
},
|
356 |
-
"indent": {
|
357 |
-
"active": 0,
|
358 |
-
"flagValue": 4
|
359 |
-
},
|
360 |
-
"iterator": {
|
361 |
-
"active": 0,
|
362 |
-
"flagValue": -1
|
363 |
-
},
|
364 |
-
"jasmine": {
|
365 |
-
"active": 0,
|
366 |
-
"flagValue": -1
|
367 |
-
},
|
368 |
-
"jquery": {
|
369 |
-
"active": 1,
|
370 |
-
"flagValue": -1
|
371 |
-
},
|
372 |
-
"lastsemic": {
|
373 |
-
"active": 0,
|
374 |
-
"flagValue": -1
|
375 |
-
},
|
376 |
-
"latedef": {
|
377 |
-
"active": 1,
|
378 |
-
"flagValue": -1
|
379 |
-
},
|
380 |
-
"laxbreak": {
|
381 |
-
"active": 0,
|
382 |
-
"flagValue": -1
|
383 |
-
},
|
384 |
-
"laxcomma": {
|
385 |
-
"active": 0,
|
386 |
-
"flagValue": -1
|
387 |
-
},
|
388 |
-
"loopfunc": {
|
389 |
-
"active": 0,
|
390 |
-
"flagValue": -1
|
391 |
-
},
|
392 |
-
"maxcomplexity": {
|
393 |
-
"active": 0,
|
394 |
-
"flagValue": 10
|
395 |
-
},
|
396 |
-
"maxdepth": {
|
397 |
-
"active": 0,
|
398 |
-
"flagValue": 3
|
399 |
-
},
|
400 |
-
"maxlen": {
|
401 |
-
"active": 0,
|
402 |
-
"flagValue": 150
|
403 |
-
},
|
404 |
-
"maxparams": {
|
405 |
-
"active": 0,
|
406 |
-
"flagValue": 3
|
407 |
-
},
|
408 |
-
"maxstatements": {
|
409 |
-
"active": 0,
|
410 |
-
"flagValue": 4
|
411 |
-
},
|
412 |
-
"mocha": {
|
413 |
-
"active": 0,
|
414 |
-
"flagValue": -1
|
415 |
-
},
|
416 |
-
"mootools": {
|
417 |
-
"active": 0,
|
418 |
-
"flagValue": -1
|
419 |
-
},
|
420 |
-
"moz": {
|
421 |
-
"active": 0,
|
422 |
-
"flagValue": -1
|
423 |
-
},
|
424 |
-
"multistr": {
|
425 |
-
"active": 0,
|
426 |
-
"flagValue": -1
|
427 |
-
},
|
428 |
-
"newcap": {
|
429 |
-
"active": 1,
|
430 |
-
"flagValue": -1
|
431 |
-
},
|
432 |
-
"noarg": {
|
433 |
-
"active": 1,
|
434 |
-
"flagValue": -1
|
435 |
-
},
|
436 |
-
"nocomma": {
|
437 |
-
"active": 0,
|
438 |
-
"flagValue": -1
|
439 |
-
},
|
440 |
-
"node": {
|
441 |
-
"active": 0,
|
442 |
-
"flagValue": -1
|
443 |
-
},
|
444 |
-
"noempty": {
|
445 |
-
"active": 0,
|
446 |
-
"flagValue": -1
|
447 |
-
},
|
448 |
-
"nonbsp": {
|
449 |
-
"active": 0,
|
450 |
-
"flagValue": -1
|
451 |
-
},
|
452 |
-
"nonew": {
|
453 |
-
"active": 1,
|
454 |
-
"flagValue": -1
|
455 |
-
},
|
456 |
-
"nonstandard": {
|
457 |
-
"active": 0,
|
458 |
-
"flagValue": -1
|
459 |
-
},
|
460 |
-
"notypeof": {
|
461 |
-
"active": 1,
|
462 |
-
"flagValue": -1
|
463 |
-
},
|
464 |
-
"noyield": {
|
465 |
-
"active": 0,
|
466 |
-
"flagValue": -1
|
467 |
-
},
|
468 |
-
"onecase": {
|
469 |
-
"active": 0,
|
470 |
-
"flagValue": -1
|
471 |
-
},
|
472 |
-
"phantom": {
|
473 |
-
"active": 0,
|
474 |
-
"flagValue": -1
|
475 |
-
},
|
476 |
-
"plusplus": {
|
477 |
-
"active": 0,
|
478 |
-
"flagValue": -1
|
479 |
-
},
|
480 |
-
"proto": {
|
481 |
-
"active": 0,
|
482 |
-
"flagValue": -1
|
483 |
-
},
|
484 |
-
"prototypejs": {
|
485 |
-
"active": 0,
|
486 |
-
"flagValue": -1
|
487 |
-
},
|
488 |
-
"qunit": {
|
489 |
-
"active": 0,
|
490 |
-
"flagValue": -1
|
491 |
-
},
|
492 |
-
"regexp": {
|
493 |
-
"active": 1,
|
494 |
-
"flagValue": -1
|
495 |
-
},
|
496 |
-
"rhino": {
|
497 |
-
"active": 0,
|
498 |
-
"flagValue": -1
|
499 |
-
},
|
500 |
-
"scripturl": {
|
501 |
-
"active": 0,
|
502 |
-
"flagValue": -1
|
503 |
-
},
|
504 |
-
"shadow": {
|
505 |
-
"active": 0,
|
506 |
-
"flagValue": -1
|
507 |
-
},
|
508 |
-
"shelljs": {
|
509 |
-
"active": 0,
|
510 |
-
"flagValue": -1
|
511 |
-
},
|
512 |
-
"singleGroups": {
|
513 |
-
"active": 0,
|
514 |
-
"flagValue": -1
|
515 |
-
},
|
516 |
-
"strict": {
|
517 |
-
"active": 0,
|
518 |
-
"flagValue": -1
|
519 |
-
},
|
520 |
-
"sub": {
|
521 |
-
"active": 0,
|
522 |
-
"flagValue": -1
|
523 |
-
},
|
524 |
-
"supernew": {
|
525 |
-
"active": 0,
|
526 |
-
"flagValue": -1
|
527 |
-
},
|
528 |
-
"typed": {
|
529 |
-
"active": 0,
|
530 |
-
"flagValue": -1
|
531 |
-
},
|
532 |
-
"undef": {
|
533 |
-
"active": 1,
|
534 |
-
"flagValue": -1
|
535 |
-
},
|
536 |
-
"unused": {
|
537 |
-
"active": 1,
|
538 |
-
"flagValue": -1
|
539 |
-
},
|
540 |
-
"varstmt": {
|
541 |
-
"active": 0,
|
542 |
-
"flagValue": -1
|
543 |
-
},
|
544 |
-
"withstmt": {
|
545 |
-
"active": 0,
|
546 |
-
"flagValue": -1
|
547 |
-
},
|
548 |
-
"worker": {
|
549 |
-
"active": 0,
|
550 |
-
"flagValue": -1
|
551 |
-
},
|
552 |
-
"wsh": {
|
553 |
-
"active": 0,
|
554 |
-
"flagValue": -1
|
555 |
-
},
|
556 |
-
"yui": {
|
557 |
-
"active": 0,
|
558 |
-
"flagValue": -1
|
559 |
-
}
|
560 |
-
},
|
561 |
-
"jsLintFlags2": {
|
562 |
-
"ass": {
|
563 |
-
"active": 0,
|
564 |
-
"flagValue": -1
|
565 |
-
},
|
566 |
-
"bitwise": {
|
567 |
-
"active": 0,
|
568 |
-
"flagValue": -1
|
569 |
-
},
|
570 |
-
"browser": {
|
571 |
-
"active": 1,
|
572 |
-
"flagValue": -1
|
573 |
-
},
|
574 |
-
"closure": {
|
575 |
-
"active": 0,
|
576 |
-
"flagValue": -1
|
577 |
-
},
|
578 |
-
"continue": {
|
579 |
-
"active": 0,
|
580 |
-
"flagValue": -1
|
581 |
-
},
|
582 |
-
"debug": {
|
583 |
-
"active": 0,
|
584 |
-
"flagValue": -1
|
585 |
-
},
|
586 |
-
"devel": {
|
587 |
-
"active": 0,
|
588 |
-
"flagValue": -1
|
589 |
-
},
|
590 |
-
"eqeq": {
|
591 |
-
"active": 0,
|
592 |
-
"flagValue": -1
|
593 |
-
},
|
594 |
-
"evil": {
|
595 |
-
"active": 0,
|
596 |
-
"flagValue": -1
|
597 |
-
},
|
598 |
-
"forin": {
|
599 |
-
"active": 0,
|
600 |
-
"flagValue": -1
|
601 |
-
},
|
602 |
-
"indent": {
|
603 |
-
"active": 0,
|
604 |
-
"flagValue": 4
|
605 |
-
},
|
606 |
-
"maxlen": {
|
607 |
-
"active": 0,
|
608 |
-
"flagValue": 150
|
609 |
-
},
|
610 |
-
"newcap": {
|
611 |
-
"active": 0,
|
612 |
-
"flagValue": -1
|
613 |
-
},
|
614 |
-
"node": {
|
615 |
-
"active": 0,
|
616 |
-
"flagValue": -1
|
617 |
-
},
|
618 |
-
"nomen": {
|
619 |
-
"active": 0,
|
620 |
-
"flagValue": -1
|
621 |
-
},
|
622 |
-
"plusplus": {
|
623 |
-
"active": 0,
|
624 |
-
"flagValue": -1
|
625 |
-
},
|
626 |
-
"properties": {
|
627 |
-
"active": 0,
|
628 |
-
"flagValue": -1
|
629 |
-
},
|
630 |
-
"regexp": {
|
631 |
-
"active": 0,
|
632 |
-
"flagValue": -1
|
633 |
-
},
|
634 |
-
"rhino": {
|
635 |
-
"active": 0,
|
636 |
-
"flagValue": -1
|
637 |
-
},
|
638 |
-
"sloppy": {
|
639 |
-
"active": 0,
|
640 |
-
"flagValue": -1
|
641 |
-
},
|
642 |
-
"stupid": {
|
643 |
-
"active": 0,
|
644 |
-
"flagValue": -1
|
645 |
-
},
|
646 |
-
"sub": {
|
647 |
-
"active": 0,
|
648 |
-
"flagValue": -1
|
649 |
-
},
|
650 |
-
"todo": {
|
651 |
-
"active": 0,
|
652 |
-
"flagValue": -1
|
653 |
-
},
|
654 |
-
"unparam": {
|
655 |
-
"active": 0,
|
656 |
-
"flagValue": -1
|
657 |
-
},
|
658 |
-
"vars": {
|
659 |
-
"active": 0,
|
660 |
-
"flagValue": -1
|
661 |
-
},
|
662 |
-
"white": {
|
663 |
-
"active": 0,
|
664 |
-
"flagValue": -1
|
665 |
-
}
|
666 |
-
},
|
667 |
-
"jsonAutoOutputPathEnabled": 0,
|
668 |
-
"jsonAutoOutputPathFilenamePattern": "*-min.json",
|
669 |
-
"jsonAutoOutputPathRelativePath": "",
|
670 |
-
"jsonAutoOutputPathReplace1": "",
|
671 |
-
"jsonAutoOutputPathReplace2": "",
|
672 |
-
"jsonAutoOutputPathStyle": 0,
|
673 |
-
"jsonOrderOutput": 0,
|
674 |
-
"jsonOutputStyle": 1,
|
675 |
-
"kitAutoOutputPathEnabled": 1,
|
676 |
-
"kitAutoOutputPathFilenamePattern": "*.html",
|
677 |
-
"kitAutoOutputPathRelativePath": "",
|
678 |
-
"kitAutoOutputPathReplace1": "",
|
679 |
-
"kitAutoOutputPathReplace2": "",
|
680 |
-
"kitAutoOutputPathStyle": 0,
|
681 |
-
"lessAllowInsecureImports": 0,
|
682 |
-
"lessAutoOutputPathEnabled": 1,
|
683 |
-
"lessAutoOutputPathFilenamePattern": "*.css",
|
684 |
-
"lessAutoOutputPathRelativePath": "..\/css",
|
685 |
-
"lessAutoOutputPathReplace1": "less",
|
686 |
-
"lessAutoOutputPathReplace2": "css",
|
687 |
-
"lessAutoOutputPathStyle": 2,
|
688 |
-
"lessCreateSourceMap": 0,
|
689 |
-
"lessDisableJavascript": 0,
|
690 |
-
"lessIeCompatibility": 1,
|
691 |
-
"lessOutputStyle": 0,
|
692 |
-
"lessRelativeURLS": 0,
|
693 |
-
"lessStrictImports": 0,
|
694 |
-
"lessStrictMath": 0,
|
695 |
-
"lessStrictUnits": 0,
|
696 |
-
"markdownAutoOutputPathEnabled": 1,
|
697 |
-
"markdownAutoOutputPathFilenamePattern": "*.html",
|
698 |
-
"markdownAutoOutputPathRelativePath": "",
|
699 |
-
"markdownAutoOutputPathReplace1": "",
|
700 |
-
"markdownAutoOutputPathReplace2": "",
|
701 |
-
"markdownAutoOutputPathStyle": 0,
|
702 |
-
"markdownCriticStyle": 0,
|
703 |
-
"markdownEnableFootnotes": 0,
|
704 |
-
"markdownEnableLabels": 1,
|
705 |
-
"markdownEnableSmartQuotes": 1,
|
706 |
-
"markdownEscapeLineBreaks": 0,
|
707 |
-
"markdownMaskEmailAddresses": 1,
|
708 |
-
"markdownOutputFormat": 0,
|
709 |
-
"markdownOutputStyle": 0,
|
710 |
-
"markdownParseMetadata": 1,
|
711 |
-
"markdownProcessHTML": 0,
|
712 |
-
"markdownRandomFootnoteNumbers": 0,
|
713 |
-
"markdownUseCompatibilityMode": 0,
|
714 |
-
"reloadFileURLs": 0,
|
715 |
-
"sassAutoOutputPathEnabled": 1,
|
716 |
-
"sassAutoOutputPathFilenamePattern": "*.css",
|
717 |
-
"sassAutoOutputPathRelativePath": "..\/css",
|
718 |
-
"sassAutoOutputPathReplace1": "sass",
|
719 |
-
"sassAutoOutputPathReplace2": "css",
|
720 |
-
"sassAutoOutputPathStyle": 2,
|
721 |
-
"sassCreateSourceMap": 0,
|
722 |
-
"sassDebugStyle": 0,
|
723 |
-
"sassDecimalPrecision": 10,
|
724 |
-
"sassOutputStyle": 0,
|
725 |
-
"sassUseLibsass": 0,
|
726 |
-
"shouldRunAutoprefixer": 0,
|
727 |
-
"shouldRunBless": 0,
|
728 |
-
"skippedItemsString": ".svn, .git, .hg, log, _logs, _cache, cache, logs, node_modules",
|
729 |
-
"slimAutoOutputPathEnabled": 1,
|
730 |
-
"slimAutoOutputPathFilenamePattern": "*.html",
|
731 |
-
"slimAutoOutputPathRelativePath": "",
|
732 |
-
"slimAutoOutputPathReplace1": "",
|
733 |
-
"slimAutoOutputPathReplace2": "",
|
734 |
-
"slimAutoOutputPathStyle": 0,
|
735 |
-
"slimCompileOnly": 0,
|
736 |
-
"slimLogicless": 0,
|
737 |
-
"slimOutputFormat": 0,
|
738 |
-
"slimOutputStyle": 1,
|
739 |
-
"slimRailsCompatible": 0,
|
740 |
-
"stylusAutoOutputPathEnabled": 1,
|
741 |
-
"stylusAutoOutputPathFilenamePattern": "*.css",
|
742 |
-
"stylusAutoOutputPathRelativePath": "..\/css",
|
743 |
-
"stylusAutoOutputPathReplace1": "stylus",
|
744 |
-
"stylusAutoOutputPathReplace2": "css",
|
745 |
-
"stylusAutoOutputPathStyle": 2,
|
746 |
-
"stylusCreateSourceMap": 0,
|
747 |
-
"stylusDebugStyle": 0,
|
748 |
-
"stylusImportCSS": 0,
|
749 |
-
"stylusOutputStyle": 0,
|
750 |
-
"stylusResolveRelativeURLS": 0,
|
751 |
-
"typescriptAutoOutputPathEnabled": 1,
|
752 |
-
"typescriptAutoOutputPathFilenamePattern": "*.js",
|
753 |
-
"typescriptAutoOutputPathRelativePath": "\/js",
|
754 |
-
"typescriptAutoOutputPathReplace1": "",
|
755 |
-
"typescriptAutoOutputPathReplace2": "",
|
756 |
-
"typescriptAutoOutputPathStyle": 2,
|
757 |
-
"typescriptCreateDeclarationFile": 0,
|
758 |
-
"typescriptCreateSourceMap": 0,
|
759 |
-
"typescriptMinifyOutput": 0,
|
760 |
-
"typescriptModuleType": 0,
|
761 |
-
"typescriptNoImplicitAny": 0,
|
762 |
-
"typescriptPreserveConstEnums": 0,
|
763 |
-
"typescriptRemoveComments": 0,
|
764 |
-
"typescriptSuppressImplicitAnyIndexErrors": 0,
|
765 |
-
"typescriptTargetECMAVersion": 0,
|
766 |
-
"uglifyDefinesString": "",
|
767 |
-
"uglifyFlags2": {
|
768 |
-
"ascii-only": {
|
769 |
-
"active": 0,
|
770 |
-
"flagValue": -1
|
771 |
-
},
|
772 |
-
"bare-returns": {
|
773 |
-
"active": 0,
|
774 |
-
"flagValue": -1
|
775 |
-
},
|
776 |
-
"booleans": {
|
777 |
-
"active": 1,
|
778 |
-
"flagValue": -1
|
779 |
-
},
|
780 |
-
"bracketize": {
|
781 |
-
"active": 0,
|
782 |
-
"flagValue": -1
|
783 |
-
},
|
784 |
-
"cascade": {
|
785 |
-
"active": 1,
|
786 |
-
"flagValue": -1
|
787 |
-
},
|
788 |
-
"comments": {
|
789 |
-
"active": 1,
|
790 |
-
"flagValue": -1
|
791 |
-
},
|
792 |
-
"comparisons": {
|
793 |
-
"active": 1,
|
794 |
-
"flagValue": -1
|
795 |
-
},
|
796 |
-
"compress": {
|
797 |
-
"active": 1,
|
798 |
-
"flagValue": -1
|
799 |
-
},
|
800 |
-
"conditionals": {
|
801 |
-
"active": 1,
|
802 |
-
"flagValue": -1
|
803 |
-
},
|
804 |
-
"dead_code": {
|
805 |
-
"active": 0,
|
806 |
-
"flagValue": -1
|
807 |
-
},
|
808 |
-
"drop_console": {
|
809 |
-
"active": 0,
|
810 |
-
"flagValue": -1
|
811 |
-
},
|
812 |
-
"drop_debugger": {
|
813 |
-
"active": 1,
|
814 |
-
"flagValue": -1
|
815 |
-
},
|
816 |
-
"eval": {
|
817 |
-
"active": 0,
|
818 |
-
"flagValue": -1
|
819 |
-
},
|
820 |
-
"evaluate": {
|
821 |
-
"active": 1,
|
822 |
-
"flagValue": -1
|
823 |
-
},
|
824 |
-
"hoist_funs": {
|
825 |
-
"active": 1,
|
826 |
-
"flagValue": -1
|
827 |
-
},
|
828 |
-
"hoist_vars": {
|
829 |
-
"active": 0,
|
830 |
-
"flagValue": -1
|
831 |
-
},
|
832 |
-
"if_return": {
|
833 |
-
"active": 1,
|
834 |
-
"flagValue": -1
|
835 |
-
},
|
836 |
-
"indent-level": {
|
837 |
-
"active": 0,
|
838 |
-
"flagValue": 4
|
839 |
-
},
|
840 |
-
"indent-start": {
|
841 |
-
"active": 0,
|
842 |
-
"flagValue": 0
|
843 |
-
},
|
844 |
-
"inline-script": {
|
845 |
-
"active": 0,
|
846 |
-
"flagValue": -1
|
847 |
-
},
|
848 |
-
"join_vars": {
|
849 |
-
"active": 1,
|
850 |
-
"flagValue": -1
|
851 |
-
},
|
852 |
-
"keep_fargs": {
|
853 |
-
"active": 0,
|
854 |
-
"flagValue": -1
|
855 |
-
},
|
856 |
-
"keep_fnames": {
|
857 |
-
"active": 0,
|
858 |
-
"flagValue": -1
|
859 |
-
},
|
860 |
-
"loops": {
|
861 |
-
"active": 1,
|
862 |
-
"flagValue": -1
|
863 |
-
},
|
864 |
-
"mangle": {
|
865 |
-
"active": 1,
|
866 |
-
"flagValue": -1
|
867 |
-
},
|
868 |
-
"max-line-len": {
|
869 |
-
"active": 1,
|
870 |
-
"flagValue": 32000
|
871 |
-
},
|
872 |
-
"negate_iife": {
|
873 |
-
"active": 1,
|
874 |
-
"flagValue": -1
|
875 |
-
},
|
876 |
-
"properties": {
|
877 |
-
"active": 1,
|
878 |
-
"flagValue": -1
|
879 |
-
},
|
880 |
-
"pure_getters": {
|
881 |
-
"active": 0,
|
882 |
-
"flagValue": -1
|
883 |
-
},
|
884 |
-
"quote-keys": {
|
885 |
-
"active": 0,
|
886 |
-
"flagValue": -1
|
887 |
-
},
|
888 |
-
"screw-ie8": {
|
889 |
-
"active": 0,
|
890 |
-
"flagValue": -1
|
891 |
-
},
|
892 |
-
"semicolons": {
|
893 |
-
"active": 1,
|
894 |
-
"flagValue": -1
|
895 |
-
},
|
896 |
-
"sequences": {
|
897 |
-
"active": 1,
|
898 |
-
"flagValue": -1
|
899 |
-
},
|
900 |
-
"sort": {
|
901 |
-
"active": 0,
|
902 |
-
"flagValue": -1
|
903 |
-
},
|
904 |
-
"space-colon": {
|
905 |
-
"active": 1,
|
906 |
-
"flagValue": -1
|
907 |
-
},
|
908 |
-
"toplevel": {
|
909 |
-
"active": 0,
|
910 |
-
"flagValue": -1
|
911 |
-
},
|
912 |
-
"unsafe": {
|
913 |
-
"active": 0,
|
914 |
-
"flagValue": -1
|
915 |
-
},
|
916 |
-
"unused": {
|
917 |
-
"active": 0,
|
918 |
-
"flagValue": -1
|
919 |
-
},
|
920 |
-
"warnings": {
|
921 |
-
"active": 0,
|
922 |
-
"flagValue": -1
|
923 |
-
},
|
924 |
-
"width": {
|
925 |
-
"active": 1,
|
926 |
-
"flagValue": 80
|
927 |
-
}
|
928 |
-
},
|
929 |
-
"uglifyReservedNamesString": "$",
|
930 |
-
"websiteRelativeRoot": ""
|
931 |
-
},
|
932 |
-
"settingsFileVersion": "2"
|
933 |
-
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
readme.txt
CHANGED
@@ -2,8 +2,8 @@
|
|
2 |
Contributors: jameskoster, woothemes
|
3 |
Tags: woocommerce, ecommerce, products, storefront, pagination, next, previous
|
4 |
Requires at least: 4.0.0
|
5 |
-
Tested up to: 4.
|
6 |
-
Stable tag: 1.
|
7 |
License: GPLv2 or later
|
8 |
License URI: http://www.gnu.org/licenses/gpl-2.0.html
|
9 |
|
@@ -37,6 +37,11 @@ The links will appear on any single product page, providing there is more than o
|
|
37 |
|
38 |
== Changelog ==
|
39 |
|
|
|
|
|
|
|
|
|
|
|
40 |
= 1.1.3 - 09.09.2016 =
|
41 |
* Fix - Typo in the pagination background color setting.
|
42 |
|
2 |
Contributors: jameskoster, woothemes
|
3 |
Tags: woocommerce, ecommerce, products, storefront, pagination, next, previous
|
4 |
Requires at least: 4.0.0
|
5 |
+
Tested up to: 4.7.1
|
6 |
+
Stable tag: 1.2.0
|
7 |
License: GPLv2 or later
|
8 |
License URI: http://www.gnu.org/licenses/gpl-2.0.html
|
9 |
|
37 |
|
38 |
== Changelog ==
|
39 |
|
40 |
+
= 1.2.0 - 01.25.2017 =
|
41 |
+
* New - Design tweaks.
|
42 |
+
* Fix - Thumbnails when displaying next/prev products from the same category.
|
43 |
+
* Fix - Don't display hidden products in next/prev links.
|
44 |
+
|
45 |
= 1.1.3 - 09.09.2016 =
|
46 |
* Fix - Typo in the pagination background color setting.
|
47 |
|
storefront-product-pagination.php
CHANGED
@@ -3,11 +3,11 @@
|
|
3 |
* Plugin Name: Storefront Product Pagination
|
4 |
* Plugin URI: http://woothemes.com/storefront/
|
5 |
* Description: Add unobstrusive links to next/previous products on your WooCommerce single product pages.
|
6 |
-
* Version: 1.
|
7 |
* Author: WooThemes
|
8 |
* Author URI: http://woothemes.com/
|
9 |
* Requires at least: 4.0.0
|
10 |
-
* Tested up to: 4.
|
11 |
*
|
12 |
* Text Domain: storefront-product-pagination
|
13 |
* Domain Path: /languages/
|
@@ -17,7 +17,9 @@
|
|
17 |
* @author James Koster
|
18 |
*/
|
19 |
|
20 |
-
if ( ! defined( 'ABSPATH' ) )
|
|
|
|
|
21 |
|
22 |
|
23 |
/**
|
@@ -26,11 +28,11 @@ if ( ! defined( 'ABSPATH' ) ) exit; // Exit if accessed directly
|
|
26 |
* @since 1.0.0
|
27 |
* @return object Storefront_Product_Pagination
|
28 |
*/
|
29 |
-
function
|
30 |
return Storefront_Product_Pagination::instance();
|
31 |
-
} // End
|
32 |
|
33 |
-
|
34 |
|
35 |
/**
|
36 |
* Main Storefront_Product_Pagination Class
|
@@ -43,6 +45,7 @@ Storefront_Product_Pagination();
|
|
43 |
final class Storefront_Product_Pagination {
|
44 |
/**
|
45 |
* Storefront_Product_Pagination The single instance of Storefront_Product_Pagination.
|
|
|
46 |
* @var object
|
47 |
* @access private
|
48 |
* @since 1.0.0
|
@@ -51,6 +54,7 @@ final class Storefront_Product_Pagination {
|
|
51 |
|
52 |
/**
|
53 |
* The token.
|
|
|
54 |
* @var string
|
55 |
* @access public
|
56 |
* @since 1.0.0
|
@@ -59,15 +63,16 @@ final class Storefront_Product_Pagination {
|
|
59 |
|
60 |
/**
|
61 |
* The version number.
|
|
|
62 |
* @var string
|
63 |
* @access public
|
64 |
* @since 1.0.0
|
65 |
*/
|
66 |
public $version;
|
67 |
|
68 |
-
// Admin - Start
|
69 |
/**
|
70 |
* The admin object.
|
|
|
71 |
* @var object
|
72 |
* @access public
|
73 |
* @since 1.0.0
|
@@ -76,6 +81,7 @@ final class Storefront_Product_Pagination {
|
|
76 |
|
77 |
/**
|
78 |
* Constructor function.
|
|
|
79 |
* @access public
|
80 |
* @since 1.0.0
|
81 |
* @return void
|
@@ -84,7 +90,7 @@ final class Storefront_Product_Pagination {
|
|
84 |
$this->token = 'storefront-product-pagination';
|
85 |
$this->plugin_url = plugin_dir_url( __FILE__ );
|
86 |
$this->plugin_path = plugin_dir_path( __FILE__ );
|
87 |
-
$this->version = '1.
|
88 |
|
89 |
register_activation_hook( __FILE__, array( $this, 'install' ) );
|
90 |
|
@@ -104,13 +110,16 @@ final class Storefront_Product_Pagination {
|
|
104 |
* @return Main Storefront_Product_Pagination instance
|
105 |
*/
|
106 |
public static function instance() {
|
107 |
-
if ( is_null( self::$_instance ) )
|
108 |
self::$_instance = new self();
|
|
|
|
|
109 |
return self::$_instance;
|
110 |
} // End instance()
|
111 |
|
112 |
/**
|
113 |
* Load the localisation file.
|
|
|
114 |
* @access public
|
115 |
* @since 1.0.0
|
116 |
* @return void
|
@@ -125,7 +134,7 @@ final class Storefront_Product_Pagination {
|
|
125 |
* @since 1.0.0
|
126 |
*/
|
127 |
public function __clone() {
|
128 |
-
_doing_it_wrong( __FUNCTION__, __( 'Cheatin’ huh?' ), '1.0.0' );
|
129 |
}
|
130 |
|
131 |
/**
|
@@ -134,12 +143,13 @@ final class Storefront_Product_Pagination {
|
|
134 |
* @since 1.0.0
|
135 |
*/
|
136 |
public function __wakeup() {
|
137 |
-
_doing_it_wrong( __FUNCTION__, __( 'Cheatin’ huh?' ), '1.0.0' );
|
138 |
}
|
139 |
|
140 |
/**
|
141 |
* Installation.
|
142 |
* Runs on activation. Logs the version number and assigns a notice message to a WordPress option.
|
|
|
143 |
* @access public
|
144 |
* @since 1.0.0
|
145 |
* @return void
|
@@ -147,9 +157,9 @@ final class Storefront_Product_Pagination {
|
|
147 |
public function install() {
|
148 |
$this->_log_version_number();
|
149 |
|
150 |
-
//
|
151 |
$url = admin_url() . 'customize.php?';
|
152 |
-
$url .= 'url=' . urlencode( site_url() . '?storefront-customizer=true' )
|
153 |
$url .= '&return=' . urlencode( admin_url() . 'plugins.php' );
|
154 |
$url .= '&storefront-customizer=true';
|
155 |
|
@@ -161,6 +171,7 @@ final class Storefront_Product_Pagination {
|
|
161 |
|
162 |
/**
|
163 |
* Log the plugin version number.
|
|
|
164 |
* @access private
|
165 |
* @since 1.0.0
|
166 |
* @return void
|
@@ -174,12 +185,13 @@ final class Storefront_Product_Pagination {
|
|
174 |
* Setup all the things.
|
175 |
* Only executes if Storefront or a child theme using Storefront as a parent is active and the extension specific filter returns true.
|
176 |
* Child themes can disable this extension using the storefront_extension_boilerplate_enabled filter
|
|
|
177 |
* @return void
|
178 |
*/
|
179 |
public function spp_setup() {
|
180 |
$theme = wp_get_theme();
|
181 |
|
182 |
-
if ( 'Storefront'
|
183 |
add_action( 'wp_enqueue_scripts', array( $this, 'spp_styles' ), 999 );
|
184 |
add_action( 'customize_register', array( $this, 'spp_customize_register' ) );
|
185 |
add_action( 'customize_preview_init', array( $this, 'spp_customize_preview_js' ) );
|
@@ -187,8 +199,7 @@ final class Storefront_Product_Pagination {
|
|
187 |
|
188 |
add_action( 'woocommerce_after_single_product_summary', array( $this, 'spp_single_product_pagination' ), 30 );
|
189 |
|
190 |
-
|
191 |
-
// Hide the 'More' section in the customizer
|
192 |
add_filter( 'storefront_customizer_more', '__return_false' );
|
193 |
} else {
|
194 |
add_action( 'admin_notices', array( $this, 'spp_install_storefront_notice' ) );
|
@@ -198,6 +209,7 @@ final class Storefront_Product_Pagination {
|
|
198 |
/**
|
199 |
* Admin notice
|
200 |
* Checks the notice setup in install(). If it exists display it then delete the option so it's not displayed again.
|
|
|
201 |
* @since 1.0.0
|
202 |
* @return void
|
203 |
*/
|
@@ -207,7 +219,7 @@ final class Storefront_Product_Pagination {
|
|
207 |
if ( $notices = get_option( 'spp_activation_notice' ) ) {
|
208 |
|
209 |
foreach ( $notices as $notice ) {
|
210 |
-
echo '<div class="updated">' . $notice . '</div>';
|
211 |
}
|
212 |
|
213 |
delete_option( 'spp_activation_notice' );
|
@@ -217,26 +229,28 @@ final class Storefront_Product_Pagination {
|
|
217 |
/**
|
218 |
* Storefront install
|
219 |
* If the user activates the plugin while having a different parent theme active, prompt them to install Storefront.
|
|
|
220 |
* @since 1.0.0
|
221 |
* @return void
|
222 |
*/
|
223 |
public function spp_install_storefront_notice() {
|
224 |
echo '<div class="notice is-dismissible updated">
|
225 |
-
<p>' . __( 'Storefront Product Pagination requires that you use Storefront as your parent theme.', 'storefront-product-pagination' ) . ' <a href="' . esc_url( wp_nonce_url( self_admin_url( 'update.php?action=install-theme&theme=storefront' ), 'install-theme_storefront' ) ) .'">' . __( 'Install Storefront now', 'storefront-product-pagination' ) . '</a></p>
|
226 |
</div>';
|
227 |
}
|
228 |
|
229 |
/**
|
230 |
* Customizer Controls and settings
|
|
|
231 |
* @param WP_Customize_Manager $wp_customize Theme Customizer object.
|
232 |
*/
|
233 |
public function spp_customize_register( $wp_customize ) {
|
234 |
/**
|
235 |
-
|
236 |
-
|
237 |
-
|
238 |
-
|
239 |
-
|
240 |
) );
|
241 |
|
242 |
/**
|
@@ -275,6 +289,7 @@ final class Storefront_Product_Pagination {
|
|
275 |
|
276 |
/**
|
277 |
* Enqueue CSS and custom styles.
|
|
|
278 |
* @since 1.0.0
|
279 |
* @return void
|
280 |
*/
|
@@ -301,31 +316,36 @@ final class Storefront_Product_Pagination {
|
|
301 |
}
|
302 |
|
303 |
/**
|
304 |
-
|
305 |
* Display links to the next/previous products on the single product page
|
|
|
306 |
* @since 1.0.0
|
307 |
* @return void
|
308 |
* @uses previous_post_link(), next_post_link()
|
309 |
*/
|
310 |
function spp_single_product_pagination() {
|
311 |
$placeholder = '<img src="' . wc_placeholder_img_src() . '" />';
|
312 |
-
$previous_product = get_previous_post();
|
313 |
-
$next_product = get_next_post();
|
314 |
-
$previous_product_thumbnail = '';
|
315 |
-
$next_product_thumbnail = '';
|
316 |
$same_cat = get_theme_mod( 'spp_same_cat', false );
|
|
|
|
|
317 |
|
318 |
-
$
|
319 |
-
$taxonomy = 'category';
|
320 |
-
|
321 |
-
if ( true == $same_cat ) {
|
322 |
$in_same_term = true;
|
323 |
$taxonomy = 'product_cat';
|
324 |
}
|
325 |
|
326 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
327 |
if ( $previous_product ) {
|
328 |
-
$previous_product_thumbnail
|
329 |
|
330 |
if ( ! $previous_product_thumbnail ) {
|
331 |
$previous_product_thumbnail = $placeholder;
|
@@ -333,20 +353,30 @@ final class Storefront_Product_Pagination {
|
|
333 |
}
|
334 |
|
335 |
if ( $next_product ) {
|
336 |
-
$next_product_thumbnail
|
|
|
337 |
if ( ! $next_product_thumbnail ) {
|
338 |
$next_product_thumbnail = $placeholder;
|
339 |
}
|
340 |
}
|
341 |
|
342 |
-
// Output the links
|
343 |
-
if ( $next_product || $previous_product ) {
|
|
|
344 |
echo '<nav class="storefront-single-product-pagination">';
|
345 |
-
|
346 |
-
|
347 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
348 |
echo '</nav>';
|
|
|
349 |
}
|
350 |
}
|
351 |
-
|
352 |
} // End Class
|
3 |
* Plugin Name: Storefront Product Pagination
|
4 |
* Plugin URI: http://woothemes.com/storefront/
|
5 |
* Description: Add unobstrusive links to next/previous products on your WooCommerce single product pages.
|
6 |
+
* Version: 1.2.0
|
7 |
* Author: WooThemes
|
8 |
* Author URI: http://woothemes.com/
|
9 |
* Requires at least: 4.0.0
|
10 |
+
* Tested up to: 4.7.1
|
11 |
*
|
12 |
* Text Domain: storefront-product-pagination
|
13 |
* Domain Path: /languages/
|
17 |
* @author James Koster
|
18 |
*/
|
19 |
|
20 |
+
if ( ! defined( 'ABSPATH' ) ) {
|
21 |
+
exit; // Exit if accessed directly.
|
22 |
+
}
|
23 |
|
24 |
|
25 |
/**
|
28 |
* @since 1.0.0
|
29 |
* @return object Storefront_Product_Pagination
|
30 |
*/
|
31 |
+
function storefront_product_pagination() {
|
32 |
return Storefront_Product_Pagination::instance();
|
33 |
+
} // End storefront_product_pagination()
|
34 |
|
35 |
+
storefront_product_pagination();
|
36 |
|
37 |
/**
|
38 |
* Main Storefront_Product_Pagination Class
|
45 |
final class Storefront_Product_Pagination {
|
46 |
/**
|
47 |
* Storefront_Product_Pagination The single instance of Storefront_Product_Pagination.
|
48 |
+
*
|
49 |
* @var object
|
50 |
* @access private
|
51 |
* @since 1.0.0
|
54 |
|
55 |
/**
|
56 |
* The token.
|
57 |
+
*
|
58 |
* @var string
|
59 |
* @access public
|
60 |
* @since 1.0.0
|
63 |
|
64 |
/**
|
65 |
* The version number.
|
66 |
+
*
|
67 |
* @var string
|
68 |
* @access public
|
69 |
* @since 1.0.0
|
70 |
*/
|
71 |
public $version;
|
72 |
|
|
|
73 |
/**
|
74 |
* The admin object.
|
75 |
+
*
|
76 |
* @var object
|
77 |
* @access public
|
78 |
* @since 1.0.0
|
81 |
|
82 |
/**
|
83 |
* Constructor function.
|
84 |
+
*
|
85 |
* @access public
|
86 |
* @since 1.0.0
|
87 |
* @return void
|
90 |
$this->token = 'storefront-product-pagination';
|
91 |
$this->plugin_url = plugin_dir_url( __FILE__ );
|
92 |
$this->plugin_path = plugin_dir_path( __FILE__ );
|
93 |
+
$this->version = '1.2.0';
|
94 |
|
95 |
register_activation_hook( __FILE__, array( $this, 'install' ) );
|
96 |
|
110 |
* @return Main Storefront_Product_Pagination instance
|
111 |
*/
|
112 |
public static function instance() {
|
113 |
+
if ( is_null( self::$_instance ) ) {
|
114 |
self::$_instance = new self();
|
115 |
+
}
|
116 |
+
|
117 |
return self::$_instance;
|
118 |
} // End instance()
|
119 |
|
120 |
/**
|
121 |
* Load the localisation file.
|
122 |
+
*
|
123 |
* @access public
|
124 |
* @since 1.0.0
|
125 |
* @return void
|
134 |
* @since 1.0.0
|
135 |
*/
|
136 |
public function __clone() {
|
137 |
+
_doing_it_wrong( __FUNCTION__, esc_attr( __( 'Cheatin’ huh?' ) ), '1.0.0' );
|
138 |
}
|
139 |
|
140 |
/**
|
143 |
* @since 1.0.0
|
144 |
*/
|
145 |
public function __wakeup() {
|
146 |
+
_doing_it_wrong( __FUNCTION__, esc_attr( __( 'Cheatin’ huh?' ) ), '1.0.0' );
|
147 |
}
|
148 |
|
149 |
/**
|
150 |
* Installation.
|
151 |
* Runs on activation. Logs the version number and assigns a notice message to a WordPress option.
|
152 |
+
*
|
153 |
* @access public
|
154 |
* @since 1.0.0
|
155 |
* @return void
|
157 |
public function install() {
|
158 |
$this->_log_version_number();
|
159 |
|
160 |
+
// Get theme customizer url.
|
161 |
$url = admin_url() . 'customize.php?';
|
162 |
+
$url .= 'url=' . urlencode( site_url() . '?storefront-customizer=true' );
|
163 |
$url .= '&return=' . urlencode( admin_url() . 'plugins.php' );
|
164 |
$url .= '&storefront-customizer=true';
|
165 |
|
171 |
|
172 |
/**
|
173 |
* Log the plugin version number.
|
174 |
+
*
|
175 |
* @access private
|
176 |
* @since 1.0.0
|
177 |
* @return void
|
185 |
* Setup all the things.
|
186 |
* Only executes if Storefront or a child theme using Storefront as a parent is active and the extension specific filter returns true.
|
187 |
* Child themes can disable this extension using the storefront_extension_boilerplate_enabled filter
|
188 |
+
*
|
189 |
* @return void
|
190 |
*/
|
191 |
public function spp_setup() {
|
192 |
$theme = wp_get_theme();
|
193 |
|
194 |
+
if ( 'Storefront' === $theme->name || 'storefront' === $theme->template && apply_filters( 'storefront_product_pagination_supported', true ) ) {
|
195 |
add_action( 'wp_enqueue_scripts', array( $this, 'spp_styles' ), 999 );
|
196 |
add_action( 'customize_register', array( $this, 'spp_customize_register' ) );
|
197 |
add_action( 'customize_preview_init', array( $this, 'spp_customize_preview_js' ) );
|
199 |
|
200 |
add_action( 'woocommerce_after_single_product_summary', array( $this, 'spp_single_product_pagination' ), 30 );
|
201 |
|
202 |
+
// Hide the 'More' section in the customizer.
|
|
|
203 |
add_filter( 'storefront_customizer_more', '__return_false' );
|
204 |
} else {
|
205 |
add_action( 'admin_notices', array( $this, 'spp_install_storefront_notice' ) );
|
209 |
/**
|
210 |
* Admin notice
|
211 |
* Checks the notice setup in install(). If it exists display it then delete the option so it's not displayed again.
|
212 |
+
*
|
213 |
* @since 1.0.0
|
214 |
* @return void
|
215 |
*/
|
219 |
if ( $notices = get_option( 'spp_activation_notice' ) ) {
|
220 |
|
221 |
foreach ( $notices as $notice ) {
|
222 |
+
echo '<div class="updated">' . wp_kses_post( $notice ) . '</div>';
|
223 |
}
|
224 |
|
225 |
delete_option( 'spp_activation_notice' );
|
229 |
/**
|
230 |
* Storefront install
|
231 |
* If the user activates the plugin while having a different parent theme active, prompt them to install Storefront.
|
232 |
+
*
|
233 |
* @since 1.0.0
|
234 |
* @return void
|
235 |
*/
|
236 |
public function spp_install_storefront_notice() {
|
237 |
echo '<div class="notice is-dismissible updated">
|
238 |
+
<p>' . wp_kses_post( __( 'Storefront Product Pagination requires that you use Storefront as your parent theme.', 'storefront-product-pagination' ) ) . ' <a href="' . esc_url( wp_nonce_url( self_admin_url( 'update.php?action=install-theme&theme=storefront' ), 'install-theme_storefront' ) ) .'">' . wp_kses_post( __( 'Install Storefront now', 'storefront-product-pagination' ) ) . '</a></p>
|
239 |
</div>';
|
240 |
}
|
241 |
|
242 |
/**
|
243 |
* Customizer Controls and settings
|
244 |
+
*
|
245 |
* @param WP_Customize_Manager $wp_customize Theme Customizer object.
|
246 |
*/
|
247 |
public function spp_customize_register( $wp_customize ) {
|
248 |
/**
|
249 |
+
* Add a new section
|
250 |
+
*/
|
251 |
+
$wp_customize->add_section( 'spp_section' , array(
|
252 |
+
'title' => __( 'Product Pagination', 'storefront-extention-boilerplate' ),
|
253 |
+
'priority' => 55,
|
254 |
) );
|
255 |
|
256 |
/**
|
289 |
|
290 |
/**
|
291 |
* Enqueue CSS and custom styles.
|
292 |
+
*
|
293 |
* @since 1.0.0
|
294 |
* @return void
|
295 |
*/
|
316 |
}
|
317 |
|
318 |
/**
|
319 |
+
* Single product pagination
|
320 |
* Display links to the next/previous products on the single product page
|
321 |
+
*
|
322 |
* @since 1.0.0
|
323 |
* @return void
|
324 |
* @uses previous_post_link(), next_post_link()
|
325 |
*/
|
326 |
function spp_single_product_pagination() {
|
327 |
$placeholder = '<img src="' . wc_placeholder_img_src() . '" />';
|
|
|
|
|
|
|
|
|
328 |
$same_cat = get_theme_mod( 'spp_same_cat', false );
|
329 |
+
$taxonomy = 'category';
|
330 |
+
$in_same_term = false;
|
331 |
|
332 |
+
if ( true === $same_cat ) {
|
|
|
|
|
|
|
333 |
$in_same_term = true;
|
334 |
$taxonomy = 'product_cat';
|
335 |
}
|
336 |
|
337 |
+
$previous_product = get_previous_post( $same_cat, '', $taxonomy );
|
338 |
+
$next_product = get_next_post( $same_cat, '', $taxonomy );
|
339 |
+
|
340 |
+
$previous_product_data = new WC_Product( $previous_product->ID );
|
341 |
+
$next_product_data = new WC_Product( $next_product->ID );
|
342 |
+
|
343 |
+
$previous_product_thumbnail = '';
|
344 |
+
$next_product_thumbnail = '';
|
345 |
+
|
346 |
+
// If a next/previous product exists, get the thumbnail (or place holder).
|
347 |
if ( $previous_product ) {
|
348 |
+
$previous_product_thumbnail = get_the_post_thumbnail( $previous_product->ID, 'shop_catalog' );
|
349 |
|
350 |
if ( ! $previous_product_thumbnail ) {
|
351 |
$previous_product_thumbnail = $placeholder;
|
353 |
}
|
354 |
|
355 |
if ( $next_product ) {
|
356 |
+
$next_product_thumbnail = get_the_post_thumbnail( $next_product->ID, 'shop_catalog' );
|
357 |
+
|
358 |
if ( ! $next_product_thumbnail ) {
|
359 |
$next_product_thumbnail = $placeholder;
|
360 |
}
|
361 |
}
|
362 |
|
363 |
+
// Output the links.
|
364 |
+
if ( ( $next_product || $previous_product ) && ( $previous_product_data->is_visible() || $next_product_data->is_visible() ) ) {
|
365 |
+
|
366 |
echo '<nav class="storefront-single-product-pagination">';
|
367 |
+
|
368 |
+
echo '<h2>' . esc_attr( __( 'More products', 'storefront' ) ) . '</h2>';
|
369 |
+
|
370 |
+
if ( $previous_product && $previous_product_data->is_visible() ) {
|
371 |
+
previous_post_link( '%link', $previous_product_thumbnail . '<span class="title">%title</span>', $in_same_term, '', $taxonomy );
|
372 |
+
}
|
373 |
+
|
374 |
+
if ( $next_product && $next_product_data->is_visible() ) {
|
375 |
+
next_post_link( '%link', $next_product_thumbnail . '<span class="title">%title</span>', $in_same_term, '', $taxonomy );
|
376 |
+
}
|
377 |
+
|
378 |
echo '</nav>';
|
379 |
+
|
380 |
}
|
381 |
}
|
|
|
382 |
} // End Class
|