Version Description
- 17.06.2014 =
- Update : We updated all functionality for Wordpress 3.9.1.
- NEW : The Russian and Italian language files are added to the plugin.
Download this release
Release Info
Developer | galerio |
Plugin | Better Delete Revision |
Version | 1.3 |
Comparing to | |
See all releases |
Code changes from version 1.2 to 1.3
- better-delete-revision.php +290 -245
- changelog.txt +4 -0
- css/style.css +29 -0
- languages/bdr-it_IT.mo +0 -0
- languages/bdr-it_IT.po +175 -0
- languages/bdr-ru_RU.mo +0 -0
- languages/bdr-ru_RU.po +175 -0
- misc-docs/sql-queries.txt +0 -55
- misc-docs/various-writings.txt +0 -23
- php/functions.php +0 -51
- readme.txt +5 -1
- todo.txt +0 -17
better-delete-revision.php
CHANGED
@@ -1,9 +1,7 @@
|
|
1 |
<?php
|
2 |
/*
|
3 |
Plugin Name: Better Delete Revision
|
4 |
-
|
5 |
-
Plugin URI: http://www.1e2.it/tag/better-delete-revision
|
6 |
-
|
7 |
Description: Better Delete Revision is based on the old "Delete Revision" plugin
|
8 |
but it is compatible with the latest version of Wordpress (3.x) with improved
|
9 |
features. It not only deletes redundant revisions of posts from your Wordpress
|
@@ -15,274 +13,321 @@ revision removal this plugin will keep your database lighter and smaller
|
|
15 |
throughout use. Removing old revisions and database optimizations is one of the
|
16 |
best things you can do to your Wordpress blog to keep it running as fast as it
|
17 |
can.
|
18 |
-
|
19 |
-
Version: 1.
|
20 |
-
|
21 |
-
|
22 |
-
|
23 |
-
Author URI: http://www.1e2.it
|
24 |
-
|
25 |
-
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY
|
26 |
-
KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE
|
27 |
-
WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR
|
28 |
-
PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS
|
29 |
-
OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR
|
30 |
-
OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR
|
31 |
-
OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
|
32 |
-
SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
33 |
*/
|
34 |
|
35 |
/*
|
36 |
-
|
37 |
-
|
38 |
-
|
39 |
-
|
40 |
-
|
41 |
-
|
42 |
-
|
43 |
-
|
44 |
-
First public ver1.0
|
45 |
*/
|
46 |
|
47 |
-
/* Check if various options exist in the current Wordpress Database */
|
48 |
/*
|
49 |
-
|
50 |
-
|
51 |
-
if(!
|
52 |
-
{
|
53 |
-
|
|
|
54 |
}
|
55 |
|
56 |
/*
|
57 |
-
|
58 |
-
|
59 |
-
|
60 |
-
|
61 |
-
|
62 |
-
|
63 |
|
64 |
-
|
65 |
-
|
66 |
-
|
67 |
-
|
68 |
-
|
69 |
-
/*
|
70 |
-
* add_options_page( $page_title, $menu_title, $capability,
|
71 |
-
* $menu_slug, $function);
|
72 |
-
*/
|
73 |
-
function bdelete_revision_main()
|
74 |
-
{
|
75 |
-
if(function_exists('add_options_page'))
|
76 |
-
{
|
77 |
-
add_options_page('Better Delete Revision',
|
78 |
-
'Better Delete Revision',
|
79 |
-
'manage_options',
|
80 |
-
basename(__FILE__),
|
81 |
-
'my_options_bdelete_revision');
|
82 |
-
}
|
83 |
}
|
84 |
|
85 |
-
/* Add the above action to the Wordpress Admin Menu */
|
86 |
-
add_action('admin_menu', 'bdelete_revision_main');
|
87 |
-
|
88 |
/*
|
89 |
-
|
90 |
-
|
91 |
-
|
92 |
-
{
|
93 |
-
|
94 |
-
|
95 |
-
|
96 |
-
<div class="wrap">
|
97 |
-
<h2>Better Delete Revision Manager <font size=1>Version $bdr_version</font></h2>
|
98 |
-
<div class="widget"><p style="margin:10px;">
|
99 |
-
EOT;
|
100 |
-
|
101 |
-
echo get_count_notice();
|
102 |
|
103 |
-
|
|
|
|
|
|
|
|
|
|
|
104 |
|
105 |
-
|
106 |
-
|
107 |
-
|
108 |
-
|
109 |
-
|
110 |
-
|
111 |
-
|
112 |
-
|
113 |
-
|
114 |
-
|
115 |
-
</script>";
|
116 |
-
}
|
117 |
-
else if (isset($_POST['get_rev']))
|
118 |
-
{
|
119 |
-
get_my_revision();
|
120 |
-
}
|
121 |
-
else if (isset($_POST['maintain_mysql']))
|
122 |
-
{
|
123 |
-
if ($_POST['operation'] == 'OPTIMIZE' )
|
124 |
-
{
|
125 |
-
echo maintain_mysql('OPTIMIZE');
|
126 |
-
}
|
127 |
-
else
|
128 |
-
{
|
129 |
-
echo maintain_mysql('CHECK');
|
130 |
}
|
131 |
}
|
132 |
-
|
133 |
-
{
|
134 |
-
echo '<form method="post" action="">';
|
135 |
-
echo '<input class="button" type="submit" name="get_rev" value="';
|
136 |
-
_e('Check Revision Posts','bdelete-revision');
|
137 |
-
echo '" /> <input class="button" type="submit" name="maintain_mysql" value="';
|
138 |
-
_e('Optimize Your Database','bdelete-revision');
|
139 |
-
echo '" /></form></div>';
|
140 |
|
141 |
-
|
142 |
-
|
143 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
144 |
}
|
145 |
|
146 |
/*
|
147 |
-
|
148 |
-
|
149 |
-
|
150 |
-
{
|
151 |
-
|
152 |
-
|
153 |
-
|
154 |
-
|
155 |
-
|
156 |
-
|
157 |
-
|
158 |
-
|
159 |
-
|
160 |
-
$res_no = count($results);
|
161 |
-
echo "<table class='widefat'><thead>";
|
162 |
-
echo "<tr><th width=30> Id </th><th width=450> Title </th><th width=180> Post date </th><th width=180> Last modified </th></tr></thead>";
|
163 |
-
|
164 |
-
for($i = 0 ; $i < $res_no ; $i++)
|
165 |
-
{
|
166 |
-
echo "<tr><td>".$results[$i] -> ID."</td>";
|
167 |
-
echo "<td>".$results[$i] -> post_title."</td>";
|
168 |
-
echo "<td>".$results[$i] -> post_date."</td>";
|
169 |
-
echo "<td>".$results[$i] -> post_modified."</td></tr>";
|
170 |
-
}
|
171 |
-
|
172 |
-
echo "</table><br />";
|
173 |
-
echo "Would you like to remove the revision posts ? <br />";
|
174 |
-
echo <<<EOT
|
175 |
-
<form method="post" action="">
|
176 |
-
<input type="hidden" name="rev_no" value=" $res_no " />
|
177 |
-
EOT;
|
178 |
-
echo '<input class="button-primary" type="submit" name="del_act" value="';
|
179 |
-
|
180 |
-
printf(__('Yes , I would like to delete them! (A Total Of %s)','bdelete-revision'),$res_no);
|
181 |
-
|
182 |
-
echo '" /><input class="button" type="submit" name="goback" value="';
|
183 |
-
|
184 |
-
_e('No , I prefer to keep them!','bdelete-revision');
|
185 |
-
|
186 |
-
echo '" /></form></div>';
|
187 |
}
|
188 |
-
else {echo "<div class=\"updated\" style=\"margin:50px 0;padding:6px;line-height:16pt;font-weight:bolder;\">";
|
189 |
-
_e('Great! You have no revisions now!','bdelete-revision');
|
190 |
-
echo "</div></div>";}
|
191 |
}
|
192 |
|
193 |
/*
|
194 |
-
|
195 |
-
|
196 |
-
|
197 |
-
{
|
198 |
-
|
199 |
-
|
200 |
-
|
201 |
-
|
202 |
-
|
203 |
-
|
204 |
-
|
205 |
-
|
206 |
-
|
207 |
-
|
208 |
}
|
209 |
|
210 |
/*
|
211 |
-
|
212 |
-
|
213 |
-
|
214 |
-
{
|
215 |
-
|
216 |
-
|
217 |
-
|
218 |
-
|
219 |
-
|
220 |
-
$Tables_in_DB_NAME = 'Tables_in_'.DB_NAME;
|
221 |
-
|
222 |
-
foreach($Tables as $k=>$v)
|
223 |
-
{
|
224 |
-
$_tabName = $v -> $Tables_in_DB_NAME ;
|
225 |
-
$query .= " `$_tabName`,";
|
226 |
-
}
|
227 |
-
|
228 |
-
$query = substr($query,0,strlen($query)-1);
|
229 |
-
$result = $wpdb -> get_results($query);
|
230 |
-
|
231 |
-
if ($operation == "OPTIMIZE")
|
232 |
-
{
|
233 |
-
return '<h3>'.__('Optimization of database completed!','bdelete-revision').'</h3>';
|
234 |
-
}
|
235 |
|
236 |
-
|
237 |
-
|
238 |
-
|
239 |
-
|
240 |
-
|
241 |
-
|
242 |
-
|
243 |
-
|
244 |
-
|
245 |
-
|
246 |
-
|
247 |
-
|
248 |
-
foreach ($o as $k=>$v)
|
249 |
-
{
|
250 |
-
$tdClass = $j%2 == 1 ? 'active alt' : 'inactive';
|
251 |
-
|
252 |
-
if($k == 'Msg_type')
|
253 |
-
{
|
254 |
-
continue;
|
255 |
-
}
|
256 |
-
|
257 |
-
if($k == 'Msg_text' )
|
258 |
-
{
|
259 |
-
if ($v == 'OK')
|
260 |
-
{
|
261 |
-
$res .= "<td class='$tdClass' ><font color='green'><b>$v</b></font></td>";
|
262 |
-
}
|
263 |
-
else
|
264 |
-
{
|
265 |
-
$res .= "<td class='$tdClass' ><font color='red'><b>$v</b></font></td>";
|
266 |
-
}
|
267 |
-
}
|
268 |
-
else
|
269 |
-
{
|
270 |
-
$res .= "<td class='$tdClass' >$v</td>";
|
271 |
-
}
|
272 |
-
}
|
273 |
-
|
274 |
-
$res .= "</tr>";
|
275 |
-
}
|
276 |
-
|
277 |
-
$res .= "<tfoot><tr><th colspan=3>";
|
278 |
-
$res .= "If all statuses are <font color='green'>OK</font>, then your database does not need any optimization! ";
|
279 |
-
$res .= "If any are <font color='red'>red</font>, then click on the following button to optimize your Wordpress database.";
|
280 |
-
$res .= "</th></tr></tfoot></table>";
|
281 |
-
|
282 |
-
$res .= "<br /><form method='post' action=''>
|
283 |
-
<input name='operation' type='hidden' value='OPTIMIZE' />
|
284 |
-
<input name='maintain_mysql' type='hidden' value='OPTIMIZE' />
|
285 |
-
<input name='submit' type='submit' class='button-primary' value='".__('Optimize Wordpress Database','bdelete-revision')."' /></form>";
|
286 |
-
|
287 |
-
return $res;
|
288 |
-
}
|
1 |
<?php
|
2 |
/*
|
3 |
Plugin Name: Better Delete Revision
|
4 |
+
Plugin URI: http://www.1e2.it/tag/better-delete-revision/
|
|
|
|
|
5 |
Description: Better Delete Revision is based on the old "Delete Revision" plugin
|
6 |
but it is compatible with the latest version of Wordpress (3.x) with improved
|
7 |
features. It not only deletes redundant revisions of posts from your Wordpress
|
13 |
throughout use. Removing old revisions and database optimizations is one of the
|
14 |
best things you can do to your Wordpress blog to keep it running as fast as it
|
15 |
can.
|
16 |
+
Author: Galerio & Urda, BestWebLayout
|
17 |
+
Version: 1.3
|
18 |
+
Author URI: http://www.1e2.it/
|
19 |
+
License: GPLv2 or later
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
20 |
*/
|
21 |
|
22 |
/*
|
23 |
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY
|
24 |
+
KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE
|
25 |
+
WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR
|
26 |
+
PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS
|
27 |
+
OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR
|
28 |
+
OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR
|
29 |
+
OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
|
30 |
+
SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
|
|
31 |
*/
|
32 |
|
|
|
33 |
/*
|
34 |
+
* Function to display admin menu.
|
35 |
+
*/
|
36 |
+
if ( ! function_exists( 'bdr_admin_menu' ) ) {
|
37 |
+
function bdr_admin_menu() {
|
38 |
+
add_options_page( __( 'Better Delete Revision', 'bdr' ), __( 'Better Delete Revision', 'bdr' ), 'manage_options', basename( __FILE__ ), 'bdr_page' );
|
39 |
+
}
|
40 |
}
|
41 |
|
42 |
/*
|
43 |
+
* Function to add localization to the plugin.
|
44 |
+
*/
|
45 |
+
if ( ! function_exists ( 'bdr_init' ) ) {
|
46 |
+
function bdr_init() {
|
47 |
+
/* Internationalization. */
|
48 |
+
load_plugin_textdomain( 'bdr', false, dirname( plugin_basename( __FILE__ ) ) . '/languages/' );
|
49 |
|
50 |
+
if ( isset( $_GET['page'] ) && $_GET['page'] == 'better-delete-revision.php' ) {
|
51 |
+
bdr_default_options();
|
52 |
+
}
|
53 |
+
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
54 |
}
|
55 |
|
|
|
|
|
|
|
56 |
/*
|
57 |
+
* Function to add script and styles to the admin panel.
|
58 |
+
*/
|
59 |
+
if ( ! function_exists( 'bdr_admin_head' ) ) {
|
60 |
+
function bdr_admin_head() {
|
61 |
+
wp_enqueue_style( 'bdr_stylesheet', plugins_url( 'css/style.css', __FILE__ ) );
|
62 |
+
}
|
63 |
+
}
|
|
|
|
|
|
|
|
|
|
|
|
|
64 |
|
65 |
+
/*
|
66 |
+
* Function to set up options.
|
67 |
+
*/
|
68 |
+
if ( ! function_exists( 'bdr_default_options' ) ) {
|
69 |
+
function bdr_default_options() {
|
70 |
+
global $wpmu, $bdr_rev_no;
|
71 |
|
72 |
+
if ( $wpmu == 1 ) {
|
73 |
+
if ( ! get_site_option( 'bdr_rev_no' ) ) {
|
74 |
+
add_site_option( 'bdr_rev_no', 0, '', 'yes' );
|
75 |
+
}
|
76 |
+
$bdr_rev_no = get_site_option( 'bdr_rev_no' );
|
77 |
+
} else {
|
78 |
+
if ( ! get_option( 'bdr_rev_no' ) ) {
|
79 |
+
add_option( 'bdr_rev_no', 0, '', 'yes' );
|
80 |
+
}
|
81 |
+
$bdr_rev_no = get_option( 'bdr_rev_no' );
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
82 |
}
|
83 |
}
|
84 |
+
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
85 |
|
86 |
+
/*
|
87 |
+
* Function to display plugin main settings page.
|
88 |
+
*/
|
89 |
+
if ( ! function_exists( 'bdr_page' ) ) {
|
90 |
+
function bdr_page() {
|
91 |
+
global $wpdb, $bdr_rev_no;
|
92 |
+
|
93 |
+
$bdr_plugin_info = get_plugin_data( __FILE__ );
|
94 |
+
$bdr_version = $bdr_plugin_info['Version'];
|
95 |
+
$bdr_posts = count(
|
96 |
+
$wpdb->get_results(
|
97 |
+
"SELECT ID
|
98 |
+
FROM ($wpdb->posts)
|
99 |
+
WHERE `post_type` = 'post'"
|
100 |
+
)
|
101 |
+
); ?>
|
102 |
+
<div class="wrap">
|
103 |
+
<h2><?php _e( 'Better Delete Revision Manager', 'bdr' ); ?> <font size=1><?php echo $bdr_version; ?></font></h2>
|
104 |
+
<div class="bdr_widget">
|
105 |
+
<p><?php _e( 'You have', 'bdr' ); ?> <span><?php echo $bdr_posts; ?></span> <?php _e( 'posts', 'bdr' ); ?>.</p>
|
106 |
+
<p><?php _e( 'Since you started using Better Delete Revision', 'bdr' ); ?>, <span id="bdr_revs_no"><?php echo $bdr_rev_no; ?></span> <?php _e( 'redundant post revisions have been removed!', 'bdr' ); ?></p>
|
107 |
+
</div><!-- .widget -->
|
108 |
+
<?php if ( isset( $_POST['bdr_get_rev'] ) && check_admin_referer( plugin_basename( __FILE__ ) ) ) {
|
109 |
+
$bdr_results = $wpdb->get_results(
|
110 |
+
"SELECT `ID`,`post_date`,`post_title`,`post_modified`
|
111 |
+
FROM ($wpdb->posts)
|
112 |
+
WHERE `post_type` = 'revision'
|
113 |
+
ORDER BY `ID` DESC"
|
114 |
+
);
|
115 |
+
if ( $bdr_results ) {
|
116 |
+
$bdr_res_no = count( $bdr_results ); ?>
|
117 |
+
<table class="widefat bdr_table">
|
118 |
+
<thead>
|
119 |
+
<tr>
|
120 |
+
<th width="30"><?php _e( 'Id', 'bdr' ); ?></th>
|
121 |
+
<th width="450"><?php _e( 'Title', 'bdr' ); ?></th>
|
122 |
+
<th width="180"><?php _e( 'Post date', 'bdr' ); ?></th>
|
123 |
+
<th width="180"><?php _e( 'Last modified', 'bdr' ); ?></th>
|
124 |
+
</tr>
|
125 |
+
</thead>
|
126 |
+
<tbody>
|
127 |
+
<?php for ( $i = 0 ; $i < $bdr_res_no ; $i++ ) { ?>
|
128 |
+
<tr>
|
129 |
+
<td><?php echo $bdr_results[ $i ]->ID; ?></td>
|
130 |
+
<td><?php echo $bdr_results[ $i ]->post_title; ?></td>
|
131 |
+
<td><?php echo $bdr_results[ $i ]->post_date; ?></td>
|
132 |
+
<td><?php echo $bdr_results[ $i ]->post_modified; ?></td>
|
133 |
+
</tr>
|
134 |
+
<?php } ?>
|
135 |
+
</tbody>
|
136 |
+
</table>
|
137 |
+
<p><?php _e( 'Would you like to remove the revision posts?', 'bdr' )?></p>
|
138 |
+
<form class="bdr_form" method="post" action="options-general.php?page=better-delete-revision.php">
|
139 |
+
<?php wp_nonce_field( plugin_basename( __FILE__ ) ); ?>
|
140 |
+
<input type="hidden" name="bdr_rev_no" value="<?php echo $bdr_res_no; ?>" />
|
141 |
+
<input class="button-primary" type="submit" name="bdr_del_act" value="<?php printf( __( 'Yes , I would like to delete them! (A Total Of %s)' , 'bdr' ), $bdr_res_no ); ?>" />
|
142 |
+
<input class="button" type="submit" name="goback" value="<?php _e( 'No , I prefer to keep them!', 'bdr' ); ?>" />
|
143 |
+
</form>
|
144 |
+
<?php } else { ?>
|
145 |
+
<div class="updated bdr_no_rev">
|
146 |
+
<?php _e( 'Great! You have no revisions now!', 'bdr' ); ?>
|
147 |
+
</div>
|
148 |
+
<?php }
|
149 |
+
} elseif ( isset( $_POST['bdr_del_act'] ) && check_admin_referer( plugin_basename( __FILE__ ) ) ) {
|
150 |
+
$bdr_results = $wpdb->get_results(
|
151 |
+
"DELETE a,b,c
|
152 |
+
FROM $wpdb->posts a
|
153 |
+
LEFT JOIN $wpdb->term_relationships b
|
154 |
+
ON (a.ID = b.object_id)
|
155 |
+
LEFT JOIN $wpdb->postmeta c
|
156 |
+
ON (a.ID = c.post_id)
|
157 |
+
WHERE a.post_type = 'revision'"
|
158 |
+
);
|
159 |
+
$bdr_del_no = $_POST['bdr_rev_no'];
|
160 |
+
$bdr_rev_new = $bdr_rev_no + $bdr_del_no;
|
161 |
+
update_option( 'bdr_rev_no', $bdr_rev_new ); ?>
|
162 |
+
<div class="updated bdr_updated">
|
163 |
+
<p>
|
164 |
+
<strong><?php printf( __( 'Deleted %s revisions!', 'bdr' ), sprintf( '<span>%s</span>', $bdr_del_no ) ); ?></strong>
|
165 |
+
</p>
|
166 |
+
</div>
|
167 |
+
<script type="text/javascript">
|
168 |
+
document.getElementById( 'bdr_revs_no' ).innerHTML = <?php echo $bdr_rev_new; ?>;
|
169 |
+
</script>
|
170 |
+
<?php } elseif ( isset( $_POST['bdr_maintain_mysql'] ) && check_admin_referer( plugin_basename( __FILE__ ) ) ) {
|
171 |
+
if ( isset( $_POST['bdr_operation'] ) && $_POST['bdr_operation'] == 'OPTIMIZE' ) {
|
172 |
+
$bdr_operation = 'OPTIMIZE';
|
173 |
+
} else {
|
174 |
+
$bdr_operation = 'CHECK';
|
175 |
+
}
|
176 |
+
|
177 |
+
$bdr_tables = $wpdb->get_results( 'SHOW TABLES IN ' . DB_NAME );
|
178 |
+
$bdr_query = "$bdr_operation TABLE";
|
179 |
+
$bdr_tables_in_db_name = 'Tables_in_' . DB_NAME;
|
180 |
+
|
181 |
+
foreach ( $bdr_tables as $k => $v ) {
|
182 |
+
$bdr_table = $v->$bdr_tables_in_db_name;
|
183 |
+
$bdr_query .= " `$bdr_table`,";
|
184 |
+
}
|
185 |
+
$bdr_query = substr( $bdr_query, 0, strlen( $bdr_query ) - 1 );
|
186 |
+
$bdr_result = $wpdb->get_results( $bdr_query );
|
187 |
+
|
188 |
+
switch ( $bdr_operation ) {
|
189 |
+
case 'OPTIMIZE': ?>
|
190 |
+
<h3><?php _e( 'Optimization of database completed!', 'bdr' ); ?></h3>
|
191 |
+
<?php break;
|
192 |
+
case 'CHECK':
|
193 |
+
default: ?>
|
194 |
+
<table border="0" class="widefat bdr_table">
|
195 |
+
<thead>
|
196 |
+
<tr>
|
197 |
+
<th><?php _e( 'Table', 'bdr' ); ?></th>
|
198 |
+
<th><?php _e( 'OP', 'bdr' ); ?></th>
|
199 |
+
<th><?php _e( 'Status', 'bdr' ); ?></th>
|
200 |
+
</tr>
|
201 |
+
</thead>
|
202 |
+
<tbody>
|
203 |
+
<?php foreach ( $bdr_result as $j => $o ) { ?>
|
204 |
+
<tr>
|
205 |
+
<?php foreach ( $o as $k => $v ) {
|
206 |
+
$bdr_tr_class = $j%2 == 1 ? 'active alt' : 'inactive';
|
207 |
+
if ( $k == 'Msg_type' ) {
|
208 |
+
continue;
|
209 |
+
}
|
210 |
+
if ( $k == 'Msg_text' ) {
|
211 |
+
if ( $v == 'OK' ) { ?>
|
212 |
+
<td class="<?php echo $bdr_tr_class; ?>">
|
213 |
+
<font color="green">
|
214 |
+
<b><?php echo $v; ?></b>
|
215 |
+
</font>
|
216 |
+
</td>
|
217 |
+
<?php } else { ?>
|
218 |
+
<td class="<?php echo $bdr_tr_class; ?>">
|
219 |
+
<font color="red">
|
220 |
+
<b><?php echo $v; ?></b>
|
221 |
+
</font>
|
222 |
+
</td>
|
223 |
+
<?php }
|
224 |
+
} else { ?>
|
225 |
+
<td class="<?php echo $bdr_tr_class; ?>">
|
226 |
+
<?php echo $v; ?>
|
227 |
+
</td>
|
228 |
+
<?php }
|
229 |
+
} ?>
|
230 |
+
</tr>
|
231 |
+
<?php } ?>
|
232 |
+
</tbody>
|
233 |
+
<tfoot>
|
234 |
+
<tr>
|
235 |
+
<th colspan="3">
|
236 |
+
<?php printf(
|
237 |
+
__( 'If all statuses are %s, then your database does not need any optimization! If any are %s, then click on the following button to optimize your Wordpress database.', 'bdr' ),
|
238 |
+
sprintf( '<font color="green">%s</font>', __( 'OK', 'bdr' ) ),
|
239 |
+
sprintf( '<font color="red">%s</font>', __( 'red', 'bdr' ) )
|
240 |
+
); ?>
|
241 |
+
</th>
|
242 |
+
</tr>
|
243 |
+
</tfoot>
|
244 |
+
</table>
|
245 |
+
<form class="bdr_form" method="post" action="options-general.php?page=better-delete-revision.php">
|
246 |
+
<?php wp_nonce_field( plugin_basename( __FILE__ ) ); ?>
|
247 |
+
<input name="bdr_operation" type="hidden" value="OPTIMIZE" />
|
248 |
+
<input name="bdr_maintain_mysql" type="hidden" value="OPTIMIZE" />
|
249 |
+
<input name="submit" type="submit" class="button-primary" value="<?php _e( 'Optimize Wordpress Database', 'bdr' ); ?>" />
|
250 |
+
</form>
|
251 |
+
<?php break;
|
252 |
+
}
|
253 |
+
} else { ?>
|
254 |
+
<form class="bdr_form" method="post" action="options-general.php?page=better-delete-revision.php">
|
255 |
+
<?php wp_nonce_field( plugin_basename( __FILE__ ) ); ?>
|
256 |
+
<input class="button" type="submit" name="bdr_get_rev" value="<?php _e( 'Check Revision Posts', 'bdr' ); ?>" />
|
257 |
+
<input class="button" type="submit" name="bdr_maintain_mysql" value="<?php _e( 'Optimize Your Database', 'bdr' ); ?>" />
|
258 |
+
</form>
|
259 |
+
<?php } ?>
|
260 |
+
<div class="bdr_widget">
|
261 |
+
<p>
|
262 |
+
<?php _e( 'Post Revisions are a feature introduced in Wordpress 2.6. Whenever you or Wordpress saves a post or a page, a revision is automatically created and stored in your Wordpress database. Each additional revision will slowly increase the size of your database. If you save a post or page multiple times, your number of revisions will greatly increase overtime. For example, if you have 100 posts and each post has 10 revisions you could be storing up to 1,000 copies of older data!', 'bdr' ); ?>
|
263 |
+
</p>
|
264 |
+
<br />
|
265 |
+
<p>
|
266 |
+
<?php _e( 'The Better Delete Revision plugin is your #1 choice to quickly and easily removing revision from your Wordpress database. Try it out today to see what a lighter and smaller Wordpress database can do for you!', 'bdr' ); ?>
|
267 |
+
</p>
|
268 |
+
<br />
|
269 |
+
<p>
|
270 |
+
<?php _e( 'Thank you for using this plugin! I hope you enjoy it!', 'bdr' ); ?>
|
271 |
+
</p>
|
272 |
+
<br />
|
273 |
+
<p><?php _e( 'Author:', 'bdr' ); ?> <a href="http://www.1e2.it" target="_blank">http://www.1e2.it</a></p>
|
274 |
+
</div>
|
275 |
+
</div><!-- .wrap -->
|
276 |
+
<?php }
|
277 |
}
|
278 |
|
279 |
/*
|
280 |
+
* Adds Settings link to the plugins page
|
281 |
+
*/
|
282 |
+
if ( ! function_exists( 'bdr_plugin_action_links' ) ) {
|
283 |
+
function bdr_plugin_action_links( $links, $file ) {
|
284 |
+
/* Static so we don't call plugin_basename on every plugin row. */
|
285 |
+
static $this_plugin;
|
286 |
+
if ( ! $this_plugin )
|
287 |
+
$this_plugin = plugin_basename( __FILE__ );
|
288 |
+
if ( $file == $this_plugin ) {
|
289 |
+
$settings_link = '<a href="options-general.php?page=better-delete-revision.php">' . __( 'Settings', 'bdr' ) . '</a>';
|
290 |
+
array_unshift( $links, $settings_link );
|
291 |
+
}
|
292 |
+
return $links;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
293 |
}
|
|
|
|
|
|
|
294 |
}
|
295 |
|
296 |
/*
|
297 |
+
* Adds additional links to the plugins page
|
298 |
+
*/
|
299 |
+
if ( ! function_exists( 'bdr_links' ) ) {
|
300 |
+
function bdr_links( $links, $file ) {
|
301 |
+
/* Static so we don't call plugin_basename on every plugin row. */
|
302 |
+
static $base;
|
303 |
+
if ( ! $base )
|
304 |
+
$base = plugin_basename( __FILE__ );
|
305 |
+
if ( $file == $base ) {
|
306 |
+
$links[] = '<a href="options-general.php?page=better-delete-revision.php">' . __( 'Settings','bdr' ) . '</a>';
|
307 |
+
$links[] = '<a href="http://wordpress.org/plugins/better-delete-revision/faq" target="_blank">' . __( 'FAQ','bdr' ) . '</a>';
|
308 |
+
}
|
309 |
+
return $links;
|
310 |
+
}
|
311 |
}
|
312 |
|
313 |
/*
|
314 |
+
* Function to uninstall plugin.
|
315 |
+
*/
|
316 |
+
if ( ! function_exists( 'bdr_uninstall' ) ) {
|
317 |
+
function bdr_uninstall() {
|
318 |
+
delete_option( 'bdr_rev_no' );
|
319 |
+
delete_site_option( 'bdr_rev_no' );
|
320 |
+
}
|
321 |
+
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
322 |
|
323 |
+
/* Displaying admin menu */
|
324 |
+
add_action( 'admin_menu', 'bdr_admin_menu' );
|
325 |
+
/* Initialization */
|
326 |
+
add_action( 'init', 'bdr_init' );
|
327 |
+
/* Adding styles in the admin panel */
|
328 |
+
add_action( 'admin_enqueue_scripts', 'bdr_admin_head' );
|
329 |
+
/* Adds additional links to the plugins page */
|
330 |
+
add_filter( 'plugin_action_links', 'bdr_plugin_action_links', 10, 2 );
|
331 |
+
add_filter( 'plugin_row_meta', 'bdr_links', 10, 2 );
|
332 |
+
/* Uninstall plugin */
|
333 |
+
register_uninstall_hook( __FILE__, 'bdr_uninstall' );
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
changelog.txt
CHANGED
@@ -1,3 +1,7 @@
|
|
|
|
|
|
|
|
|
|
1 |
2011-01-25 v1.2 Used the Roles and Capabilities system instead of User Level
|
2 |
|
3 |
2010-10-21 v1.1
|
1 |
+
2014-06-17 v1.3
|
2 |
+
* Update : We updated all functionality for Wordpress 3.9.1.
|
3 |
+
* NEW : The Russian and Italian language file added to the plugin.
|
4 |
+
|
5 |
2011-01-25 v1.2 Used the Roles and Capabilities system instead of User Level
|
6 |
|
7 |
2010-10-21 v1.1
|
css/style.css
ADDED
@@ -0,0 +1,29 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
/*
|
2 |
+
* Better Delete Revision styles
|
3 |
+
*/
|
4 |
+
|
5 |
+
.bdr_widget {
|
6 |
+
margin: 0 0 20px;
|
7 |
+
}
|
8 |
+
.bdr_widget p {
|
9 |
+
margin: 0;
|
10 |
+
}
|
11 |
+
.bdr_widget p span {
|
12 |
+
font-weight: bolder;
|
13 |
+
color: red;
|
14 |
+
}
|
15 |
+
.bdr_form,
|
16 |
+
.bdr_table {
|
17 |
+
margin: 0 0 20px;
|
18 |
+
}
|
19 |
+
.bdr_no_rev,
|
20 |
+
.bdr_updated {
|
21 |
+
margin: 0 0 20px !important;
|
22 |
+
padding: 5px;
|
23 |
+
line-height: 16pt;
|
24 |
+
font-weight: bolder;
|
25 |
+
}
|
26 |
+
.updated span{
|
27 |
+
font-weight: bolder;
|
28 |
+
color: red;
|
29 |
+
}
|
languages/bdr-it_IT.mo
ADDED
Binary file
|
languages/bdr-it_IT.po
ADDED
@@ -0,0 +1,175 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
msgid ""
|
2 |
+
msgstr ""
|
3 |
+
"Project-Id-Version: Better Delete Revision\n"
|
4 |
+
"Report-Msgid-Bugs-To: \n"
|
5 |
+
"POT-Creation-Date: 2014-06-17 12:06+0300\n"
|
6 |
+
"PO-Revision-Date: 2014-06-19 10:39+0100\n"
|
7 |
+
"Last-Translator: Galerio\n"
|
8 |
+
"Language-Team: BestWebLayout <social@bestweblayout.com>\n"
|
9 |
+
"Language: ru\n"
|
10 |
+
"MIME-Version: 1.0\n"
|
11 |
+
"Content-Type: text/plain; charset=UTF-8\n"
|
12 |
+
"Content-Transfer-Encoding: 8bit\n"
|
13 |
+
"Plural-Forms: nplurals=3; plural=n%100/10==1 ? 2 : n%10==1 ? 0 : (n+9)%10>3 ? 2 : 1;\n"
|
14 |
+
"X-Generator: Poedit 1.6.5\n"
|
15 |
+
"X-Poedit-SourceCharset: utf-8\n"
|
16 |
+
"X-Poedit-KeywordsList: __;_e\n"
|
17 |
+
"X-Poedit-Basepath: ..\n"
|
18 |
+
"X-Textdomain-Support: yes\n"
|
19 |
+
"X-Poedit-Language: Russian\n"
|
20 |
+
"X-Poedit-SearchPath-0: .\n"
|
21 |
+
|
22 |
+
# @ bdr
|
23 |
+
#: better-delete-revision.php:38
|
24 |
+
msgid "Better Delete Revision"
|
25 |
+
msgstr "Better Delete Revision "
|
26 |
+
|
27 |
+
# @ bdr
|
28 |
+
#: better-delete-revision.php:103
|
29 |
+
msgid "Better Delete Revision Manager"
|
30 |
+
msgstr "Better Delete Revision Manager"
|
31 |
+
|
32 |
+
#: better-delete-revision.php:105
|
33 |
+
msgid "You have"
|
34 |
+
msgstr "Tu hai"
|
35 |
+
|
36 |
+
#: better-delete-revision.php:105
|
37 |
+
msgid "posts"
|
38 |
+
msgstr "post"
|
39 |
+
|
40 |
+
# @ bdr
|
41 |
+
#: better-delete-revision.php:106
|
42 |
+
msgid "Since you started using Better Delete Revision"
|
43 |
+
msgstr "Da quando hai iniziato a usare Better Delete Revision"
|
44 |
+
|
45 |
+
#: better-delete-revision.php:106
|
46 |
+
msgid "redundant post revisions have been removed!"
|
47 |
+
msgstr "revisioni di post ridondanti eliminati!"
|
48 |
+
|
49 |
+
# @ bdr
|
50 |
+
#: better-delete-revision.php:120
|
51 |
+
msgid "Id"
|
52 |
+
msgstr "Id"
|
53 |
+
|
54 |
+
# @ bdr
|
55 |
+
#: better-delete-revision.php:121
|
56 |
+
msgid "Title"
|
57 |
+
msgstr "Titolo"
|
58 |
+
|
59 |
+
# @ bdr
|
60 |
+
#: better-delete-revision.php:122
|
61 |
+
msgid "Post date"
|
62 |
+
msgstr "Data del Post"
|
63 |
+
|
64 |
+
# @ bdr
|
65 |
+
#: better-delete-revision.php:123
|
66 |
+
msgid "Last modified"
|
67 |
+
msgstr "Ultima modifica"
|
68 |
+
|
69 |
+
# @ bdr
|
70 |
+
#: better-delete-revision.php:137
|
71 |
+
msgid "Would you like to remove the revision posts?"
|
72 |
+
msgstr "Vuoi rimuovere le revisioni?"
|
73 |
+
|
74 |
+
# @ bdr
|
75 |
+
#: better-delete-revision.php:141
|
76 |
+
#, php-format
|
77 |
+
msgid "Yes , I would like to delete them! (A Total Of %s)"
|
78 |
+
msgstr "Si, voglio rimuoverle tutte! (In totale %s)"
|
79 |
+
|
80 |
+
# @ bdr
|
81 |
+
#: better-delete-revision.php:142
|
82 |
+
msgid "No , I prefer to keep them!"
|
83 |
+
msgstr "No, preferisco tenerle!"
|
84 |
+
|
85 |
+
# @ bdr
|
86 |
+
#: better-delete-revision.php:146
|
87 |
+
msgid "Great! You have no revisions now!"
|
88 |
+
msgstr "Ottimo! Non hai nessuna revisione ora!"
|
89 |
+
|
90 |
+
# @ bdr
|
91 |
+
#: better-delete-revision.php:164
|
92 |
+
#, php-format
|
93 |
+
msgid "Deleted %s revisions!"
|
94 |
+
msgstr "Cancellate %s revisioni!"
|
95 |
+
|
96 |
+
# @ bdr
|
97 |
+
#: better-delete-revision.php:190
|
98 |
+
msgid "Optimization of database completed!"
|
99 |
+
msgstr "Ottimizzazione del database completata!"
|
100 |
+
|
101 |
+
# @ bdr
|
102 |
+
#: better-delete-revision.php:197
|
103 |
+
msgid "Table"
|
104 |
+
msgstr "Tabella"
|
105 |
+
|
106 |
+
# @ bdr
|
107 |
+
#: better-delete-revision.php:198
|
108 |
+
msgid "OP"
|
109 |
+
msgstr "OP"
|
110 |
+
|
111 |
+
# @ bdr
|
112 |
+
#: better-delete-revision.php:199
|
113 |
+
msgid "Status"
|
114 |
+
msgstr "Stato"
|
115 |
+
|
116 |
+
# @ bdr
|
117 |
+
#: better-delete-revision.php:237
|
118 |
+
#, php-format
|
119 |
+
msgid "If all statuses are %s, then your database does not need any optimization! If any are %s, then click on the following button to optimize your Wordpress database."
|
120 |
+
msgstr "Se tutti gli status sono %s, allora il tuo database non ha bisogno di ottimizzazione! Se qualcuno è %s, allora clicca sul seguente bottone per ottimizzare il tuo database di Wordpress."
|
121 |
+
|
122 |
+
# @ bdr
|
123 |
+
#: better-delete-revision.php:238
|
124 |
+
msgid "OK"
|
125 |
+
msgstr "OK"
|
126 |
+
|
127 |
+
# @ bdr
|
128 |
+
#: better-delete-revision.php:239
|
129 |
+
msgid "red"
|
130 |
+
msgstr "rosso"
|
131 |
+
|
132 |
+
# @ bdr
|
133 |
+
#: better-delete-revision.php:249
|
134 |
+
msgid "Optimize Wordpress Database"
|
135 |
+
msgstr "Ottimizza il Database di Wordpress"
|
136 |
+
|
137 |
+
# @ bdr
|
138 |
+
#: better-delete-revision.php:256
|
139 |
+
msgid "Check Revision Posts"
|
140 |
+
msgstr "Controlla le Revisioni dei Post"
|
141 |
+
|
142 |
+
# @ bdr
|
143 |
+
#: better-delete-revision.php:257
|
144 |
+
msgid "Optimize Your Database"
|
145 |
+
msgstr "Ottimizza il Database"
|
146 |
+
|
147 |
+
# @ bdr
|
148 |
+
#: better-delete-revision.php:262
|
149 |
+
msgid "Post Revisions are a feature introduced in Wordpress 2.6. Whenever you or Wordpress saves a post or a page, a revision is automatically created and stored in your Wordpress database. Each additional revision will slowly increase the size of your database. If you save a post or page multiple times, your number of revisions will greatly increase overtime. For example, if you have 100 posts and each post has 10 revisions you could be storing up to 1,000 copies of older data!"
|
150 |
+
msgstr "Le revisioni dei post sono una caratteristica introdotta da Wordpress 2.6. Ogni volta che tu o Wordpress salvate un post o una pagina, una revisione viene automaticamente creata e memorizzata nel tuo database. Ogni revisione aggiuntiva accrescerà lentamente la grandezza del tuo database. Se salvi un post o una pagina più volte, il tuo numero di revisioni aumenterà parecchio nel tempo. Per esempio, se hai 100 post e per ciascuno hai 10 revisioni, tu avresti 1000 copie di dati vecchi!"
|
151 |
+
|
152 |
+
# @ bdr
|
153 |
+
#: better-delete-revision.php:266
|
154 |
+
msgid "The Better Delete Revision plugin is your #1 choice to quickly and easily removing revision from your Wordpress database. Try it out today to see what a lighter and smaller Wordpress database can do for you!"
|
155 |
+
msgstr "Il plugin Better Delete Revision è la tua scelta numero 1 per rimuovere le revisioni velocemente e facilmente dal tuo Database. Prova ora per vedere la differenza di prestazioni con un database più piccolo e leggero!"
|
156 |
+
|
157 |
+
# @ bdr
|
158 |
+
#: better-delete-revision.php:270
|
159 |
+
msgid "Thank you for using this plugin! I hope you enjoy it!"
|
160 |
+
msgstr "Grazie per l'utilizzo di questo plugin. Spero ti piaccia!"
|
161 |
+
|
162 |
+
# @ bdr
|
163 |
+
#: better-delete-revision.php:273
|
164 |
+
msgid "Author:"
|
165 |
+
msgstr "Autore:"
|
166 |
+
|
167 |
+
#: better-delete-revision.php:286
|
168 |
+
#: better-delete-revision.php:300
|
169 |
+
msgid "Settings"
|
170 |
+
msgstr "Impostazioni"
|
171 |
+
|
172 |
+
#: better-delete-revision.php:301
|
173 |
+
msgid "FAQ"
|
174 |
+
msgstr "FAQ"
|
175 |
+
|
languages/bdr-ru_RU.mo
ADDED
Binary file
|
languages/bdr-ru_RU.po
ADDED
@@ -0,0 +1,175 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
msgid ""
|
2 |
+
msgstr ""
|
3 |
+
"Project-Id-Version: Better Delete Revision\n"
|
4 |
+
"Report-Msgid-Bugs-To: \n"
|
5 |
+
"POT-Creation-Date: 2014-06-17 12:06+0300\n"
|
6 |
+
"PO-Revision-Date: 2014-06-17 12:07+0300\n"
|
7 |
+
"Last-Translator: \n"
|
8 |
+
"Language-Team: BestWebLayout <social@bestweblayout.com>\n"
|
9 |
+
"Language: ru\n"
|
10 |
+
"MIME-Version: 1.0\n"
|
11 |
+
"Content-Type: text/plain; charset=UTF-8\n"
|
12 |
+
"Content-Transfer-Encoding: 8bit\n"
|
13 |
+
"Plural-Forms: nplurals=3; plural=n%100/10==1 ? 2 : n%10==1 ? 0 : (n+9)%10>3 ? 2 : 1;\n"
|
14 |
+
"X-Generator: Poedit 1.6.5\n"
|
15 |
+
"X-Poedit-SourceCharset: utf-8\n"
|
16 |
+
"X-Poedit-KeywordsList: __;_e\n"
|
17 |
+
"X-Poedit-Basepath: ..\n"
|
18 |
+
"X-Textdomain-Support: yes\n"
|
19 |
+
"X-Poedit-Language: Russian\n"
|
20 |
+
"X-Poedit-SearchPath-0: .\n"
|
21 |
+
|
22 |
+
# @ bdr
|
23 |
+
#: better-delete-revision.php:38
|
24 |
+
msgid "Better Delete Revision"
|
25 |
+
msgstr "Better Delete Revision "
|
26 |
+
|
27 |
+
# @ bdr
|
28 |
+
#: better-delete-revision.php:103
|
29 |
+
msgid "Better Delete Revision Manager"
|
30 |
+
msgstr "Менеджер Better Delete Revision"
|
31 |
+
|
32 |
+
#: better-delete-revision.php:105
|
33 |
+
msgid "You have"
|
34 |
+
msgstr "У вас"
|
35 |
+
|
36 |
+
#: better-delete-revision.php:105
|
37 |
+
msgid "posts"
|
38 |
+
msgstr "постов"
|
39 |
+
|
40 |
+
# @ bdr
|
41 |
+
#: better-delete-revision.php:106
|
42 |
+
msgid "Since you started using Better Delete Revision"
|
43 |
+
msgstr "С момента использования плагина Better Delete Revision "
|
44 |
+
|
45 |
+
#: better-delete-revision.php:106
|
46 |
+
msgid "redundant post revisions have been removed!"
|
47 |
+
msgstr "излишних ревизий постов было удалено!"
|
48 |
+
|
49 |
+
# @ bdr
|
50 |
+
#: better-delete-revision.php:120
|
51 |
+
msgid "Id"
|
52 |
+
msgstr "Id"
|
53 |
+
|
54 |
+
# @ bdr
|
55 |
+
#: better-delete-revision.php:121
|
56 |
+
msgid "Title"
|
57 |
+
msgstr "Название"
|
58 |
+
|
59 |
+
# @ bdr
|
60 |
+
#: better-delete-revision.php:122
|
61 |
+
msgid "Post date"
|
62 |
+
msgstr "Дата поста"
|
63 |
+
|
64 |
+
# @ bdr
|
65 |
+
#: better-delete-revision.php:123
|
66 |
+
msgid "Last modified"
|
67 |
+
msgstr "Последнее изменение"
|
68 |
+
|
69 |
+
# @ bdr
|
70 |
+
#: better-delete-revision.php:137
|
71 |
+
msgid "Would you like to remove the revision posts?"
|
72 |
+
msgstr "Удалить записи ревизий?"
|
73 |
+
|
74 |
+
# @ bdr
|
75 |
+
#: better-delete-revision.php:141
|
76 |
+
#, php-format
|
77 |
+
msgid "Yes , I would like to delete them! (A Total Of %s)"
|
78 |
+
msgstr "Да, я хотел бы их удалить! (Всего %s)"
|
79 |
+
|
80 |
+
# @ bdr
|
81 |
+
#: better-delete-revision.php:142
|
82 |
+
msgid "No , I prefer to keep them!"
|
83 |
+
msgstr "Нет, лучше не нужно"
|
84 |
+
|
85 |
+
# @ bdr
|
86 |
+
#: better-delete-revision.php:146
|
87 |
+
msgid "Great! You have no revisions now!"
|
88 |
+
msgstr "Прекрасно! У вас нет больше ревизий!"
|
89 |
+
|
90 |
+
# @ bdr
|
91 |
+
#: better-delete-revision.php:164
|
92 |
+
#, php-format
|
93 |
+
msgid "Deleted %s revisions!"
|
94 |
+
msgstr "Удалено %s ревизий!"
|
95 |
+
|
96 |
+
# @ bdr
|
97 |
+
#: better-delete-revision.php:190
|
98 |
+
msgid "Optimization of database completed!"
|
99 |
+
msgstr "Оптимизация базы данных закончена!"
|
100 |
+
|
101 |
+
# @ bdr
|
102 |
+
#: better-delete-revision.php:197
|
103 |
+
msgid "Table"
|
104 |
+
msgstr "Таблица"
|
105 |
+
|
106 |
+
# @ bdr
|
107 |
+
#: better-delete-revision.php:198
|
108 |
+
msgid "OP"
|
109 |
+
msgstr "OP"
|
110 |
+
|
111 |
+
# @ bdr
|
112 |
+
#: better-delete-revision.php:199
|
113 |
+
msgid "Status"
|
114 |
+
msgstr "Статус"
|
115 |
+
|
116 |
+
# @ bdr
|
117 |
+
#: better-delete-revision.php:237
|
118 |
+
#, php-format
|
119 |
+
msgid "If all statuses are %s, then your database does not need any optimization! If any are %s, then click on the following button to optimize your Wordpress database."
|
120 |
+
msgstr "Если все статусы %s, то ваша база данных не нуждается в оптимизации. Если же %s, тогда кликните ниже, чтобы оптимизировать базу данных Wordpress."
|
121 |
+
|
122 |
+
# @ bdr
|
123 |
+
#: better-delete-revision.php:238
|
124 |
+
msgid "OK"
|
125 |
+
msgstr "Ок"
|
126 |
+
|
127 |
+
# @ bdr
|
128 |
+
#: better-delete-revision.php:239
|
129 |
+
msgid "red"
|
130 |
+
msgstr "Красный"
|
131 |
+
|
132 |
+
# @ bdr
|
133 |
+
#: better-delete-revision.php:249
|
134 |
+
msgid "Optimize Wordpress Database"
|
135 |
+
msgstr "Оптимизировать базу данных Wordpress"
|
136 |
+
|
137 |
+
# @ bdr
|
138 |
+
#: better-delete-revision.php:256
|
139 |
+
msgid "Check Revision Posts"
|
140 |
+
msgstr "Проверить записи ревизий"
|
141 |
+
|
142 |
+
# @ bdr
|
143 |
+
#: better-delete-revision.php:257
|
144 |
+
msgid "Optimize Your Database"
|
145 |
+
msgstr "Оптимизировать вашу базу данных"
|
146 |
+
|
147 |
+
# @ bdr
|
148 |
+
#: better-delete-revision.php:262
|
149 |
+
msgid "Post Revisions are a feature introduced in Wordpress 2.6. Whenever you or Wordpress saves a post or a page, a revision is automatically created and stored in your Wordpress database. Each additional revision will slowly increase the size of your database. If you save a post or page multiple times, your number of revisions will greatly increase overtime. For example, if you have 100 posts and each post has 10 revisions you could be storing up to 1,000 copies of older data!"
|
150 |
+
msgstr "Сохранение записей ревизий - это функция, появившаяся в Wordpress 2.6. Всякий раз, когда вы или Wordpress сохраняет пост или страницу, это изменение автоматически записывается в базе данных Wordpress. Каждая последующая ревизия постепенно увеличивает размер вашей базы данных. Чем больше вы сохраняете пост или страницу, тем больше общее количество ревизий. Например, если у вас 100 постов по 10 ревизий каждый, то вы будете хранить до 1000 записей старых ревизий!"
|
151 |
+
|
152 |
+
# @ bdr
|
153 |
+
#: better-delete-revision.php:266
|
154 |
+
msgid "The Better Delete Revision plugin is your #1 choice to quickly and easily removing revision from your Wordpress database. Try it out today to see what a lighter and smaller Wordpress database can do for you!"
|
155 |
+
msgstr "Плагин Better Delete Revision это лучший выбор, если вам необходимо быстро и легко почистить базу данных Wordpress. Воспользуйтесь им и убедитесь, сколько можно сэкономить места в базе данных!"
|
156 |
+
|
157 |
+
# @ bdr
|
158 |
+
#: better-delete-revision.php:270
|
159 |
+
msgid "Thank you for using this plugin! I hope you enjoy it!"
|
160 |
+
msgstr "Спасибо за использование плагина! Уверены, он вам понравился!"
|
161 |
+
|
162 |
+
# @ bdr
|
163 |
+
#: better-delete-revision.php:273
|
164 |
+
msgid "Author:"
|
165 |
+
msgstr "Автор:"
|
166 |
+
|
167 |
+
#: better-delete-revision.php:286
|
168 |
+
#: better-delete-revision.php:300
|
169 |
+
msgid "Settings"
|
170 |
+
msgstr "Настройки"
|
171 |
+
|
172 |
+
#: better-delete-revision.php:301
|
173 |
+
msgid "FAQ"
|
174 |
+
msgstr "FAQ"
|
175 |
+
|
misc-docs/sql-queries.txt
DELETED
@@ -1,55 +0,0 @@
|
|
1 |
-
SQL NOTES
|
2 |
-
--------------------------------------------------------------------------------
|
3 |
-
|
4 |
-
function get_my_posts()
|
5 |
-
LINE ~136
|
6 |
-
|
7 |
-
"SELECT ID
|
8 |
-
FROM ($wpdb->posts)
|
9 |
-
WHERE `post_type` = 'post'";
|
10 |
-
|
11 |
-
Translates to literal SQL Query:
|
12 |
-
|
13 |
-
SELECT ID
|
14 |
-
FROM DBPREFIX_wp_posts
|
15 |
-
WHERE `post_type` = 'post'
|
16 |
-
|
17 |
-
--------------------------------------------------------------------------------
|
18 |
-
|
19 |
-
function get_my_revision()
|
20 |
-
LINE ~147
|
21 |
-
|
22 |
-
"SELECT `ID`,`post_date`,`post_title`,`post_modified`
|
23 |
-
FROM ($wpdb->posts)
|
24 |
-
WHERE `post_type` = 'revision'
|
25 |
-
ORDER BY `ID` DESC";
|
26 |
-
|
27 |
-
Translates to literal SQL Query:
|
28 |
-
|
29 |
-
SELECT `ID` , `post_date` , `post_title` , `post_modified`
|
30 |
-
FROM DBPREFIX_wp_posts
|
31 |
-
WHERE `post_type` = 'revision'
|
32 |
-
ORDER BY `ID` DESC ;
|
33 |
-
|
34 |
-
--------------------------------------------------------------------------------
|
35 |
-
|
36 |
-
function bdelete_revision_act()
|
37 |
-
LINE ~191
|
38 |
-
|
39 |
-
"DELETE a,b,c
|
40 |
-
FROM $wpdb->posts a
|
41 |
-
LEFT JOIN $wpdb->term_relationships b
|
42 |
-
ON (a.ID = b.object_id)
|
43 |
-
LEFT JOIN $wpdb->postmeta c
|
44 |
-
ON (a.ID = c.post_id)
|
45 |
-
WHERE a.post_type = 'revision'";
|
46 |
-
|
47 |
-
Translates to *NON-DELETE* literal SQL Query:
|
48 |
-
|
49 |
-
SELECT *
|
50 |
-
FROM DBPREFIX_wp_posts a
|
51 |
-
LEFT JOIN DBPREFIX_wp_term_relationships b ON ( a.ID = b.object_id )
|
52 |
-
LEFT JOIN DBPREFIX_wp_postmeta c ON ( a.ID = c.post_id )
|
53 |
-
WHERE a.post_type = 'revision';
|
54 |
-
|
55 |
-
--------------------------------------------------------------------------------
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
misc-docs/various-writings.txt
DELETED
@@ -1,23 +0,0 @@
|
|
1 |
-
Description:
|
2 |
-
|
3 |
-
Better Delete Revision is based on the old "Delete Revision" plugin
|
4 |
-
but it is compatible with the latest version of Wordpress (3.0.1) with improved
|
5 |
-
features. It not only deletes redundant revisions of posts from your Wordpress
|
6 |
-
Database, it also deletes other database content related to each revision such
|
7 |
-
meta information, tags, relationships, and more. Your current published,
|
8 |
-
scheduled, and draft posts are never touched by this plugin! This plugin can
|
9 |
-
also perform optimizations on your Wordpress database. With optimization and old
|
10 |
-
revision removal this plugin will keep your database lighter and smaller
|
11 |
-
throughout use. Removing old revisions and database optimizations is one of the
|
12 |
-
best things you can do to your Wordpress blog to keep it running as fast as it
|
13 |
-
can.
|
14 |
-
|
15 |
-
Post Revisions are a feature introduced in Wordpress 2.6. Whenever you or
|
16 |
-
Wordpress saves a post or a page, a revision is automatically created and stored
|
17 |
-
in your Wordpress database. Each additional revision will slowly increase the
|
18 |
-
size of your database. If you save a post or page multiple times, your number of
|
19 |
-
revisions will greatly increase overtime. For example, if you have 100 posts and
|
20 |
-
each post has 10 revisions you could be storing up to 1,000 copies of older
|
21 |
-
data! The Better Delete Revision plugin is your #1 choice to quickly and easily
|
22 |
-
removing revision from your Wordpress database. Try it out today to see what a
|
23 |
-
lighter and smaller Wordpress database can do for you!
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
php/functions.php
DELETED
@@ -1,51 +0,0 @@
|
|
1 |
-
<?php
|
2 |
-
|
3 |
-
function get_count_notice()
|
4 |
-
{
|
5 |
-
return "You have <span style='color:red;font-weight:bolder;'>" .
|
6 |
-
" " . get_my_posts() . " " .
|
7 |
-
"</span> posts." .
|
8 |
-
"<br />" .
|
9 |
-
"Since you started using Better Delete Revision, " .
|
10 |
-
"<span id='revs_no' style='color:red;font-weight:bolder;'>" .
|
11 |
-
" " . get_option('bdel_revision_no') . " " .
|
12 |
-
"</span> redundant post revisions have been removed!";
|
13 |
-
}
|
14 |
-
|
15 |
-
function get_bdr_footer()
|
16 |
-
{
|
17 |
-
$returnString = "";
|
18 |
-
$returnString .= '<br /><div class="widget"><div style="margin:12px; line-height: 1.5em">';
|
19 |
-
$returnString .= 'Post Revisions are a feature introduced in Wordpress 2.6. ';
|
20 |
-
$returnString .= 'Whenever you or Wordpress saves a post or a page, a ';
|
21 |
-
$returnString .= 'revision is automatically created and stored in your ';
|
22 |
-
$returnString .= 'Wordpress database. Each additional revision will slowly ';
|
23 |
-
$returnString .= 'increase the size of your database. If you save a post or ';
|
24 |
-
$returnString .= 'page multiple times, your number of revisions will greatly ';
|
25 |
-
$returnString .= 'increase overtime. For example, if you have 100 posts and ';
|
26 |
-
$returnString .= 'each post has 10 revisions you could be storing up to ';
|
27 |
-
$returnString .= '1,000 copies of older data!<br /><br />';
|
28 |
-
$returnString .= 'The Better Delete Revision ';
|
29 |
-
$returnString .= 'plugin is your #1 choice to quickly and easily removing ';
|
30 |
-
$returnString .= 'revision from your Wordpress database. Try it out today to ';
|
31 |
-
$returnString .= 'see what a lighter and smaller Wordpress database can do for you!<br /><br />';
|
32 |
-
$returnString .= 'Thank you for using this plugin! I hope you enjoy it!<br /><br />';
|
33 |
-
$returnString .= 'Author: ';
|
34 |
-
$returnString .= '<A href="http://www.1e2.it" target="_blank">http://www.1e2.it</a></div></div>';
|
35 |
-
|
36 |
-
return $returnString;
|
37 |
-
}
|
38 |
-
function get_bdr_version()
|
39 |
-
{
|
40 |
-
return '1.2';
|
41 |
-
}
|
42 |
-
|
43 |
-
function get_my_posts()
|
44 |
-
{
|
45 |
-
global $wpdb;
|
46 |
-
$sql = "SELECT ID
|
47 |
-
FROM ($wpdb->posts)
|
48 |
-
WHERE `post_type` = 'post'";
|
49 |
-
$results = $wpdb -> get_results($sql);
|
50 |
-
return count($results);
|
51 |
-
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
readme.txt
CHANGED
@@ -4,7 +4,7 @@ Donate link: https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_i
|
|
4 |
Tags: better delete revision, revision, delete, remove, removal, revision removal, delete revision, disable revision, no revision, revision manager, manage revision, remove revision, post revision, page revision, optimize database, database optimization, optimize, fast, light, faster, lighter, speed up, improve site performance, redundant revisions, perform optimization, delete revision from database, remove old database content, reduce database size
|
5 |
Requires at least: 2.7
|
6 |
Tested up to: 3.9.1
|
7 |
-
Stable tag: 1.
|
8 |
License: GPLv2 or later
|
9 |
License URI: http://www.gnu.org/licenses/gpl-2.0.html
|
10 |
|
@@ -51,6 +51,10 @@ No. The revision posts is redundancy, is not the same that the normal posts. For
|
|
51 |
|
52 |
== Changelog ==
|
53 |
|
|
|
|
|
|
|
|
|
54 |
= V1.2 - 25.01.2011 =
|
55 |
* Update : Used the Role and Capabilities system instead of User Level.
|
56 |
|
4 |
Tags: better delete revision, revision, delete, remove, removal, revision removal, delete revision, disable revision, no revision, revision manager, manage revision, remove revision, post revision, page revision, optimize database, database optimization, optimize, fast, light, faster, lighter, speed up, improve site performance, redundant revisions, perform optimization, delete revision from database, remove old database content, reduce database size
|
5 |
Requires at least: 2.7
|
6 |
Tested up to: 3.9.1
|
7 |
+
Stable tag: 1.3
|
8 |
License: GPLv2 or later
|
9 |
License URI: http://www.gnu.org/licenses/gpl-2.0.html
|
10 |
|
51 |
|
52 |
== Changelog ==
|
53 |
|
54 |
+
= V1.3 - 17.06.2014 =
|
55 |
+
* Update : We updated all functionality for Wordpress 3.9.1.
|
56 |
+
* NEW : The Russian and Italian language files are added to the plugin.
|
57 |
+
|
58 |
= V1.2 - 25.01.2011 =
|
59 |
* Update : Used the Role and Capabilities system instead of User Level.
|
60 |
|
todo.txt
DELETED
@@ -1,17 +0,0 @@
|
|
1 |
-
- General
|
2 |
-
* Clean up code to fit within an 80-character margin limit. Not only doe
|
3 |
-
this assit with various code editors, it forces the programmer to keep the
|
4 |
-
code clean and effecient!
|
5 |
-
* Move strings into a constant file, for easier updating and tracking.
|
6 |
-
* Create a CSS file in charge of handling styles for look and feel.
|
7 |
-
|
8 |
-
- Internationalization
|
9 |
-
* Needs to be done correctly, some code is using 'echo', other code is using
|
10 |
-
the _e() calls from Wordpress. Either Internationalization needs to be
|
11 |
-
implemented, or yank it all together for the time being.
|
12 |
-
|
13 |
-
- SQL Related
|
14 |
-
* Add sometime of documentation explaining each and every SQL query
|
15 |
-
* Possibly Move SQL queries into abstracted file?
|
16 |
-
* Clean up SQL (ID vs `ID`)
|
17 |
-
* Support for Wordpress MU
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|