Version Description
- Tested on WordPress 4.3
- Add translation pl_PL
Download this release
Release Info
Developer | miyauchi |
Plugin | WP Total Hacks |
Version | 2.0.0 |
Comparing to | |
See all releases |
Code changes from version 1.9.2 to 2.0.0
- includes/admin.php +4 -1
- includes/form/site.php +0 -9
- languages/wp-total-hacks-pl_PL.mo +0 -0
- languages/wp-total-hacks-pl_PL.po +390 -0
- readme.txt +7 -2
- wp-total-hacks.php +373 -377
includes/admin.php
CHANGED
@@ -87,6 +87,10 @@ private $translators = array(
|
|
87 |
'lang' => 'Vietnamese',
|
88 |
'url' => 'http://bizover.net/'
|
89 |
),
|
|
|
|
|
|
|
|
|
90 |
);
|
91 |
|
92 |
private $role = 'manage_options';
|
@@ -469,4 +473,3 @@ private function get_translators()
|
|
469 |
}
|
470 |
|
471 |
}
|
472 |
-
|
87 |
'lang' => 'Vietnamese',
|
88 |
'url' => 'http://bizover.net/'
|
89 |
),
|
90 |
+
'Michael Skweres' => array(
|
91 |
+
'lang' => 'Polish',
|
92 |
+
'url' => 'http://livepoint.pl/'
|
93 |
+
),
|
94 |
);
|
95 |
|
96 |
private $role = 'manage_options';
|
473 |
}
|
474 |
|
475 |
}
|
|
includes/form/site.php
CHANGED
@@ -35,14 +35,6 @@
|
|
35 |
</div>
|
36 |
</div>
|
37 |
|
38 |
-
<div class="block">
|
39 |
-
<h4><img src="<?php echo $this->get_plugin_url(); ?>/img/check.png" height="24" width="24" /><?php _e('Remove adjacent posts rel links from head on Pages', 'wp-total-hacks'); ?></h4>
|
40 |
-
<div class="block_content">
|
41 |
-
<p><?php _e('Remove adjacent posts rel links from head on Pages.<br /><span class="ex">e.g. <link rel="next" ...> <link rel="prev" ...></span>', 'wp-total-hacks'); ?></p>
|
42 |
-
<?php $this->sel('wfb_adjacent_posts_rel_links'); ?>
|
43 |
-
</div>
|
44 |
-
</div>
|
45 |
-
|
46 |
<div class="block">
|
47 |
<h4><img src="<?php echo $this->get_plugin_url(); ?>/img/check.png" height="24" width="24" /><?php _e('Remove version number from head', 'wp-total-hacks'); ?></h4>
|
48 |
<div class="block_content">
|
@@ -103,4 +95,3 @@
|
|
103 |
</div>
|
104 |
|
105 |
</div><!--end .tab-->
|
106 |
-
|
35 |
</div>
|
36 |
</div>
|
37 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
38 |
<div class="block">
|
39 |
<h4><img src="<?php echo $this->get_plugin_url(); ?>/img/check.png" height="24" width="24" /><?php _e('Remove version number from head', 'wp-total-hacks'); ?></h4>
|
40 |
<div class="block_content">
|
95 |
</div>
|
96 |
|
97 |
</div><!--end .tab-->
|
|
languages/wp-total-hacks-pl_PL.mo
ADDED
Binary file
|
languages/wp-total-hacks-pl_PL.po
ADDED
@@ -0,0 +1,390 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
# This file is distributed under the same license as the PACKAGE package.
|
2 |
+
# FIRST AUTHOR <EMAIL@ADDRESS>, YEAR.
|
3 |
+
#
|
4 |
+
msgid ""
|
5 |
+
msgstr ""
|
6 |
+
"Project-Id-Version: 0.2.1\n"
|
7 |
+
"Report-Msgid-Bugs-To: http://wordpress.org/tag/wp-total-hacks\n"
|
8 |
+
"POT-Creation-Date: 2014-09-06 03:35:26+00:00\n"
|
9 |
+
"PO-Revision-Date: 2015-08-01 08:15+0200\n"
|
10 |
+
"Last-Translator: Felix Kern <kernfel@gmail.com>\n"
|
11 |
+
"Language-Team: Michael Skweres <michal@skweres.net>\n"
|
12 |
+
"Language: pl_PL\n"
|
13 |
+
"MIME-Version: 1.0\n"
|
14 |
+
"Content-Type: text/plain; charset=UTF-8\n"
|
15 |
+
"Content-Transfer-Encoding: 8bit\n"
|
16 |
+
"X-Generator: Poedit 1.8.3\n"
|
17 |
+
"Plural-Forms: nplurals=3; plural=(n==1 ? 0 : n%10>=2 && n%10<=4 && (n%100<10 "
|
18 |
+
"|| n%100>=20) ? 1 : 2);\n"
|
19 |
+
|
20 |
+
#: includes/admin.php:260 includes/form/appearance.php:11
|
21 |
+
#: includes/form/appearance.php:35 includes/form/site.php:9
|
22 |
+
#: includes/form/site.php:19
|
23 |
+
msgid "Select File"
|
24 |
+
msgstr "Wybierz plik"
|
25 |
+
|
26 |
+
#: includes/admin.php:390
|
27 |
+
msgid "Saved."
|
28 |
+
msgstr "Zachowano"
|
29 |
+
|
30 |
+
#: includes/admin.php:397
|
31 |
+
msgid "Save Changes"
|
32 |
+
msgstr "Zachowaj zmiany"
|
33 |
+
|
34 |
+
#: includes/admin.php:442
|
35 |
+
msgid "Deactivate"
|
36 |
+
msgstr "Wyłącz"
|
37 |
+
|
38 |
+
#: includes/admin.php:444 includes/admin.php:446
|
39 |
+
msgid "Activate"
|
40 |
+
msgstr "Aktywuj"
|
41 |
+
|
42 |
+
#: includes/form/appearance.php:3
|
43 |
+
msgid "Appearance in admin"
|
44 |
+
msgstr "Wygląd w panelu zarządzania"
|
45 |
+
|
46 |
+
#: includes/form/appearance.php:6
|
47 |
+
msgid "Change admin header logo"
|
48 |
+
msgstr "Zmień logo panelu zarządzania"
|
49 |
+
|
50 |
+
#: includes/form/appearance.php:8
|
51 |
+
msgid "Upload %s x %s pixel image for admin header logo."
|
52 |
+
msgstr "Załaduj obrazek o wymiarach %s x %s pikseli."
|
53 |
+
|
54 |
+
#: includes/form/appearance.php:16
|
55 |
+
msgid "Change admin footer text"
|
56 |
+
msgstr "Zmień treść stopki w panelu zarządzania"
|
57 |
+
|
58 |
+
#: includes/form/appearance.php:18
|
59 |
+
msgid "You can edit admin footer text. Line breaks will remove."
|
60 |
+
msgstr "Możesz zmienić treść stopki. Uwaga.. nowe linie będą ignorowane."
|
61 |
+
|
62 |
+
#: includes/form/appearance.php:29
|
63 |
+
msgid "Change login logo"
|
64 |
+
msgstr "Zmień logo panelu zarządzania"
|
65 |
+
|
66 |
+
#: includes/form/appearance.php:31
|
67 |
+
msgid ""
|
68 |
+
"You can customize logo, URL and Title. The logo image size is recommended "
|
69 |
+
"310 x 70 pixel."
|
70 |
+
msgstr ""
|
71 |
+
"Możesz zmienić logo oraz link. Zalecany rozmiar obrazka loga to 310 x 70 "
|
72 |
+
"pikseli."
|
73 |
+
|
74 |
+
#: includes/form/appearance.php:34
|
75 |
+
msgid "Logo"
|
76 |
+
msgstr "Logo"
|
77 |
+
|
78 |
+
#: includes/form/appearance.php:36
|
79 |
+
msgid "URL"
|
80 |
+
msgstr "URL"
|
81 |
+
|
82 |
+
#: includes/form/appearance.php:38
|
83 |
+
msgid "Title"
|
84 |
+
msgstr "Tytuł"
|
85 |
+
|
86 |
+
#: includes/form/footer.php:2
|
87 |
+
msgid "Translators"
|
88 |
+
msgstr "Tłumacze"
|
89 |
+
|
90 |
+
#: includes/form/footer.php:7
|
91 |
+
msgid "Contributors"
|
92 |
+
msgstr "Współpracownicy"
|
93 |
+
|
94 |
+
#: includes/form/other.php:2
|
95 |
+
msgid "Other"
|
96 |
+
msgstr "Inni"
|
97 |
+
|
98 |
+
#: includes/form/other.php:5
|
99 |
+
msgid "Deactivate Dashboard Widgets"
|
100 |
+
msgstr "Wyłącz widgety panelu zarządzania"
|
101 |
+
|
102 |
+
#: includes/form/other.php:7 includes/form/post.php:8 includes/form/post.php:27
|
103 |
+
msgid "Choose the items you want to remove."
|
104 |
+
msgstr "Wybierz elementy, które chcesz usunąć."
|
105 |
+
|
106 |
+
#: includes/form/other.php:24
|
107 |
+
msgid "Enable shortcode in the text widget"
|
108 |
+
msgstr "Aktywuj krótkie kody (shortcode) w widgetach"
|
109 |
+
|
110 |
+
#: includes/form/other.php:26
|
111 |
+
msgid ""
|
112 |
+
"By default, the Text widget only support text and HTML. If you activate it, "
|
113 |
+
"shortcode would be supported."
|
114 |
+
msgstr ""
|
115 |
+
"Domyślnie widgety obsługują tylko tekst oraz html. Gdy aktywujesz opcję, "
|
116 |
+
"będą obsługiwane również shortcody"
|
117 |
+
|
118 |
+
#: includes/form/other.php:32
|
119 |
+
msgid "Enable oEmbed in the text widget"
|
120 |
+
msgstr "Aktywuj opcję oEmbed w widgetach"
|
121 |
+
|
122 |
+
#: includes/form/other.php:34
|
123 |
+
msgid ""
|
124 |
+
"By default, the Text widget only support text and HTML. If you activate it, "
|
125 |
+
"oEmbed would be supported."
|
126 |
+
msgstr ""
|
127 |
+
"Domyślnie widgety obsługują tylko tekst oraz html. Gdy aktywujesz opcję, "
|
128 |
+
"pojawi się obsługa oEmbed"
|
129 |
+
|
130 |
+
#: includes/form/other.php:40
|
131 |
+
msgid "Add role \"Webmaster\""
|
132 |
+
msgstr "Dodaj rolę “Webmaster”"
|
133 |
+
|
134 |
+
#: includes/form/other.php:42
|
135 |
+
msgid ""
|
136 |
+
"This role has the capabilities of an \"Editor\", but can also edit theme "
|
137 |
+
"options."
|
138 |
+
msgstr ""
|
139 |
+
"Rola Webmastera posiada uprawnienia edytora, jednak z możliwością "
|
140 |
+
"modyfikacji szablonu."
|
141 |
+
|
142 |
+
#: includes/form/other.php:48
|
143 |
+
msgid "Change default email address"
|
144 |
+
msgstr "Zmień główny adres e-mail"
|
145 |
+
|
146 |
+
#: includes/form/other.php:50
|
147 |
+
msgid ""
|
148 |
+
"Change the email address and sender name used by automatic email "
|
149 |
+
"notifications."
|
150 |
+
msgstr "Zmień domyślny adres e-mail oraz podpis w przesyłanych powiadomieniach"
|
151 |
+
|
152 |
+
#: includes/form/other.php:52
|
153 |
+
msgid "Name"
|
154 |
+
msgstr "Imię lub nazwa"
|
155 |
+
|
156 |
+
#: includes/form/other.php:54
|
157 |
+
msgid "Email"
|
158 |
+
msgstr "E-mail"
|
159 |
+
|
160 |
+
#: includes/form/other.php:61
|
161 |
+
msgid "Delete default contact methods"
|
162 |
+
msgstr "Usuń domyślne metody kontaktu"
|
163 |
+
|
164 |
+
#: includes/form/other.php:63
|
165 |
+
msgid "Delete default contact methods from user profile."
|
166 |
+
msgstr "Opcja usuwa domyślnie dostępne opcje kontaktu."
|
167 |
+
|
168 |
+
#: includes/form/other.php:80
|
169 |
+
msgid "Remove Update Notification"
|
170 |
+
msgstr "Usuń powiadomienie o aktualizacjach"
|
171 |
+
|
172 |
+
#: includes/form/other.php:82
|
173 |
+
msgid "Remove Update Notification for all users except Admin User."
|
174 |
+
msgstr ""
|
175 |
+
"Opcja ta usuwa powiadomienia o aktualizacjach dla wszystkich użytkowników "
|
176 |
+
"poza administratorem."
|
177 |
+
|
178 |
+
#: includes/form/post.php:3
|
179 |
+
msgid "Posts & Pages"
|
180 |
+
msgstr "Wpisy & Strony"
|
181 |
+
|
182 |
+
#: includes/form/post.php:6
|
183 |
+
msgid "Remove meta boxes for Posts"
|
184 |
+
msgstr "Usuń pola meta dla Wpisów"
|
185 |
+
|
186 |
+
#: includes/form/post.php:25
|
187 |
+
msgid "Remove meta boxes for Pages"
|
188 |
+
msgstr "Usuń pola meta dla Stron"
|
189 |
+
|
190 |
+
#: includes/form/post.php:44
|
191 |
+
msgid "Revision Control"
|
192 |
+
msgstr "Kontrola wersji"
|
193 |
+
|
194 |
+
#: includes/form/post.php:46
|
195 |
+
msgid "Limit the number of revisions allowed."
|
196 |
+
msgstr "Ustal limit zachowanych wersji edycji"
|
197 |
+
|
198 |
+
#: includes/form/post.php:48
|
199 |
+
msgid "Store All"
|
200 |
+
msgstr "Zachowaj wszystkie wersje"
|
201 |
+
|
202 |
+
#: includes/form/post.php:64
|
203 |
+
msgid "Stop self-pingbacks"
|
204 |
+
msgstr "Zatrzymaj automatyczne pingowanie"
|
205 |
+
|
206 |
+
#: includes/form/post.php:66
|
207 |
+
msgid ""
|
208 |
+
"Stop sending pingbacks from your own site to your own site when writing "
|
209 |
+
"posts."
|
210 |
+
msgstr ""
|
211 |
+
"Opcja ta deaktywuje automatyczne pingowanie / powiadamianie po publikacji "
|
212 |
+
"nowych treści."
|
213 |
+
|
214 |
+
#: includes/form/post.php:72
|
215 |
+
msgid "Add \"Excerpt\" support for Pages."
|
216 |
+
msgstr "Dodaj opcję leadu dla stron"
|
217 |
+
|
218 |
+
#: includes/form/post.php:74
|
219 |
+
msgid "Allows you to add excerpt text to pages."
|
220 |
+
msgstr "Możesz dodać opcję leadu, a więc krótkiego wypisu treści dla stron."
|
221 |
+
|
222 |
+
#: includes/form/post.php:80
|
223 |
+
msgid "Allow you to create child page for \"draft\"."
|
224 |
+
msgstr "Zezwól na stworzenie podstrony dla szkicu"
|
225 |
+
|
226 |
+
#: includes/form/post.php:82
|
227 |
+
msgid "You can create child page for non-publish Page."
|
228 |
+
msgstr "Możesz tworzyć podstrony dla nieopublikowanych stron"
|
229 |
+
|
230 |
+
#: includes/form/site.php:2
|
231 |
+
msgid "Site Settings"
|
232 |
+
msgstr "Ustawienia serwisu"
|
233 |
+
|
234 |
+
#: includes/form/site.php:5
|
235 |
+
msgid "Add a favicon"
|
236 |
+
msgstr "Dodaj favikonkę"
|
237 |
+
|
238 |
+
#: includes/form/site.php:7
|
239 |
+
msgid "Please upload .ico image."
|
240 |
+
msgstr "Załaduj plik .ico"
|
241 |
+
|
242 |
+
#: includes/form/site.php:10
|
243 |
+
msgid "Use this favicon with administration screens."
|
244 |
+
msgstr "Użyj ikony również w panelu zarządzania"
|
245 |
+
|
246 |
+
#: includes/form/site.php:15
|
247 |
+
msgid "Add a apple-touch-icon"
|
248 |
+
msgstr "Dodaj ikonę apple-touch"
|
249 |
+
|
250 |
+
#: includes/form/site.php:17
|
251 |
+
msgid "Please upload .png image."
|
252 |
+
msgstr "Załaduj plik .png"
|
253 |
+
|
254 |
+
#: includes/form/site.php:31
|
255 |
+
msgid "Remove \"wlwmanifest\" and \"xmlrpc\" from meta."
|
256 |
+
msgstr "Usuń tagi meta ”wlwmanifest\" i \"xmlrpc\" ze źródła"
|
257 |
+
|
258 |
+
#: includes/form/site.php:33
|
259 |
+
msgid ""
|
260 |
+
"If you don't use \"<a href=\"%s\">Remote Publishing</a>\", remove "
|
261 |
+
"unnecessary tags from head."
|
262 |
+
msgstr ""
|
263 |
+
"Jeśli nie korzystasz ze \"<a href=\"%s\">zdalnej publikacji</a>\", możesz "
|
264 |
+
"usunąć bezpiecznie te tagi ze źródła."
|
265 |
+
|
266 |
+
#: includes/form/site.php:39
|
267 |
+
msgid "Remove adjacent posts rel links from head on Pages"
|
268 |
+
msgstr "Usuń linki rel z nagłówka"
|
269 |
+
|
270 |
+
#: includes/form/site.php:41
|
271 |
+
msgid ""
|
272 |
+
"Remove adjacent posts rel links from head on Pages.<br /><span class=\"ex"
|
273 |
+
"\">e.g. <link rel=\"next\" ...> <link rel=\"prev\" ...></span>"
|
274 |
+
msgstr ""
|
275 |
+
"Usuń linki rel .<br /><span class=\"ex\">e.g. <link rel=\"next\" ...> "
|
276 |
+
"<link rel=\"prev\" ...></span>"
|
277 |
+
|
278 |
+
#: includes/form/site.php:47
|
279 |
+
msgid "Remove version number from head"
|
280 |
+
msgstr "Usuń informację o wersji z nagłówka"
|
281 |
+
|
282 |
+
#: includes/form/site.php:49
|
283 |
+
msgid ""
|
284 |
+
"Remove generator tag from head. <span class=\"ex\">e.g. <meta name="
|
285 |
+
"\"generator\" content=\"WordPress x.x.x\" /></span>"
|
286 |
+
msgstr ""
|
287 |
+
"Usuń informację o generatorze (<span class=\"ex\"><meta name=\"generator"
|
288 |
+
"\" content=\"WordPress x.x.x\" /></span>) z nagłówka"
|
289 |
+
|
290 |
+
#: includes/form/site.php:55
|
291 |
+
msgid "Remove #more anchor"
|
292 |
+
msgstr "Usuń kotwicę #więcej"
|
293 |
+
|
294 |
+
#: includes/form/site.php:57
|
295 |
+
msgid "Remove #more-xxx anchor from more links."
|
296 |
+
msgstr "Usuwa kotwicę #więcej-xxx z linków"
|
297 |
+
|
298 |
+
#: includes/form/site.php:63
|
299 |
+
msgid "Remove \"[...]\" from excerpt"
|
300 |
+
msgstr "Usuń “[…]” z leadów"
|
301 |
+
|
302 |
+
#: includes/form/site.php:65
|
303 |
+
msgid "Remove \"[...]\" from output of the_excerpt()."
|
304 |
+
msgstr "Usuwa \"[...]\" z leadów poszczególnych wpisów."
|
305 |
+
|
306 |
+
#: includes/form/site.php:71
|
307 |
+
msgid "Block all pingbacks"
|
308 |
+
msgstr "Blokuj opcję pingback"
|
309 |
+
|
310 |
+
#: includes/form/site.php:73
|
311 |
+
msgid "Block all pingbacks."
|
312 |
+
msgstr "Zablokuj opcję pingback"
|
313 |
+
|
314 |
+
#: includes/form/site.php:79
|
315 |
+
msgid "Install Google Analytics"
|
316 |
+
msgstr "Zainstaluj kod Google Analytics"
|
317 |
+
|
318 |
+
#: includes/form/site.php:81
|
319 |
+
msgid "Add Google analytics code."
|
320 |
+
msgstr "Dodaj kod śledzący statystyki z Google Analytics"
|
321 |
+
|
322 |
+
#: includes/form/site.php:88
|
323 |
+
msgid "Exclude user logged in."
|
324 |
+
msgstr "Nie bierz pod uwagę zalogowanych"
|
325 |
+
|
326 |
+
#: includes/form/site.php:93
|
327 |
+
msgid "Webmaster Tools Verification"
|
328 |
+
msgstr "Weryfikacja Webmaster Tools"
|
329 |
+
|
330 |
+
#: includes/form/site.php:95
|
331 |
+
msgid ""
|
332 |
+
"Enter your meta key \"content\" value to verify your blog with <a href="
|
333 |
+
"\"https://www.google.com/webmasters/tools/\">Google Webmaster Tools</a> and "
|
334 |
+
"<a href=\"http://www.bing.com/webmaster\">Bing Webmaster Center</a>."
|
335 |
+
msgstr ""
|
336 |
+
"Wprowadź wartość meta aby zweryfikować stronę na <a href=\"https://www."
|
337 |
+
"google.com/webmasters/tools/\">Google Webmaster Tools</a> oraz <a href="
|
338 |
+
"\"http://www.bing.com/webmaster\">Bing Webmaster Center</a>."
|
339 |
+
|
340 |
+
#: wp-total-hacks.php:402
|
341 |
+
msgid "Settings"
|
342 |
+
msgstr "Ustawienia"
|
343 |
+
|
344 |
+
#: wp-total-hacks.php:405
|
345 |
+
msgid "Donate"
|
346 |
+
msgstr "Daj napiwek"
|
347 |
+
|
348 |
+
#. Plugin Name of the plugin/theme
|
349 |
+
msgid "WP Total Hacks"
|
350 |
+
msgstr ""
|
351 |
+
|
352 |
+
#. Plugin URI of the plugin/theme
|
353 |
+
msgid "http://wpist.me/wp/wp-total-hacks/"
|
354 |
+
msgstr ""
|
355 |
+
|
356 |
+
#. Description of the plugin/theme
|
357 |
+
msgid "WP Total Hacks can customize your WordPress."
|
358 |
+
msgstr ""
|
359 |
+
|
360 |
+
#. Author of the plugin/theme
|
361 |
+
msgid "Takayuki Miyauchi"
|
362 |
+
msgstr ""
|
363 |
+
|
364 |
+
#. Author URI of the plugin/theme
|
365 |
+
msgid "http://wpist.me/"
|
366 |
+
msgstr ""
|
367 |
+
|
368 |
+
#~ msgid "WordPress Plugins"
|
369 |
+
#~ msgstr "WordPress Plugins"
|
370 |
+
|
371 |
+
#~ msgid "This Plugin needs your support"
|
372 |
+
#~ msgstr "Dieses Plugin braucht deine Unterstützung"
|
373 |
+
|
374 |
+
#~ msgid "Please help support the continued development."
|
375 |
+
#~ msgstr "Hilf mit, seine weitere Entwicklung zu finanzieren."
|
376 |
+
|
377 |
+
#~ msgid "Contact"
|
378 |
+
#~ msgstr "Kontakt"
|
379 |
+
|
380 |
+
#~ msgid "$200+ makes you an official contributor."
|
381 |
+
#~ msgstr "Ab 200$ wirst du als Mitwirkende/r aufgeführt."
|
382 |
+
|
383 |
+
#~ msgid "Disable Auto Save"
|
384 |
+
#~ msgstr "Automatisches Speichern deaktivieren"
|
385 |
+
|
386 |
+
#, fuzzy
|
387 |
+
#~ msgid "Remove attachment link from media uploader."
|
388 |
+
#~ msgstr ""
|
389 |
+
#~ "rel-Links zu angrenzenden Artikel aus dem <head> von Seiten "
|
390 |
+
#~ "entfernen"
|
readme.txt
CHANGED
@@ -3,8 +3,8 @@ Contributors: miyauchi,marushu
|
|
3 |
Donate link: https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=FR7RD5SGEU69Y
|
4 |
Tags: head, post, page, functions.php, admin, logo, auto save, revision, meta box, dashboard
|
5 |
Requires at least: 3.8
|
6 |
-
Tested up to: 4.
|
7 |
-
Stable tag:
|
8 |
|
9 |
WP Total Hacks can customize more than 20 settings on your WordPress Site.
|
10 |
PHP5 is required!
|
@@ -62,6 +62,7 @@ PHP5 is required!
|
|
62 |
* Persian(fa_IR) - [Amir Maskani](http://emir.ir/)
|
63 |
* Serbo-Croation(sr_RS) - [Anja Skrba](http://webhostinggeeks.com/wordpresshosting.php)
|
64 |
* Vietnamese(vi) - [Trong](http://bizover.net/)
|
|
|
65 |
|
66 |
You can send your own language pack to me.
|
67 |
|
@@ -97,6 +98,10 @@ Please contact to me.
|
|
97 |
|
98 |
== Changelog ==
|
99 |
|
|
|
|
|
|
|
|
|
100 |
= 1.9.2 =
|
101 |
* Tested up to WordPress 4.2.
|
102 |
|
3 |
Donate link: https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=FR7RD5SGEU69Y
|
4 |
Tags: head, post, page, functions.php, admin, logo, auto save, revision, meta box, dashboard
|
5 |
Requires at least: 3.8
|
6 |
+
Tested up to: 4.3
|
7 |
+
Stable tag: 2.0.0
|
8 |
|
9 |
WP Total Hacks can customize more than 20 settings on your WordPress Site.
|
10 |
PHP5 is required!
|
62 |
* Persian(fa_IR) - [Amir Maskani](http://emir.ir/)
|
63 |
* Serbo-Croation(sr_RS) - [Anja Skrba](http://webhostinggeeks.com/wordpresshosting.php)
|
64 |
* Vietnamese(vi) - [Trong](http://bizover.net/)
|
65 |
+
* Polish(pl_PL) - [Michael Skweres](http://livepoint.pl/)
|
66 |
|
67 |
You can send your own language pack to me.
|
68 |
|
98 |
|
99 |
== Changelog ==
|
100 |
|
101 |
+
= 2.0.0 =
|
102 |
+
* Tested on WordPress 4.3
|
103 |
+
* Add translation pl_PL
|
104 |
+
|
105 |
= 1.9.2 =
|
106 |
* Tested up to WordPress 4.2.
|
107 |
|
wp-total-hacks.php
CHANGED
@@ -4,7 +4,7 @@ Plugin Name: WP Total Hacks
|
|
4 |
Author: Takayuki Miyauchi
|
5 |
Plugin URI: https://github.com/miya0001/wp-total-hacks
|
6 |
Description: WP Total Hacks can customize your WordPress.
|
7 |
-
Version:
|
8 |
Author URI: http://wpist.me/
|
9 |
Domain Path: /languages
|
10 |
Text Domain: wp-total-hacks
|
@@ -15,383 +15,379 @@ new TotalHacks();
|
|
15 |
|
16 |
class TotalHacks {
|
17 |
|
18 |
-
private $option_params = array(
|
19 |
-
|
20 |
-
|
21 |
-
|
22 |
-
|
23 |
-
|
24 |
-
|
25 |
-
|
26 |
-
|
27 |
-
|
28 |
-
|
29 |
-
|
30 |
-
|
31 |
-
|
32 |
-
|
33 |
-
|
34 |
-
|
35 |
-
|
36 |
-
|
37 |
-
|
38 |
-
|
39 |
-
|
40 |
-
|
41 |
-
|
42 |
-
|
43 |
-
|
44 |
-
|
45 |
-
|
46 |
-
|
47 |
-
|
48 |
-
|
49 |
-
|
50 |
-
|
51 |
-
|
52 |
-
|
53 |
-
|
54 |
-
|
55 |
-
|
56 |
-
{
|
57 |
-
|
58 |
-
|
59 |
-
|
60 |
-
|
61 |
-
|
62 |
-
|
63 |
-
|
64 |
-
|
65 |
-
|
66 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
67 |
}
|
68 |
-
|
69 |
-
|
70 |
-
|
71 |
-
|
72 |
-
|
73 |
-
|
74 |
-
|
75 |
-
|
76 |
-
|
77 |
-
|
78 |
-
|
79 |
-
|
80 |
-
|
81 |
-
|
82 |
-
|
83 |
-
|
84 |
-
|
85 |
-
|
86 |
-
|
87 |
-
|
88 |
-
|
89 |
-
|
90 |
-
|
91 |
-
{
|
92 |
-
|
93 |
-
|
94 |
-
|
95 |
-
|
96 |
-
|
97 |
-
|
98 |
-
|
99 |
-
|
100 |
-
|
101 |
-
|
102 |
-
|
103 |
-
|
104 |
-
|
105 |
-
|
106 |
-
|
107 |
-
|
108 |
-
|
109 |
-
|
110 |
-
|
111 |
-
|
112 |
-
|
113 |
-
|
114 |
-
|
115 |
-
}
|
116 |
-
|
117 |
-
|
118 |
-
|
119 |
-
|
120 |
-
|
121 |
-
|
122 |
-
|
123 |
-
|
124 |
-
|
125 |
-
|
126 |
-
|
127 |
-
|
128 |
-
|
129 |
-
|
130 |
-
|
131 |
-
|
132 |
-
|
133 |
-
|
134 |
-
|
135 |
-
|
136 |
-
|
137 |
-
|
138 |
-
|
139 |
-
|
140 |
-
|
141 |
-
|
142 |
-
|
143 |
-
|
144 |
-
|
145 |
-
|
146 |
-
|
147 |
-
}
|
148 |
-
|
149 |
-
|
150 |
-
|
151 |
-
|
152 |
-
|
153 |
-
|
154 |
-
|
155 |
-
|
156 |
-
|
157 |
-
|
158 |
-
|
159 |
-
|
160 |
-
|
161 |
-
|
162 |
-
|
163 |
-
|
164 |
-
|
165 |
-
public function user_contactmethods($meth)
|
166 |
-
{
|
167 |
-
$del = $this->op('wfb_contact_methods');
|
168 |
-
if ($del && is_array($del)) {
|
169 |
-
foreach ($meth as $m => $s) {
|
170 |
-
if (in_array($m, $del)) {
|
171 |
-
unset($meth[$m]);
|
172 |
-
}
|
173 |
-
}
|
174 |
-
}
|
175 |
-
return $meth;
|
176 |
-
}
|
177 |
-
|
178 |
-
public function wp_mail_from($str)
|
179 |
-
{
|
180 |
-
if ($this->op('wfb_emailaddress')) {
|
181 |
-
if (preg_match("/^wordpress@/i", $str)) {
|
182 |
-
return $this->op('wfb_emailaddress');
|
183 |
-
}
|
184 |
-
}
|
185 |
-
return $str;
|
186 |
-
}
|
187 |
-
|
188 |
-
public function wp_mail_from_name($str)
|
189 |
-
{
|
190 |
-
if ($this->op('wfb_sendername')) {
|
191 |
-
if (preg_match("/^wordpress/i", $str)) {
|
192 |
-
return $this->op('wfb_sendername');
|
193 |
-
}
|
194 |
-
}
|
195 |
-
return $str;
|
196 |
-
}
|
197 |
-
|
198 |
-
public function init()
|
199 |
-
{
|
200 |
-
if ($this->op("wfb_pageexcerpt")) {
|
201 |
-
add_post_type_support('page', 'excerpt');
|
202 |
-
}
|
203 |
-
}
|
204 |
-
|
205 |
-
public function the_content_more_link($str)
|
206 |
-
{
|
207 |
-
if ($this->op('wfb_remove_more')) {
|
208 |
-
$str = preg_replace('/#more-[0-9]+/i', '', $str);
|
209 |
-
}
|
210 |
-
return $str;
|
211 |
-
}
|
212 |
-
|
213 |
-
public function get_header()
|
214 |
-
{
|
215 |
-
if ($this->op('wfb_adjacent_posts_rel_links')) {
|
216 |
-
if (is_page()) {
|
217 |
-
remove_action( 'wp_head', 'adjacent_posts_rel_link_wp_head', 10, 0 );
|
218 |
-
}
|
219 |
-
}
|
220 |
-
if ($this->op('wfb_remove_xmlrpc')) {
|
221 |
-
if (!$this->op("enable_app") && !$this->op('enable_xmlrpc')) {
|
222 |
-
remove_action('wp_head', 'wlwmanifest_link');
|
223 |
-
remove_action('wp_head', 'rsd_link');
|
224 |
-
}
|
225 |
-
}
|
226 |
-
if ($this->op('wfb_hide_version')) {
|
227 |
-
remove_action('wp_head', 'wp_generator');
|
228 |
-
}
|
229 |
-
}
|
230 |
-
|
231 |
-
public function wp_dashboard_setup()
|
232 |
-
{
|
233 |
-
if ($w = $this->op('wfb_widget')) {
|
234 |
-
global $wp_meta_boxes;
|
235 |
-
foreach ( $wp_meta_boxes['dashboard'] as $position => $prio_boxes ) {
|
236 |
-
foreach ( $prio_boxes as $priority => $boxes ) {
|
237 |
-
foreach ( $boxes as $key => $array ) {
|
238 |
-
if (in_array($key, $w)) {
|
239 |
-
unset($wp_meta_boxes['dashboard'][$position][$priority][$key]);
|
240 |
-
}
|
241 |
-
}
|
242 |
-
}
|
243 |
-
}
|
244 |
-
}
|
245 |
-
}
|
246 |
-
|
247 |
-
public function pre_ping(&$links)
|
248 |
-
{
|
249 |
-
if (!$this->op('wfb_selfping')) {
|
250 |
-
return;
|
251 |
-
}
|
252 |
-
$home = $this->op( 'home' );
|
253 |
-
foreach ($links as $l => $link) {
|
254 |
-
if (0 === strpos($link, $home)) {
|
255 |
-
unset($links[$l]);
|
256 |
-
}
|
257 |
-
}
|
258 |
-
}
|
259 |
-
|
260 |
-
public function login_headerurl($url)
|
261 |
-
{
|
262 |
-
if ($op = $this->op('wfb_login_url')) {
|
263 |
-
return $op;
|
264 |
-
} else {
|
265 |
-
return $url;
|
266 |
-
}
|
267 |
-
}
|
268 |
-
|
269 |
-
public function login_headertitle($url)
|
270 |
-
{
|
271 |
-
if ($op = $this->op('wfb_login_title')) {
|
272 |
-
return $op;
|
273 |
-
} else {
|
274 |
-
return $url;
|
275 |
-
}
|
276 |
-
}
|
277 |
-
|
278 |
-
public function wp_head()
|
279 |
-
{
|
280 |
-
if ($this->op("wfb_google_analytics")) {
|
281 |
-
if ($this->op("wfb_exclude_loggedin") && is_user_logged_in()) {
|
282 |
-
} else {
|
283 |
-
echo apply_filters( "wp_total_hacks_google_analytics", stripslashes( $this->op( "wfb_google_analytics" ) ) );
|
284 |
-
}
|
285 |
-
}
|
286 |
-
if ($this->op('wfb_favicon')) {
|
287 |
-
$link = '<link rel="Shortcut Icon" type="image/x-icon" href="%s" />'."\n";
|
288 |
-
printf($link, $this->remove_scheme(esc_url($this->op("wfb_favicon"))));
|
289 |
-
}
|
290 |
-
if ($this->op('wfb_apple_icon')) {
|
291 |
-
if ($this->op('wfb_apple_icon_precomposed')) {
|
292 |
-
$link = '<link rel="apple-touch-icon-precomposed" href="%s" />'."\n";
|
293 |
-
} else {
|
294 |
-
$link = '<link rel="apple-touch-icon" href="%s" />'."\n";
|
295 |
-
}
|
296 |
-
printf($link, $this->remove_scheme(esc_url($this->op("wfb_apple_icon"))));
|
297 |
-
}
|
298 |
-
echo $this->get_meta('google-site-verification', $this->op('wfb_google'));
|
299 |
-
echo $this->get_meta('msvalidate.01', $this->op('wfb_bing'));
|
300 |
-
|
301 |
-
if (is_user_logged_in() && $this->op("wfb_custom_logo")) {
|
302 |
-
$style = '<style type="text/css">';
|
303 |
-
$style .= '#wp-admin-bar-wp-logo > .ab-item .ab-icon{background-position: 0 0;}';
|
304 |
-
$style .= '#wpadminbar #wp-admin-bar-wp-logo > .ab-item .ab-icon:before {position: absolute; left: -1000%%;}';
|
305 |
-
$style .= '#wpadminbar > #wp-toolbar.quicklinks > #wp-admin-bar-root-default.ab-top-menu > #wp-admin-bar-wp-logo.menupop > .ab-item > .ab-icon {background-image: url(%s) !important; width: 16px; height: 16px; background-repeat: no-repeat; background-position: center center; background-size: auto; margin-top: 6px; left: 2px;}';
|
306 |
-
$style .= '</style>';
|
307 |
-
printf($style, $this->remove_scheme(esc_url($this->op("wfb_custom_logo"))));
|
308 |
-
}
|
309 |
-
}
|
310 |
-
|
311 |
-
public function admin_head()
|
312 |
-
{
|
313 |
-
if ($this->op('wfb_favicon') && $this->op('wfb_admin_favicon')) {
|
314 |
-
$link = '<link rel="Shortcut Icon" type="image/x-icon" href="%s" />'."\n";
|
315 |
-
printf($link, esc_url($this->op("wfb_favicon")));
|
316 |
-
}
|
317 |
-
if (!$this->op("wfb_custom_logo")) {
|
318 |
-
return;
|
319 |
-
}
|
320 |
-
$style = '<style type="text/css">';
|
321 |
-
$style .= '#wp-admin-bar-wp-logo > .ab-item .ab-icon{background-position: 0 0;}';
|
322 |
-
$style .= '#wpadminbar #wp-admin-bar-wp-logo > .ab-item .ab-icon:before {position: absolute; left: -1000%%;}';
|
323 |
-
$style .= '#wpadminbar > #wp-toolbar.quicklinks > #wp-admin-bar-root-default.ab-top-menu > #wp-admin-bar-wp-logo.menupop > .ab-item > .ab-icon {background-image: url(%s) !important; width: 16px; height: 16px; background-repeat: no-repeat; background-position: center center; background-size: auto; margin-top: 6px; left: 2px;}';
|
324 |
-
$style .= '</style>';
|
325 |
-
printf($style, $this->remove_scheme(esc_url($this->op("wfb_custom_logo"))));
|
326 |
-
}
|
327 |
-
|
328 |
-
private function get_meta($name, $content)
|
329 |
-
{
|
330 |
-
if ($name && $content) {
|
331 |
-
return sprintf(
|
332 |
-
'<meta name="%s" content="%s" />'."\n",
|
333 |
-
$name,
|
334 |
-
esc_attr($content)
|
335 |
-
);
|
336 |
-
}
|
337 |
-
}
|
338 |
-
|
339 |
-
public function admin_footer_text($text)
|
340 |
-
{
|
341 |
-
if ($str = $this->op('wfb_admin_footer_text')) {
|
342 |
-
return $str;
|
343 |
-
} else {
|
344 |
-
return $text;
|
345 |
-
}
|
346 |
-
}
|
347 |
-
|
348 |
-
public function login_head()
|
349 |
-
{
|
350 |
-
if ($this->op("wfb_login_logo")) {
|
351 |
-
printf(
|
352 |
-
'<style type="text/css">h1 a {background-image: url(%s) !important;}#login h1 a { width: auto !important; background-size: auto !important; }</style>',
|
353 |
-
$this->remove_scheme(esc_url($this->op('wfb_login_logo')))
|
354 |
-
);
|
355 |
-
}
|
356 |
-
}
|
357 |
-
|
358 |
-
public function admin_menu()
|
359 |
-
{
|
360 |
-
$metas = $this->op('wfb_postmetas');
|
361 |
-
if ($metas && is_array($metas)) {
|
362 |
-
foreach ($metas as $meta) {
|
363 |
-
remove_meta_box($meta, 'post', 'normal');
|
364 |
-
}
|
365 |
-
}
|
366 |
-
$metas = $this->op('wfb_pagemetas');
|
367 |
-
if ($metas && is_array($metas)) {
|
368 |
-
foreach ($metas as $meta) {
|
369 |
-
remove_meta_box($meta, 'page', 'normal');
|
370 |
-
}
|
371 |
-
}
|
372 |
-
if ($this->op('wfb_update_notification')) {
|
373 |
-
global $user_login;
|
374 |
-
get_currentuserinfo();
|
375 |
-
if (!current_user_can('update_plugins')) {
|
376 |
-
remove_action('admin_notices', 'update_nag', 3);
|
377 |
-
}
|
378 |
-
}
|
379 |
-
}
|
380 |
-
|
381 |
-
private function op($key, $default = false)
|
382 |
-
{
|
383 |
-
$op = get_option($key, $default);
|
384 |
-
if (is_array($op)) {
|
385 |
-
return $op;
|
386 |
-
} else {
|
387 |
-
return trim(stripslashes($op));
|
388 |
-
}
|
389 |
-
}
|
390 |
-
|
391 |
-
private function remove_scheme($url)
|
392 |
-
{
|
393 |
-
return preg_replace("/^http:/", "", $url);
|
394 |
-
}
|
395 |
|
396 |
}
|
397 |
|
4 |
Author: Takayuki Miyauchi
|
5 |
Plugin URI: https://github.com/miya0001/wp-total-hacks
|
6 |
Description: WP Total Hacks can customize your WordPress.
|
7 |
+
Version: 2.0.0
|
8 |
Author URI: http://wpist.me/
|
9 |
Domain Path: /languages
|
10 |
Text Domain: wp-total-hacks
|
15 |
|
16 |
class TotalHacks {
|
17 |
|
18 |
+
private $option_params = array(
|
19 |
+
'wfb_google_analytics' => 'text',
|
20 |
+
'wfb_favicon' => 'url',
|
21 |
+
'wfb_admin_favicon' => 'bool',
|
22 |
+
'wfb_apple_icon' => 'url',
|
23 |
+
'wfb_apple_icon_precomposed' => 'bool',
|
24 |
+
'wfb_hide_version' => 'bool',
|
25 |
+
'wfb_google' => 'text',
|
26 |
+
'wfb_bing' => 'text',
|
27 |
+
'wfb_hide_custom_fields' => 'bool',
|
28 |
+
'wfb_revision' => 'int',
|
29 |
+
'wfb_selfping' => 'bool',
|
30 |
+
'wfb_widget' => 'array',
|
31 |
+
'wfb_custom_logo' => 'url',
|
32 |
+
'wfb_admin_footer_text' => 'html',
|
33 |
+
'wfb_login_logo' => 'url',
|
34 |
+
'wfb_login_url' => 'url',
|
35 |
+
'wfb_login_title' => 'text',
|
36 |
+
'wfb_webmaster' => 'bool',
|
37 |
+
'wfb_remove_xmlrpc' => 'bool',
|
38 |
+
'wfb_exclude_loggedin' => 'bool',
|
39 |
+
'wfb_remove_more' => 'bool',
|
40 |
+
'wfb_pageexcerpt' => 'bool',
|
41 |
+
'wfb_postmetas' => 'array',
|
42 |
+
'wfb_pagemetas' => 'array',
|
43 |
+
'wfb_emailaddress' => 'email',
|
44 |
+
'wfb_sendername' => 'text',
|
45 |
+
'wfb_contact_methods' => 'array',
|
46 |
+
'wfb_remove_excerpt' => 'bool',
|
47 |
+
'wfb_update_notification' => 'bool',
|
48 |
+
'wfb_createpagefordraft' => 'bool',
|
49 |
+
'wfb_disallow_pingback' => 'bool',
|
50 |
+
'wfb_shortcode' => 'bool',
|
51 |
+
'wfb_oembed' => 'bool',
|
52 |
+
);
|
53 |
+
|
54 |
+
public function __construct()
|
55 |
+
{
|
56 |
+
if ( is_admin() ) {
|
57 |
+
require_once( dirname( __FILE__ ).'/includes/admin.php' );
|
58 |
+
new TotalHacksAdmin(
|
59 |
+
WP_PLUGIN_URL.'/'.dirname( plugin_basename( __FILE__ ) ),
|
60 |
+
$this->option_params
|
61 |
+
);
|
62 |
+
}
|
63 |
+
if ( strlen( $this->op( 'wfb_revision' ) ) ) {
|
64 |
+
if ( !defined( 'WP_POST_REVISIONS' ) ) {
|
65 |
+
define( 'WP_POST_REVISIONS', $this->op( 'wfb_revision' ) );
|
66 |
+
}
|
67 |
+
}
|
68 |
+
add_action( 'init', array( $this, 'init' ) );
|
69 |
+
add_action( 'plugins_loaded', array( $this, 'plugins_loaded' ) );
|
70 |
+
add_action( 'get_header', array( $this, 'get_header' ) );
|
71 |
+
add_action( 'wp_head', array( $this, 'wp_head' ) );
|
72 |
+
add_action( 'admin_head', array( $this, 'admin_head' ) );
|
73 |
+
add_filter( 'admin_footer_text', array( $this, 'admin_footer_text' ) );
|
74 |
+
add_action( 'login_head', array( $this, 'login_head' ) );
|
75 |
+
add_action( 'admin_menu' , array( $this, 'admin_menu' ) );
|
76 |
+
add_filter( 'login_headerurl', array( $this, 'login_headerurl' ) );
|
77 |
+
add_filter( 'login_headertitle', array( $this, 'login_headertitle' ) );
|
78 |
+
add_action( 'pre_ping', array( $this, 'pre_ping' ) );
|
79 |
+
add_action( 'wp_dashboard_setup',array( $this, 'wp_dashboard_setup' ) );
|
80 |
+
add_filter( 'the_content_more_link', array( $this, 'the_content_more_link' ) );
|
81 |
+
add_filter( 'wp_mail_from', array( $this, 'wp_mail_from' ) );
|
82 |
+
add_filter( 'wp_mail_from_name', array( $this, 'wp_mail_from_name' ) );
|
83 |
+
add_filter( 'user_contactmethods', array( $this, 'user_contactmethods' ) );
|
84 |
+
add_filter( 'excerpt_more', array( $this, 'excerpt_more' ) );
|
85 |
+
add_filter( 'page_attributes_dropdown_pages_args', array( $this, 'page_attributes_dropdown_pages_args' ) );
|
86 |
+
add_action( 'save_post', array( $this, 'save_post' ) );
|
87 |
+
}
|
88 |
+
|
89 |
+
public function save_post( $id )
|
90 |
+
{
|
91 |
+
if ( $this->op( 'wfb_createpagefordraft' ) ) {
|
92 |
+
$p = get_post( $id );
|
93 |
+
if ( $p->post_type === 'page' && $p->post_status !== 'trash' && isset( $p->post_parent ) ) {
|
94 |
+
$parent_id = $p->post_parent;
|
95 |
+
if ( $parent_id ) {
|
96 |
+
$parent = get_post( $parent_id );
|
97 |
+
$status = array( 'draft', 'pending', 'future' );
|
98 |
+
if ( isset( $parent->post_status ) && in_array( $parent->post_status, $status ) ) {
|
99 |
+
remove_action( 'save_post', array( $this, 'save_post' ) );
|
100 |
+
$args = array(
|
101 |
+
'ID' => $id,
|
102 |
+
'post_status' => $parent->post_status,
|
103 |
+
);
|
104 |
+
if ( $parent->post_status === 'future' ) {
|
105 |
+
$args['post_date'] = $parent->post_date;
|
106 |
+
$args['post_date_gmt'] = $parent->post_date_gmt;
|
107 |
+
}
|
108 |
+
wp_update_post( $args );
|
109 |
+
add_action( 'save_post', array( $this, 'save_post' ) );
|
110 |
+
}
|
111 |
+
}
|
112 |
+
}
|
113 |
+
}
|
114 |
+
}
|
115 |
+
|
116 |
+
public function page_attributes_dropdown_pages_args( $args )
|
117 |
+
{
|
118 |
+
if ( $this->op( 'wfb_createpagefordraft' ) ) {
|
119 |
+
$args['post_status'] = 'publish,private,draft,pending,future';
|
120 |
+
return $args;
|
121 |
+
}
|
122 |
+
return $args;
|
123 |
+
}
|
124 |
+
|
125 |
+
public function plugins_loaded()
|
126 |
+
{
|
127 |
+
load_plugin_textdomain(
|
128 |
+
"wp-total-hacks",
|
129 |
+
false,
|
130 |
+
dirname( plugin_basename( __FILE__ ) ).'/languages'
|
131 |
+
);
|
132 |
+
|
133 |
+
if ( $this->op( 'wfb_disallow_pingback' ) ) {
|
134 |
+
add_filter( 'xmlrpc_methods', array( $this, 'xmlrpc_methods' ) );
|
135 |
+
}
|
136 |
+
|
137 |
+
if ( $this->op( 'wfb_shortcode' ) ) {
|
138 |
+
add_filter( 'widget_text', 'do_shortcode' );
|
139 |
+
}
|
140 |
+
|
141 |
+
if ( $this->op( 'wfb_oembed' ) ) {
|
142 |
+
global $wp_embed;
|
143 |
+
add_filter( 'widget_text', array( $wp_embed, 'run_shortcode' ), 8 );
|
144 |
+
add_filter( 'widget_text', array( $wp_embed, 'autoembed' ), 8 );
|
145 |
+
}
|
146 |
+
}
|
147 |
+
|
148 |
+
public function xmlrpc_methods( $methods )
|
149 |
+
{
|
150 |
+
if ( $this->op( 'wfb_disallow_pingback' ) ) {
|
151 |
+
unset( $methods['pingback.ping'] );
|
152 |
+
}
|
153 |
+
return $methods;
|
154 |
+
}
|
155 |
+
|
156 |
+
public function excerpt_more( $str )
|
157 |
+
{
|
158 |
+
if ( $this->op( 'wfb_remove_excerpt' ) ) {
|
159 |
+
return null;
|
160 |
+
}
|
161 |
+
return $str;
|
162 |
+
}
|
163 |
+
|
164 |
+
public function user_contactmethods( $meth )
|
165 |
+
{
|
166 |
+
$del = $this->op( 'wfb_contact_methods' );
|
167 |
+
if ( $del && is_array( $del ) ) {
|
168 |
+
foreach ( $meth as $m => $s ) {
|
169 |
+
if ( in_array( $m, $del ) ) {
|
170 |
+
unset( $meth[$m] );
|
171 |
+
}
|
172 |
+
}
|
173 |
+
}
|
174 |
+
return $meth;
|
175 |
+
}
|
176 |
+
|
177 |
+
public function wp_mail_from( $str )
|
178 |
+
{
|
179 |
+
if ( $this->op( 'wfb_emailaddress' ) ) {
|
180 |
+
if ( preg_match( "/^wordpress@/i", $str ) ) {
|
181 |
+
return $this->op( 'wfb_emailaddress' );
|
182 |
+
}
|
183 |
+
}
|
184 |
+
return $str;
|
185 |
+
}
|
186 |
+
|
187 |
+
public function wp_mail_from_name( $str )
|
188 |
+
{
|
189 |
+
if ( $this->op( 'wfb_sendername' ) ) {
|
190 |
+
if ( preg_match( "/^wordpress/i", $str ) ) {
|
191 |
+
return $this->op( 'wfb_sendername' );
|
192 |
+
}
|
193 |
+
}
|
194 |
+
return $str;
|
195 |
+
}
|
196 |
+
|
197 |
+
public function init()
|
198 |
+
{
|
199 |
+
if ( $this->op( "wfb_pageexcerpt" ) ) {
|
200 |
+
add_post_type_support( 'page', 'excerpt' );
|
201 |
+
}
|
202 |
+
}
|
203 |
+
|
204 |
+
public function the_content_more_link( $str )
|
205 |
+
{
|
206 |
+
if ( $this->op( 'wfb_remove_more' ) ) {
|
207 |
+
$str = preg_replace( '/#more-[0-9]+/i', '', $str );
|
208 |
+
}
|
209 |
+
return $str;
|
210 |
+
}
|
211 |
+
|
212 |
+
public function get_header()
|
213 |
+
{
|
214 |
+
if ( $this->op( 'wfb_remove_xmlrpc' ) ) {
|
215 |
+
if ( !$this->op( "enable_app" ) && !$this->op( 'enable_xmlrpc' ) ) {
|
216 |
+
remove_action( 'wp_head', 'wlwmanifest_link' );
|
217 |
+
remove_action( 'wp_head', 'rsd_link' );
|
218 |
+
}
|
219 |
+
}
|
220 |
+
if ( $this->op( 'wfb_hide_version' ) ) {
|
221 |
+
remove_action( 'wp_head', 'wp_generator' );
|
222 |
+
}
|
223 |
+
}
|
224 |
+
|
225 |
+
public function wp_dashboard_setup()
|
226 |
+
{
|
227 |
+
if ( $w = $this->op( 'wfb_widget' ) ) {
|
228 |
+
global $wp_meta_boxes;
|
229 |
+
foreach ( $wp_meta_boxes['dashboard'] as $position => $prio_boxes ) {
|
230 |
+
foreach ( $prio_boxes as $priority => $boxes ) {
|
231 |
+
foreach ( $boxes as $key => $array ) {
|
232 |
+
if ( in_array( $key, $w ) ) {
|
233 |
+
unset( $wp_meta_boxes['dashboard'][$position][$priority][$key] );
|
234 |
+
}
|
235 |
+
}
|
236 |
+
}
|
237 |
+
}
|
238 |
+
}
|
239 |
+
}
|
240 |
+
|
241 |
+
public function pre_ping( &$links )
|
242 |
+
{
|
243 |
+
if ( !$this->op( 'wfb_selfping' ) ) {
|
244 |
+
return;
|
245 |
+
}
|
246 |
+
$home = $this->op( 'home' );
|
247 |
+
foreach ( $links as $l => $link ) {
|
248 |
+
if ( 0 === strpos( $link, $home ) ) {
|
249 |
+
unset( $links[$l] );
|
250 |
+
}
|
251 |
+
}
|
252 |
+
}
|
253 |
+
|
254 |
+
public function login_headerurl( $url )
|
255 |
+
{
|
256 |
+
if ( $op = $this->op( 'wfb_login_url' ) ) {
|
257 |
+
return $op;
|
258 |
+
} else {
|
259 |
+
return $url;
|
260 |
+
}
|
261 |
+
}
|
262 |
+
|
263 |
+
public function login_headertitle( $url )
|
264 |
+
{
|
265 |
+
if ( $op = $this->op( 'wfb_login_title' ) ) {
|
266 |
+
return $op;
|
267 |
+
} else {
|
268 |
+
return $url;
|
269 |
+
}
|
270 |
+
}
|
271 |
+
|
272 |
+
public function wp_head()
|
273 |
+
{
|
274 |
+
if ( $this->op( "wfb_google_analytics" ) ) {
|
275 |
+
if ( $this->op( "wfb_exclude_loggedin" ) && is_user_logged_in() ) {
|
276 |
+
} else {
|
277 |
+
echo apply_filters( "wp_total_hacks_google_analytics", stripslashes( $this->op( "wfb_google_analytics" ) ) );
|
278 |
+
}
|
279 |
+
}
|
280 |
+
if ( ! function_exists( 'has_site_icon' ) || ( function_exists( 'has_site_icon' ) && ! has_site_icon() ) ) {
|
281 |
+
if ( $this->op( 'wfb_favicon' ) ) {
|
282 |
+
$link = '<link rel="Shortcut Icon" type="image/x-icon" href="%s" />'."\n";
|
283 |
+
printf( $link, $this->remove_scheme( esc_url( $this->op( "wfb_favicon" ) ) ) );
|
284 |
+
}
|
285 |
+
if ( $this->op( 'wfb_apple_icon' ) ) {
|
286 |
+
if ( $this->op( 'wfb_apple_icon_precomposed' ) ) {
|
287 |
+
$link = '<link rel="apple-touch-icon-precomposed" href="%s" />'."\n";
|
288 |
+
} else {
|
289 |
+
$link = '<link rel="apple-touch-icon" href="%s" />'."\n";
|
290 |
+
}
|
291 |
+
printf( $link, $this->remove_scheme( esc_url( $this->op( "wfb_apple_icon" ) ) ) );
|
292 |
+
}
|
293 |
}
|
294 |
+
echo $this->get_meta( 'google-site-verification', $this->op( 'wfb_google' ) );
|
295 |
+
echo $this->get_meta( 'msvalidate.01', $this->op( 'wfb_bing' ) );
|
296 |
+
|
297 |
+
if ( is_user_logged_in() && $this->op( "wfb_custom_logo" ) ) {
|
298 |
+
$style = '<style type="text/css">';
|
299 |
+
$style .= '#wp-admin-bar-wp-logo > .ab-item .ab-icon{background-position: 0 0;}';
|
300 |
+
$style .= '#wpadminbar #wp-admin-bar-wp-logo > .ab-item .ab-icon:before {position: absolute; left: -1000%%;}';
|
301 |
+
$style .= '#wpadminbar > #wp-toolbar.quicklinks > #wp-admin-bar-root-default.ab-top-menu > #wp-admin-bar-wp-logo.menupop > .ab-item > .ab-icon {background-image: url( %s ) !important; width: 16px; height: 16px; background-repeat: no-repeat; background-position: center center; background-size: auto; margin-top: 6px; left: 2px;}';
|
302 |
+
$style .= '</style>';
|
303 |
+
printf( $style, $this->remove_scheme( esc_url( $this->op( "wfb_custom_logo" ) ) ) );
|
304 |
+
}
|
305 |
+
}
|
306 |
+
|
307 |
+
public function admin_head()
|
308 |
+
{
|
309 |
+
if ( $this->op( 'wfb_favicon' ) && $this->op( 'wfb_admin_favicon' ) ) {
|
310 |
+
$link = '<link rel="Shortcut Icon" type="image/x-icon" href="%s" />'."\n";
|
311 |
+
printf( $link, esc_url( $this->op( "wfb_favicon" ) ) );
|
312 |
+
}
|
313 |
+
if ( !$this->op( "wfb_custom_logo" ) ) {
|
314 |
+
return;
|
315 |
+
}
|
316 |
+
$style = '<style type="text/css">';
|
317 |
+
$style .= '#wp-admin-bar-wp-logo > .ab-item .ab-icon{background-position: 0 0;}';
|
318 |
+
$style .= '#wpadminbar #wp-admin-bar-wp-logo > .ab-item .ab-icon:before {position: absolute; left: -1000%%;}';
|
319 |
+
$style .= '#wpadminbar > #wp-toolbar.quicklinks > #wp-admin-bar-root-default.ab-top-menu > #wp-admin-bar-wp-logo.menupop > .ab-item > .ab-icon {background-image: url( %s ) !important; width: 16px; height: 16px; background-repeat: no-repeat; background-position: center center; background-size: auto; margin-top: 6px; left: 2px;}';
|
320 |
+
$style .= '</style>';
|
321 |
+
printf( $style, $this->remove_scheme( esc_url( $this->op( "wfb_custom_logo" ) ) ) );
|
322 |
+
}
|
323 |
+
|
324 |
+
private function get_meta( $name, $content )
|
325 |
+
{
|
326 |
+
if ( $name && $content ) {
|
327 |
+
return sprintf(
|
328 |
+
'<meta name="%s" content="%s" />'."\n",
|
329 |
+
$name,
|
330 |
+
esc_attr( $content )
|
331 |
+
);
|
332 |
+
}
|
333 |
+
}
|
334 |
+
|
335 |
+
public function admin_footer_text( $text )
|
336 |
+
{
|
337 |
+
if ( $str = $this->op( 'wfb_admin_footer_text' ) ) {
|
338 |
+
return $str;
|
339 |
+
} else {
|
340 |
+
return $text;
|
341 |
+
}
|
342 |
+
}
|
343 |
+
|
344 |
+
public function login_head()
|
345 |
+
{
|
346 |
+
if ( $this->op( "wfb_login_logo" ) ) {
|
347 |
+
printf(
|
348 |
+
'<style type="text/css">h1 a {background-image: url( %s ) !important;}#login h1 a { width: auto !important; background-size: auto !important; }</style>',
|
349 |
+
$this->remove_scheme( esc_url( $this->op( 'wfb_login_logo' ) ) )
|
350 |
+
);
|
351 |
+
}
|
352 |
+
}
|
353 |
+
|
354 |
+
public function admin_menu()
|
355 |
+
{
|
356 |
+
$metas = $this->op( 'wfb_postmetas' );
|
357 |
+
if ( $metas && is_array( $metas ) ) {
|
358 |
+
foreach ( $metas as $meta ) {
|
359 |
+
remove_meta_box( $meta, 'post', 'normal' );
|
360 |
+
}
|
361 |
+
}
|
362 |
+
$metas = $this->op( 'wfb_pagemetas' );
|
363 |
+
if ( $metas && is_array( $metas ) ) {
|
364 |
+
foreach ( $metas as $meta ) {
|
365 |
+
remove_meta_box( $meta, 'page', 'normal' );
|
366 |
+
}
|
367 |
+
}
|
368 |
+
if ( $this->op( 'wfb_update_notification' ) ) {
|
369 |
+
global $user_login;
|
370 |
+
get_currentuserinfo();
|
371 |
+
if ( !current_user_can( 'update_plugins' ) ) {
|
372 |
+
remove_action( 'admin_notices', 'update_nag', 3 );
|
373 |
+
}
|
374 |
+
}
|
375 |
+
}
|
376 |
+
|
377 |
+
private function op( $key, $default = false )
|
378 |
+
{
|
379 |
+
$op = get_option( $key, $default );
|
380 |
+
if ( is_array( $op ) ) {
|
381 |
+
return $op;
|
382 |
+
} else {
|
383 |
+
return trim( stripslashes( $op ) );
|
384 |
+
}
|
385 |
+
}
|
386 |
+
|
387 |
+
private function remove_scheme( $url )
|
388 |
+
{
|
389 |
+
return preg_replace( "/^http:/", "", $url );
|
390 |
+
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
391 |
|
392 |
}
|
393 |
|