Simple History - Version 1.3.5

Version Description

  • Added a reload-button at top. Click it to reload the history. No need to refresh page no more!
  • Fixed items being reloaded when just clicking the dropdown (not having selected anything yet)
  • Fixed bug with keyboard navigation
  • Added Portuguese translation by X6Web
  • Use less SQL queries
Download this release

Release Info

Developer eskapism
Plugin Icon 128x128 Simple History
Version 1.3.5
Comparing to
See all releases

Code changes from version 1.3.4 to 1.3.5

bin/install-wp-tests.sh ADDED
@@ -0,0 +1,32 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ #!/usr/bin/env bash
2
+
3
+ if [ $# -lt 3 ]; then
4
+ echo "usage: $0 <db-name> <db-user> <db-pass> [wp-version]"
5
+ exit 1
6
+ fi
7
+
8
+ DB_NAME=$1
9
+ DB_USER=$2
10
+ DB_PASS=$3
11
+ WP_VERSION=${4-master}
12
+
13
+ set -ex
14
+
15
+ # set up a WP install
16
+ WP_CORE_DIR=/tmp/wordpress/
17
+ mkdir -p $WP_CORE_DIR
18
+ wget -nv -O /tmp/wordpress.tar.gz https://github.com/WordPress/WordPress/tarball/$WP_VERSION
19
+ tar --strip-components=1 -zxmf /tmp/wordpress.tar.gz -C $WP_CORE_DIR
20
+
21
+ # set up testing suite
22
+ svn co --ignore-externals --quiet http://unit-tests.svn.wordpress.org/trunk/ $WP_TESTS_DIR
23
+
24
+ cd $WP_TESTS_DIR
25
+ cp wp-tests-config-sample.php wp-tests-config.php
26
+ sed -i "s:dirname( __FILE__ ) . '/wordpress/':'$WP_CORE_DIR':" wp-tests-config.php
27
+ sed -i "s/yourdbnamehere/$DB_NAME/" wp-tests-config.php
28
+ sed -i "s/yourusernamehere/$DB_USER/" wp-tests-config.php
29
+ sed -i "s/yourpasswordhere/$DB_PASS/" wp-tests-config.php
30
+
31
+ # create database
32
+ mysqladmin create $DB_NAME --user="$DB_USER" --password="$DB_PASS"
index.php CHANGED
@@ -3,7 +3,7 @@
3
  Plugin Name: Simple History
4
  Plugin URI: http://eskapism.se/code-playground/simple-history/
5
  Description: Get a log/history/audit log/version history of the changes made by users in WordPress.
6
- Version: 1.3.4
7
  Author: Pär Thernström
8
  Author URI: http://eskapism.se/
9
  License: GPL2
@@ -27,7 +27,7 @@ License: GPL2
27
 
28
  load_plugin_textdomain('simple-history', false, "/simple-history/languages");
29
 
30
- define( "SIMPLE_HISTORY_VERSION", "1.3.4");
31
  define( "SIMPLE_HISTORY_NAME", "Simple History");
32
 
33
  // Find the plugin directory URL
@@ -264,6 +264,33 @@ define("SIMPLE_HISTORY_URL", $plugin_dir_url);
264
  update_option("simple_history_db_version", 2);
265
 
266
  }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
267
 
268
  }
269
 
@@ -1004,13 +1031,13 @@ function simple_history_add($args) {
1004
 
1005
  $args = wp_parse_args( $args, $defaults );
1006
 
1007
- $action = mysql_real_escape_string($args["action"]);
1008
- $object_type = mysql_real_escape_string($args["object_type"]);
1009
- $object_subtype = mysql_real_escape_string($args["object_subtype"]);
1010
- $object_id = mysql_real_escape_string($args["object_id"]);
1011
- $object_name = mysql_real_escape_string($args["object_name"]);
1012
  $user_id = $args["user_id"];
1013
- $description = mysql_real_escape_string($args["description"]);
1014
 
1015
  global $wpdb;
1016
  $tableprefix = $wpdb->prefix;
@@ -1188,6 +1215,10 @@ function simple_history_print_nav() {
1188
  $css = "class='selected'";
1189
  }
1190
 
 
 
 
 
1191
  // Begin select
1192
  $str_types_select = "";
1193
  $str_types_select .= "<select name='' class='simple-history-filter simple-history-filter-type'>";
@@ -1482,10 +1513,10 @@ function simple_history_get_items_array($args = "") {
1482
  $filter_type = $simple_history_type_to_show;
1483
  }
1484
  if ($filter_type) {
1485
- $where .= " AND lower(object_type) = '" . $wpdb->escape(strtolower($filter_type)) . "' ";
1486
  }
1487
  if ($filter_subtype) {
1488
- $where .= " AND lower(object_subtype) = '" . $wpdb->escape(strtolower($filter_subtype)) . "' ";
1489
  }
1490
  }
1491
  if ($simple_history_user_to_show) {
3
  Plugin Name: Simple History
4
  Plugin URI: http://eskapism.se/code-playground/simple-history/
5
  Description: Get a log/history/audit log/version history of the changes made by users in WordPress.
6
+ Version: 1.3.5
7
  Author: Pär Thernström
8
  Author URI: http://eskapism.se/
9
  License: GPL2
27
 
28
  load_plugin_textdomain('simple-history', false, "/simple-history/languages");
29
 
30
+ define( "SIMPLE_HISTORY_VERSION", "1.3.5");
31
  define( "SIMPLE_HISTORY_NAME", "Simple History");
32
 
33
  // Find the plugin directory URL
264
  update_option("simple_history_db_version", 2);
265
 
266
  }
267
+
268
+ // Check that all options we use are set to their defaults, if they miss value
269
+ // Each option that is missing a value will make a sql cal otherwise = unnecessary
270
+ $arr_options = array(
271
+ array(
272
+ "name" => "sh_extender_modules",
273
+ "default_value" => ""
274
+ ),
275
+ array(
276
+ "name" => "simple_history_show_as_page",
277
+ "default_value" => 1
278
+ ),
279
+ array(
280
+ "name" => "simple_history_show_on_dashboard",
281
+ "default_value" => 0
282
+ )
283
+ );
284
+
285
+ foreach ($arr_options as $one_option) {
286
+
287
+ if ( false === ($option_value = get_option( $one_option["name"] ) ) ) {
288
+
289
+ // Value is not set in db, so set it to a default
290
+ update_option( $one_option["name"], $one_option["default_value"] );
291
+
292
+ }
293
+ }
294
 
295
  }
296
 
1031
 
1032
  $args = wp_parse_args( $args, $defaults );
1033
 
1034
+ $action = esc_sql($args["action"]);
1035
+ $object_type = esc_sql($args["object_type"]);
1036
+ $object_subtype = esc_sql($args["object_subtype"]);
1037
+ $object_id = esc_sql($args["object_id"]);
1038
+ $object_name = esc_sql($args["object_name"]);
1039
  $user_id = $args["user_id"];
1040
+ $description = esc_sql($args["description"]);
1041
 
1042
  global $wpdb;
1043
  $tableprefix = $wpdb->prefix;
1215
  $css = "class='selected'";
1216
  }
1217
 
1218
+ // Reload-button
1219
+ $str_reload_button = sprintf('<a class="simple-fields-reload" title="%1$s" href="#"><span>Reload</span></a>', esc_attr__("Reload history", "simple-history"));
1220
+ echo $str_reload_button;
1221
+
1222
  // Begin select
1223
  $str_types_select = "";
1224
  $str_types_select .= "<select name='' class='simple-history-filter simple-history-filter-type'>";
1513
  $filter_type = $simple_history_type_to_show;
1514
  }
1515
  if ($filter_type) {
1516
+ $where .= " AND lower(object_type) = '" . esc_sql(strtolower($filter_type)) . "' ";
1517
  }
1518
  if ($filter_subtype) {
1519
+ $where .= " AND lower(object_subtype) = '" . esc_sql(strtolower($filter_subtype)) . "' ";
1520
  }
1521
  }
1522
  if ($simple_history_user_to_show) {
languages/simple-history-pt_BR.mo ADDED
Binary file
languages/simple-history-pt_BR.pot ADDED
@@ -0,0 +1,704 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ # Copyright (C) 2013
2
+ # This file is distributed under the same license as the package.
3
+ msgid ""
4
+ msgstr ""
5
+ "Project-Id-Version: Tradução\n"
6
+ "Report-Msgid-Bugs-To: http://wordpress.org/tag/simple-history\n"
7
+ "POT-Creation-Date: 2013-05-22 13:16:18+00:00\n"
8
+ "MIME-Version: 1.0\n"
9
+ "Content-Type: text/plain; charset=UTF-8\n"
10
+ "Content-Transfer-Encoding: 8bit\n"
11
+ "PO-Revision-Date: 2013-12-12 09:40-0300\n"
12
+ "Last-Translator: Tiago <webtiagodias@gmail.com>\n"
13
+ "Language-Team: X6Web <suporte@x6web.com>\n"
14
+ "X-Generator: Poedit 1.5.7\n"
15
+ "Language: Português\n"
16
+
17
+ #: index.php:88 index.php:105
18
+ msgid "added"
19
+ msgstr "adicionado"
20
+
21
+ #: index.php:89
22
+ msgid "approved"
23
+ msgstr "aprovado"
24
+
25
+ #: index.php:90
26
+ msgid "unapproved"
27
+ msgstr "não aprovado"
28
+
29
+ #: index.php:91 simple-history-extender/class.simple-history-extend.php:92
30
+ msgid "marked as spam"
31
+ msgstr "marcado como spam"
32
+
33
+ #: index.php:92 simple-history-extender/class.simple-history-extend.php:94
34
+ msgid "trashed"
35
+ msgstr "lixeira"
36
+
37
+ #: index.php:93 simple-history-extender/class.simple-history-extend.php:95
38
+ msgid "untrashed"
39
+ msgstr "remover da lixeira"
40
+
41
+ #: index.php:94 simple-history-extender/class.simple-history-extend.php:89
42
+ msgid "created"
43
+ msgstr "criado"
44
+
45
+ #: index.php:95 simple-history-extender/class.simple-history-extend.php:91
46
+ msgid "deleted"
47
+ msgstr "excluída"
48
+
49
+ #: index.php:96 simple-history-extender/class.simple-history-extend.php:239
50
+ msgid "updated"
51
+ msgstr "atualizado"
52
+
53
+ #: index.php:97
54
+ msgid "nav_menu_item"
55
+ msgstr "nav_menu_item"
56
+
57
+ #: index.php:98 index.php:1770
58
+ msgid "attachment"
59
+ msgstr "acessório"
60
+
61
+ #: index.php:99 index.php:1851
62
+ msgid "user"
63
+ msgstr "Usuário"
64
+
65
+ #: index.php:100
66
+ msgid "settings page"
67
+ msgstr "página de configurações"
68
+
69
+ #: index.php:101 simple-history-extender/class.simple-history-extend.php:90
70
+ msgid "edited"
71
+ msgstr "editado"
72
+
73
+ #: index.php:102
74
+ msgid "comment"
75
+ msgstr "comentário"
76
+
77
+ #: index.php:103
78
+ msgid "logged in"
79
+ msgstr "logado"
80
+
81
+ #: index.php:104
82
+ msgid "logged out"
83
+ msgstr "desconectou"
84
+
85
+ #: index.php:106
86
+ msgid "modified"
87
+ msgstr "modificado"
88
+
89
+ #: index.php:107
90
+ msgid "upgraded it\\'s database"
91
+ msgstr "atualizou seu banco de dados"
92
+
93
+ #: index.php:108
94
+ msgid "plugin"
95
+ msgstr "plugin"
96
+
97
+ #: index.php:121 index.php:283 index.php:1078
98
+ msgid "History"
99
+ msgstr "Histórico"
100
+
101
+ #: index.php:181
102
+ msgid "WordPress %1$s"
103
+ msgstr "WordPress %1$s"
104
+
105
+ #: index.php:194 index.php:299
106
+ msgid "Donate"
107
+ msgstr "Doar"
108
+
109
+ #: index.php:269 index.php:290
110
+ msgid "Simple History Settings"
111
+ msgstr "Configurações Simple History"
112
+
113
+ #: index.php:295
114
+ msgid "Show Simple History"
115
+ msgstr "Exibir Simple History"
116
+
117
+ #: index.php:296
118
+ msgid "Number of items per page"
119
+ msgstr "Número de itens por página"
120
+
121
+ #: index.php:297 index.php:2024
122
+ msgid "RSS feed"
123
+ msgstr "RSS feed"
124
+
125
+ #: index.php:298
126
+ msgid "Clear log"
127
+ msgstr "Limpar Log"
128
+
129
+ #: index.php:315
130
+ msgid "failed to log in because they entered the wrong password"
131
+ msgstr "não conseguiu entrar porque digitou a senha errada"
132
+
133
+ #: index.php:391 index.php:450
134
+ msgid "History for %s"
135
+ msgstr "Histórico para %s"
136
+
137
+ #: index.php:392 index.php:451
138
+ msgid "WordPress History for %s"
139
+ msgstr "WordPress Histórico para %s"
140
+
141
+ #: index.php:415
142
+ msgid "By %s"
143
+ msgstr "por %s"
144
+
145
+ #: index.php:419
146
+ msgid "%d occasions"
147
+ msgstr "%d ocasiões"
148
+
149
+ #: index.php:454
150
+ msgid "Wrong RSS secret"
151
+ msgstr "Errado RSS segredo"
152
+
153
+ #: index.php:455
154
+ msgid "Your RSS secret for Simple History RSS feed is wrong. Please see WordPress settings for current link to the RSS feed."
155
+ msgstr "Seu segredo para alimentação RSS RSS História Simples é errado. Por favor, veja as configurações do WordPress para o link atual para o feed RSS."
156
+
157
+ #: index.php:534 index.php:1448
158
+ msgid "One item"
159
+ msgid_plural "%1$d items"
160
+ msgstr[0] "Um item"
161
+
162
+ #: index.php:597
163
+ msgid "on the dashboard"
164
+ msgstr "no painel de instrumentos"
165
+
166
+ #: index.php:602
167
+ msgid "as a page under the dashboard menu"
168
+ msgstr "como uma página no menu do painel"
169
+
170
+ #: index.php:617
171
+ msgid "Cleared database"
172
+ msgstr "Banco de Dados Limpado"
173
+
174
+ #: index.php:625
175
+ msgid "Items in the database are automatically removed after 60 days."
176
+ msgstr "Os itens no banco de dados são automaticamente removidos após 60 dias."
177
+
178
+ #: index.php:627
179
+ msgid "Clear it now."
180
+ msgstr "Limpe-o agora."
181
+
182
+ #: index.php:641
183
+ msgid ""
184
+ "\n"
185
+ "\t\t\tPlease\n"
186
+ "\t\t\t<a href=\"http://eskapism.se/sida/donate/?utm_source=wordpress&utm_medium=settingpage&utm_campaign=simplehistory\">\n"
187
+ "\t\t\tdonate\n"
188
+ "\t\t\t</a> to support the development of this plugin and to keep it free.\n"
189
+ "\t\t\tThanks!\n"
190
+ "\t\t\t"
191
+ msgstr ""
192
+ "\n"
193
+ "\t\t\Por Favor\n"
194
+ "\t\t\t<a href=\"http://eskapism.se/sida/donate/?utm_source=wordpress&utm_medium=settingpage&utm_campaign=simplehistory\">\n"
195
+ "\t\t\tdoar\n"
196
+ "\t\t\t</a> para apoiar o desenvolvimento deste plugin e para mantê-lo livre.\n"
197
+ "\t\t\Obrigado!\n"
198
+ "\t\t\t"
199
+
200
+ #: index.php:675
201
+ msgid "Created new secret RSS address"
202
+ msgstr "Criado novo endereço RSS segredo"
203
+
204
+ #: index.php:686
205
+ msgid "This is a secret RSS feed for Simple History. Only share the link with people you trust"
206
+ msgstr "Este é um feed RSS segredo para a Simple History. Só compartilhar o link com as pessoas que você confia"
207
+
208
+ #: index.php:689
209
+ msgid "You can <a href='%s'>generate a new address</a> for the RSS feed. This is useful if you think that the address has fallen into the wrong hands."
210
+ msgstr "Você pode <a href='%s'> gerar um novo endereço </ a> para o feed RSS. Isto é útil se você acha que o endereço tenha caído em mãos erradas."
211
+
212
+ #: index.php:740 index.php:756 index.php:788
213
+ msgid "From %1$s on %2$s"
214
+ msgstr "De %1$s em %2$s"
215
+
216
+ #: index.php:1195
217
+ msgid "All types"
218
+ msgstr "Todos os tipos"
219
+
220
+ #: index.php:1356 index.php:1360
221
+ msgid "By all users"
222
+ msgstr "Por todos os usuários"
223
+
224
+ #: index.php:1414
225
+ msgid "Search"
226
+ msgstr "Pesquisa"
227
+
228
+ #: index.php:1452
229
+ msgid "Go to the first page"
230
+ msgstr "Ir para a primeira página"
231
+
232
+ #: index.php:1453
233
+ msgid "Go to the previous page"
234
+ msgstr "Vá para a página anterior"
235
+
236
+ #: index.php:1454
237
+ msgid "Current page"
238
+ msgstr "Página atual"
239
+
240
+ #: index.php:1455
241
+ msgid "of"
242
+ msgstr "de"
243
+
244
+ #: index.php:1456
245
+ msgid "Go to the next page"
246
+ msgstr "Ir para a próxima página"
247
+
248
+ #: index.php:1457
249
+ msgid "Go to the last page"
250
+ msgstr "Ir para a última página"
251
+
252
+ #: index.php:1724
253
+ msgid "Unknown or deleted user"
254
+ msgstr "Usuário desconhecido ou excluído"
255
+
256
+ #: index.php:1819
257
+ msgid "File name:"
258
+ msgstr "O nome do arquivo:"
259
+
260
+ #: index.php:1820
261
+ msgid "File size:"
262
+ msgstr "O tamanho do arquivo:"
263
+
264
+ #: index.php:1822
265
+ msgid "Dimensions:"
266
+ msgstr "Dimensões:"
267
+
268
+ #: index.php:1823
269
+ msgid "Length:"
270
+ msgstr "Comprimento:"
271
+
272
+ #: index.php:1894 simple-history-extender/simple-history-extender.php:274
273
+ msgid "activated"
274
+ msgstr "ativado"
275
+
276
+ #: index.php:1897 simple-history-extender/simple-history-extender.php:274
277
+ msgid "deactivated"
278
+ msgstr "desativado"
279
+
280
+ #: index.php:1900
281
+ msgid "enabled"
282
+ msgstr "ativado"
283
+
284
+ #: index.php:1903
285
+ msgid "disabled"
286
+ msgstr "desabilitado"
287
+
288
+ #: index.php:1919
289
+ msgid "<span class=\"when\">%1$s ago</span> by %2$s"
290
+ msgstr "<span class=\"when\">%1$s atrás</span> by %2$s"
291
+
292
+ #: index.php:1921
293
+ msgid "%s at %s"
294
+ msgstr "%s em %s"
295
+
296
+ #: index.php:1933 index.php:1981
297
+ msgid "Details"
298
+ msgstr "Detalhes"
299
+
300
+ #: index.php:1957
301
+ msgid "+ 1 occasion"
302
+ msgstr "+ 1 vez"
303
+
304
+ #: index.php:1960
305
+ msgid "+ %d occasions"
306
+ msgstr "+ %d ocasiões"
307
+
308
+ #: index.php:1974
309
+ msgid "%s ago (%s at %s)"
310
+ msgstr "%s atrás (%s em %s)"
311
+
312
+ #: index.php:2017
313
+ msgid "Show 5 more"
314
+ msgstr "Mostrar mais 5"
315
+
316
+ #: index.php:2018
317
+ msgid "Show 15 more"
318
+ msgstr "Mostrar mais 15"
319
+
320
+ #: index.php:2019
321
+ msgid "Show 50 more"
322
+ msgstr "Mostrar mais 50"
323
+
324
+ #: index.php:2020
325
+ msgid "Show 100 more"
326
+ msgstr "Mostrar mais 100"
327
+
328
+ #: index.php:2023
329
+ msgid "No matching items found."
330
+ msgstr "Não há itens correspondentes encontrado."
331
+
332
+ #: index.php:2026
333
+ msgid "Show"
334
+ msgstr "Exibir"
335
+
336
+ #: index.php:2032
337
+ msgid "Loading..."
338
+ msgstr "Carregando..."
339
+
340
+ #: index.php:2051
341
+ msgid "No history items found."
342
+ msgstr "Nenhum item de história encontrados."
343
+
344
+ #: index.php:2052
345
+ msgid "Please note that Simple History only records things that happen after this plugin have been installed."
346
+ msgstr "Por favor, note que a história simples só grava coisas que acontecem depois de este plugin foram instalados."
347
+
348
+ #: index.php:2065
349
+ msgid "General Settings"
350
+ msgstr "Configurações Gerais"
351
+
352
+ #: index.php:2066
353
+ msgid "Writing Settings"
354
+ msgstr "Configurações de Escrita"
355
+
356
+ #: index.php:2067
357
+ msgid "Reading Settings"
358
+ msgstr "Configurações de Leitura"
359
+
360
+ #: index.php:2068
361
+ msgid "Discussion Settings"
362
+ msgstr "Configurações de Discussão"
363
+
364
+ #: index.php:2069
365
+ msgid "Media Settings"
366
+ msgstr "Configurações de Mídia"
367
+
368
+ #: index.php:2070
369
+ msgid "Privacy Settings"
370
+ msgstr "Configurações de privacidade"
371
+
372
+ #: index.php:2086
373
+ msgid "Permalink Settings"
374
+ msgstr "Configurações de Link permanente"
375
+
376
+ #: simple-history-extender/class.simple-history-extend.php:68
377
+ msgid "Log events for the %s plugin."
378
+ msgstr "Log de ​​eventos para o plugin %s."
379
+
380
+ #: simple-history-extender/class.simple-history-extend.php:69
381
+ msgid "Log events for %s."
382
+ msgstr "Logs de Eventos para %s."
383
+
384
+ #: simple-history-extender/class.simple-history-extend.php:93
385
+ msgid "unmarked as spam"
386
+ msgstr "não marcado como spam"
387
+
388
+ #: simple-history-extender/class.simple-history-extend.php:96
389
+ msgid "submitted"
390
+ msgstr "submetidas"
391
+
392
+ #: simple-history-extender/class.simple-history-extend.php:150
393
+ msgid "The %s module logs the following events:"
394
+ msgstr "O módulo %s registra os seguintes eventos:"
395
+
396
+ #: simple-history-extender/class.simple-history-extend.php:165
397
+ msgid "The %s module does not support the following events:"
398
+ msgstr "O módulo %s não suporta os seguintes eventos:"
399
+
400
+ #: simple-history-extender/class.simple-history-extend.php:263
401
+ msgid "User"
402
+ msgstr "Usuario"
403
+
404
+ #: simple-history-extender/modules/bbpress.php:28
405
+ msgid "BBPress"
406
+ msgstr "BBPress"
407
+
408
+ #: simple-history-extender/modules/bbpress.php:32
409
+ msgid "Creating, editing and deleting a forum, topic, reply."
410
+ msgstr "A criação, edição e exclusão de um fórum, o tópico, respondeu."
411
+
412
+ #: simple-history-extender/modules/bbpress.php:33
413
+ msgid "Setting the type of a forum to category or forum."
414
+ msgstr "Definir o tipo de um fórum para a categoria ou fórum."
415
+
416
+ #: simple-history-extender/modules/bbpress.php:34
417
+ msgid "Setting the status of a forum, topic to open or closed."
418
+ msgstr "A definição do status de um fórum, o tópico para abrir ou fechar."
419
+
420
+ #: simple-history-extender/modules/bbpress.php:35
421
+ msgid "Setting the forum visibility to public, private or hidden."
422
+ msgstr "Definir a visibilidade fórum para público, privado ou oculto."
423
+
424
+ #: simple-history-extender/modules/bbpress.php:36
425
+ msgid "Trashing and untrashing a forum, topic, reply."
426
+ msgstr "Trashing e não estragar um fórum, o tópico, a resposta."
427
+
428
+ #: simple-history-extender/modules/bbpress.php:37
429
+ msgid "Marking and unmarking a topic, reply as spam."
430
+ msgstr "Marcação e desmarcar um tópico, responder como spam."
431
+
432
+ #: simple-history-extender/modules/bbpress.php:38
433
+ msgid "Marking and unmarking a topic as sticky."
434
+ msgstr "Marcação e desmarcar um tópico tão pegajoso."
435
+
436
+ #: simple-history-extender/modules/bbpress.php:39
437
+ msgid "Merging and splitting a topic."
438
+ msgstr "Mesclando e dividindo um tópico."
439
+
440
+ #: simple-history-extender/modules/bbpress.php:40
441
+ msgid "Updating, merging and deleting a topic tag."
442
+ msgstr "Atualizando, fusão e exclusão de uma tag tópico."
443
+
444
+ #: simple-history-extender/modules/bbpress.php:41
445
+ msgid "A user (un)favoriting and (un)subscribing to a topic."
446
+ msgstr "Um usuario em farito e desassociação de um tópico."
447
+
448
+ #: simple-history-extender/modules/bbpress.php:42
449
+ msgid "A user saving his/her profile."
450
+ msgstr "Um usuário salvar sua / seu perfil."
451
+
452
+ #: simple-history-extender/modules/bbpress.php:53
453
+ msgid "closed"
454
+ msgstr "fechado"
455
+
456
+ #: simple-history-extender/modules/bbpress.php:54
457
+ msgid "opened"
458
+ msgstr "abriu"
459
+
460
+ #: simple-history-extender/modules/bbpress.php:55
461
+ msgid "marked as sticky"
462
+ msgstr "marcado como pegajoso"
463
+
464
+ #: simple-history-extender/modules/bbpress.php:56
465
+ msgid "marked as super sticky"
466
+ msgstr "marcado como super pegajosa"
467
+
468
+ #: simple-history-extender/modules/bbpress.php:57
469
+ msgid "unmarked as sticky"
470
+ msgstr "não marcado como sticky"
471
+
472
+ #: simple-history-extender/modules/bbpress.php:58
473
+ msgid "set to category type"
474
+ msgstr "definir o tipo de categoria"
475
+
476
+ #: simple-history-extender/modules/bbpress.php:59
477
+ msgid "set to forum type"
478
+ msgstr "definir o tipo de fórum"
479
+
480
+ #: simple-history-extender/modules/bbpress.php:60
481
+ msgid "set to public"
482
+ msgstr "definido como público"
483
+
484
+ #: simple-history-extender/modules/bbpress.php:61
485
+ msgid "set to private"
486
+ msgstr "definido como privado"
487
+
488
+ #: simple-history-extender/modules/bbpress.php:62
489
+ msgid "set to hidden"
490
+ msgstr "definido para escondido"
491
+
492
+ #: simple-history-extender/modules/bbpress.php:63
493
+ msgid "in forum %s merged into %s"
494
+ msgstr "no fórum %s fundidos em %s"
495
+
496
+ #: simple-history-extender/modules/bbpress.php:64
497
+ msgid "in forum %s split from reply %s by %s into %s in forum %s"
498
+ msgstr "no fórum %s divisão de resposta %s por %s em %s em %s fórum"
499
+
500
+ #: simple-history-extender/modules/bbpress.php:131
501
+ msgid "Forum"
502
+ msgstr "Forum"
503
+
504
+ #: simple-history-extender/modules/bbpress.php:141
505
+ msgid "Topic"
506
+ msgstr "Tópico"
507
+
508
+ #: simple-history-extender/modules/bbpress.php:150
509
+ msgid "Topic Tag"
510
+ msgstr "Tag Tópico"
511
+
512
+ #: simple-history-extender/modules/bbpress.php:161
513
+ msgid "by %s"
514
+ msgstr "por %s"
515
+
516
+ #: simple-history-extender/modules/bbpress.php:162
517
+ msgid "Reply"
518
+ msgstr "Responder"
519
+
520
+ #: simple-history-extender/modules/bbpress.php:174
521
+ msgid "as child of %s"
522
+ msgstr "como filho de %s"
523
+
524
+ #: simple-history-extender/modules/bbpress.php:235
525
+ #: simple-history-extender/modules/bbpress.php:245
526
+ msgid "in forum %s"
527
+ msgstr "no fórum %s"
528
+
529
+ #: simple-history-extender/modules/bbpress.php:358
530
+ msgid "favorited"
531
+ msgstr "favorito"
532
+
533
+ #: simple-history-extender/modules/bbpress.php:362
534
+ msgid "unfavorited"
535
+ msgstr "não favorito"
536
+
537
+ #: simple-history-extender/modules/bbpress.php:366
538
+ msgid "subscribed"
539
+ msgstr "subscrito"
540
+
541
+ #: simple-history-extender/modules/bbpress.php:370
542
+ msgid "unsubscribed"
543
+ msgstr "não inscrito"
544
+
545
+ #: simple-history-extender/modules/bbpress.php:374
546
+ msgid "profile updated"
547
+ msgstr "perfil atualizado"
548
+
549
+ #: simple-history-extender/modules/bbpress.php:378
550
+ msgid "registered"
551
+ msgstr "registrado"
552
+
553
+ #: simple-history-extender/modules/bbpress.php:390
554
+ msgid "changed forum role to %s"
555
+ msgstr "papel fórum alterado para %s"
556
+
557
+ #: simple-history-extender/modules/bbpress.php:390
558
+ msgid "none"
559
+ msgstr "nenhum"
560
+
561
+ #: simple-history-extender/modules/gravityforms.php:28
562
+ msgid "Gravity Forms"
563
+ msgstr "Gravity Forms"
564
+
565
+ #: simple-history-extender/modules/gravityforms.php:32
566
+ msgid "Creating, editing and deleting a form."
567
+ msgstr "A criação, edição e exclusão de um formulário."
568
+
569
+ #: simple-history-extender/modules/gravityforms.php:33
570
+ msgid "Deleting a field from an existing form."
571
+ msgstr "A exclusão de um campo de um formulário existente."
572
+
573
+ #: simple-history-extender/modules/gravityforms.php:34
574
+ msgid "Submitting, editing and deleting an entry."
575
+ msgstr "Submissão, edição e exclusão de uma entrada."
576
+
577
+ #: simple-history-extender/modules/gravityforms.php:35
578
+ msgid "Changing the status of an entry, including read/unread and star/unstar."
579
+ msgstr "Alterar o estado de uma entrada, incluindo lido/não lido e estrela/remover estrela."
580
+
581
+ #: simple-history-extender/modules/gravityforms.php:38
582
+ msgid "Duplicating a form."
583
+ msgstr "Duplicação de um formulário."
584
+
585
+ #: simple-history-extender/modules/gravityforms.php:39
586
+ msgid "Setting a form to active/inactive."
587
+ msgstr "A definição de um formulário para ativo / inativo."
588
+
589
+ #: simple-history-extender/modules/gravityforms.php:48
590
+ msgid "starred"
591
+ msgstr "estrelou"
592
+
593
+ #: simple-history-extender/modules/gravityforms.php:49
594
+ msgid "unstarred"
595
+ msgstr "sem estrela"
596
+
597
+ #: simple-history-extender/modules/gravityforms.php:50
598
+ msgid "marked as read"
599
+ msgstr "marcada como lida"
600
+
601
+ #: simple-history-extender/modules/gravityforms.php:51
602
+ msgid "marked as unread"
603
+ msgstr "marcado como não lido"
604
+
605
+ #: simple-history-extender/modules/gravityforms.php:110
606
+ msgid "from %s"
607
+ msgstr "de %s"
608
+
609
+ #: simple-history-extender/modules/gravityforms.php:112
610
+ msgid "from unknown"
611
+ msgstr "de desconhecido"
612
+
613
+ #: simple-history-extender/modules/gravityforms.php:120
614
+ msgid "Form"
615
+ msgstr "Forma"
616
+
617
+ #: simple-history-extender/modules/gravityforms.php:129
618
+ msgid "Form entry"
619
+ msgstr "Inscrição"
620
+
621
+ #: simple-history-extender/modules/gravityforms.php:150
622
+ msgid "without entries deleted"
623
+ msgstr "sem entradas suprimidas"
624
+
625
+ #: simple-history-extender/modules/gravityforms.php:151
626
+ msgid "with %d entries deleted"
627
+ msgstr "com %d entradas excluídos"
628
+
629
+ #: simple-history-extender/modules/gravityforms.php:160
630
+ msgid "field %s deleted"
631
+ msgstr "campo %s apagado"
632
+
633
+ #: simple-history-extender/modules/gravityforms.php:201
634
+ msgid "restored"
635
+ msgstr "restaurado"
636
+
637
+ #: simple-history-extender/modules/gravityforms.php:206
638
+ msgid "changed status"
639
+ msgstr "status alterado"
640
+
641
+ #: simple-history-extender/modules/widgets.php:25
642
+ msgid "Widgets"
643
+ msgstr "Widgets"
644
+
645
+ #: simple-history-extender/modules/widgets.php:27
646
+ msgid "Log events for the Widgets section of your WP install."
647
+ msgstr "Log de ​​eventos para a seção Widgets do seu WP instalar."
648
+
649
+ #: simple-history-extender/modules/widgets.php:30
650
+ msgid "Adding, updating and deleting widgets in/from a sidebar."
651
+ msgstr "Adicionar, atualizar e excluir os widgets em / de uma barra lateral."
652
+
653
+ #: simple-history-extender/modules/widgets.php:33
654
+ msgid "Moving widgets between sidebars."
655
+ msgstr "Movendo-se entre os widgets laterais."
656
+
657
+ #: simple-history-extender/modules/widgets.php:34
658
+ msgid "Setting a widget to active/inactive."
659
+ msgstr "Definindo um widget para ativo / inativo."
660
+
661
+ #: simple-history-extender/modules/widgets.php:86
662
+ msgid "removed from sidebar %s"
663
+ msgstr "removido da barra lateral %s"
664
+
665
+ #: simple-history-extender/modules/widgets.php:88
666
+ msgid "updated in sidebar %s"
667
+ msgstr "atualizada em barra lateral %s"
668
+
669
+ #: simple-history-extender/modules/widgets.php:90
670
+ msgid "added to sidebar %s"
671
+ msgstr "adicionado para a sidebar %s"
672
+
673
+ #: simple-history-extender/modules/widgets.php:95
674
+ msgid "Widget"
675
+ msgstr "Widget"
676
+
677
+ #: simple-history-extender/simple-history-extender.php:139
678
+ msgid "Settings"
679
+ msgstr "Configurações"
680
+
681
+ #: simple-history-extender/simple-history-extender.php:162
682
+ msgid "The Simple History Extender plugin was deactivated because the Simple History plugin was not found installed or active."
683
+ msgstr "O simples plugin History Extender foi desativada porque a Simple History plugin não foi encontrada instalado ou ativo."
684
+
685
+ #: simple-history-extender/simple-history-extender.php:163
686
+ msgid "The Simple History Extender plugin was deactivated."
687
+ msgstr "O plugin Simple History Extender foi desativado."
688
+
689
+ #: simple-history-extender/simple-history-extender.php:167
690
+ msgid "Return"
691
+ msgstr "Retorno"
692
+
693
+ #: simple-history-extender/simple-history-extender.php:226
694
+ msgid "Simple History Extender Modules"
695
+ msgstr "Simple History Extender Modulos"
696
+
697
+ #: simple-history-extender/simple-history-extender.php:236
698
+ msgid "Activate or deactivate the events you want to log. Read the Help tab if you want to know which actions are supported and which aren't."
699
+ msgstr "Ativar ou desativar os eventos que você deseja registrar. Leia o guia Ajuda se você quer saber quais ações são suportadas e quais não são."
700
+
701
+ #: simple-history-extender/simple-history-extender.php:275
702
+ msgid "Simple History Extender Module"
703
+ msgstr "Simple History Extender Modulo"
704
+
phpunit.xml ADDED
@@ -0,0 +1,14 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <phpunit
2
+ bootstrap="tests/bootstrap.php"
3
+ backupGlobals="false"
4
+ colors="true"
5
+ convertErrorsToExceptions="true"
6
+ convertNoticesToExceptions="true"
7
+ convertWarningsToExceptions="true"
8
+ >
9
+ <testsuites>
10
+ <testsuite>
11
+ <directory prefix="test-" suffix=".php">./tests/</directory>
12
+ </testsuite>
13
+ </testsuites>
14
+ </phpunit>
readme.txt CHANGED
@@ -1,10 +1,10 @@
1
- === Simple History ===
2
- Contributors: eskapism, MarsApril, offereins
3
  Donate link: http://eskapism.se/sida/donate/
4
  Tags: history, log, changes, changelog, audit, trail, pages, attachments, users, cms, dashboard, admin, syslog
5
- Requires at least: 3.5.1
6
- Tested up to: 3.5.1
7
- Stable tag: 1.3.4
8
 
9
  View changes made by users within WordPress. See who created a page, uploaded an attachment or approved an comment, and more.
10
 
@@ -175,6 +175,13 @@ to only use the secret RSS feed to keep track of the changes on you web site/Wor
175
 
176
  == Changelog ==
177
 
 
 
 
 
 
 
 
178
  = 1.3.4 =
179
  - Changed the way post types show in the dropdown. Now uses plural names + not prefixed with main post type. Looks better I think. Thank to Hassan for the suggestion!
180
  - Added "bytes" to size units that an attachment can have. Also fixes undefined notice warning when attachment had a size less that 1 KB.
1
+ === Simple History ===
2
+ Contributors: eskapism, MarsApril, Offereins
3
  Donate link: http://eskapism.se/sida/donate/
4
  Tags: history, log, changes, changelog, audit, trail, pages, attachments, users, cms, dashboard, admin, syslog
5
+ Requires at least: 3.8.0
6
+ Tested up to: 3.8.1
7
+ Stable tag: 1.3.5
8
 
9
  View changes made by users within WordPress. See who created a page, uploaded an attachment or approved an comment, and more.
10
 
175
 
176
  == Changelog ==
177
 
178
+ = 1.3.5 =
179
+ - Added a reload-button at top. Click it to reload the history. No need to refresh page no more!
180
+ - Fixed items being reloaded when just clicking the dropdown (not having selected anything yet)
181
+ - Fixed bug with keyboard navigation
182
+ - Added Portuguese translation by [X6Web](http://x6web.com)
183
+ - Use less SQL queries
184
+
185
  = 1.3.4 =
186
  - Changed the way post types show in the dropdown. Now uses plural names + not prefixed with main post type. Looks better I think. Thank to Hassan for the suggestion!
187
  - Added "bytes" to size units that an attachment can have. Also fixes undefined notice warning when attachment had a size less that 1 KB.
scripts.js CHANGED
@@ -18,7 +18,6 @@ var simple_history = (function($) {
18
  elms.ol_wrapper = elms.wrap.find(".simple-history-ol-wrapper");
19
 
20
  // so wrapper does not collapse when loading new items
21
- //elms.ol_wrapper.height( elms.ol_wrapper.height() );
22
  elms.ol_wrapper.css("max-height", elms.ol_wrapper.height() );
23
 
24
  addListeners();
@@ -31,6 +30,35 @@ var simple_history = (function($) {
31
  elms.ol_wrapper.css("max-height", "1000px");
32
  }
33
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
34
  function addListeners() {
35
 
36
  /*
@@ -40,25 +68,14 @@ var simple_history = (function($) {
40
  39 - right
41
  40 - down
42
  */
 
 
 
43
 
44
  // Enable keyboard navigation if we are on Simple Historys own page
45
  if ( $(".dashboard_page_simple_history_page").length ) {
46
 
47
- $(document).keydown(function(e) {
48
-
49
- var link_to_click = null;
50
-
51
- if (e.keyCode == 37) {
52
- link_to_click = ".prev-page";
53
- } else if (e.keyCode == 39) {
54
- link_to_click = ".next-page";
55
- }
56
-
57
- if (link_to_click) {
58
- $(".simple-history-tablenav").find(link_to_click).trigger("click");
59
- }
60
-
61
- });
62
 
63
  }
64
 
@@ -140,9 +157,9 @@ jQuery(document).on("keyup", ".simple-history-filter-search input[type='text'],
140
  }
141
  });
142
 
143
- // click on filter-link/change value is filter dropdowns = load new via ajax
144
- // begin at position 0 unless click on pagination then check pagination page
145
- //jQuery("select.simple-history-filter, .simple-history-filter a, .simple-history-filter input[type='button'], .simple-history-tablenav a").live("click change", function(e, extraParams) {
146
  jQuery(document).on("click change", "select.simple-history-filter, .simple-history-filter a, .simple-history-filter input[type='button'], .simple-history-tablenav a", function(e, extraParams) {
147
 
148
  var $t = jQuery(this),
@@ -164,10 +181,15 @@ jQuery(document).on("click change", "select.simple-history-filter, .simple-histo
164
  $simple_history_wrap = jQuery(".simple-history-wrap");
165
 
166
  e.preventDefault();
 
 
 
167
 
168
  // if target is a child of simple-history-tablenav then this is a click in pagination
169
  if ($t.closest("div.simple-history-tablenav").length > 0) {
170
 
 
 
171
  if ($target_link.hasClass("disabled")) {
172
  return;
173
  } else if ($target_link.hasClass("first-page")) {
@@ -179,7 +201,13 @@ jQuery(document).on("click change", "select.simple-history-filter, .simple-histo
179
  } else if ($target_link.hasClass("next-page")) {
180
  simple_history_current_page = simple_history_current_page + 1;
181
  }
182
-
 
 
 
 
 
 
183
  } else {
184
 
185
  num_added = 0;
18
  elms.ol_wrapper = elms.wrap.find(".simple-history-ol-wrapper");
19
 
20
  // so wrapper does not collapse when loading new items
 
21
  elms.ol_wrapper.css("max-height", elms.ol_wrapper.height() );
22
 
23
  addListeners();
30
  elms.ol_wrapper.css("max-height", "1000px");
31
  }
32
 
33
+ /**
34
+ * Reload history, starting at page 1
35
+ */
36
+ function reload(e) {
37
+
38
+ e.preventDefault();
39
+ jQuery(".simple-history-filter input[type='button']").trigger("click", [ {} ]);
40
+
41
+ }
42
+
43
+ function keyboardNav(e) {
44
+
45
+ var link_to_click = null;
46
+
47
+ if (e.keyCode == 37) {
48
+ link_to_click = ".prev-page";
49
+ } else if (e.keyCode == 39) {
50
+ link_to_click = ".next-page";
51
+ }
52
+
53
+ if (link_to_click) {
54
+ $(".simple-history-tablenav").find(link_to_click).trigger("click");
55
+ }
56
+
57
+ }
58
+
59
+ /**
60
+ * Add listeners to enable keyboard navigation and to show/hide things
61
+ */
62
  function addListeners() {
63
 
64
  /*
68
  39 - right
69
  40 - down
70
  */
71
+
72
+ // Reload history when clicking reload-button
73
+ $(document).on("click", ".simple-fields-reload", reload);
74
 
75
  // Enable keyboard navigation if we are on Simple Historys own page
76
  if ( $(".dashboard_page_simple_history_page").length ) {
77
 
78
+ $(document).keydown(keyboardNav);
 
 
 
 
 
 
 
 
 
 
 
 
 
 
79
 
80
  }
81
 
157
  }
158
  });
159
 
160
+ /**
161
+ * Load page with history items when click on seach on when selecting someting in the dropdowns
162
+ */
163
  jQuery(document).on("click change", "select.simple-history-filter, .simple-history-filter a, .simple-history-filter input[type='button'], .simple-history-tablenav a", function(e, extraParams) {
164
 
165
  var $t = jQuery(this),
181
  $simple_history_wrap = jQuery(".simple-history-wrap");
182
 
183
  e.preventDefault();
184
+
185
+ // If event is of type click and called form dropdown then don't continue (only go on when dropdown is changed)
186
+ if ( "click" === e.type && "SELECT" === e.target.nodeName ) return;
187
 
188
  // if target is a child of simple-history-tablenav then this is a click in pagination
189
  if ($t.closest("div.simple-history-tablenav").length > 0) {
190
 
191
+ var prev_current_page = simple_history_current_page;
192
+
193
  if ($target_link.hasClass("disabled")) {
194
  return;
195
  } else if ($target_link.hasClass("first-page")) {
201
  } else if ($target_link.hasClass("next-page")) {
202
  simple_history_current_page = simple_history_current_page + 1;
203
  }
204
+
205
+ // Don't go before page 0 or after total pages. Could happend if you navigated quickly with keyboard.
206
+ if ( simple_history_current_page < 0 || simple_history_current_page >= $total_pages.text() ) {
207
+ simple_history_current_page = prev_current_page;
208
+ return;
209
+ }
210
+
211
  } else {
212
 
213
  num_added = 0;
simple-history-extender/class.simple-history-extend.php CHANGED
File without changes
simple-history-extender/languages/sh-extender-de_DE.mo CHANGED
File without changes
simple-history-extender/languages/sh-extender-de_DE.po CHANGED
File without changes
simple-history-extender/languages/sh-extender-nl_NL.mo CHANGED
File without changes
simple-history-extender/languages/sh-extender-nl_NL.po CHANGED
File without changes
simple-history-extender/languages/sh-extender.pot CHANGED
File without changes
simple-history-extender/modules/bbpress.php CHANGED
File without changes
simple-history-extender/modules/gravityforms.php CHANGED
File without changes
simple-history-extender/modules/widgets.php CHANGED
File without changes
simple-history-extender/simple-history-extender.php CHANGED
File without changes
styles.css CHANGED
@@ -383,3 +383,37 @@ ol.simple-history,
383
  .simple-history-is-ready {
384
  visibility: visible;
385
  }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
383
  .simple-history-is-ready {
384
  visibility: visible;
385
  }
386
+
387
+ .simple-fields-reload {
388
+ -webkit-appearance: none;
389
+ background: #f3f3f3;
390
+ background-image: -webkit-gradient(linear, 0 100%, 0 0, from(#fff), to(#f3f3f3));
391
+ background-image: -webkit-linear-gradient(#fff, #f3f3f3);
392
+ background-image: -moz-linear-gradient(#fff, #f3f3f3);
393
+ background-image: -o-linear-gradient(#fff, #f3f3f3);
394
+ background-image: linear-gradient(#fff, #f3f3f3);
395
+ border: 1px solid #bbb;
396
+ -webkit-border-radius: 3px;
397
+ border-radius: 3px;
398
+ -webkit-box-shadow: inset 0 1px 0 #fff;
399
+ box-shadow: inset 0 1px 0 #fff;
400
+ display: inline-block;
401
+ padding: 5px 6px;
402
+ text-indent: -9999px;
403
+ margin-right: 1em;
404
+ vertical-align: middle;
405
+ }
406
+ .simple-fields-reload:hover {
407
+ background-color: #e4e4e4;
408
+ border-color: #999;
409
+ }
410
+
411
+ .simple-fields-reload span {
412
+ background: transparent url(./img/ui-icons_888888_256x240.png) no-repeat -64px -81px;
413
+ width: 16px;
414
+ height: 16px;
415
+ display: block;
416
+ text-indent: -9999px;
417
+ direction: ltr;
418
+ border: 0;
419
+ }
tests/bootstrap.php ADDED
@@ -0,0 +1,14 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ #echo "WP_TESTS_DIR is: " . getenv( 'WP_TESTS_DIR' );
4
+ #phpinfo();exit;
5
+
6
+ require_once getenv( 'WP_TESTS_DIR' ) . '/includes/functions.php';
7
+
8
+ function _manually_load_plugin() {
9
+ require dirname( __FILE__ ) . '/../index.php';
10
+ }
11
+ tests_add_filter( 'muplugins_loaded', '_manually_load_plugin' );
12
+
13
+ require getenv( 'WP_TESTS_DIR' ) . '/includes/bootstrap.php';
14
+
tests/test-sample.php ADDED
@@ -0,0 +1,10 @@
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ class SampleTest extends WP_UnitTestCase {
4
+
5
+ function testSample() {
6
+ // replace this with some actual testing code
7
+ $this->assertTrue( true );
8
+ }
9
+ }
10
+