Font Organizer - Version 1.3.0

Version Description

  • Added quick editing in custom elements table on section 5.
  • Added better error message when Google API key not working.
  • Added facebook page like box in the settings.
  • Fixed HTTPS website could not load the css.
  • Fixed timeout issues with google fonts request.
  • Fixed tinyMCE and tinyMCE advanced font families preview not working sometimes.
  • Fixed a few minor bugs.
Download this release

Release Info

Developer hivewebstudios
Plugin Icon 128x128 Font Organizer
Version 1.3.0
Comparing to
See all releases

Code changes from version 1.2.1 to 1.3.0

assets/css/settings.css CHANGED
@@ -22,10 +22,19 @@ input.error + span {
22
  font-size: 18px;
23
  display: block;
24
  position: absolute;
25
- right: 2%;
26
  top: 10%;
27
  }
28
 
 
 
 
 
 
 
 
 
 
 
29
  input.valid + span:after {
30
  content: "\2713";
31
  color: green;
@@ -87,4 +96,30 @@ label.required:after {
87
  color: green;
88
  text-decoration: none;
89
  box-shadow: none;
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
90
  }
22
  font-size: 18px;
23
  display: block;
24
  position: absolute;
 
25
  top: 10%;
26
  }
27
 
28
+ input.valid.rtl + span,
29
+ input.error.rtl + span {
30
+ left: 2%;
31
+ }
32
+
33
+ input.valid.ltr + span,
34
+ input.error.ltr + span {
35
+ right: 2%;
36
+ }
37
+
38
  input.valid + span:after {
39
  content: "\2713";
40
  color: green;
96
  color: green;
97
  text-decoration: none;
98
  box-shadow: none;
99
+ }
100
+
101
+ /* Custom Elements Section */
102
+ .fo_info, .fo_success, .fo_warning, .fo_error {
103
+ margin: 10px 0px;
104
+ }
105
+ .fo_info {
106
+ color: #00529B;
107
+ background-color: #BDE5F8;
108
+ }
109
+ .fo_success {
110
+ color: #4F8A10;
111
+ background-color: #DFF2BF;
112
+ }
113
+ .fo_warning {
114
+ color: #9F6000;
115
+ background-color: #FEEFB3;
116
+ }
117
+ .fo_error {
118
+ color: #D8000C;
119
+ background-color: #FFBABA;
120
+ }
121
+ .fo_info i, .fo_success i, .fo_warning i, .fo_error i {
122
+ margin:10px 22px;
123
+ font-size:2em;
124
+ vertical-align:middle;
125
  }
classes/class-ElementsTable.php CHANGED
@@ -55,10 +55,23 @@ class ElementsTable extends WP_List_Table {
55
  return sprintf(
56
  '<input type="checkbox" name="%1$s[]" value="%2$s" />',
57
  /*$1%s*/ $this->_args['singular'], //Let's simply repurpose the table's singular label ("movie")
58
- /*$2%s*/ $item->id //The value of the checkbox should be the record's id
59
  );
60
  }
61
 
 
 
 
 
 
 
 
 
 
 
 
 
 
62
 
63
  /**
64
  * Associative array of columns
@@ -78,8 +91,10 @@ class ElementsTable extends WP_List_Table {
78
 
79
  function column_important( $item ) {
80
  //Return the title contents
81
- return sprintf( '%1$s <span style="color:silver"></span>',
82
- /*$1%s*/ $item->important ? __('Yes', 'font-organizer') : __('No', 'font-organizer')
 
 
83
  );
84
  }
85
 
@@ -87,8 +102,7 @@ class ElementsTable extends WP_List_Table {
87
 
88
  //Build row actions
89
  $actions = array(
90
- //'edit' => sprintf( '<a href="?page=%s&type=%s&id=%s">Edit</a>', $_REQUEST['page'], 'edit', $item->user_id ),
91
- 'delete' => sprintf( '<a href="?page=%s&action=%s&manage_font_id=%s&custom_element=%s#step6">Delete</a>', $_REQUEST['page'], 'delete', $item->font_id, $item->id ),
92
  );
93
 
94
  //Return the title contents
55
  return sprintf(
56
  '<input type="checkbox" name="%1$s[]" value="%2$s" />',
57
  /*$1%s*/ $this->_args['singular'], //Let's simply repurpose the table's singular label ("movie")
58
+ /*$2%s*/ $item->id //The value of the checkbox should be the record's id
59
  );
60
  }
61
 
62
+ /**
63
+ * Render the custom_elements editable text
64
+ *
65
+ * @param array $item
66
+ *
67
+ * @return string
68
+ */
69
+ function column_custom_elements( $item ) {
70
+ return sprintf(
71
+ '<input type="text" name="custom_elements" value="%1$s" style="background:transparent;box-shadow:none;border:0;width:100%%;direction:ltr;" />',
72
+ /*$2%s*/ $item->custom_elements
73
+ );
74
+ }
75
 
76
  /**
77
  * Associative array of columns
91
 
92
  function column_important( $item ) {
93
  //Return the title contents
94
+ return sprintf( '<input type="checkbox" name="important" %1$s /> <span style="color:%2$s">%3$s</span>',
95
+ checked($item->important, true, false),
96
+ $item->important ? 'darkgreen' : 'darkred',
97
+ /*$1%s*/ $item->important ? __('Yes', 'font-organizer') : __('No', 'font-organizer')
98
  );
99
  }
100
 
102
 
103
  //Build row actions
104
  $actions = array(
105
+ 'delete' => sprintf( '<a href="?page=%s&action=%s&manage_font_id=%s&custom_element=%s#step6">%s</a>', $_REQUEST['page'], 'delete', $item->font_id, $item->id, __('Delete', 'font-organizer')),
 
106
  );
107
 
108
  //Return the title contents
font-organizer.php CHANGED
@@ -1,14 +1,14 @@
1
  <?php
2
  /**
3
  * @package Font_Organizer
4
- * @version 1.2.1
5
  */
6
  /*
7
  Plugin Name: Font Organizer
8
  Plugin URI: https://wordpress.org/plugins/font-organizer/
9
  Description: Font Organizer is the complete solution for font implementation in WordPress websites.
10
  Author: Hive
11
- Version: 1.2.1
12
  Author URI: https://hivewebstudios.com
13
  Text Domain: font-organizer
14
  */
@@ -18,8 +18,10 @@ define( 'FO_USABLE_FONTS_DATABASE', 'fo_usable_fonts' );
18
  define( 'FO_ELEMENTS_DATABASE', 'fo_elements' );
19
  define( 'FO_DEFAULT_ROLE', 'administrator' );
20
 
 
 
21
  global $fo_db_version;
22
- $fo_db_version = '1.2.1';
23
 
24
  global $fo_css_directory_path;
25
  $fo_css_directory_path = wp_upload_dir()['basedir'] . '/font-organizer';
@@ -27,6 +29,9 @@ $fo_css_directory_path = wp_upload_dir()['basedir'] . '/font-organizer';
27
  global $fo_css_base_url_path;
28
  $fo_css_base_url_path = wp_upload_dir()['baseurl'] . '/font-organizer';
29
 
 
 
 
30
  global $fo_declarations_css_file_name;
31
  $fo_declarations_css_file_name = 'fo-declarations.css';
32
 
@@ -42,8 +47,6 @@ function fo_update_db_check() {
42
  // Create the files and delete the old fo-fonts.css.
43
  global $fo_css_directory_path;
44
 
45
- require_once FO_ABSPATH . 'helpers.php';
46
-
47
  require_once FO_ABSPATH . 'settings.php';
48
 
49
  $settings_page = new FoSettingsPage();
@@ -68,7 +71,6 @@ function fo_load_textdomain() {
68
  }
69
 
70
  function fo_init(){
71
- require_once FO_ABSPATH . 'helpers.php';
72
 
73
  if( is_admin() ){
74
  require_once FO_ABSPATH . 'settings.php';
1
  <?php
2
  /**
3
  * @package Font_Organizer
4
+ * @version 1.3.0
5
  */
6
  /*
7
  Plugin Name: Font Organizer
8
  Plugin URI: https://wordpress.org/plugins/font-organizer/
9
  Description: Font Organizer is the complete solution for font implementation in WordPress websites.
10
  Author: Hive
11
+ Version: 1.3.0
12
  Author URI: https://hivewebstudios.com
13
  Text Domain: font-organizer
14
  */
18
  define( 'FO_ELEMENTS_DATABASE', 'fo_elements' );
19
  define( 'FO_DEFAULT_ROLE', 'administrator' );
20
 
21
+ require_once FO_ABSPATH . 'helpers.php';
22
+
23
  global $fo_db_version;
24
+ $fo_db_version = '1.3.0';
25
 
26
  global $fo_css_directory_path;
27
  $fo_css_directory_path = wp_upload_dir()['basedir'] . '/font-organizer';
29
  global $fo_css_base_url_path;
30
  $fo_css_base_url_path = wp_upload_dir()['baseurl'] . '/font-organizer';
31
 
32
+ // Fix ssl for base url.
33
+ $fo_css_base_url_path = fo_get_all_http_url( $fo_css_base_url_path );
34
+
35
  global $fo_declarations_css_file_name;
36
  $fo_declarations_css_file_name = 'fo-declarations.css';
37
 
47
  // Create the files and delete the old fo-fonts.css.
48
  global $fo_css_directory_path;
49
 
 
 
50
  require_once FO_ABSPATH . 'settings.php';
51
 
52
  $settings_page = new FoSettingsPage();
71
  }
72
 
73
  function fo_init(){
 
74
 
75
  if( is_admin() ){
76
  require_once FO_ABSPATH . 'settings.php';
helpers.php CHANGED
@@ -161,6 +161,14 @@
161
  return ($al > $bl) ? +1 : -1;
162
  }
163
 
 
 
 
 
 
 
 
 
164
  function fo_array_sort(&$array){
165
  return usort($array, 'cmp_font');
166
  }
161
  return ($al > $bl) ? +1 : -1;
162
  }
163
 
164
+ function fo_get_all_http_url($url){
165
+ if ( is_ssl() )
166
+ $url = str_replace( 'http://', 'https://', $url );
167
+ else
168
+ $url = str_replace('https://', 'http://', $url);
169
+ return $url;
170
+ }
171
+
172
  function fo_array_sort(&$array){
173
  return usort($array, 'cmp_font');
174
  }
languages/font-organizer-he_IL.mo CHANGED
Binary file
languages/font-organizer-he_IL.po CHANGED
@@ -1,8 +1,8 @@
1
  msgid ""
2
  msgstr ""
3
  "Project-Id-Version: Font Organizer\n"
4
- "POT-Creation-Date: 2016-12-14 19:54+0200\n"
5
- "PO-Revision-Date: 2016-12-14 19:54+0200\n"
6
  "Last-Translator: \n"
7
  "Language-Team: \n"
8
  "Language: he_IL\n"
@@ -20,35 +20,35 @@ msgstr ""
20
  "X-Poedit-SearchPath-0: .\n"
21
  "X-Poedit-SearchPathExcluded-0: *.js\n"
22
 
23
- #: classes/class-ElementsTable.php:71
24
  msgid "Id"
25
  msgstr "מזהה"
26
 
27
- #: classes/class-ElementsTable.php:72
28
  msgid "Custom Elements"
29
  msgstr "אלמנט מותאם אישית"
30
 
31
- #: classes/class-ElementsTable.php:73 settings.php:1140 settings.php:1157
32
  msgid "Important"
33
  msgstr "חשוב"
34
 
35
- #: classes/class-ElementsTable.php:82
36
  msgid "Yes"
37
  msgstr "כן"
38
 
39
- #: classes/class-ElementsTable.php:82
40
  msgid "No"
41
  msgstr "לא"
42
 
43
- #: classes/class-ElementsTable.php:122
44
  msgid "Delete"
45
  msgstr "מחק"
46
 
47
- #: classes/class-ElementsTable.php:191
48
  msgid "No custom elements found."
49
  msgstr "לא נמצאו אלמנטים מותאמים אישית."
50
 
51
- #: font-organizer.php:194 settings.php:204 settings.php:378
52
  msgid "Font Settings"
53
  msgstr "הגדרות גופנים"
54
 
@@ -68,95 +68,95 @@ msgstr "מיובא"
68
  msgid "Google (Early Access)"
69
  msgstr "גוגל (גישה מוקדמת)"
70
 
71
- #: settings.php:127
72
  msgid "<body> Font"
73
  msgstr "גופן לתגית <body>"
74
 
75
- #: settings.php:128
76
  msgid "<h1> Font"
77
  msgstr "גופן לתגית <h1>"
78
 
79
- #: settings.php:129
80
  msgid "<h2> Font"
81
  msgstr "גופן לתגית <h2>"
82
 
83
- #: settings.php:130
84
  msgid "<h3> Font"
85
  msgstr "גופן לתגית <h3>"
86
 
87
- #: settings.php:131
88
  msgid "<h4> Font"
89
  msgstr "גופן לתגית <h4>"
90
 
91
- #: settings.php:132
92
  msgid "<h5> Font"
93
  msgstr "גופן לתגית <h5>"
94
 
95
- #: settings.php:133
96
  msgid "<h6> Font"
97
  msgstr "גופן לתגית <h6>"
98
 
99
- #: settings.php:134
100
  msgid "<p> Font"
101
  msgstr "גופן לתגית <p>"
102
 
103
- #: settings.php:135
104
  msgid "<q> Font"
105
  msgstr "גופן לתגית <q>"
106
 
107
- #: settings.php:136
108
  msgid "<li> Font"
109
  msgstr "גופן לתגית <li>"
110
 
111
- #: settings.php:137
112
  msgid "<a> Font"
113
  msgstr "גופן לתגית <a>"
114
 
115
- #: settings.php:332
116
  msgid "Google API key is not valid: "
117
  msgstr "המפתח של גוגל אינה חוקי:"
118
 
119
- #: settings.php:335
120
  msgid "Google API key is not set! Cannot display google fonts."
121
  msgstr "המפתח של גוגל אינו מוגדר! אין אפשרות להציג גופנים של גוגל."
122
 
123
- #: settings.php:389
124
  msgid "General Settings"
125
  msgstr "הגדרות כלליות"
126
 
127
- #: settings.php:405
128
  msgid "1. Add Fonts"
129
  msgstr "1. הוספת גופנים"
130
 
131
- #: settings.php:407
132
  msgid ""
133
  "Step 1: Select and add fonts to be used in your website. Select as many as "
134
  "you wish."
135
  msgstr "שלב 1: בחר והוסף גופנים לאתר האינטרנט שלך. ניתן לבחר כמה שתרצה."
136
 
137
- #: settings.php:409
138
  msgid "You can select google or regular fonts."
139
  msgstr "באפשרותך לבחור בגופנים של גוגל או גופנים מוכרים."
140
 
141
- #: settings.php:413
142
  msgid "Available Fonts"
143
  msgstr "גופנים זמינים"
144
 
145
- #: settings.php:420
146
  msgid "Use This Font"
147
  msgstr "השתמש בגופן זה"
148
 
149
- #: settings.php:431
150
  msgid "2. Custom Fonts"
151
  msgstr "2. גופנים מיובאים"
152
 
153
- #: settings.php:433
154
  msgid ""
155
  "Step 2: Upload custom fonts to be used in your website. Here too, you can "
156
  "upload as many as you wish."
157
  msgstr "שלב 2: כאן ניתן לעלות גופנים לאתר שלך. גם כאן, ניתן להעלות כמה שתרצה."
158
 
159
- #: settings.php:435
160
  msgid ""
161
  "Name the font you want to upload and upload all the files formats for this "
162
  "font. In order to support more browsers you can click the green plus to "
@@ -166,48 +166,48 @@ msgstr ""
166
  "ביותר דפדפנים ביכולתך ללחוץ על הפלוס הירוק להעלות עוד סוגי פורמטים. אנו "
167
  "מציעים woff. ו- woff2.."
168
 
169
- #: settings.php:439
170
  msgid "Font Weight Name"
171
  msgstr "שם משקל גופן"
172
 
173
- #: settings.php:440
174
  msgid "Font weight name cannot be empty."
175
  msgstr "שם משקל הגופן אינו יכול להיות ריק."
176
 
177
- #: settings.php:444
178
  msgid "Font Weight File"
179
  msgstr "קובץ משקל גופן"
180
 
181
- #: settings.php:448
182
  msgid "Accepted Font Format : "
183
  msgstr "פורמט גופן נתמך:"
184
 
185
- #: settings.php:451 settings.php:452
186
  msgid "Add Another Font Format File"
187
  msgstr "הוסף עוד קובץ פורמט גופן"
188
 
189
- #: settings.php:459
190
  msgid "Upload"
191
  msgstr "העלה"
192
 
193
- #: settings.php:470
194
  msgid "3. Known Elements Settings"
195
  msgstr "3. הגדרות אלמנטים הידועים"
196
 
197
- #: settings.php:473
198
  msgid ""
199
  "Step 3: For each element you can assign a font you have added in step 1 & 2."
200
  msgstr "שלב 3: עבור כל אלמנט ניתן להקצות גופן שהוספת בשלב 1 & 2."
201
 
202
- #: settings.php:474
203
  msgid "Note: "
204
  msgstr "הערה:"
205
 
206
- #: settings.php:474
207
  msgid "Custom fonts you uploaded are automatically used in your website."
208
  msgstr "גופנים מיובאים אוטומטית נוספים לאתר שלך."
209
 
210
- #: settings.php:475
211
  msgid ""
212
  "In case of font not displaying in your website after saving, try clear the "
213
  "cache using Shift+F5 or Ctrl+Shift+Delete to clear all."
@@ -215,37 +215,37 @@ msgstr ""
215
  "במקרה שגופן אינו מוצג באתר האינטרנט שלך לאחר שמירה, נסה לנקות את המטמון "
216
  "באמצעות Shift + F5 או Ctrl+Shift+Delete כדי לנקות הכל."
217
 
218
- #: settings.php:490
219
  msgid "4. Custom Elements Settings"
220
  msgstr "4. הגדרות אלמנטים מותאמים אישית"
221
 
222
- #: settings.php:493
223
  msgid ""
224
  "Step 4: Assign font that you have added to your website to custom elements."
225
  msgstr ""
226
  "שלב 4: כאן ניתן לשייך גופן שהוספת לאתר האינטרנט שלך לאלמנטים מותאמים אישית."
227
 
228
- #: settings.php:497 settings.php:534
229
  msgid "Font"
230
  msgstr "גופן"
231
 
232
- #: settings.php:498 settings.php:537
233
  msgid "-- Select Font --"
234
  msgstr "-- בחירת גופן --"
235
 
236
- #: settings.php:498
237
  msgid "You must select a font for the elements."
238
  msgstr "עליך לבחור גופן עבור הרכיבים."
239
 
240
- #: settings.php:503
241
  msgid "Custom Element"
242
  msgstr "רכיב מותאם אישית"
243
 
244
- #: settings.php:507
245
  msgid "Font custom elements cannot be empty."
246
  msgstr "רכיב מותאם אישית אינו יכול להיות ריק."
247
 
248
- #: settings.php:508
249
  msgid ""
250
  "Custom elements can be seperated by commas to allow multiple elements. "
251
  "Example: #myelementid, .myelementclass, .myelementclass .foo, etc."
@@ -253,35 +253,61 @@ msgstr ""
253
  "רכיבים מותאמים אישית ניתן להפריד בפסיקים כדי לאפשר מספר אלמנטים. דוגמה: ."
254
  "myelementclass, #myelementid, .myelementclass .foo, וכו '."
255
 
256
- #: settings.php:519
257
  msgid "Apply Custom Elements"
258
  msgstr "החל על אלמנטים אלה"
259
 
260
- #: settings.php:530
261
  msgid "5. Manage Fonts"
262
  msgstr "5. ניהול גופנים"
263
 
264
- #: settings.php:549
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
265
  msgid "Delete Font"
266
  msgstr "מחק גופן"
267
 
268
- #: settings.php:549
269
  msgid "Are you sure you want to delete this font from your website?"
270
  msgstr "האם אתה בטוח שברצונך למחוק גופן זה מהאתר שלך?"
271
 
272
- #: settings.php:560
273
  msgid "Source"
274
  msgstr "מקור"
275
 
276
- #: settings.php:564
277
  msgid "Urls"
278
  msgstr "כתובת"
279
 
280
- #: settings.php:599
281
  msgid "Thank you"
282
  msgstr "תודה לך!"
283
 
284
- #: settings.php:604
285
  msgid ""
286
  "Thank you for using an <a href=\"http://hivewebstudios.com\" target=\"_blank"
287
  "\">Hive</a> plugin! We 5 star you already, so why don't you <a href="
@@ -293,107 +319,107 @@ msgstr ""
293
  "\"https://wordpress.org/support/plugin/font-organizer/reviews/?rate=5#new-"
294
  "post\" target=\"_blank\">תדרג אותנו 5 כוכבים גם</a>?"
295
 
296
- #: settings.php:606
297
  msgid "Anyway, if you need anything, this may help:"
298
  msgstr "בכל מקרה, אם את/ה צריכ/ה משהו, אולי זה יעזור:"
299
 
300
- #: settings.php:608
301
  msgid "FAQ"
302
  msgstr "שאלות נפוצות"
303
 
304
- #: settings.php:609
305
  msgid "Support forums"
306
  msgstr "פורום תמיכה"
307
 
308
- #: settings.php:610
309
  msgid "Contact us"
310
  msgstr "צרו קשר"
311
 
312
- #: settings.php:611
313
- msgid "Hive Facebook page"
314
- msgstr "עמוד הפייסבוק של Hive"
315
 
316
- #: settings.php:624 settings.php:660 settings.php:675 settings.php:694
317
  msgid "Session ended, please try again."
318
  msgstr "הסתיים הטיפול, אנא נסה שנית."
319
 
320
- #: settings.php:630
321
  msgid "Font name is empty or invalid."
322
  msgstr "שם גופן הוא ריק או לא חוקי."
323
 
324
- #: settings.php:635
325
  msgid "Font file is not selected."
326
  msgstr "לא נבחר קובץ הגופן."
327
 
328
- #: settings.php:651
329
  msgid "Font file(s) not selected."
330
  msgstr "לא נבחרו קבצים לגופן."
331
 
332
- #: settings.php:666
333
  msgid "Usable font is empty or invalid."
334
  msgstr "גופן לשימוש הוא ריק או לא חוקי."
335
 
336
- #: settings.php:681
337
  msgid "Custom elements is empty or invalid."
338
  msgstr "אלמנטים מותאמים אישית ריק או לא חוקי."
339
 
340
- #: settings.php:701
341
  msgid "Something went horribly wrong. Ask the support!"
342
  msgstr "משהו השתבש בצורה נוראית. תשאל את התמיכה!"
343
 
344
- #: settings.php:812
345
  msgid "Error adding custom elements: "
346
  msgstr "שגיאה בעת הוספת אלמנטים מותאמים אישית:"
347
 
348
- #: settings.php:819
349
  msgid "Custom elements added to your website!"
350
  msgstr "אלמנטים מותאמים אישית התווספו לאתר שלך!"
351
 
352
- #: settings.php:827
353
  msgid "Font can now be used in your website!"
354
  msgstr "כעת ניתן להשתמש בגופן באתר האינטרנט שלך!"
355
 
356
- #: settings.php:835
357
  msgid "Font deleted from your website!"
358
  msgstr "גופן נמחק מהאתר שלך!"
359
 
360
- #: settings.php:843
361
  msgid "The file has been uploaded!"
362
  msgstr "הקובץ הועלה בהצלחה."
363
 
364
- #: settings.php:851
365
  msgid "Error uploading the file: "
366
  msgstr "שגיאה בהעלאת הקובץ:"
367
 
368
- #: settings.php:859
369
  msgid "Error adding font to website fonts: "
370
  msgstr "שגיאה בעת הוספת גופן לאתר:"
371
 
372
- #: settings.php:867
373
  msgid "Error deleting font: "
374
  msgstr "שגיאה במחיקת גופן:"
375
 
376
- #: settings.php:875
377
  msgid "Failed to open or create the css file. Check for permissions."
378
  msgstr "לא ניתן לפתוח או ליצור את קובץ ה-css. בדוק אם יש הרשאות."
379
 
380
- #: settings.php:917
381
  msgid "Google API Key"
382
  msgstr "מפתח API של גוגל"
383
 
384
- #: settings.php:924
385
  msgid "Show Font Family Preview"
386
  msgstr "טען תצוגה מקדימה לגופנים"
387
 
388
- #: settings.php:934
389
  msgid "Access Settings Role"
390
  msgstr "רמת הרשאה להגדרות"
391
 
392
- #: settings.php:1046
393
  msgid "This is the general settings for the site."
394
  msgstr "אלה הם הגדרות כלליות עבור התוסף."
395
 
396
- #: settings.php:1065
397
  #, php-format
398
  msgid ""
399
  "To get all the fonts, Google requires the mandatory use of an API key, get "
@@ -402,24 +428,24 @@ msgstr ""
402
  "כדי לקבל את כל הגופנים, גוגל מחייב שימוש ב-API, ניתן לקבל אחד מ<a href=\"%s"
403
  "\" target=\"_blank\">כאן</a> בחינם ובמהירות."
404
 
405
- #: settings.php:1066
406
  #, php-format
407
  msgid " Need help? Click <a href=\"%s\" target=\"_blank\">here</a>"
408
  msgstr "צריך עזרה? לחץ <a href=\"%s\" target=\"_blank\">כאן</a>"
409
 
410
- #: settings.php:1089
411
  msgid "Include Font Family Preview"
412
  msgstr "הוסף גופן לדף זה לצפיה בתוצגה מוקדמת"
413
 
414
- #: settings.php:1091
415
  msgid "Show font preview when listing the fonts (might be slow)"
416
  msgstr "הצג תצוגה מקדימה של הגופן ברשימה של גופנים (עשוי להיות איטי)."
417
 
418
- #: settings.php:1143 settings.php:1160
419
  msgid "Include !important to this element to always apply."
420
  msgstr "הוסף תגית important! על מנת שגופן זה תמיד יופיע."
421
 
422
- #: settings.php:1172
423
  msgid "Default"
424
  msgstr "ברירת מחדל"
425
 
@@ -445,6 +471,9 @@ msgstr "Hive"
445
  msgid "https://hivewebstudios.com"
446
  msgstr "https://hivewebstudios.com"
447
 
 
 
 
448
  #~ msgid "Font file is not valid."
449
  #~ msgstr "קובץ הגופן אינו חוקי."
450
 
1
  msgid ""
2
  msgstr ""
3
  "Project-Id-Version: Font Organizer\n"
4
+ "POT-Creation-Date: 2016-12-26 15:08+0200\n"
5
+ "PO-Revision-Date: 2016-12-26 15:08+0200\n"
6
  "Last-Translator: \n"
7
  "Language-Team: \n"
8
  "Language: he_IL\n"
20
  "X-Poedit-SearchPath-0: .\n"
21
  "X-Poedit-SearchPathExcluded-0: *.js\n"
22
 
23
+ #: classes/class-ElementsTable.php:84
24
  msgid "Id"
25
  msgstr "מזהה"
26
 
27
+ #: classes/class-ElementsTable.php:85
28
  msgid "Custom Elements"
29
  msgstr "אלמנט מותאם אישית"
30
 
31
+ #: classes/class-ElementsTable.php:86 settings.php:1306 settings.php:1323
32
  msgid "Important"
33
  msgstr "חשוב"
34
 
35
+ #: classes/class-ElementsTable.php:97 settings.php:224
36
  msgid "Yes"
37
  msgstr "כן"
38
 
39
+ #: classes/class-ElementsTable.php:97 settings.php:227
40
  msgid "No"
41
  msgstr "לא"
42
 
43
+ #: classes/class-ElementsTable.php:105 classes/class-ElementsTable.php:136
44
  msgid "Delete"
45
  msgstr "מחק"
46
 
47
+ #: classes/class-ElementsTable.php:205
48
  msgid "No custom elements found."
49
  msgstr "לא נמצאו אלמנטים מותאמים אישית."
50
 
51
+ #: font-organizer.php:196 settings.php:318 settings.php:517
52
  msgid "Font Settings"
53
  msgstr "הגדרות גופנים"
54
 
68
  msgid "Google (Early Access)"
69
  msgstr "גוגל (גישה מוקדמת)"
70
 
71
+ #: settings.php:128
72
  msgid "<body> Font"
73
  msgstr "גופן לתגית <body>"
74
 
75
+ #: settings.php:129
76
  msgid "<h1> Font"
77
  msgstr "גופן לתגית <h1>"
78
 
79
+ #: settings.php:130
80
  msgid "<h2> Font"
81
  msgstr "גופן לתגית <h2>"
82
 
83
+ #: settings.php:131
84
  msgid "<h3> Font"
85
  msgstr "גופן לתגית <h3>"
86
 
87
+ #: settings.php:132
88
  msgid "<h4> Font"
89
  msgstr "גופן לתגית <h4>"
90
 
91
+ #: settings.php:133
92
  msgid "<h5> Font"
93
  msgstr "גופן לתגית <h5>"
94
 
95
+ #: settings.php:134
96
  msgid "<h6> Font"
97
  msgstr "גופן לתגית <h6>"
98
 
99
+ #: settings.php:135
100
  msgid "<p> Font"
101
  msgstr "גופן לתגית <p>"
102
 
103
+ #: settings.php:136
104
  msgid "<q> Font"
105
  msgstr "גופן לתגית <q>"
106
 
107
+ #: settings.php:137
108
  msgid "<li> Font"
109
  msgstr "גופן לתגית <li>"
110
 
111
+ #: settings.php:138
112
  msgid "<a> Font"
113
  msgstr "גופן לתגית <a>"
114
 
115
+ #: settings.php:464
116
  msgid "Google API key is not valid: "
117
  msgstr "המפתח של גוגל אינה חוקי:"
118
 
119
+ #: settings.php:467
120
  msgid "Google API key is not set! Cannot display google fonts."
121
  msgstr "המפתח של גוגל אינו מוגדר! אין אפשרות להציג גופנים של גוגל."
122
 
123
+ #: settings.php:528
124
  msgid "General Settings"
125
  msgstr "הגדרות כלליות"
126
 
127
+ #: settings.php:544
128
  msgid "1. Add Fonts"
129
  msgstr "1. הוספת גופנים"
130
 
131
+ #: settings.php:546
132
  msgid ""
133
  "Step 1: Select and add fonts to be used in your website. Select as many as "
134
  "you wish."
135
  msgstr "שלב 1: בחר והוסף גופנים לאתר האינטרנט שלך. ניתן לבחר כמה שתרצה."
136
 
137
+ #: settings.php:548
138
  msgid "You can select google or regular fonts."
139
  msgstr "באפשרותך לבחור בגופנים של גוגל או גופנים מוכרים."
140
 
141
+ #: settings.php:552
142
  msgid "Available Fonts"
143
  msgstr "גופנים זמינים"
144
 
145
+ #: settings.php:559
146
  msgid "Use This Font"
147
  msgstr "השתמש בגופן זה"
148
 
149
+ #: settings.php:570
150
  msgid "2. Custom Fonts"
151
  msgstr "2. גופנים מיובאים"
152
 
153
+ #: settings.php:572
154
  msgid ""
155
  "Step 2: Upload custom fonts to be used in your website. Here too, you can "
156
  "upload as many as you wish."
157
  msgstr "שלב 2: כאן ניתן לעלות גופנים לאתר שלך. גם כאן, ניתן להעלות כמה שתרצה."
158
 
159
+ #: settings.php:574
160
  msgid ""
161
  "Name the font you want to upload and upload all the files formats for this "
162
  "font. In order to support more browsers you can click the green plus to "
166
  "ביותר דפדפנים ביכולתך ללחוץ על הפלוס הירוק להעלות עוד סוגי פורמטים. אנו "
167
  "מציעים woff. ו- woff2.."
168
 
169
+ #: settings.php:578
170
  msgid "Font Weight Name"
171
  msgstr "שם משקל גופן"
172
 
173
+ #: settings.php:579
174
  msgid "Font weight name cannot be empty."
175
  msgstr "שם משקל הגופן אינו יכול להיות ריק."
176
 
177
+ #: settings.php:583
178
  msgid "Font Weight File"
179
  msgstr "קובץ משקל גופן"
180
 
181
+ #: settings.php:587
182
  msgid "Accepted Font Format : "
183
  msgstr "פורמט גופן נתמך:"
184
 
185
+ #: settings.php:590 settings.php:591
186
  msgid "Add Another Font Format File"
187
  msgstr "הוסף עוד קובץ פורמט גופן"
188
 
189
+ #: settings.php:598
190
  msgid "Upload"
191
  msgstr "העלה"
192
 
193
+ #: settings.php:609
194
  msgid "3. Known Elements Settings"
195
  msgstr "3. הגדרות אלמנטים הידועים"
196
 
197
+ #: settings.php:612
198
  msgid ""
199
  "Step 3: For each element you can assign a font you have added in step 1 & 2."
200
  msgstr "שלב 3: עבור כל אלמנט ניתן להקצות גופן שהוספת בשלב 1 & 2."
201
 
202
+ #: settings.php:613 settings.php:675
203
  msgid "Note: "
204
  msgstr "הערה:"
205
 
206
+ #: settings.php:613
207
  msgid "Custom fonts you uploaded are automatically used in your website."
208
  msgstr "גופנים מיובאים אוטומטית נוספים לאתר שלך."
209
 
210
+ #: settings.php:614
211
  msgid ""
212
  "In case of font not displaying in your website after saving, try clear the "
213
  "cache using Shift+F5 or Ctrl+Shift+Delete to clear all."
215
  "במקרה שגופן אינו מוצג באתר האינטרנט שלך לאחר שמירה, נסה לנקות את המטמון "
216
  "באמצעות Shift + F5 או Ctrl+Shift+Delete כדי לנקות הכל."
217
 
218
+ #: settings.php:629
219
  msgid "4. Custom Elements Settings"
220
  msgstr "4. הגדרות אלמנטים מותאמים אישית"
221
 
222
+ #: settings.php:632
223
  msgid ""
224
  "Step 4: Assign font that you have added to your website to custom elements."
225
  msgstr ""
226
  "שלב 4: כאן ניתן לשייך גופן שהוספת לאתר האינטרנט שלך לאלמנטים מותאמים אישית."
227
 
228
+ #: settings.php:636 settings.php:689
229
  msgid "Font"
230
  msgstr "גופן"
231
 
232
+ #: settings.php:637 settings.php:692
233
  msgid "-- Select Font --"
234
  msgstr "-- בחירת גופן --"
235
 
236
+ #: settings.php:637
237
  msgid "You must select a font for the elements."
238
  msgstr "עליך לבחור גופן עבור הרכיבים."
239
 
240
+ #: settings.php:642
241
  msgid "Custom Element"
242
  msgstr "רכיב מותאם אישית"
243
 
244
+ #: settings.php:646
245
  msgid "Font custom elements cannot be empty."
246
  msgstr "רכיב מותאם אישית אינו יכול להיות ריק."
247
 
248
+ #: settings.php:647
249
  msgid ""
250
  "Custom elements can be seperated by commas to allow multiple elements. "
251
  "Example: #myelementid, .myelementclass, .myelementclass .foo, etc."
253
  "רכיבים מותאמים אישית ניתן להפריד בפסיקים כדי לאפשר מספר אלמנטים. דוגמה: ."
254
  "myelementclass, #myelementid, .myelementclass .foo, וכו '."
255
 
256
+ #: settings.php:658
257
  msgid "Apply Custom Elements"
258
  msgstr "החל על אלמנטים אלה"
259
 
260
+ #: settings.php:669
261
  msgid "5. Manage Fonts"
262
  msgstr "5. ניהול גופנים"
263
 
264
+ #: settings.php:672
265
+ msgid ""
266
+ "Step 5: Select a font to manage, delete and view the source and custom "
267
+ "elements assigned to it."
268
+ msgstr ""
269
+ "שלב 5: בחר גופן כדי לנהל, למחוק ולהציג את המקור, וכל הרכיבים מותאמים אישית "
270
+ "המוקצים לו."
271
+
272
+ #: settings.php:676
273
+ msgid ""
274
+ "You can edit the values of every row to change the custom elements assigned "
275
+ "or add and remove the important tag. Just change the text or check the box "
276
+ "and the settings will automatically save."
277
+ msgstr ""
278
+ "באפשרותך לערוך את הערכים של כל שורה, על מנת לשנות את הרכיבים המותאמים אישית "
279
+ "או להוסיף ולהסיר את התגית 'important!'. רק שנה את הטקסט או לחץ על התיבה "
280
+ "והשינויים ישמרו אוטומטית."
281
+
282
+ #: settings.php:680
283
+ msgid "Changes saved!"
284
+ msgstr "השינויים נשמרו בהצלחה!"
285
+
286
+ #: settings.php:684
287
+ msgid "Data is invalid"
288
+ msgstr "ערך לא תקין."
289
+
290
+ #: settings.php:704
291
  msgid "Delete Font"
292
  msgstr "מחק גופן"
293
 
294
+ #: settings.php:704
295
  msgid "Are you sure you want to delete this font from your website?"
296
  msgstr "האם אתה בטוח שברצונך למחוק גופן זה מהאתר שלך?"
297
 
298
+ #: settings.php:715
299
  msgid "Source"
300
  msgstr "מקור"
301
 
302
+ #: settings.php:719
303
  msgid "Urls"
304
  msgstr "כתובת"
305
 
306
+ #: settings.php:754
307
  msgid "Thank you"
308
  msgstr "תודה לך!"
309
 
310
+ #: settings.php:759
311
  msgid ""
312
  "Thank you for using an <a href=\"http://hivewebstudios.com\" target=\"_blank"
313
  "\">Hive</a> plugin! We 5 star you already, so why don't you <a href="
319
  "\"https://wordpress.org/support/plugin/font-organizer/reviews/?rate=5#new-"
320
  "post\" target=\"_blank\">תדרג אותנו 5 כוכבים גם</a>?"
321
 
322
+ #: settings.php:761
323
  msgid "Anyway, if you need anything, this may help:"
324
  msgstr "בכל מקרה, אם את/ה צריכ/ה משהו, אולי זה יעזור:"
325
 
326
+ #: settings.php:763
327
  msgid "FAQ"
328
  msgstr "שאלות נפוצות"
329
 
330
+ #: settings.php:764
331
  msgid "Support forums"
332
  msgstr "פורום תמיכה"
333
 
334
+ #: settings.php:765
335
  msgid "Contact us"
336
  msgstr "צרו קשר"
337
 
338
+ #: settings.php:772
339
+ msgid "Like Our Facebook Page"
340
+ msgstr "תן לייק לעמוד הפייסבוק שלנו"
341
 
342
+ #: settings.php:787 settings.php:823 settings.php:838 settings.php:857
343
  msgid "Session ended, please try again."
344
  msgstr "הסתיים הטיפול, אנא נסה שנית."
345
 
346
+ #: settings.php:793
347
  msgid "Font name is empty or invalid."
348
  msgstr "שם גופן הוא ריק או לא חוקי."
349
 
350
+ #: settings.php:798
351
  msgid "Font file is not selected."
352
  msgstr "לא נבחר קובץ הגופן."
353
 
354
+ #: settings.php:814
355
  msgid "Font file(s) not selected."
356
  msgstr "לא נבחרו קבצים לגופן."
357
 
358
+ #: settings.php:829
359
  msgid "Usable font is empty or invalid."
360
  msgstr "גופן לשימוש הוא ריק או לא חוקי."
361
 
362
+ #: settings.php:844
363
  msgid "Custom elements is empty or invalid."
364
  msgstr "אלמנטים מותאמים אישית ריק או לא חוקי."
365
 
366
+ #: settings.php:864
367
  msgid "Something went horribly wrong. Ask the support!"
368
  msgstr "משהו השתבש בצורה נוראית. תשאל את התמיכה!"
369
 
370
+ #: settings.php:975
371
  msgid "Error adding custom elements: "
372
  msgstr "שגיאה בעת הוספת אלמנטים מותאמים אישית:"
373
 
374
+ #: settings.php:982
375
  msgid "Custom elements added to your website!"
376
  msgstr "אלמנטים מותאמים אישית התווספו לאתר שלך!"
377
 
378
+ #: settings.php:990
379
  msgid "Font can now be used in your website!"
380
  msgstr "כעת ניתן להשתמש בגופן באתר האינטרנט שלך!"
381
 
382
+ #: settings.php:998
383
  msgid "Font deleted from your website!"
384
  msgstr "גופן נמחק מהאתר שלך!"
385
 
386
+ #: settings.php:1006
387
  msgid "The file has been uploaded!"
388
  msgstr "הקובץ הועלה בהצלחה."
389
 
390
+ #: settings.php:1014
391
  msgid "Error uploading the file: "
392
  msgstr "שגיאה בהעלאת הקובץ:"
393
 
394
+ #: settings.php:1022
395
  msgid "Error adding font to website fonts: "
396
  msgstr "שגיאה בעת הוספת גופן לאתר:"
397
 
398
+ #: settings.php:1030
399
  msgid "Error deleting font: "
400
  msgstr "שגיאה במחיקת גופן:"
401
 
402
+ #: settings.php:1038
403
  msgid "Failed to open or create the css file. Check for permissions."
404
  msgstr "לא ניתן לפתוח או ליצור את קובץ ה-css. בדוק אם יש הרשאות."
405
 
406
+ #: settings.php:1082
407
  msgid "Google API Key"
408
  msgstr "מפתח API של גוגל"
409
 
410
+ #: settings.php:1089
411
  msgid "Show Font Family Preview"
412
  msgstr "טען תצוגה מקדימה לגופנים"
413
 
414
+ #: settings.php:1099
415
  msgid "Access Settings Role"
416
  msgstr "רמת הרשאה להגדרות"
417
 
418
+ #: settings.php:1211
419
  msgid "This is the general settings for the site."
420
  msgstr "אלה הם הגדרות כלליות עבור התוסף."
421
 
422
+ #: settings.php:1230
423
  #, php-format
424
  msgid ""
425
  "To get all the fonts, Google requires the mandatory use of an API key, get "
428
  "כדי לקבל את כל הגופנים, גוגל מחייב שימוש ב-API, ניתן לקבל אחד מ<a href=\"%s"
429
  "\" target=\"_blank\">כאן</a> בחינם ובמהירות."
430
 
431
+ #: settings.php:1231
432
  #, php-format
433
  msgid " Need help? Click <a href=\"%s\" target=\"_blank\">here</a>"
434
  msgstr "צריך עזרה? לחץ <a href=\"%s\" target=\"_blank\">כאן</a>"
435
 
436
+ #: settings.php:1255
437
  msgid "Include Font Family Preview"
438
  msgstr "הוסף גופן לדף זה לצפיה בתוצגה מוקדמת"
439
 
440
+ #: settings.php:1257
441
  msgid "Show font preview when listing the fonts (might be slow)"
442
  msgstr "הצג תצוגה מקדימה של הגופן ברשימה של גופנים (עשוי להיות איטי)."
443
 
444
+ #: settings.php:1309 settings.php:1326
445
  msgid "Include !important to this element to always apply."
446
  msgstr "הוסף תגית important! על מנת שגופן זה תמיד יופיע."
447
 
448
+ #: settings.php:1338
449
  msgid "Default"
450
  msgstr "ברירת מחדל"
451
 
471
  msgid "https://hivewebstudios.com"
472
  msgstr "https://hivewebstudios.com"
473
 
474
+ #~ msgid "Hive Facebook page"
475
+ #~ msgstr "עמוד הפייסבוק של Hive"
476
+
477
  #~ msgid "Font file is not valid."
478
  #~ msgstr "קובץ הגופן אינו חוקי."
479
 
languages/font-organizer.pot CHANGED
@@ -2,7 +2,7 @@
2
  msgid ""
3
  msgstr ""
4
  "Project-Id-Version: Font Organizer\n"
5
- "POT-Creation-Date: 2016-12-14 19:54+0200\n"
6
  "PO-Revision-Date: 2016-11-09 15:53+0200\n"
7
  "Last-Translator: \n"
8
  "Language-Team: \n"
@@ -19,35 +19,35 @@ msgstr ""
19
  "X-Poedit-SearchPath-0: .\n"
20
  "X-Poedit-SearchPathExcluded-0: *.js\n"
21
 
22
- #: classes/class-ElementsTable.php:71
23
  msgid "Id"
24
  msgstr ""
25
 
26
- #: classes/class-ElementsTable.php:72
27
  msgid "Custom Elements"
28
  msgstr ""
29
 
30
- #: classes/class-ElementsTable.php:73 settings.php:1140 settings.php:1157
31
  msgid "Important"
32
  msgstr ""
33
 
34
- #: classes/class-ElementsTable.php:82
35
  msgid "Yes"
36
  msgstr ""
37
 
38
- #: classes/class-ElementsTable.php:82
39
  msgid "No"
40
  msgstr ""
41
 
42
- #: classes/class-ElementsTable.php:122
43
  msgid "Delete"
44
  msgstr ""
45
 
46
- #: classes/class-ElementsTable.php:191
47
  msgid "No custom elements found."
48
  msgstr ""
49
 
50
- #: font-organizer.php:194 settings.php:204 settings.php:378
51
  msgid "Font Settings"
52
  msgstr ""
53
 
@@ -67,212 +67,233 @@ msgstr ""
67
  msgid "Google (Early Access)"
68
  msgstr ""
69
 
70
- #: settings.php:127
71
  msgid "<body> Font"
72
  msgstr ""
73
 
74
- #: settings.php:128
75
  msgid "<h1> Font"
76
  msgstr ""
77
 
78
- #: settings.php:129
79
  msgid "<h2> Font"
80
  msgstr ""
81
 
82
- #: settings.php:130
83
  msgid "<h3> Font"
84
  msgstr ""
85
 
86
- #: settings.php:131
87
  msgid "<h4> Font"
88
  msgstr ""
89
 
90
- #: settings.php:132
91
  msgid "<h5> Font"
92
  msgstr ""
93
 
94
- #: settings.php:133
95
  msgid "<h6> Font"
96
  msgstr ""
97
 
98
- #: settings.php:134
99
  msgid "<p> Font"
100
  msgstr ""
101
 
102
- #: settings.php:135
103
  msgid "<q> Font"
104
  msgstr ""
105
 
106
- #: settings.php:136
107
  msgid "<li> Font"
108
  msgstr ""
109
 
110
- #: settings.php:137
111
  msgid "<a> Font"
112
  msgstr ""
113
 
114
- #: settings.php:332
115
  msgid "Google API key is not valid: "
116
  msgstr ""
117
 
118
- #: settings.php:335
119
  msgid "Google API key is not set! Cannot display google fonts."
120
  msgstr ""
121
 
122
- #: settings.php:389
123
  msgid "General Settings"
124
  msgstr ""
125
 
126
- #: settings.php:405
127
  msgid "1. Add Fonts"
128
  msgstr ""
129
 
130
- #: settings.php:407
131
  msgid ""
132
  "Step 1: Select and add fonts to be used in your website. Select as many as "
133
  "you wish."
134
  msgstr ""
135
 
136
- #: settings.php:409
137
  msgid "You can select google or regular fonts."
138
  msgstr ""
139
 
140
- #: settings.php:413
141
  msgid "Available Fonts"
142
  msgstr ""
143
 
144
- #: settings.php:420
145
  msgid "Use This Font"
146
  msgstr ""
147
 
148
- #: settings.php:431
149
  msgid "2. Custom Fonts"
150
  msgstr ""
151
 
152
- #: settings.php:433
153
  msgid ""
154
  "Step 2: Upload custom fonts to be used in your website. Here too, you can "
155
  "upload as many as you wish."
156
  msgstr ""
157
 
158
- #: settings.php:435
159
  msgid ""
160
  "Name the font you want to upload and upload all the files formats for this "
161
  "font. In order to support more browsers you can click the green plus to "
162
  "upload more font formats. We suggest .woff and .woff2."
163
  msgstr ""
164
 
165
- #: settings.php:439
166
  msgid "Font Weight Name"
167
  msgstr ""
168
 
169
- #: settings.php:440
170
  msgid "Font weight name cannot be empty."
171
  msgstr ""
172
 
173
- #: settings.php:444
174
  msgid "Font Weight File"
175
  msgstr ""
176
 
177
- #: settings.php:448
178
  msgid "Accepted Font Format : "
179
  msgstr ""
180
 
181
- #: settings.php:451 settings.php:452
182
  msgid "Add Another Font Format File"
183
  msgstr ""
184
 
185
- #: settings.php:459
186
  msgid "Upload"
187
  msgstr ""
188
 
189
- #: settings.php:470
190
  msgid "3. Known Elements Settings"
191
  msgstr ""
192
 
193
- #: settings.php:473
194
  msgid ""
195
  "Step 3: For each element you can assign a font you have added in step 1 & 2."
196
  msgstr ""
197
 
198
- #: settings.php:474
199
  msgid "Note: "
200
  msgstr ""
201
 
202
- #: settings.php:474
203
  msgid "Custom fonts you uploaded are automatically used in your website."
204
  msgstr ""
205
 
206
- #: settings.php:475
207
  msgid ""
208
  "In case of font not displaying in your website after saving, try clear the "
209
  "cache using Shift+F5 or Ctrl+Shift+Delete to clear all."
210
  msgstr ""
211
 
212
- #: settings.php:490
213
  msgid "4. Custom Elements Settings"
214
  msgstr ""
215
 
216
- #: settings.php:493
217
  msgid ""
218
  "Step 4: Assign font that you have added to your website to custom elements."
219
  msgstr ""
220
 
221
- #: settings.php:497 settings.php:534
222
  msgid "Font"
223
  msgstr ""
224
 
225
- #: settings.php:498 settings.php:537
226
  msgid "-- Select Font --"
227
  msgstr ""
228
 
229
- #: settings.php:498
230
  msgid "You must select a font for the elements."
231
  msgstr ""
232
 
233
- #: settings.php:503
234
  msgid "Custom Element"
235
  msgstr ""
236
 
237
- #: settings.php:507
238
  msgid "Font custom elements cannot be empty."
239
  msgstr ""
240
 
241
- #: settings.php:508
242
  msgid ""
243
  "Custom elements can be seperated by commas to allow multiple elements. "
244
  "Example: #myelementid, .myelementclass, .myelementclass .foo, etc."
245
  msgstr ""
246
 
247
- #: settings.php:519
248
  msgid "Apply Custom Elements"
249
  msgstr ""
250
 
251
- #: settings.php:530
252
  msgid "5. Manage Fonts"
253
  msgstr ""
254
 
255
- #: settings.php:549
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
256
  msgid "Delete Font"
257
  msgstr ""
258
 
259
- #: settings.php:549
260
  msgid "Are you sure you want to delete this font from your website?"
261
  msgstr ""
262
 
263
- #: settings.php:560
264
  msgid "Source"
265
  msgstr ""
266
 
267
- #: settings.php:564
268
  msgid "Urls"
269
  msgstr ""
270
 
271
- #: settings.php:599
272
  msgid "Thank you"
273
  msgstr ""
274
 
275
- #: settings.php:604
276
  msgid ""
277
  "Thank you for using an <a href=\"http://hivewebstudios.com\" target=\"_blank"
278
  "\">Hive</a> plugin! We 5 star you already, so why don't you <a href="
@@ -280,131 +301,131 @@ msgid ""
280
  "post\" target=\"_blank\">5 star us too</a>?"
281
  msgstr ""
282
 
283
- #: settings.php:606
284
  msgid "Anyway, if you need anything, this may help:"
285
  msgstr ""
286
 
287
- #: settings.php:608
288
  msgid "FAQ"
289
  msgstr ""
290
 
291
- #: settings.php:609
292
  msgid "Support forums"
293
  msgstr ""
294
 
295
- #: settings.php:610
296
  msgid "Contact us"
297
  msgstr ""
298
 
299
- #: settings.php:611
300
- msgid "Hive Facebook page"
301
  msgstr ""
302
 
303
- #: settings.php:624 settings.php:660 settings.php:675 settings.php:694
304
  msgid "Session ended, please try again."
305
  msgstr ""
306
 
307
- #: settings.php:630
308
  msgid "Font name is empty or invalid."
309
  msgstr ""
310
 
311
- #: settings.php:635
312
  msgid "Font file is not selected."
313
  msgstr ""
314
 
315
- #: settings.php:651
316
  msgid "Font file(s) not selected."
317
  msgstr ""
318
 
319
- #: settings.php:666
320
  msgid "Usable font is empty or invalid."
321
  msgstr ""
322
 
323
- #: settings.php:681
324
  msgid "Custom elements is empty or invalid."
325
  msgstr ""
326
 
327
- #: settings.php:701
328
  msgid "Something went horribly wrong. Ask the support!"
329
  msgstr ""
330
 
331
- #: settings.php:812
332
  msgid "Error adding custom elements: "
333
  msgstr ""
334
 
335
- #: settings.php:819
336
  msgid "Custom elements added to your website!"
337
  msgstr ""
338
 
339
- #: settings.php:827
340
  msgid "Font can now be used in your website!"
341
  msgstr ""
342
 
343
- #: settings.php:835
344
  msgid "Font deleted from your website!"
345
  msgstr ""
346
 
347
- #: settings.php:843
348
  msgid "The file has been uploaded!"
349
  msgstr ""
350
 
351
- #: settings.php:851
352
  msgid "Error uploading the file: "
353
  msgstr ""
354
 
355
- #: settings.php:859
356
  msgid "Error adding font to website fonts: "
357
  msgstr ""
358
 
359
- #: settings.php:867
360
  msgid "Error deleting font: "
361
  msgstr ""
362
 
363
- #: settings.php:875
364
  msgid "Failed to open or create the css file. Check for permissions."
365
  msgstr ""
366
 
367
- #: settings.php:917
368
  msgid "Google API Key"
369
  msgstr ""
370
 
371
- #: settings.php:924
372
  msgid "Show Font Family Preview"
373
  msgstr ""
374
 
375
- #: settings.php:934
376
  msgid "Access Settings Role"
377
  msgstr ""
378
 
379
- #: settings.php:1046
380
  msgid "This is the general settings for the site."
381
  msgstr ""
382
 
383
- #: settings.php:1065
384
  #, php-format
385
  msgid ""
386
  "To get all the fonts, Google requires the mandatory use of an API key, get "
387
  "one from <a href=\"%s\" target=\"_blank\">HERE</a>"
388
  msgstr ""
389
 
390
- #: settings.php:1066
391
  #, php-format
392
  msgid " Need help? Click <a href=\"%s\" target=\"_blank\">here</a>"
393
  msgstr ""
394
 
395
- #: settings.php:1089
396
  msgid "Include Font Family Preview"
397
  msgstr ""
398
 
399
- #: settings.php:1091
400
  msgid "Show font preview when listing the fonts (might be slow)"
401
  msgstr ""
402
 
403
- #: settings.php:1143 settings.php:1160
404
  msgid "Include !important to this element to always apply."
405
  msgstr ""
406
 
407
- #: settings.php:1172
408
  msgid "Default"
409
  msgstr ""
410
 
2
  msgid ""
3
  msgstr ""
4
  "Project-Id-Version: Font Organizer\n"
5
+ "POT-Creation-Date: 2016-12-26 15:08+0200\n"
6
  "PO-Revision-Date: 2016-11-09 15:53+0200\n"
7
  "Last-Translator: \n"
8
  "Language-Team: \n"
19
  "X-Poedit-SearchPath-0: .\n"
20
  "X-Poedit-SearchPathExcluded-0: *.js\n"
21
 
22
+ #: classes/class-ElementsTable.php:84
23
  msgid "Id"
24
  msgstr ""
25
 
26
+ #: classes/class-ElementsTable.php:85
27
  msgid "Custom Elements"
28
  msgstr ""
29
 
30
+ #: classes/class-ElementsTable.php:86 settings.php:1306 settings.php:1323
31
  msgid "Important"
32
  msgstr ""
33
 
34
+ #: classes/class-ElementsTable.php:97 settings.php:224
35
  msgid "Yes"
36
  msgstr ""
37
 
38
+ #: classes/class-ElementsTable.php:97 settings.php:227
39
  msgid "No"
40
  msgstr ""
41
 
42
+ #: classes/class-ElementsTable.php:105 classes/class-ElementsTable.php:136
43
  msgid "Delete"
44
  msgstr ""
45
 
46
+ #: classes/class-ElementsTable.php:205
47
  msgid "No custom elements found."
48
  msgstr ""
49
 
50
+ #: font-organizer.php:196 settings.php:318 settings.php:517
51
  msgid "Font Settings"
52
  msgstr ""
53
 
67
  msgid "Google (Early Access)"
68
  msgstr ""
69
 
70
+ #: settings.php:128
71
  msgid "<body> Font"
72
  msgstr ""
73
 
74
+ #: settings.php:129
75
  msgid "<h1> Font"
76
  msgstr ""
77
 
78
+ #: settings.php:130
79
  msgid "<h2> Font"
80
  msgstr ""
81
 
82
+ #: settings.php:131
83
  msgid "<h3> Font"
84
  msgstr ""
85
 
86
+ #: settings.php:132
87
  msgid "<h4> Font"
88
  msgstr ""
89
 
90
+ #: settings.php:133
91
  msgid "<h5> Font"
92
  msgstr ""
93
 
94
+ #: settings.php:134
95
  msgid "<h6> Font"
96
  msgstr ""
97
 
98
+ #: settings.php:135
99
  msgid "<p> Font"
100
  msgstr ""
101
 
102
+ #: settings.php:136
103
  msgid "<q> Font"
104
  msgstr ""
105
 
106
+ #: settings.php:137
107
  msgid "<li> Font"
108
  msgstr ""
109
 
110
+ #: settings.php:138
111
  msgid "<a> Font"
112
  msgstr ""
113
 
114
+ #: settings.php:464
115
  msgid "Google API key is not valid: "
116
  msgstr ""
117
 
118
+ #: settings.php:467
119
  msgid "Google API key is not set! Cannot display google fonts."
120
  msgstr ""
121
 
122
+ #: settings.php:528
123
  msgid "General Settings"
124
  msgstr ""
125
 
126
+ #: settings.php:544
127
  msgid "1. Add Fonts"
128
  msgstr ""
129
 
130
+ #: settings.php:546
131
  msgid ""
132
  "Step 1: Select and add fonts to be used in your website. Select as many as "
133
  "you wish."
134
  msgstr ""
135
 
136
+ #: settings.php:548
137
  msgid "You can select google or regular fonts."
138
  msgstr ""
139
 
140
+ #: settings.php:552
141
  msgid "Available Fonts"
142
  msgstr ""
143
 
144
+ #: settings.php:559
145
  msgid "Use This Font"
146
  msgstr ""
147
 
148
+ #: settings.php:570
149
  msgid "2. Custom Fonts"
150
  msgstr ""
151
 
152
+ #: settings.php:572
153
  msgid ""
154
  "Step 2: Upload custom fonts to be used in your website. Here too, you can "
155
  "upload as many as you wish."
156
  msgstr ""
157
 
158
+ #: settings.php:574
159
  msgid ""
160
  "Name the font you want to upload and upload all the files formats for this "
161
  "font. In order to support more browsers you can click the green plus to "
162
  "upload more font formats. We suggest .woff and .woff2."
163
  msgstr ""
164
 
165
+ #: settings.php:578
166
  msgid "Font Weight Name"
167
  msgstr ""
168
 
169
+ #: settings.php:579
170
  msgid "Font weight name cannot be empty."
171
  msgstr ""
172
 
173
+ #: settings.php:583
174
  msgid "Font Weight File"
175
  msgstr ""
176
 
177
+ #: settings.php:587
178
  msgid "Accepted Font Format : "
179
  msgstr ""
180
 
181
+ #: settings.php:590 settings.php:591
182
  msgid "Add Another Font Format File"
183
  msgstr ""
184
 
185
+ #: settings.php:598
186
  msgid "Upload"
187
  msgstr ""
188
 
189
+ #: settings.php:609
190
  msgid "3. Known Elements Settings"
191
  msgstr ""
192
 
193
+ #: settings.php:612
194
  msgid ""
195
  "Step 3: For each element you can assign a font you have added in step 1 & 2."
196
  msgstr ""
197
 
198
+ #: settings.php:613 settings.php:675
199
  msgid "Note: "
200
  msgstr ""
201
 
202
+ #: settings.php:613
203
  msgid "Custom fonts you uploaded are automatically used in your website."
204
  msgstr ""
205
 
206
+ #: settings.php:614
207
  msgid ""
208
  "In case of font not displaying in your website after saving, try clear the "
209
  "cache using Shift+F5 or Ctrl+Shift+Delete to clear all."
210
  msgstr ""
211
 
212
+ #: settings.php:629
213
  msgid "4. Custom Elements Settings"
214
  msgstr ""
215
 
216
+ #: settings.php:632
217
  msgid ""
218
  "Step 4: Assign font that you have added to your website to custom elements."
219
  msgstr ""
220
 
221
+ #: settings.php:636 settings.php:689
222
  msgid "Font"
223
  msgstr ""
224
 
225
+ #: settings.php:637 settings.php:692
226
  msgid "-- Select Font --"
227
  msgstr ""
228
 
229
+ #: settings.php:637
230
  msgid "You must select a font for the elements."
231
  msgstr ""
232
 
233
+ #: settings.php:642
234
  msgid "Custom Element"
235
  msgstr ""
236
 
237
+ #: settings.php:646
238
  msgid "Font custom elements cannot be empty."
239
  msgstr ""
240
 
241
+ #: settings.php:647
242
  msgid ""
243
  "Custom elements can be seperated by commas to allow multiple elements. "
244
  "Example: #myelementid, .myelementclass, .myelementclass .foo, etc."
245
  msgstr ""
246
 
247
+ #: settings.php:658
248
  msgid "Apply Custom Elements"
249
  msgstr ""
250
 
251
+ #: settings.php:669
252
  msgid "5. Manage Fonts"
253
  msgstr ""
254
 
255
+ #: settings.php:672
256
+ msgid ""
257
+ "Step 5: Select a font to manage, delete and view the source and custom "
258
+ "elements assigned to it."
259
+ msgstr ""
260
+
261
+ #: settings.php:676
262
+ msgid ""
263
+ "You can edit the values of every row to change the custom elements assigned "
264
+ "or add and remove the important tag. Just change the text or check the box "
265
+ "and the settings will automatically save."
266
+ msgstr ""
267
+
268
+ #: settings.php:680
269
+ msgid "Changes saved!"
270
+ msgstr ""
271
+
272
+ #: settings.php:684
273
+ msgid "Data is invalid"
274
+ msgstr ""
275
+
276
+ #: settings.php:704
277
  msgid "Delete Font"
278
  msgstr ""
279
 
280
+ #: settings.php:704
281
  msgid "Are you sure you want to delete this font from your website?"
282
  msgstr ""
283
 
284
+ #: settings.php:715
285
  msgid "Source"
286
  msgstr ""
287
 
288
+ #: settings.php:719
289
  msgid "Urls"
290
  msgstr ""
291
 
292
+ #: settings.php:754
293
  msgid "Thank you"
294
  msgstr ""
295
 
296
+ #: settings.php:759
297
  msgid ""
298
  "Thank you for using an <a href=\"http://hivewebstudios.com\" target=\"_blank"
299
  "\">Hive</a> plugin! We 5 star you already, so why don't you <a href="
301
  "post\" target=\"_blank\">5 star us too</a>?"
302
  msgstr ""
303
 
304
+ #: settings.php:761
305
  msgid "Anyway, if you need anything, this may help:"
306
  msgstr ""
307
 
308
+ #: settings.php:763
309
  msgid "FAQ"
310
  msgstr ""
311
 
312
+ #: settings.php:764
313
  msgid "Support forums"
314
  msgstr ""
315
 
316
+ #: settings.php:765
317
  msgid "Contact us"
318
  msgstr ""
319
 
320
+ #: settings.php:772
321
+ msgid "Like Our Facebook Page"
322
  msgstr ""
323
 
324
+ #: settings.php:787 settings.php:823 settings.php:838 settings.php:857
325
  msgid "Session ended, please try again."
326
  msgstr ""
327
 
328
+ #: settings.php:793
329
  msgid "Font name is empty or invalid."
330
  msgstr ""
331
 
332
+ #: settings.php:798
333
  msgid "Font file is not selected."
334
  msgstr ""
335
 
336
+ #: settings.php:814
337
  msgid "Font file(s) not selected."
338
  msgstr ""
339
 
340
+ #: settings.php:829
341
  msgid "Usable font is empty or invalid."
342
  msgstr ""
343
 
344
+ #: settings.php:844
345
  msgid "Custom elements is empty or invalid."
346
  msgstr ""
347
 
348
+ #: settings.php:864
349
  msgid "Something went horribly wrong. Ask the support!"
350
  msgstr ""
351
 
352
+ #: settings.php:975
353
  msgid "Error adding custom elements: "
354
  msgstr ""
355
 
356
+ #: settings.php:982
357
  msgid "Custom elements added to your website!"
358
  msgstr ""
359
 
360
+ #: settings.php:990
361
  msgid "Font can now be used in your website!"
362
  msgstr ""
363
 
364
+ #: settings.php:998
365
  msgid "Font deleted from your website!"
366
  msgstr ""
367
 
368
+ #: settings.php:1006
369
  msgid "The file has been uploaded!"
370
  msgstr ""
371
 
372
+ #: settings.php:1014
373
  msgid "Error uploading the file: "
374
  msgstr ""
375
 
376
+ #: settings.php:1022
377
  msgid "Error adding font to website fonts: "
378
  msgstr ""
379
 
380
+ #: settings.php:1030
381
  msgid "Error deleting font: "
382
  msgstr ""
383
 
384
+ #: settings.php:1038
385
  msgid "Failed to open or create the css file. Check for permissions."
386
  msgstr ""
387
 
388
+ #: settings.php:1082
389
  msgid "Google API Key"
390
  msgstr ""
391
 
392
+ #: settings.php:1089
393
  msgid "Show Font Family Preview"
394
  msgstr ""
395
 
396
+ #: settings.php:1099
397
  msgid "Access Settings Role"
398
  msgstr ""
399
 
400
+ #: settings.php:1211
401
  msgid "This is the general settings for the site."
402
  msgstr ""
403
 
404
+ #: settings.php:1230
405
  #, php-format
406
  msgid ""
407
  "To get all the fonts, Google requires the mandatory use of an API key, get "
408
  "one from <a href=\"%s\" target=\"_blank\">HERE</a>"
409
  msgstr ""
410
 
411
+ #: settings.php:1231
412
  #, php-format
413
  msgid " Need help? Click <a href=\"%s\" target=\"_blank\">here</a>"
414
  msgstr ""
415
 
416
+ #: settings.php:1255
417
  msgid "Include Font Family Preview"
418
  msgstr ""
419
 
420
+ #: settings.php:1257
421
  msgid "Show font preview when listing the fonts (might be slow)"
422
  msgstr ""
423
 
424
+ #: settings.php:1309 settings.php:1326
425
  msgid "Include !important to this element to always apply."
426
  msgstr ""
427
 
428
+ #: settings.php:1338
429
  msgid "Default"
430
  msgstr ""
431
 
readme.txt CHANGED
@@ -3,7 +3,7 @@ Contributors: hivewebstudios,basaar,yardensade
3
  Tags: fonts,google fonts,upload font,font,google
4
  Requires at least: 3.8
5
  Tested up to: 4.7
6
- Stable tag: 1.2.1
7
  License: GPLv2 or later
8
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
9
 
@@ -20,15 +20,18 @@ Want to find out more? go to [our website](https://hivewebstudios.com/ "HiveWebS
20
 
21
  Want to try us? Use Addendio's [Font Organizer live demo](https://addendio.com/try-plugin/?slug=font-organizer "live demo")!
22
 
 
 
23
  Key Features:
24
 
25
  * Upload font to your website and apply it on any element.
26
  * Multi upload allow you to upload more font formats to support more browsers.
27
  * Add any google fonts in one click and apply them on any element.
28
  * Apply fonts for known elements or custom elements of your choosing easily.
 
29
  * Delete and remove fonts from your website in one click.
30
  * Choose your fonts & font sizes in the editor (tinyMCE & tinyMCE Advanced).
31
- * Our code is extremely clean, well written, and optimized for maximum performance for your website.
32
  * Full support for language translation, including RTL languages.
33
  * It's awesome like its users.
34
 
@@ -101,6 +104,15 @@ Example: "Arial Bold" or "Arial Italic", so you could easily use them later in t
101
 
102
  == Changelog ==
103
 
 
 
 
 
 
 
 
 
 
104
  = 1.2.1 =
105
  * Fixed elements rules sometimes not loading.
106
  * Fixed back to top button not appearing.
3
  Tags: fonts,google fonts,upload font,font,google
4
  Requires at least: 3.8
5
  Tested up to: 4.7
6
+ Stable tag: 1.3.0
7
  License: GPLv2 or later
8
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
9
 
20
 
21
  Want to try us? Use Addendio's [Font Organizer live demo](https://addendio.com/try-plugin/?slug=font-organizer "live demo")!
22
 
23
+ Have any problems? Check out our new [Official Font Organizer page](http://hivewebstudios.com/font-organizer/ "Font Organizer page").
24
+
25
  Key Features:
26
 
27
  * Upload font to your website and apply it on any element.
28
  * Multi upload allow you to upload more font formats to support more browsers.
29
  * Add any google fonts in one click and apply them on any element.
30
  * Apply fonts for known elements or custom elements of your choosing easily.
31
+ * Edit and remove custom elements assigned quickly.
32
  * Delete and remove fonts from your website in one click.
33
  * Choose your fonts & font sizes in the editor (tinyMCE & tinyMCE Advanced).
34
+ * Our code is extremely clean, well written, commented, and optimized for maximum performance for your website.
35
  * Full support for language translation, including RTL languages.
36
  * It's awesome like its users.
37
 
104
 
105
  == Changelog ==
106
 
107
+ = 1.3.0 =
108
+ * Added quick editing in custom elements table on section 5.
109
+ * Added better error message when Google API key not working.
110
+ * Added facebook page like box in the settings.
111
+ * Fixed HTTPS website could not load the css.
112
+ * Fixed timeout issues with google fonts request.
113
+ * Fixed tinyMCE and tinyMCE advanced font families preview not working sometimes.
114
+ * Fixed a few minor bugs.
115
+
116
  = 1.2.1 =
117
  * Fixed elements rules sometimes not loading.
118
  * Fixed back to top button not appearing.
settings.php CHANGED
@@ -7,6 +7,7 @@ class FoSettingsPage
7
  * create a string a parsed back to urls when needed.
8
  */
9
  const CUSTOM_FONT_URL_SPERATOR = ';';
 
10
 
11
  const DEFAULT_CSS_TITLE = "/* This Awesome CSS file was created by Font Orgranizer from Hive :) */\n\n";
12
 
@@ -141,6 +142,7 @@ class FoSettingsPage
141
  if (isset($_POST['submit_upload_font'])){
142
  if($args = $this->validate_upload()){
143
  $this->upload_file($args);
 
144
  }else{
145
  add_action( 'admin_notices', array($this, 'upload_failed_admin_notice') );
146
  }
@@ -149,6 +151,7 @@ class FoSettingsPage
149
  if (isset($_POST['submit_usable_font'])){
150
  if($args = $this->validate_add_usable()){
151
  $this->use_font($args);
 
152
  }else{
153
  add_action( 'admin_notices', array($this, 'use_font_failed_admin_notice') );
154
  }
@@ -174,12 +177,13 @@ class FoSettingsPage
174
  }
175
  }
176
 
177
- if(isset($_GET['action']) && $_GET['action'] == 'delete' && isset($_GET['custom_element'])){
178
  $this->should_create_css = true;
179
  }
180
 
181
  add_action( 'admin_menu', array( $this, 'add_plugin_page' ) );
182
  add_action( 'admin_init', array( $this, 'page_init' ) );
 
183
  }
184
 
185
  /**
@@ -193,6 +197,116 @@ class FoSettingsPage
193
  wp_enqueue_style( 'fontawesome', plugins_url( 'assets/css/font-awesome.min.css', __FILE__ ) );
194
  }
195
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
196
  /**
197
  * Add options settings page in the wordpress settings.
198
  */
@@ -210,6 +324,7 @@ class FoSettingsPage
210
  add_action( 'load-' . $hook, array( $this, 'init_page' ) );
211
  add_action( 'load-' . $hook, array( $this, 'register_scripts' ) );
212
  add_action( 'load-' . $hook, array( $this, 'create_css_file' ) );
 
213
  add_filter( 'option_page_capability_fo_general_options', array($this, 'options_capability') );
214
  add_filter( 'option_page_capability_fo_elements_options', array($this, 'options_capability') );
215
  }
@@ -225,15 +340,49 @@ class FoSettingsPage
225
  }
226
 
227
  public function create_css_file($force = false){
228
- global $fo_css_directory_path;
229
- global $fo_declarations_css_file_name;
230
- global $fo_elements_css_file_name;
231
 
232
  if(((!isset($_GET['settings-updated']) || !$_GET['settings-updated']) && !$this->should_create_css) && !$force){
233
  return;
234
  }
235
 
236
- /* ========= Start the declartions file ========= */
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
237
 
238
  $content = self::DEFAULT_CSS_TITLE;
239
  $custom_fonts_content = '';
@@ -246,6 +395,10 @@ class FoSettingsPage
246
  // Set all the urls content under the same src.
247
  $urls_content_arr = array();
248
  foreach ($urls as $url) {
 
 
 
 
249
  $urls_content_arr[] = "url('" . $url . "') format('" . fo_get_font_format($url) . "')";
250
  }
251
 
@@ -278,7 +431,7 @@ class FoSettingsPage
278
  if(!empty($google_fonts)){
279
  // We are assuming not to much google fonts. If it is, we need to split the request.
280
  // $content .= "<link href='http://fonts.googleapis.com/css?family=". implode("|", $google_fonts) . "' rel='stylesheet' type='text/css'>\n";
281
- $content .= "@import url('http://fonts.googleapis.com/css?family=". implode("|", $google_fonts) . "');\n";
282
  }
283
 
284
  // Add the custom fonts css that was created before.
@@ -286,29 +439,6 @@ class FoSettingsPage
286
 
287
  // If there is any declartions css to write.
288
  fo_try_write_file($content, $fo_css_directory_path, $fo_declarations_css_file_name, array($this, 'generate_css_failed_admin_notice'));
289
-
290
- /* ========= Start the elements file ========= */
291
-
292
- // Reset the content for the elements file.
293
- $content = self::DEFAULT_CSS_TITLE;
294
-
295
- // Add the known elements css.
296
- foreach ($this->elements_options as $key => $value) {
297
- if(strpos($key, 'important') || !$value)
298
- continue;
299
-
300
- $strip_key = str_replace('_font', '', $key);
301
- $important = $this->elements_options[$key . '_important'];
302
- $content .= sprintf("%s { font-family: '%s'%s; }\n", $strip_key, $value, $important ? '!important' : '');
303
- }
304
-
305
- // Add custom elements css.
306
- foreach ($this->custom_elements as $custom_element_db) {
307
- $content .= sprintf("%s { font-family: '%s'%s; }\n", $custom_element_db->custom_elements, $custom_element_db->name, $custom_element_db->important ? '!important' : '');
308
- }
309
-
310
- // If there is any css to write. Create the directory if needed and create the file.
311
- fo_try_write_file($content, $fo_css_directory_path, $fo_elements_css_file_name, array($this, 'generate_css_failed_admin_notice'));
312
  }
313
 
314
  /**
@@ -325,11 +455,13 @@ class FoSettingsPage
325
  if(isset($this->general_options['google_key']) && $this->general_options['google_key']){
326
  // Add Google fonts.
327
  set_time_limit(0);
328
- $response = wp_remote_get("https://www.googleapis.com/webfonts/v1/webfonts?sort=alpha&key=" . $this->general_options['google_key']);
329
  if( wp_remote_retrieve_response_code( $response ) == 200){
330
  $this->google_fonts = json_decode(wp_remote_retrieve_body($response))->items;
331
  }else{
332
- add_settings_error('google_key', '', __('Google API key is not valid: ', 'font-organizer') . wp_remote_retrieve_response_message($response), 'error');
 
 
333
  }
334
  }else{
335
  add_settings_error('google_key', '', __('Google API key is not set! Cannot display google fonts.', 'font-organizer'), 'error');
@@ -363,6 +495,11 @@ class FoSettingsPage
363
  if(isset($_GET['manage_font_id'])){
364
  foreach ($this->usable_fonts_db as $font_db) {
365
  if(intval($_GET['manage_font_id']) == $font_db->id){
 
 
 
 
 
366
  $this->selected_manage_font = $this->usable_fonts[$font_db->name];
367
  $this->custom_elements_table->prepare_items_by_font($this->custom_elements, $font_db->id);
368
  break;
@@ -531,6 +668,22 @@ class FoSettingsPage
531
  <a name="step6"></a>
532
  <h2 class="hndle ui-sortable-handle" style="cursor:default;"><span><?php _e('5. Manage Fonts', 'font-organizer'); ?></span></h2>
533
  <div class="inside">
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
534
  <table class="form-table">
535
  <tr>
536
  <th scope="row"><?php _e('Font', 'font-organizer'); ?></th>
@@ -597,22 +750,30 @@ class FoSettingsPage
597
  <div id="postbox-container-1" class="postbox-container">
598
  <div class="meta-box-sortables">
599
  <div class="postbox">
600
- <h2>
601
- <span><?php esc_attr_e('Thank you', 'font-organizer'); ?></span>
602
- </h2>
603
-
604
- <div class="inside">
605
- <p><?php _e(
606
- 'Thank you for using an <a href="http://hivewebstudios.com" target="_blank">Hive</a> plugin! We 5 star you already, so why don\'t you <a href="https://wordpress.org/support/plugin/font-organizer/reviews/?rate=5#new-post" target="_blank">5 star us too</a>?', 'font-organizer'); ?>
607
- <br />
608
- <p><?php _e('Anyway, if you need anything, this may help:', 'font-organizer'); ?></p>
609
- <ul style="list-style-type:disc;margin: 0 20px;">
610
- <li><a href="https://wordpress.org/plugins/font-organizer/faq/" target="_blank"><?php _e('FAQ', 'font-organizer'); ?></a></li>
611
- <li><a href="https://wordpress.org/support/plugin/font-organizer" target="_blank"><?php _e('Support forums', 'font-organizer'); ?></a></li>
612
- <li><a href="http://hivewebstudios.com/font-organizer" target="_blank"><?php _e('Contact us', 'font-organizer'); ?></a></li>
613
- <li><a href="https://www.facebook.com/hivewp" target="_blank"><?php _e('Hive Facebook page', 'font-organizer'); ?></a></li>
614
- </ul>
615
- </p>
 
 
 
 
 
 
 
 
616
  </div>
617
  </div>
618
  </div>
@@ -886,9 +1047,11 @@ class FoSettingsPage
886
  * @return array
887
  */
888
  public function fo_upload_dir( $dir ) {
 
 
889
  return array(
890
  'path' => $dir['basedir'] . '/font-organizer',
891
- 'url' => $dir['baseurl'] . '/font-organizer',
892
  'subdir' => '/font-organizer',
893
  ) + $dir;
894
  }
@@ -1063,7 +1226,7 @@ class FoSettingsPage
1063
  echo '<span class="highlight info">';
1064
 
1065
  $url = 'https://developers.google.com/fonts/docs/developer_api#acquiring_and_using_an_api_key';
1066
- $faq_url = 'https://wordpress.org/plugins/font-organizer/faq/';
1067
  echo sprintf( __( 'To get all the fonts, Google requires the mandatory use of an API key, get one from <a href="%s" target="_blank">HERE</a>', 'font-organizer' ), esc_url( $url ) );
1068
  echo sprintf( __( ' Need help? Click <a href="%s" target="_blank">here</a>', 'font-organizer' ), esc_url( $faq_url ) );
1069
  echo '</span> <br />';
@@ -1071,8 +1234,7 @@ class FoSettingsPage
1071
 
1072
  $value = isset( $this->general_options['google_key'] ) ? esc_attr( $this->general_options['google_key']) : '';
1073
  printf(
1074
- '<div class="validate"><input type="text" id="google_key" name="fo_general_options[google_key]" value="%s" class="large-text %s" placeholder="Ex: AIzaSyB1I0couKSmsW1Nadr68IlJXXCaBi9wYwM" /><span></span></div>',$value , empty($this->google_fonts) ? 'error' : 'valid'
1075
-
1076
  );
1077
  }
1078
 
7
  * create a string a parsed back to urls when needed.
8
  */
9
  const CUSTOM_FONT_URL_SPERATOR = ';';
10
+ const FACBOOK_APP_ID = "251836775235565";
11
 
12
  const DEFAULT_CSS_TITLE = "/* This Awesome CSS file was created by Font Orgranizer from Hive :) */\n\n";
13
 
142
  if (isset($_POST['submit_upload_font'])){
143
  if($args = $this->validate_upload()){
144
  $this->upload_file($args);
145
+ $this->should_create_css = true;
146
  }else{
147
  add_action( 'admin_notices', array($this, 'upload_failed_admin_notice') );
148
  }
151
  if (isset($_POST['submit_usable_font'])){
152
  if($args = $this->validate_add_usable()){
153
  $this->use_font($args);
154
+ $this->should_create_css = true;
155
  }else{
156
  add_action( 'admin_notices', array($this, 'use_font_failed_admin_notice') );
157
  }
177
  }
178
  }
179
 
180
+ if(isset($_GET['action']) && ($_GET['action'] == 'delete' || $_GET['bulk-delete']) && isset($_GET['custom_element'])){
181
  $this->should_create_css = true;
182
  }
183
 
184
  add_action( 'admin_menu', array( $this, 'add_plugin_page' ) );
185
  add_action( 'admin_init', array( $this, 'page_init' ) );
186
+ add_action( 'wp_ajax_edit_custom_elements', array( $this, 'edit_custom_elements_callback' ) );
187
  }
188
 
189
  /**
197
  wp_enqueue_style( 'fontawesome', plugins_url( 'assets/css/font-awesome.min.css', __FILE__ ) );
198
  }
199
 
200
+ public function add_footer_styles(){ ?>
201
+ <script type="text/javascript" >
202
+ jQuery(document).ready(function() {
203
+ var textBefore = '';
204
+
205
+ // Exit focus from the text when clicking 'Enter' but don't submit the form.
206
+ jQuery('table.custom_elements').find('td input:text').on('keyup keypress', function(e) {
207
+ var keyCode = e.keyCode || e.which;
208
+ if (keyCode === 13) {
209
+ jQuery(this).blur();
210
+ e.preventDefault();
211
+ return false;
212
+ }
213
+ });
214
+
215
+
216
+ jQuery('table.custom_elements').find('td input:checkbox').change(function () {
217
+
218
+ // Change the No to Yes or Yes to No labels.
219
+ var $field = jQuery(this);
220
+ var value = $field.prop('checked') ? 1 : 0;
221
+ var item = jQuery(this).siblings('span');
222
+ if(value){
223
+ item.css('color', 'darkgreen');
224
+ item.text("<?php _e('Yes', 'font-organizer'); ?>");
225
+ }else{
226
+ item.css('color', 'darkred');
227
+ item.text("<?php _e('No', 'font-organizer'); ?>");
228
+ }
229
+
230
+ // Send ajax request named 'edit_custom_elements' to change the column to value text
231
+ // where id.
232
+ var data = {
233
+ 'action': 'edit_custom_elements',
234
+ 'id': parseInt($field.closest('tr').find('.check-column input').val()),
235
+ 'column': $field.attr('name'),
236
+ 'text': value
237
+ };
238
+ jQuery.post(ajaxurl, data, function(response) {
239
+
240
+ // Show message for success and error for 3 seconds.
241
+ if(response == "true"){
242
+ jQuery('.custom_elements_message.fo_success').show().delay(3000).fadeOut();
243
+ }else{
244
+ jQuery('.custom_elements_message.fo_warning').show().delay(3000).fadeOut();
245
+ $field.prop('checked', !value);
246
+ }
247
+ });
248
+ });
249
+
250
+ jQuery('table.custom_elements').find('td input:text').on('focus', function () {
251
+ var $field = jQuery(this);
252
+
253
+ // Store the current value on focus and on change
254
+ textBefore = $field.val();
255
+ }).blur(function() {
256
+ var $field = jQuery(this);
257
+ var text = $field.val();
258
+
259
+ // Set back previous value if empty
260
+ if (text.length <= 0) {
261
+ $field.val(textBefore);
262
+ return;
263
+ }
264
+
265
+ if (textBefore !== text) {
266
+
267
+ // Send ajax request named 'edit_custom_elements' to change the column to value text
268
+ // where id.
269
+ var data = {
270
+ 'action': 'edit_custom_elements',
271
+ 'id': parseInt($field.closest('tr').find('.check-column input').val()),
272
+ 'column': $field.attr('name'),
273
+ 'text': text
274
+ };
275
+ jQuery.post(ajaxurl, data, function(response) {
276
+
277
+ // Show message for success and error for 3 seconds.
278
+ if(response == "true"){
279
+ jQuery('.custom_elements_message.fo_success').show().delay(3000).fadeOut();
280
+ }else{
281
+ jQuery('.custom_elements_message.fo_warning').show().delay(3000).fadeOut();
282
+ $field.val(textBefore);
283
+ }
284
+ });
285
+ }
286
+ });
287
+ });
288
+ </script> <?php
289
+ }
290
+
291
+ public function edit_custom_elements_callback() {
292
+ global $wpdb;
293
+
294
+ $table_name = $wpdb->prefix . FO_ELEMENTS_DATABASE;
295
+ $wpdb->update(
296
+ $table_name,
297
+ array( $_POST['column'] => $_POST['text'] ), // change the column selected with the new value.
298
+ array('id' => $_POST['id']) // where id
299
+ );
300
+
301
+ // Initialize what is a must for the elements file.
302
+ $this->load_custom_elements();
303
+ $this->elements_options = get_option( 'fo_elements_options' );
304
+
305
+ $this->create_elements_file();
306
+
307
+ wp_die('true'); // this is required to terminate immediately and return a proper response
308
+ }
309
+
310
  /**
311
  * Add options settings page in the wordpress settings.
312
  */
324
  add_action( 'load-' . $hook, array( $this, 'init_page' ) );
325
  add_action( 'load-' . $hook, array( $this, 'register_scripts' ) );
326
  add_action( 'load-' . $hook, array( $this, 'create_css_file' ) );
327
+ add_action( 'admin_footer', array( $this, 'add_footer_styles' ) );
328
  add_filter( 'option_page_capability_fo_general_options', array($this, 'options_capability') );
329
  add_filter( 'option_page_capability_fo_elements_options', array($this, 'options_capability') );
330
  }
340
  }
341
 
342
  public function create_css_file($force = false){
 
 
 
343
 
344
  if(((!isset($_GET['settings-updated']) || !$_GET['settings-updated']) && !$this->should_create_css) && !$force){
345
  return;
346
  }
347
 
348
+ /* ========= Create the declartions file ========= */
349
+ $this->create_declration_file();
350
+
351
+ /* ========= Create the elements file ========= */
352
+ $this->create_elements_file();
353
+ }
354
+
355
+ private function create_elements_file(){
356
+ global $fo_css_directory_path;
357
+ global $fo_elements_css_file_name;
358
+
359
+ $content = self::DEFAULT_CSS_TITLE;
360
+
361
+ // Add the known elements css.
362
+ foreach ($this->elements_options as $key => $value) {
363
+ if(strpos($key, 'important') || !$value)
364
+ continue;
365
+
366
+ $strip_key = str_replace('_font', '', $key);
367
+ $important = $this->elements_options[$key . '_important'];
368
+ $content .= sprintf("%s { font-family: '%s'%s; }\n", $strip_key, $value, $important ? '!important' : '');
369
+ }
370
+
371
+ // Add custom elements css.
372
+ foreach ($this->custom_elements as $custom_element_db) {
373
+ // if name is valid create a css for it.
374
+ if($custom_element_db->name){
375
+ $content .= sprintf("%s { font-family: '%s'%s; }\n", $custom_element_db->custom_elements, $custom_element_db->name, $custom_element_db->important ? '!important' : '');
376
+ }
377
+ }
378
+
379
+ // If there is any css to write. Create the directory if needed and create the file.
380
+ fo_try_write_file($content, $fo_css_directory_path, $fo_elements_css_file_name, array($this, 'generate_css_failed_admin_notice'));
381
+ }
382
+
383
+ private function create_declration_file(){
384
+ global $fo_css_directory_path;
385
+ global $fo_declarations_css_file_name;
386
 
387
  $content = self::DEFAULT_CSS_TITLE;
388
  $custom_fonts_content = '';
395
  // Set all the urls content under the same src.
396
  $urls_content_arr = array();
397
  foreach ($urls as $url) {
398
+ // Fix everyone saved with http or https and let the browser decide.
399
+ $url = str_replace('http://', '//', $url);
400
+ $url = str_replace('https://', '//', $url);
401
+
402
  $urls_content_arr[] = "url('" . $url . "') format('" . fo_get_font_format($url) . "')";
403
  }
404
 
431
  if(!empty($google_fonts)){
432
  // We are assuming not to much google fonts. If it is, we need to split the request.
433
  // $content .= "<link href='http://fonts.googleapis.com/css?family=". implode("|", $google_fonts) . "' rel='stylesheet' type='text/css'>\n";
434
+ $content .= "@import url('//fonts.googleapis.com/css?family=". implode("|", $google_fonts) . "');\n";
435
  }
436
 
437
  // Add the custom fonts css that was created before.
439
 
440
  // If there is any declartions css to write.
441
  fo_try_write_file($content, $fo_css_directory_path, $fo_declarations_css_file_name, array($this, 'generate_css_failed_admin_notice'));
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
442
  }
443
 
444
  /**
455
  if(isset($this->general_options['google_key']) && $this->general_options['google_key']){
456
  // Add Google fonts.
457
  set_time_limit(0);
458
+ $response = wp_remote_get("https://www.googleapis.com/webfonts/v1/webfonts?sort=alpha&key=" . $this->general_options['google_key'], array('timeout' => 60));
459
  if( wp_remote_retrieve_response_code( $response ) == 200){
460
  $this->google_fonts = json_decode(wp_remote_retrieve_body($response))->items;
461
  }else{
462
+ // Show the most detailed message in the error and display it to the user.
463
+ $error = json_decode(wp_remote_retrieve_body($response))->error->errors[0];
464
+ add_settings_error('google_key', '', __('Google API key is not valid: ', 'font-organizer') . ' [' . $error->reason . '] ' . $error->message, 'error');
465
  }
466
  }else{
467
  add_settings_error('google_key', '', __('Google API key is not set! Cannot display google fonts.', 'font-organizer'), 'error');
495
  if(isset($_GET['manage_font_id'])){
496
  foreach ($this->usable_fonts_db as $font_db) {
497
  if(intval($_GET['manage_font_id']) == $font_db->id){
498
+
499
+ // If name is made up/ deleted or unavailable for now just break for now.
500
+ if(!array_key_exists($font_db->name, $this->usable_fonts))
501
+ break;
502
+
503
  $this->selected_manage_font = $this->usable_fonts[$font_db->name];
504
  $this->custom_elements_table->prepare_items_by_font($this->custom_elements, $font_db->id);
505
  break;
668
  <a name="step6"></a>
669
  <h2 class="hndle ui-sortable-handle" style="cursor:default;"><span><?php _e('5. Manage Fonts', 'font-organizer'); ?></span></h2>
670
  <div class="inside">
671
+ <span>
672
+ <?php _e('Step 5: Select a font to manage, delete and view the source and custom elements assigned to it.', 'font-organizer'); ?>
673
+ </span>
674
+ <p>
675
+ <strong><?php _e('Note: ', 'font-organizer'); ?></strong>
676
+ <?php _e('You can edit the values of every row to change the custom elements assigned or add and remove the important tag. Just change the text or check the box and the settings will automatically save.', 'font-organizer'); ?>
677
+ </p>
678
+ <div class="custom_elements_message fo_success" style="display: none;">
679
+ <i class="fa fa-info-circle"></i>
680
+ <?php _e('Changes saved!', 'font-organizer'); ?>
681
+ </div>
682
+ <div class="custom_elements_message fo_warning" style="display: none;">
683
+ <i class="fa fa-warning"></i>
684
+ <?php _e("Data is invalid", "font-organizer"); ?>
685
+ <span></span>
686
+ </div>
687
  <table class="form-table">
688
  <tr>
689
  <th scope="row"><?php _e('Font', 'font-organizer'); ?></th>
750
  <div id="postbox-container-1" class="postbox-container">
751
  <div class="meta-box-sortables">
752
  <div class="postbox">
753
+ <h2>
754
+ <span><?php esc_attr_e('Thank you', 'font-organizer'); ?></span>
755
+ </h2>
756
+
757
+ <div class="inside">
758
+ <p><?php _e(
759
+ 'Thank you for using an <a href="http://hivewebstudios.com" target="_blank">Hive</a> plugin! We 5 star you already, so why don\'t you <a href="https://wordpress.org/support/plugin/font-organizer/reviews/?rate=5#new-post" target="_blank">5 star us too</a>?', 'font-organizer'); ?>
760
+ <br />
761
+ <p><?php _e('Anyway, if you need anything, this may help:', 'font-organizer'); ?></p>
762
+ <ul style="list-style-type:disc;margin: 0 20px;">
763
+ <li><a href="http://hivewebstudios.com/font-organizer/#faq" target="_blank"><?php _e('FAQ', 'font-organizer'); ?></a></li>
764
+ <li><a href="https://wordpress.org/support/plugin/font-organizer" target="_blank"><?php _e('Support forums', 'font-organizer'); ?></a></li>
765
+ <li><a href="http://hivewebstudios.com/font-organizer/#contact" target="_blank"><?php _e('Contact us', 'font-organizer'); ?></a></li>
766
+ </ul>
767
+ </p>
768
+ </div>
769
+ </div>
770
+ <div class="postbox">
771
+ <h2>
772
+ <span><?php esc_attr_e('Like Our Facebook Page', 'font-organizer'); ?></span>
773
+ </h2>
774
+ <div class="inside">
775
+ <iframe src="https://www.facebook.com/plugins/page.php?href=https%3A%2F%2Fwww.facebook.com%2Fhivewp%2F&tabs&width=340&height=214&small_header=false&adapt_container_width=true&hide_cover=false&show_facepile=true&appId=<?php echo self::FACBOOK_APP_ID; ?>" width="100%" height="200" style="border:none;overflow:hidden" scrolling="no" frameborder="0" allowTransparency="true"></iframe>
776
+ </div>
777
  </div>
778
  </div>
779
  </div>
1047
  * @return array
1048
  */
1049
  public function fo_upload_dir( $dir ) {
1050
+ $base_url = $url = fo_get_all_http_url( $dir['baseurl'] );
1051
+
1052
  return array(
1053
  'path' => $dir['basedir'] . '/font-organizer',
1054
+ 'url' => $base_url . '/font-organizer',
1055
  'subdir' => '/font-organizer',
1056
  ) + $dir;
1057
  }
1226
  echo '<span class="highlight info">';
1227
 
1228
  $url = 'https://developers.google.com/fonts/docs/developer_api#acquiring_and_using_an_api_key';
1229
+ $faq_url = 'http://hivewebstudios.com/font-organizer/#faq';
1230
  echo sprintf( __( 'To get all the fonts, Google requires the mandatory use of an API key, get one from <a href="%s" target="_blank">HERE</a>', 'font-organizer' ), esc_url( $url ) );
1231
  echo sprintf( __( ' Need help? Click <a href="%s" target="_blank">here</a>', 'font-organizer' ), esc_url( $faq_url ) );
1232
  echo '</span> <br />';
1234
 
1235
  $value = isset( $this->general_options['google_key'] ) ? esc_attr( $this->general_options['google_key']) : '';
1236
  printf(
1237
+ '<div class="validate"><input type="text" id="google_key" name="fo_general_options[google_key]" value="%s" class="large-text %s %s" placeholder="Ex: AIzaSyB1I0couKSmsW1Nadr68IlJXXCaBi9wYwM" /><span></span></div>', $value , empty($this->google_fonts) ? 'error' : 'valid', is_rtl() ? 'rtl' : 'ltr'
 
1238
  );
1239
  }
1240