Version Description
Download this release
Release Info
Developer | qqworld |
Plugin | QQWorld Auto Save Images |
Version | 1.5.3 |
Comparing to | |
See all releases |
Code changes from version 1.5.2 to 1.5.3
lang/qqworld_auto_save_images-zh_CN.mo
CHANGED
Binary file
|
lang/qqworld_auto_save_images-zh_CN.po
CHANGED
@@ -3,7 +3,7 @@ msgstr ""
|
|
3 |
"Project-Id-Version: QQworld Auto Save Images\n"
|
4 |
"Report-Msgid-Bugs-To: http://www.qqworld.org\n"
|
5 |
"POT-Creation-Date: 2011-12-10 19:47:15+00:00\n"
|
6 |
-
"PO-Revision-Date: 2014-09-29
|
7 |
"Last-Translator: Michael Wang <admin@qqworld.org>\n"
|
8 |
"Language-Team: QQWorld <admin@qqworld.org>\n"
|
9 |
"Language: zh_CN\n"
|
@@ -81,3 +81,14 @@ msgstr "返回"
|
|
81 |
|
82 |
msgid "Please select the post type you want to scan."
|
83 |
msgstr "请选择要扫描的文章类型。"
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
3 |
"Project-Id-Version: QQworld Auto Save Images\n"
|
4 |
"Report-Msgid-Bugs-To: http://www.qqworld.org\n"
|
5 |
"POT-Creation-Date: 2011-12-10 19:47:15+00:00\n"
|
6 |
+
"PO-Revision-Date: 2014-09-29 22:36+0800\n"
|
7 |
"Last-Translator: Michael Wang <admin@qqworld.org>\n"
|
8 |
"Language-Team: QQWorld <admin@qqworld.org>\n"
|
9 |
"Language: zh_CN\n"
|
81 |
|
82 |
msgid "Please select the post type you want to scan."
|
83 |
msgstr "请选择要扫描的文章类型。"
|
84 |
+
|
85 |
+
msgid "Filter:"
|
86 |
+
msgstr "过滤器:"
|
87 |
+
|
88 |
+
msgid "Start from %s Scan"
|
89 |
+
msgstr "从 %s 开始扫描"
|
90 |
+
|
91 |
+
msgid ""
|
92 |
+
"If you want to scan 50-150 posts, please type 50 in the textfield and choose "
|
93 |
+
"100 in the select."
|
94 |
+
msgstr "如果想扫描50-100篇文章,请在文本框中输入50并在下拉菜单中选择100"
|
qqworld-auto-save-images.php
CHANGED
@@ -3,7 +3,7 @@
|
|
3 |
Plugin Name: QQWorld Auto Save Images
|
4 |
Plugin URI: https://wordpress.org/plugins/qqworld-auto-save-images/
|
5 |
Description: Automatically keep the all remote picture to the local, and automatically set featured image. 自动保存远程图片到本地,自动设置特色图片,并且支持机器人采集软件从外部提交。
|
6 |
-
Version: 1.5.
|
7 |
Author: Michael Wang
|
8 |
Author URI: http://www.qqworld.org
|
9 |
*/
|
@@ -84,7 +84,8 @@ class QQWorld_auto_save_images {
|
|
84 |
text: QQWorld_auto_save_images.text.in_process,
|
85 |
type: 'notification',
|
86 |
layout: 'center',
|
87 |
-
modal: true
|
|
|
88 |
}) );
|
89 |
$.ajax({
|
90 |
type: "POST",
|
@@ -111,7 +112,8 @@ class QQWorld_auto_save_images {
|
|
111 |
text: QQWorld_auto_save_images.text.in_process,
|
112 |
type: 'notification',
|
113 |
layout: 'center',
|
114 |
-
modal: true
|
|
|
115 |
}) );
|
116 |
$.ajax({
|
117 |
type: "POST",
|
@@ -220,14 +222,24 @@ class QQWorld_auto_save_images {
|
|
220 |
<th scope="row"><label><?php _e('Scan Old Posts', 'qqworld_auto_save_images'); ?></label></th>
|
221 |
<td>
|
222 |
<p><?php _e('Select post types you want to scan:', 'qqworld_auto_save_images'); ?></p>
|
223 |
-
<
|
224 |
-
|
225 |
-
|
226 |
-
|
227 |
-
|
228 |
-
|
229 |
-
|
230 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
231 |
<fieldset>
|
232 |
<legend class="screen-reader-text"><span><?php _e('Scan Old Posts', 'qqworld_auto_save_images'); ?></span></legend>
|
233 |
<label for="scan_old_posts">
|
@@ -302,13 +314,17 @@ class QQWorld_auto_save_images {
|
|
302 |
<?php
|
303 |
set_time_limit(0);
|
304 |
$post_types = $_POST['qqworld_auto_save_imagess_post_types'];
|
|
|
|
|
305 |
$args = array(
|
306 |
-
'posts_per_page' =>
|
|
|
307 |
'order' => 'ASC',
|
308 |
-
'post_type' => $post_types
|
309 |
);
|
310 |
$posts = get_posts($args);
|
311 |
if (!empty($posts)) : ?>
|
|
|
312 |
<table id="scan_old_post_list">
|
313 |
<thead>
|
314 |
<th><?php _e('ID'); ?></th>
|
@@ -353,9 +369,9 @@ class QQWorld_auto_save_images {
|
|
353 |
timeout: 3000
|
354 |
});
|
355 |
</script>
|
356 |
-
|
357 |
-
<?php
|
358 |
-
endif; ?>
|
359 |
<?php
|
360 |
}
|
361 |
|
3 |
Plugin Name: QQWorld Auto Save Images
|
4 |
Plugin URI: https://wordpress.org/plugins/qqworld-auto-save-images/
|
5 |
Description: Automatically keep the all remote picture to the local, and automatically set featured image. 自动保存远程图片到本地,自动设置特色图片,并且支持机器人采集软件从外部提交。
|
6 |
+
Version: 1.5.3
|
7 |
Author: Michael Wang
|
8 |
Author URI: http://www.qqworld.org
|
9 |
*/
|
84 |
text: QQWorld_auto_save_images.text.in_process,
|
85 |
type: 'notification',
|
86 |
layout: 'center',
|
87 |
+
modal: true,
|
88 |
+
closeWith: ['button']
|
89 |
}) );
|
90 |
$.ajax({
|
91 |
type: "POST",
|
112 |
text: QQWorld_auto_save_images.text.in_process,
|
113 |
type: 'notification',
|
114 |
layout: 'center',
|
115 |
+
modal: true,
|
116 |
+
closeWith: ['button']
|
117 |
}) );
|
118 |
$.ajax({
|
119 |
type: "POST",
|
222 |
<th scope="row"><label><?php _e('Scan Old Posts', 'qqworld_auto_save_images'); ?></label></th>
|
223 |
<td>
|
224 |
<p><?php _e('Select post types you want to scan:', 'qqworld_auto_save_images'); ?></p>
|
225 |
+
<div id="post_types_list">
|
226 |
+
<p><?php
|
227 |
+
$post_types = get_post_types('', 'objects');
|
228 |
+
foreach ($post_types as $name => $post_type) : ?>
|
229 |
+
<label><input name="qqworld_auto_save_imagess_post_types[]" type="checkbox" value="<?php echo $name; ?>" /> <?php echo $post_type->labels->name; ?></label>
|
230 |
+
<?php endforeach;
|
231 |
+
?></p>
|
232 |
+
<p><?php _e('Filter:', 'qqworld_auto_save_images'); ?> <?php printf(__('Start from %s Scan', 'qqworld_auto_save_images'), '<input type="number" name="offset" value="0" />'); ?>
|
233 |
+
<select name="posts_per_page">
|
234 |
+
<option value="-1"><?php _e('All'); ?></option>
|
235 |
+
<?php for ($i=1; $i<=10; $i++) : ?>
|
236 |
+
<option value="<?php echo $i*100; ?>"><?php echo $i*100; ?></option>
|
237 |
+
<?php endfor; ?>
|
238 |
+
</select> <?php _e('Posts'); ?>
|
239 |
+
</p>
|
240 |
+
<p class="description"><?php _e('If you want to scan 50-150 posts, please type 50 in the textfield and choose 100 in the select.', 'qqworld_auto_save_images'); ?></p>
|
241 |
+
</div>
|
242 |
+
|
243 |
<fieldset>
|
244 |
<legend class="screen-reader-text"><span><?php _e('Scan Old Posts', 'qqworld_auto_save_images'); ?></span></legend>
|
245 |
<label for="scan_old_posts">
|
314 |
<?php
|
315 |
set_time_limit(0);
|
316 |
$post_types = $_POST['qqworld_auto_save_imagess_post_types'];
|
317 |
+
$offset = empty($_POST['offset']) ? 0 : $_POST['offset'];
|
318 |
+
$posts_per_page = $_POST['posts_per_page'];
|
319 |
$args = array(
|
320 |
+
'posts_per_page' => $posts_per_page,
|
321 |
+
'offset' => $offset,
|
322 |
'order' => 'ASC',
|
323 |
+
'post_type' => $post_types
|
324 |
);
|
325 |
$posts = get_posts($args);
|
326 |
if (!empty($posts)) : ?>
|
327 |
+
<p><?php _e('Scan posts and keep remote images in all posts to local media library. Maybe take a long time.', 'qqworld_auto_save_images'); ?></p>
|
328 |
<table id="scan_old_post_list">
|
329 |
<thead>
|
330 |
<th><?php _e('ID'); ?></th>
|
369 |
timeout: 3000
|
370 |
});
|
371 |
</script>
|
372 |
+
<?php endif; ?>
|
373 |
+
<p><a href="<?php echo menu_page_url( 'qqworld-auto-save-images', 0 ); ?>" class="button button-primary"><?php _e('Return', 'qqworld_auto_save_images') ?></a></p>
|
374 |
+
<?php endif; ?>
|
375 |
<?php
|
376 |
}
|
377 |
|