Auto Post Thumbnail - Version 3.4.2

Version Description

Download this release

Release Info

Developer alexkovalevv
Plugin Icon 128x128 Auto Post Thumbnail
Version 3.4.2
Comparing to
See all releases

Code changes from version 3.4.1 to 3.4.2

auto-post-thumbnail.php CHANGED
@@ -1,431 +1,512 @@
1
- <?php
2
-
3
- /*
4
- Plugin Name: Auto Post Thumbnail
5
- Plugin URI: http://www.sanisoft.com/blog/2010/04/19/wordpress-plugin-automatic-post-thumbnail/
6
- Description: Automatically generate the Post Thumbnail (Featured Thumbnail) from the first image in post (or any custom post type) only if Post Thumbnail is not set manually.
7
- Version: 3.4.1
8
- Author: Aditya Mooley <adityamooley@sanisoft.com>, Tarique Sani <tarique@sanisoft.com>
9
- Author URI: http://www.sanisoft.com/blog/author/adityamooley/
10
- Modified by Dr. Tarique Sani <tarique@sanisoft.com> to make it work with Wordpress 3.4
11
- */
12
-
13
- /* Copyright 2009 Aditya Mooley (email : adityamooley@sanisoft.com)
14
-
15
- This program is free software; you can redistribute it and/or modify
16
- it under the terms of the GNU General Public License as published by
17
- the Free Software Foundation; either version 2 of the License, or
18
- (at your option) any later version.
19
-
20
- This program is distributed in the hope that it will be useful,
21
- but WITHOUT ANY WARRANTY; without even the implied warranty of
22
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
23
- GNU General Public License for more details.
24
-
25
- You should have received a copy of the GNU General Public License
26
- along with this program; if not, write to the Free Software
27
- Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
28
- */
29
-
30
- add_action('publish_post', 'apt_publish_post');
31
-
32
- // This hook will now handle all sort publishing including posts, custom types, scheduled posts, etc.
33
- add_action('transition_post_status', 'apt_check_required_transition', 10, 3);
34
-
35
- add_action('admin_notices', 'apt_check_perms');
36
- add_action('admin_menu', 'apt_add_admin_menu'); // Add batch process capability
37
- add_action('admin_enqueue_scripts', 'apt_admin_enqueues'); // Plugin hook for adding CSS and JS files required for this plugin
38
- add_action('wp_ajax_generatepostthumbnail', 'apt_ajax_process_post'); // Hook to implement AJAX request
39
-
40
- // Register the management page
41
- function apt_add_admin_menu() {
42
- add_options_page('Auto Post Thumbnail', 'Auto Post Thumbnail', 'manage_options', 'generate-post-thumbnails', 'apt_interface');
43
- }
44
-
45
- /**
46
- * Admin user interface plus post thumbnail generator
47
- *
48
- * Most of the code in this function is copied from -
49
- * Regenerate Thumbnails plugin (http://www.viper007bond.com/wordpress-plugins/regenerate-thumbnails/)
50
- *
51
- * @return void
52
- */
53
- function apt_interface() {
54
- global $wpdb;
55
- ?>
56
- <div>
57
- <div style="margin-right:260px;">
58
- <div style='float:left; width: 100%'>
59
- <div id="message" class="updated fade" style="display:none"></div>
60
-
61
- <div class="wrap genpostthumbs">
62
- <h2>Generate Post Thumbnails</h2>
63
-
64
- <?php
65
- // If the button was clicked
66
- if ( !empty($_POST['generate-post-thumbnails']) ) {
67
- // Capability check
68
- if ( !current_user_can('manage_options') )
69
- wp_die('Cheatin&#8217; uh?');
70
-
71
- // Form nonce check
72
- check_admin_referer( 'generate-post-thumbnails' );
73
-
74
- // Get id's of all the published posts for which post thumbnails does not exist.
75
- $query = "SELECT * FROM {$wpdb->posts} p where p.post_status = 'publish' AND p.ID NOT IN (
76
- SELECT DISTINCT post_id FROM {$wpdb->postmeta} WHERE meta_key IN ('_thumbnail_id', 'skip_post_thumb')
77
- )";
78
- $posts = $wpdb->get_results($query);
79
-
80
- if (empty($posts)) {
81
- echo '<p>Currently there are no published posts available to generate thumbnails.</p>';
82
- } else {
83
- echo '<p>We are generating post thumbnails. Please be patient!</p>';
84
-
85
- // Generate the list of IDs
86
- $ids = array();
87
- foreach ( $posts as $post )
88
- $ids[] = $post->ID;
89
- $ids = implode( ',', $ids );
90
-
91
- $count = count( $posts );
92
- ?>
93
- <noscript><p><em>You must enable Javascript in order to proceed!</em></p></noscript>
94
-
95
- <div id="genpostthumbsbar" style="position:relative;height:25px;">
96
- <div id="genpostthumbsbar-percent" style="position:absolute;left:50%;top:50%;width:50px;margin-left:-25px;height:25px;margin-top:-9px;font-weight:bold;text-align:center;"></div>
97
- </div>
98
-
99
- <script type="text/javascript">
100
- // <![CDATA[
101
- jQuery(document).ready(function($){
102
- var i;
103
- var rt_images = [<?php echo $ids; ?>];
104
- var rt_total = rt_images.length;
105
- var rt_count = 1;
106
- var rt_percent = 0;
107
-
108
- $("#genpostthumbsbar").progressbar();
109
- $("#genpostthumbsbar-percent").html( "0%" );
110
-
111
- function genPostThumb( id ) {
112
- $.post( "admin-ajax.php", { action: "generatepostthumbnail", id: id }, function() {
113
- rt_percent = ( rt_count / rt_total ) * 100;
114
- $("#genpostthumbsbar").progressbar( "value", rt_percent );
115
- $("#genpostthumbsbar-percent").html( Math.round(rt_percent) + "%" );
116
- rt_count = rt_count + 1;
117
-
118
- if ( rt_images.length ) {
119
- genPostThumb( rt_images.shift() );
120
- } else {
121
- $("#message").html("<p><strong><?php echo js_escape( sprintf('All done! Processed %d posts.', $count ) ); ?></strong></p>");
122
- $("#message").show();
123
- }
124
-
125
- });
126
- }
127
-
128
- genPostThumb( rt_images.shift() );
129
- });
130
- // ]]>
131
- </script>
132
- <?php
133
- }
134
- } else {
135
- ?>
136
-
137
- <p>Use this tool to generate Post Thumbnail (Featured Thumbnail) for your Published posts.</p>
138
- <p>If the script stops executing for any reason, just <strong>Reload</strong> the page and it will continue from where it stopped.</p>
139
-
140
- <form method="post" action="">
141
- <?php wp_nonce_field('generate-post-thumbnails') ?>
142
-
143
-
144
- <p><input type="submit" class="button hide-if-no-js" name="generate-post-thumbnails" id="generate-post-thumbnails" value="Generate Thumbnails" /></p>
145
-
146
- <noscript><p><em>You must enable Javascript in order to proceed!</em></p></noscript>
147
-
148
- </form>
149
- <p>Note: Thumbnails won't be generated for posts that already have post thumbnail or <strong><em>skip_post_thumb</em></strong> custom field set.</p>
150
- <?php } ?>
151
- </div>
152
- </div>
153
- <?php if( !is_plugin_active( 'auto-post-thumbnail-pro/index.php' ) ) { ?>
154
- <div class="apt_pro_advertisement">
155
- <div>
156
- <div class="apt_pro_logo">
157
- <img align="middle" src=" <?php echo plugins_url( 'img/apt_logo.jpg' , __FILE__); ?>" />
158
- </div>
159
- <div class="apt_pro_check_out"><i>Upgrade Now</i></div>
160
- </div>
161
- <div class="apt_pro_features">
162
- <ul>
163
- <li>Auto set first image in post as featured</li>
164
- <li>Auto set first attachment as featured</li>
165
- <li>Featured images from videos</li>
166
- <li>Several video services supported</li>
167
- <li>External images, shortcode ready</li>
168
- <li>Support for Custom Post Type</li>
169
- <li>Ability to delete featured images</li>
170
- <li>Multilingual ready</li>
171
- <li>Free updates, guaranteed support</li>
172
- <li>Works with any theme</li>
173
- <li>Very reasonably priced</li>
174
- </ul>
175
- </div>
176
- <div class="apt_pro_buy_now">
177
- <a href="http://codecanyon.net/item/auto-post-thumbnail-pro/4322624?ref=sanisoft" target=" _blank"><input type="button" value="Upgrade" class="button-primary"/></a>
178
- </div>
179
- </div>
180
- <?php } ?>
181
- </div>
182
- </div>
183
- <?php
184
- } //End apt_interface()
185
-
186
- /**
187
- * Add our JS and CSS files
188
- *
189
- * @param $hook_suffix
190
- * @return void
191
- */
192
- function apt_admin_enqueues($hook_suffix) {
193
- if ( 'settings_page_generate-post-thumbnails' != $hook_suffix ) {
194
- return;
195
- }
196
-
197
- // WordPress 3.1 vs older version compatibility
198
- if ( wp_script_is( 'jquery-ui-widget', 'registered' ) ) {
199
- wp_enqueue_script( 'jquery-ui-progressbar', plugins_url( 'jquery-ui/jquery.ui.progressbar.min.js', __FILE__ ), array( 'jquery-ui-core', 'jquery-ui-widget' ), '1.7.2' );
200
- }
201
- else {
202
- wp_enqueue_script( 'jquery-ui-progressbar', plugins_url( 'jquery-ui/ui.progressbar.js', __FILE__ ), array( 'jquery-ui-core' ), '1.7.2' );
203
- }
204
-
205
- wp_enqueue_style( 'style', plugins_url( 'css/style.css', __FILE__ ) );
206
-
207
- wp_enqueue_style( 'jquery-ui-genpostthumbs', plugins_url( 'jquery-ui/redmond/jquery-ui-1.7.2.custom.css', __FILE__ ), array(), '1.7.2' );
208
- } //End apt_admin_enqueues
209
-
210
- /**
211
- * Process single post to generate the post thumbnail
212
- *
213
- * @return void
214
- */
215
- function apt_ajax_process_post() {
216
- if ( !current_user_can( 'manage_options' ) ) {
217
- die('-1');
218
- }
219
-
220
- $id = (int) $_POST['id'];
221
-
222
- if ( empty($id) ) {
223
- die('-1');
224
- }
225
-
226
- set_time_limit( 60 );
227
-
228
- // Pass on the id to our 'publish' callback function.
229
- apt_publish_post($id);
230
-
231
- die(-1);
232
- } //End apt_ajax_process_post()
233
-
234
-
235
- /**
236
- * Check whether the required directory structure is available so that the plugin can create thumbnails if needed.
237
- * If not, don't allow plugin activation.
238
- */
239
- function apt_check_perms() {
240
- $uploads = wp_upload_dir(current_time('mysql'));
241
-
242
- if ($uploads['error']) {
243
- echo '<div class="updated"><p>';
244
- echo $uploads['error'];
245
-
246
- if ( function_exists('deactivate_plugins') ) {
247
- deactivate_plugins('auto-post-thumbnail/auto-post-thumbnail.php', 'auto-post-thumbnail.php' );
248
- echo '<br /> This plugin has been automatically deactivated.';
249
- }
250
-
251
- echo '</p></div>';
252
- }
253
- }
254
-
255
- /**
256
- * Function to check whether scheduled post is being published. If so, apt_publish_post should be called.
257
- *
258
- * @param $new_status
259
- * @param $old_status
260
- * @param $post
261
- * @return void
262
- */
263
- function apt_check_required_transition($new_status='', $old_status='', $post='') {
264
-
265
- if ('publish' == $new_status) {
266
- apt_publish_post($post->ID);
267
- }
268
- }
269
-
270
- /**
271
- * Function to save first image in post as post thumbmail.
272
- */
273
- function apt_publish_post($post_id)
274
- {
275
- global $wpdb;
276
-
277
- // First check whether Post Thumbnail is already set for this post.
278
- if (get_post_meta($post_id, '_thumbnail_id', true) || get_post_meta($post_id, 'skip_post_thumb', true)) {
279
- return;
280
- }
281
-
282
- $post = $wpdb->get_results("SELECT * FROM {$wpdb->posts} WHERE id = $post_id");
283
-
284
- // Initialize variable used to store list of matched images as per provided regular expression
285
- $matches = array();
286
-
287
- // Get all images from post's body
288
- preg_match_all('/<\s*img [^\>]*src\s*=\s*[\""\']?([^\""\'>]*)/i', $post[0]->post_content, $matches);
289
-
290
- if (count($matches)) {
291
- foreach ($matches[0] as $key => $image) {
292
- /**
293
- * If the image is from wordpress's own media gallery, then it appends the thumbmail id to a css class.
294
- * Look for this id in the IMG tag.
295
- */
296
- preg_match('/wp-image-([\d]*)/i', $image, $thumb_id);
297
- if($thumb_id){
298
- $thumb_id = $thumb_id[1];
299
- }
300
-
301
- // If thumb id is not found, try to look for the image in DB. Thanks to "Erwin Vrolijk" for providing this code.
302
- if (!$thumb_id) {
303
- $image = substr($image, strpos($image, '"')+1);
304
- $result = $wpdb->get_results("SELECT ID FROM {$wpdb->posts} WHERE guid = '".$image."'");
305
- if($result){
306
- $thumb_id = $result[0]->ID;
307
- }
308
-
309
- }
310
-
311
- // Ok. Still no id found. Some other way used to insert the image in post. Now we must fetch the image from URL and do the needful.
312
- if (!$thumb_id) {
313
- $thumb_id = apt_generate_post_thumb($matches, $key, $post[0]->post_content, $post_id);
314
- }
315
-
316
- // If we succeed in generating thumg, let's update post meta
317
- if ($thumb_id) {
318
- update_post_meta( $post_id, '_thumbnail_id', $thumb_id );
319
- break;
320
- }
321
- }
322
- }
323
- }// end apt_publish_post()
324
-
325
- /**
326
- * Function to fetch the image from URL and generate the required thumbnails
327
- */
328
- function apt_generate_post_thumb($matches, $key, $post_content, $post_id)
329
- {
330
- // Make sure to assign correct title to the image. Extract it from img tag
331
- $imageTitle = '';
332
- preg_match_all('/<\s*img [^\>]*title\s*=\s*[\""\']?([^\""\'>]*)/i', $post_content, $matchesTitle);
333
-
334
- if (count($matchesTitle) && isset($matchesTitle[1])) {
335
- $imageTitle = $matchesTitle[1][$key];
336
- }
337
-
338
- // Get the URL now for further processing
339
- $imageUrl = $matches[1][$key];
340
-
341
- // Get the file name
342
- $filename = substr($imageUrl, (strrpos($imageUrl, '/'))+1);
343
-
344
- if (!(($uploads = wp_upload_dir(current_time('mysql')) ) && false === $uploads['error'])) {
345
- return null;
346
- }
347
-
348
- // Generate unique file name
349
- $filename = wp_unique_filename( $uploads['path'], $filename );
350
-
351
- // Move the file to the uploads dir
352
- $new_file = $uploads['path'] . "/$filename";
353
-
354
- if (!ini_get('allow_url_fopen')) {
355
- $file_data = curl_get_file_contents($imageUrl);
356
- } else {
357
- $file_data = @file_get_contents($imageUrl);
358
- }
359
-
360
- if (!$file_data) {
361
- return null;
362
- }
363
-
364
- //Fix for checking file extensions
365
- $exts = explode(".",$filename);
366
- if(count($exts)>2)return null;
367
- $allowed=get_allowed_mime_types();
368
- $ext=pathinfo($new_file,PATHINFO_EXTENSION);
369
- if(!array_key_exists($ext,$allowed))return null;
370
-
371
- file_put_contents($new_file, $file_data);
372
-
373
- // Set correct file permissions
374
- $stat = stat( dirname( $new_file ));
375
- $perms = $stat['mode'] & 0000666;
376
- @ chmod( $new_file, $perms );
377
-
378
- // Get the file type. Must to use it as a post thumbnail.
379
- $wp_filetype = wp_check_filetype( $filename, $mimes );
380
-
381
- extract( $wp_filetype );
382
-
383
- // No file type! No point to proceed further
384
- if ( ( !$type || !$ext ) && !current_user_can( 'unfiltered_upload' ) ) {
385
- return null;
386
- }
387
-
388
- // Compute the URL
389
- $url = $uploads['url'] . "/$filename";
390
-
391
- // Construct the attachment array
392
- $attachment = array(
393
- 'post_mime_type' => $type,
394
- 'guid' => $url,
395
- 'post_parent' => null,
396
- 'post_title' => $imageTitle,
397
- 'post_content' => '',
398
- );
399
-
400
- $thumb_id = wp_insert_attachment($attachment, $file, $post_id);
401
- if ( !is_wp_error($thumb_id) ) {
402
- require_once(ABSPATH . '/wp-admin/includes/image.php');
403
-
404
- // Added fix by misthero as suggested
405
- wp_update_attachment_metadata( $thumb_id, wp_generate_attachment_metadata( $thumb_id, $new_file ) );
406
- update_attached_file( $thumb_id, $new_file );
407
-
408
- return $thumb_id;
409
- }
410
-
411
- return null;
412
- }
413
-
414
- /**
415
- * Function to fetch the contents of URL using curl in absense of allow_url_fopen.
416
- *
417
- * Copied from user comment on php.net (http://in.php.net/manual/en/function.file-get-contents.php#82255)
418
- */
419
- function curl_get_file_contents($URL) {
420
- $c = curl_init();
421
- curl_setopt($c, CURLOPT_RETURNTRANSFER, 1);
422
- curl_setopt($c, CURLOPT_URL, $URL);
423
- $contents = curl_exec($c);
424
- curl_close($c);
425
-
426
- if ($contents) {
427
- return $contents;
428
- }
429
-
430
- return FALSE;
431
- }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ /*
4
+ Plugin Name: Auto Post Thumbnail
5
+ Plugin URI: http://cm-wp.com/apt/
6
+ Description: Automatically generate the Post Thumbnail (Featured Thumbnail) from the first image in post (or any custom post type) only if Post Thumbnail is not set manually.
7
+ Version: 3.4.2
8
+ Author: Сreativemotion
9
+ Author URI: http://cm-wp.com
10
+ Text Domain: apt
11
+ Domain Path: /languages
12
+ */
13
+
14
+ /* Copyright 2019 Сreativemotion (email : cmwp@gmail.com)
15
+
16
+ This program is free software; you can redistribute it and/or modify
17
+ it under the terms of the GNU General Public License as published by
18
+ the Free Software Foundation; either version 2 of the License, or
19
+ (at your option) any later version.
20
+
21
+ This program is distributed in the hope that it will be useful,
22
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
23
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
24
+ GNU General Public License for more details.
25
+
26
+ You should have received a copy of the GNU General Public License
27
+ along with this program; if not, write to the Free Software
28
+ Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
29
+ */
30
+
31
+ if ( ! defined( 'ABSPATH' ) ) {
32
+ exit; // Exit if accessed directly.
33
+ }
34
+
35
+ defined( 'APT_PLUGIN_FILE' ) or define( 'APT_PLUGIN_FILE', __FILE__ );
36
+ defined( 'APT_ABSPATH' ) or define( 'APT_ABSPATH', dirname( __FILE__ ) );
37
+ defined( 'APT_PLUGIN_BASENAME' ) or define( 'APT_PLUGIN_BASENAME', plugin_basename( __FILE__ ) );
38
+ defined( 'APT_PLUGIN_URL' ) or define( 'APT_PLUGIN_URL', plugins_url( null, __FILE__ ) );
39
+
40
+ /**
41
+ * Class AutoPostThumbnails
42
+ *
43
+ * @author Alexander Teshabaev <sasha.tesh@gmail.com>
44
+ * @copyright (c) 2018, Webcraftic Ltd
45
+ */
46
+ class AutoPostThumbnails {
47
+
48
+ /**
49
+ * @var AutoPostThumbnails
50
+ */
51
+ public static $instance;
52
+
53
+ /**
54
+ * AutoPostThumbnails constructor.
55
+ */
56
+ public function __construct () {
57
+
58
+ $this->init_includes();
59
+ $this->init();
60
+ $this->init_textdomain();
61
+ }
62
+
63
+ /**
64
+ * Get existing instance or create new one.
65
+ *
66
+ * @return AutoPostThumbnails
67
+ */
68
+ public static function instance () {
69
+ if ( static::$instance === null ) {
70
+ static::$instance = new self();
71
+ }
72
+
73
+ return static::$instance;
74
+ }
75
+
76
+ /**
77
+ * Init includes.
78
+ */
79
+ private function init_includes () {
80
+ require __DIR__ . '/src/class.template.php';
81
+ }
82
+
83
+ /**
84
+ * Initiate all required hooks.
85
+ */
86
+ private function init () {
87
+ $apt_ag = get_option( 'wbcr_apt_auto_generation' );
88
+
89
+ if ( $apt_ag ) {
90
+ add_action( 'publish_post', [ $this, 'publish_post' ] );
91
+
92
+ // This hook will now handle all sort publishing including posts, custom types, scheduled posts, etc.
93
+ add_action( 'transition_post_status', [ $this, 'check_required_transition' ], 10, 3 );
94
+ }
95
+
96
+ add_action( 'admin_notices', [ $this, 'check_perms' ] );
97
+ add_action( 'admin_menu', [ $this, 'init_admin_menu' ] );
98
+
99
+ // Plugin hook for adding CSS and JS files required for this plugin
100
+ add_action( 'admin_enqueue_scripts', [
101
+ $this,
102
+ 'enqueue_assets',
103
+ ] );
104
+
105
+ // Hook to implement AJAX request
106
+ add_action( 'wp_ajax_generatepostthumbnail', [
107
+ $this,
108
+ 'ajax_process_post',
109
+ ] );
110
+ }
111
+
112
+ /**
113
+ * Init language support.
114
+ */
115
+ public function init_textdomain () {
116
+ load_plugin_textdomain( "apt", false, basename( dirname( __FILE__ ) ) . '/languages' );
117
+ }
118
+
119
+ /**
120
+ * Register the management page
121
+ */
122
+ public function init_admin_menu () {
123
+ add_options_page(
124
+ 'Auto Post Thumbnail',
125
+ 'Auto Post Thumbnail',
126
+ 'manage_options',
127
+ 'generate-post-thumbnails',
128
+ [ $this, 'render' ]
129
+ );
130
+ }
131
+
132
+ /**
133
+ * Enqueue assets.
134
+ *
135
+ * @param $hook_suffix
136
+ *
137
+ * @return void
138
+ */
139
+ public function enqueue_assets ( $hook_suffix ) {
140
+ if ( 'settings_page_generate-post-thumbnails' != $hook_suffix ) {
141
+ return;
142
+ }
143
+
144
+ // WordPress 3.1 vs older version compatibility
145
+ if ( wp_script_is( 'jquery-ui-widget', 'registered' ) ) {
146
+ wp_enqueue_script( 'jquery-ui-progressbar', plugins_url( 'jquery-ui/jquery.ui.progressbar.min.js', __FILE__ ), array(
147
+ 'jquery-ui-core',
148
+ 'jquery-ui-widget',
149
+ ), '1.7.2' );
150
+ } else {
151
+ wp_enqueue_script( 'jquery-ui-progressbar', plugins_url( 'jquery-ui/ui.progressbar.js', __FILE__ ), array( 'jquery-ui-core' ), '1.7.2' );
152
+ }
153
+
154
+ wp_enqueue_style( 'style', plugins_url( 'css/style.css', __FILE__ ) );
155
+
156
+ wp_enqueue_style( 'jquery-ui-genpostthumbs', plugins_url( 'jquery-ui/redmond/jquery-ui-1.7.2.custom.css', __FILE__ ), array(), '1.7.2' );
157
+ }
158
+
159
+ /**
160
+ * Renders main HTML content of the admin page.
161
+ */
162
+ public function render () {
163
+ echo APT_Template::render( 'index' );
164
+ }
165
+
166
+ /**
167
+ * Process single post to generate the post thumbnail
168
+ *
169
+ * @return void
170
+ */
171
+ public function ajax_process_post () {
172
+ if ( ! current_user_can( 'manage_options' ) ) {
173
+ die( '-1' );
174
+ }
175
+
176
+ $id = (int) $_POST['id'];
177
+
178
+ if ( empty( $id ) ) {
179
+ die( '-1' );
180
+ }
181
+
182
+ set_time_limit( 60 );
183
+
184
+ // Pass on the id to our 'publish' callback function.
185
+ echo $this->publish_post( $id );
186
+
187
+ die( - 1 );
188
+ }
189
+
190
+ /**
191
+ * Check whether the required directory structure is available so that the plugin can create thumbnails if needed.
192
+ * If not, don't allow plugin activation.
193
+ */
194
+ public function check_perms () {
195
+ $uploads = wp_upload_dir( current_time( 'mysql' ) );
196
+
197
+ if ( $uploads['error'] ) {
198
+ echo '<div class="updated"><p>';
199
+ echo $uploads['error'];
200
+
201
+ if ( function_exists( 'deactivate_plugins' ) ) {
202
+ deactivate_plugins( 'auto-post-thumbnail/auto-post-thumbnail.php', 'auto-post-thumbnail.php' );
203
+ echo '<br /> ' . esc_html__( 'This plugin has been automatically deactivated.', 'apt' );
204
+ }
205
+
206
+ echo '</p></div>';
207
+ }
208
+ }
209
+
210
+ /**
211
+ * Function to check whether scheduled post is being published. If so, apt_publish_post should be called.
212
+ *
213
+ * @param $new_status
214
+ * @param $old_status
215
+ * @param WP_Post $post Instance of post.
216
+ *
217
+ * @return void
218
+ */
219
+ public function check_required_transition ( $new_status = '', $old_status = '', $post = '' ) {
220
+
221
+ if ( 'publish' == $new_status ) {
222
+ $this->publish_post( $post->ID );
223
+ }
224
+ }
225
+
226
+ /**
227
+ * Return sql query, which allows to receive all the posts without thumbnails
228
+ *
229
+ * @return string
230
+ */
231
+ public function get_posts_query() {
232
+ global $wpdb;
233
+
234
+ return "SELECT * FROM {$wpdb->posts} p WHERE p.post_status = 'publish' AND p.post_type = 'post' AND (
235
+ p.ID NOT IN (
236
+ SELECT DISTINCT post_id FROM {$wpdb->postmeta} WHERE meta_key IN ('_thumbnail_id', 'skip_post_thumb')
237
+ ) OR
238
+ NOT EXISTS (SELECT p2.ID FROM {$wpdb->posts} p2 WHERE p2.ID = (SELECT meta_value FROM {$wpdb->postmeta} WHERE meta_key = '_thumbnail_id' AND post_id = p.ID) AND p2.post_type = 'attachment')
239
+ )";
240
+ }
241
+
242
+ /**
243
+ * Function to save first image in post as post thumbmail.
244
+ *
245
+ * @param int $post_id Post ID.
246
+ *
247
+ * @return bool
248
+ */
249
+ public function publish_post( $post_id ) {
250
+ global $wpdb;
251
+
252
+ // First check whether Post Thumbnail is already set for this post.
253
+ $_thumbnail_id = get_post_meta( $post_id, '_thumbnail_id', true );
254
+ if (
255
+ $_thumbnail_id && $wpdb->get_var( "SELECT ID FROM {$wpdb->posts} WHERE id = '$_thumbnail_id' AND post_type = 'attachment'" )
256
+ || get_post_meta( $post_id, 'skip_post_thumb', true )
257
+ ) {
258
+ return true;
259
+ }
260
+
261
+ $post = $wpdb->get_results( "SELECT * FROM {$wpdb->posts} WHERE id = $post_id" );
262
+
263
+ // Initialize variable used to store list of matched images as per provided regular expression
264
+ $matches = array();
265
+
266
+ $thumb_id = false;
267
+
268
+ // Get all images from post's body
269
+ preg_match_all( '/<\s*img [^\>]*src\s*=\s*[\""\']?([^\""\'>]*)/i', $post[0]->post_content, $matches );
270
+
271
+ if ( count( $matches ) ) {
272
+ foreach ( $matches[0] as $key => $image ) {
273
+ /**
274
+ * If the image is from the WordPress own media gallery, then it appends the thumbnail id to a css class.
275
+ * Look for this id in the IMG tag.
276
+ */
277
+ preg_match( '/wp-image-([\d]*)/i', $image, $thumb_id );
278
+
279
+ if ( $thumb_id ) {
280
+ $thumb_id = $thumb_id[1];
281
+ }
282
+
283
+ if ( ! get_post( $thumb_id ) ) {
284
+ $thumb_id = false;
285
+ }
286
+
287
+ // If thumb id is not found, try to look for the image in DB. Thanks to "Erwin Vrolijk" for providing this code.
288
+ if ( ! $thumb_id ) {
289
+ $image = substr( $image, strpos( $image, '"' ) + 1 );
290
+ $result = $wpdb->get_results( "SELECT ID FROM {$wpdb->posts} WHERE guid = '" . $image . "'" );
291
+ if ( $result ) {
292
+ $thumb_id = $result[0]->ID;
293
+ }
294
+ }
295
+
296
+ // Still no id found? Try found by post_name
297
+ if ( ! $thumb_id ) {
298
+ if ( isset( $matches[0][ $key ] ) && ! empty( $matches[0][ $key ] ) ) {
299
+ $image_url = trim( $matches[0][ $key ] );
300
+ $_parts = explode( '/', $image_url );
301
+ $image_url = array_pop( $_parts );
302
+ $_parts = explode( '.', $image_url );
303
+ $image_url = array_shift( $_parts );
304
+
305
+ if ( $image_url ) {
306
+ $result = $wpdb->get_results( "SELECT ID FROM {$wpdb->posts} WHERE post_name = '" . $image_url . "' AND post_type = 'attachment'" );
307
+ if ( $result ) {
308
+ $thumb_id = $result[0]->ID;
309
+ }
310
+ }
311
+ }
312
+ }
313
+
314
+ // Ok. Still no id found. Some other way used to insert the image in post. Now we must fetch the image from URL and do the needful.
315
+ if ( ! $thumb_id ) {
316
+ $thumb_id = $this->generate_post_thumb( $matches, $key, $post[0]->post_content, $post_id );
317
+ }
318
+
319
+ // If we succeed in generating thumb, let's update post meta
320
+ if ( $thumb_id ) {
321
+ update_post_meta( $post_id, '_thumbnail_id', $thumb_id );
322
+ break;
323
+ }
324
+ }
325
+ }
326
+
327
+ return (bool) $thumb_id;
328
+ }
329
+
330
+ /**
331
+ * Search through an array for a matching key.
332
+ *
333
+ * Examples:
334
+ * <code>
335
+ * $array = array(
336
+ * "database.name" => "my_db_name",
337
+ * "database.host" => "myhost.com",
338
+ * "database.user" => "admin",
339
+ * "database.pass" => "a secret."
340
+ * );
341
+ *
342
+ * $search = array_contains_key($array, "database");
343
+ * var_dump($search);
344
+ *
345
+ * Result:
346
+ * array (size=4)
347
+ * 'database.name' => string 'my_db_name' (length=10)
348
+ * 'database.host' => string 'myhost.com' (length=10)
349
+ * 'database.user' => string 'admin' (length=5)
350
+ * 'database.pass' => string 'a secret.' (length=9)
351
+ * </code>
352
+ *
353
+ * https://gist.github.com/steve-todorov/3671626
354
+ *
355
+ * @param array $input_array
356
+ * @param string $search_value
357
+ * @param bool $case_sensitive
358
+ *
359
+ * @return array
360
+ */
361
+ function array_contains_key( array $input_array, $search_value, $case_sensitive = false ) {
362
+ if ( $case_sensitive ) {
363
+ $preg_match = '/' . $search_value . '/';
364
+ } else {
365
+ $preg_match = '/' . $search_value . '/i';
366
+ }
367
+ $return_array = array();
368
+ $keys = array_keys( $input_array );
369
+ foreach ( $keys as $k ) {
370
+ if ( preg_match( $preg_match, $k ) ) {
371
+ $return_array[ $k ] = $input_array[ $k ];
372
+ }
373
+ }
374
+
375
+ return $return_array;
376
+ }
377
+
378
+ /**
379
+ * Fetch image from URL and generate required thumbnails.
380
+ *
381
+ * @param $matches
382
+ * @param $key
383
+ * @param $post_content
384
+ * @param $post_id
385
+ *
386
+ * @return int|WP_Error|null
387
+ */
388
+ public function generate_post_thumb ( $matches, $key, $post_content, $post_id ) {
389
+ // Make sure to assign correct title to the image. Extract it from img tag
390
+ $imageTitle = '';
391
+ preg_match_all( '/<\s*img [^\>]*title\s*=\s*[\""\']?([^\""\'>]*)/i', $post_content, $matchesTitle );
392
+
393
+ if ( count( $matchesTitle ) && isset( $matchesTitle[1] ) && isset( $matchesTitle[1][ $key ] ) ) {
394
+ $imageTitle = $matchesTitle[1][ $key ];
395
+ }
396
+
397
+ // Get the URL now for further processing
398
+ $imageUrl = $matches[1][ $key ];
399
+
400
+ // Get the file name
401
+ $filename = substr( $imageUrl, ( strrpos( $imageUrl, '/' ) ) + 1 );
402
+
403
+ if ( ! ( ( $uploads = wp_upload_dir( current_time( 'mysql' ) ) ) && false === $uploads['error'] ) ) {
404
+ return null;
405
+ }
406
+
407
+ // Generate unique file name
408
+ $filename = wp_unique_filename( $uploads['path'], $filename );
409
+
410
+ // Move the file to the uploads dir
411
+ $new_file = $uploads['path'] . "/$filename";
412
+
413
+ if ( ! ini_get( 'allow_url_fopen' ) ) {
414
+ $file_data = $this->curl_get_file_contents( $imageUrl );
415
+ } else {
416
+ $file_data = @file_get_contents( $imageUrl );
417
+ }
418
+
419
+ if ( ! $file_data ) {
420
+ return null;
421
+ }
422
+
423
+ //Fix for checking file extensions
424
+ $exts = explode( ".", $filename );
425
+ if ( count( $exts ) > 2 ) {
426
+ return null;
427
+ }
428
+
429
+ $allowed = get_allowed_mime_types();
430
+ $ext = pathinfo( $new_file, PATHINFO_EXTENSION );
431
+ if ( ! $this->array_contains_key( $allowed, $ext ) ) {
432
+ return null;
433
+ }
434
+
435
+ file_put_contents( $new_file, $file_data );
436
+
437
+ // Set correct file permissions
438
+ $stat = stat( dirname( $new_file ) );
439
+ $perms = $stat['mode'] & 0000666;
440
+ @ chmod( $new_file, $perms );
441
+
442
+ $mimes = $type = $file = null;
443
+
444
+ // Get the file type. Must to use it as a post thumbnail.
445
+ $wp_filetype = wp_check_filetype( $filename, $mimes );
446
+
447
+ extract( $wp_filetype );
448
+
449
+ // No file type! No point to proceed further
450
+ if ( ( ! $type || ! $ext ) && ! current_user_can( 'unfiltered_upload' ) ) {
451
+ return null;
452
+ }
453
+
454
+ // Compute the URL
455
+ $url = $uploads['url'] . "/$filename";
456
+
457
+ // Construct the attachment array
458
+ $attachment = array(
459
+ 'post_mime_type' => $type,
460
+ 'guid' => $url,
461
+ 'post_parent' => null,
462
+ 'post_title' => $imageTitle,
463
+ 'post_content' => '',
464
+ );
465
+
466
+ $thumb_id = wp_insert_attachment( $attachment, $file, $post_id );
467
+ if ( ! is_wp_error( $thumb_id ) ) {
468
+ require_once( ABSPATH . '/wp-admin/includes/image.php' );
469
+
470
+ // Added fix by misthero as suggested
471
+ wp_update_attachment_metadata( $thumb_id, wp_generate_attachment_metadata( $thumb_id, $new_file ) );
472
+ update_attached_file( $thumb_id, $new_file );
473
+
474
+ return $thumb_id;
475
+ }
476
+
477
+ return null;
478
+ }
479
+
480
+ /**
481
+ * Function to fetch the contents of URL using curl in absence of allow_url_fopen.
482
+ *
483
+ * Copied from user comment on php.net (http://in.php.net/manual/en/function.file-get-contents.php#82255)
484
+ */
485
+ public function curl_get_file_contents ( $URL ) {
486
+ $c = curl_init();
487
+ curl_setopt( $c, CURLOPT_RETURNTRANSFER, 1 );
488
+ curl_setopt( $c, CURLOPT_URL, $URL );
489
+ $contents = curl_exec( $c );
490
+ curl_close( $c );
491
+
492
+ if ( $contents ) {
493
+ return $contents;
494
+ }
495
+
496
+ return false;
497
+ }
498
+ }
499
+
500
+ /**
501
+ * Get instance of the core class.
502
+ *
503
+ * @return AutoPostThumbnails
504
+ */
505
+ function auto_post_thumbnails () {
506
+ return AutoPostThumbnails::instance();
507
+ }
508
+
509
+ // Bootstrap
510
+ auto_post_thumbnails();
511
+
512
+
css/style.css CHANGED
@@ -1,47 +1,67 @@
1
- .apt_pro_advertisement{
2
- float: right;
3
- width: 230px;
4
- margin-top: 15px;
5
- margin-right:-240px;
6
- border: medium none;
7
- border-radius: 4px;
8
- box-shadow: 1px 1px 5px rgba(0, 0, 0, 0.3);
9
- padding:5px 5px 15px 5px;
10
- background: #fff;
11
- }
12
-
13
- .apt_pro_logo {
14
- float:left;
15
- box-shadow: 4px 4px 5px rgba(0, 0, 0, 0.3);
16
- margin:10px;
17
- border-radius:3px;
18
- }
19
-
20
- .apt_pro_logo img {
21
- border-radius:3px;
22
- }
23
-
24
- .apt_pro_check_out {
25
- float:left;
26
- font-size:35px;
27
- line-height:35px;
28
- width:120px;
29
- padding-top:10px;
30
- text-align: center;
31
- font-family:message-box;
32
- color: #EEEEEE;
33
- text-shadow: 1px 1px 2px #000000;
34
- }
35
-
36
- .apt_pro_features {
37
- padding-left:10px;
38
- clear:both;
39
- }
40
-
41
- .apt_pro_features ul {
42
- list-style:disc inside;
43
- }
44
-
45
- .apt_pro_buy_now {
46
- text-align: center;
47
- }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ .apt_pro_advertisement {
2
+ float: right;
3
+ width: 230px;
4
+ margin-top: 15px;
5
+ margin-right: -240px;
6
+ border: medium none;
7
+ border-radius: 4px;
8
+ box-shadow: 1px 1px 5px rgba(0, 0, 0, 0.3);
9
+ padding: 5px 5px 15px 5px;
10
+ background: #fff;
11
+ }
12
+
13
+ .apt_pro_logo {
14
+ float: left;
15
+ box-shadow: 4px 4px 5px rgba(0, 0, 0, 0.3);
16
+ margin: 10px;
17
+ border-radius: 3px;
18
+ }
19
+
20
+ .apt_pro_logo img {
21
+ border-radius: 3px;
22
+ }
23
+
24
+ .apt_pro_check_out {
25
+ float: left;
26
+ font-size: 35px;
27
+ line-height: 35px;
28
+ width: 120px;
29
+ padding-top: 10px;
30
+ text-align: center;
31
+ font-family: message-box;
32
+ color: #EEEEEE;
33
+ text-shadow: 1px 1px 2px #000000;
34
+ }
35
+
36
+ .apt_pro_features {
37
+ padding-left: 10px;
38
+ clear: both;
39
+ }
40
+
41
+ .apt_pro_features ul {
42
+ list-style: disc inside;
43
+ }
44
+
45
+ .apt_pro_buy_now {
46
+ text-align: center;
47
+ }
48
+
49
+ .apt_loading {
50
+ width: 100%;
51
+ height: 100%;
52
+ top: 0;
53
+ left: 0;
54
+ position: fixed;
55
+ display: none;
56
+ opacity: 0.7;
57
+ background-color: #fff;
58
+ z-index: 99;
59
+ text-align: center;
60
+ }
61
+
62
+ .apt-loading-image {
63
+ position: absolute;
64
+ top: 50%;
65
+ left: 50%;
66
+ z-index: 100;
67
+ }
img/ajax-loader.gif ADDED
Binary file
jquery-ui/jquery.ui.progressbar.min.js CHANGED
@@ -1,16 +1,16 @@
1
- /*
2
- * jQuery UI Progressbar 1.8.6
3
- *
4
- * Copyright 2010, AUTHORS.txt (http://jqueryui.com/about)
5
- * Dual licensed under the MIT or GPL Version 2 licenses.
6
- * http://jquery.org/license
7
- *
8
- * http://docs.jquery.com/UI/Progressbar
9
- *
10
- * Depends:
11
- * jquery.ui.core.js
12
- * jquery.ui.widget.js
13
- */
14
- (function(b,c){b.widget("ui.progressbar",{options:{value:0},min:0,max:100,_create:function(){this.element.addClass("ui-progressbar ui-widget ui-widget-content ui-corner-all").attr({role:"progressbar","aria-valuemin":this.min,"aria-valuemax":this.max,"aria-valuenow":this._value()});this.valueDiv=b("<div class='ui-progressbar-value ui-widget-header ui-corner-left'></div>").appendTo(this.element);this._refreshValue()},destroy:function(){this.element.removeClass("ui-progressbar ui-widget ui-widget-content ui-corner-all").removeAttr("role").removeAttr("aria-valuemin").removeAttr("aria-valuemax").removeAttr("aria-valuenow");
15
- this.valueDiv.remove();b.Widget.prototype.destroy.apply(this,arguments)},value:function(a){if(a===c)return this._value();this._setOption("value",a);return this},_setOption:function(a,d){if(a==="value"){this.options.value=d;this._refreshValue();this._trigger("change");this._value()===this.max&&this._trigger("complete")}b.Widget.prototype._setOption.apply(this,arguments)},_value:function(){var a=this.options.value;if(typeof a!=="number")a=0;return Math.min(this.max,Math.max(this.min,a))},_refreshValue:function(){var a=
16
- this.value();this.valueDiv.toggleClass("ui-corner-right",a===this.max).width(a+"%");this.element.attr("aria-valuenow",a)}});b.extend(b.ui.progressbar,{version:"1.8.6"})})(jQuery);
1
+ /*
2
+ * jQuery UI Progressbar 1.8.6
3
+ *
4
+ * Copyright 2010, AUTHORS.txt (http://jqueryui.com/about)
5
+ * Dual licensed under the MIT or GPL Version 2 licenses.
6
+ * http://jquery.org/license
7
+ *
8
+ * http://docs.jquery.com/UI/Progressbar
9
+ *
10
+ * Depends:
11
+ * jquery.ui.core.js
12
+ * jquery.ui.widget.js
13
+ */
14
+ (function(b,c){b.widget("ui.progressbar",{options:{value:0},min:0,max:100,_create:function(){this.element.addClass("ui-progressbar ui-widget ui-widget-content ui-corner-all").attr({role:"progressbar","aria-valuemin":this.min,"aria-valuemax":this.max,"aria-valuenow":this._value()});this.valueDiv=b("<div class='ui-progressbar-value ui-widget-header ui-corner-left'></div>").appendTo(this.element);this._refreshValue()},destroy:function(){this.element.removeClass("ui-progressbar ui-widget ui-widget-content ui-corner-all").removeAttr("role").removeAttr("aria-valuemin").removeAttr("aria-valuemax").removeAttr("aria-valuenow");
15
+ this.valueDiv.remove();b.Widget.prototype.destroy.apply(this,arguments)},value:function(a){if(a===c)return this._value();this._setOption("value",a);return this},_setOption:function(a,d){if(a==="value"){this.options.value=d;this._refreshValue();this._trigger("change");this._value()===this.max&&this._trigger("complete")}b.Widget.prototype._setOption.apply(this,arguments)},_value:function(){var a=this.options.value;if(typeof a!=="number")a=0;return Math.min(this.max,Math.max(this.min,a))},_refreshValue:function(){var a=
16
+ this.value();this.valueDiv.toggleClass("ui-corner-right",a===this.max).width(a+"%");this.element.attr("aria-valuenow",a)}});b.extend(b.ui.progressbar,{version:"1.8.6"})})(jQuery);
jquery-ui/redmond/jquery-ui-1.7.2.custom.css CHANGED
@@ -1,406 +1,406 @@
1
- /*
2
- * jQuery UI CSS Framework
3
- * Copyright (c) 2009 AUTHORS.txt (http://jqueryui.com/about)
4
- * Dual licensed under the MIT (MIT-LICENSE.txt) and GPL (GPL-LICENSE.txt) licenses.
5
- */
6
-
7
- /* Layout helpers
8
- ----------------------------------*/
9
- .ui-helper-hidden { display: none; }
10
- .ui-helper-hidden-accessible { position: absolute; left: -99999999px; }
11
- .ui-helper-reset { margin: 0; padding: 0; border: 0; outline: 0; line-height: 1.3; text-decoration: none; font-size: 100%; list-style: none; }
12
- .ui-helper-clearfix:after { content: "."; display: block; height: 0; clear: both; visibility: hidden; }
13
- .ui-helper-clearfix { display: inline-block; }
14
- /* required comment for clearfix to work in Opera \*/
15
- * html .ui-helper-clearfix { height:1%; }
16
- .ui-helper-clearfix { display:block; }
17
- /* end clearfix */
18
- .ui-helper-zfix { width: 100%; height: 100%; top: 0; left: 0; position: absolute; opacity: 0; filter:Alpha(Opacity=0); }
19
-
20
-
21
- /* Interaction Cues
22
- ----------------------------------*/
23
- .ui-state-disabled { cursor: default !important; }
24
-
25
-
26
- /* Icons
27
- ----------------------------------*/
28
-
29
- /* states and images */
30
- .ui-icon { display: block; text-indent: -99999px; overflow: hidden; background-repeat: no-repeat; }
31
-
32
-
33
- /* Misc visuals
34
- ----------------------------------*/
35
-
36
- /* Overlays */
37
- .ui-widget-overlay { position: absolute; top: 0; left: 0; width: 100%; height: 100%; }
38
-
39
-
40
-
41
- /*
42
- * jQuery UI CSS Framework
43
- * Copyright (c) 2009 AUTHORS.txt (http://jqueryui.com/about)
44
- * Dual licensed under the MIT (MIT-LICENSE.txt) and GPL (GPL-LICENSE.txt) licenses.
45
- * To view and modify this theme, visit http://jqueryui.com/themeroller/?ffDefault=Lucida%20Grande,%20Lucida%20Sans,%20Arial,%20sans-serif&fwDefault=bold&fsDefault=1.1em&cornerRadius=5px&bgColorHeader=5c9ccc&bgTextureHeader=12_gloss_wave.png&bgImgOpacityHeader=55&borderColorHeader=4297d7&fcHeader=ffffff&iconColorHeader=d8e7f3&bgColorContent=fcfdfd&bgTextureContent=06_inset_hard.png&bgImgOpacityContent=100&borderColorContent=a6c9e2&fcContent=222222&iconColorContent=469bdd&bgColorDefault=dfeffc&bgTextureDefault=02_glass.png&bgImgOpacityDefault=85&borderColorDefault=c5dbec&fcDefault=2e6e9e&iconColorDefault=6da8d5&bgColorHover=d0e5f5&bgTextureHover=02_glass.png&bgImgOpacityHover=75&borderColorHover=79b7e7&fcHover=1d5987&iconColorHover=217bc0&bgColorActive=f5f8f9&bgTextureActive=06_inset_hard.png&bgImgOpacityActive=100&borderColorActive=79b7e7&fcActive=e17009&iconColorActive=f9bd01&bgColorHighlight=fbec88&bgTextureHighlight=01_flat.png&bgImgOpacityHighlight=55&borderColorHighlight=fad42e&fcHighlight=363636&iconColorHighlight=2e83ff&bgColorError=fef1ec&bgTextureError=02_glass.png&bgImgOpacityError=95&borderColorError=cd0a0a&fcError=cd0a0a&iconColorError=cd0a0a&bgColorOverlay=aaaaaa&bgTextureOverlay=01_flat.png&bgImgOpacityOverlay=0&opacityOverlay=30&bgColorShadow=aaaaaa&bgTextureShadow=01_flat.png&bgImgOpacityShadow=0&opacityShadow=30&thicknessShadow=8px&offsetTopShadow=-8px&offsetLeftShadow=-8px&cornerRadiusShadow=8px
46
- */
47
-
48
-
49
- /* Component containers
50
- ----------------------------------*/
51
- .ui-widget { font-family: Lucida Grande, Lucida Sans, Arial, sans-serif; font-size: 1.1em; }
52
- .ui-widget input, .ui-widget select, .ui-widget textarea, .ui-widget button { font-family: Lucida Grande, Lucida Sans, Arial, sans-serif; font-size: 1em; }
53
- .ui-widget-content { border: 1px solid #a6c9e2; background: #fcfdfd url(images/ui-bg_inset-hard_100_fcfdfd_1x100.png) 50% bottom repeat-x; color: #222222; }
54
- .ui-widget-content a { color: #222222; }
55
- .ui-widget-header { border: 1px solid #4297d7; background: #5c9ccc url(images/ui-bg_gloss-wave_55_5c9ccc_500x100.png) 50% 50% repeat-x; color: #ffffff; font-weight: bold; }
56
- .ui-widget-header a { color: #ffffff; }
57
-
58
- /* Interaction states
59
- ----------------------------------*/
60
- .ui-state-default, .ui-widget-content .ui-state-default { border: 1px solid #c5dbec; background: #dfeffc url(images/ui-bg_glass_85_dfeffc_1x400.png) 50% 50% repeat-x; font-weight: bold; color: #2e6e9e; outline: none; }
61
- .ui-state-default a, .ui-state-default a:link, .ui-state-default a:visited { color: #2e6e9e; text-decoration: none; outline: none; }
62
- .ui-state-hover, .ui-widget-content .ui-state-hover, .ui-state-focus, .ui-widget-content .ui-state-focus { border: 1px solid #79b7e7; background: #d0e5f5 url(images/ui-bg_glass_75_d0e5f5_1x400.png) 50% 50% repeat-x; font-weight: bold; color: #1d5987; outline: none; }
63
- .ui-state-hover a, .ui-state-hover a:hover { color: #1d5987; text-decoration: none; outline: none; }
64
- .ui-state-active, .ui-widget-content .ui-state-active { border: 1px solid #79b7e7; background: #f5f8f9 url(images/ui-bg_inset-hard_100_f5f8f9_1x100.png) 50% 50% repeat-x; font-weight: bold; color: #e17009; outline: none; }
65
- .ui-state-active a, .ui-state-active a:link, .ui-state-active a:visited { color: #e17009; outline: none; text-decoration: none; }
66
-
67
- /* Interaction Cues
68
- ----------------------------------*/
69
- .ui-state-highlight, .ui-widget-content .ui-state-highlight {border: 1px solid #fad42e; background: #fbec88 url(images/ui-bg_flat_55_fbec88_40x100.png) 50% 50% repeat-x; color: #363636; }
70
- .ui-state-highlight a, .ui-widget-content .ui-state-highlight a { color: #363636; }
71
- .ui-state-error, .ui-widget-content .ui-state-error {border: 1px solid #cd0a0a; background: #fef1ec url(images/ui-bg_glass_95_fef1ec_1x400.png) 50% 50% repeat-x; color: #cd0a0a; }
72
- .ui-state-error a, .ui-widget-content .ui-state-error a { color: #cd0a0a; }
73
- .ui-state-error-text, .ui-widget-content .ui-state-error-text { color: #cd0a0a; }
74
- .ui-state-disabled, .ui-widget-content .ui-state-disabled { opacity: .35; filter:Alpha(Opacity=35); background-image: none; }
75
- .ui-priority-primary, .ui-widget-content .ui-priority-primary { font-weight: bold; }
76
- .ui-priority-secondary, .ui-widget-content .ui-priority-secondary { opacity: .7; filter:Alpha(Opacity=70); font-weight: normal; }
77
-
78
- /* Icons
79
- ----------------------------------*/
80
-
81
- /* states and images */
82
- .ui-icon { width: 16px; height: 16px; background-image: url(images/ui-icons_469bdd_256x240.png); }
83
- .ui-widget-content .ui-icon {background-image: url(images/ui-icons_469bdd_256x240.png); }
84
- .ui-widget-header .ui-icon {background-image: url(images/ui-icons_d8e7f3_256x240.png); }
85
- .ui-state-default .ui-icon { background-image: url(images/ui-icons_6da8d5_256x240.png); }
86
- .ui-state-hover .ui-icon, .ui-state-focus .ui-icon {background-image: url(images/ui-icons_217bc0_256x240.png); }
87
- .ui-state-active .ui-icon {background-image: url(images/ui-icons_f9bd01_256x240.png); }
88
- .ui-state-highlight .ui-icon {background-image: url(images/ui-icons_2e83ff_256x240.png); }
89
- .ui-state-error .ui-icon, .ui-state-error-text .ui-icon {background-image: url(images/ui-icons_cd0a0a_256x240.png); }
90
-
91
- /* positioning */
92
- .ui-icon-carat-1-n { background-position: 0 0; }
93
- .ui-icon-carat-1-ne { background-position: -16px 0; }
94
- .ui-icon-carat-1-e { background-position: -32px 0; }
95
- .ui-icon-carat-1-se { background-position: -48px 0; }
96
- .ui-icon-carat-1-s { background-position: -64px 0; }
97
- .ui-icon-carat-1-sw { background-position: -80px 0; }
98
- .ui-icon-carat-1-w { background-position: -96px 0; }
99
- .ui-icon-carat-1-nw { background-position: -112px 0; }
100
- .ui-icon-carat-2-n-s { background-position: -128px 0; }
101
- .ui-icon-carat-2-e-w { background-position: -144px 0; }
102
- .ui-icon-triangle-1-n { background-position: 0 -16px; }
103
- .ui-icon-triangle-1-ne { background-position: -16px -16px; }
104
- .ui-icon-triangle-1-e { background-position: -32px -16px; }
105
- .ui-icon-triangle-1-se { background-position: -48px -16px; }
106
- .ui-icon-triangle-1-s { background-position: -64px -16px; }
107
- .ui-icon-triangle-1-sw { background-position: -80px -16px; }
108
- .ui-icon-triangle-1-w { background-position: -96px -16px; }
109
- .ui-icon-triangle-1-nw { background-position: -112px -16px; }
110
- .ui-icon-triangle-2-n-s { background-position: -128px -16px; }
111
- .ui-icon-triangle-2-e-w { background-position: -144px -16px; }
112
- .ui-icon-arrow-1-n { background-position: 0 -32px; }
113
- .ui-icon-arrow-1-ne { background-position: -16px -32px; }
114
- .ui-icon-arrow-1-e { background-position: -32px -32px; }
115
- .ui-icon-arrow-1-se { background-position: -48px -32px; }
116
- .ui-icon-arrow-1-s { background-position: -64px -32px; }
117
- .ui-icon-arrow-1-sw { background-position: -80px -32px; }
118
- .ui-icon-arrow-1-w { background-position: -96px -32px; }
119
- .ui-icon-arrow-1-nw { background-position: -112px -32px; }
120
- .ui-icon-arrow-2-n-s { background-position: -128px -32px; }
121
- .ui-icon-arrow-2-ne-sw { background-position: -144px -32px; }
122
- .ui-icon-arrow-2-e-w { background-position: -160px -32px; }
123
- .ui-icon-arrow-2-se-nw { background-position: -176px -32px; }
124
- .ui-icon-arrowstop-1-n { background-position: -192px -32px; }
125
- .ui-icon-arrowstop-1-e { background-position: -208px -32px; }
126
- .ui-icon-arrowstop-1-s { background-position: -224px -32px; }
127
- .ui-icon-arrowstop-1-w { background-position: -240px -32px; }
128
- .ui-icon-arrowthick-1-n { background-position: 0 -48px; }
129
- .ui-icon-arrowthick-1-ne { background-position: -16px -48px; }
130
- .ui-icon-arrowthick-1-e { background-position: -32px -48px; }
131
- .ui-icon-arrowthick-1-se { background-position: -48px -48px; }
132
- .ui-icon-arrowthick-1-s { background-position: -64px -48px; }
133
- .ui-icon-arrowthick-1-sw { background-position: -80px -48px; }
134
- .ui-icon-arrowthick-1-w { background-position: -96px -48px; }
135
- .ui-icon-arrowthick-1-nw { background-position: -112px -48px; }
136
- .ui-icon-arrowthick-2-n-s { background-position: -128px -48px; }
137
- .ui-icon-arrowthick-2-ne-sw { background-position: -144px -48px; }
138
- .ui-icon-arrowthick-2-e-w { background-position: -160px -48px; }
139
- .ui-icon-arrowthick-2-se-nw { background-position: -176px -48px; }
140
- .ui-icon-arrowthickstop-1-n { background-position: -192px -48px; }
141
- .ui-icon-arrowthickstop-1-e { background-position: -208px -48px; }
142
- .ui-icon-arrowthickstop-1-s { background-position: -224px -48px; }
143
- .ui-icon-arrowthickstop-1-w { background-position: -240px -48px; }
144
- .ui-icon-arrowreturnthick-1-w { background-position: 0 -64px; }
145
- .ui-icon-arrowreturnthick-1-n { background-position: -16px -64px; }
146
- .ui-icon-arrowreturnthick-1-e { background-position: -32px -64px; }
147
- .ui-icon-arrowreturnthick-1-s { background-position: -48px -64px; }
148
- .ui-icon-arrowreturn-1-w { background-position: -64px -64px; }
149
- .ui-icon-arrowreturn-1-n { background-position: -80px -64px; }
150
- .ui-icon-arrowreturn-1-e { background-position: -96px -64px; }
151
- .ui-icon-arrowreturn-1-s { background-position: -112px -64px; }
152
- .ui-icon-arrowrefresh-1-w { background-position: -128px -64px; }
153
- .ui-icon-arrowrefresh-1-n { background-position: -144px -64px; }
154
- .ui-icon-arrowrefresh-1-e { background-position: -160px -64px; }
155
- .ui-icon-arrowrefresh-1-s { background-position: -176px -64px; }
156
- .ui-icon-arrow-4 { background-position: 0 -80px; }
157
- .ui-icon-arrow-4-diag { background-position: -16px -80px; }
158
- .ui-icon-extlink { background-position: -32px -80px; }
159
- .ui-icon-newwin { background-position: -48px -80px; }
160
- .ui-icon-refresh { background-position: -64px -80px; }
161
- .ui-icon-shuffle { background-position: -80px -80px; }
162
- .ui-icon-transfer-e-w { background-position: -96px -80px; }
163
- .ui-icon-transferthick-e-w { background-position: -112px -80px; }
164
- .ui-icon-folder-collapsed { background-position: 0 -96px; }
165
- .ui-icon-folder-open { background-position: -16px -96px; }
166
- .ui-icon-document { background-position: -32px -96px; }
167
- .ui-icon-document-b { background-position: -48px -96px; }
168
- .ui-icon-note { background-position: -64px -96px; }
169
- .ui-icon-mail-closed { background-position: -80px -96px; }
170
- .ui-icon-mail-open { background-position: -96px -96px; }
171
- .ui-icon-suitcase { background-position: -112px -96px; }
172
- .ui-icon-comment { background-position: -128px -96px; }
173
- .ui-icon-person { background-position: -144px -96px; }
174
- .ui-icon-print { background-position: -160px -96px; }
175
- .ui-icon-trash { background-position: -176px -96px; }
176
- .ui-icon-locked { background-position: -192px -96px; }
177
- .ui-icon-unlocked { background-position: -208px -96px; }
178
- .ui-icon-bookmark { background-position: -224px -96px; }
179
- .ui-icon-tag { background-position: -240px -96px; }
180
- .ui-icon-home { background-position: 0 -112px; }
181
- .ui-icon-flag { background-position: -16px -112px; }
182
- .ui-icon-calendar { background-position: -32px -112px; }
183
- .ui-icon-cart { background-position: -48px -112px; }
184
- .ui-icon-pencil { background-position: -64px -112px; }
185
- .ui-icon-clock { background-position: -80px -112px; }
186
- .ui-icon-disk { background-position: -96px -112px; }
187
- .ui-icon-calculator { background-position: -112px -112px; }
188
- .ui-icon-zoomin { background-position: -128px -112px; }
189
- .ui-icon-zoomout { background-position: -144px -112px; }
190
- .ui-icon-search { background-position: -160px -112px; }
191
- .ui-icon-wrench { background-position: -176px -112px; }
192
- .ui-icon-gear { background-position: -192px -112px; }
193
- .ui-icon-heart { background-position: -208px -112px; }
194
- .ui-icon-star { background-position: -224px -112px; }
195
- .ui-icon-link { background-position: -240px -112px; }
196
- .ui-icon-cancel { background-position: 0 -128px; }
197
- .ui-icon-plus { background-position: -16px -128px; }
198
- .ui-icon-plusthick { background-position: -32px -128px; }
199
- .ui-icon-minus { background-position: -48px -128px; }
200
- .ui-icon-minusthick { background-position: -64px -128px; }
201
- .ui-icon-close { background-position: -80px -128px; }
202
- .ui-icon-closethick { background-position: -96px -128px; }
203
- .ui-icon-key { background-position: -112px -128px; }
204
- .ui-icon-lightbulb { background-position: -128px -128px; }
205
- .ui-icon-scissors { background-position: -144px -128px; }
206
- .ui-icon-clipboard { background-position: -160px -128px; }
207
- .ui-icon-copy { background-position: -176px -128px; }
208
- .ui-icon-contact { background-position: -192px -128px; }
209
- .ui-icon-image { background-position: -208px -128px; }
210
- .ui-icon-video { background-position: -224px -128px; }
211
- .ui-icon-script { background-position: -240px -128px; }
212
- .ui-icon-alert { background-position: 0 -144px; }
213
- .ui-icon-info { background-position: -16px -144px; }
214
- .ui-icon-notice { background-position: -32px -144px; }
215
- .ui-icon-help { background-position: -48px -144px; }
216
- .ui-icon-check { background-position: -64px -144px; }
217
- .ui-icon-bullet { background-position: -80px -144px; }
218
- .ui-icon-radio-off { background-position: -96px -144px; }
219
- .ui-icon-radio-on { background-position: -112px -144px; }
220
- .ui-icon-pin-w { background-position: -128px -144px; }
221
- .ui-icon-pin-s { background-position: -144px -144px; }
222
- .ui-icon-play { background-position: 0 -160px; }
223
- .ui-icon-pause { background-position: -16px -160px; }
224
- .ui-icon-seek-next { background-position: -32px -160px; }
225
- .ui-icon-seek-prev { background-position: -48px -160px; }
226
- .ui-icon-seek-end { background-position: -64px -160px; }
227
- .ui-icon-seek-first { background-position: -80px -160px; }
228
- .ui-icon-stop { background-position: -96px -160px; }
229
- .ui-icon-eject { background-position: -112px -160px; }
230
- .ui-icon-volume-off { background-position: -128px -160px; }
231
- .ui-icon-volume-on { background-position: -144px -160px; }
232
- .ui-icon-power { background-position: 0 -176px; }
233
- .ui-icon-signal-diag { background-position: -16px -176px; }
234
- .ui-icon-signal { background-position: -32px -176px; }
235
- .ui-icon-battery-0 { background-position: -48px -176px; }
236
- .ui-icon-battery-1 { background-position: -64px -176px; }
237
- .ui-icon-battery-2 { background-position: -80px -176px; }
238
- .ui-icon-battery-3 { background-position: -96px -176px; }
239
- .ui-icon-circle-plus { background-position: 0 -192px; }
240
- .ui-icon-circle-minus { background-position: -16px -192px; }
241
- .ui-icon-circle-close { background-position: -32px -192px; }
242
- .ui-icon-circle-triangle-e { background-position: -48px -192px; }
243
- .ui-icon-circle-triangle-s { background-position: -64px -192px; }
244
- .ui-icon-circle-triangle-w { background-position: -80px -192px; }
245
- .ui-icon-circle-triangle-n { background-position: -96px -192px; }
246
- .ui-icon-circle-arrow-e { background-position: -112px -192px; }
247
- .ui-icon-circle-arrow-s { background-position: -128px -192px; }
248
- .ui-icon-circle-arrow-w { background-position: -144px -192px; }
249
- .ui-icon-circle-arrow-n { background-position: -160px -192px; }
250
- .ui-icon-circle-zoomin { background-position: -176px -192px; }
251
- .ui-icon-circle-zoomout { background-position: -192px -192px; }
252
- .ui-icon-circle-check { background-position: -208px -192px; }
253
- .ui-icon-circlesmall-plus { background-position: 0 -208px; }
254
- .ui-icon-circlesmall-minus { background-position: -16px -208px; }
255
- .ui-icon-circlesmall-close { background-position: -32px -208px; }
256
- .ui-icon-squaresmall-plus { background-position: -48px -208px; }
257
- .ui-icon-squaresmall-minus { background-position: -64px -208px; }
258
- .ui-icon-squaresmall-close { background-position: -80px -208px; }
259
- .ui-icon-grip-dotted-vertical { background-position: 0 -224px; }
260
- .ui-icon-grip-dotted-horizontal { background-position: -16px -224px; }
261
- .ui-icon-grip-solid-vertical { background-position: -32px -224px; }
262
- .ui-icon-grip-solid-horizontal { background-position: -48px -224px; }
263
- .ui-icon-gripsmall-diagonal-se { background-position: -64px -224px; }
264
- .ui-icon-grip-diagonal-se { background-position: -80px -224px; }
265
-
266
-
267
- /* Misc visuals
268
- ----------------------------------*/
269
-
270
- /* Corner radius */
271
- .ui-corner-tl { -moz-border-radius-topleft: 5px; -webkit-border-top-left-radius: 5px; }
272
- .ui-corner-tr { -moz-border-radius-topright: 5px; -webkit-border-top-right-radius: 5px; }
273
- .ui-corner-bl { -moz-border-radius-bottomleft: 5px; -webkit-border-bottom-left-radius: 5px; }
274
- .ui-corner-br { -moz-border-radius-bottomright: 5px; -webkit-border-bottom-right-radius: 5px; }
275
- .ui-corner-top { -moz-border-radius-topleft: 5px; -webkit-border-top-left-radius: 5px; -moz-border-radius-topright: 5px; -webkit-border-top-right-radius: 5px; }
276
- .ui-corner-bottom { -moz-border-radius-bottomleft: 5px; -webkit-border-bottom-left-radius: 5px; -moz-border-radius-bottomright: 5px; -webkit-border-bottom-right-radius: 5px; }
277
- .ui-corner-right { -moz-border-radius-topright: 5px; -webkit-border-top-right-radius: 5px; -moz-border-radius-bottomright: 5px; -webkit-border-bottom-right-radius: 5px; }
278
- .ui-corner-left { -moz-border-radius-topleft: 5px; -webkit-border-top-left-radius: 5px; -moz-border-radius-bottomleft: 5px; -webkit-border-bottom-left-radius: 5px; }
279
- .ui-corner-all { -moz-border-radius: 5px; -webkit-border-radius: 5px; }
280
-
281
- /* Overlays */
282
- .ui-widget-overlay { background: #aaaaaa url(images/ui-bg_flat_0_aaaaaa_40x100.png) 50% 50% repeat-x; opacity: .30;filter:Alpha(Opacity=30); }
283
- .ui-widget-shadow { margin: -8px 0 0 -8px; padding: 8px; background: #aaaaaa url(images/ui-bg_flat_0_aaaaaa_40x100.png) 50% 50% repeat-x; opacity: .30;filter:Alpha(Opacity=30); -moz-border-radius: 8px; -webkit-border-radius: 8px; }/* Accordion
284
- ----------------------------------*/
285
- .ui-accordion .ui-accordion-header { cursor: pointer; position: relative; margin-top: 1px; zoom: 1; }
286
- .ui-accordion .ui-accordion-li-fix { display: inline; }
287
- .ui-accordion .ui-accordion-header-active { border-bottom: 0 !important; }
288
- .ui-accordion .ui-accordion-header a { display: block; font-size: 1em; padding: .5em .5em .5em 2.2em; }
289
- .ui-accordion .ui-accordion-header .ui-icon { position: absolute; left: .5em; top: 50%; margin-top: -8px; }
290
- .ui-accordion .ui-accordion-content { padding: 1em 2.2em; border-top: 0; margin-top: -2px; position: relative; top: 1px; margin-bottom: 2px; overflow: auto; display: none; }
291
- .ui-accordion .ui-accordion-content-active { display: block; }/* Datepicker
292
- ----------------------------------*/
293
- .ui-datepicker { width: 17em; padding: .2em .2em 0; }
294
- .ui-datepicker .ui-datepicker-header { position:relative; padding:.2em 0; }
295
- .ui-datepicker .ui-datepicker-prev, .ui-datepicker .ui-datepicker-next { position:absolute; top: 2px; width: 1.8em; height: 1.8em; }
296
- .ui-datepicker .ui-datepicker-prev-hover, .ui-datepicker .ui-datepicker-next-hover { top: 1px; }
297
- .ui-datepicker .ui-datepicker-prev { left:2px; }
298
- .ui-datepicker .ui-datepicker-next { right:2px; }
299
- .ui-datepicker .ui-datepicker-prev-hover { left:1px; }
300
- .ui-datepicker .ui-datepicker-next-hover { right:1px; }
301
- .ui-datepicker .ui-datepicker-prev span, .ui-datepicker .ui-datepicker-next span { display: block; position: absolute; left: 50%; margin-left: -8px; top: 50%; margin-top: -8px; }
302
- .ui-datepicker .ui-datepicker-title { margin: 0 2.3em; line-height: 1.8em; text-align: center; }
303
- .ui-datepicker .ui-datepicker-title select { float:left; font-size:1em; margin:1px 0; }
304
- .ui-datepicker select.ui-datepicker-month-year {width: 100%;}
305
- .ui-datepicker select.ui-datepicker-month,
306
- .ui-datepicker select.ui-datepicker-year { width: 49%;}
307
- .ui-datepicker .ui-datepicker-title select.ui-datepicker-year { float: right; }
308
- .ui-datepicker table {width: 100%; font-size: .9em; border-collapse: collapse; margin:0 0 .4em; }
309
- .ui-datepicker th { padding: .7em .3em; text-align: center; font-weight: bold; border: 0; }
310
- .ui-datepicker td { border: 0; padding: 1px; }
311
- .ui-datepicker td span, .ui-datepicker td a { display: block; padding: .2em; text-align: right; text-decoration: none; }
312
- .ui-datepicker .ui-datepicker-buttonpane { background-image: none; margin: .7em 0 0 0; padding:0 .2em; border-left: 0; border-right: 0; border-bottom: 0; }
313
- .ui-datepicker .ui-datepicker-buttonpane button { float: right; margin: .5em .2em .4em; cursor: pointer; padding: .2em .6em .3em .6em; width:auto; overflow:visible; }
314
- .ui-datepicker .ui-datepicker-buttonpane button.ui-datepicker-current { float:left; }
315
-
316
- /* with multiple calendars */
317
- .ui-datepicker.ui-datepicker-multi { width:auto; }
318
- .ui-datepicker-multi .ui-datepicker-group { float:left; }
319
- .ui-datepicker-multi .ui-datepicker-group table { width:95%; margin:0 auto .4em; }
320
- .ui-datepicker-multi-2 .ui-datepicker-group { width:50%; }
321
- .ui-datepicker-multi-3 .ui-datepicker-group { width:33.3%; }
322
- .ui-datepicker-multi-4 .ui-datepicker-group { width:25%; }
323
- .ui-datepicker-multi .ui-datepicker-group-last .ui-datepicker-header { border-left-width:0; }
324
- .ui-datepicker-multi .ui-datepicker-group-middle .ui-datepicker-header { border-left-width:0; }
325
- .ui-datepicker-multi .ui-datepicker-buttonpane { clear:left; }
326
- .ui-datepicker-row-break { clear:both; width:100%; }
327
-
328
- /* RTL support */
329
- .ui-datepicker-rtl { direction: rtl; }
330
- .ui-datepicker-rtl .ui-datepicker-prev { right: 2px; left: auto; }
331
- .ui-datepicker-rtl .ui-datepicker-next { left: 2px; right: auto; }
332
- .ui-datepicker-rtl .ui-datepicker-prev:hover { right: 1px; left: auto; }
333
- .ui-datepicker-rtl .ui-datepicker-next:hover { left: 1px; right: auto; }
334
- .ui-datepicker-rtl .ui-datepicker-buttonpane { clear:right; }
335
- .ui-datepicker-rtl .ui-datepicker-buttonpane button { float: left; }
336
- .ui-datepicker-rtl .ui-datepicker-buttonpane button.ui-datepicker-current { float:right; }
337
- .ui-datepicker-rtl .ui-datepicker-group { float:right; }
338
- .ui-datepicker-rtl .ui-datepicker-group-last .ui-datepicker-header { border-right-width:0; border-left-width:1px; }
339
- .ui-datepicker-rtl .ui-datepicker-group-middle .ui-datepicker-header { border-right-width:0; border-left-width:1px; }
340
-
341
- /* IE6 IFRAME FIX (taken from datepicker 1.5.3 */
342
- .ui-datepicker-cover {
343
- display: none; /*sorry for IE5*/
344
- display/**/: block; /*sorry for IE5*/
345
- position: absolute; /*must have*/
346
- z-index: -1; /*must have*/
347
- filter: mask(); /*must have*/
348
- top: -4px; /*must have*/
349
- left: -4px; /*must have*/
350
- width: 200px; /*must have*/
351
- height: 200px; /*must have*/
352
- }/* Dialog
353
- ----------------------------------*/
354
- .ui-dialog { position: relative; padding: .2em; width: 300px; }
355
- .ui-dialog .ui-dialog-titlebar { padding: .5em .3em .3em 1em; position: relative; }
356
- .ui-dialog .ui-dialog-title { float: left; margin: .1em 0 .2em; }
357
- .ui-dialog .ui-dialog-titlebar-close { position: absolute; right: .3em; top: 50%; width: 19px; margin: -10px 0 0 0; padding: 1px; height: 18px; }
358
- .ui-dialog .ui-dialog-titlebar-close span { display: block; margin: 1px; }
359
- .ui-dialog .ui-dialog-titlebar-close:hover, .ui-dialog .ui-dialog-titlebar-close:focus { padding: 0; }
360
- .ui-dialog .ui-dialog-content { border: 0; padding: .5em 1em; background: none; overflow: auto; zoom: 1; }
361
- .ui-dialog .ui-dialog-buttonpane { text-align: left; border-width: 1px 0 0 0; background-image: none; margin: .5em 0 0 0; padding: .3em 1em .5em .4em; }
362
- .ui-dialog .ui-dialog-buttonpane button { float: right; margin: .5em .4em .5em 0; cursor: pointer; padding: .2em .6em .3em .6em; line-height: 1.4em; width:auto; overflow:visible; }
363
- .ui-dialog .ui-resizable-se { width: 14px; height: 14px; right: 3px; bottom: 3px; }
364
- .ui-draggable .ui-dialog-titlebar { cursor: move; }
365
- /* Progressbar
366
- ----------------------------------*/
367
- .ui-progressbar { height:2em; text-align: left; }
368
- .ui-progressbar .ui-progressbar-value {margin: -1px; height:100%; }/* Resizable
369
- ----------------------------------*/
370
- .ui-resizable { position: relative;}
371
- .ui-resizable-handle { position: absolute;font-size: 0.1px;z-index: 99999; display: block;}
372
- .ui-resizable-disabled .ui-resizable-handle, .ui-resizable-autohide .ui-resizable-handle { display: none; }
373
- .ui-resizable-n { cursor: n-resize; height: 7px; width: 100%; top: -5px; left: 0px; }
374
- .ui-resizable-s { cursor: s-resize; height: 7px; width: 100%; bottom: -5px; left: 0px; }
375
- .ui-resizable-e { cursor: e-resize; width: 7px; right: -5px; top: 0px; height: 100%; }
376
- .ui-resizable-w { cursor: w-resize; width: 7px; left: -5px; top: 0px; height: 100%; }
377
- .ui-resizable-se { cursor: se-resize; width: 12px; height: 12px; right: 1px; bottom: 1px; }
378
- .ui-resizable-sw { cursor: sw-resize; width: 9px; height: 9px; left: -5px; bottom: -5px; }
379
- .ui-resizable-nw { cursor: nw-resize; width: 9px; height: 9px; left: -5px; top: -5px; }
380
- .ui-resizable-ne { cursor: ne-resize; width: 9px; height: 9px; right: -5px; top: -5px;}/* Slider
381
- ----------------------------------*/
382
- .ui-slider { position: relative; text-align: left; }
383
- .ui-slider .ui-slider-handle { position: absolute; z-index: 2; width: 1.2em; height: 1.2em; cursor: default; }
384
- .ui-slider .ui-slider-range { position: absolute; z-index: 1; font-size: .7em; display: block; border: 0; }
385
-
386
- .ui-slider-horizontal { height: .8em; }
387
- .ui-slider-horizontal .ui-slider-handle { top: -.3em; margin-left: -.6em; }
388
- .ui-slider-horizontal .ui-slider-range { top: 0; height: 100%; }
389
- .ui-slider-horizontal .ui-slider-range-min { left: 0; }
390
- .ui-slider-horizontal .ui-slider-range-max { right: 0; }
391
-
392
- .ui-slider-vertical { width: .8em; height: 100px; }
393
- .ui-slider-vertical .ui-slider-handle { left: -.3em; margin-left: 0; margin-bottom: -.6em; }
394
- .ui-slider-vertical .ui-slider-range { left: 0; width: 100%; }
395
- .ui-slider-vertical .ui-slider-range-min { bottom: 0; }
396
- .ui-slider-vertical .ui-slider-range-max { top: 0; }/* Tabs
397
- ----------------------------------*/
398
- .ui-tabs { padding: .2em; zoom: 1; }
399
- .ui-tabs .ui-tabs-nav { list-style: none; position: relative; padding: .2em .2em 0; }
400
- .ui-tabs .ui-tabs-nav li { position: relative; float: left; border-bottom-width: 0 !important; margin: 0 .2em -1px 0; padding: 0; }
401
- .ui-tabs .ui-tabs-nav li a { float: left; text-decoration: none; padding: .5em 1em; }
402
- .ui-tabs .ui-tabs-nav li.ui-tabs-selected { padding-bottom: 1px; border-bottom-width: 0; }
403
- .ui-tabs .ui-tabs-nav li.ui-tabs-selected a, .ui-tabs .ui-tabs-nav li.ui-state-disabled a, .ui-tabs .ui-tabs-nav li.ui-state-processing a { cursor: text; }
404
- .ui-tabs .ui-tabs-nav li a, .ui-tabs.ui-tabs-collapsible .ui-tabs-nav li.ui-tabs-selected a { cursor: pointer; } /* first selector in group seems obsolete, but required to overcome bug in Opera applying cursor: text overall if defined elsewhere... */
405
- .ui-tabs .ui-tabs-panel { padding: 1em 1.4em; display: block; border-width: 0; background: none; }
406
- .ui-tabs .ui-tabs-hide { display: none !important; }
1
+ /*
2
+ * jQuery UI CSS Framework
3
+ * Copyright (c) 2009 AUTHORS.txt (http://jqueryui.com/about)
4
+ * Dual licensed under the MIT (MIT-LICENSE.txt) and GPL (GPL-LICENSE.txt) licenses.
5
+ */
6
+
7
+ /* Layout helpers
8
+ ----------------------------------*/
9
+ .ui-helper-hidden { display: none; }
10
+ .ui-helper-hidden-accessible { position: absolute; left: -99999999px; }
11
+ .ui-helper-reset { margin: 0; padding: 0; border: 0; outline: 0; line-height: 1.3; text-decoration: none; font-size: 100%; list-style: none; }
12
+ .ui-helper-clearfix:after { content: "."; display: block; height: 0; clear: both; visibility: hidden; }
13
+ .ui-helper-clearfix { display: inline-block; }
14
+ /* required comment for clearfix to work in Opera \*/
15
+ * html .ui-helper-clearfix { height:1%; }
16
+ .ui-helper-clearfix { display:block; }
17
+ /* end clearfix */
18
+ .ui-helper-zfix { width: 100%; height: 100%; top: 0; left: 0; position: absolute; opacity: 0; filter:Alpha(Opacity=0); }
19
+
20
+
21
+ /* Interaction Cues
22
+ ----------------------------------*/
23
+ .ui-state-disabled { cursor: default !important; }
24
+
25
+
26
+ /* Icons
27
+ ----------------------------------*/
28
+
29
+ /* states and images */
30
+ .ui-icon { display: block; text-indent: -99999px; overflow: hidden; background-repeat: no-repeat; }
31
+
32
+
33
+ /* Misc visuals
34
+ ----------------------------------*/
35
+
36
+ /* Overlays */
37
+ .ui-widget-overlay { position: absolute; top: 0; left: 0; width: 100%; height: 100%; }
38
+
39
+
40
+
41
+ /*
42
+ * jQuery UI CSS Framework
43
+ * Copyright (c) 2009 AUTHORS.txt (http://jqueryui.com/about)
44
+ * Dual licensed under the MIT (MIT-LICENSE.txt) and GPL (GPL-LICENSE.txt) licenses.
45
+ * To view and modify this theme, visit http://jqueryui.com/themeroller/?ffDefault=Lucida%20Grande,%20Lucida%20Sans,%20Arial,%20sans-serif&fwDefault=bold&fsDefault=1.1em&cornerRadius=5px&bgColorHeader=5c9ccc&bgTextureHeader=12_gloss_wave.png&bgImgOpacityHeader=55&borderColorHeader=4297d7&fcHeader=ffffff&iconColorHeader=d8e7f3&bgColorContent=fcfdfd&bgTextureContent=06_inset_hard.png&bgImgOpacityContent=100&borderColorContent=a6c9e2&fcContent=222222&iconColorContent=469bdd&bgColorDefault=dfeffc&bgTextureDefault=02_glass.png&bgImgOpacityDefault=85&borderColorDefault=c5dbec&fcDefault=2e6e9e&iconColorDefault=6da8d5&bgColorHover=d0e5f5&bgTextureHover=02_glass.png&bgImgOpacityHover=75&borderColorHover=79b7e7&fcHover=1d5987&iconColorHover=217bc0&bgColorActive=f5f8f9&bgTextureActive=06_inset_hard.png&bgImgOpacityActive=100&borderColorActive=79b7e7&fcActive=e17009&iconColorActive=f9bd01&bgColorHighlight=fbec88&bgTextureHighlight=01_flat.png&bgImgOpacityHighlight=55&borderColorHighlight=fad42e&fcHighlight=363636&iconColorHighlight=2e83ff&bgColorError=fef1ec&bgTextureError=02_glass.png&bgImgOpacityError=95&borderColorError=cd0a0a&fcError=cd0a0a&iconColorError=cd0a0a&bgColorOverlay=aaaaaa&bgTextureOverlay=01_flat.png&bgImgOpacityOverlay=0&opacityOverlay=30&bgColorShadow=aaaaaa&bgTextureShadow=01_flat.png&bgImgOpacityShadow=0&opacityShadow=30&thicknessShadow=8px&offsetTopShadow=-8px&offsetLeftShadow=-8px&cornerRadiusShadow=8px
46
+ */
47
+
48
+
49
+ /* Component containers
50
+ ----------------------------------*/
51
+ .ui-widget { font-family: Lucida Grande, Lucida Sans, Arial, sans-serif; font-size: 1.1em; }
52
+ .ui-widget input, .ui-widget select, .ui-widget textarea, .ui-widget button { font-family: Lucida Grande, Lucida Sans, Arial, sans-serif; font-size: 1em; }
53
+ .ui-widget-content { border: 1px solid #a6c9e2; background: #fcfdfd url(images/ui-bg_inset-hard_100_fcfdfd_1x100.png) 50% bottom repeat-x; color: #222222; }
54
+ .ui-widget-content a { color: #222222; }
55
+ .ui-widget-header { border: 1px solid #4297d7; background: #5c9ccc url(images/ui-bg_gloss-wave_55_5c9ccc_500x100.png) 50% 50% repeat-x; color: #ffffff; font-weight: bold; }
56
+ .ui-widget-header a { color: #ffffff; }
57
+
58
+ /* Interaction states
59
+ ----------------------------------*/
60
+ .ui-state-default, .ui-widget-content .ui-state-default { border: 1px solid #c5dbec; background: #dfeffc url(images/ui-bg_glass_85_dfeffc_1x400.png) 50% 50% repeat-x; font-weight: bold; color: #2e6e9e; outline: none; }
61
+ .ui-state-default a, .ui-state-default a:link, .ui-state-default a:visited { color: #2e6e9e; text-decoration: none; outline: none; }
62
+ .ui-state-hover, .ui-widget-content .ui-state-hover, .ui-state-focus, .ui-widget-content .ui-state-focus { border: 1px solid #79b7e7; background: #d0e5f5 url(images/ui-bg_glass_75_d0e5f5_1x400.png) 50% 50% repeat-x; font-weight: bold; color: #1d5987; outline: none; }
63
+ .ui-state-hover a, .ui-state-hover a:hover { color: #1d5987; text-decoration: none; outline: none; }
64
+ .ui-state-active, .ui-widget-content .ui-state-active { border: 1px solid #79b7e7; background: #f5f8f9 url(images/ui-bg_inset-hard_100_f5f8f9_1x100.png) 50% 50% repeat-x; font-weight: bold; color: #e17009; outline: none; }
65
+ .ui-state-active a, .ui-state-active a:link, .ui-state-active a:visited { color: #e17009; outline: none; text-decoration: none; }
66
+
67
+ /* Interaction Cues
68
+ ----------------------------------*/
69
+ .ui-state-highlight, .ui-widget-content .ui-state-highlight {border: 1px solid #fad42e; background: #fbec88 url(images/ui-bg_flat_55_fbec88_40x100.png) 50% 50% repeat-x; color: #363636; }
70
+ .ui-state-highlight a, .ui-widget-content .ui-state-highlight a { color: #363636; }
71
+ .ui-state-error, .ui-widget-content .ui-state-error {border: 1px solid #cd0a0a; background: #fef1ec url(images/ui-bg_glass_95_fef1ec_1x400.png) 50% 50% repeat-x; color: #cd0a0a; }
72
+ .ui-state-error a, .ui-widget-content .ui-state-error a { color: #cd0a0a; }
73
+ .ui-state-error-text, .ui-widget-content .ui-state-error-text { color: #cd0a0a; }
74
+ .ui-state-disabled, .ui-widget-content .ui-state-disabled { opacity: .35; filter:Alpha(Opacity=35); background-image: none; }
75
+ .ui-priority-primary, .ui-widget-content .ui-priority-primary { font-weight: bold; }
76
+ .ui-priority-secondary, .ui-widget-content .ui-priority-secondary { opacity: .7; filter:Alpha(Opacity=70); font-weight: normal; }
77
+
78
+ /* Icons
79
+ ----------------------------------*/
80
+
81
+ /* states and images */
82
+ .ui-icon { width: 16px; height: 16px; background-image: url(images/ui-icons_469bdd_256x240.png); }
83
+ .ui-widget-content .ui-icon {background-image: url(images/ui-icons_469bdd_256x240.png); }
84
+ .ui-widget-header .ui-icon {background-image: url(images/ui-icons_d8e7f3_256x240.png); }
85
+ .ui-state-default .ui-icon { background-image: url(images/ui-icons_6da8d5_256x240.png); }
86
+ .ui-state-hover .ui-icon, .ui-state-focus .ui-icon {background-image: url(images/ui-icons_217bc0_256x240.png); }
87
+ .ui-state-active .ui-icon {background-image: url(images/ui-icons_f9bd01_256x240.png); }
88
+ .ui-state-highlight .ui-icon {background-image: url(images/ui-icons_2e83ff_256x240.png); }
89
+ .ui-state-error .ui-icon, .ui-state-error-text .ui-icon {background-image: url(images/ui-icons_cd0a0a_256x240.png); }
90
+
91
+ /* positioning */
92
+ .ui-icon-carat-1-n { background-position: 0 0; }
93
+ .ui-icon-carat-1-ne { background-position: -16px 0; }
94
+ .ui-icon-carat-1-e { background-position: -32px 0; }
95
+ .ui-icon-carat-1-se { background-position: -48px 0; }
96
+ .ui-icon-carat-1-s { background-position: -64px 0; }
97
+ .ui-icon-carat-1-sw { background-position: -80px 0; }
98
+ .ui-icon-carat-1-w { background-position: -96px 0; }
99
+ .ui-icon-carat-1-nw { background-position: -112px 0; }
100
+ .ui-icon-carat-2-n-s { background-position: -128px 0; }
101
+ .ui-icon-carat-2-e-w { background-position: -144px 0; }
102
+ .ui-icon-triangle-1-n { background-position: 0 -16px; }
103
+ .ui-icon-triangle-1-ne { background-position: -16px -16px; }
104
+ .ui-icon-triangle-1-e { background-position: -32px -16px; }
105
+ .ui-icon-triangle-1-se { background-position: -48px -16px; }
106
+ .ui-icon-triangle-1-s { background-position: -64px -16px; }
107
+ .ui-icon-triangle-1-sw { background-position: -80px -16px; }
108
+ .ui-icon-triangle-1-w { background-position: -96px -16px; }
109
+ .ui-icon-triangle-1-nw { background-position: -112px -16px; }
110
+ .ui-icon-triangle-2-n-s { background-position: -128px -16px; }
111
+ .ui-icon-triangle-2-e-w { background-position: -144px -16px; }
112
+ .ui-icon-arrow-1-n { background-position: 0 -32px; }
113
+ .ui-icon-arrow-1-ne { background-position: -16px -32px; }
114
+ .ui-icon-arrow-1-e { background-position: -32px -32px; }
115
+ .ui-icon-arrow-1-se { background-position: -48px -32px; }
116
+ .ui-icon-arrow-1-s { background-position: -64px -32px; }
117
+ .ui-icon-arrow-1-sw { background-position: -80px -32px; }
118
+ .ui-icon-arrow-1-w { background-position: -96px -32px; }
119
+ .ui-icon-arrow-1-nw { background-position: -112px -32px; }
120
+ .ui-icon-arrow-2-n-s { background-position: -128px -32px; }
121
+ .ui-icon-arrow-2-ne-sw { background-position: -144px -32px; }
122
+ .ui-icon-arrow-2-e-w { background-position: -160px -32px; }
123
+ .ui-icon-arrow-2-se-nw { background-position: -176px -32px; }
124
+ .ui-icon-arrowstop-1-n { background-position: -192px -32px; }
125
+ .ui-icon-arrowstop-1-e { background-position: -208px -32px; }
126
+ .ui-icon-arrowstop-1-s { background-position: -224px -32px; }
127
+ .ui-icon-arrowstop-1-w { background-position: -240px -32px; }
128
+ .ui-icon-arrowthick-1-n { background-position: 0 -48px; }
129
+ .ui-icon-arrowthick-1-ne { background-position: -16px -48px; }
130
+ .ui-icon-arrowthick-1-e { background-position: -32px -48px; }
131
+ .ui-icon-arrowthick-1-se { background-position: -48px -48px; }
132
+ .ui-icon-arrowthick-1-s { background-position: -64px -48px; }
133
+ .ui-icon-arrowthick-1-sw { background-position: -80px -48px; }
134
+ .ui-icon-arrowthick-1-w { background-position: -96px -48px; }
135
+ .ui-icon-arrowthick-1-nw { background-position: -112px -48px; }
136
+ .ui-icon-arrowthick-2-n-s { background-position: -128px -48px; }
137
+ .ui-icon-arrowthick-2-ne-sw { background-position: -144px -48px; }
138
+ .ui-icon-arrowthick-2-e-w { background-position: -160px -48px; }
139
+ .ui-icon-arrowthick-2-se-nw { background-position: -176px -48px; }
140
+ .ui-icon-arrowthickstop-1-n { background-position: -192px -48px; }
141
+ .ui-icon-arrowthickstop-1-e { background-position: -208px -48px; }
142
+ .ui-icon-arrowthickstop-1-s { background-position: -224px -48px; }
143
+ .ui-icon-arrowthickstop-1-w { background-position: -240px -48px; }
144
+ .ui-icon-arrowreturnthick-1-w { background-position: 0 -64px; }
145
+ .ui-icon-arrowreturnthick-1-n { background-position: -16px -64px; }
146
+ .ui-icon-arrowreturnthick-1-e { background-position: -32px -64px; }
147
+ .ui-icon-arrowreturnthick-1-s { background-position: -48px -64px; }
148
+ .ui-icon-arrowreturn-1-w { background-position: -64px -64px; }
149
+ .ui-icon-arrowreturn-1-n { background-position: -80px -64px; }
150
+ .ui-icon-arrowreturn-1-e { background-position: -96px -64px; }
151
+ .ui-icon-arrowreturn-1-s { background-position: -112px -64px; }
152
+ .ui-icon-arrowrefresh-1-w { background-position: -128px -64px; }
153
+ .ui-icon-arrowrefresh-1-n { background-position: -144px -64px; }
154
+ .ui-icon-arrowrefresh-1-e { background-position: -160px -64px; }
155
+ .ui-icon-arrowrefresh-1-s { background-position: -176px -64px; }
156
+ .ui-icon-arrow-4 { background-position: 0 -80px; }
157
+ .ui-icon-arrow-4-diag { background-position: -16px -80px; }
158
+ .ui-icon-extlink { background-position: -32px -80px; }
159
+ .ui-icon-newwin { background-position: -48px -80px; }
160
+ .ui-icon-refresh { background-position: -64px -80px; }
161
+ .ui-icon-shuffle { background-position: -80px -80px; }
162
+ .ui-icon-transfer-e-w { background-position: -96px -80px; }
163
+ .ui-icon-transferthick-e-w { background-position: -112px -80px; }
164
+ .ui-icon-folder-collapsed { background-position: 0 -96px; }
165
+ .ui-icon-folder-open { background-position: -16px -96px; }
166
+ .ui-icon-document { background-position: -32px -96px; }
167
+ .ui-icon-document-b { background-position: -48px -96px; }
168
+ .ui-icon-note { background-position: -64px -96px; }
169
+ .ui-icon-mail-closed { background-position: -80px -96px; }
170
+ .ui-icon-mail-open { background-position: -96px -96px; }
171
+ .ui-icon-suitcase { background-position: -112px -96px; }
172
+ .ui-icon-comment { background-position: -128px -96px; }
173
+ .ui-icon-person { background-position: -144px -96px; }
174
+ .ui-icon-print { background-position: -160px -96px; }
175
+ .ui-icon-trash { background-position: -176px -96px; }
176
+ .ui-icon-locked { background-position: -192px -96px; }
177
+ .ui-icon-unlocked { background-position: -208px -96px; }
178
+ .ui-icon-bookmark { background-position: -224px -96px; }
179
+ .ui-icon-tag { background-position: -240px -96px; }
180
+ .ui-icon-home { background-position: 0 -112px; }
181
+ .ui-icon-flag { background-position: -16px -112px; }
182
+ .ui-icon-calendar { background-position: -32px -112px; }
183
+ .ui-icon-cart { background-position: -48px -112px; }
184
+ .ui-icon-pencil { background-position: -64px -112px; }
185
+ .ui-icon-clock { background-position: -80px -112px; }
186
+ .ui-icon-disk { background-position: -96px -112px; }
187
+ .ui-icon-calculator { background-position: -112px -112px; }
188
+ .ui-icon-zoomin { background-position: -128px -112px; }
189
+ .ui-icon-zoomout { background-position: -144px -112px; }
190
+ .ui-icon-search { background-position: -160px -112px; }
191
+ .ui-icon-wrench { background-position: -176px -112px; }
192
+ .ui-icon-gear { background-position: -192px -112px; }
193
+ .ui-icon-heart { background-position: -208px -112px; }
194
+ .ui-icon-star { background-position: -224px -112px; }
195
+ .ui-icon-link { background-position: -240px -112px; }
196
+ .ui-icon-cancel { background-position: 0 -128px; }
197
+ .ui-icon-plus { background-position: -16px -128px; }
198
+ .ui-icon-plusthick { background-position: -32px -128px; }
199
+ .ui-icon-minus { background-position: -48px -128px; }
200
+ .ui-icon-minusthick { background-position: -64px -128px; }
201
+ .ui-icon-close { background-position: -80px -128px; }
202
+ .ui-icon-closethick { background-position: -96px -128px; }
203
+ .ui-icon-key { background-position: -112px -128px; }
204
+ .ui-icon-lightbulb { background-position: -128px -128px; }
205
+ .ui-icon-scissors { background-position: -144px -128px; }
206
+ .ui-icon-clipboard { background-position: -160px -128px; }
207
+ .ui-icon-copy { background-position: -176px -128px; }
208
+ .ui-icon-contact { background-position: -192px -128px; }
209
+ .ui-icon-image { background-position: -208px -128px; }
210
+ .ui-icon-video { background-position: -224px -128px; }
211
+ .ui-icon-script { background-position: -240px -128px; }
212
+ .ui-icon-alert { background-position: 0 -144px; }
213
+ .ui-icon-info { background-position: -16px -144px; }
214
+ .ui-icon-notice { background-position: -32px -144px; }
215
+ .ui-icon-help { background-position: -48px -144px; }
216
+ .ui-icon-check { background-position: -64px -144px; }
217
+ .ui-icon-bullet { background-position: -80px -144px; }
218
+ .ui-icon-radio-off { background-position: -96px -144px; }
219
+ .ui-icon-radio-on { background-position: -112px -144px; }
220
+ .ui-icon-pin-w { background-position: -128px -144px; }
221
+ .ui-icon-pin-s { background-position: -144px -144px; }
222
+ .ui-icon-play { background-position: 0 -160px; }
223
+ .ui-icon-pause { background-position: -16px -160px; }
224
+ .ui-icon-seek-next { background-position: -32px -160px; }
225
+ .ui-icon-seek-prev { background-position: -48px -160px; }
226
+ .ui-icon-seek-end { background-position: -64px -160px; }
227
+ .ui-icon-seek-first { background-position: -80px -160px; }
228
+ .ui-icon-stop { background-position: -96px -160px; }
229
+ .ui-icon-eject { background-position: -112px -160px; }
230
+ .ui-icon-volume-off { background-position: -128px -160px; }
231
+ .ui-icon-volume-on { background-position: -144px -160px; }
232
+ .ui-icon-power { background-position: 0 -176px; }
233
+ .ui-icon-signal-diag { background-position: -16px -176px; }
234
+ .ui-icon-signal { background-position: -32px -176px; }
235
+ .ui-icon-battery-0 { background-position: -48px -176px; }
236
+ .ui-icon-battery-1 { background-position: -64px -176px; }
237
+ .ui-icon-battery-2 { background-position: -80px -176px; }
238
+ .ui-icon-battery-3 { background-position: -96px -176px; }
239
+ .ui-icon-circle-plus { background-position: 0 -192px; }
240
+ .ui-icon-circle-minus { background-position: -16px -192px; }
241
+ .ui-icon-circle-close { background-position: -32px -192px; }
242
+ .ui-icon-circle-triangle-e { background-position: -48px -192px; }
243
+ .ui-icon-circle-triangle-s { background-position: -64px -192px; }
244
+ .ui-icon-circle-triangle-w { background-position: -80px -192px; }
245
+ .ui-icon-circle-triangle-n { background-position: -96px -192px; }
246
+ .ui-icon-circle-arrow-e { background-position: -112px -192px; }
247
+ .ui-icon-circle-arrow-s { background-position: -128px -192px; }
248
+ .ui-icon-circle-arrow-w { background-position: -144px -192px; }
249
+ .ui-icon-circle-arrow-n { background-position: -160px -192px; }
250
+ .ui-icon-circle-zoomin { background-position: -176px -192px; }
251
+ .ui-icon-circle-zoomout { background-position: -192px -192px; }
252
+ .ui-icon-circle-check { background-position: -208px -192px; }
253
+ .ui-icon-circlesmall-plus { background-position: 0 -208px; }
254
+ .ui-icon-circlesmall-minus { background-position: -16px -208px; }
255
+ .ui-icon-circlesmall-close { background-position: -32px -208px; }
256
+ .ui-icon-squaresmall-plus { background-position: -48px -208px; }
257
+ .ui-icon-squaresmall-minus { background-position: -64px -208px; }
258
+ .ui-icon-squaresmall-close { background-position: -80px -208px; }
259
+ .ui-icon-grip-dotted-vertical { background-position: 0 -224px; }
260
+ .ui-icon-grip-dotted-horizontal { background-position: -16px -224px; }
261
+ .ui-icon-grip-solid-vertical { background-position: -32px -224px; }
262
+ .ui-icon-grip-solid-horizontal { background-position: -48px -224px; }
263
+ .ui-icon-gripsmall-diagonal-se { background-position: -64px -224px; }
264
+ .ui-icon-grip-diagonal-se { background-position: -80px -224px; }
265
+
266
+
267
+ /* Misc visuals
268
+ ----------------------------------*/
269
+
270
+ /* Corner radius */
271
+ .ui-corner-tl { -moz-border-radius-topleft: 5px; -webkit-border-top-left-radius: 5px; }
272
+ .ui-corner-tr { -moz-border-radius-topright: 5px; -webkit-border-top-right-radius: 5px; }
273
+ .ui-corner-bl { -moz-border-radius-bottomleft: 5px; -webkit-border-bottom-left-radius: 5px; }
274
+ .ui-corner-br { -moz-border-radius-bottomright: 5px; -webkit-border-bottom-right-radius: 5px; }
275
+ .ui-corner-top { -moz-border-radius-topleft: 5px; -webkit-border-top-left-radius: 5px; -moz-border-radius-topright: 5px; -webkit-border-top-right-radius: 5px; }
276
+ .ui-corner-bottom { -moz-border-radius-bottomleft: 5px; -webkit-border-bottom-left-radius: 5px; -moz-border-radius-bottomright: 5px; -webkit-border-bottom-right-radius: 5px; }
277
+ .ui-corner-right { -moz-border-radius-topright: 5px; -webkit-border-top-right-radius: 5px; -moz-border-radius-bottomright: 5px; -webkit-border-bottom-right-radius: 5px; }
278
+ .ui-corner-left { -moz-border-radius-topleft: 5px; -webkit-border-top-left-radius: 5px; -moz-border-radius-bottomleft: 5px; -webkit-border-bottom-left-radius: 5px; }
279
+ .ui-corner-all { -moz-border-radius: 5px; -webkit-border-radius: 5px; }
280
+
281
+ /* Overlays */
282
+ .ui-widget-overlay { background: #aaaaaa url(images/ui-bg_flat_0_aaaaaa_40x100.png) 50% 50% repeat-x; opacity: .30;filter:Alpha(Opacity=30); }
283
+ .ui-widget-shadow { margin: -8px 0 0 -8px; padding: 8px; background: #aaaaaa url(images/ui-bg_flat_0_aaaaaa_40x100.png) 50% 50% repeat-x; opacity: .30;filter:Alpha(Opacity=30); -moz-border-radius: 8px; -webkit-border-radius: 8px; }/* Accordion
284
+ ----------------------------------*/
285
+ .ui-accordion .ui-accordion-header { cursor: pointer; position: relative; margin-top: 1px; zoom: 1; }
286
+ .ui-accordion .ui-accordion-li-fix { display: inline; }
287
+ .ui-accordion .ui-accordion-header-active { border-bottom: 0 !important; }
288
+ .ui-accordion .ui-accordion-header a { display: block; font-size: 1em; padding: .5em .5em .5em 2.2em; }
289
+ .ui-accordion .ui-accordion-header .ui-icon { position: absolute; left: .5em; top: 50%; margin-top: -8px; }
290
+ .ui-accordion .ui-accordion-content { padding: 1em 2.2em; border-top: 0; margin-top: -2px; position: relative; top: 1px; margin-bottom: 2px; overflow: auto; display: none; }
291
+ .ui-accordion .ui-accordion-content-active { display: block; }/* Datepicker
292
+ ----------------------------------*/
293
+ .ui-datepicker { width: 17em; padding: .2em .2em 0; }
294
+ .ui-datepicker .ui-datepicker-header { position:relative; padding:.2em 0; }
295
+ .ui-datepicker .ui-datepicker-prev, .ui-datepicker .ui-datepicker-next { position:absolute; top: 2px; width: 1.8em; height: 1.8em; }
296
+ .ui-datepicker .ui-datepicker-prev-hover, .ui-datepicker .ui-datepicker-next-hover { top: 1px; }
297
+ .ui-datepicker .ui-datepicker-prev { left:2px; }
298
+ .ui-datepicker .ui-datepicker-next { right:2px; }
299
+ .ui-datepicker .ui-datepicker-prev-hover { left:1px; }
300
+ .ui-datepicker .ui-datepicker-next-hover { right:1px; }
301
+ .ui-datepicker .ui-datepicker-prev span, .ui-datepicker .ui-datepicker-next span { display: block; position: absolute; left: 50%; margin-left: -8px; top: 50%; margin-top: -8px; }
302
+ .ui-datepicker .ui-datepicker-title { margin: 0 2.3em; line-height: 1.8em; text-align: center; }
303
+ .ui-datepicker .ui-datepicker-title select { float:left; font-size:1em; margin:1px 0; }
304
+ .ui-datepicker select.ui-datepicker-month-year {width: 100%;}
305
+ .ui-datepicker select.ui-datepicker-month,
306
+ .ui-datepicker select.ui-datepicker-year { width: 49%;}
307
+ .ui-datepicker .ui-datepicker-title select.ui-datepicker-year { float: right; }
308
+ .ui-datepicker table {width: 100%; font-size: .9em; border-collapse: collapse; margin:0 0 .4em; }
309
+ .ui-datepicker th { padding: .7em .3em; text-align: center; font-weight: bold; border: 0; }
310
+ .ui-datepicker td { border: 0; padding: 1px; }
311
+ .ui-datepicker td span, .ui-datepicker td a { display: block; padding: .2em; text-align: right; text-decoration: none; }
312
+ .ui-datepicker .ui-datepicker-buttonpane { background-image: none; margin: .7em 0 0 0; padding:0 .2em; border-left: 0; border-right: 0; border-bottom: 0; }
313
+ .ui-datepicker .ui-datepicker-buttonpane button { float: right; margin: .5em .2em .4em; cursor: pointer; padding: .2em .6em .3em .6em; width:auto; overflow:visible; }
314
+ .ui-datepicker .ui-datepicker-buttonpane button.ui-datepicker-current { float:left; }
315
+
316
+ /* with multiple calendars */
317
+ .ui-datepicker.ui-datepicker-multi { width:auto; }
318
+ .ui-datepicker-multi .ui-datepicker-group { float:left; }
319
+ .ui-datepicker-multi .ui-datepicker-group table { width:95%; margin:0 auto .4em; }
320
+ .ui-datepicker-multi-2 .ui-datepicker-group { width:50%; }
321
+ .ui-datepicker-multi-3 .ui-datepicker-group { width:33.3%; }
322
+ .ui-datepicker-multi-4 .ui-datepicker-group { width:25%; }
323
+ .ui-datepicker-multi .ui-datepicker-group-last .ui-datepicker-header { border-left-width:0; }
324
+ .ui-datepicker-multi .ui-datepicker-group-middle .ui-datepicker-header { border-left-width:0; }
325
+ .ui-datepicker-multi .ui-datepicker-buttonpane { clear:left; }
326
+ .ui-datepicker-row-break { clear:both; width:100%; }
327
+
328
+ /* RTL support */
329
+ .ui-datepicker-rtl { direction: rtl; }
330
+ .ui-datepicker-rtl .ui-datepicker-prev { right: 2px; left: auto; }
331
+ .ui-datepicker-rtl .ui-datepicker-next { left: 2px; right: auto; }
332
+ .ui-datepicker-rtl .ui-datepicker-prev:hover { right: 1px; left: auto; }
333
+ .ui-datepicker-rtl .ui-datepicker-next:hover { left: 1px; right: auto; }
334
+ .ui-datepicker-rtl .ui-datepicker-buttonpane { clear:right; }
335
+ .ui-datepicker-rtl .ui-datepicker-buttonpane button { float: left; }
336
+ .ui-datepicker-rtl .ui-datepicker-buttonpane button.ui-datepicker-current { float:right; }
337
+ .ui-datepicker-rtl .ui-datepicker-group { float:right; }
338
+ .ui-datepicker-rtl .ui-datepicker-group-last .ui-datepicker-header { border-right-width:0; border-left-width:1px; }
339
+ .ui-datepicker-rtl .ui-datepicker-group-middle .ui-datepicker-header { border-right-width:0; border-left-width:1px; }
340
+
341
+ /* IE6 IFRAME FIX (taken from datepicker 1.5.3 */
342
+ .ui-datepicker-cover {
343
+ display: none; /*sorry for IE5*/
344
+ display/**/: block; /*sorry for IE5*/
345
+ position: absolute; /*must have*/
346
+ z-index: -1; /*must have*/
347
+ filter: mask(); /*must have*/
348
+ top: -4px; /*must have*/
349
+ left: -4px; /*must have*/
350
+ width: 200px; /*must have*/
351
+ height: 200px; /*must have*/
352
+ }/* Dialog
353
+ ----------------------------------*/
354
+ .ui-dialog { position: relative; padding: .2em; width: 300px; }
355
+ .ui-dialog .ui-dialog-titlebar { padding: .5em .3em .3em 1em; position: relative; }
356
+ .ui-dialog .ui-dialog-title { float: left; margin: .1em 0 .2em; }
357
+ .ui-dialog .ui-dialog-titlebar-close { position: absolute; right: .3em; top: 50%; width: 19px; margin: -10px 0 0 0; padding: 1px; height: 18px; }
358
+ .ui-dialog .ui-dialog-titlebar-close span { display: block; margin: 1px; }
359
+ .ui-dialog .ui-dialog-titlebar-close:hover, .ui-dialog .ui-dialog-titlebar-close:focus { padding: 0; }
360
+ .ui-dialog .ui-dialog-content { border: 0; padding: .5em 1em; background: none; overflow: auto; zoom: 1; }
361
+ .ui-dialog .ui-dialog-buttonpane { text-align: left; border-width: 1px 0 0 0; background-image: none; margin: .5em 0 0 0; padding: .3em 1em .5em .4em; }
362
+ .ui-dialog .ui-dialog-buttonpane button { float: right; margin: .5em .4em .5em 0; cursor: pointer; padding: .2em .6em .3em .6em; line-height: 1.4em; width:auto; overflow:visible; }
363
+ .ui-dialog .ui-resizable-se { width: 14px; height: 14px; right: 3px; bottom: 3px; }
364
+ .ui-draggable .ui-dialog-titlebar { cursor: move; }
365
+ /* Progressbar
366
+ ----------------------------------*/
367
+ .ui-progressbar { height:2em; text-align: left; }
368
+ .ui-progressbar .ui-progressbar-value {margin: -1px; height:100%; }/* Resizable
369
+ ----------------------------------*/
370
+ .ui-resizable { position: relative;}
371
+ .ui-resizable-handle { position: absolute;font-size: 0.1px;z-index: 99999; display: block;}
372
+ .ui-resizable-disabled .ui-resizable-handle, .ui-resizable-autohide .ui-resizable-handle { display: none; }
373
+ .ui-resizable-n { cursor: n-resize; height: 7px; width: 100%; top: -5px; left: 0px; }
374
+ .ui-resizable-s { cursor: s-resize; height: 7px; width: 100%; bottom: -5px; left: 0px; }
375
+ .ui-resizable-e { cursor: e-resize; width: 7px; right: -5px; top: 0px; height: 100%; }
376
+ .ui-resizable-w { cursor: w-resize; width: 7px; left: -5px; top: 0px; height: 100%; }
377
+ .ui-resizable-se { cursor: se-resize; width: 12px; height: 12px; right: 1px; bottom: 1px; }
378
+ .ui-resizable-sw { cursor: sw-resize; width: 9px; height: 9px; left: -5px; bottom: -5px; }
379
+ .ui-resizable-nw { cursor: nw-resize; width: 9px; height: 9px; left: -5px; top: -5px; }
380
+ .ui-resizable-ne { cursor: ne-resize; width: 9px; height: 9px; right: -5px; top: -5px;}/* Slider
381
+ ----------------------------------*/
382
+ .ui-slider { position: relative; text-align: left; }
383
+ .ui-slider .ui-slider-handle { position: absolute; z-index: 2; width: 1.2em; height: 1.2em; cursor: default; }
384
+ .ui-slider .ui-slider-range { position: absolute; z-index: 1; font-size: .7em; display: block; border: 0; }
385
+
386
+ .ui-slider-horizontal { height: .8em; }
387
+ .ui-slider-horizontal .ui-slider-handle { top: -.3em; margin-left: -.6em; }
388
+ .ui-slider-horizontal .ui-slider-range { top: 0; height: 100%; }
389
+ .ui-slider-horizontal .ui-slider-range-min { left: 0; }
390
+ .ui-slider-horizontal .ui-slider-range-max { right: 0; }
391
+
392
+ .ui-slider-vertical { width: .8em; height: 100px; }
393
+ .ui-slider-vertical .ui-slider-handle { left: -.3em; margin-left: 0; margin-bottom: -.6em; }
394
+ .ui-slider-vertical .ui-slider-range { left: 0; width: 100%; }
395
+ .ui-slider-vertical .ui-slider-range-min { bottom: 0; }
396
+ .ui-slider-vertical .ui-slider-range-max { top: 0; }/* Tabs
397
+ ----------------------------------*/
398
+ .ui-tabs { padding: .2em; zoom: 1; }
399
+ .ui-tabs .ui-tabs-nav { list-style: none; position: relative; padding: .2em .2em 0; }
400
+ .ui-tabs .ui-tabs-nav li { position: relative; float: left; border-bottom-width: 0 !important; margin: 0 .2em -1px 0; padding: 0; }
401
+ .ui-tabs .ui-tabs-nav li a { float: left; text-decoration: none; padding: .5em 1em; }
402
+ .ui-tabs .ui-tabs-nav li.ui-tabs-selected { padding-bottom: 1px; border-bottom-width: 0; }
403
+ .ui-tabs .ui-tabs-nav li.ui-tabs-selected a, .ui-tabs .ui-tabs-nav li.ui-state-disabled a, .ui-tabs .ui-tabs-nav li.ui-state-processing a { cursor: text; }
404
+ .ui-tabs .ui-tabs-nav li a, .ui-tabs.ui-tabs-collapsible .ui-tabs-nav li.ui-tabs-selected a { cursor: pointer; } /* first selector in group seems obsolete, but required to overcome bug in Opera applying cursor: text overall if defined elsewhere... */
405
+ .ui-tabs .ui-tabs-panel { padding: 1em 1.4em; display: block; border-width: 0; background: none; }
406
+ .ui-tabs .ui-tabs-hide { display: none !important; }
jquery-ui/ui.progressbar.js CHANGED
@@ -1,13 +1,13 @@
1
- /*
2
- * jQuery UI Progressbar 1.7.2
3
- *
4
- * Copyright (c) 2009 AUTHORS.txt (http://jqueryui.com/about)
5
- * Dual licensed under the MIT (MIT-LICENSE.txt)
6
- * and GPL (GPL-LICENSE.txt) licenses.
7
- *
8
- * http://docs.jquery.com/UI/Progressbar
9
- *
10
- * Depends:
11
- * ui.core.js
12
- */
13
  (function(a){a.widget("ui.progressbar",{_init:function(){this.element.addClass("ui-progressbar ui-widget ui-widget-content ui-corner-all").attr({role:"progressbar","aria-valuemin":this._valueMin(),"aria-valuemax":this._valueMax(),"aria-valuenow":this._value()});this.valueDiv=a('<div class="ui-progressbar-value ui-widget-header ui-corner-left"></div>').appendTo(this.element);this._refreshValue()},destroy:function(){this.element.removeClass("ui-progressbar ui-widget ui-widget-content ui-corner-all").removeAttr("role").removeAttr("aria-valuemin").removeAttr("aria-valuemax").removeAttr("aria-valuenow").removeData("progressbar").unbind(".progressbar");this.valueDiv.remove();a.widget.prototype.destroy.apply(this,arguments)},value:function(b){if(b===undefined){return this._value()}this._setData("value",b);return this},_setData:function(b,c){switch(b){case"value":this.options.value=c;this._refreshValue();this._trigger("change",null,{});break}a.widget.prototype._setData.apply(this,arguments)},_value:function(){var b=this.options.value;if(b<this._valueMin()){b=this._valueMin()}if(b>this._valueMax()){b=this._valueMax()}return b},_valueMin:function(){var b=0;return b},_valueMax:function(){var b=100;return b},_refreshValue:function(){var b=this.value();this.valueDiv[b==this._valueMax()?"addClass":"removeClass"]("ui-corner-right");this.valueDiv.width(b+"%");this.element.attr("aria-valuenow",b)}});a.extend(a.ui.progressbar,{version:"1.7.2",defaults:{value:0}})})(jQuery);;
1
+ /*
2
+ * jQuery UI Progressbar 1.7.2
3
+ *
4
+ * Copyright (c) 2009 AUTHORS.txt (http://jqueryui.com/about)
5
+ * Dual licensed under the MIT (MIT-LICENSE.txt)
6
+ * and GPL (GPL-LICENSE.txt) licenses.
7
+ *
8
+ * http://docs.jquery.com/UI/Progressbar
9
+ *
10
+ * Depends:
11
+ * ui.core.js
12
+ */
13
  (function(a){a.widget("ui.progressbar",{_init:function(){this.element.addClass("ui-progressbar ui-widget ui-widget-content ui-corner-all").attr({role:"progressbar","aria-valuemin":this._valueMin(),"aria-valuemax":this._valueMax(),"aria-valuenow":this._value()});this.valueDiv=a('<div class="ui-progressbar-value ui-widget-header ui-corner-left"></div>').appendTo(this.element);this._refreshValue()},destroy:function(){this.element.removeClass("ui-progressbar ui-widget ui-widget-content ui-corner-all").removeAttr("role").removeAttr("aria-valuemin").removeAttr("aria-valuemax").removeAttr("aria-valuenow").removeData("progressbar").unbind(".progressbar");this.valueDiv.remove();a.widget.prototype.destroy.apply(this,arguments)},value:function(b){if(b===undefined){return this._value()}this._setData("value",b);return this},_setData:function(b,c){switch(b){case"value":this.options.value=c;this._refreshValue();this._trigger("change",null,{});break}a.widget.prototype._setData.apply(this,arguments)},_value:function(){var b=this.options.value;if(b<this._valueMin()){b=this._valueMin()}if(b>this._valueMax()){b=this._valueMax()}return b},_valueMin:function(){var b=0;return b},_valueMax:function(){var b=100;return b},_refreshValue:function(){var b=this.value();this.valueDiv[b==this._valueMax()?"addClass":"removeClass"]("ui-corner-right");this.valueDiv.width(b+"%");this.element.attr("aria-valuenow",b)}});a.extend(a.ui.progressbar,{version:"1.7.2",defaults:{value:0}})})(jQuery);;
languages/apt-en_US.mo ADDED
Binary file
languages/apt-en_US.po ADDED
@@ -0,0 +1,165 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ msgid ""
2
+ msgstr ""
3
+ "Project-Id-Version: Auto Post Thumbnail\n"
4
+ "Report-Msgid-Bugs-To: \n"
5
+ "POT-Creation-Date: 2019-06-05 19:26+0000\n"
6
+ "PO-Revision-Date: 2019-06-05 19:33+0000\n"
7
+ "Last-Translator: admin <sasha.tesh@gmail.com>\n"
8
+ "Language-Team: English (United States)\n"
9
+ "Language: en_US\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-Generator: Loco https://localise.biz/\n"
15
+ "X-Loco-Version: 2.2.0; wp-4.9.8"
16
+
17
+ #: auto-post-thumbnail.php:201
18
+ msgid "This plugin has been automatically deactivated."
19
+ msgstr ""
20
+
21
+ #: views/tab-main.php:18
22
+ msgid ""
23
+ "Currently there are no published posts available to generate thumbnails."
24
+ msgstr ""
25
+
26
+ #: views/tab-main.php:20
27
+ msgid "We are generating post thumbnails. Please be patient!"
28
+ msgstr ""
29
+
30
+ #: views/tab-main.php:32 views/tab-main.php:92
31
+ msgid "You must enable Javascript in order to proceed!"
32
+ msgstr ""
33
+
34
+ #: views/tab-main.php:64
35
+ #, php-format
36
+ msgid "All done! Processed %d posts."
37
+ msgstr ""
38
+
39
+ #: views/tab-main.php:79
40
+ msgid ""
41
+ "Use this tool to generate Post Thumbnail (Featured Thumbnail) for your "
42
+ "Published posts."
43
+ msgstr ""
44
+
45
+ #: views/tab-main.php:81
46
+ msgid ""
47
+ "If the script stops executing for any reason, just <strong>Reload</strong> "
48
+ "the page and it will continue from where it stopped."
49
+ msgstr ""
50
+
51
+ #: views/tab-main.php:88 views/index.php:13
52
+ msgid "Generate Thumbnails"
53
+ msgstr ""
54
+
55
+ #: views/tab-main.php:97
56
+ msgid ""
57
+ "Note: Thumbnails won't be generated for posts that already have post "
58
+ "thumbnail or <strong><em>skip_post_thumb</em></strong> custom field set."
59
+ msgstr ""
60
+
61
+ #. Name of the plugin
62
+ #: views/tab-about.php:81
63
+ msgid "Auto Post Thumbnail"
64
+ msgstr ""
65
+
66
+ #: views/tab-about.php:83
67
+ msgid ""
68
+ "We didn’t please you with updated lately. However, great news today! We are "
69
+ "about to tell you about all the spectacular changes that are planned for our "
70
+ "plugin!"
71
+ msgstr ""
72
+
73
+ #: views/tab-about.php:85
74
+ msgid ""
75
+ "First of all, we proudly announce that a new group of developers, <span "
76
+ "style=\"text-decoration: underline;\"><strong>Creative Motion</strong></span>"
77
+ ", are helping us with plugin improvement."
78
+ msgstr ""
79
+
80
+ #: views/tab-about.php:87
81
+ msgid ""
82
+ "Auto Post Thumbnails has perfectly fit in our close family of popular "
83
+ "plugins with more than 600,000 users worldwide."
84
+ msgstr ""
85
+
86
+ #: views/tab-about.php:89
87
+ msgid "What you can expect soon:"
88
+ msgstr ""
89
+
90
+ #: views/tab-about.php:100
91
+ msgid ""
92
+ "As you’ve already noticed, we haven’t updated the plugin for more than 2 "
93
+ "years. This new version fixes existing problems. APT becomes a fully "
94
+ "functional plugin."
95
+ msgstr ""
96
+
97
+ #: views/tab-about.php:103
98
+ msgid ""
99
+ "In the next release, you can automatically generate featured images from any "
100
+ "image in the post, not only the first one. Besides, we offer you an advanced "
101
+ "tool – choose an image for the featured image right from the Posts tab. You "
102
+ "no longer need to edit each post to install or change the featured image. "
103
+ "Feel free to do it right from the list of posts. It saves much time and "
104
+ "efforts. ​"
105
+ msgstr ""
106
+
107
+ #: views/tab-about.php:108
108
+ msgid ""
109
+ "Starting from this version, the APT plugin evolves from being an aiding tool "
110
+ "to the full-featured search & image editing system with a Creative Commons "
111
+ "license for your website. <strong>It means that you get:</strong>"
112
+ msgstr ""
113
+
114
+ #: views/tab-about.php:111
115
+ msgid ""
116
+ "Image search through the 5 popular stock services from the plugin interface. "
117
+ "Just enter a search query and choose an image(images) you like."
118
+ msgstr ""
119
+
120
+ #: views/tab-about.php:112
121
+ msgid ""
122
+ "Advanced APT editor. You can edit images using layers. It means that you can "
123
+ "overlay text, logo, or mask, adjust color, brightness, and contract and use "
124
+ "other great features. Save presets and apply them on any image in one click. "
125
+ "The editor doesn’t replace the default WordPress editor."
126
+ msgstr ""
127
+
128
+ #: views/tab-about.php:118
129
+ msgid ""
130
+ "Upload images from the external URL to your post or product (for Woocommerce)"
131
+ "."
132
+ msgstr ""
133
+
134
+ #: views/tab-about.php:119
135
+ msgid "Compatibility with the most popular builders."
136
+ msgstr ""
137
+
138
+ #: views/index.php:6
139
+ msgid "Generate Post Thumbnails"
140
+ msgstr ""
141
+
142
+ #: views/index.php:17
143
+ msgid "About"
144
+ msgstr ""
145
+
146
+ #. Description of the plugin
147
+ msgid ""
148
+ "Automatically generate the Post Thumbnail (Featured Thumbnail) from the "
149
+ "first image in post (or any custom post type) only if Post Thumbnail is not "
150
+ "set manually."
151
+ msgstr ""
152
+
153
+ #. URI of the plugin
154
+ msgid ""
155
+ "http://www.sanisoft.com/blog/2010/04/19/wordpress-plugin-automatic-post-"
156
+ "thumbnail/"
157
+ msgstr ""
158
+
159
+ #. Author of the plugin
160
+ msgid "Webcraftic <wordpress.webraftic@gmail.com>"
161
+ msgstr ""
162
+
163
+ #. Author URI of the plugin
164
+ msgid "webcraftic.com"
165
+ msgstr ""
languages/apt-ru_RU.mo ADDED
Binary file
languages/apt-ru_RU.po ADDED
@@ -0,0 +1,249 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ msgid ""
2
+ msgstr ""
3
+ "Project-Id-Version: Auto Post Thumbnail\n"
4
+ "Report-Msgid-Bugs-To: \n"
5
+ "POT-Creation-Date: 2019-06-05 19:26+0000\n"
6
+ "PO-Revision-Date: 2019-06-19 13:13+0300\n"
7
+ "Last-Translator: admin <sasha.tesh@gmail.com>\n"
8
+ "Language-Team: Русский\n"
9
+ "Language: ru_RU\n"
10
+ "Plural-Forms: nplurals=3; plural=(n%10==1 && n%100!=11 ? 0 : n%10 >= 2 && n"
11
+ "%10<=4 &&(n%100<10||n%100 >= 20)? 1 : 2);\n"
12
+ "MIME-Version: 1.0\n"
13
+ "Content-Type: text/plain; charset=UTF-8\n"
14
+ "Content-Transfer-Encoding: 8bit\n"
15
+ "X-Generator: Poedit 1.8.7\n"
16
+ "X-Loco-Version: 2.2.0; wp-4.9.8\n"
17
+
18
+ #: auto-post-thumbnail.php:201
19
+ msgid "This plugin has been automatically deactivated."
20
+ msgstr "Этот плагин был автоматически деактивирован."
21
+
22
+ #: views/tab-main.php:18
23
+ msgid ""
24
+ "Currently there are no published posts available to generate thumbnails."
25
+ msgstr ""
26
+ "На данный момент у вас нет опубликованных записей для генерации изображений."
27
+
28
+ #: views/tab-main.php:20
29
+ msgid "We are generating post thumbnails. Please be patient!"
30
+ msgstr "Начилась генерация изображений. Пожалуйста, подождите!"
31
+
32
+ #: views/tab-main.php:32 views/tab-main.php:92
33
+ msgid "You must enable Javascript in order to proceed!"
34
+ msgstr "Вам нужно включить JavaScript чтобы продолжить!"
35
+
36
+ #: views/tab-main.php:64
37
+ #, php-format
38
+ msgid "All done! Processed posts: %d"
39
+ msgstr "Завершено! Обработано записей: %d"
40
+
41
+ #: views/tab-main.php:79
42
+ msgid ""
43
+ "Use this tool to generate Post Thumbnail (Featured Thumbnail) for your "
44
+ "Published posts."
45
+ msgstr ""
46
+ "Используйте этот инструмент для автоматической генерации изображений для "
47
+ "опубликованных записей."
48
+
49
+ #: views/tab-main.php:81
50
+ msgid ""
51
+ "If the script stops executing for any reason, just <strong>Reload</strong> "
52
+ "the page and it will continue from where it stopped."
53
+ msgstr ""
54
+ "Если скрипт перестанет работать по какой-то причине, вы можете "
55
+ "<strong>перезагрузить</strong> эту страницу и он продолжит свою работу с "
56
+ "места где остановился."
57
+
58
+ #: views/tab-main.php:88 views/index.php:13
59
+ msgid "Generate Thumbnails"
60
+ msgstr "Генерировать изображения"
61
+
62
+ #: views/tab-main.php:97
63
+ msgid ""
64
+ "Note: Thumbnails won't be generated for posts that already have post "
65
+ "thumbnail or <strong><em>skip_post_thumb</em></strong> custom meta field."
66
+ msgstr ""
67
+ "Обратите внимание: Изображения не будут сгенерированы для записей у которых "
68
+ "уже есть изображение или имеют заполненное мета поле "
69
+ "<strong><em>skip_post_thumb</em></strong>."
70
+
71
+ #. Name of the plugin
72
+ #: views/tab-about.php:81
73
+ msgid "Auto Post Thumbnail"
74
+ msgstr "Auto Post Thumbnail"
75
+
76
+ #: views/tab-about.php:83
77
+ msgid ""
78
+ "We didn’t please you with updated lately. However, great news today! We are "
79
+ "about to tell you about all the spectacular changes that are planned for our "
80
+ "plugin!"
81
+ msgstr ""
82
+ "Мы давно не радовал Вас обновлениями, но сегодня у нас отличные новости ! Мы "
83
+ "расскажем Вам о потрясающих изменениях, которые ждут наш плагин!"
84
+
85
+ #: views/tab-about.php:85
86
+ msgid ""
87
+ "First of all, we proudly announce that a new group of developers, <span "
88
+ "style=\"text-decoration: underline;\"><strong>Creative Motion</strong></"
89
+ "span>, are helping us with plugin improvement."
90
+ msgstr ""
91
+ "Прежде всего, хотим сообщить, что теперь над улучшением плагина работает "
92
+ "новая команда разработчиков <span style=\"text-decoration: underline;"
93
+ "\"><strong>Creatve Motion</strong></span>."
94
+
95
+ #: views/tab-about.php:87
96
+ msgid ""
97
+ "Auto Post Thumbnails has perfectly fit in our close family of popular "
98
+ "plugins with more than 600,000 users worldwide."
99
+ msgstr ""
100
+ "Auto Post Thumbnails влился в нашу дружную семью плагинов, которыми "
101
+ "пользуется более 600 тыс пользователей по всему миру."
102
+
103
+ #: views/tab-about.php:89
104
+ msgid "What you can expect soon:"
105
+ msgstr "Что нового появится в ближайших релизах:"
106
+
107
+ #: views/tab-about.php:100
108
+ msgid ""
109
+ "As you’ve already noticed, we haven’t updated the plugin for more than 2 "
110
+ "years. This new version fixes existing problems. APT becomes a fully "
111
+ "functional plugin."
112
+ msgstr ""
113
+ "Как вы могли заметить, плагин не обновлялся более 2 лет. В версии, которую "
114
+ "вы только что установили, мы исправили существующие проблемы, теперь APT "
115
+ "полностью работоспособен."
116
+
117
+ #: views/tab-about.php:103
118
+ msgid ""
119
+ "In the next release, you can automatically generate featured images from any "
120
+ "image in the post, not only the first one. Besides, we offer you an advanced "
121
+ "tool – choose an image for the featured image right from the Posts tab. You "
122
+ "no longer need to edit each post to install or change the featured image. "
123
+ "Feel free to do it right from the list of posts. It saves much time and "
124
+ "efforts. ​"
125
+ msgstr ""
126
+ "В следующем релизе плагина мы осуществили возможность автоматически "
127
+ "генерировать изображение записи для ваших записей не только из первой "
128
+ "картинке записи, но и из любой картинки записи. Кроме того, вам будет "
129
+ "доступен продвинутый инструмент - выбор картинки для feature image прямо во "
130
+ "вкладке “записи”. Больше не нужно редактировать каждую запись по "
131
+ "отдельности, чтобы установить или изменить feature image, это можно сделать "
132
+ "прямо в списке записей. Это значительно сэкономит ваше время и усилия."
133
+
134
+ #: views/tab-about.php:108
135
+ msgid ""
136
+ "Starting from this version, the APT plugin evolves from being an aiding tool "
137
+ "to the full-featured search & image editing system with a Creative Commons "
138
+ "license for your website. <strong>It means that you get:</strong>"
139
+ msgstr ""
140
+ "Начиная с этой версии, плагин APT превращается из помощника в полноценную "
141
+ "систему поиска и редактирования изображений с лицензией Creative Commons для "
142
+ "вашего сайта. <strong>Что это означает</strong>:"
143
+
144
+ #: views/tab-about.php:111
145
+ msgid ""
146
+ "Image search through the 5 popular stock services from the plugin interface. "
147
+ "Just enter a search query and choose an image(images) you like."
148
+ msgstr ""
149
+ "Появится возможность поиска изображений из пяти популярных стоковых сервисов "
150
+ "прямо в интерфейсе плагина. Просто введите поисковый запрос и выберите "
151
+ "подходящее изображение или несколько изображений."
152
+
153
+ #: views/tab-about.php:112
154
+ msgid ""
155
+ "Advanced APT editor. You can edit images using layers. It means that you can "
156
+ "overlay text, logo, or mask, adjust color, brightness, and contract and use "
157
+ "other great features. Save presets and apply them on any image in one click. "
158
+ "The editor doesn’t replace the default WordPress editor."
159
+ msgstr ""
160
+ "Продвинутый редактор APT даст возможность редактировать изображения, "
161
+ "используя слои. Это означает, что вы сможете наложить текст, логотип, маску "
162
+ "на изображение, откорректировать яркости и контраст, сделать цветокоррекцию "
163
+ "и еще много возможностей. Сохраняйте пресеты и применяйте их к любым "
164
+ "картинками одним кликом. Редактор не заменяет стандартный редактор WordPress."
165
+
166
+ #: views/tab-about.php:118
167
+ msgid ""
168
+ "Upload images from the external URL to your post or product (for "
169
+ "Woocommerce)."
170
+ msgstr ""
171
+ "Возможность установки в качестве изображения в статью или товар (для "
172
+ "Woocommerce) картинки из внешнего URL."
173
+
174
+ #: views/tab-about.php:119
175
+ msgid "Compatibility with the most popular builders."
176
+ msgstr "Совместимость с самыми популярными билдерами."
177
+
178
+ #: views/index.php:6
179
+ msgid "Generate Post Thumbnails"
180
+ msgstr "Генерация изображений для записей"
181
+
182
+ #: views/index.php:17
183
+ msgid "About"
184
+ msgstr "О нас"
185
+
186
+ #. Description of the plugin
187
+ msgid ""
188
+ "Automatically generate the Post Thumbnail (Featured Thumbnail) from the "
189
+ "first image in post (or any custom post type) only if Post Thumbnail is not "
190
+ "set manually."
191
+ msgstr ""
192
+ "Автоматически генерировать изображения для записи из ее первой картинки (или "
193
+ "кастомных типов записей) только если изображение не установлено вручную."
194
+
195
+ #. URI of the plugin
196
+ msgid ""
197
+ "http://www.sanisoft.com/blog/2010/04/19/wordpress-plugin-automatic-post-"
198
+ "thumbnail/"
199
+ msgstr ""
200
+ "http://www.sanisoft.com/blog/2010/04/19/wordpress-plugin-automatic-post-"
201
+ "thumbnail/"
202
+
203
+ #. Author of the plugin
204
+ msgid "Webcraftic <wordpress.webraftic@gmail.com>"
205
+ msgstr "Webcraftic <wordpress.webraftic@gmail.com>"
206
+
207
+ #. Author URI of the plugin
208
+ msgid "webcraftic.com"
209
+ msgstr "webcraftic.com"
210
+
211
+ #. text
212
+ msgid "Settings"
213
+ msgstr "Настройки"
214
+
215
+ #. text
216
+ msgid "Custom generation"
217
+ msgstr "Выборочная генерация"
218
+
219
+ #. text
220
+ msgid "Title"
221
+ msgstr "Заголовок"
222
+
223
+ #. text
224
+ msgid "Author"
225
+ msgstr "Автор"
226
+
227
+ #. text
228
+ msgid "Date"
229
+ msgstr "Дата"
230
+
231
+ #. text
232
+ msgid "Enable automatic post thumbnail generation"
233
+ msgstr "Включить автоматическую генерацию миниатюры поста"
234
+
235
+ #. text
236
+ msgid "Delete settings when removing the plugin"
237
+ msgstr "Удалять настройки при удалении плагина"
238
+
239
+ #. text
240
+ msgid "Save settings"
241
+ msgstr "Сохранить настройки"
242
+
243
+ #. text
244
+ msgid "Generate Thumbnail"
245
+ msgstr "Генерировать изображение"
246
+
247
+ #. text
248
+ msgid "All done! Success processed posts: %d"
249
+ msgstr "Завершено! Успешно обработано записей: %d"
languages/apt.pot ADDED
@@ -0,0 +1,166 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ #, fuzzy
2
+ msgid ""
3
+ msgstr ""
4
+ "Project-Id-Version: Auto Post Thumbnail\n"
5
+ "Report-Msgid-Bugs-To: \n"
6
+ "POT-Creation-Date: 2019-06-05 19:26+0000\n"
7
+ "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
8
+ "Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
9
+ "Language-Team: \n"
10
+ "Language: \n"
11
+ "Plural-Forms: nplurals=INTEGER; plural=EXPRESSION;\n"
12
+ "MIME-Version: 1.0\n"
13
+ "Content-Type: text/plain; charset=UTF-8\n"
14
+ "Content-Transfer-Encoding: 8bit\n"
15
+ "X-Generator: Loco https://localise.biz/\n"
16
+ "X-Loco-Version: 2.2.0; wp-4.9.8"
17
+
18
+ #: auto-post-thumbnail.php:201
19
+ msgid "This plugin has been automatically deactivated."
20
+ msgstr ""
21
+
22
+ #: views/tab-main.php:18
23
+ msgid ""
24
+ "Currently there are no published posts available to generate thumbnails."
25
+ msgstr ""
26
+
27
+ #: views/tab-main.php:20
28
+ msgid "We are generating post thumbnails. Please be patient!"
29
+ msgstr ""
30
+
31
+ #: views/tab-main.php:32 views/tab-main.php:92
32
+ msgid "You must enable Javascript in order to proceed!"
33
+ msgstr ""
34
+
35
+ #: views/tab-main.php:64
36
+ #, php-format
37
+ msgid "All done! Processed %d posts."
38
+ msgstr ""
39
+
40
+ #: views/tab-main.php:79
41
+ msgid ""
42
+ "Use this tool to generate Post Thumbnail (Featured Thumbnail) for your "
43
+ "Published posts."
44
+ msgstr ""
45
+
46
+ #: views/tab-main.php:81
47
+ msgid ""
48
+ "If the script stops executing for any reason, just <strong>Reload</strong> "
49
+ "the page and it will continue from where it stopped."
50
+ msgstr ""
51
+
52
+ #: views/tab-main.php:88 views/index.php:13
53
+ msgid "Generate Thumbnails"
54
+ msgstr ""
55
+
56
+ #: views/tab-main.php:97
57
+ msgid ""
58
+ "Note: Thumbnails won't be generated for posts that already have post "
59
+ "thumbnail or <strong><em>skip_post_thumb</em></strong> custom field set."
60
+ msgstr ""
61
+
62
+ #. Name of the plugin
63
+ #: views/tab-about.php:81
64
+ msgid "Auto Post Thumbnail"
65
+ msgstr ""
66
+
67
+ #: views/tab-about.php:83
68
+ msgid ""
69
+ "We didn’t please you with updated lately. However, great news today! We are "
70
+ "about to tell you about all the spectacular changes that are planned for our "
71
+ "plugin!"
72
+ msgstr ""
73
+
74
+ #: views/tab-about.php:85
75
+ msgid ""
76
+ "First of all, we proudly announce that a new group of developers, <span "
77
+ "style=\"text-decoration: underline;\"><strong>Creative Motion</strong></span>"
78
+ ", are helping us with plugin improvement."
79
+ msgstr ""
80
+
81
+ #: views/tab-about.php:87
82
+ msgid ""
83
+ "Auto Post Thumbnails has perfectly fit in our close family of popular "
84
+ "plugins with more than 600,000 users worldwide."
85
+ msgstr ""
86
+
87
+ #: views/tab-about.php:89
88
+ msgid "What you can expect soon:"
89
+ msgstr ""
90
+
91
+ #: views/tab-about.php:100
92
+ msgid ""
93
+ "As you’ve already noticed, we haven’t updated the plugin for more than 2 "
94
+ "years. This new version fixes existing problems. APT becomes a fully "
95
+ "functional plugin."
96
+ msgstr ""
97
+
98
+ #: views/tab-about.php:103
99
+ msgid ""
100
+ "In the next release, you can automatically generate featured images from any "
101
+ "image in the post, not only the first one. Besides, we offer you an advanced "
102
+ "tool – choose an image for the featured image right from the Posts tab. You "
103
+ "no longer need to edit each post to install or change the featured image. "
104
+ "Feel free to do it right from the list of posts. It saves much time and "
105
+ "efforts. ​"
106
+ msgstr ""
107
+
108
+ #: views/tab-about.php:108
109
+ msgid ""
110
+ "Starting from this version, the APT plugin evolves from being an aiding tool "
111
+ "to the full-featured search & image editing system with a Creative Commons "
112
+ "license for your website. <strong>It means that you get:</strong>"
113
+ msgstr ""
114
+
115
+ #: views/tab-about.php:111
116
+ msgid ""
117
+ "Image search through the 5 popular stock services from the plugin interface. "
118
+ "Just enter a search query and choose an image(images) you like."
119
+ msgstr ""
120
+
121
+ #: views/tab-about.php:112
122
+ msgid ""
123
+ "Advanced APT editor. You can edit images using layers. It means that you can "
124
+ "overlay text, logo, or mask, adjust color, brightness, and contract and use "
125
+ "other great features. Save presets and apply them on any image in one click. "
126
+ "The editor doesn’t replace the default WordPress editor."
127
+ msgstr ""
128
+
129
+ #: views/tab-about.php:118
130
+ msgid ""
131
+ "Upload images from the external URL to your post or product (for Woocommerce)"
132
+ "."
133
+ msgstr ""
134
+
135
+ #: views/tab-about.php:119
136
+ msgid "Compatibility with the most popular builders."
137
+ msgstr ""
138
+
139
+ #: views/index.php:6
140
+ msgid "Generate Post Thumbnails"
141
+ msgstr ""
142
+
143
+ #: views/index.php:17
144
+ msgid "About"
145
+ msgstr ""
146
+
147
+ #. Description of the plugin
148
+ msgid ""
149
+ "Automatically generate the Post Thumbnail (Featured Thumbnail) from the "
150
+ "first image in post (or any custom post type) only if Post Thumbnail is not "
151
+ "set manually."
152
+ msgstr ""
153
+
154
+ #. URI of the plugin
155
+ msgid ""
156
+ "http://www.sanisoft.com/blog/2010/04/19/wordpress-plugin-automatic-post-"
157
+ "thumbnail/"
158
+ msgstr ""
159
+
160
+ #. Author of the plugin
161
+ msgid "Webcraftic <wordpress.webraftic@gmail.com>"
162
+ msgstr ""
163
+
164
+ #. Author URI of the plugin
165
+ msgid "webcraftic.com"
166
+ msgstr ""
readme.txt CHANGED
@@ -1,77 +1,95 @@
1
- === Auto Post Thumbnail ===
2
- Contributors: tariquesani
3
- Tags: Post, thumbnail, automatic, posts, featured image, image, featured, images, admin
4
- Requires at least: 3.6.1
5
- Tested up to: 4.6.x
6
- Stable tag: 3.4.1
7
-
8
- Automatically generate the Post Thumbnail (Featured Thumbnail) from the first image in post or any custom post type only if Post Thumbnail is not set manually.
9
-
10
- == Description ==
11
-
12
- Go PRO! A premium version of the plugin has been launched with many more features - [See for details](http://codecanyon.net/item/auto-post-thumbnail-pro/4322624?ref=sanisoft)
13
-
14
- Auto post thumbnail is a plugin to generate post thumbnail from first image in post or any custom post type. If the first image doesn't work it will automatically search for the next one and so on until the post thumbnail is inserted.
15
-
16
- If the post thumbnail is already present, the plugin will do nothing.
17
- If you don't want a post thumbnail for some post with images, just add a custom field *skip_post_thumb* to the post and the plugin will restrain itself from generating post thumbnail.
18
- The plugin also provides a Batch Processing capability to generate post thumbnails for already published posts. A new menu item **Gen. Post Thumbnails** will get added under Tools menu after this plugin is installed.
19
-
20
- For more details, see http://www.sanisoft.com/blog/2010/04/19/wordpress-plugin-automatic-post-thumbnail/
21
-
22
- == Installation ==
23
-
24
- 1. Upload directory 'auto-post-thumbnail' to the '/wp-content/plugins/' directory
25
- 2. Activate the plugin through the 'Plugins' menu in WordPress
26
- 3. Sorry, no more steps :)
27
-
28
- == Changelog ==
29
-
30
- = 3.4.1 =
31
- * Fix for unchecked extension of uploaded files
32
-
33
- = 3.4.0 =
34
- * Tested with the latest wordpress release.
35
-
36
- = 3.3.3 =
37
- * Fix for SQL error begin caused due to no ID
38
-
39
- = 3.3.2 =
40
- * Tested with WordPress-3.6.x
41
- * Small tweaks
42
-
43
- = 3.3.1 =
44
- * Tested with WordPress-3.5.1
45
-
46
- = 3.3.0 =
47
- * Added fix for featured images behaving differently in Wordpress version 3.4. NOTE: This version will fix only images in future posts. For fixing images of past posts see http://www.clickthrough-marketing.com/how-to-fix-auto-post-thumbnail-on-wordpress-3.4-seo-friendly-800610805/
48
-
49
- = 3.2.3 =
50
- * Added fix for jquery progress bar error causing due to Wordpress version 3.1
51
-
52
- = 3.2.2 =
53
- * Added back publish_post action so that regular posts work without any issues.
54
- * Added code to check whether the image exists in database before trying to fetch it.
55
-
56
- = 3.2.1 =
57
- * Added code to correctly link the featured/post thumbnail with the post so that the Media Library shows the association correctly.
58
- * Assigning **title** to the generated featured/post thumbnail by extracting it from the title of processed image.
59
-
60
- = 3.2 =
61
- Added support for creating featured thumbnails for custom post types as well. Batch processing will also generate thumbnails for any type of post.
62
-
63
- = 3.1 =
64
- Renamed **Gen. Post Thumbnails** to **Auto Post Thumbnail** and moved it under Settings menu.
65
-
66
- = 3.0 =
67
- * Added Batch Processing capability to generate post thumbnails for already published posts.
68
- * A new menu item **Gen. Post Thumbnails** is added under Tools menu.
69
-
70
- = 2.0 =
71
- Added functionality to generate Post Thumbnail for scheduled posts. Thumbnail will be generated when scheduled post gets published.
72
-
73
- = 1.1 =
74
- Added a wrapper function using cURL for file_get_contents in case 'allow_url_fopen' ini setting is off.
75
-
76
- = 1.0 =
77
- First release
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ === Auto Post Thumbnail ===
2
+ Contributors: creativemotion
3
+ Tags: Post, thumbnail, automatic, posts, featured image, image, featured, images, admin
4
+ Requires at least: 4.2
5
+ Tested up to: 5.2.2
6
+ Stable tag: 3.4.2
7
+
8
+ Automatically generate the Post Thumbnail (Featured Thumbnail) from the first image in post or any custom post type only if Post Thumbnail is not set manually.
9
+
10
+ == Description ==
11
+
12
+ Auto Post Thumbnails didn’t please you with updated lately. However, great news today! We are about to tell you about all the spectacular changes that are planned for our plugin!
13
+
14
+ First of all, we proudly announce that a new group of developers, Creative Motion, are helping us with plugin improvement.
15
+ Auto Post Thumbnails has perfectly fit in our close family of popular plugins with more than 600,000 users worldwide.
16
+ What you can expect soon:
17
+
18
+ 3.4.2
19
+ As you’ve already noticed, we haven’t updated the plugin for more than 2 years. This new version fixes existing problems. APT becomes a fully functional plugin.
20
+
21
+ https://www.youtube.com/watch?v=CJ2SaOx0OTk
22
+
23
+ 3.5.0
24
+ In the next release, you can automatically generate featured images from any image in the post, not only the first one.
25
+ Besides, we offer you an advanced tool – choose an image for the featured image right from the Posts tab. You no longer need to edit each post to install or change the featured image. Feel free to do it right from the list of posts. It saves much time and efforts.
26
+
27
+ 3.5.1
28
+ Starting from this version, the APT plugin evolves from being an aiding tool to the full-featured search & image editing system with a Creative Commons license for your website.
29
+ It means that you get:
30
+ Image search through the 5 popular stock services from the plugin interface. Just enter a search query and choose an image(images) you like.
31
+ Advanced APT editor. You can edit images using layers. It means that you can overlay text, logo, or mask, adjust color, brightness, and contract and use other great features. Save presets and apply them on any image in one click.
32
+ The editor doesn’t replace the default WordPress editor.
33
+
34
+ 3.5.2
35
+ Upload images from the external URL to your post or product (for Woocommerce).
36
+ Compatibility with the most popular builders.
37
+
38
+
39
+
40
+ == Installation ==
41
+
42
+ 1. Upload directory 'auto-post-thumbnail' to the '/wp-content/plugins/' directory
43
+ 2. Activate the plugin through the 'Plugins' menu in WordPress
44
+ 3. Sorry, no more steps :)
45
+
46
+ == Changelog ==
47
+
48
+ = 3.4.1 =
49
+ * Fix for unchecked extension of uploaded files
50
+
51
+ = 3.4.0 =
52
+ * Tested with the latest wordpress release.
53
+
54
+ = 3.3.3 =
55
+ * Fix for SQL error begin caused due to no ID
56
+
57
+ = 3.3.2 =
58
+ * Tested with WordPress-3.6.x
59
+ * Small tweaks
60
+
61
+ = 3.3.1 =
62
+ * Tested with WordPress-3.5.1
63
+
64
+ = 3.3.0 =
65
+ * Added fix for featured images behaving differently in Wordpress version 3.4. NOTE: This version will fix only images in future posts. For fixing images of past posts see http://www.clickthrough-marketing.com/how-to-fix-auto-post-thumbnail-on-wordpress-3.4-seo-friendly-800610805/
66
+
67
+ = 3.2.3 =
68
+ * Added fix for jquery progress bar error causing due to Wordpress version 3.1
69
+
70
+ = 3.2.2 =
71
+ * Added back publish_post action so that regular posts work without any issues.
72
+ * Added code to check whether the image exists in database before trying to fetch it.
73
+
74
+ = 3.2.1 =
75
+ * Added code to correctly link the featured/post thumbnail with the post so that the Media Library shows the association correctly.
76
+ * Assigning **title** to the generated featured/post thumbnail by extracting it from the title of processed image.
77
+
78
+ = 3.2 =
79
+ Added support for creating featured thumbnails for custom post types as well. Batch processing will also generate thumbnails for any type of post.
80
+
81
+ = 3.1 =
82
+ Renamed **Gen. Post Thumbnails** to **Auto Post Thumbnail** and moved it under Settings menu.
83
+
84
+ = 3.0 =
85
+ * Added Batch Processing capability to generate post thumbnails for already published posts.
86
+ * A new menu item **Gen. Post Thumbnails** is added under Tools menu.
87
+
88
+ = 2.0 =
89
+ Added functionality to generate Post Thumbnail for scheduled posts. Thumbnail will be generated when scheduled post gets published.
90
+
91
+ = 1.1 =
92
+ Added a wrapper function using cURL for file_get_contents in case 'allow_url_fopen' ini setting is off.
93
+
94
+ = 1.0 =
95
+ First release
src/class.list.table.php ADDED
@@ -0,0 +1,296 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * Class for displaying a list of posts without thumbnails
4
+ *
5
+ * In the table list are listed the posts without thumbnails. User can check specific posts and set the thumbnail for this
6
+ *
7
+ * @author Alexander Vitkalov <nechin.va@gmail.com>
8
+ */
9
+
10
+ // Load the base class
11
+ if ( ! class_exists( 'WP_List_Table' ) ) {
12
+ require_once( ABSPATH . 'wp-admin/includes/class-wp-list-table.php' );
13
+ }
14
+
15
+ class APT_List_Table extends WP_List_Table {
16
+
17
+ /**
18
+ * APT_List_Table constructor.
19
+ */
20
+ function __construct() {
21
+ //Set parent defaults
22
+ parent::__construct(
23
+ array(
24
+ 'singular' => 'post', //singular name of the listed records
25
+ 'plural' => 'posts', //plural name of the listed records
26
+ 'ajax' => false, //does this table support ajax?
27
+ )
28
+ );
29
+ }
30
+
31
+ /**
32
+ * This method is called when the parent class can't find a method
33
+ * specifically build for a given column.
34
+ *
35
+ * @param array $item A singular item (one full row's worth of data)
36
+ * @param string $column_name The name/slug of the column to be processed
37
+ *
38
+ * @return string Text or HTML to be placed inside the column <td>
39
+ */
40
+ function column_default( $item, $column_name ) {
41
+ switch ( $column_name ) {
42
+ case 'title':
43
+ case 'author':
44
+ case 'date':
45
+ return $item[ $column_name ];
46
+ default:
47
+ return trim( $item[ $column_name ] ); //Show the whole array for troubleshooting purposes
48
+ }
49
+ }
50
+
51
+ /**
52
+ * @see WP_List_Table::::single_row_columns()
53
+ *
54
+ * @param array $item A singular item (one full row's worth of data)
55
+ *
56
+ * @return string Text to be placed inside the column <td> (movie title only)
57
+ */
58
+ function column_title( $item ) {
59
+
60
+ //Build row actions
61
+ $actions = array(
62
+ 'edit' => sprintf( '<a href="%s">Edit</a>', get_edit_post_link( $item['ID'] ) ),
63
+ //'delete' => sprintf( '<a href="?page=%s&action=%s&movie=%s">Delete</a>', $_REQUEST['page'], 'delete', $item['ID'] ),
64
+ );
65
+
66
+ //Return the title contents
67
+ return sprintf(
68
+ '%1$s %2$s',
69
+ /*$1%s*/
70
+ $item['title'],
71
+ /*$2%s*/
72
+ $this->row_actions( $actions )
73
+ );
74
+ }
75
+
76
+ /**
77
+ * @see WP_List_Table::::single_row_columns()
78
+ *
79
+ * @param array $item A singular item (one full row's worth of data)
80
+ *
81
+ * @return string Text to be placed inside the column <td> (movie title only)
82
+ */
83
+ function column_cb( $item ) {
84
+ return sprintf(
85
+ '<input type="checkbox" name="%1$s[]" value="%2$s" />',
86
+ /*$1%s*/
87
+ $this->_args['singular'], //Let's simply repurpose the table's singular label ("movie")
88
+ /*$2%s*/
89
+ $item['ID'] //The value of the checkbox should be the record's id
90
+ );
91
+ }
92
+
93
+ /**
94
+ * This method dictates the table's columns and titles.
95
+ *
96
+ * @see WP_List_Table::::single_row_columns()
97
+ * @return array An associative array containing column information: 'slugs'=>'Visible Titles'
98
+ */
99
+ function get_columns() {
100
+ $columns = array(
101
+ 'cb' => '<input type="checkbox" />', //Render a checkbox instead of text
102
+ 'title' => __( 'Title', 'apt' ),
103
+ 'author' => __( 'Author', 'apt' ),
104
+ 'date' => __( 'Date', 'apt' ),
105
+ );
106
+
107
+ return $columns;
108
+ }
109
+
110
+ /**
111
+ * This method merely defines which columns should be sortable and makes them clickable
112
+ *
113
+ * @return array An associative array containing all the columns that should be sortable: 'slugs'=>array('data_values',bool)
114
+ */
115
+ function get_sortable_columns() {
116
+ $sortable_columns = array(
117
+ 'title' => array( 'title', false ), //true means it's already sorted
118
+ //'author' => array( 'author', false ),
119
+ 'date' => array( 'date', false ),
120
+ );
121
+
122
+ return $sortable_columns;
123
+ }
124
+
125
+ /**
126
+ * @return array An associative array containing all the bulk actions: 'slugs'=>'Visible Titles'
127
+ */
128
+ function get_bulk_actions() {
129
+ $actions = array(
130
+ 'generate' => __( 'Generate Thumbnail', 'apt' ),
131
+ );
132
+
133
+ return $actions;
134
+ }
135
+
136
+ /**
137
+ * Process bulk action
138
+ */
139
+ function process_bulk_action() {
140
+ // Detect when a bulk action is being triggered...
141
+ if ( 'generate' === $this->current_action() ) {
142
+ $this->generate_thumbnail();
143
+ }
144
+ }
145
+
146
+ /**
147
+ * Generate thumbnail
148
+ */
149
+ function generate_thumbnail() {
150
+ if ( ! empty( $_GET['post'] ) ) {
151
+ $ids = array();
152
+ foreach ( $_GET['post'] as $post_id ) {
153
+ $ids[] = $post_id;
154
+ }
155
+ $ids = implode( ',', $ids );
156
+
157
+ $count = count( $_GET['post'] );
158
+ ?>
159
+ <script type="text/javascript">
160
+ jQuery(document).ready(function($) {
161
+ $('.apt_loading').show();
162
+
163
+ var rt_images = [<?php echo $ids; ?>];
164
+ var generated = 0
165
+
166
+ function genPostThumb(id) {
167
+ $.post('admin-ajax.php', {
168
+ action: 'generatepostthumbnail',
169
+ id: id
170
+ }, function(data) {
171
+ if (data == true) {
172
+ generated++;
173
+ }
174
+
175
+ if (rt_images.length) {
176
+ genPostThumb(rt_images.shift());
177
+ } else {
178
+ document.location = '/wp-admin/options-general.php?page=generate-post-thumbnails&tab=custom&processed=' + generated;
179
+ }
180
+ });
181
+ }
182
+
183
+ genPostThumb(rt_images.shift());
184
+ });
185
+ </script>
186
+ <?php
187
+ }
188
+ }
189
+
190
+ /**
191
+ * Get our data
192
+ *
193
+ * @return array
194
+ */
195
+ function get_data() {
196
+ global $wpdb;
197
+
198
+ $data = array();
199
+
200
+ $query = auto_post_thumbnails()->get_posts_query();
201
+ $posts = $wpdb->get_results( $query );
202
+
203
+ if ( ! empty( $posts ) ) {
204
+ foreach ( $posts as $post ) {
205
+ $data[] = array(
206
+ 'ID' => $post->ID,
207
+ 'title' => $post->post_title,
208
+ 'author' => get_the_author_meta( 'display_name', $post->post_author ),
209
+ 'date' => $post->post_date,
210
+ );
211
+ }
212
+ }
213
+
214
+ return $data;
215
+ }
216
+
217
+ /**
218
+ * Prepare data for display.
219
+ */
220
+ function prepare_items() {
221
+ // First, lets decide how many records per page to show
222
+ $per_page = 10;
223
+
224
+ $columns = $this->get_columns();
225
+ $hidden = array();
226
+ $sortable = $this->get_sortable_columns();
227
+
228
+ $this->_column_headers = array( $columns, $hidden, $sortable );
229
+
230
+ $this->process_bulk_action();
231
+ // Get id's of all the published posts for which post thumbnails does not exist.
232
+ $data = $this->get_data();
233
+
234
+ // This checks for sorting input and sorts the data in our array accordingly.
235
+ function usort_reorder( $a, $b ) {
236
+ $orderby = ( ! empty( $_REQUEST['orderby'] ) ) ? $_REQUEST['orderby'] : 'title'; //If no sort, default to title
237
+ $order = ( ! empty( $_REQUEST['order'] ) ) ? $_REQUEST['order'] : 'asc'; //If no order, default to asc
238
+ $result = strcmp( $a[ $orderby ], $b[ $orderby ] ); //Determine sort order
239
+
240
+ return ( 'asc' === $order ) ? $result : - $result; //Send final sort direction to usort
241
+ }
242
+
243
+ usort( $data, 'usort_reorder' );
244
+
245
+ $current_page = $this->get_pagenum();
246
+
247
+ $total_items = count( $data );
248
+
249
+ $data = array_slice( $data, ( ( $current_page - 1 ) * $per_page ), $per_page );
250
+
251
+ $this->items = $data;
252
+
253
+ $this->set_pagination_args(
254
+ array(
255
+ 'total_items' => $total_items, //WE have to calculate the total number of items
256
+ 'per_page' => $per_page, //WE have to determine how many items to show on a page
257
+ 'total_pages' => ceil( $total_items / $per_page ), //WE have to calculate the total number of pages
258
+ )
259
+ );
260
+ }
261
+
262
+ }
263
+
264
+ /**
265
+ * Render page
266
+ */
267
+ function apt_render_list_page() {
268
+ // Create an instance of our package class...
269
+ $apt_list_table = new APT_List_Table();
270
+ // Fetch, prepare, sort, and filter our data...
271
+ $apt_list_table->prepare_items();
272
+ $is_message = isset( $_GET['processed'] ) ? true : false;
273
+ ?>
274
+
275
+ <div id="message" class="updated fade"<?php if ( ! $is_message ) { ?> style="display:none"<?php } ?>>
276
+ <?php echo $is_message ? '<p><strong>' . sprintf( esc_html__( 'All done! Success processed posts: %d', 'apt' ), $_GET['processed'] ) . '</strong></p>' : ''; ?>
277
+ </div>
278
+
279
+ <div class="wrap">
280
+
281
+ <div class="apt_loading">
282
+ <img class="apt-loading-image" src="<?php echo APT_PLUGIN_URL; ?>/img/ajax-loader.gif" alt="Loading..."/>
283
+ </div>
284
+
285
+ <form id="apt-posts-thumbnails" method="get">
286
+ <input type="hidden" name="page" value="<?php echo $_REQUEST['page']; ?>"/>
287
+ <input type="hidden" name="tab" value="custom"/>
288
+ <!-- Now we can render the completed list table -->
289
+ <?php $apt_list_table->display(); ?>
290
+ </form>
291
+
292
+ </div>
293
+ <?php
294
+ }
295
+
296
+ apt_render_list_page();
src/class.template.php ADDED
@@ -0,0 +1,39 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ /**
4
+ * Template related functionality.
5
+ *
6
+ * @author Alexander Teshabaev <sasha.tesh@gmail.com>
7
+ */
8
+ class APT_Template {
9
+ /**
10
+ * Render and return content of the template.
11
+ *
12
+ * @param string $name Name of the template to get content of. Could be absolute or relative path. When relative
13
+ * path used, it will be based on plugins /templates/ dir, absolute will be used as it is.
14
+ *
15
+ * @return mixed
16
+ */
17
+ public static function render ( $name ) {
18
+ ob_start();
19
+ if ( is_callable( $name ) ) {
20
+ echo call_user_func( $name );
21
+ } elseif ( strpos( $name, DIRECTORY_SEPARATOR ) !== false && ( is_file( $name ) || is_file( $name . '.php' ) ) ) {
22
+ if ( is_file( $name ) ) {
23
+ $path = $name;
24
+ } else {
25
+ $path = $name . '.php';
26
+ }
27
+ } else {
28
+ $path = APT_ABSPATH . "/views/{$name}.php";
29
+ }
30
+ if ( ! is_file( $path ) ) {
31
+ return '';
32
+ }
33
+ include $path;
34
+ $content = ob_get_contents();
35
+ ob_end_clean();
36
+
37
+ return $content;
38
+ }
39
+ }
uninstall.php ADDED
@@ -0,0 +1,16 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ // if uninstall.php is not called by WordPress, die
4
+ if ( ! defined( 'WP_UNINSTALL_PLUGIN' ) ) {
5
+ die;
6
+ }
7
+
8
+ $apt_ds = get_option( 'wbcr_apt_delete_settings' );
9
+ if ( ! $apt_ds ) {
10
+ return;
11
+ }
12
+
13
+ // remove plugin options
14
+ global $wpdb;
15
+
16
+ $wpdb->query( "DELETE FROM {$wpdb->options} WHERE option_name LIKE 'wbcr_apt_%';" );
views/index.php ADDED
@@ -0,0 +1,50 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ global $wpdb;
3
+ ?>
4
+ <div class="wrap">
5
+
6
+ <h1><?php esc_html_e( 'Generate Post Thumbnails', 'apt' ); ?></h1>
7
+
8
+ <div>
9
+ <?php
10
+ $tabs = [
11
+ 'main' => [
12
+ 'label' => esc_html__( 'Generate Thumbnails', 'apt' ),
13
+ 'link' => admin_url( 'options-general.php?page=generate-post-thumbnails&tab=main' ),
14
+ ],
15
+ 'custom' => [
16
+ 'label' => esc_html__( 'Custom generation', 'apt' ),
17
+ 'link' => admin_url( 'options-general.php?page=generate-post-thumbnails&tab=custom' ),
18
+ ],
19
+ 'settings' => [
20
+ 'label' => esc_html__( 'Settings', 'apt' ),
21
+ 'link' => admin_url( 'options-general.php?page=generate-post-thumbnails&tab=settings' ),
22
+ ],
23
+ 'about' => [
24
+ 'label' => esc_html__( 'About', 'apt' ),
25
+ 'link' => admin_url( 'options-general.php?page=generate-post-thumbnails&tab=about' ),
26
+ ],
27
+ ];
28
+
29
+ $active_tab = isset( $_GET['tab'] ) ? sanitize_text_field( $_GET['tab'] ) : 'main';
30
+
31
+ if ( ! isset( $tabs[ $active_tab ] ) ) {
32
+ $active_tab = 'main';
33
+ }
34
+ ?>
35
+
36
+ <h2 class="nav-tab-wrapper">
37
+ <?php foreach ( $tabs as $key => $tab ) : ?>
38
+ <a class="nav-tab <?php echo( $key === $active_tab ? 'nav-tab-active' : '' ); ?>"
39
+ href="<?php echo $tab['link']; ?>"><?php echo $tab['label']; ?></a>
40
+ <?php endforeach; ?>
41
+ </h2>
42
+
43
+ <div style="width: 100%;">
44
+ <?php
45
+ $content = APT_Template::render( 'tab-' . $active_tab );
46
+ echo $content;
47
+ ?>
48
+ </div>
49
+ </div>
50
+ </div>
views/tab-about.php ADDED
@@ -0,0 +1,124 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <style>
2
+
3
+ .apt-section-wrapper {
4
+ width: 100%;
5
+ margin-top: 10px;
6
+ }
7
+
8
+ .apt-section {
9
+ padding: 29px 29px 29px 29px;
10
+ }
11
+
12
+ .apt-section .container {
13
+ display: -webkit-box;
14
+ display: -webkit-flex;
15
+ display: -ms-flexbox;
16
+ display: flex;
17
+ margin-right: auto;
18
+ margin-left: auto;
19
+ position: relative;
20
+ max-width: 1140px;
21
+ min-height: 600px;
22
+ -webkit-box-align: center;
23
+ -webkit-align-items: center;
24
+ -ms-flex-align: center;
25
+ align-items: center;
26
+ }
27
+
28
+ .apt-section-intro {
29
+ background-image: url(http://cm-wp.com/wp-content/uploads/2019/05/fon.png);
30
+ background-position: bottom center;
31
+ background-size: cover;
32
+ box-shadow: 0px 0px 34px 0px rgba(107, 107, 107, 0.5);
33
+ transition: background 0.3s, border 0.3s, border-radius 0.3s, box-shadow 0.3s;
34
+ text-align: center;
35
+ }
36
+
37
+ .apt-section-intro .container h2 {
38
+ font-size: 61px;
39
+ font-weight: 500;
40
+ text-transform: uppercase;
41
+ line-height: 1.1em;
42
+ color: #fff;
43
+ text-align: center;
44
+ }
45
+
46
+ .apt-section-intro .container p {
47
+ margin-bottom: 1.6em;
48
+ color: #fffcfc;
49
+ font-family: "Arial", Sans-serif;
50
+ font-size: 22px;
51
+ line-height: 1.3em;
52
+ letter-spacing: 1.1px;
53
+ }
54
+
55
+ .apt-section-changelog h4 {
56
+ font-size: 1.3333333333333rem;
57
+ }
58
+
59
+ .apt-section-changelog p,
60
+ .apt-section-changelog ul > li {
61
+ font-size: 15px;
62
+ }
63
+
64
+ .apt-section-changelog ul {
65
+ list-style: inherit;
66
+ margin-left: 40px;
67
+ }
68
+
69
+ #wpfooter {
70
+ position: relative !important;
71
+ }
72
+
73
+
74
+ </style>
75
+
76
+ <div class="apt-section-wrapper">
77
+ <section class="apt-section apt-section-intro">
78
+ <div class="container">
79
+
80
+ <div>
81
+ <h2><?php esc_html_e( 'Auto Post Thumbnail', 'apt' ) ?></h2>
82
+
83
+ <p><?php esc_html_e( 'We didn’t please you with updated lately. However, great news today! We are about to tell you about all the spectacular changes that are planned for our plugin!', 'apt' ) ?></p>
84
+
85
+ <p><?php echo __( 'First of all, we proudly announce that a new group of developers, <span style="text-decoration: underline;"><strong>Creative Motion</strong></span>, are helping us with plugin improvement.', 'apt' ) ?></p>
86
+
87
+ <p><?php esc_html_e( 'Auto Post Thumbnails has perfectly fit in our close family of popular plugins with more than 600,000 users worldwide.', 'apt' ) ?></p>
88
+
89
+ <p><?php esc_html_e( 'What you can expect soon:', 'apt' ) ?></p>
90
+
91
+ </div>
92
+ </div>
93
+
94
+ </section>
95
+
96
+ <section class="apt-section apt-section-changelog">
97
+ <div class="container">
98
+ <div>
99
+ <h4>3.4.2</h4>
100
+ <p><?php esc_html_e( 'As you’ve already noticed, we haven’t updated the plugin for more than 2 years. This new version fixes existing problems. APT becomes a fully functional plugin.', 'apt' ) ?></p>
101
+
102
+ <h4>3.5.0</h4>
103
+ <p><?php esc_html_e( 'In the next release, you can automatically generate featured images from any image in the post, not only the first one. Besides, we offer you an advanced tool – choose an image for the featured image right from the Posts tab. You no longer need to edit each post to install or change the featured image. Feel free to do it right from the list of posts. It saves much time and efforts. ​', 'apt' ) ?>
104
+ ​</p>
105
+
106
+
107
+ <h4>3.5.0</h4>
108
+ <p><?php esc_html_e( 'Starting from this version, the APT plugin evolves from being an aiding tool to the full-featured search & image editing system with a Creative Commons license for your website. <strong>It means that you get:</strong>', 'apt' ) ?></p>
109
+
110
+ <ul>
111
+ <li><?php esc_html_e( 'Image search through the 5 popular stock services from the plugin interface. Just enter a search query and choose an image(images) you like.', 'apt' ) ?></li>
112
+ <li><?php esc_html_e( 'Advanced APT editor. You can edit images using layers. It means that you can overlay text, logo, or mask, adjust color, brightness, and contract and use other great features. Save presets and apply them on any image in one click. The editor doesn’t replace the default WordPress editor.', 'apt' ) ?></li>
113
+ </ul>
114
+
115
+
116
+ <h4>3.5.0</h4>
117
+ <ul>
118
+ <li><?php esc_html_e( 'Upload images from the external URL to your post or product (for Woocommerce).', 'apt' ) ?></li>
119
+ <li><?php esc_html_e( 'Compatibility with the most popular builders.', 'apt' ) ?></li>
120
+ </ul>
121
+ </div>
122
+ </div>
123
+ </section>
124
+ </div>
views/tab-custom.php ADDED
@@ -0,0 +1,7 @@
 
 
 
 
 
 
 
1
+ <?php
2
+ // Exit if accessed directly
3
+ if ( ! defined( 'ABSPATH' ) ) {
4
+ exit;
5
+ }
6
+
7
+ include_once APT_ABSPATH . '/src/class.list.table.php';
views/tab-main.php ADDED
@@ -0,0 +1,97 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <div id="message" class="updated fade" style="display:none"></div>
2
+
3
+ <div class="wrap genpostthumbs">
4
+ <?php
5
+ global $wpdb;
6
+ // If the button was clicked
7
+ if ( ! empty( $_POST['generate-post-thumbnails'] ) ):
8
+
9
+ // Form nonce check
10
+ check_admin_referer( 'generate-post-thumbnails' );
11
+
12
+ // Get id's of all the published posts for which post thumbnails does not exist.
13
+ $query = auto_post_thumbnails()->get_posts_query();
14
+ $posts = $wpdb->get_results( $query );
15
+
16
+ if ( empty( $posts ) ):
17
+ esc_html_e( 'Currently there are no published posts available to generate thumbnails.', 'apt' );
18
+ else:
19
+ esc_html_e( 'We are generating post thumbnails. Please be patient!', 'apt' );
20
+
21
+ // Generate the list of IDs
22
+ $ids = array();
23
+ foreach ( $posts as $post ) {
24
+ $ids[] = $post->ID;
25
+ }
26
+ $ids = implode( ',', $ids );
27
+
28
+ $count = count( $posts );
29
+ ?>
30
+ <noscript><p>
31
+ <em><?php esc_html_e( 'You must enable Javascript in order to proceed!', 'apt' ) ?></em>
32
+ </p></noscript>
33
+
34
+ <div id="genpostthumbsbar" style="position:relative;height:25px;">
35
+ <div id="genpostthumbsbar-percent"
36
+ style="position:absolute;left:50%;top:50%;width:50px;margin-left:-25px;height:25px;margin-top:-9px;font-weight:bold;text-align:center;"></div>
37
+ </div>
38
+
39
+ <script type="text/javascript">
40
+ // <![CDATA[
41
+ jQuery(document).ready(function ($) {
42
+ var rt_images = [<?php echo $ids; ?>];
43
+ var rt_total = rt_images.length;
44
+ var rt_count = 1;
45
+ var rt_percent = 0;
46
+
47
+ $("#genpostthumbsbar").progressbar();
48
+ $("#genpostthumbsbar-percent").html("0%");
49
+
50
+ function genPostThumb(id) {
51
+ $.post("admin-ajax.php", {
52
+ action: "generatepostthumbnail",
53
+ id: id
54
+ }, function () {
55
+ rt_percent = (rt_count / rt_total) * 100;
56
+ $("#genpostthumbsbar").progressbar("value", rt_percent);
57
+ $("#genpostthumbsbar-percent").html(Math.round(rt_percent) + "%");
58
+ rt_count = rt_count + 1;
59
+
60
+ if (rt_images.length) {
61
+ genPostThumb(rt_images.shift());
62
+ } else {
63
+ $("#message").html("<p><strong><?php echo sprintf( esc_html__( 'All done! Processed posts: %d', 'apt' ), $count ); ?></strong></p>");
64
+ $("#message").show();
65
+ }
66
+ });
67
+ }
68
+
69
+ genPostThumb(rt_images.shift());
70
+ });
71
+ // ]]>
72
+ </script>
73
+ <?php
74
+ endif;
75
+ else:
76
+ ?>
77
+ <p><?php esc_html_e( 'Use this tool to generate Post Thumbnail (Featured Thumbnail) for your Published posts.', 'apt' ) ?></p>
78
+
79
+ <p><?php _e( 'If the script stops executing for any reason, just <strong>Reload</strong> the page and it will continue from where it stopped.', 'apt' ) ?></p>
80
+
81
+ <form method="post" action="">
82
+ <?php wp_nonce_field( 'generate-post-thumbnails' ) ?>
83
+
84
+
85
+ <p><input type="submit" class="button hide-if-no-js" name="generate-post-thumbnails"
86
+ id="generate-post-thumbnails" value="<?php esc_attr_e( 'Generate Thumbnails', 'apt' ) ?>"/></p>
87
+
88
+ <noscript>
89
+ <p>
90
+ <em><?php esc_html_e( 'You must enable Javascript in order to proceed!', 'apt' ) ?></em>
91
+ </p>
92
+ </noscript>
93
+
94
+ </form>
95
+ <p><?php _e( 'Note: Thumbnails won\'t be generated for posts that already have post thumbnail or <strong><em>skip_post_thumb</em></strong> custom meta field.', 'apt' ) ?></p>
96
+ <?php endif; ?>
97
+ </div>
views/tab-settings.php ADDED
@@ -0,0 +1,45 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ global $wpdb;
3
+
4
+ // If the button was clicked
5
+ if ( ! empty( $_POST['_wpnonce'] ) ) {
6
+ // Form nonce check
7
+ check_admin_referer( 'generate-post-thumbnails' );
8
+
9
+ $apt_ag = isset( $_POST['apt-auto-generation'] ) && ! empty( $_POST['apt-auto-generation'] ) ? true : false;
10
+ update_option( 'wbcr_apt_auto_generation', $apt_ag );
11
+
12
+ $apt_ds = isset( $_POST['apt-delete-settings'] ) && ! empty( $_POST['apt-delete-settings'] ) ? true : false;
13
+ update_option( 'wbcr_apt_delete_settings', $apt_ds );
14
+ }
15
+
16
+ $apt_ag = get_option( 'wbcr_apt_auto_generation' );
17
+ $apt_ds = get_option( 'wbcr_apt_delete_settings' );
18
+ ?>
19
+ <div class="wrap">
20
+ <form method="post" action="">
21
+ <?php wp_nonce_field( 'generate-post-thumbnails' ); ?>
22
+
23
+ <p>
24
+ <label>
25
+ <input type="checkbox" name="apt-auto-generation" value="1"<?php checked( true, $apt_ag, true ); ?>>
26
+ <?php esc_html_e( 'Enable automatic post thumbnail generation', 'apt' ); ?>
27
+ </label>
28
+ </p>
29
+
30
+ <p>
31
+ <label>
32
+ <input type="checkbox" name="apt-delete-settings" value="1"<?php checked( true, $apt_ds, true ); ?>>
33
+ <?php esc_html_e( 'Delete settings when removing the plugin', 'apt' ); ?>
34
+ </label>
35
+ </p>
36
+
37
+ <p><input type="submit" class="button hide-if-no-js" value="<?php esc_attr_e( 'Save settings', 'apt' ); ?>"/></p>
38
+
39
+ <noscript>
40
+ <p>
41
+ <em><?php esc_html_e( 'You must enable Javascript in order to proceed!', 'apt' ); ?></em>
42
+ </p>
43
+ </noscript>
44
+ </form>
45
+ </div>