My Custom Functions - Version 4.5

Version Description

  • Stylesheet in the admin.css file improved.
  • The '!important' declarations in the admin.css file removed.
  • Code formatting in the admin.js file improved.
  • Code commenting improved.
  • Load of the additional remote CSS file removed from the admin.js file.
  • Changed the sorting of enqueueing of scripts.
  • The ''Family' page tab renamed to 'Store'.
  • Added ad banner of my store website.
Download this release

Release Info

Developer Arthur Gareginyan
Plugin Icon 128x128 My Custom Functions
Version 4.5
Comparing to
See all releases

Code changes from version 4.4.1 to 4.5

inc/css/admin.css CHANGED
@@ -5,18 +5,17 @@
5
  * @uthor Arthur Gareginyan
6
  * @link https://www.arthurgareginyan.com
7
  * @copyright Copyright (c) 2016-2017 Arthur Gareginyan. All Rights Reserved.
8
- * @since 4.4
9
  */
10
 
11
 
12
  /* Main
13
  -------------------------------------------------------------- */
14
  body {
15
- background: #f1f1f1 !important;
16
  }
17
  p {
18
  font-family: Verdana, Geneva, sans-serif;
19
- font-size: 13px;
20
  }
21
  .postbox a {
22
  text-decoration: none;
@@ -25,10 +24,10 @@ p {
25
  /* Title and Description of page
26
  -------------------------------------------------------------- */
27
  h2 {
28
- padding: 30px 30px !important;
29
  background-color: #333;
30
- color: #e0dfdc !important;
31
- font-family: Georgia, "Times New Roman", "Bitstream Charter", Times, serif !important;
32
  font-size: 60px !important;
33
  text-align: center;
34
  text-transform: uppercase;
@@ -42,27 +41,29 @@ h2 {
42
  0 6px 0 #1a1a1a,
43
  0 7px 0 #161616,
44
  0 8px 0 #121212,
45
- 0 22px 30px rgba(0, 0, 0, 0.9);
46
- letter-spacing: .1em;
47
  line-height: 50px !important;
48
  overflow: hidden;
49
  }
50
  h2 span {
51
  content: '\A';
52
- display: block ;
53
  margin-top: 15px;
54
  font-size: 16px;
55
  text-shadow: none;
56
- line-height: 20px !important;
57
  }
58
  h2 span a,
59
  h2 span a:hover {
60
- color: #ffffff;
61
  }
62
  h2 span a:hover {
63
  text-shadow: none;
64
  text-decoration: none;
65
  -webkit-transition: all 0.2s ease-in-out;
 
 
66
  transition: all 0.2s ease-in-out;
67
  }
68
  h2 .version {
@@ -70,12 +71,12 @@ h2 .version {
70
  right: 40px;
71
  color: #a6a6a6;
72
  text-shadow: none;
73
- letter-spacing: .1em;
74
  }
75
 
76
  /* Titles and Descriptions of sections
77
  -------------------------------------------------------------- */
78
- h3.title {
79
  font-family: Georgia, "Times New Roman", "Bitstream Charter", Times, serif;
80
  font-size: 16px !important;
81
  font-weight: 400;
@@ -85,7 +86,7 @@ h3.title {
85
  /* Modal - PopUp windows
86
  -------------------------------------------------------------- */
87
  .modal-dialog {
88
- margin-top: 15% !important;
89
  }
90
  .hello-message .modal-body {
91
  height: 180px;
@@ -115,12 +116,11 @@ h3.title {
115
  /* Notes
116
  -------------------------------------------------------------- */
117
  .note {
118
- padding: 0.30em 1.0em;
119
  border-left: 3px solid #05c2ff;
120
  border-right: 3px solid #05c2ff;
121
- background: rgba(5, 194, 255, 0.09);
122
  font-family: Verdana, Geneva, sans-serif;
123
- font-size: 13px;
124
  color: #646464;
125
  padding-left: 15px;
126
  letter-spacing: 0.1px;
@@ -128,21 +128,24 @@ h3.title {
128
 
129
  /* Sidebar
130
  -------------------------------------------------------------- */
131
- #side-sortables {
132
- position: relative;
133
- }
134
-
135
- #side-sortables .postbox {
136
- text-align: center;
137
- }
138
-
139
- #side-sortables #help p {
140
- margin: 0;
141
- }
142
-
143
- #side-sortables .paypal {
144
- font-size: 18px;
145
- }
 
 
 
146
 
147
  /* Support - addition section
148
  -------------------------------------------------------------- */
@@ -157,13 +160,13 @@ h3.title {
157
  -------------------------------------------------------------- */
158
  @media (max-width: 860px) {
159
  .inner-sidebar {
160
- display: none !important;
161
  }
162
  #support-addition {
163
  display: block;
164
  }
165
  #post-body-content {
166
- margin-right: 0 !important;
167
  }
168
  }
169
 
@@ -175,10 +178,6 @@ h3.title {
175
  .tab-page.active {
176
  display: block;
177
  }
178
- .tab-page li {
179
- font-family: Verdana, Geneva, sans-serif;
180
- font-size: 13px;
181
- }
182
 
183
  /* Tabs navigation menu
184
  -------------------------------------------------------------- */
@@ -191,25 +190,24 @@ h3.title {
191
  display: -ms-flexbox;
192
  display: flex;
193
  height: 50px;
194
- margin: -11px 0px 18px 0px;
195
- background: #ffffff;
196
- border: 1px solid rgba(34, 36, 38, 0.15);
197
- box-shadow: 0px 1px 2px 0 rgba(34, 36, 38, 0.15);
198
- border-radius: 0.30rem;
199
  }
200
  .tabs-nav:after {
201
  content: '';
202
  display: block;
203
- height: 0px;
204
  clear: both;
205
  visibility: hidden;
206
  }
207
-
208
  .tabs-nav li {
209
  position: relative;
210
  display: block;
211
  float: left;
212
- margin-bottom: 0px;
213
  }
214
  .tabs-nav li:first-of-type a {
215
  border-radius: 3px 0 0 3px;
@@ -217,11 +215,11 @@ h3.title {
217
  .tabs-nav li.active:before {
218
  position: absolute;
219
  content: '';
220
- top: 0%;
221
- right: 0px;
222
  height: 100%;
223
  width: 1px;
224
- background: rgba(34, 36, 38, 0.1);
225
  }
226
  .tabs-nav li.active:after {
227
  background-color: #f2f2f2;
@@ -230,18 +228,21 @@ h3.title {
230
  top: 100%;
231
  left: 50%;
232
  -webkit-transform: translateX(-50%) translateY(-50%) rotate(45deg);
 
 
233
  -ms-transform: translateX(-50%) translateY(-50%) rotate(45deg);
234
  transform: translateX(-50%) translateY(-50%) rotate(45deg);
235
- margin: 0.8px 0em 0em;
236
  width: 0.6em;
237
  height: 0.6em;
238
  border: none;
239
  border-bottom: 1px solid #d4d4d5;
240
  border-right: 1px solid #d4d4d5;
241
  -webkit-transition: background 0.1s ease;
 
 
242
  transition: background 0.1s ease;
243
  }
244
-
245
  .tabs-nav li a {
246
  position: relative;
247
  display: block;
@@ -251,31 +252,31 @@ h3.title {
251
  color: grey;
252
  border-left: 1px solid;
253
  border-right: 1px solid;
254
- border-color: #ffffff;
255
  }
256
  .tabs-nav li a:hover,
257
  .tabs-nav li a:focus {
258
  text-decoration: none;
259
- background: rgba(0, 0, 0, 0.03);
260
- border-color: #eeeeee;
261
  }
262
  .tabs-nav li.active a,
263
  .tabs-nav li.active a:hover,
264
  .tabs-nav li.active a:focus {
265
- background: rgba(0, 0, 0, 0.05);
266
- color: rgba(0, 0, 0, 0.95);
267
  font-weight: normal;
268
- border-color: #eeeeee;
269
- -webkit-box-shadow: inset 0 3px 5px rgba(0, 0, 0, .125);
270
- box-shadow: inset 0 3px 5px rgba(0, 0, 0, .125);
 
271
  }
272
-
273
- @media (max-width:500px) {
274
  .tabs-nav li:last-of-type {
275
  display: none;
276
  }
277
  }
278
- @media (max-width:413px) {
279
  .tabs-nav li:nth-last-of-type(2) {
280
  display: none;
281
  }
@@ -287,7 +288,7 @@ h3.title {
287
  margin-top: 10px;
288
  }
289
  .panel-heading a {
290
- text-decoration: none !important;
291
  }
292
  .panel-title,
293
  .panel-title:before,
@@ -295,18 +296,17 @@ h3.title {
295
  font-family: Georgia, "Times New Roman", "Bitstream Charter", Times, serif;
296
  font-size: 16px;
297
  font-weight: 400;
298
- color: #6d6d6d !important;
299
- text-shadow: 1px 1px 0px #fff;
300
  }
301
- .panel-title:before {
302
  content: "Q.";
303
  display: inline-block;
304
- color: red !important;
305
  padding-right: 8px;
306
  }
307
  .panel-title:after {
308
  content: "\25BC";
309
- display: inline-block;
310
  float: right;
311
  margin: 0;
312
  background: none;
@@ -318,9 +318,9 @@ h3.title {
318
  display: inline;
319
  }
320
  .panel-body:before {
321
- content: "A." !important;
322
- display: inline-block !important;
323
- color: #00a5e2 !important;
324
  padding-right: 8px;
325
  }
326
  .panel-body {
@@ -343,23 +343,24 @@ h3.title {
343
  .custom-counter li {
344
  counter-increment: step-counter;
345
  margin-bottom: 15px;
 
346
  }
347
  .custom-counter li::before {
348
  content: counter(step-counter);
349
  margin-left: -30px;
350
  margin-right: 8px;
 
351
  font-size: 90%;
352
- background-color: rgb(0,200,200);
353
- color: white;
354
  font-weight: bold;
355
- padding: 4px 7px;
 
356
  border-radius: 50%;
357
  }
358
 
359
  /* WordPress Color Picker
360
  -------------------------------------------------------------- */
361
  .wp-picker-container a {
362
- text-decoration: none !important;
363
  }
364
  .wp-color-result {
365
  height: 30px;
@@ -371,7 +372,7 @@ h3.title {
371
  /* ON/OFF Buttons
372
  -------------------------------------------------------------- */
373
  .btn {
374
- border-radius: 0 !important;
375
  }
376
 
377
  /* Form-table
@@ -395,13 +396,13 @@ h3.title {
395
  td.help-text {
396
  width: 90%;
397
  font-family: Verdana, Geneva, sans-serif;
398
- font-size: 12px !important;
399
  font-style: italic;
400
  float: left;
401
  clear: left;
402
  color: #797979;
403
  line-height: 15px;
404
- padding-top: 0px !important;
405
  }
406
 
407
  /* INPUT and TEXTAREA
@@ -413,7 +414,6 @@ textarea {
413
  .form-table input[type=text] {
414
  max-width: 90%;
415
  }
416
-
417
  textarea,
418
  .form-table input[type=text] {
419
  padding-top: 5px;
@@ -422,9 +422,9 @@ textarea,
422
  -moz-border-radius: 3px;
423
  border-radius: 3px;
424
  position: relative;
425
- -webkit-box-shadow: inset 0px 1px 1px rgba(0, 0, 0, 0.5), 0px 1px 0px rgba(255, 255, 255, 0.2);
426
- -moz-box-shadow: inset 0px 1px 1px rgba(0, 0, 0, 0.5), 0px 1px 0px rgba(255, 255, 255, 0.2);
427
- box-shadow: inset 0px 1px 1px rgba(0, 0, 0, 0.5), 0px 1px 0px rgba(255, 255, 255, 0.2);
428
  }
429
 
430
  /* SPECIFIC TO THIS PLUGIN
5
  * @uthor Arthur Gareginyan
6
  * @link https://www.arthurgareginyan.com
7
  * @copyright Copyright (c) 2016-2017 Arthur Gareginyan. All Rights Reserved.
8
+ * @since 4.5
9
  */
10
 
11
 
12
  /* Main
13
  -------------------------------------------------------------- */
14
  body {
15
+ background: #f1f1f1;
16
  }
17
  p {
18
  font-family: Verdana, Geneva, sans-serif;
 
19
  }
20
  .postbox a {
21
  text-decoration: none;
24
  /* Title and Description of page
25
  -------------------------------------------------------------- */
26
  h2 {
27
+ padding: 30px !important;
28
  background-color: #333;
29
+ color: #e0dfdc;
30
+ font-family: Georgia, "Times New Roman", "Bitstream Charter", Times, serif;
31
  font-size: 60px !important;
32
  text-align: center;
33
  text-transform: uppercase;
41
  0 6px 0 #1a1a1a,
42
  0 7px 0 #161616,
43
  0 8px 0 #121212,
44
+ 0 22px 30px #000000;
45
+ letter-spacing: 0.1em;
46
  line-height: 50px !important;
47
  overflow: hidden;
48
  }
49
  h2 span {
50
  content: '\A';
51
+ display: block;
52
  margin-top: 15px;
53
  font-size: 16px;
54
  text-shadow: none;
55
+ line-height: 20px;
56
  }
57
  h2 span a,
58
  h2 span a:hover {
59
+ color: #fff;
60
  }
61
  h2 span a:hover {
62
  text-shadow: none;
63
  text-decoration: none;
64
  -webkit-transition: all 0.2s ease-in-out;
65
+ -moz-transition: all 0.2s ease-in-out;
66
+ -o-transition: all 0.2s ease-in-out;
67
  transition: all 0.2s ease-in-out;
68
  }
69
  h2 .version {
71
  right: 40px;
72
  color: #a6a6a6;
73
  text-shadow: none;
74
+ letter-spacing: 0.1em;
75
  }
76
 
77
  /* Titles and Descriptions of sections
78
  -------------------------------------------------------------- */
79
+ .title {
80
  font-family: Georgia, "Times New Roman", "Bitstream Charter", Times, serif;
81
  font-size: 16px !important;
82
  font-weight: 400;
86
  /* Modal - PopUp windows
87
  -------------------------------------------------------------- */
88
  .modal-dialog {
89
+ margin-top: 15%;
90
  }
91
  .hello-message .modal-body {
92
  height: 180px;
116
  /* Notes
117
  -------------------------------------------------------------- */
118
  .note {
119
+ padding: 0.3em 1em;
120
  border-left: 3px solid #05c2ff;
121
  border-right: 3px solid #05c2ff;
122
+ background: #eafaff;
123
  font-family: Verdana, Geneva, sans-serif;
 
124
  color: #646464;
125
  padding-left: 15px;
126
  letter-spacing: 0.1px;
128
 
129
  /* Sidebar
130
  -------------------------------------------------------------- */
131
+ #side-sortables {
132
+ position: relative;
133
+ }
134
+ #side-sortables .postbox {
135
+ text-align: center;
136
+ }
137
+ #side-sortables .paypal {
138
+ max-width: 100%;
139
+ font-size: 18px;
140
+ overflow: hidden;
141
+ }
142
+ #side-sortables .banner .inside {
143
+ margin: 0;
144
+ padding: 5px 0;
145
+ }
146
+ #side-sortables .banner img {
147
+ width: 265px;
148
+ }
149
 
150
  /* Support - addition section
151
  -------------------------------------------------------------- */
160
  -------------------------------------------------------------- */
161
  @media (max-width: 860px) {
162
  .inner-sidebar {
163
+ display: none;
164
  }
165
  #support-addition {
166
  display: block;
167
  }
168
  #post-body-content {
169
+ margin-right: 0;
170
  }
171
  }
172
 
178
  .tab-page.active {
179
  display: block;
180
  }
 
 
 
 
181
 
182
  /* Tabs navigation menu
183
  -------------------------------------------------------------- */
190
  display: -ms-flexbox;
191
  display: flex;
192
  height: 50px;
193
+ margin: -11px 0 18px 0;
194
+ background: #fff;
195
+ border: 1px solid #d9d9d9;
196
+ box-shadow: 0 1px 2px 0 #d9d9d9;
197
+ border-radius: 0.3rem;
198
  }
199
  .tabs-nav:after {
200
  content: '';
201
  display: block;
202
+ height: 0;
203
  clear: both;
204
  visibility: hidden;
205
  }
 
206
  .tabs-nav li {
207
  position: relative;
208
  display: block;
209
  float: left;
210
+ margin-bottom: 0;
211
  }
212
  .tabs-nav li:first-of-type a {
213
  border-radius: 3px 0 0 3px;
215
  .tabs-nav li.active:before {
216
  position: absolute;
217
  content: '';
218
+ top: 0;
219
+ right: 0;
220
  height: 100%;
221
  width: 1px;
222
+ background: #f2f2f2;
223
  }
224
  .tabs-nav li.active:after {
225
  background-color: #f2f2f2;
228
  top: 100%;
229
  left: 50%;
230
  -webkit-transform: translateX(-50%) translateY(-50%) rotate(45deg);
231
+ -moz-transform: translateX(-50%) translateY(-50%) rotate(45deg);
232
+ -o-transform: translateX(-50%) translateY(-50%) rotate(45deg);
233
  -ms-transform: translateX(-50%) translateY(-50%) rotate(45deg);
234
  transform: translateX(-50%) translateY(-50%) rotate(45deg);
235
+ margin: 0.8px 0 0;
236
  width: 0.6em;
237
  height: 0.6em;
238
  border: none;
239
  border-bottom: 1px solid #d4d4d5;
240
  border-right: 1px solid #d4d4d5;
241
  -webkit-transition: background 0.1s ease;
242
+ -moz-transition: background 0.1s ease;
243
+ -o-transition: background 0.1s ease;
244
  transition: background 0.1s ease;
245
  }
 
246
  .tabs-nav li a {
247
  position: relative;
248
  display: block;
252
  color: grey;
253
  border-left: 1px solid;
254
  border-right: 1px solid;
255
+ border-color: #fff;
256
  }
257
  .tabs-nav li a:hover,
258
  .tabs-nav li a:focus {
259
  text-decoration: none;
260
+ background: #f8f8f8;
261
+ border-color: #eee;
262
  }
263
  .tabs-nav li.active a,
264
  .tabs-nav li.active a:hover,
265
  .tabs-nav li.active a:focus {
266
+ background: #f4f4f4;
267
+ color: #000;
268
  font-weight: normal;
269
+ border-color: #eee;
270
+ -webkit-box-shadow: inset 0 3px 5px #d9d9d9;
271
+ -moz-box-shadow: inset 0 3px 5px #d9d9d9;
272
+ box-shadow: inset 0 3px 5px #d9d9d9;
273
  }
274
+ @media (max-width: 500px) {
 
275
  .tabs-nav li:last-of-type {
276
  display: none;
277
  }
278
  }
279
+ @media (max-width: 413px) {
280
  .tabs-nav li:nth-last-of-type(2) {
281
  display: none;
282
  }
288
  margin-top: 10px;
289
  }
290
  .panel-heading a {
291
+ text-decoration: none;
292
  }
293
  .panel-title,
294
  .panel-title:before,
296
  font-family: Georgia, "Times New Roman", "Bitstream Charter", Times, serif;
297
  font-size: 16px;
298
  font-weight: 400;
299
+ color: #6d6d6d;
300
+ text-shadow: 1px 1px 0 #fff;
301
  }
302
+ .panel-title:before {
303
  content: "Q.";
304
  display: inline-block;
305
+ color: red;
306
  padding-right: 8px;
307
  }
308
  .panel-title:after {
309
  content: "\25BC";
 
310
  float: right;
311
  margin: 0;
312
  background: none;
318
  display: inline;
319
  }
320
  .panel-body:before {
321
+ content: "A.";
322
+ display: inline-block;
323
+ color: #00a5e2;
324
  padding-right: 8px;
325
  }
326
  .panel-body {
343
  .custom-counter li {
344
  counter-increment: step-counter;
345
  margin-bottom: 15px;
346
+ font-family: Verdana, Geneva, sans-serif;
347
  }
348
  .custom-counter li::before {
349
  content: counter(step-counter);
350
  margin-left: -30px;
351
  margin-right: 8px;
352
+ padding: 4px 7px;
353
  font-size: 90%;
 
 
354
  font-weight: bold;
355
+ background-color: #00c8c8;
356
+ color: white;
357
  border-radius: 50%;
358
  }
359
 
360
  /* WordPress Color Picker
361
  -------------------------------------------------------------- */
362
  .wp-picker-container a {
363
+ text-decoration: none;
364
  }
365
  .wp-color-result {
366
  height: 30px;
372
  /* ON/OFF Buttons
373
  -------------------------------------------------------------- */
374
  .btn {
375
+ border-radius: 0;
376
  }
377
 
378
  /* Form-table
396
  td.help-text {
397
  width: 90%;
398
  font-family: Verdana, Geneva, sans-serif;
399
+ font-size: 12px;
400
  font-style: italic;
401
  float: left;
402
  clear: left;
403
  color: #797979;
404
  line-height: 15px;
405
+ padding-top: 0;
406
  }
407
 
408
  /* INPUT and TEXTAREA
414
  .form-table input[type=text] {
415
  max-width: 90%;
416
  }
 
417
  textarea,
418
  .form-table input[type=text] {
419
  padding-top: 5px;
422
  -moz-border-radius: 3px;
423
  border-radius: 3px;
424
  position: relative;
425
+ -webkit-box-shadow: inset 0 1px 1px #f4f4f4, 0 1px 0 #d9d9d9;
426
+ -moz-box-shadow: inset 0 1px 1px #f4f4f4, 0 1px 0 #d9d9d9;
427
+ box-shadow: inset 0 1px 1px #f4f4f4, 0 1px 0 #d9d9d9;
428
  }
429
 
430
  /* SPECIFIC TO THIS PLUGIN
inc/js/admin.js CHANGED
@@ -5,7 +5,7 @@
5
  * @uthor Arthur Gareginyan
6
  * @link https://www.arthurgareginyan.com
7
  * @copyright Copyright (c) 2016-2017 Arthur Gareginyan. All Rights Reserved.
8
- * @since 4.4.1
9
  */
10
 
11
 
@@ -18,12 +18,12 @@ jQuery(document).ready(function($) {
18
 
19
  // Change textarea to CodeMirror editor
20
  var editor = CodeMirror.fromTextArea( elements , {
21
- lineNumbers: true,
22
- firstLineNumber: 1,
23
- matchBrackets: true,
24
- indentUnit: 4,
25
- mode: 'text/x-php',
26
- styleActiveLine: true
27
  });
28
 
29
  // Refresh CodeMirror editor after 1 second
@@ -32,25 +32,25 @@ jQuery(document).ready(function($) {
32
  },1);
33
  });
34
 
35
- // Remove the "successful" message after 3 seconds
36
- if (".updated") {
37
  setTimeout(function() {
38
- $(".updated").fadeOut();
39
  }, 3000);
40
  }
41
 
42
- // Dynamic content
43
- $( ".include-tab-author" ).load( "https://mycyberuniverse.com/public-files/dynamic-content/page-for-include.html #include-tab-author" );
44
- $( ".include-tab-support" ).load( "https://mycyberuniverse.com/public-files/dynamic-content/page-for-include.html #include-tab-support" );
45
- $( ".include-tab-family" ).load( "https://mycyberuniverse.com/public-files/dynamic-content/page-for-include.html #include-tab-family" );
46
- $( ".additional-css" ).load( "https://mycyberuniverse.com/public-files/dynamic-content/styles.html" );
47
 
48
  // Add questions and answers into spoilers and color them in different colors
49
- $(".panel-group .panel").each(function(i) {
50
- $( ".question-" + (i+1) ).appendTo( $("h4", this) );
51
- $( ".answer-" + (i+1) ).appendTo( $(".panel-body", this) );
52
 
53
- if ( $(this).find("h4 div").hasClass('question-red') ) {
54
  $(this).addClass('panel-danger');
55
  } else {
56
  $(this).addClass('panel-info');
5
  * @uthor Arthur Gareginyan
6
  * @link https://www.arthurgareginyan.com
7
  * @copyright Copyright (c) 2016-2017 Arthur Gareginyan. All Rights Reserved.
8
+ * @since 4.5
9
  */
10
 
11
 
18
 
19
  // Change textarea to CodeMirror editor
20
  var editor = CodeMirror.fromTextArea( elements , {
21
+ lineNumbers: true,
22
+ firstLineNumber: 1,
23
+ matchBrackets: true,
24
+ indentUnit: 4,
25
+ mode: 'text/x-php',
26
+ styleActiveLine: true
27
  });
28
 
29
  // Refresh CodeMirror editor after 1 second
32
  },1);
33
  });
34
 
35
+ // Remove the 'successful' message after 3 seconds
36
+ if ('.updated') {
37
  setTimeout(function() {
38
+ $('.updated').fadeOut();
39
  }, 3000);
40
  }
41
 
42
+ // Add dynamic content to page tabs. Needed for having an up to date content.
43
+ $('.include-tab-author').load('https://www.spacexchimp.com/assets/dynamic-content/plugins.html #include-tab-author');
44
+ $('.include-tab-support').load('https://www.spacexchimp.com/assets/dynamic-content/plugins.html #include-tab-support');
45
+ $('.include-tab-store').load('https://www.spacexchimp.com/assets/dynamic-content/plugins.html #include-tab-store');
46
+ $('.include-banner').load('https://www.spacexchimp.com/assets/dynamic-content/plugins.html #include-banner');
47
 
48
  // Add questions and answers into spoilers and color them in different colors
49
+ $('.panel-group .panel').each(function(i) {
50
+ $('.question-' + (i+1) ).appendTo( $('h4', this) );
51
+ $('.answer-' + (i+1) ).appendTo( $('.panel-body', this) );
52
 
53
+ if ( $(this).find('h4 div').hasClass('question-red') ) {
54
  $(this).addClass('panel-danger');
55
  } else {
56
  $(this).addClass('panel-info');
inc/php/core.php CHANGED
@@ -37,10 +37,10 @@ add_filter( 'plugin_action_links_' . MCFUNC_BASE, MCFUNC_PREFIX . '_settings_lin
37
  /**
38
  * Print link to My Custom Functions PRO page
39
  *
40
- * @since 4.4.1
41
  */
42
  function MCFunctions_upgrade_link( $links ) {
43
- $upgrade_page = '<a href="https://www.arthurgareginyan.com/plugin-my-custom-functions-pro.html" target="_blank"><b style="color:red;">' . __( 'Upgrade to PRO', MCFUNC_TEXT ) . '</b></a>';
44
  array_unshift( $links, $upgrade_page );
45
  return $links;
46
  }
@@ -49,7 +49,7 @@ add_filter( 'plugin_action_links_' . MCFUNC_BASE, MCFUNC_PREFIX . '_upgrade_link
49
  /**
50
  * Print additional links to plugin meta row
51
  *
52
- * @since 4.4.1
53
  */
54
  function MCFunctions_plugin_row_meta( $links, $file ) {
55
 
@@ -57,7 +57,7 @@ function MCFunctions_plugin_row_meta( $links, $file ) {
57
 
58
  $new_links = array(
59
  'donate' => '<a href="https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=8A88KC7TFF6CS" target="_blank"><span class="dashicons dashicons-heart"></span> ' . __( 'Donate', MCFUNC_TEXT ) . '</a>',
60
- 'upgrage' => '<a href="https://www.arthurgareginyan.com/plugin-my-custom-functions-pro.html" target="_blank"><span class="dashicons dashicons-star-filled"></span> ' . __( 'Upgrade to PRO', MCFUNC_TEXT ) . '</a>'
61
  );
62
  $links = array_merge( $links, $new_links );
63
  }
37
  /**
38
  * Print link to My Custom Functions PRO page
39
  *
40
+ * @since 4.5
41
  */
42
  function MCFunctions_upgrade_link( $links ) {
43
+ $upgrade_page = '<a href="https://www.spacexchimp.com/plugins/my-custom-functions-pro.html" target="_blank"><b style="color:red;">' . __( 'Upgrade to PRO', MCFUNC_TEXT ) . '</b></a>';
44
  array_unshift( $links, $upgrade_page );
45
  return $links;
46
  }
49
  /**
50
  * Print additional links to plugin meta row
51
  *
52
+ * @since 4.5
53
  */
54
  function MCFunctions_plugin_row_meta( $links, $file ) {
55
 
57
 
58
  $new_links = array(
59
  'donate' => '<a href="https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=8A88KC7TFF6CS" target="_blank"><span class="dashicons dashicons-heart"></span> ' . __( 'Donate', MCFUNC_TEXT ) . '</a>',
60
+ 'upgrage' => '<a href="https://www.spacexchimp.com/plugins/my-custom-functions-pro.html" target="_blank"><span class="dashicons dashicons-star-filled"></span> ' . __( 'Upgrade to PRO', MCFUNC_TEXT ) . '</a>'
61
  );
62
  $links = array_merge( $links, $new_links );
63
  }
inc/php/enqueue.php CHANGED
@@ -10,7 +10,7 @@ defined( 'ABSPATH' ) or die( "Restricted access!" );
10
  /**
11
  * Load scripts and style sheet for settings page
12
  *
13
- * @since 4.4
14
  */
15
  function MCFunctions_load_scripts_admin( $hook ) {
16
 
@@ -28,12 +28,6 @@ function MCFunctions_load_scripts_admin( $hook ) {
28
  // Load jQuery library
29
  wp_enqueue_script( 'jquery' );
30
 
31
- // Style sheet
32
- wp_enqueue_style( $prefix . '-admin-css', $url . 'inc/css/admin.css' );
33
-
34
- // JavaScript
35
- wp_enqueue_script( $prefix . '-admin-js', $url . 'inc/js/admin.js', array(), false, true );
36
-
37
  // Bootstrap library
38
  wp_enqueue_style( $prefix . '-bootstrap-css', $url . 'inc/lib/bootstrap/bootstrap.css' );
39
  wp_enqueue_style( $prefix . '-bootstrap-theme-css', $url . 'inc/lib/bootstrap/bootstrap-theme.css' );
@@ -44,5 +38,11 @@ function MCFunctions_load_scripts_admin( $hook ) {
44
  wp_enqueue_script( $prefix . '-codemirror-js', $url . 'inc/lib/codemirror/codemirror-compressed.js' );
45
  wp_enqueue_script( $prefix . '-codemirror-active-line-js', $url . 'inc/lib/codemirror/addons/active-line.js' );
46
 
 
 
 
 
 
 
47
  }
48
  add_action( 'admin_enqueue_scripts', MCFUNC_PREFIX . '_load_scripts_admin' );
10
  /**
11
  * Load scripts and style sheet for settings page
12
  *
13
+ * @since 4.5
14
  */
15
  function MCFunctions_load_scripts_admin( $hook ) {
16
 
28
  // Load jQuery library
29
  wp_enqueue_script( 'jquery' );
30
 
 
 
 
 
 
 
31
  // Bootstrap library
32
  wp_enqueue_style( $prefix . '-bootstrap-css', $url . 'inc/lib/bootstrap/bootstrap.css' );
33
  wp_enqueue_style( $prefix . '-bootstrap-theme-css', $url . 'inc/lib/bootstrap/bootstrap-theme.css' );
38
  wp_enqueue_script( $prefix . '-codemirror-js', $url . 'inc/lib/codemirror/codemirror-compressed.js' );
39
  wp_enqueue_script( $prefix . '-codemirror-active-line-js', $url . 'inc/lib/codemirror/addons/active-line.js' );
40
 
41
+ // Style sheet
42
+ wp_enqueue_style( $prefix . '-admin-css', $url . 'inc/css/admin.css' );
43
+
44
+ // JavaScript
45
+ wp_enqueue_script( $prefix . '-admin-js', $url . 'inc/js/admin.js', array(), false, true );
46
+
47
  }
48
  add_action( 'admin_enqueue_scripts', MCFUNC_PREFIX . '_load_scripts_admin' );
inc/php/functional.php CHANGED
@@ -65,7 +65,7 @@ function MCFunctions_exec() {
65
  return; // EXIT
66
  }
67
 
68
- // Read data from DB
69
  $options = get_option( MCFUNC_SETTINGS . '_settings' );
70
  $content = isset( $options['anarcho_cfunctions-content'] ) && !empty( $options['anarcho_cfunctions-content'] ) ? $options['anarcho_cfunctions-content'] : ' ';
71
  $enable = isset( $options['enable'] ) && !empty( $options['enable'] ) ? $options['enable'] : ' ';
65
  return; // EXIT
66
  }
67
 
68
+ // Read options from database and declare variables
69
  $options = get_option( MCFUNC_SETTINGS . '_settings' );
70
  $content = isset( $options['anarcho_cfunctions-content'] ) && !empty( $options['anarcho_cfunctions-content'] ) ? $options['anarcho_cfunctions-content'] : ' ';
71
  $enable = isset( $options['enable'] ) && !empty( $options['enable'] ) ? $options['enable'] : ' ';
inc/php/messages.php CHANGED
@@ -10,7 +10,7 @@ defined( 'ABSPATH' ) or die( "Restricted access!" );
10
  /**
11
  * Hello message - Bootstrap Modal
12
  *
13
- * @since 4.4.1
14
  */
15
  function MCFunctions_hello_message() {
16
 
@@ -25,7 +25,7 @@ function MCFunctions_hello_message() {
25
  <div class="modal-dialog">
26
  <div class="modal-content">
27
  <div class="modal-body">
28
- <img src="https://mycyberuniverse.com/public-files/images/Arthur.png">
29
  <button type="button" class="close" data-dismiss="modal">&times;</button>
30
  <p><?php _e( 'Hello. I\'m Arthur, the author of this plugin.', MCFUNC_TEXT ); ?></p>
31
  <p><?php printf(
10
  /**
11
  * Hello message - Bootstrap Modal
12
  *
13
+ * @since 4.5
14
  */
15
  function MCFunctions_hello_message() {
16
 
25
  <div class="modal-dialog">
26
  <div class="modal-content">
27
  <div class="modal-body">
28
+ <img src="https://www.spacexchimp.com/assets/dynamic-content/images/avatar.png">
29
  <button type="button" class="close" data-dismiss="modal">&times;</button>
30
  <p><?php _e( 'Hello. I\'m Arthur, the author of this plugin.', MCFUNC_TEXT ); ?></p>
31
  <p><?php printf(
inc/php/page.php CHANGED
@@ -10,7 +10,7 @@ defined( 'ABSPATH' ) or die( "Restricted access!" );
10
  /**
11
  * Render Settings Page
12
  *
13
- * @since 4.4.1
14
  */
15
  function MCFunctions_render_submenu_page() {
16
 
@@ -51,7 +51,7 @@ function MCFunctions_render_submenu_page() {
51
  <li><a href="#tab-faq" data-toggle="tab"><?php _e( 'F.A.Q.', $text ); ?></a></li>
52
  <li><a href="#tab-author" data-toggle="tab"><?php _e( 'Author', $text ); ?></a></li>
53
  <li><a href="#tab-support" data-toggle="tab"><?php _e( 'Support', $text ); ?></a></li>
54
- <li><a href="#tab-family" data-toggle="tab"><?php _e( 'Family', $text ); ?></a></li>
55
  </ul>
56
  <!-- END-TABS NAVIGATION MENU -->
57
 
@@ -74,9 +74,9 @@ function MCFunctions_render_submenu_page() {
74
  <li><?php _e( 'Place your PHP code in the field.', $text ); ?><br><br>
75
  <?php _e( 'Example of PHP code:', $text ); ?>
76
  <pre><code>function NameOfYourFunction {
77
-
78
  ...
79
-
80
  }</code></pre>
81
  <p class="note"><b><?php _e( 'Note!', $text ); ?></b> <?php _e( 'Please do not wrap your PHP code in the <code>&lt;?php</code>...<code>?&gt;</code> HTML tags.', $text ); ?></p>
82
  <p class="note"><b><?php _e( 'Note!', $text ); ?></b> <?php _e( 'Before use, please read the instructions on the F.A.Q. tab on what to do in case of a website crash.', $text ); ?></p>
@@ -140,11 +140,11 @@ function MCFunctions_render_submenu_page() {
140
  <div class="question-4"><?php _e( 'Can I use HTML/CSS/JS code integrated in PHP code?', $text ); ?></div>
141
  <div class="answer-4"><?php _e( 'Yes. But you need to do it properly, like this:', $text ); ?><br>
142
  <pre><code>function NameOfYourFunction {
143
-
144
  echo "&lt;script&gt;
145
  // Your JS code
146
  &lt;/script&gt;";
147
-
148
  }</code></pre>
149
  </div>
150
 
@@ -237,8 +237,8 @@ function MCFunctions_render_submenu_page() {
237
  <!-- END-TAB 5 -->
238
 
239
  <!-- TAB 6 -->
240
- <div class="tab-page fade" id="tab-family">
241
- <div class="include-tab-family"></div>
242
  </div>
243
  <!-- END-TAB 6 -->
244
 
10
  /**
11
  * Render Settings Page
12
  *
13
+ * @since 4.5
14
  */
15
  function MCFunctions_render_submenu_page() {
16
 
51
  <li><a href="#tab-faq" data-toggle="tab"><?php _e( 'F.A.Q.', $text ); ?></a></li>
52
  <li><a href="#tab-author" data-toggle="tab"><?php _e( 'Author', $text ); ?></a></li>
53
  <li><a href="#tab-support" data-toggle="tab"><?php _e( 'Support', $text ); ?></a></li>
54
+ <li><a href="#tab-store" data-toggle="tab"><?php _e( 'Store', $text ); ?></a></li>
55
  </ul>
56
  <!-- END-TABS NAVIGATION MENU -->
57
 
74
  <li><?php _e( 'Place your PHP code in the field.', $text ); ?><br><br>
75
  <?php _e( 'Example of PHP code:', $text ); ?>
76
  <pre><code>function NameOfYourFunction {
77
+
78
  ...
79
+
80
  }</code></pre>
81
  <p class="note"><b><?php _e( 'Note!', $text ); ?></b> <?php _e( 'Please do not wrap your PHP code in the <code>&lt;?php</code>...<code>?&gt;</code> HTML tags.', $text ); ?></p>
82
  <p class="note"><b><?php _e( 'Note!', $text ); ?></b> <?php _e( 'Before use, please read the instructions on the F.A.Q. tab on what to do in case of a website crash.', $text ); ?></p>
140
  <div class="question-4"><?php _e( 'Can I use HTML/CSS/JS code integrated in PHP code?', $text ); ?></div>
141
  <div class="answer-4"><?php _e( 'Yes. But you need to do it properly, like this:', $text ); ?><br>
142
  <pre><code>function NameOfYourFunction {
143
+
144
  echo "&lt;script&gt;
145
  // Your JS code
146
  &lt;/script&gt;";
147
+
148
  }</code></pre>
149
  </div>
150
 
237
  <!-- END-TAB 5 -->
238
 
239
  <!-- TAB 6 -->
240
+ <div class="tab-page fade" id="tab-store">
241
+ <div class="include-tab-store"></div>
242
  </div>
243
  <!-- END-TAB 6 -->
244
 
inc/php/settings.php CHANGED
@@ -10,30 +10,30 @@ defined( 'ABSPATH' ) or die( "Restricted access!" );
10
  /**
11
  * Render Settings Tab
12
  *
13
- * @since 4.4.1
14
  */
15
  ?>
16
  <!-- SIDEBAR -->
17
  <div class="inner-sidebar">
18
  <div id="side-sortables" class="meta-box-sortabless ui-sortable">
19
 
20
- <div id="about" class="postbox">
21
  <h3 class="title"><?php _e( 'About', $text ); ?></h3>
22
  <div class="inside">
23
  <p><?php _e( 'This plugin allows you to easily and safely add your custom functions (PHP code) directly out of your WordPress Admin area, without the need to have an external editor.', $text ); ?></p>
24
  </div>
25
  </div>
26
 
27
- <div id="upgrade" class="postbox">
28
  <h3 class="title"><?php _e( 'Upgrade', $text ); ?></h3>
29
  <div class="inside">
30
- <a href="https://www.arthurgareginyan.com/plugin-my-custom-functions-pro.html" target="_blank">
31
- <img src="https://mycyberuniverse.com/public-files/sale/pro-version.png" alt="PRO">
32
  </a>
33
  </div>
34
  </div>
35
 
36
- <div id="support" class="postbox">
37
  <h3 class="title"><?php _e( 'Support', $text ); ?></h3>
38
  <div class="inside">
39
  <p><?php _e( 'I\'m an independent developer, without a regular income, so every little contribution helps cover my costs and lets me spend more time building things for people like you to enjoy.', $text ); ?></p>
@@ -42,13 +42,15 @@ defined( 'ABSPATH' ) or die( "Restricted access!" );
42
  </div>
43
  </div>
44
 
45
- <div id="help" class="postbox">
46
  <h3 class="title"><?php _e( 'Help', $text ); ?></h3>
47
  <div class="inside">
48
  <p><?php _e( 'If you have a question, please read the information in the FAQ section.', $text ); ?></p>
49
  </div>
50
  </div>
51
 
 
 
52
  </div>
53
  </div>
54
  <!-- END-SIDEBAR -->
10
  /**
11
  * Render Settings Tab
12
  *
13
+ * @since 4.5
14
  */
15
  ?>
16
  <!-- SIDEBAR -->
17
  <div class="inner-sidebar">
18
  <div id="side-sortables" class="meta-box-sortabless ui-sortable">
19
 
20
+ <div class="postbox about">
21
  <h3 class="title"><?php _e( 'About', $text ); ?></h3>
22
  <div class="inside">
23
  <p><?php _e( 'This plugin allows you to easily and safely add your custom functions (PHP code) directly out of your WordPress Admin area, without the need to have an external editor.', $text ); ?></p>
24
  </div>
25
  </div>
26
 
27
+ <div class="postbox banner">
28
  <h3 class="title"><?php _e( 'Upgrade', $text ); ?></h3>
29
  <div class="inside">
30
+ <a href="https://www.spacexchimp.com/plugins/my-custom-functions-pro.html" target="_blank">
31
+ <img src="https://www.spacexchimp.com/assets/dynamic-content/images/plugin-upgrade.png" alt="PRO">
32
  </a>
33
  </div>
34
  </div>
35
 
36
+ <div class="postbox support">
37
  <h3 class="title"><?php _e( 'Support', $text ); ?></h3>
38
  <div class="inside">
39
  <p><?php _e( 'I\'m an independent developer, without a regular income, so every little contribution helps cover my costs and lets me spend more time building things for people like you to enjoy.', $text ); ?></p>
42
  </div>
43
  </div>
44
 
45
+ <div class="postbox help">
46
  <h3 class="title"><?php _e( 'Help', $text ); ?></h3>
47
  <div class="inside">
48
  <p><?php _e( 'If you have a question, please read the information in the FAQ section.', $text ); ?></p>
49
  </div>
50
  </div>
51
 
52
+ <div class="include-banner"></div>
53
+
54
  </div>
55
  </div>
56
  <!-- END-SIDEBAR -->
languages/my-custom-functions-es_ES.po CHANGED
@@ -96,7 +96,7 @@ msgid "Support"
96
  msgstr ""
97
 
98
  #: inc/php/page.php:54
99
- msgid "Family"
100
  msgstr ""
101
 
102
  #: inc/php/page.php:71
96
  msgstr ""
97
 
98
  #: inc/php/page.php:54
99
+ msgid "Store"
100
  msgstr ""
101
 
102
  #: inc/php/page.php:71
languages/my-custom-functions-fr_FR.po CHANGED
@@ -98,7 +98,7 @@ msgid "Support"
98
  msgstr ""
99
 
100
  #: inc/php/page.php:54
101
- msgid "Family"
102
  msgstr ""
103
 
104
  #: inc/php/page.php:71
98
  msgstr ""
99
 
100
  #: inc/php/page.php:54
101
+ msgid "Store"
102
  msgstr ""
103
 
104
  #: inc/php/page.php:71
languages/my-custom-functions-zh_TW.po CHANGED
@@ -96,7 +96,7 @@ msgid "Support"
96
  msgstr ""
97
 
98
  #: inc/php/page.php:54
99
- msgid "Family"
100
  msgstr ""
101
 
102
  #: inc/php/page.php:71
96
  msgstr ""
97
 
98
  #: inc/php/page.php:54
99
+ msgid "Store"
100
  msgstr ""
101
 
102
  #: inc/php/page.php:71
languages/my-custom-functions.pot CHANGED
@@ -95,7 +95,7 @@ msgid "Support"
95
  msgstr ""
96
 
97
  #: inc/php/page.php:54
98
- msgid "Family"
99
  msgstr ""
100
 
101
  #: inc/php/page.php:71
95
  msgstr ""
96
 
97
  #: inc/php/page.php:54
98
+ msgid "Store"
99
  msgstr ""
100
 
101
  #: inc/php/page.php:71
my-custom-functions.php CHANGED
@@ -5,7 +5,7 @@
5
  * Description: Easily and safely add your custom functions (PHP code) directly out of your WordPress Admin area, without the need to have an external editor.
6
  * Author: Arthur Gareginyan
7
  * Author URI: https://www.arthurgareginyan.com
8
- * Version: 4.4.1
9
  * License: GPL3
10
  * Text Domain: my-custom-functions
11
  * Domain Path: /languages/
5
  * Description: Easily and safely add your custom functions (PHP code) directly out of your WordPress Admin area, without the need to have an external editor.
6
  * Author: Arthur Gareginyan
7
  * Author URI: https://www.arthurgareginyan.com
8
+ * Version: 4.5
9
  * License: GPL3
10
  * Text Domain: my-custom-functions
11
  * Domain Path: /languages/
readme.txt CHANGED
@@ -4,7 +4,7 @@ Tags: code, php, function, snippet, custom, execute, edit, editing, editor, func
4
  Donate link: https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=8A88KC7TFF6CS
5
  Requires at least: 3.9
6
  Tested up to: 4.8
7
- Stable tag: 4.4.1
8
  License: GPL3
9
  License URI: http://www.gnu.org/licenses/gpl-3.0.html
10
 
@@ -45,7 +45,7 @@ An easy to use, with intuitive interface, WordPress plugin that gives you the ab
45
  * Ability to collapse/expand the certain fields with code
46
  * Well documented
47
 
48
- [Get the PRO version now!](https://www.arthurgareginyan.com/plugin-my-custom-functions-pro.html)
49
 
50
  **Coming soon:**
51
 
@@ -191,11 +191,21 @@ Commercial licensing (e.g. for projects that can’t use an open-source license)
191
 
192
  * [Developer Website](https://www.arthurgareginyan.com)
193
  * [Dedicated Plugin Page on GitHub](https://github.com/ArthurGareginyan/my-custom-functions)
194
- * [Premium Version](https://www.arthurgareginyan.com/plugin-my-custom-functions-pro.html)
195
 
196
 
197
  == Changelog ==
198
 
 
 
 
 
 
 
 
 
 
 
199
  = 4.4.1 =
200
  * The HTTPS mixed content issue fixed by changing all links to HTTPS.
201
  * Content of the "FAQ" section updated.
4
  Donate link: https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=8A88KC7TFF6CS
5
  Requires at least: 3.9
6
  Tested up to: 4.8
7
+ Stable tag: 4.5
8
  License: GPL3
9
  License URI: http://www.gnu.org/licenses/gpl-3.0.html
10
 
45
  * Ability to collapse/expand the certain fields with code
46
  * Well documented
47
 
48
+ [Get the PRO version now!](https://www.spacexchimp.com/plugins/my-custom-functions-pro.html)
49
 
50
  **Coming soon:**
51
 
191
 
192
  * [Developer Website](https://www.arthurgareginyan.com)
193
  * [Dedicated Plugin Page on GitHub](https://github.com/ArthurGareginyan/my-custom-functions)
194
+ * [Premium Version](https://www.spacexchimp.com/plugins/my-custom-functions-pro.html)
195
 
196
 
197
  == Changelog ==
198
 
199
+ = 4.5 =
200
+ * Stylesheet in the admin.css file improved.
201
+ * The '!important' declarations in the admin.css file removed.
202
+ * Code formatting in the admin.js file improved.
203
+ * Code commenting improved.
204
+ * Load of the additional remote CSS file removed from the admin.js file.
205
+ * Changed the sorting of enqueueing of scripts.
206
+ * The ''Family' page tab renamed to 'Store'.
207
+ * Added ad banner of my store website.
208
+
209
  = 4.4.1 =
210
  * The HTTPS mixed content issue fixed by changing all links to HTTPS.
211
  * Content of the "FAQ" section updated.