WP Rollback - Version 1.2.4

Version Description

  • New: Portuguese translations added
  • Fix: Limit HTTP requests to Plugin page only #17 @see: https://wordpress.org/support/topic/great-plugin-but-small-issue?replies=5 and https://wordpress.org/support/topic/great-plugin-but-small-issue?replies=1#post-7234287
Download this release

Release Info

Developer dlocc
Plugin Icon 128x128 WP Rollback
Version 1.2.4
Comparing to
See all releases

Code changes from version 1.2.3 to 1.2.4

includes/rollback-action.php CHANGED
@@ -14,7 +14,7 @@ $plugin = $this->plugin_slug;
14
  $version = $args['plugin_version'];
15
 
16
  //Theme rollback
17
- if ( !empty( $_GET['theme_file'] ) && file_exists( WP_CONTENT_DIR . '/themes/' . $_GET['theme_file'] ) ) {
18
 
19
  //theme specific vars
20
  $nonce = 'upgrade-theme_' . $_GET['theme_file'];
@@ -26,7 +26,7 @@ if ( !empty( $_GET['theme_file'] ) && file_exists( WP_CONTENT_DIR . '/themes/' .
26
 
27
  $upgrader->rollback( $_GET['theme_file'] );
28
 
29
- } elseif ( !empty( $_GET['plugin_file'] ) && file_exists( WP_PLUGIN_DIR . '/' . $_GET['plugin_file'] ) ) {
30
  //This is a plugin rollback
31
  $upgrader = new WP_Rollback_Plugin_Upgrader( new Plugin_Upgrader_Skin( compact( 'title', 'nonce', 'url', 'plugin', 'version' ) ) );
32
 
14
  $version = $args['plugin_version'];
15
 
16
  //Theme rollback
17
+ if ( ! empty( $_GET['theme_file'] ) && file_exists( WP_CONTENT_DIR . '/themes/' . $_GET['theme_file'] ) ) {
18
 
19
  //theme specific vars
20
  $nonce = 'upgrade-theme_' . $_GET['theme_file'];
26
 
27
  $upgrader->rollback( $_GET['theme_file'] );
28
 
29
+ } elseif ( ! empty( $_GET['plugin_file'] ) && file_exists( WP_PLUGIN_DIR . '/' . $_GET['plugin_file'] ) ) {
30
  //This is a plugin rollback
31
  $upgrader = new WP_Rollback_Plugin_Upgrader( new Plugin_Upgrader_Skin( compact( 'title', 'nonce', 'url', 'plugin', 'version' ) ) );
32
 
includes/rollback-menu.php CHANGED
@@ -20,9 +20,11 @@ $plugins = get_plugins();
20
 
21
  <div class="wpr-content-wrap">
22
 
23
- <h2><img src="<?php echo WP_ROLLBACK_PLUGIN_URL; ?>/assets/images/wprb-icon-final.svg" onerror="this.onerror=null; this.src='<?php echo WP_ROLLBACK_PLUGIN_URL; ?>/assets/images/wprb-logo.png'"><?php _e( 'WP Rollback', 'wpr' ); ?></h2>
 
 
24
 
25
- <p><?php echo apply_filters( 'wpr_rollback_description', sprintf( __( 'Please select which %1$s version you would like to rollback to from the releases listed below. You currently have version %2$s installed of %3$s.', 'wpr' ), '<span class="type">' . ( $theme_rollback == true ? 'theme' : 'plugin' ) . '</span>', '<span class="current-version">' . esc_html( $args['current_version'] ) . '</span>', '<span class="rollback-name">' . esc_html( $args['rollback_name'] ) . '</span>' ) ); ?></p>
26
 
27
  </div>
28
 
@@ -76,7 +78,6 @@ $plugins = get_plugins();
76
  <input type="hidden" name="installed_version" value="<?php echo esc_attr( $args['current_version'] ); ?>">
77
  <?php wp_nonce_field( 'wpr_rollback_nonce' ); ?>
78
 
79
-
80
  <div id="wpr-modal-confirm" class="white-popup mfp-hide">
81
  <div class="wpr-modal-inner">
82
  <p class="wpr-rollback-intro"><?php
20
 
21
  <div class="wpr-content-wrap">
22
 
23
+ <h2>
24
+ <img src="<?php echo WP_ROLLBACK_PLUGIN_URL; ?>/assets/images/wprb-icon-final.svg" onerror="this.onerror=null; this.src='<?php echo WP_ROLLBACK_PLUGIN_URL; ?>/assets/images/wprb-logo.png'"><?php _e( 'WP Rollback', 'wpr' ); ?>
25
+ </h2>
26
 
27
+ <p><?php echo apply_filters( 'wpr_rollback_description', sprintf( __( 'Please select which %1$s version you would like to rollback to from the releases listed below. You currently have version %2$s installed of %3$s.', 'wpr' ), '<span class="type">' . ( $theme_rollback == true ? __( 'theme', 'wpr' ) : __( 'plugin', 'wpr' ) ) . '</span>', '<span class="current-version">' . esc_html( $args['current_version'] ) . '</span>', '<span class="rollback-name">' . esc_html( $args['rollback_name'] ) . '</span>' ) ); ?></p>
28
 
29
  </div>
30
 
78
  <input type="hidden" name="installed_version" value="<?php echo esc_attr( $args['current_version'] ); ?>">
79
  <?php wp_nonce_field( 'wpr_rollback_nonce' ); ?>
80
 
 
81
  <div id="wpr-modal-confirm" class="white-popup mfp-hide">
82
  <div class="wpr-modal-inner">
83
  <p class="wpr-rollback-intro"><?php
languages/wpr-pt_BR.mo ADDED
Binary file
languages/wpr-pt_BR.po ADDED
@@ -0,0 +1,140 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ msgid ""
2
+ msgstr ""
3
+ "Project-Id-Version: WP Rollback\n"
4
+ "Report-Msgid-Bugs-To: \n"
5
+ "POT-Creation-Date: Sat Jul 04 2015 00:27:38 GMT-0300 (BRT)\n"
6
+ "PO-Revision-Date: 2015-07-04 00:46-0300\n"
7
+ "Last-Translator: Rafael Funchal <rafaelfunchal@gmail.com>\n"
8
+ "Language-Team: \n"
9
+ "Language: Portuguese (Brazil)\n"
10
+ "Plural-Forms: nplurals=2; plural=n != 1;\n"
11
+ "MIME-Version: 1.0\n"
12
+ "Content-Type: text/plain; charset=UTF-8\n"
13
+ "Content-Transfer-Encoding: 8bit\n"
14
+ "X-Poedit-SourceCharset: UTF-8\n"
15
+ "X-Poedit-Basepath: .\n"
16
+ "X-Poedit-KeywordsList: _:1;gettext:1;dgettext:2;ngettext:1,2;dngettext:2,3;"
17
+ "__:1;_e:1;_c:1;_n:1,2;_n_noop:1,2;_nc:1,2;__ngettext:1,2;__ngettext_noop:1,2;"
18
+ "_x:1,2c;_ex:1,2c;_nx:1,2,4c;_nx_noop:1,2,3c;_n_js:1,2;_nx_js:1,2,3c;"
19
+ "esc_attr__:1;esc_html__:1;esc_attr_e:1;esc_html_e:1;esc_attr_x:1,2c;"
20
+ "esc_html_x:1,2c;comments_number_link:2,3;t:1;st:1;trans:1;transChoice:1,2\n"
21
+ "X-Loco-Target-Locale: pt_BR\n"
22
+ "X-Generator: Poedit 1.5.4\n"
23
+ "X-Poedit-SearchPath-0: ..\n"
24
+
25
+ #: ../wp-rollback.php:207 ../wp-rollback.php:461 ../wp- rollback.php:522
26
+ #: ../includes/rollback-menu.php:63 ../includes/rollback-menu. php:121
27
+ msgid "Rollback"
28
+ msgstr "Restaurar"
29
+
30
+ #: ../wp-rollback.php:208
31
+ msgid "No Rollback Available: This is a non-WordPress.org theme."
32
+ msgstr ""
33
+ "Nenhum ponto de restauração disponível: Esse não é um tema do WordPress.org."
34
+
35
+ #: ../wp-rollback.php:209
36
+ msgid "Loading..."
37
+ msgstr "Carregando..."
38
+
39
+ #: ../wp-rollback.php:228
40
+ msgid "Please select a version number to perform a rollback."
41
+ msgstr "Por favor, selecione um número de versão para ser restaurada."
42
+
43
+ #: ../wp-rollback.php:276
44
+ msgid ""
45
+ "You do not have sufficient permissions to perform rollbacks for this site."
46
+ msgstr ""
47
+ "Você não tem permissão suficiente para concluir restaurações nesse site."
48
+
49
+ #: ../wp-rollback.php:405
50
+ msgid "Installed Version"
51
+ msgstr "Versão instalada"
52
+
53
+ #: ../wp-rollback.php:634
54
+ msgid ""
55
+ "An unexpected error occurred. Something may be wrong with WordPress.org or "
56
+ "this server&#8217;s configuration. If you continue to have problems, please "
57
+ "try the <a href=\"https://wordpress.org/support/\">support forums</a>."
58
+ msgstr ""
59
+ "Ocorreu um erro inesperado. Há algo errado no WordPress.org ou nas "
60
+ "configurações do seu servidor. Caso você continue a ter problemas, por "
61
+ "favor, entre em contato pelo \n"
62
+ "<a href=\"https://wordpress.org/support/\">fórum de suporte</a>."
63
+
64
+ #: ../wp-rollback.php:634
65
+ msgid ""
66
+ "(WordPress could not establish a secure connection to WordPress.org. Please "
67
+ "contact your server administrator.)"
68
+ msgstr ""
69
+ "(WordPress não conseguiu estabelecer uma conexão segura com WordPress.org. "
70
+ "Por favor, entre em contato com o administrador do seu servidor.)"
71
+
72
+ #: ../includes/rollback-action.php:35
73
+ msgid ""
74
+ "This rollback request is missing proper query string. Please contact support."
75
+ msgstr ""
76
+ "Está faltando uma query string nessa requisição de restauração. Por favor, "
77
+ "entre em contato com o suporte."
78
+
79
+ #: ../includes/rollback-menu.php:12
80
+ msgid ""
81
+ "WP Rollback is missing necessary parameters to continue. Please contact "
82
+ "support."
83
+ msgstr ""
84
+ "WP Rollback necessita de alguns parâmetros para continuar. Por favor, entre "
85
+ "em contato com o suporte."
86
+
87
+ #: ../includes/rollback-menu.php:23
88
+ msgid "WP Rollback"
89
+ msgstr "WP Rollback"
90
+
91
+ #: ../includes/rollback-menu.php:25
92
+ #, php-format
93
+ msgid ""
94
+ "Please select which %1$s version you would like to rollback to from the "
95
+ "releases listed below. You currently have version %2$s installed of %3$s."
96
+ msgstr ""
97
+ "Por favor, selecione abaixo qual versão do %1$s. Atualmente você tem a "
98
+ "versão %2$s instalada do %3$s."
99
+
100
+ #: ../includes/rollback-menu.php:64 ../includes/rollback-menu.php:122
101
+ msgid "Cancel"
102
+ msgstr "Cancelar"
103
+
104
+ #: ../includes/rollback-menu.php:82
105
+ msgid "Are you sure you want to perform the following rollback?"
106
+ msgstr "Você tem certeza que deseja restaurar os seguintes itens?"
107
+
108
+ #: ../includes/rollback-menu.php:92
109
+ msgid "Plugin Name:"
110
+ msgstr "Nome do plugin:"
111
+
112
+ #: ../includes/rollback-menu.php:94
113
+ msgid "Theme Name:"
114
+ msgstr "Nome do tema:"
115
+
116
+ #: ../includes/rollback-menu.php:101
117
+ msgid "Installed Version:"
118
+ msgstr "Versão instalada:"
119
+
120
+ #: ../includes/rollback-menu.php:107
121
+ msgid "New Version:"
122
+ msgstr "Nova versão:"
123
+
124
+ #: ../includes/rollback-menu.php:117
125
+ msgid ""
126
+ "<strong>Notice:</strong> We strongly recommend you perform a test rollback "
127
+ "on a staging site and create a complete backup of your WordPress files and "
128
+ "database prior to performing a rollback. We are not responsible for any "
129
+ "misuse, deletions, white screens, fatal errors, or any other issue arising "
130
+ "from using this plugin."
131
+ msgstr ""
132
+ "<strong>Nota:</strong> Nós recomendamos que você teste em um ambiente local "
133
+ "e crie um backup completo dos seus arquivos do WordPress e do banco de dados "
134
+ "antes de prosseguir com a restauração. Nós não nos responsabilizamos por "
135
+ "qualquer erro, apagamento, tela branca, erro fatal ou qualquer problema "
136
+ "ocasionado pelo uso desse plugin. "
137
+
138
+ #: ../wp-rollback.php:122 ../wp-rollback.php:134
139
+ msgid "Cheatin&#8217; huh?"
140
+ msgstr "Trapaceando né?"
languages/wpr-pt_PT.mo ADDED
Binary file
languages/wpr-pt_PT.po ADDED
@@ -0,0 +1,140 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ msgid ""
2
+ msgstr ""
3
+ "Project-Id-Version: WP Rollback\n"
4
+ "POT-Creation-Date: 2015-07-29 15:50+0100\n"
5
+ "PO-Revision-Date: 2015-07-29 16:03+0100\n"
6
+ "Last-Translator: Pedro Mendonça <ped.gaspar@gmail.com>\n"
7
+ "Language-Team: Pedro Mendonça <ped.gaspar@gmail.com>\n"
8
+ "Language: pt_PT\n"
9
+ "MIME-Version: 1.0\n"
10
+ "Content-Type: text/plain; charset=UTF-8\n"
11
+ "Content-Transfer-Encoding: 8bit\n"
12
+ "X-Generator: Poedit 1.8.3\n"
13
+ "X-Poedit-Basepath: ..\n"
14
+ "X-Poedit-SourceCharset: UTF-8\n"
15
+ "X-Poedit-KeywordsList: __;_e;_n:1,2;_x:1,2c;_ex:1,2c;_nx:4c,1,2;esc_attr__;"
16
+ "esc_attr_e;esc_attr_x:1,2c;esc_html__;esc_html_e;esc_html_x:1,2c;_n_noop:1,2;"
17
+ "_nx_noop:3c,1,2;__ngettext_noop:1,2\n"
18
+ "Plural-Forms: nplurals=2; plural=(n != 1);\n"
19
+ "X-Poedit-SearchPath-0: .\n"
20
+ "X-Poedit-SearchPathExcluded-0: *.js\n"
21
+
22
+ #: includes/rollback-action.php:35
23
+ msgid ""
24
+ "This rollback request is missing proper query string. Please contact support."
25
+ msgstr ""
26
+ "Este pedido de reversão não tem os valores de consulta adequados. Por favor "
27
+ "contacte o suporte."
28
+
29
+ #: includes/rollback-menu.php:12
30
+ msgid ""
31
+ "WP Rollback is missing necessary parameters to continue. Please contact "
32
+ "support."
33
+ msgstr ""
34
+ "O WP Rollback não tem os parâmetros necessários para continuar. Por favor "
35
+ "contacte o suporte."
36
+
37
+ #: includes/rollback-menu.php:23
38
+ msgid "WP Rollback"
39
+ msgstr "WP Rollback"
40
+
41
+ #: includes/rollback-menu.php:25
42
+ #, php-format
43
+ msgid ""
44
+ "Please select which %1$s version you would like to rollback to from the "
45
+ "releases listed below. You currently have version %2$s installed of %3$s."
46
+ msgstr ""
47
+ "Por favor seleccione da lista abaixo qual a versão do %1$s para que pretende "
48
+ "reverter. Actualmente tem instalada a versão %2$s de %3$s."
49
+
50
+ #: includes/rollback-menu.php:63 includes/rollback-menu.php:121
51
+ #: wp-rollback.php:207 wp-rollback.php:461 wp-rollback.php:522
52
+ msgid "Rollback"
53
+ msgstr "Reverter"
54
+
55
+ #: includes/rollback-menu.php:64 includes/rollback-menu.php:122
56
+ msgid "Cancel"
57
+ msgstr "Cancelar"
58
+
59
+ #: includes/rollback-menu.php:82
60
+ msgid "Are you sure you want to perform the following rollback?"
61
+ msgstr "Tem a certeza que pretende fazer esta reversão?"
62
+
63
+ #: includes/rollback-menu.php:92
64
+ msgid "Plugin Name:"
65
+ msgstr "Nome do plugin:"
66
+
67
+ #: includes/rollback-menu.php:94
68
+ msgid "Theme Name:"
69
+ msgstr "Nome do tema:"
70
+
71
+ #: includes/rollback-menu.php:101
72
+ msgid "Installed Version:"
73
+ msgstr "Versão instalada:"
74
+
75
+ #: includes/rollback-menu.php:107
76
+ msgid "New Version:"
77
+ msgstr "Nova versão:"
78
+
79
+ #: includes/rollback-menu.php:117
80
+ msgid ""
81
+ "<strong>Notice:</strong> We strongly recommend you perform a test rollback "
82
+ "on a staging site and create a complete backup of your WordPress files and "
83
+ "database prior to performing a rollback. We are not responsible for any "
84
+ "misuse, deletions, white screens, fatal errors, or any other issue arising "
85
+ "from using this plugin."
86
+ msgstr ""
87
+ "<strong>Nota:</strong> recomendamos que faça um teste da reversão num site "
88
+ "de testes e crie uma cópia de segurança completa dos ficheiros do seu "
89
+ "WordPress e base de dados antes de fazer uma reversão. Não somos "
90
+ "responsáveis por qualquer má utilização, eliminação, ecrãs em branco, erros "
91
+ "fatais ou quaisquer problemas que decorram da utilização deste plugin."
92
+
93
+ #: wp-rollback.php:122 wp-rollback.php:134
94
+ msgid "Cheatin&#8217; huh?"
95
+ msgstr "A fazer batota hein?"
96
+
97
+ #: wp-rollback.php:208
98
+ msgid "No Rollback Available: This is a non-WordPress.org theme."
99
+ msgstr "Sem reversão disponível: este tema não é do WordPress.org."
100
+
101
+ #: wp-rollback.php:209
102
+ msgid "Loading..."
103
+ msgstr "A carregar..."
104
+
105
+ #: wp-rollback.php:228
106
+ msgid "Please select a version number to perform a rollback."
107
+ msgstr "Por favor seleccione o número da versão para a qual pretende reverter."
108
+
109
+ #: wp-rollback.php:276
110
+ msgid ""
111
+ "You do not have sufficient permissions to perform rollbacks for this site."
112
+ msgstr "Não tem permissões suficientes para fazer reversões neste site."
113
+
114
+ #: wp-rollback.php:405
115
+ msgid "Installed Version"
116
+ msgstr "Versão instalada"
117
+
118
+ #: wp-rollback.php:634
119
+ msgid ""
120
+ "An unexpected error occurred. Something may be wrong with WordPress.org or "
121
+ "this server&#8217;s configuration. If you continue to have problems, please "
122
+ "try the <a href=\"https://wordpress.org/support/\">support forums</a>."
123
+ msgstr ""
124
+ "Ocorreu um erro inesperado. Algo pode errado no WordPress.org ou na "
125
+ "configuração deste servidor. Se continuar a ter problemas, por favor tente "
126
+ "os <a href=\"https://wordpress.org/support/\">fóruns de suporte</a>."
127
+
128
+ #: wp-rollback.php:634
129
+ msgid ""
130
+ "(WordPress could not establish a secure connection to WordPress.org. Please "
131
+ "contact your server administrator.)"
132
+ msgstr ""
133
+ "(O WordPress não pôde estabelecer uma ligação segura com WordPress.org. "
134
+ "Contacte com o administrador do seu servidor.)"
135
+
136
+ #~ msgid "theme"
137
+ #~ msgstr "tema"
138
+
139
+ #~ msgid "plugin"
140
+ #~ msgstr "plugin"
languages/{wp-rollback.pot → wpr.pot} RENAMED
@@ -1,20 +1,21 @@
 
1
  msgid ""
2
  msgstr ""
3
  "Project-Id-Version: WP Rollback\n"
4
- "POT-Creation-Date: 2015-05-12 14:31-0800\n"
5
- "PO-Revision-Date: 2015-05-12 14:32-0800\n"
6
  "Last-Translator: \n"
7
- "Language-Team: WordImpress <info@wordimpress.com>\n"
8
  "MIME-Version: 1.0\n"
9
  "Content-Type: text/plain; charset=UTF-8\n"
10
  "Content-Transfer-Encoding: 8bit\n"
11
- "X-Generator: Poedit 1.7.6\n"
12
  "X-Poedit-Basepath: ..\n"
 
13
  "X-Poedit-SourceCharset: UTF-8\n"
14
  "X-Poedit-KeywordsList: __;_e;_n:1,2;_x:1,2c;_ex:1,2c;_nx:4c,1,2;esc_attr__;"
15
  "esc_attr_e;esc_attr_x:1,2c;esc_html__;esc_html_e;esc_html_x:1,2c;_n_noop:1,2;"
16
  "_nx_noop:3c,1,2;__ngettext_noop:1,2\n"
17
- "Plural-Forms: nplurals=2; plural=(n != 1);\n"
18
  "X-Poedit-SearchPath-0: .\n"
19
  "X-Poedit-SearchPathExcluded-0: *.js\n"
20
 
@@ -29,47 +30,56 @@ msgid ""
29
  "support."
30
  msgstr ""
31
 
32
- #: includes/rollback-menu.php:23
 
33
  msgid "WP Rollback"
34
  msgstr ""
35
 
36
- #: includes/rollback-menu.php:25
37
  #, php-format
38
  msgid ""
39
  "Please select which %1$s version you would like to rollback to from the "
40
  "releases listed below. You currently have version %2$s installed of %3$s."
41
  msgstr ""
42
 
43
- #: includes/rollback-menu.php:63 includes/rollback-menu.php:121
44
- #: wp-rollback.php:211 wp-rollback.php:455 wp-rollback.php:515
 
 
 
 
 
 
 
 
45
  msgid "Rollback"
46
  msgstr ""
47
 
48
- #: includes/rollback-menu.php:64 includes/rollback-menu.php:122
49
  msgid "Cancel"
50
  msgstr ""
51
 
52
- #: includes/rollback-menu.php:82
53
  msgid "Are you sure you want to perform the following rollback?"
54
  msgstr ""
55
 
56
- #: includes/rollback-menu.php:92
57
  msgid "Plugin Name:"
58
  msgstr ""
59
 
60
- #: includes/rollback-menu.php:94
61
  msgid "Theme Name:"
62
  msgstr ""
63
 
64
- #: includes/rollback-menu.php:101
65
  msgid "Installed Version:"
66
  msgstr ""
67
 
68
- #: includes/rollback-menu.php:107
69
  msgid "New Version:"
70
  msgstr ""
71
 
72
- #: includes/rollback-menu.php:117
73
  msgid ""
74
  "<strong>Notice:</strong> We strongly recommend you perform a test rollback "
75
  "on a staging site and create a complete backup of your WordPress files and "
@@ -78,7 +88,7 @@ msgid ""
78
  "from using this plugin."
79
  msgstr ""
80
 
81
- #: wp-rollback.php:122 wp-rollback.php:134
82
  msgid "Cheatin&#8217; huh?"
83
  msgstr ""
84
 
@@ -94,24 +104,37 @@ msgstr ""
94
  msgid "Please select a version number to perform a rollback."
95
  msgstr ""
96
 
97
- #: wp-rollback.php:280
98
  msgid ""
99
  "You do not have sufficient permissions to perform rollbacks for this site."
100
  msgstr ""
101
 
102
- #: wp-rollback.php:402
103
  msgid "Installed Version"
104
  msgstr ""
105
 
106
- #: wp-rollback.php:627
107
  msgid ""
108
  "An unexpected error occurred. Something may be wrong with WordPress.org or "
109
  "this server&#8217;s configuration. If you continue to have problems, please "
110
  "try the <a href=\"https://wordpress.org/support/\">support forums</a>."
111
  msgstr ""
112
 
113
- #: wp-rollback.php:627
114
  msgid ""
115
  "(WordPress could not establish a secure connection to WordPress.org. Please "
116
  "contact your server administrator.)"
117
  msgstr ""
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ #, fuzzy
2
  msgid ""
3
  msgstr ""
4
  "Project-Id-Version: WP Rollback\n"
5
+ "POT-Creation-Date: 2015-07-29 09:51-0700\n"
6
+ "PO-Revision-Date: 2015-07-29 09:50-0700\n"
7
  "Last-Translator: \n"
8
+ "Language-Team: \n"
9
  "MIME-Version: 1.0\n"
10
  "Content-Type: text/plain; charset=UTF-8\n"
11
  "Content-Transfer-Encoding: 8bit\n"
12
+ "X-Generator: Poedit 1.8.3\n"
13
  "X-Poedit-Basepath: ..\n"
14
+ "X-Poedit-WPHeader: wp-rollback.php\n"
15
  "X-Poedit-SourceCharset: UTF-8\n"
16
  "X-Poedit-KeywordsList: __;_e;_n:1,2;_x:1,2c;_ex:1,2c;_nx:4c,1,2;esc_attr__;"
17
  "esc_attr_e;esc_attr_x:1,2c;esc_html__;esc_html_e;esc_html_x:1,2c;_n_noop:1,2;"
18
  "_nx_noop:3c,1,2;__ngettext_noop:1,2\n"
 
19
  "X-Poedit-SearchPath-0: .\n"
20
  "X-Poedit-SearchPathExcluded-0: *.js\n"
21
 
30
  "support."
31
  msgstr ""
32
 
33
+ #. Plugin Name of the plugin/theme
34
+ #: includes/rollback-menu.php:24
35
  msgid "WP Rollback"
36
  msgstr ""
37
 
38
+ #: includes/rollback-menu.php:27
39
  #, php-format
40
  msgid ""
41
  "Please select which %1$s version you would like to rollback to from the "
42
  "releases listed below. You currently have version %2$s installed of %3$s."
43
  msgstr ""
44
 
45
+ #: includes/rollback-menu.php:27
46
+ msgid "theme"
47
+ msgstr ""
48
+
49
+ #: includes/rollback-menu.php:27
50
+ msgid "plugin"
51
+ msgstr ""
52
+
53
+ #: includes/rollback-menu.php:65 includes/rollback-menu.php:123
54
+ #: wp-rollback.php:211 wp-rollback.php:469 wp-rollback.php:531
55
  msgid "Rollback"
56
  msgstr ""
57
 
58
+ #: includes/rollback-menu.php:66 includes/rollback-menu.php:124
59
  msgid "Cancel"
60
  msgstr ""
61
 
62
+ #: includes/rollback-menu.php:84
63
  msgid "Are you sure you want to perform the following rollback?"
64
  msgstr ""
65
 
66
+ #: includes/rollback-menu.php:94
67
  msgid "Plugin Name:"
68
  msgstr ""
69
 
70
+ #: includes/rollback-menu.php:96
71
  msgid "Theme Name:"
72
  msgstr ""
73
 
74
+ #: includes/rollback-menu.php:103
75
  msgid "Installed Version:"
76
  msgstr ""
77
 
78
+ #: includes/rollback-menu.php:109
79
  msgid "New Version:"
80
  msgstr ""
81
 
82
+ #: includes/rollback-menu.php:119
83
  msgid ""
84
  "<strong>Notice:</strong> We strongly recommend you perform a test rollback "
85
  "on a staging site and create a complete backup of your WordPress files and "
88
  "from using this plugin."
89
  msgstr ""
90
 
91
+ #: wp-rollback.php:126 wp-rollback.php:138
92
  msgid "Cheatin&#8217; huh?"
93
  msgstr ""
94
 
104
  msgid "Please select a version number to perform a rollback."
105
  msgstr ""
106
 
107
+ #: wp-rollback.php:281
108
  msgid ""
109
  "You do not have sufficient permissions to perform rollbacks for this site."
110
  msgstr ""
111
 
112
+ #: wp-rollback.php:412
113
  msgid "Installed Version"
114
  msgstr ""
115
 
116
+ #: wp-rollback.php:643
117
  msgid ""
118
  "An unexpected error occurred. Something may be wrong with WordPress.org or "
119
  "this server&#8217;s configuration. If you continue to have problems, please "
120
  "try the <a href=\"https://wordpress.org/support/\">support forums</a>."
121
  msgstr ""
122
 
123
+ #: wp-rollback.php:643
124
  msgid ""
125
  "(WordPress could not establish a secure connection to WordPress.org. Please "
126
  "contact your server administrator.)"
127
  msgstr ""
128
+
129
+ #. Plugin URI of the plugin/theme
130
+ #. Author URI of the plugin/theme
131
+ msgid "http://wordimpress.com"
132
+ msgstr ""
133
+
134
+ #. Description of the plugin/theme
135
+ msgid "Rollback (or forward) any WordPress.org plugin or theme like a boss."
136
+ msgstr ""
137
+
138
+ #. Author of the plugin/theme
139
+ msgid "WordImpress"
140
+ msgstr ""
readme.txt CHANGED
@@ -3,8 +3,8 @@ Contributors: wordimpress, dlocc, drrobotnik, webdevmattcrom
3
  Tags: rollback, revert, downgrade, version, plugins, themes, version, versions, backup, backups, revision, revisions
4
  Requires at least: 3.8
5
  Donate Link: https://wordimpress.com
6
- Tested up to: 4.2.2
7
- Stable tag: 1.2.3
8
  License: GPLv3
9
  License URI: http://www.gnu.org/licenses/gpl-3.0.html
10
 
@@ -109,6 +109,10 @@ This is the first version of this plugin. It is a tool for your convenience. Rol
109
 
110
  == Changelog ==
111
 
 
 
 
 
112
  = 1.2.3 =
113
  * Fixed: XSS hardening. Thanks @secupress
114
  * Fixed: CSRF patch regarding missing nonces. Thanks @secupress
3
  Tags: rollback, revert, downgrade, version, plugins, themes, version, versions, backup, backups, revision, revisions
4
  Requires at least: 3.8
5
  Donate Link: https://wordimpress.com
6
+ Tested up to: 4.2.3
7
+ Stable tag: 1.2.4
8
  License: GPLv3
9
  License URI: http://www.gnu.org/licenses/gpl-3.0.html
10
 
109
 
110
  == Changelog ==
111
 
112
+ = 1.2.4 =
113
+ * New: Portuguese translations added
114
+ * Fix: Limit HTTP requests to Plugin page only #17 @see: https://wordpress.org/support/topic/great-plugin-but-small-issue?replies=5 and https://wordpress.org/support/topic/great-plugin-but-small-issue?replies=1#post-7234287
115
+
116
  = 1.2.3 =
117
  * Fixed: XSS hardening. Thanks @secupress
118
  * Fixed: CSRF patch regarding missing nonces. Thanks @secupress
wp-rollback.php CHANGED
@@ -5,7 +5,7 @@
5
  * Description: Rollback (or forward) any WordPress.org plugin or theme like a boss.
6
  * Author: WordImpress
7
  * Author URI: http://wordimpress.com
8
- * Version: 1.2.3
9
  * Text Domain: wpr
10
  * Domain Path: languages
11
  *
@@ -83,7 +83,11 @@ if ( ! class_exists( 'WP Rollback' ) ) : /**
83
  if ( ! isset( self::$instance ) && ! ( self::$instance instanceof WP_Rollback ) && is_admin() ) {
84
  self::$instance = new WP_Rollback;
85
  self::$instance->setup_constants();
86
- self::$instance->setup_vars();
 
 
 
 
87
 
88
  //i18n
89
  add_action( 'plugins_loaded', array( self::$instance, 'load_textdomain' ) );
@@ -166,7 +170,7 @@ if ( ! class_exists( 'WP Rollback' ) ) : /**
166
  * @access private
167
  * @description:
168
  */
169
- private function setup_vars() {
170
  $this->set_plugin_slug();
171
 
172
  $svn_tags = $this->get_svn_tags( 'plugin', $this->plugin_slug );
@@ -272,6 +276,7 @@ if ( ! class_exists( 'WP Rollback' ) ) : /**
272
  */
273
  public function html() {
274
 
 
275
  if ( ! current_user_can( 'update_plugins' ) ) {
276
  wp_die( __( 'You do not have sufficient permissions to perform rollbacks for this site.', 'wpr' ) );
277
  }
@@ -287,6 +292,8 @@ if ( ! class_exists( 'WP Rollback' ) ) : /**
287
  'plugin' => ''
288
  ) );
289
 
 
 
290
  $args = wp_parse_args( $_GET, $defaults );
291
 
292
  if ( ! empty( $args['plugin_version'] ) ) {
@@ -302,10 +309,11 @@ if ( ! class_exists( 'WP Rollback' ) ) : /**
302
  include WP_ROLLBACK_PLUGIN_DIR . '/includes/class-rollback-theme-upgrader.php';
303
  include WP_ROLLBACK_PLUGIN_DIR . '/includes/rollback-action.php';
304
  } else {
 
305
  //This is the menu
306
  check_admin_referer( 'wpr_rollback_nonce' );
307
-
308
  include WP_ROLLBACK_PLUGIN_DIR . '/includes/rollback-menu.php';
 
309
  }
310
 
311
  }
@@ -456,11 +464,13 @@ if ( ! class_exists( 'WP Rollback' ) ) : /**
456
 
457
  //Only show menu item when necessary (user is interacting with plugin, ie rolling back something)
458
  if ( isset( $_GET['page'] ) && $_GET['page'] == 'wp-rollback' ) {
 
459
  //Add it in a native WP way, like WP updates do... (a dashboard page)
460
  add_dashboard_page( __( 'Rollback', 'wpr' ), __( 'Rollback', 'wpr' ), 'update_plugins', 'wp-rollback', array(
461
  self::$instance,
462
  'html'
463
  ) );
 
464
  }
465
 
466
  }
5
  * Description: Rollback (or forward) any WordPress.org plugin or theme like a boss.
6
  * Author: WordImpress
7
  * Author URI: http://wordimpress.com
8
+ * Version: 1.2.4
9
  * Text Domain: wpr
10
  * Domain Path: languages
11
  *
83
  if ( ! isset( self::$instance ) && ! ( self::$instance instanceof WP_Rollback ) && is_admin() ) {
84
  self::$instance = new WP_Rollback;
85
  self::$instance->setup_constants();
86
+
87
+ //Only setup plugin rollback on specific page
88
+ if(isset($_GET['plugin_file']) && $_GET['page'] == 'wp-rollback') {
89
+ self::$instance->setup_plugin_vars();
90
+ }
91
 
92
  //i18n
93
  add_action( 'plugins_loaded', array( self::$instance, 'load_textdomain' ) );
170
  * @access private
171
  * @description:
172
  */
173
+ private function setup_plugin_vars() {
174
  $this->set_plugin_slug();
175
 
176
  $svn_tags = $this->get_svn_tags( 'plugin', $this->plugin_slug );
276
  */
277
  public function html() {
278
 
279
+ //Permissions check
280
  if ( ! current_user_can( 'update_plugins' ) ) {
281
  wp_die( __( 'You do not have sufficient permissions to perform rollbacks for this site.', 'wpr' ) );
282
  }
292
  'plugin' => ''
293
  ) );
294
 
295
+
296
+
297
  $args = wp_parse_args( $_GET, $defaults );
298
 
299
  if ( ! empty( $args['plugin_version'] ) ) {
309
  include WP_ROLLBACK_PLUGIN_DIR . '/includes/class-rollback-theme-upgrader.php';
310
  include WP_ROLLBACK_PLUGIN_DIR . '/includes/rollback-action.php';
311
  } else {
312
+
313
  //This is the menu
314
  check_admin_referer( 'wpr_rollback_nonce' );
 
315
  include WP_ROLLBACK_PLUGIN_DIR . '/includes/rollback-menu.php';
316
+
317
  }
318
 
319
  }
464
 
465
  //Only show menu item when necessary (user is interacting with plugin, ie rolling back something)
466
  if ( isset( $_GET['page'] ) && $_GET['page'] == 'wp-rollback' ) {
467
+
468
  //Add it in a native WP way, like WP updates do... (a dashboard page)
469
  add_dashboard_page( __( 'Rollback', 'wpr' ), __( 'Rollback', 'wpr' ), 'update_plugins', 'wp-rollback', array(
470
  self::$instance,
471
  'html'
472
  ) );
473
+
474
  }
475
 
476
  }