WP-Paginate - Version 2.0.0

Version Description

  • Added new button styles
  • Added the ability to select the font
  • Updated the translation file
  • Added the ability to add pagination without editing theme files. This applies to posts but not to comments.
  • Added the ability to hide the standard theme pagination. This applies to posts but not to comments.
  • Added a review notice
Download this release

Release Info

Developer AlanP57
Plugin Icon 128x128 WP-Paginate
Version 2.0.0
Comparing to
See all releases

Code changes from version 1.3.4 to 2.0.0

I18n/wp-paginate.mo ADDED
Binary file
I18n/wp-paginate.pot CHANGED
@@ -3,88 +3,246 @@
3
  # This file is distributed under the same license as the WP-Paginate package.
4
  # Noah Cinquini <noah@studiofuel.com>, 2014.
5
  #
6
- #, fuzzy
7
  msgid ""
8
  msgstr ""
9
- "Project-Id-Version: WP-Paginate 1.2\n"
10
  "Report-Msgid-Bugs-To: http://wordpress.org/tag/wp-paginate\n"
11
- "POT-Creation-Date: 2010-09-28 21:23+0000\n"
12
- "PO-Revision-Date: 2010-MO-DA HO:MI+ZONE\n"
13
- "Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
14
- "Language-Team: LANGUAGE <LL@li.org>\n"
 
15
  "MIME-Version: 1.0\n"
16
- "Content-Type: text/plain; charset=utf-8\n"
17
  "Content-Transfer-Encoding: 8bit\n"
 
 
 
 
 
 
18
 
19
- #: wp-paginate.php:267
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
20
  msgid "Settings"
21
  msgstr ""
22
 
23
- #: wp-paginate.php:292
24
  msgid "Success! Your changes were successfully saved!"
25
  msgstr ""
26
 
27
- #: wp-paginate.php:295
28
  msgid "Whoops! There was a problem with the data you posted. Please try again."
29
  msgstr ""
30
 
31
- #: wp-paginate.php:307
 
 
 
 
 
 
 
 
 
 
 
 
32
  msgid "Pagination Label:"
33
  msgstr ""
34
 
35
- #: wp-paginate.php:309
36
- msgid "The text/HTML to display before the list of pages."
37
  msgstr ""
38
 
39
- #: wp-paginate.php:312
40
  msgid "Previous Page:"
41
  msgstr ""
42
 
43
- #: wp-paginate.php:314
44
  msgid "The text/HTML to display for the previous page link."
45
  msgstr ""
46
 
47
- #: wp-paginate.php:317
48
  msgid "Next Page:"
49
  msgstr ""
50
 
51
- #: wp-paginate.php:319
52
  msgid "The text/HTML to display for the next page link."
53
  msgstr ""
54
 
55
- #: wp-paginate.php:323
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
56
  msgid "Advanced Settings"
57
  msgstr ""
58
 
59
- #: wp-paginate.php:326
60
  msgid "Before Markup:"
61
  msgstr ""
62
 
63
- #: wp-paginate.php:328
64
  msgid "The HTML markup to display before the pagination code."
65
  msgstr ""
66
 
67
- #: wp-paginate.php:331
68
  msgid "After Markup:"
69
  msgstr ""
70
 
71
- #: wp-paginate.php:333
72
  msgid "The HTML markup to display after the pagination code."
73
  msgstr ""
74
 
75
- #: wp-paginate.php:336
76
  msgid "Markup Display:"
77
  msgstr ""
78
 
79
- #: wp-paginate.php:338
80
  msgid "Show Before Markup and After Markup, even if the page list is empty?"
81
  msgstr ""
82
 
83
- #: wp-paginate.php:341
84
  msgid "WP-Paginate CSS File:"
85
  msgstr ""
86
 
87
- #: wp-paginate.php:343
88
  #, php-format
89
  msgid ""
90
  "Include the default stylesheet wp-paginate.css? WP-Paginate will first look "
@@ -92,98 +250,111 @@ msgid ""
92
  "code>)."
93
  msgstr ""
94
 
95
- #: wp-paginate.php:346
96
  msgid "Page Range:"
97
  msgstr ""
98
 
99
- #: wp-paginate.php:353
100
  msgid ""
101
  "The number of page links to show before and after the current page. "
102
  "Recommended value: 3"
103
  msgstr ""
104
 
105
- #: wp-paginate.php:356
106
  msgid "Page Anchors:"
107
  msgstr ""
108
 
109
- #: wp-paginate.php:363
110
  msgid ""
111
  "The number of links to always show at beginning and end of pagination. "
112
  "Recommended value: 1"
113
  msgstr ""
114
 
115
- #: wp-paginate.php:366
116
  msgid "Page Gap:"
117
  msgstr ""
118
 
119
- #: wp-paginate.php:373
120
  msgid ""
121
  "The minimum number of pages in a gap before an ellipsis (...) is added. "
122
  "Recommended value: 3"
123
  msgstr ""
124
 
125
- #: wp-paginate.php:380
126
  msgid "Need Support?"
127
  msgstr ""
128
 
129
- #: wp-paginate.php:381
130
  #, php-format
131
  msgid ""
132
  "For questions, issues or feature requests, please post them in the %s and "
133
  "make sure to tag the post with wp-paginate."
134
  msgstr ""
135
 
136
- #: wp-paginate.php:382
137
- msgid "Want To Contribute?"
138
  msgstr ""
139
 
140
- #: wp-paginate.php:383
141
- msgid ""
142
- "If you would like to contribute, the following is a list of ways you can "
143
- "help:"
144
  msgstr ""
145
 
146
- #: wp-paginate.php:385
147
- msgid "Translate WP-Paginate into your language"
148
  msgstr ""
149
 
150
- #: wp-paginate.php:386
151
- msgid "Blog about or link to WP-Paginate so others can find out about it"
152
  msgstr ""
153
 
154
- #: wp-paginate.php:387
155
- msgid "Report issues, provide feedback, request features, etc."
156
  msgstr ""
157
 
158
- #: wp-paginate.php:388
159
- msgid "Rate WP-Paginate on the WordPress Plugins Page"
160
  msgstr ""
161
 
162
- #: wp-paginate.php:389
163
- msgid "Make a donation"
164
  msgstr ""
165
 
166
- #: wp-paginate.php:391
167
- msgid "Other Links"
168
  msgstr ""
169
 
170
- #. Plugin Name of the plugin/theme
171
- msgid "WP-Paginate"
172
  msgstr ""
173
 
174
- #. Plugin URI of the plugin/theme
175
- msgid "http://www.studiofuel.com/wp-paginate/"
 
 
 
176
  msgstr ""
177
 
178
- #. Description of the plugin/theme
179
- msgid ""
180
- "A simple and flexible pagination plugin for WordPress posts and comments."
 
 
 
 
 
 
 
 
 
 
 
181
  msgstr ""
182
 
183
- #. Author of the plugin/theme
184
- msgid "Noah Cinquini"
185
  msgstr ""
186
 
187
- #. Author URI of the plugin/theme
188
- msgid "http://www.studiofuel.com"
189
  msgstr ""
3
  # This file is distributed under the same license as the WP-Paginate package.
4
  # Noah Cinquini <noah@studiofuel.com>, 2014.
5
  #
 
6
  msgid ""
7
  msgstr ""
8
+ "Project-Id-Version: WP-Paginate 1.33\n"
9
  "Report-Msgid-Bugs-To: http://wordpress.org/tag/wp-paginate\n"
10
+ "POT-Creation-Date: 2017-01-14 20:08+0100\n"
11
+ "PO-Revision-Date: 2017-01-14 20:08+0100\n"
12
+ "Last-Translator: Maxgalleria <support@maxfoundry.com>\n"
13
+ "Language-Team: <support@maxfoundry.com>\n"
14
+ "Language: en_US\n"
15
  "MIME-Version: 1.0\n"
16
+ "Content-Type: text/plain; charset=UTF-8\n"
17
  "Content-Transfer-Encoding: 8bit\n"
18
+ "Plural-Forms: nplurals=2; plural=(n != 1);\n"
19
+ "X-Generator: Poedit 1.6.9\n"
20
+ "X-Poedit-Basepath: .\n"
21
+ "X-Poedit-SourceCharset: UTF-8\n"
22
+ "X-Poedit-KeywordsList: __;_e\n"
23
+ "X-Poedit-SearchPath-0: ..\n"
24
 
25
+ #: ../wp-paginate.php:128
26
+ msgid "Function only"
27
+ msgstr ""
28
+
29
+ #: ../wp-paginate.php:129
30
+ msgid "Below the Content"
31
+ msgstr ""
32
+
33
+ #: ../wp-paginate.php:130
34
+ msgid "Above the Content"
35
+ msgstr ""
36
+
37
+ #: ../wp-paginate.php:131
38
+ msgid "Above and Below the Content"
39
+ msgstr ""
40
+
41
+ #: ../wp-paginate.php:135
42
+ msgid "inherit"
43
+ msgstr ""
44
+
45
+ #: ../wp-paginate.php:136
46
+ msgid "initial"
47
+ msgstr ""
48
+
49
+ #: ../wp-paginate.php:137
50
+ msgid "Arial"
51
+ msgstr ""
52
+
53
+ #: ../wp-paginate.php:138
54
+ msgid "Georgia"
55
+ msgstr ""
56
+
57
+ #: ../wp-paginate.php:139
58
+ msgid "Tahoma"
59
+ msgstr ""
60
+
61
+ #: ../wp-paginate.php:140
62
+ msgid "Times New Roman"
63
+ msgstr ""
64
+
65
+ #: ../wp-paginate.php:141
66
+ msgid "Trebuchet MS"
67
+ msgstr ""
68
+
69
+ #: ../wp-paginate.php:142
70
+ msgid "Verdana"
71
+ msgstr ""
72
+
73
+ #: ../wp-paginate.php:146
74
+ msgid "Grey Buttons"
75
+ msgstr ""
76
+
77
+ #: ../wp-paginate.php:147
78
+ msgid "Blue Buttons"
79
+ msgstr ""
80
+
81
+ #: ../wp-paginate.php:471 ../wp-paginate.php:527
82
  msgid "Settings"
83
  msgstr ""
84
 
85
+ #: ../wp-paginate.php:514
86
  msgid "Success! Your changes were successfully saved!"
87
  msgstr ""
88
 
89
+ #: ../wp-paginate.php:517
90
  msgid "Whoops! There was a problem with the data you posted. Please try again."
91
  msgstr ""
92
 
93
+ #: ../wp-paginate.php:528
94
+ msgid "Custom CSS"
95
+ msgstr ""
96
+
97
+ #: ../wp-paginate.php:529
98
+ msgid "Upgrade to Pro"
99
+ msgstr ""
100
+
101
+ #: ../wp-paginate.php:536
102
+ msgid "General"
103
+ msgstr ""
104
+
105
+ #: ../wp-paginate.php:539
106
  msgid "Pagination Label:"
107
  msgstr ""
108
 
109
+ #: ../wp-paginate.php:541
110
+ msgid "The optional text/HTML to display before the list of pages."
111
  msgstr ""
112
 
113
+ #: ../wp-paginate.php:544
114
  msgid "Previous Page:"
115
  msgstr ""
116
 
117
+ #: ../wp-paginate.php:546
118
  msgid "The text/HTML to display for the previous page link."
119
  msgstr ""
120
 
121
+ #: ../wp-paginate.php:549
122
  msgid "Next Page:"
123
  msgstr ""
124
 
125
+ #: ../wp-paginate.php:551
126
  msgid "The text/HTML to display for the next page link."
127
  msgstr ""
128
 
129
+ #: ../wp-paginate.php:555
130
+ msgid "Location &amp; Position"
131
+ msgstr ""
132
+
133
+ #: ../wp-paginate.php:558
134
+ msgid "Everywhere:"
135
+ msgstr ""
136
+
137
+ #: ../wp-paginate.php:560
138
+ msgid "Display pagination everywhere. (Comments pagination not included.)"
139
+ msgstr ""
140
+
141
+ #: ../wp-paginate.php:563
142
+ msgid "Home Page:"
143
+ msgstr ""
144
+
145
+ #: ../wp-paginate.php:565
146
+ msgid "Display pagination on the home page."
147
+ msgstr ""
148
+
149
+ #: ../wp-paginate.php:568
150
+ msgid "Blog Page:"
151
+ msgstr ""
152
+
153
+ #: ../wp-paginate.php:570
154
+ msgid "Display pagination on the blog page."
155
+ msgstr ""
156
+
157
+ #: ../wp-paginate.php:573
158
+ msgid "Search Page:"
159
+ msgstr ""
160
+
161
+ #: ../wp-paginate.php:575
162
+ msgid "Display pagination on the search page."
163
+ msgstr ""
164
+
165
+ #: ../wp-paginate.php:578
166
+ msgid "Category Pages:"
167
+ msgstr ""
168
+
169
+ #: ../wp-paginate.php:580
170
+ msgid "Display pagination on category pages."
171
+ msgstr ""
172
+
173
+ #: ../wp-paginate.php:583
174
+ msgid "Archive Pages:"
175
+ msgstr ""
176
+
177
+ #: ../wp-paginate.php:585
178
+ msgid "Display pagination on archive pages."
179
+ msgstr ""
180
+
181
+ #: ../wp-paginate.php:610
182
+ msgid "Position:"
183
+ msgstr ""
184
+
185
+ #: ../wp-paginate.php:618
186
+ msgid "Where to display the pagination on the page."
187
+ msgstr ""
188
+
189
+ #: ../wp-paginate.php:621
190
+ msgid "Hide Standard Pagination:"
191
+ msgstr ""
192
+
193
+ #: ../wp-paginate.php:623
194
+ msgid "Hide the standard theme default pagaination."
195
+ msgstr ""
196
+
197
+ #: ../wp-paginate.php:627
198
+ msgid "Apperance"
199
+ msgstr ""
200
+
201
+ #: ../wp-paginate.php:630
202
+ msgid "Pagination Font:"
203
+ msgstr ""
204
+
205
+ #: ../wp-paginate.php:638
206
+ msgid "Select the font to use with the pagination."
207
+ msgstr ""
208
+
209
+ #: ../wp-paginate.php:641
210
+ msgid "Button Style:"
211
+ msgstr ""
212
+
213
+ #: ../wp-paginate.php:662
214
  msgid "Advanced Settings"
215
  msgstr ""
216
 
217
+ #: ../wp-paginate.php:665
218
  msgid "Before Markup:"
219
  msgstr ""
220
 
221
+ #: ../wp-paginate.php:667
222
  msgid "The HTML markup to display before the pagination code."
223
  msgstr ""
224
 
225
+ #: ../wp-paginate.php:670
226
  msgid "After Markup:"
227
  msgstr ""
228
 
229
+ #: ../wp-paginate.php:672
230
  msgid "The HTML markup to display after the pagination code."
231
  msgstr ""
232
 
233
+ #: ../wp-paginate.php:675
234
  msgid "Markup Display:"
235
  msgstr ""
236
 
237
+ #: ../wp-paginate.php:677
238
  msgid "Show Before Markup and After Markup, even if the page list is empty?"
239
  msgstr ""
240
 
241
+ #: ../wp-paginate.php:680
242
  msgid "WP-Paginate CSS File:"
243
  msgstr ""
244
 
245
+ #: ../wp-paginate.php:682
246
  #, php-format
247
  msgid ""
248
  "Include the default stylesheet wp-paginate.css? WP-Paginate will first look "
250
  "code>)."
251
  msgstr ""
252
 
253
+ #: ../wp-paginate.php:685
254
  msgid "Page Range:"
255
  msgstr ""
256
 
257
+ #: ../wp-paginate.php:692
258
  msgid ""
259
  "The number of page links to show before and after the current page. "
260
  "Recommended value: 3"
261
  msgstr ""
262
 
263
+ #: ../wp-paginate.php:695
264
  msgid "Page Anchors:"
265
  msgstr ""
266
 
267
+ #: ../wp-paginate.php:702
268
  msgid ""
269
  "The number of links to always show at beginning and end of pagination. "
270
  "Recommended value: 1"
271
  msgstr ""
272
 
273
+ #: ../wp-paginate.php:705
274
  msgid "Page Gap:"
275
  msgstr ""
276
 
277
+ #: ../wp-paginate.php:712
278
  msgid ""
279
  "The minimum number of pages in a gap before an ellipsis (...) is added. "
280
  "Recommended value: 3"
281
  msgstr ""
282
 
283
+ #: ../wp-paginate.php:757
284
  msgid "Need Support?"
285
  msgstr ""
286
 
287
+ #: ../wp-paginate.php:758
288
  #, php-format
289
  msgid ""
290
  "For questions, issues or feature requests, please post them in the %s and "
291
  "make sure to tag the post with wp-paginate."
292
  msgstr ""
293
 
294
+ #: ../wp-paginate.php:804
295
+ msgid "You do not have sufficient permissions to edit plugins for this site."
296
  msgstr ""
297
 
298
+ #: ../wp-paginate.php:833
299
+ #, php-format
300
+ msgid "File %s edited successfully."
 
301
  msgstr ""
302
 
303
+ #: ../wp-paginate.php:835
304
+ msgid "Not enough permissions to create or update the file"
305
  msgstr ""
306
 
307
+ #: ../wp-paginate.php:846
308
+ msgid "Learn more"
309
  msgstr ""
310
 
311
+ #: ../wp-paginate.php:862
312
+ msgid "These styles will be added to the header on all pages of your site."
313
  msgstr ""
314
 
315
+ #: ../wp-paginate.php:866
316
+ msgid "Editing"
317
  msgstr ""
318
 
319
+ #: ../wp-paginate.php:868
320
+ msgid "Browsing"
321
  msgstr ""
322
 
323
+ #: ../wp-paginate.php:871
324
+ msgid "Activate"
325
  msgstr ""
326
 
327
+ #: ../wp-paginate.php:876
328
+ msgid "Save Changes"
329
  msgstr ""
330
 
331
+ #: ../wp-paginate.php:880
332
+ #, php-format
333
+ msgid ""
334
+ "You need to make this files writable before you can save your changes. See "
335
+ "%s the Codex %s for more information."
336
  msgstr ""
337
 
338
+ #: ../wp-paginate.php:989
339
+ msgid "Love WP-Paginate?"
340
+ msgstr ""
341
+
342
+ #: ../wp-paginate.php:990
343
+ msgid "Your rating is a big help! We really appreciate it!"
344
+ msgstr ""
345
+
346
+ #: ../wp-paginate.php:993
347
+ msgid "I've already left a review"
348
+ msgstr ""
349
+
350
+ #: ../wp-paginate.php:994
351
+ msgid "Maybe Later"
352
  msgstr ""
353
 
354
+ #: ../wp-paginate.php:995
355
+ msgid "Sure! I'd love to!"
356
  msgstr ""
357
 
358
+ #: ../wp-paginate.php:1007 ../wp-paginate.php:1021
359
+ msgid "missing nonce!"
360
  msgstr ""
css/wp-paginate-admin.css ADDED
@@ -0,0 +1,228 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ .paginate-info, .mf-plugins {
2
+ color: #000;
3
+ font-size: 26px;
4
+ font-weight: 700;
5
+ line-height: 30px;
6
+ text-align: center;
7
+ }
8
+
9
+ .wpp-plugin-title {
10
+ color: #000;
11
+ font-size: 16px;
12
+ font-weight: 700;
13
+ line-height: 30px;
14
+ margin-top: 10px;
15
+ padding-right: 0px;
16
+ text-align: center;
17
+ }
18
+
19
+ .wpp-plugin-title a {
20
+ color: #000;
21
+ }
22
+
23
+ .mf-plugins {
24
+ margin: 20px 0 50px;
25
+ }
26
+
27
+ .wpp-container {
28
+ margin-right: auto;
29
+ margin-left: auto;
30
+ padding-left: 15px;
31
+ padding-right: 15px;
32
+ }
33
+
34
+ div.col-sm-4.center-block a img {
35
+ height: auto;
36
+ width: 283px;
37
+ display: block;
38
+ }
39
+
40
+ .updated.notice.wpp-notice {
41
+ display: block;
42
+ height: 150px;
43
+ }
44
+
45
+ #wpp-notice-1 {
46
+ display: block;
47
+ float: left;
48
+ height: 128px;
49
+ margin: 10px;
50
+ }
51
+
52
+ #wpp-notice-title {
53
+ font-size: 24px !important;
54
+ margin: 4px 0;
55
+ }
56
+
57
+ #wp-paginate-logo {
58
+ background: rgba(0, 0, 0, 0) url("../images/wp-paginate-logo.png") no-repeat scroll 0 0;
59
+ display: block;
60
+ float: left;
61
+ height: 128px;
62
+ margin: 10px;
63
+ width: 128px;
64
+ }
65
+
66
+ ul#wpp-review-notice-links li {
67
+ display: inline-block;
68
+ float: left;
69
+ margin-right: 20px;
70
+ }
71
+
72
+ a.dashicons.dashicons-dismiss.close-wpp-notice {
73
+ float: right;
74
+ line-height: 148px;
75
+ }
76
+
77
+ a#wpp-review-already, a#wpp-review-later, a#wpp-write-review, a#wpp-dismiss {
78
+ cursor: pointer;
79
+ }
80
+
81
+ .wpp-color-button {
82
+ margin-top: -4px;
83
+ }
84
+
85
+ .wpp-colpick {
86
+ width: 100px;
87
+ }
88
+
89
+ td.mg-align-top {
90
+ vertical-align: top;
91
+ }
92
+
93
+ #wpp-plugins {
94
+ height: 380px;
95
+ max-width: 1100px
96
+ }
97
+
98
+ .column-left {
99
+ float: left;
100
+ width: 280px;
101
+ padding: 0 3%;
102
+ }
103
+ .column-center {
104
+ float: left;
105
+ width: 280px;
106
+ padding: 0 3%;
107
+ }
108
+ .column-right {
109
+ float: left;
110
+ width: 280px;
111
+ padding: 0 3%;
112
+ }
113
+
114
+ .column-right img,
115
+ .column-center img,
116
+ .column-left img {
117
+ display: block;
118
+ height: auto;
119
+ max-width: 283px;
120
+ width: 100%;
121
+ margin: 0 auto;
122
+ }
123
+
124
+ .wpp-plugin-title {
125
+ text-align: center;
126
+ }
127
+
128
+ #utp-content {
129
+ width: 100%;
130
+ }
131
+
132
+ #mf-logo {
133
+ float: right;
134
+ margin-top: 30px;
135
+ }
136
+
137
+ .buy-now-button {
138
+ display: block;
139
+ height: 68px;
140
+ margin: 0 auto;
141
+ width: 205px;
142
+ }
143
+
144
+ #utp-title-wrap {
145
+ position: relative
146
+ }
147
+
148
+ #utp-title {
149
+ float: left;
150
+ font-size: 40px;
151
+ margin-top: 24px;
152
+ position: absolute;
153
+ text-align: left;
154
+ width: 400px;
155
+ }
156
+
157
+ #wppp-logo {
158
+ display: block;
159
+ height: 61px;
160
+ margin: 40px auto 0;
161
+ width: 169px;
162
+ }
163
+
164
+ #wppp-buttons img {
165
+ display: block;
166
+ height: auto;
167
+ margin: 50px auto 0;
168
+ max-width: 646px;
169
+ width: 100%;
170
+ }
171
+
172
+ .utp-text {
173
+ font-size: 28px;
174
+ font-weight: 700;
175
+ line-height: 43px;
176
+ text-align: center;
177
+ margin-top: 20px;
178
+ }
179
+
180
+ #wppp-customizer img {
181
+ display: block;
182
+ height: auto;
183
+ margin: 50px auto 0;
184
+ max-width: 650px;
185
+ width: 100%;
186
+ }
187
+
188
+ @media (max-width: 1168px) {
189
+
190
+ #utp-title-wrap {
191
+ position: static;
192
+ }
193
+
194
+ #utp-title {
195
+ float: none;
196
+ font-size: 40px;
197
+ line-height: 50px;
198
+ margin-top: 24px;
199
+ position: static;
200
+ text-align: left;
201
+ width: 100%;
202
+ padding-bottom: 50px;
203
+ }
204
+
205
+ }
206
+
207
+ @media (max-width: 768px) {
208
+
209
+ .column-left,
210
+ .column-center,
211
+ .column-right {
212
+ position: static;
213
+ width: 100%;
214
+ margin-left: auto;
215
+ }
216
+
217
+ .column-center,
218
+ .column-left {
219
+ margin-bottom: 30px;
220
+ }
221
+
222
+ }
223
+
224
+ @media (max-width: 680px) {
225
+ #utp-title {
226
+ text-align: center;
227
+ }
228
+ }
wp-paginate-rtl.css → css/wp-paginate-rtl.css RENAMED
File without changes
css/wp-paginate.css ADDED
@@ -0,0 +1,104 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ /*
2
+ * WP-Paginate - WordPress Pagination Function
3
+ * Revision: $Id: wp-paginate.css 1044618 2014-12-14 23:43:29Z emartin24 $
4
+ * Copyright 2014 Studio Fuel (http://www.studiofuel.com)
5
+ */
6
+ .wp-paginate {padding:0; margin:0;}
7
+ .wp-paginate li {display:inline; list-style:none;}
8
+ .wp-paginate a {background:#ddd; border:1px solid #ccc; color:#666; margin-right:4px; padding:4px 8px; text-align:center; text-decoration:none;}
9
+ .wp-paginate a:hover, .wp-paginate a:active {background:#ccc; color:#888;}
10
+ .wp-paginate .title {color:#555; margin-right:4px;}
11
+ .wp-paginate .gap {color:#999; margin-right:4px;}
12
+ .wp-paginate .current {color:#fff; background:#5f87ae; border:1px solid #89adcf; margin-right:4px; padding:4px 8px;}
13
+ .wp-paginate .page {}
14
+ .wp-paginate .prev, .wp-paginate .next {}
15
+
16
+ /* style overrides for comments pagination */
17
+ .wp-paginate-comments {}
18
+ .wp-paginate-comments li {}
19
+ .wp-paginate-comments a {}
20
+ .wp-paginate-comments a:hover, .wp-paginate-comments a:active {}
21
+ .wp-paginate-comments .title {}
22
+ .wp-paginate-comments .gap {}
23
+ .wp-paginate-comments .current {}
24
+ .wp-paginate-comments .page {}
25
+ .wp-paginate-comments .prev, .wp-paginate-comments .next {}
26
+
27
+ ol.wp-paginate li {
28
+ line-height: 3em;
29
+ /*white-space: nowrap;*/
30
+ }
31
+
32
+ /* Fonts */
33
+ .wp-paginate.font-arial {font-family: Arial, sans-serif;}
34
+ .wp-paginate.font-georgia {font-family: Georgia, serif;}
35
+ .wp-paginate.font-inherit {font-family: inherit;}
36
+ .wp-paginate.font-initial {font-family: initial;}
37
+ .wp-paginate.font-tahoma {font-family: Tahoma, sans-serif;}
38
+ .wp-paginate.font-times {font-family: "Times New Roman", serif;}
39
+ .wp-paginate.font-trebuchet {font-family: "Trebuchet MS", sans-serif;}
40
+ .wp-paginate.font-verdana {font-family: Verdana, sans-serif;}
41
+
42
+
43
+ /* Theme: Free-Standing Numbers */
44
+ .wp-paginate.wpp-numbers a, .wp-paginate.wpp-numbers .current {
45
+ background: transparent;
46
+ border: none;
47
+ }
48
+ .wp-paginate.wpp-numbers .current {
49
+ color: #ccc;
50
+ }
51
+
52
+ /* Theme: Peach Buttons */
53
+ .wp-paginate.wpp-peach a, .wp-paginate.wpp-peach .current {
54
+ background: #ffcaaf;
55
+ border:none;
56
+ border-radius: 4px;
57
+ color: #908c90;
58
+ }
59
+ .wp-paginate.wpp-peach .current {
60
+ opacity: .6;
61
+ }
62
+
63
+
64
+ /* Theme: Outlined Buttons */
65
+ .wp-paginate.wpp-outlined a, .wp-paginate.wpp-outlined .current {
66
+ background: #fff;
67
+ border: 2px solid #ababab;
68
+ border-radius: 6px;
69
+ color: #ababab;
70
+ padding: 6px 12px;
71
+ }
72
+ .wp-paginate.wpp-outlined a:hover {
73
+ color: #000;
74
+ }
75
+ .wp-paginate.wpp-outlined .current {
76
+ opacity: .6;
77
+ }
78
+
79
+ /* Theme: Modern Grey Buttons */
80
+ .wp-paginate.wpp-modern-grey a, .wp-paginate.wpp-modern-grey .current {
81
+ background: #f8f8f8;
82
+ border:1px solid #efecee;
83
+ border-radius: 4px;
84
+ color: #000;
85
+ padding: 3px 6px;
86
+ }
87
+ .wp-paginate.wpp-modern-grey a:hover {
88
+ background: #eee;
89
+ }
90
+ .wp-paginate.wpp-modern-grey .current {
91
+ opacity: .3;
92
+ }
93
+
94
+ /* Theme: Blue CTA Buttons */
95
+ .wp-paginate.wpp-blue-cta a, .wp-paginate.wpp-blue-cta .current {
96
+ background: #3784fd;
97
+ border:2px solid #fff;
98
+ border-radius: 2px;
99
+ box-shadow: 1px 1px 1px #c1c1c1, -1px -1px 1px #c1c1c1, inset 0 -10px 10px rgba(0, 0, 0, .2);
100
+ color: #fff;
101
+ }
102
+ .wp-paginate.wpp-blue-cta .current {
103
+ opacity: .6;
104
+ }
images/MBP.png ADDED
Binary file
images/MG_logo.png ADDED
Binary file
images/MLPP-card-red.png ADDED
Binary file
images/blue-cta-buttons.jpg ADDED
Binary file
images/buy-now-btn.png ADDED
Binary file
images/default.jpg ADDED
Binary file
images/max-foundry.png ADDED
Binary file
images/modern-grey-buttons.jpg ADDED
Binary file
images/numbers.jpg ADDED
Binary file
images/outlined-buttons.jpg ADDED
Binary file
images/peach.jpg ADDED
Binary file
images/screenshot-2.png ADDED
Binary file
images/wp-paginate-logo.png ADDED
Binary file
images/wpp-pro-logo-2.png ADDED
Binary file
images/wppp-buttons.png ADDED
Binary file
images/wppp-customizer.png ADDED
Binary file
js/wp-paginate.js ADDED
@@ -0,0 +1,33 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ jQuery(document).ready(function(){
2
+
3
+ jQuery("#wpp-review-already, #wpp-dismiss").click(function(){
4
+ jQuery.ajax({
5
+ type: "POST",
6
+ async: true,
7
+ data: { action: "wpp_dismiss_notice", nonce: wpp_ajax.nonce },
8
+ url : wpp_ajax.ajaxurl,
9
+ dataType: "html",
10
+ success: function (data) {
11
+ jQuery(".wpp-notice").hide();
12
+ },
13
+ error: function (err)
14
+ { alert(err.responseText);}
15
+ });
16
+ });
17
+
18
+ jQuery("#wpp-review-later").click(function(){
19
+ jQuery.ajax({
20
+ type: "POST",
21
+ async: true,
22
+ data: { action: "wpp_set_review_later", nonce: wpp_ajax.nonce },
23
+ url : wpp_ajax.ajaxurl,
24
+ dataType: "html",
25
+ success: function (data) {
26
+ jQuery(".wpp-notice").hide();
27
+ },
28
+ error: function (err)
29
+ { alert(err.responseText);}
30
+ });
31
+ });
32
+
33
+ });
readme.txt CHANGED
@@ -3,7 +3,7 @@ Contributors: maxfoundry, emartin24, AlanP57
3
  Tags: paginate, pagination, navigation, page, wp-paginate, comments, rtl, seo, usability
4
  Requires at least: 2.6.0 (2.7.0 for comments pagination)
5
  Tested up to: 4.7.1
6
- Stable tag: 1.3.4
7
  License: GPLv2 or later
8
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
9
 
@@ -159,6 +159,14 @@ Example (also applies to `wp_paginate_comments()`):
159
  When calling `wp_paginate_comments()`, WP-Paginate adds an extra class to the `ol` element, `wp-paginate-comments`.
160
 
161
  == Changelog ==
 
 
 
 
 
 
 
 
162
  = 1.3.4=
163
  * Tested with WordPress 4.7.1
164
 
3
  Tags: paginate, pagination, navigation, page, wp-paginate, comments, rtl, seo, usability
4
  Requires at least: 2.6.0 (2.7.0 for comments pagination)
5
  Tested up to: 4.7.1
6
+ Stable tag: 2.0.0
7
  License: GPLv2 or later
8
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
9
 
159
  When calling `wp_paginate_comments()`, WP-Paginate adds an extra class to the `ol` element, `wp-paginate-comments`.
160
 
161
  == Changelog ==
162
+ = 2.0.0 =
163
+ * Added new button styles
164
+ * Added the ability to select the font
165
+ * Updated the translation file
166
+ * Added the ability to add pagination without editing theme files. This applies to posts but not to comments.
167
+ * Added the ability to hide the standard theme pagination. This applies to posts but not to comments.
168
+ * Added a review notice
169
+
170
  = 1.3.4=
171
  * Tested with WordPress 4.7.1
172
 
screenshot-2.png CHANGED
Binary file
wp-paginate.css DELETED
@@ -1,25 +0,0 @@
1
- /*
2
- * WP-Paginate - WordPress Pagination Function
3
- * Revision: $Id: wp-paginate.css 1044618 2014-12-14 23:43:29Z emartin24 $
4
- * Copyright 2014 Studio Fuel (http://www.studiofuel.com)
5
- */
6
- .wp-paginate {padding:0; margin:0;}
7
- .wp-paginate li {display:inline; list-style:none;}
8
- .wp-paginate a {background:#ddd; border:1px solid #ccc; color:#666; margin-right:4px; padding:4px 8px; text-align:center; text-decoration:none;}
9
- .wp-paginate a:hover, .wp-paginate a:active {background:#ccc; color:#888;}
10
- .wp-paginate .title {color:#555; margin-right:4px;}
11
- .wp-paginate .gap {color:#999; margin-right:4px;}
12
- .wp-paginate .current {color:#fff; background:#5f87ae; border:1px solid #89adcf; margin-right:4px; padding:4px 8px;}
13
- .wp-paginate .page {}
14
- .wp-paginate .prev, .wp-paginate .next {}
15
-
16
- /* style overrides for comments pagination */
17
- .wp-paginate-comments {}
18
- .wp-paginate-comments li {}
19
- .wp-paginate-comments a {}
20
- .wp-paginate-comments a:hover, .wp-paginate-comments a:active {}
21
- .wp-paginate-comments .title {}
22
- .wp-paginate-comments .gap {}
23
- .wp-paginate-comments .current {}
24
- .wp-paginate-comments .page {}
25
- .wp-paginate-comments .prev, .wp-paginate-comments .next {}
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
wp-paginate.php CHANGED
@@ -3,9 +3,10 @@
3
  Plugin Name: WP-Paginate
4
  Plugin URI: https://wordpress.org/plugins/wp-paginate/
5
  Description: A simple and flexible pagination plugin for WordPress posts and comments.
6
- Version: 1.3.4
7
  Author: Max Foundry
8
  Author URI: http://maxfoundry.com
 
9
  */
10
 
11
  /* Copyright 2016 Max Foundry (http://www.maxfoundry.com)
@@ -28,6 +29,19 @@ Author URI: http://maxfoundry.com
28
  Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
29
  */
30
 
 
 
 
 
 
 
 
 
 
 
 
 
 
31
  /**
32
  * Set the wp-content and plugin urls/paths
33
  */
@@ -45,42 +59,49 @@ if (!class_exists('WPPaginate')) {
45
  /**
46
  * @var string The plugin version
47
  */
48
- var $version = '1.3.4';
49
 
50
  /**
51
  * @var string The options string name for this plugin
52
  */
53
- var $optionsName = 'wp_paginate_options';
54
 
55
  /**
56
  * @var string $localizationDomain Domain used for localization
57
  */
58
- var $localizationDomain = 'wp-paginate';
59
 
60
  /**
61
  * @var string $pluginurl The url to this plugin
62
  */
63
- var $pluginurl = '';
64
  /**
65
  * @var string $pluginpath The path to this plugin
66
  */
67
- var $pluginpath = '';
68
 
69
  /**
70
  * @var array $options Stores the options for this plugin
71
  */
72
- var $options = array();
73
 
74
- var $type = 'posts';
 
 
75
 
76
- /**
 
 
 
 
77
  * Constructor
78
  */
79
  function __construct() {
80
  $name = dirname(plugin_basename(__FILE__));
81
-
 
82
  //Language Setup
83
- load_plugin_textdomain($this->localizationDomain, false, "$name/I18n/");
84
 
85
  //"Constants" setup
86
  $this->pluginurl = plugins_url($name) . "/";
@@ -90,20 +111,156 @@ if (!class_exists('WPPaginate')) {
90
  $this->get_options();
91
 
92
  //Actions
 
93
  add_action('admin_menu', array(&$this, 'admin_menu_link'));
94
  add_action('admin_enqueue_scripts', array($this, 'wpp_admin_head'));
95
  add_action('wp_enqueue_scripts', array($this, 'wpp_enqueue_custom_css'), 20);
96
-
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
97
  if ($this->options['css'])
98
  add_action('wp_print_styles', array(&$this, 'wp_paginate_css'));
99
  }
100
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
101
  function wpp_admin_head($hook) {
102
- //error_log("wpp_admin_head $hook " . $_REQUEST['page'] . " " . $_GET['action']);
103
  if ( isset( $_REQUEST['page'] ) && 'wp-paginate.php' == $_REQUEST['page'] ) {
 
104
  if ( isset( $_GET['action'] ) && 'custom_css' == $_GET['action'] )
105
  $this->wpp_include_codemirror();
106
  }
 
 
 
 
 
 
 
 
 
 
 
 
107
  }
108
 
109
  function wpp_enqueue_custom_css() {
@@ -124,6 +281,10 @@ if (!class_exists('WPPaginate')) {
124
 
125
  $r = wp_parse_args($args, $this->options);
126
  extract($r, EXTR_SKIP);
 
 
 
 
127
 
128
  if (!isset($page) && !isset($pages)) {
129
  global $wp_query;
@@ -148,9 +309,14 @@ if (!class_exists('WPPaginate')) {
148
  ? esc_url(get_pagenum_link($page + 1))
149
  : get_comments_pagenum_link($page + 1);
150
 
151
- $output = stripslashes($before);
152
  if ($pages > 1) {
153
- $output .= sprintf('<ol class="wp-paginate%s">', ($this->type === 'posts') ? '' : ' wp-paginate-comments');
 
 
 
 
 
154
  if (strlen(stripslashes($title)) > 0) {
155
  $output .= sprintf('<li><span class="title">%s</span></li>', stripslashes($title));
156
  }
@@ -198,7 +364,7 @@ if (!class_exists('WPPaginate')) {
198
  }
199
  $output .= "</ol>";
200
  }
201
- $output .= stripslashes($after);
202
 
203
  if ($pages > 1 || $empty) {
204
  echo $output;
@@ -220,7 +386,7 @@ if (!class_exists('WPPaginate')) {
220
  }
221
 
222
  function wp_paginate_css() {
223
- $name = "wp-paginate.css";
224
 
225
  if (false !== @file_exists(STYLESHEETPATH . "/$name")) {
226
  $css = get_stylesheet_directory_uri() . "/$name";
@@ -231,7 +397,7 @@ if (!class_exists('WPPaginate')) {
231
  wp_enqueue_style('wp-paginate', $css, false, $this->version, 'screen');
232
 
233
  if (function_exists('is_rtl') && is_rtl()) {
234
- $name = "wp-paginate-rtl.css";
235
  if (false !== @file_exists(STYLESHEETPATH . "/$name")) {
236
  $css = get_stylesheet_directory_uri() . "/$name";
237
  }
@@ -240,6 +406,9 @@ if (!class_exists('WPPaginate')) {
240
  }
241
  wp_enqueue_style('wp-paginate-rtl', $css, false, $this->version, 'screen');
242
  }
 
 
 
243
  }
244
 
245
  /**
@@ -258,7 +427,17 @@ if (!class_exists('WPPaginate')) {
258
  'empty' => true,
259
  'range' => 3,
260
  'anchor' => 1,
261
- 'gap' => 3
 
 
 
 
 
 
 
 
 
 
262
  );
263
  update_option($this->optionsName, $options);
264
  }
@@ -268,6 +447,12 @@ if (!class_exists('WPPaginate')) {
268
  * Saves the admin options to the database.
269
  */
270
  function save_admin_options(){
 
 
 
 
 
 
271
  return update_option($this->optionsName, $this->options);
272
  }
273
 
@@ -283,7 +468,7 @@ if (!class_exists('WPPaginate')) {
283
  * @desc Adds the Settings link to the plugin activate/deactivate page
284
  */
285
  function filter_plugin_actions($links, $file) {
286
- $settings_link = '<a href="options-general.php?page=' . basename(__FILE__) . '">' . __('Settings', $this->localizationDomain) . '</a>';
287
  array_unshift($links, $settings_link); // before other links
288
 
289
  return $links;
@@ -295,114 +480,244 @@ if (!class_exists('WPPaginate')) {
295
  function admin_options_page() {
296
  if (isset($_POST['wp_paginate_save'])) {
297
  if (wp_verify_nonce($_POST['_wpnonce'], 'wp-paginate-update-options')) {
298
- $this->options['title'] = $_POST['title'];
299
- $this->options['previouspage'] = $_POST['previouspage'];
300
- $this->options['nextpage'] = $_POST['nextpage'];
301
- $this->options['before'] = $_POST['before'];
302
- $this->options['after'] = $_POST['after'];
 
 
 
 
 
303
  $this->options['empty'] = (isset($_POST['empty']) && $_POST['empty'] === 'on') ? true : false;
304
  $this->options['css'] = (isset($_POST['css']) && $_POST['css'] === 'on') ? true : false;
305
  $this->options['range'] = intval($_POST['range']);
306
  $this->options['anchor'] = intval($_POST['anchor']);
307
  $this->options['gap'] = intval($_POST['gap']);
308
-
 
 
 
 
 
 
 
 
 
 
 
 
 
309
  $this->save_admin_options();
310
 
311
- echo '<div class="updated"><p>' . __('Success! Your changes were successfully saved!', $this->localizationDomain) . '</p></div>';
312
  }
313
  else {
314
- echo '<div class="error"><p>' . __('Whoops! There was a problem with the data you posted. Please try again.', $this->localizationDomain) . '</p></div>';
315
  }
316
  }
 
317
  ?>
318
 
319
  <div class="wrap">
320
  <div class="icon32" id="icon-options-general"><br/></div>
321
  <h1>WP-Paginate</h1>
322
  <h2 class="nav-tab-wrapper">
323
- <a class="nav-tab<?php if ( ! isset( $_GET['action'] ) ) echo ' nav-tab-active'; ?>" href="options-general.php?page=wp-paginate.php"><?php _e( 'Settings', $this->localizationDomain ); ?></a>
324
- <a class="nav-tab <?php if ( isset( $_GET['action'] ) && 'custom_css' == $_GET['action'] ) echo ' nav-tab-active'; ?>" href="options-general.php?page=wp-paginate.php&amp;action=custom_css"><?php _e( 'Custom CSS', $this->localizationDomain ); ?></a>
 
325
  </h2>
326
 
327
  <?php if ( ! isset( $_GET['action'] ) || $_GET['action'] == 'appearance' ) { ?>
328
 
329
  <form method="post" id="wp_paginate_options">
330
  <?php wp_nonce_field('wp-paginate-update-options'); ?>
 
331
  <table class="form-table">
332
  <tr valign="top">
333
- <th scope="row"><?php _e('Pagination Label:', $this->localizationDomain); ?></th>
334
  <td><input name="title" type="text" id="title" size="40" value="<?php echo stripslashes(htmlspecialchars($this->options['title'])); ?>"/>
335
- <span class="description"><?php _e('The text/HTML to display before the list of pages.', $this->localizationDomain); ?></span></td>
336
  </tr>
337
  <tr valign="top">
338
- <th scope="row"><?php _e('Previous Page:', $this->localizationDomain); ?></th>
339
  <td><input name="previouspage" type="text" id="previouspage" size="40" value="<?php echo stripslashes(htmlspecialchars($this->options['previouspage'])); ?>"/>
340
- <span class="description"><?php _e('The text/HTML to display for the previous page link.', $this->localizationDomain); ?></span></td>
341
  </tr>
342
  <tr valign="top">
343
- <th scope="row"><?php _e('Next Page:', $this->localizationDomain); ?></th>
344
  <td><input name="nextpage" type="text" id="nextpage" size="40" value="<?php echo stripslashes(htmlspecialchars($this->options['nextpage'])); ?>"/>
345
- <span class="description"><?php _e('The text/HTML to display for the next page link.', $this->localizationDomain); ?></span></td>
346
  </tr>
347
  </table>
348
  <p>&nbsp;</p>
349
- <h3><?php _e('Advanced Settings', $this->localizationDomain); ?></h3>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
350
  <table class="form-table">
351
  <tr valign="top">
352
- <th scope="row"><?php _e('Before Markup:', $this->localizationDomain); ?></th>
353
- <td><input name="before" type="text" id="before" size="40" value="<?php echo stripslashes(htmlspecialchars($this->options['before'])); ?>"/>
354
- <span class="description"><?php _e('The HTML markup to display before the pagination code.', $this->localizationDomain); ?></span></td>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
355
  </tr>
 
 
 
 
356
  <tr valign="top">
357
- <th scope="row"><?php _e('After Markup:', $this->localizationDomain); ?></th>
358
- <td><input name="after" type="text" id="after" size="40" value="<?php echo stripslashes(htmlspecialchars($this->options['after'])); ?>"/>
359
- <span class="description"><?php _e('The HTML markup to display after the pagination code.', $this->localizationDomain); ?></span></td>
360
  </tr>
361
  <tr valign="top">
362
- <th scope="row"><?php _e('Markup Display:', $this->localizationDomain); ?></th>
 
 
 
 
 
363
  <td><label for="empty">
364
- <input type="checkbox" id="empty" name="empty" <?php echo ($this->options['empty'] === true) ? "checked='checked'" : ""; ?>/> <?php _e('Show Before Markup and After Markup, even if the page list is empty?', $this->localizationDomain); ?></label></td>
365
  </tr>
366
  <tr valign="top">
367
- <th scope="row"><?php _e('WP-Paginate CSS File:', $this->localizationDomain); ?></th>
368
  <td><label for="css">
369
- <input type="checkbox" id="css" name="css" <?php echo ($this->options['css'] === true) ? "checked='checked'" : ""; ?>/> <?php printf(__('Include the default stylesheet wp-paginate.css? WP-Paginate will first look for <code>wp-paginate.css</code> in your theme directory (<code>themes/%s</code>).', $this->localizationDomain), get_template()); ?></label></td>
370
  </tr>
371
  <tr valign="top">
372
- <th scope="row"><?php _e('Page Range:', $this->localizationDomain); ?></th>
373
  <td>
374
  <select name="range" id="range">
375
  <?php for ($i=1; $i<=10; $i++) : ?>
376
  <option value="<?php echo $i; ?>" <?php echo ($i == $this->options['range']) ? "selected='selected'" : ""; ?>><?php echo $i; ?></option>
377
  <?php endfor; ?>
378
  </select>
379
- <span class="description"><?php _e('The number of page links to show before and after the current page. Recommended value: 3', $this->localizationDomain); ?></span></td>
380
  </tr>
381
  <tr valign="top">
382
- <th scope="row"><?php _e('Page Anchors:', $this->localizationDomain); ?></th>
383
  <td>
384
  <select name="anchor" id="anchor">
385
  <?php for ($i=0; $i<=10; $i++) : ?>
386
  <option value="<?php echo $i; ?>" <?php echo ($i == $this->options['anchor']) ? "selected='selected'" : ""; ?>><?php echo $i; ?></option>
387
  <?php endfor; ?>
388
  </select>
389
- <span class="description"><?php _e('The number of links to always show at beginning and end of pagination. Recommended value: 1', $this->localizationDomain); ?></span></td>
390
  </tr>
391
  <tr valign="top">
392
- <th scope="row"><?php _e('Page Gap:', $this->localizationDomain); ?></th>
393
  <td>
394
  <select name="gap" id="gap">
395
  <?php for ($i=1; $i<=10; $i++) : ?>
396
  <option value="<?php echo $i; ?>" <?php echo ($i == $this->options['gap']) ? "selected='selected'" : ""; ?>><?php echo $i; ?></option>
397
  <?php endfor; ?>
398
  </select>
399
- <span class="description"><?php _e('The minimum number of pages in a gap before an ellipsis (...) is added. Recommended value: 3', $this->localizationDomain); ?></span></td>
400
  </tr>
401
  </table>
402
  <p class="submit">
403
  <input type="submit" id="wpp-save-changes" value="Save Changes" name="wp_paginate_save" class="button-primary" />
404
  </p>
405
  </form>
 
 
406
  <script>
407
  jQuery(document).ready(function(){
408
 
@@ -428,30 +743,52 @@ if (!class_exists('WPPaginate')) {
428
 
429
 
430
  </script>
431
-
432
-
433
-
 
434
  <?php } elseif ( 'custom_css' == $_GET['action'] ) { ?>
435
  <h2>Custom CSS</h2>
436
  <?php $this->wpp_custom_code_tab(); ?>
 
 
437
  <?php } ?>
438
 
439
- <h2><?php _e('Need Support?', $this->localizationDomain); ?></h2>
440
- <p><?php printf(__('For questions, issues or feature requests, please post them in the %s and make sure to tag the post with wp-paginate.', $this->localizationDomain), '<a href="https://wordpress.org/support/plugin/wp-paginate">WordPress Forum</a>'); ?></p>
441
- <h2><?php _e('Want To Contribute?', $this->localizationDomain); ?></h2>
442
- <p><?php _e('If you would like to contribute, the following is a list of ways you can help:', $this->localizationDomain); ?></p>
443
- <ul>
444
- <li>&raquo; <?php _e('Translate WP-Paginate into your language', $this->localizationDomain); ?></li>
445
- <li>&raquo; <?php _e('Blog about or link to WP-Paginate so others can find out about it', $this->localizationDomain); ?></li>
446
- <li>&raquo; <?php _e('Report issues, provide feedback, request features, etc.', $this->localizationDomain); ?></li>
447
- <li>&raquo; <a href="https://wordpress.org/support/view/plugin-reviews/wp-paginate"><?php _e('Review WP-Paginate on the WordPress Plugins Page', $this->localizationDomain); ?></a></li>
448
- </ul>
449
- <h2><?php _e('Max Foundry WordPress Plugins', $this->localizationDomain); ?></h2>
450
- <ul>
451
- <li>&raquo; <a href="https://maxbuttons.com">MaxButtons WordPress Button Plugin</a></li>
452
- <li>&raquo; <a href="https://maxgalleria.com">MaxGalleria WordPress Gallery Plugin</a></li>
453
- <li>&raquo; <a href="https://maxgalleria.com/media-library-plus/">Media Library Plus</a>
454
- </ul>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
455
  </div>
456
 
457
  <?php
@@ -464,7 +801,7 @@ if (!class_exists('WPPaginate')) {
464
 
465
  function wpp_custom_code_tab() {
466
  if ( ! current_user_can( 'edit_plugins' ) )
467
- wp_die( __( 'You do not have sufficient permissions to edit plugins for this site.', $this->localizationDomain ) );
468
 
469
  $message = $content = '';
470
  $extension = 'css';
@@ -493,9 +830,9 @@ if (!class_exists('WPPaginate')) {
493
  if ( $f = fopen( $real_css_file, 'w+' ) ) {
494
  fwrite( $f, $newcontent_css );
495
  fclose( $f );
496
- $message .= sprintf( __( 'File %s edited successfully.', $this->localizationDomain ), '<i>' . $css_file . '</i>' ) . ' ';
497
  } else {
498
- $error .= __( 'Not enough permissions to create or update the file', $this->localizationDomain ) . ' ' . $real_css_file . '. ';
499
  }
500
 
501
  if(isset($_REQUEST['wpp_custom_css_active']))
@@ -506,7 +843,7 @@ if (!class_exists('WPPaginate')) {
506
  update_option('wpp_custom_css_active', $wpp_custom_css_active, true );
507
 
508
  if ( ! empty( $error ) )
509
- $error .= ' <a href="https://codex.wordpress.org/Changing_File_Permissions" target="_blank">' . __( 'Learn more', $this->localizationDomain ) . '</a>';
510
  }
511
 
512
  if ( file_exists( $real_css_file ) ) {
@@ -522,25 +859,25 @@ if (!class_exists('WPPaginate')) {
522
  <?php } ?>
523
  <form action="" method="post">
524
  <p>
525
- <?php _e( 'These styles will be added to the header on all pages of your site.', $this->localizationDomain ); ?>
526
  </p>
527
  <p><big>
528
  <?php if ( ! file_exists( $real_css_file ) || ( is_writeable( $real_css_file ) ) ) {
529
- echo __( 'Editing', $this->localizationDomain ) . ' <strong>' . $css_file . '</strong>';
530
  } else {
531
- echo __( 'Browsing', $this->localizationDomain ) . ' <strong>' . $css_file . '</strong>';
532
  } ?>
533
  </big></p>
534
- <p><label><input type="checkbox" name="wpp_custom_css_active" value="1" <?php checked( $wpp_custom_css_active, 'on'); ?> /> <?php _e( 'Activate', $this->localizationDomain ); ?></label></p>
535
  <textarea cols="70" rows="25" name="wpp_newcontent_css" id="wpp_newcontent_css"><?php if ( isset( $content_css ) ) echo $content_css; ?></textarea>
536
  <?php if ( ! file_exists( $real_css_file ) || is_writeable( $real_css_file )) { ?>
537
  <p class="submit">
538
  <input type="hidden" name="wpp_update_custom_code" value="submit" />
539
- <?php submit_button( __( 'Save Changes', $this->localizationDomain ), 'primary', 'submit', false );
540
  wp_nonce_field( 'wpp_update_nonce' . $css_file ); ?>
541
  </p>
542
  <?php } else { ?>
543
- <p><em><?php printf( __( 'You need to make this files writable before you can save your changes. See %s the Codex %s for more information.', $this->localizationDomain ),
544
  '<a href="https://codex.wordpress.org/Changing_File_Permissions" target="_blank">',
545
  '</a>' ); ?></em></p>
546
  <?php } ?>
@@ -560,32 +897,191 @@ if (!class_exists('WPPaginate')) {
560
  }
561
  }
562
 
563
- jQuery("#submit").click(function(){
564
- unsaved = false;
565
- });
566
-
567
- var unsaved = false;
568
 
569
- jQuery(":input").change(function(){ //trigers change in all input fields including text type
570
- unsaved = true;
571
- });
572
 
573
- function unloadPage(){
574
- if(unsaved){
575
- return "Do you want to leave this page and discard your changes or stay on this page?";
 
 
 
 
 
576
  }
577
- }
578
 
579
- window.onbeforeunload = unloadPage;
580
-
581
  });
582
 
583
 
584
  </script>
585
  <?php }
586
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
587
 
 
 
 
 
588
  }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
589
  }
590
 
591
  //instantiate the class
@@ -597,9 +1093,12 @@ if (class_exists('WPPaginate')) {
597
  * Pagination function to use for posts
598
  */
599
  function wp_paginate($args = false) {
 
 
600
  global $wp_paginate;
601
  $wp_paginate->type = 'posts';
602
  return $wp_paginate->paginate($args);
 
603
  }
604
 
605
  /**
3
  Plugin Name: WP-Paginate
4
  Plugin URI: https://wordpress.org/plugins/wp-paginate/
5
  Description: A simple and flexible pagination plugin for WordPress posts and comments.
6
+ Version: 2.0.0
7
  Author: Max Foundry
8
  Author URI: http://maxfoundry.com
9
+ Text Domain: 'wp-paginate'
10
  */
11
 
12
  /* Copyright 2016 Max Foundry (http://www.maxfoundry.com)
29
  Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
30
  */
31
 
32
+ // plugin links
33
+ if(!defined('WPP_MAXBUTTONS_LINK'))
34
+ define('WPP_MAXBUTTONS_LINK', 'https://maxbuttons.com/?utm_source=wpp-descv2&utm_medium=wpp-plugin&utm_content=wpp-footer&utm_campaign=wpp-descv2');
35
+ if(!defined('WPP_MAXGALLERIA_LINK'))
36
+ define('WPP_MAXGALLERIA_LINK', 'https://maxgalleria.com/?utm_source=wpp-descv2&utm_medium=wpp-plugin&utm_content=wpp-footer&utm_campaign=wpp-descv2');
37
+ if(!defined('WPP_MEDIA_LIBRARY_PLUS_PRO_LINK'))
38
+ define('WPP_MEDIA_LIBRARY_PLUS_PRO_LINK', 'https://maxgalleria.com/downloads/media-library-plus-pro/?utm_source=wpp-descv2&utm_medium=wpp-plugin&utm_content=wpp-footer&utm_campaign=wpp-descv2');
39
+ if(!defined('WPP_WP_PAGINATE_PRO_LINK'))
40
+ define("WPP_WP_PAGINATE_PRO_LINK", "https://maxgalleria.com/downloads/wp-paginate-pro/");
41
+
42
+ define("WPP_REVIEW_NOTICE", "wpp_review_notice");
43
+ define("WP_PAGINATE_NONCE", "wpp_js_nonce");
44
+
45
  /**
46
  * Set the wp-content and plugin urls/paths
47
  */
59
  /**
60
  * @var string The plugin version
61
  */
62
+ public $version = '2.0.0';
63
 
64
  /**
65
  * @var string The options string name for this plugin
66
  */
67
+ public $optionsName = 'wp_paginate_options';
68
 
69
  /**
70
  * @var string $localizationDomain Domain used for localization
71
  */
72
+ public $localizationDomain = 'wp-paginate';
73
 
74
  /**
75
  * @var string $pluginurl The url to this plugin
76
  */
77
+ public $pluginurl = '';
78
  /**
79
  * @var string $pluginpath The path to this plugin
80
  */
81
+ public $pluginpath = '';
82
 
83
  /**
84
  * @var array $options Stores the options for this plugin
85
  */
86
+ public $options = array();
87
 
88
+ public $type = 'posts';
89
+
90
+ public $positions = array();
91
 
92
+ public $fonts = array();
93
+
94
+ public $presets = array();
95
+
96
+ /**
97
  * Constructor
98
  */
99
  function __construct() {
100
  $name = dirname(plugin_basename(__FILE__));
101
+ $this->set_activation_hooks();
102
+
103
  //Language Setup
104
+ load_plugin_textdomain('wp-paginate', false, "$name/I18n/");
105
 
106
  //"Constants" setup
107
  $this->pluginurl = plugins_url($name) . "/";
111
  $this->get_options();
112
 
113
  //Actions
114
+ add_action( 'init', array(&$this, 'init_pagination'));
115
  add_action('admin_menu', array(&$this, 'admin_menu_link'));
116
  add_action('admin_enqueue_scripts', array($this, 'wpp_admin_head'));
117
  add_action('wp_enqueue_scripts', array($this, 'wpp_enqueue_custom_css'), 20);
118
+
119
+
120
+ add_action('admin_notices', array($this, 'show_wpp_admin_notice'));
121
+
122
+ add_action('wp_ajax_nopriv_wpp_dismiss_notice', array($this, 'wpp_dismiss_notice'));
123
+ add_action('wp_ajax_wpp_dismiss_notice', array($this, 'wpp_dismiss_notice'));
124
+
125
+ add_action('wp_ajax_nopriv_wpp_set_review_later', array($this, 'wpp_set_review_later'));
126
+ add_action('wp_ajax_wpp_set_review_later', array($this, 'wpp_set_review_later'));
127
+
128
+ $this->positions = array(
129
+ 'none' => __('Function only', 'wp-paginate'),
130
+ 'below' => __('Below the Content', 'wp-paginate'),
131
+ 'above' => __('Above the Content', 'wp-paginate'),
132
+ 'both' => __('Above and Below the Content', 'wp-paginate')
133
+ );
134
+
135
+ $this->fonts = array(
136
+ 'font-inherit' => __('inherit', 'wp-paginate'),
137
+ 'font-initial' => __('initial', 'wp-paginate'),
138
+ 'font-arial' => __('Arial', 'wp-paginate'),
139
+ 'font-georgia' => __('Georgia', 'wp-paginate'),
140
+ 'font-tahoma' => __('Tahoma', 'wp-paginate'),
141
+ 'font-times' => __('Times New Roman', 'wp-paginate'),
142
+ 'font-trebuchet' => __('Trebuchet MS', 'wp-paginate'),
143
+ 'font-verdana' => __('Verdana', 'wp-paginate')
144
+ );
145
+
146
+ $this->presets = array(
147
+ array('default', __('Grey Buttons', 'wp-paginate'), 'default.jpg'),
148
+ array('wpp-blue-cta', __('Blue Buttons', 'wp-paginate'), 'blue-cta-buttons.jpg'),
149
+ );
150
+
151
  if ($this->options['css'])
152
  add_action('wp_print_styles', array(&$this, 'wp_paginate_css'));
153
  }
154
 
155
+ public function set_activation_hooks() {
156
+ register_activation_hook(__FILE__, array($this, 'do_activation'));
157
+ register_deactivation_hook(__FILE__, array($this, 'do_deactivation'));
158
+ }
159
+
160
+ public function do_activation() {
161
+ $this->activate();
162
+ }
163
+
164
+ public function do_deactivation() {
165
+ $this->deactivate();
166
+ }
167
+
168
+ public function activate() {
169
+ $current_user_id = get_current_user_id();
170
+
171
+ if(get_user_meta( $current_user_id, WPP_REVIEW_NOTICE, true ) !== "off" ) {
172
+ $review_date = date('Y-m-d', strtotime("+2 days"));
173
+ update_user_meta( $current_user_id, WPP_REVIEW_NOTICE, $review_date );
174
+ }
175
+ }
176
+
177
+ public function deactivate() {
178
+ }
179
+
180
+ public function init_pagination() {
181
+
182
+ if ($this->options['position'] === 'above' || $this->options['position'] === 'both')
183
+ add_filter( 'loop_start', array(&$this, 'add_pagination_to_page_top'));
184
+
185
+ if ($this->options['position'] === 'below' || $this->options['position'] === 'both')
186
+ add_filter( 'loop_end', array(&$this, 'add_pagination_to_page_bottom'));
187
+
188
+ if ($this->options['everywhere'] && ($this->options['position'] === 'below' || $this->options['position'] === 'both'))
189
+ add_filter( 'wp_link_pages', 'add_pagination_to_page_bottom', 10, 2 );
190
+
191
+ if ($this->options['everywhere'] && ($this->options['position'] === 'above' || $this->options['position'] === 'both'))
192
+ add_filter( 'wp_link_pages', 'add_pagination_to_page_top', 10, 2 );
193
+
194
+ }
195
+
196
+ function add_pagination_to_page_bottom($content) {
197
+
198
+ $this->get_options();
199
+ if(defined('WPP-DEBUG')) {
200
+ $output = print_r($this->options, true);
201
+ error_log($output);
202
+ }
203
+ if( ($this->options['home-page'] && is_front_page()) ||
204
+ ($this->options['blog-page'] && is_home()) ||
205
+ ($this->options['search-page'] && is_search()) ||
206
+ ($this->options['category-page'] && is_category()) ||
207
+ ($this->options['archive-page'] && is_archive()) ||
208
+ ($this->options['everywhere'])
209
+ ) {
210
+
211
+ if ( is_feed() )
212
+ return $content;
213
+ global $wp_query, $wp_paginate_display_bottom;
214
+ if ( is_main_query() && $content === $wp_query && ! $wp_paginate_display_bottom ) {
215
+ $wp_paginate_display_bottom = true;
216
+ wp_paginate();
217
+ }
218
+ }
219
+ }
220
+
221
+ function add_pagination_to_page_top($content) {
222
+
223
+ $this->get_options();
224
+ if(defined('WPP-DEBUG')) {
225
+ $output = print_r($this->options, true);
226
+ error_log($output);
227
+ }
228
+ if( ($this->options['home-page'] && is_front_page()) ||
229
+ ($this->options['blog-page'] && is_home()) ||
230
+ ($this->options['search-page'] && is_search()) ||
231
+ ($this->options['category-page'] && is_category()) ||
232
+ ($this->options['archive-page'] && is_archive()) ||
233
+ ($this->options['everywhere'])
234
+ ) {
235
+
236
+ if ( is_feed() )
237
+ return $content;
238
+ global $wp_query, $wp_paginate_display_top;
239
+ if ( is_main_query() && $content === $wp_query && ! $wp_paginate_display_top ) {
240
+ $wp_paginate_display_top = true;
241
+ wp_paginate();
242
+ }
243
+ }
244
+ }
245
+
246
  function wpp_admin_head($hook) {
 
247
  if ( isset( $_REQUEST['page'] ) && 'wp-paginate.php' == $_REQUEST['page'] ) {
248
+ //wp_enqueue_style( 'bootstrap', plugins_url( '/css/bootstrap/bootstrap.min.css', __FILE__ ));
249
  if ( isset( $_GET['action'] ) && 'custom_css' == $_GET['action'] )
250
  $this->wpp_include_codemirror();
251
  }
252
+ wp_enqueue_style( 'wp-paginate-admin', plugins_url( '/css/wp-paginate-admin.css', __FILE__ ));
253
+
254
+ wp_enqueue_script('jquery');
255
+ wp_register_script( 'wpp-script', $this->pluginurl .'js/wp-paginate.js', array( 'jquery' ), '', true );
256
+
257
+ wp_localize_script( 'wpp-script', 'wpp_ajax',
258
+ array( 'ajaxurl' => admin_url( 'admin-ajax.php' ),
259
+ 'nonce'=> wp_create_nonce(WP_PAGINATE_NONCE))
260
+ );
261
+
262
+ wp_enqueue_script('wpp-script');
263
+
264
  }
265
 
266
  function wpp_enqueue_custom_css() {
281
 
282
  $r = wp_parse_args($args, $this->options);
283
  extract($r, EXTR_SKIP);
284
+ $preset = $this->options['preset'];
285
+ $font = $this->options['font'];
286
+ $before = stripslashes(html_entity_decode($this->options['before']));
287
+ $after = stripslashes(html_entity_decode($this->options['after']));
288
 
289
  if (!isset($page) && !isset($pages)) {
290
  global $wp_query;
309
  ? esc_url(get_pagenum_link($page + 1))
310
  : get_comments_pagenum_link($page + 1);
311
 
312
+ $output = $before;
313
  if ($pages > 1) {
314
+
315
+ if($preset === 'default')
316
+ $output .= sprintf('<ol class="wp-paginate ' . $font . '%s">', ($this->type === 'posts') ? '' : ' wp-paginate-comments');
317
+ else
318
+ $output .= sprintf('<ol class="wp-paginate ' . $preset . ' ' . $font . '%s">', ($this->type === 'posts') ? '' : ' wp-paginate-comments');
319
+
320
  if (strlen(stripslashes($title)) > 0) {
321
  $output .= sprintf('<li><span class="title">%s</span></li>', stripslashes($title));
322
  }
364
  }
365
  $output .= "</ol>";
366
  }
367
+ $output .= $after;
368
 
369
  if ($pages > 1 || $empty) {
370
  echo $output;
386
  }
387
 
388
  function wp_paginate_css() {
389
+ $name = "css/wp-paginate.css";
390
 
391
  if (false !== @file_exists(STYLESHEETPATH . "/$name")) {
392
  $css = get_stylesheet_directory_uri() . "/$name";
397
  wp_enqueue_style('wp-paginate', $css, false, $this->version, 'screen');
398
 
399
  if (function_exists('is_rtl') && is_rtl()) {
400
+ $name = "css/wp-paginate-rtl.css";
401
  if (false !== @file_exists(STYLESHEETPATH . "/$name")) {
402
  $css = get_stylesheet_directory_uri() . "/$name";
403
  }
406
  }
407
  wp_enqueue_style('wp-paginate-rtl', $css, false, $this->version, 'screen');
408
  }
409
+
410
+ wp_enqueue_style( 'wpp-advanced-styles', $this->wpp_print_style() );
411
+
412
  }
413
 
414
  /**
427
  'empty' => true,
428
  'range' => 3,
429
  'anchor' => 1,
430
+ 'gap' => 3,
431
+ 'everywhere' => false,
432
+ 'home-page' => false,
433
+ 'blog-page' => false,
434
+ 'search-page' => false,
435
+ 'category-page' => false,
436
+ 'archive-page' => false,
437
+ 'position' => 'none',
438
+ 'hide-standard-pagination' => false,
439
+ 'font' => 'font-inherit',
440
+ 'preset' => 'default'
441
  );
442
  update_option($this->optionsName, $options);
443
  }
447
  * Saves the admin options to the database.
448
  */
449
  function save_admin_options(){
450
+
451
+ if(defined('WPP-DEBUG')) {
452
+ $output = print_r($this->options, true);
453
+ error_log($output);
454
+ }
455
+
456
  return update_option($this->optionsName, $this->options);
457
  }
458
 
468
  * @desc Adds the Settings link to the plugin activate/deactivate page
469
  */
470
  function filter_plugin_actions($links, $file) {
471
+ $settings_link = '<a href="options-general.php?page=' . basename(__FILE__) . '">' . __('Settings', 'wp-paginate') . '</a>';
472
  array_unshift($links, $settings_link); // before other links
473
 
474
  return $links;
480
  function admin_options_page() {
481
  if (isset($_POST['wp_paginate_save'])) {
482
  if (wp_verify_nonce($_POST['_wpnonce'], 'wp-paginate-update-options')) {
483
+
484
+ if(defined('WPP-DEBUG')) {
485
+ error_log("wp_paginate_save");
486
+ }
487
+
488
+ $this->options['title'] = trim(stripslashes(strip_tags($_POST['title'])));
489
+ $this->options['previouspage'] = trim(stripslashes(strip_tags($_POST['previouspage'])));
490
+ $this->options['nextpage'] = trim(stripslashes(strip_tags($_POST['nextpage'])));
491
+ $this->options['before'] = esc_attr($_POST['before']);
492
+ $this->options['after'] = esc_attr($_POST['after']);
493
  $this->options['empty'] = (isset($_POST['empty']) && $_POST['empty'] === 'on') ? true : false;
494
  $this->options['css'] = (isset($_POST['css']) && $_POST['css'] === 'on') ? true : false;
495
  $this->options['range'] = intval($_POST['range']);
496
  $this->options['anchor'] = intval($_POST['anchor']);
497
  $this->options['gap'] = intval($_POST['gap']);
498
+ $this->options['everywhere'] = (isset($_POST['everywhere']) && $_POST['everywhere'] === 'on') ? true : false;
499
+ $this->options['home-page'] = (isset($_POST['home-page']) && $_POST['home-page'] === 'on') ? true : false;
500
+ $this->options['blog-page'] = (isset($_POST['blog-page']) && $_POST['blog-page'] === 'on') ? true : false;
501
+ $this->options['search-page'] = (isset($_POST['search-page']) && $_POST['search-page'] === 'on') ? true : false;
502
+ $this->options['category-page'] = (isset($_POST['category-page']) && $_POST['category-page'] === 'on') ? true : false;
503
+ $this->options['archive-page'] = (isset($_POST['archive-page']) && $_POST['archive-page'] === 'on') ? true : false;
504
+ if(isset($_POST['position']))
505
+ $this->options['position'] = $_POST['position'];
506
+ $this->options['hide-standard-pagination'] = (isset($_POST['hide-standard-pagination']) && $_POST['hide-standard-pagination'] === 'on') ? true : false;
507
+ if(isset($_POST['font']))
508
+ $this->options['font'] = $_POST['font'];
509
+ if(isset($_POST['preset']))
510
+ $this->options['preset'] = $_POST['preset'];
511
+
512
  $this->save_admin_options();
513
 
514
+ echo '<div class="updated"><p>' . __('Success! Your changes were successfully saved!', 'wp-paginate') . '</p></div>';
515
  }
516
  else {
517
+ echo '<div class="error"><p>' . __('Whoops! There was a problem with the data you posted. Please try again.', 'wp-paginate') . '</p></div>';
518
  }
519
  }
520
+
521
  ?>
522
 
523
  <div class="wrap">
524
  <div class="icon32" id="icon-options-general"><br/></div>
525
  <h1>WP-Paginate</h1>
526
  <h2 class="nav-tab-wrapper">
527
+ <a class="nav-tab<?php if ( ! isset( $_GET['action'] ) ) echo ' nav-tab-active'; ?>" href="options-general.php?page=wp-paginate.php"><?php _e( 'Settings', 'wp-paginate' ); ?></a>
528
+ <a class="nav-tab <?php if ( isset( $_GET['action'] ) && 'custom_css' == $_GET['action'] ) echo ' nav-tab-active'; ?>" href="options-general.php?page=wp-paginate.php&amp;action=custom_css"><?php _e( 'Custom CSS', 'wp-paginate' ); ?></a>
529
+ <a class="nav-tab <?php if ( isset( $_GET['action'] ) && 'upgrade_to_pro' == $_GET['action'] ) echo ' nav-tab-active'; ?>" href="options-general.php?page=wp-paginate.php&amp;action=upgrade_to_pro"><?php _e( 'Upgrade to Pro', 'wp-paginate' ); ?></a>
530
  </h2>
531
 
532
  <?php if ( ! isset( $_GET['action'] ) || $_GET['action'] == 'appearance' ) { ?>
533
 
534
  <form method="post" id="wp_paginate_options">
535
  <?php wp_nonce_field('wp-paginate-update-options'); ?>
536
+ <h3><?php _e('General', 'wp-paginate'); ?></h3>
537
  <table class="form-table">
538
  <tr valign="top">
539
+ <th scope="row"><?php _e('Pagination Label:', 'wp-paginate'); ?></th>
540
  <td><input name="title" type="text" id="title" size="40" value="<?php echo stripslashes(htmlspecialchars($this->options['title'])); ?>"/>
541
+ <span class="description"><?php _e('The optional text/HTML to display before the list of pages.', 'wp-paginate'); ?></span></td>
542
  </tr>
543
  <tr valign="top">
544
+ <th scope="row"><?php _e('Previous Page:', 'wp-paginate'); ?></th>
545
  <td><input name="previouspage" type="text" id="previouspage" size="40" value="<?php echo stripslashes(htmlspecialchars($this->options['previouspage'])); ?>"/>
546
+ <span class="description"><?php _e('The text/HTML to display for the previous page link.', 'wp-paginate'); ?></span></td>
547
  </tr>
548
  <tr valign="top">
549
+ <th scope="row"><?php _e('Next Page:', 'wp-paginate'); ?></th>
550
  <td><input name="nextpage" type="text" id="nextpage" size="40" value="<?php echo stripslashes(htmlspecialchars($this->options['nextpage'])); ?>"/>
551
+ <span class="description"><?php _e('The text/HTML to display for the next page link.', 'wp-paginate'); ?></span></td>
552
  </tr>
553
  </table>
554
  <p>&nbsp;</p>
555
+ <h3><?php _e('Location &amp; Position', 'wp-paginate'); ?></h3>
556
+ <table class="form-table">
557
+ <tr valign="top">
558
+ <th scope="row"><?php _e('Everywhere:', 'wp-paginate'); ?></th>
559
+ <td><label for="everywhere">
560
+ <input class="everywhere-cb" type="checkbox" id="everywhere" name="everywhere" <?php echo ($this->options['everywhere'] === true) ? "checked='checked'" : ""; ?>/> <?php _e('Display pagination everywhere. (Comments pagination not included.)', 'wp-paginate'); ?></label></td>
561
+ </tr>
562
+ <tr valign="top">
563
+ <th scope="row"><?php _e('Home Page:', 'wp-paginate'); ?></th>
564
+ <td><label for="home-page">
565
+ <input class="not-everywhere-cb" type="checkbox" id="home-page" name="home-page" <?php echo ($this->options['home-page'] === true) ? "checked='checked'" : ""; ?>/> <?php _e('Display pagination on the home page.', 'wp-paginate'); ?></label></td>
566
+ </tr>
567
+ <tr valign="top">
568
+ <th scope="row"><?php _e('Blog Page:', 'wp-paginate'); ?></th>
569
+ <td><label for="blog-page">
570
+ <input class="not-everywhere-cb" type="checkbox" id="blog-page" name="blog-page" <?php echo ($this->options['blog-page'] === true) ? "checked='checked'" : ""; ?>/> <?php _e('Display pagination on the blog page.', 'wp-paginate'); ?></label></td>
571
+ </tr>
572
+ <tr valign="top">
573
+ <th scope="row"><?php _e('Search Page:', 'wp-paginate'); ?></th>
574
+ <td><label for="search-page">
575
+ <input class="not-everywhere-cb" type="checkbox" id="search-page" name="search-page" <?php echo ($this->options['search-page'] === true) ? "checked='checked'" : ""; ?>/> <?php _e('Display pagination on the search page.', 'wp-paginate'); ?></label></td>
576
+ </tr>
577
+ <tr valign="top">
578
+ <th scope="row"><?php _e('Category Pages:', 'wp-paginate'); ?></th>
579
+ <td><label for="category-page">
580
+ <input class="not-everywhere-cb" type="checkbox" id="search-page" name="category-page" <?php echo ($this->options['category-page'] === true) ? "checked='checked'" : ""; ?>/> <?php _e('Display pagination on category pages.', 'wp-paginate'); ?></label></td>
581
+ </tr>
582
+ <tr valign="top">
583
+ <th scope="row"><?php _e('Archive Pages:', 'wp-paginate'); ?></th>
584
+ <td><label for="archive-page">
585
+ <input class="not-everywhere-cb" type="checkbox" id="archive-page" name="archive-page" <?php echo ($this->options['archive-page'] === true) ? "checked='checked'" : ""; ?>/> <?php _e('Display pagination on archive pages.', 'wp-paginate'); ?></label></td>
586
+ </tr>
587
+
588
+ <script>
589
+ jQuery(document).ready(function(){
590
+
591
+ jQuery(".everywhere-cb").change(function() {
592
+ if(jQuery(".everywhere-cb").is(':checked')) {
593
+ jQuery(".not-everywhere-cb").prop('disabled', true);
594
+ jQuery(".not-everywhere-cb").prop("checked", false);
595
+ } else {
596
+ jQuery(".not-everywhere-cb").prop('disabled', false);
597
+ }
598
+ });
599
+
600
+ if(jQuery(".everywhere-cb").is(':checked')) {
601
+ jQuery(".not-everywhere-cb").prop('disabled', true);
602
+ } else {
603
+ jQuery(".not-everywhere-cb").prop('disabled', false);
604
+ }
605
+
606
+ });
607
+ </script>
608
+
609
+ <tr valign="top">
610
+ <th scope="row"><?php _e('Position:', 'wp-paginate'); ?></th>
611
+ <td>
612
+ <select name="position" id="range">
613
+ <?php foreach ($this->positions as $key => $name) { ?>
614
+ <?php $selected = ($this->options['position'] == $key) ? 'selected="selected"' : ''; ?>
615
+ <option value="<?php echo $key ?>" <?php echo $selected ?>><?php echo $name ?></option>
616
+ <?php } ?>
617
+ </select>
618
+ <span class="description"><?php _e('Where to display the pagination on the page.', 'wp-paginate'); ?></span></td>
619
+ </tr>
620
+ <tr valign="top">
621
+ <th scope="row"><?php _e('Hide Standard Pagination:', 'wp-paginate'); ?></th>
622
+ <td><label for="hide-standard-pagination">
623
+ <input type="checkbox" id="hide-standard-pagination" name="hide-standard-pagination" <?php echo ($this->options['hide-standard-pagination'] === true) ? "checked='checked'" : ""; ?>/> <?php _e('Hide the standard theme default pagaination.', 'wp-paginate'); ?></label></td>
624
+ </tr>
625
+ </table>
626
+ <p>&nbsp;</p>
627
+ <h3><?php _e('Apperance', 'wp-paginate'); ?></h3>
628
  <table class="form-table">
629
  <tr valign="top">
630
+ <th scope="row"><?php _e('Pagination Font:', 'wp-paginate'); ?></th>
631
+ <td>
632
+ <select name="font" id="font">
633
+ <?php foreach ($this->fonts as $key => $name) { ?>
634
+ <?php $selected = ($this->options['font'] == $key) ? 'selected="selected"' : ''; ?>
635
+ <option value="<?php echo $key ?>" <?php echo $selected ?>><?php echo $name ?></option>
636
+ <?php } ?>
637
+ </select>
638
+ <span class="description"><?php _e('Select the font to use with the pagination.', 'wp-paginate'); ?></span></td>
639
+ </tr>
640
+ <tr valign="top">
641
+ <th scope="row"><?php _e('Button Style:', 'wp-paginate'); ?></th>
642
+ <td>
643
+ <table class="button-styles">
644
+ <?php foreach($this->presets as $preset ) { ?>
645
+ <tr>
646
+ <td>
647
+ <?php echo $preset[1]; ?>
648
+ </td>
649
+ <td>
650
+ <input type="radio" name="preset" id="preset" value="<?php echo $preset[0]; ?>" <?php echo ($this->options['preset'] === $preset[0]) ? 'checked' : ''; ?>> </td>
651
+ </td>
652
+ <td>
653
+ <img alt="<?php echo $preset[1]; ?> image" src="<?php echo $this->pluginurl . "images/" . $preset[2]; ?>" width="326" height="70">
654
+ </td>
655
+ </tr>
656
+ <?php } ?>
657
+ </table>
658
+ </td>
659
  </tr>
660
+ </table>
661
+ <p>&nbsp;</p>
662
+ <h3><?php _e('Advanced Settings', 'wp-paginate'); ?></h3>
663
+ <table class="form-table">
664
  <tr valign="top">
665
+ <th scope="row"><?php _e('Before Markup:', 'wp-paginate'); ?></th>
666
+ <td><input name="before" type="text" id="before" size="40" value="<?php echo stripslashes(wp_kses_decode_entities($this->options['before'])); ?>"/>
667
+ <span class="description"><?php _e('The HTML markup to display before the pagination code.', 'wp-paginate'); ?></span></td>
668
  </tr>
669
  <tr valign="top">
670
+ <th scope="row"><?php _e('After Markup:', 'wp-paginate'); ?></th>
671
+ <td><input name="after" type="text" id="after" size="40" value="<?php echo stripslashes(wp_kses_decode_entities($this->options['after'])); ?>"/>
672
+ <span class="description"><?php _e('The HTML markup to display after the pagination code.', 'wp-paginate'); ?></span></td>
673
+ </tr>
674
+ <tr valign="top">
675
+ <th scope="row"><?php _e('Markup Display:', 'wp-paginate'); ?></th>
676
  <td><label for="empty">
677
+ <input type="checkbox" id="empty" name="empty" <?php echo ($this->options['empty'] === true) ? "checked='checked'" : ""; ?>/> <?php _e('Show Before Markup and After Markup, even if the page list is empty?', 'wp-paginate'); ?></label></td>
678
  </tr>
679
  <tr valign="top">
680
+ <th scope="row"><?php _e('WP-Paginate CSS File:', 'wp-paginate'); ?></th>
681
  <td><label for="css">
682
+ <input type="checkbox" id="css" name="css" <?php echo ($this->options['css'] === true) ? "checked='checked'" : ""; ?>/> <?php printf(__('Include the default stylesheet wp-paginate.css? WP-Paginate will first look for <code>wp-paginate.css</code> in your theme directory (<code>themes/%s</code>).', 'wp-paginate'), get_template()); ?></label></td>
683
  </tr>
684
  <tr valign="top">
685
+ <th scope="row"><?php _e('Page Range:', 'wp-paginate'); ?></th>
686
  <td>
687
  <select name="range" id="range">
688
  <?php for ($i=1; $i<=10; $i++) : ?>
689
  <option value="<?php echo $i; ?>" <?php echo ($i == $this->options['range']) ? "selected='selected'" : ""; ?>><?php echo $i; ?></option>
690
  <?php endfor; ?>
691
  </select>
692
+ <span class="description"><?php _e('The number of page links to show before and after the current page. Recommended value: 3', 'wp-paginate'); ?></span></td>
693
  </tr>
694
  <tr valign="top">
695
+ <th scope="row"><?php _e('Page Anchors:', 'wp-paginate'); ?></th>
696
  <td>
697
  <select name="anchor" id="anchor">
698
  <?php for ($i=0; $i<=10; $i++) : ?>
699
  <option value="<?php echo $i; ?>" <?php echo ($i == $this->options['anchor']) ? "selected='selected'" : ""; ?>><?php echo $i; ?></option>
700
  <?php endfor; ?>
701
  </select>
702
+ <span class="description"><?php _e('The number of links to always show at beginning and end of pagination. Recommended value: 1', 'wp-paginate'); ?></span></td>
703
  </tr>
704
  <tr valign="top">
705
+ <th scope="row"><?php _e('Page Gap:', 'wp-paginate'); ?></th>
706
  <td>
707
  <select name="gap" id="gap">
708
  <?php for ($i=1; $i<=10; $i++) : ?>
709
  <option value="<?php echo $i; ?>" <?php echo ($i == $this->options['gap']) ? "selected='selected'" : ""; ?>><?php echo $i; ?></option>
710
  <?php endfor; ?>
711
  </select>
712
+ <span class="description"><?php _e('The minimum number of pages in a gap before an ellipsis (...) is added. Recommended value: 3', 'wp-paginate'); ?></span></td>
713
  </tr>
714
  </table>
715
  <p class="submit">
716
  <input type="submit" id="wpp-save-changes" value="Save Changes" name="wp_paginate_save" class="button-primary" />
717
  </p>
718
  </form>
719
+ <p>&nbsp;</p>
720
+ <hr>
721
  <script>
722
  jQuery(document).ready(function(){
723
 
743
 
744
 
745
  </script>
746
+ <?php } elseif ( 'upgrade_to_pro' == $_GET['action'] ) { ?>
747
+ <?php $this->wpp_upgrade_to_pro_tab(); ?>
748
+ <p>&nbsp;</p>
749
+ <hr>
750
  <?php } elseif ( 'custom_css' == $_GET['action'] ) { ?>
751
  <h2>Custom CSS</h2>
752
  <?php $this->wpp_custom_code_tab(); ?>
753
+ <p>&nbsp;</p>
754
+ <hr>
755
  <?php } ?>
756
 
757
+ <h2><?php _e('Need Support?', 'wp-paginate'); ?></h2>
758
+ <p><?php printf(__('For questions, issues or feature requests, please post them in the %s and make sure to tag the post with wp-paginate.', 'wp-paginate'), '<a href="https://wordpress.org/support/plugin/wp-paginate">WordPress Forum</a>'); ?></p>
759
+ <p>&nbsp;</p>
760
+ <div id="wpp-plugins">
761
+
762
+ <div class="paginate-info">WP Paginate is Maintained and Upgraded by Max Foundry</div>
763
+ <div class="paginate-info">Developed Originally by Eric Martin</div>
764
+ <div class="mf-plugins">Max Foundry Produces These Other Fine Plugins</div>
765
+
766
+ <div class="column-left">
767
+ <a href="<?php echo WPP_MAXBUTTONS_LINK; ?>" target="_blank">
768
+ <img alt="maxbuttons logo" src="<?php echo $this->pluginurl ?>images/MBP.png" width="283" height="142">
769
+ </a>
770
+ <a href="<?php echo WPP_MAXBUTTONS_LINK; ?>" target="_blank">
771
+ <div class="wpp-plugin-title">WordPress Button Plugin</div>
772
+ </a>
773
+ </div>
774
+ <div class="column-center">
775
+ <a href="<?php echo WPP_MAXGALLERIA_LINK; ?>" target="_blank">
776
+ <img alt="maxgalleria logo" src="<?php echo $this->pluginurl ?>images/MG_logo.png" width="283" height="142">
777
+ </a>
778
+ <a href="<?php echo WPP_MAXGALLERIA_LINK; ?>" target="_blank">
779
+ <div class="wpp-plugin-title">WordPress Gallery Plugin</div>
780
+ </a>
781
+ </div>
782
+ <div class="column-right">
783
+ <a href="<?php echo WPP_MEDIA_LIBRARY_PLUS_PRO_LINK; ?>" target="_blank">
784
+ <img alt="media library plus pro logo" src="<?php echo $this->pluginurl ?>images/MLPP-card-red.png" width="283" height="142">
785
+ </a>
786
+ <a href="<?php echo WPP_MEDIA_LIBRARY_PLUS_PRO_LINK; ?>" target="_blank">
787
+ <div class="wpp-plugin-title">WordPress Media Library Folders</div>
788
+ </a>
789
+ </div>
790
+ </div>
791
+
792
  </div>
793
 
794
  <?php
801
 
802
  function wpp_custom_code_tab() {
803
  if ( ! current_user_can( 'edit_plugins' ) )
804
+ wp_die( __( 'You do not have sufficient permissions to edit plugins for this site.', 'wp-paginate' ) );
805
 
806
  $message = $content = '';
807
  $extension = 'css';
830
  if ( $f = fopen( $real_css_file, 'w+' ) ) {
831
  fwrite( $f, $newcontent_css );
832
  fclose( $f );
833
+ $message .= sprintf( __( 'File %s edited successfully.', 'wp-paginate' ), '<i>' . $css_file . '</i>' ) . ' ';
834
  } else {
835
+ $error .= __( 'Not enough permissions to create or update the file', 'wp-paginate' ) . ' ' . $real_css_file . '. ';
836
  }
837
 
838
  if(isset($_REQUEST['wpp_custom_css_active']))
843
  update_option('wpp_custom_css_active', $wpp_custom_css_active, true );
844
 
845
  if ( ! empty( $error ) )
846
+ $error .= ' <a href="https://codex.wordpress.org/Changing_File_Permissions" target="_blank">' . __( 'Learn more', 'wp-paginate' ) . '</a>';
847
  }
848
 
849
  if ( file_exists( $real_css_file ) ) {
859
  <?php } ?>
860
  <form action="" method="post">
861
  <p>
862
+ <?php _e( 'These styles will be added to the header on all pages of your site.', 'wp-paginate' ); ?>
863
  </p>
864
  <p><big>
865
  <?php if ( ! file_exists( $real_css_file ) || ( is_writeable( $real_css_file ) ) ) {
866
+ echo __( 'Editing', 'wp-paginate' ) . ' <strong>' . $css_file . '</strong>';
867
  } else {
868
+ echo __( 'Browsing', 'wp-paginate' ) . ' <strong>' . $css_file . '</strong>';
869
  } ?>
870
  </big></p>
871
+ <p><label><input type="checkbox" name="wpp_custom_css_active" value="1" <?php checked( $wpp_custom_css_active, 'on'); ?> /> <?php _e( 'Activate', 'wp-paginate' ); ?></label></p>
872
  <textarea cols="70" rows="25" name="wpp_newcontent_css" id="wpp_newcontent_css"><?php if ( isset( $content_css ) ) echo $content_css; ?></textarea>
873
  <?php if ( ! file_exists( $real_css_file ) || is_writeable( $real_css_file )) { ?>
874
  <p class="submit">
875
  <input type="hidden" name="wpp_update_custom_code" value="submit" />
876
+ <?php submit_button( __( 'Save Changes', 'wp-paginate' ), 'primary', 'submit', false );
877
  wp_nonce_field( 'wpp_update_nonce' . $css_file ); ?>
878
  </p>
879
  <?php } else { ?>
880
+ <p><em><?php printf( __( 'You need to make this files writable before you can save your changes. See %s the Codex %s for more information.', 'wp-paginate' ),
881
  '<a href="https://codex.wordpress.org/Changing_File_Permissions" target="_blank">',
882
  '</a>' ); ?></em></p>
883
  <?php } ?>
897
  }
898
  }
899
 
900
+ jQuery("#submit").click(function(){
901
+ unsaved = false;
902
+ });
 
 
903
 
904
+ var unsaved = false;
 
 
905
 
906
+ jQuery(":input").change(function(){ //trigers change in all input fields including text type
907
+ unsaved = true;
908
+ });
909
+
910
+ function unloadPage(){
911
+ if(unsaved){
912
+ return "Do you want to leave this page and discard your changes or stay on this page?";
913
+ }
914
  }
 
915
 
916
+ window.onbeforeunload = unloadPage;
917
+
918
  });
919
 
920
 
921
  </script>
922
  <?php }
923
 
924
+ function wpp_print_style() {
925
+ $this->get_options();
926
+ //global $pgntn_options;
927
+ ?>
928
+ <style type="text/css">
929
+ <?php
930
+ $classes = '';
931
+ if($this->options['hide-standard-pagination']) {
932
+ //$hide_comments
933
+ $classes .=
934
+ '.archive #nav-above,
935
+ .archive #nav-below,
936
+ .search #nav-above,
937
+ .search #nav-below,
938
+ .blog #nav-below,
939
+ .blog #nav-above,
940
+ .navigation.paging-navigation,
941
+ .navigation.pagination,
942
+ .pagination.paging-pagination,
943
+ .pagination.pagination,
944
+ .pagination.loop-pagination,
945
+ .bicubic-nav-link,
946
+ #page-nav,
947
+ .camp-paging,
948
+ #reposter_nav-pages,
949
+ .unity-post-pagination,
950
+ .wordpost_content .nav_post_link';
951
+ }
952
+ if ( ( ! empty( $pgntn_options['additional_pagination_style'] ) ) && '1' == $pgntn_options['display_custom_pagination'] ) {
953
+ $classes .= ! empty( $classes ) ? ',' : '';
954
+ $classes .= $pgntn_options['additional_pagination_style'];
955
+ }
956
+ if ( ! empty( $classes ) ) {
957
+ echo $classes . ' {
958
+ display: none !important;
959
+ }
960
+ .single-gallery .pagination.gllrpr_pagination {
961
+ display: block !important;
962
+ }';
963
+ } ?>
964
+ </style>
965
+ <?php }
966
+
967
+ public function show_wpp_admin_notice() {
968
+ $current_user_id = get_current_user_id();
969
+
970
+ $review = get_user_meta( $current_user_id, WPP_REVIEW_NOTICE, true );
971
+ if( $review !== 'off') {
972
+ if($review === false) {
973
+ $this->wpp_show_review_notice();
974
+ } else {
975
+ $now = date("Y-m-d");
976
+ $review_time = strtotime($review);
977
+ $now_time = strtotime($now);
978
+ if($now_time > $review_time) {
979
+ $this->wpp_show_review_notice();
980
+ }
981
+ }
982
+ }
983
+ }
984
+
985
+ public function wpp_show_review_notice() {
986
+ if( current_user_can( 'manage_options' ) ) { ?>
987
+ <div class="updated notice wpp-notice">
988
+ <div id='wp-paginate-logo'></div>
989
+ <div id='wpp-notice-1'><p id='wpp-notice-title'><?php _e( 'Love WP-Paginate?', 'wp-paginate' ); ?></p>
990
+ <p><?php _e( 'Your rating is a big help! We really appreciate it!', 'wp-paginate' ); ?></p>
991
+
992
+ <ul id="wpp-review-notice-links">
993
+ <li> <span class="dashicons dashicons-smiley"></span><a id="wpp-review-already"><?php _e( "I've already left a review", 'wp-paginate' ); ?></a></li>
994
+ <li><span class="dashicons dashicons-calendar-alt"></span><a id="wpp-review-later"><?php _e( "Maybe Later", 'wp-paginate' ); ?></a></li>
995
+ <li><span class="dashicons dashicons-external"></span><a id="wpp-write-review" target="_blank" href="https://wordpress.org/support/plugin/wp-paginate/reviews/?filter=5"><?php _e( "Sure! I'd love to!", 'wp-paginate' ); ?></a></li>
996
+ </ul>
997
+ </div>
998
+ <a class="dashicons dashicons-dismiss close-wpp-notice" id="wpp-dismiss"></a>
999
+ </div>
1000
+ <?php
1001
+ }
1002
+ }
1003
 
1004
+ public function wpp_dismiss_notice() {
1005
+
1006
+ if ( !wp_verify_nonce( $_POST['nonce'], WP_PAGINATE_NONCE)) {
1007
+ exit(__('missing nonce!', 'wp-paginate'));
1008
  }
1009
+
1010
+ $current_user_id = get_current_user_id();
1011
+
1012
+ update_user_meta( $current_user_id, WPP_REVIEW_NOTICE, "off" );
1013
+
1014
+ exit();
1015
+
1016
+ }
1017
+
1018
+ public function wpp_set_review_later() {
1019
+
1020
+ if ( !wp_verify_nonce( $_POST['nonce'], WP_PAGINATE_NONCE)) {
1021
+ exit(__('missing nonce!', 'wp-paginate'));
1022
+ }
1023
+
1024
+ $current_user_id = get_current_user_id();
1025
+
1026
+ $review_date = date('Y-m-d', strtotime("+7 days"));
1027
+
1028
+
1029
+ update_user_meta( $current_user_id, WPP_REVIEW_NOTICE, $review_date );
1030
+
1031
+ exit();
1032
+
1033
+ }
1034
+
1035
+ function wpp_upgrade_to_pro_tab() {
1036
+ ?>
1037
+ <div id="utp-content">
1038
+ <div id="mf-logo">
1039
+ <img alt="<?php _e('maxfoundry logo', 'wp-paginate'); ?>" src="<?php echo $this->pluginurl . '/images/max-foundry.png'; ?>" width="172" height="32">
1040
+ </div>
1041
+ <div style="clear:both"></div>
1042
+ <div id="utp-banner">
1043
+ <div id="utp-title-wrap">
1044
+ <div id="utp-title"><?php _e('WP PAGINATE PRO', 'wp-paginate'); ?></div>
1045
+ </div>
1046
+ <a href="<?php echo WPP_WP_PAGINATE_PRO_LINK; ?>" target="_blank">
1047
+ <img class="buy-now-button" alt="<?php _e('buy now button', 'wp-paginate'); ?>" src="<?php echo $this->pluginurl . "/images/buy-now-btn.png" ?>" width="205" height="68">
1048
+ </a>
1049
+ </div>
1050
+ <img id='wppp-logo' alt="<?php _e('wp-pagination pro logo', 'wp-paginate'); ?>" src="<?php echo $this->pluginurl . '/images/wpp-pro-logo-2.png'; ?>" width="169" height="61">
1051
+
1052
+ <div class="utp-text">
1053
+ <?php _e('WP-Paginate Pro come with 11 Beautiful<br>Preset Layouts and Multi Site support!', 'wp-paginate'); ?>
1054
+ </div>
1055
+
1056
+ <div id="wppp-buttons">
1057
+ <img alt="<?php _e('WP Pagination Pro buttons styles', 'wp-paginate'); ?>" src="<?php echo $this->pluginurl . '/images/wppp-buttons.png'; ?>" width="646" height="713">
1058
+ </div>
1059
+
1060
+ <div class="utp-text">
1061
+ <?php _e('Use These Customizer Settings to Get the<br>Exact Look and Feel You Want', 'wp-paginate'); ?>
1062
+ </div>
1063
+
1064
+ <div id="wppp-customizer">
1065
+ <img alt="<?php _e('WP Pagination Por button Style customizer', 'wp-paginate'); ?>" src="<?php echo $this->pluginurl . '/images/wppp-customizer.png'; ?>" width="650" height="380">
1066
+ </div>
1067
+
1068
+ <a href="<?php echo WPP_WP_PAGINATE_PRO_LINK; ?>" target="_blank">
1069
+ <img class="buy-now-button" alt="<?php _e('buy now button', 'wp-paginate'); ?>" src="<?php echo $this->pluginurl . "/images/buy-now-btn.png" ?>" width="205" height="68">
1070
+ </a>
1071
+
1072
+ </div>
1073
+
1074
+
1075
+ <div>
1076
+
1077
+ </div>
1078
+
1079
+
1080
+ <?php
1081
+ }
1082
+
1083
+
1084
+ }
1085
  }
1086
 
1087
  //instantiate the class
1093
  * Pagination function to use for posts
1094
  */
1095
  function wp_paginate($args = false) {
1096
+
1097
+ if(!is_active_widget()) {
1098
  global $wp_paginate;
1099
  $wp_paginate->type = 'posts';
1100
  return $wp_paginate->paginate($args);
1101
+ }
1102
  }
1103
 
1104
  /**