Version Description
- Improved: media dialogs show only images instead of all files
- Improved in Presets: only authors instead of all users are listed
- Fixed in Presets: empty user data
Download this release
Release Info
Developer | Hinjiriyo |
Plugin | Quick Featured Images |
Version | 11.8.1 |
Comparing to | |
See all releases |
Code changes from version 11.8 to 11.8.1
README.txt
CHANGED
@@ -4,7 +4,7 @@ Donate link: https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_i
|
|
4 |
Tags: add, arabic, assign, associate, attach, attachment, attachments, audio, audios, author, auto, automatic, batch, brazilian, bulk, categories, category, change, column, control, custom post type, custom post types, custom taxonomies, custom taxonomy, date, dates, default, define, delete, detach, exchange, featured, featured image, featured images, filter, gallery, galleries, image, image size, images, mass, media, mime, multimedia, nextgen, pages, parent page, period, português do brasil, portuguese, post type, post types, posts, quick, random, rapid, remove, replace, rules, search, set, standard, tag, taxonomies, taxonomy, thumb, thumbnail, thumbnails, thumbs, time, unset, update, user, video, videos, spanish, español, deutsch, german
|
5 |
Requires at least: 3.8
|
6 |
Tested up to: 4.5.3
|
7 |
-
Stable tag: 11.8
|
8 |
License: GPLv2 or later
|
9 |
License URI: http://www.gnu.org/licenses/gpl-2.0.html
|
10 |
|
@@ -277,6 +277,11 @@ If you want to contribute a translation of the plugin in your language it would
|
|
277 |
|
278 |
== Changelog ==
|
279 |
|
|
|
|
|
|
|
|
|
|
|
280 |
= 11.8 =
|
281 |
* Added brazilian portuguese translation
|
282 |
* Tested successfully with WordPress 4.5.2
|
@@ -566,6 +571,9 @@ Fixed an insufficient security check which prevented to set a featured image
|
|
566 |
|
567 |
== Upgrade Notice ==
|
568 |
|
|
|
|
|
|
|
569 |
= 11.8 =
|
570 |
Added brazilian portuguese translation, tested with WP 4.5.3
|
571 |
|
4 |
Tags: add, arabic, assign, associate, attach, attachment, attachments, audio, audios, author, auto, automatic, batch, brazilian, bulk, categories, category, change, column, control, custom post type, custom post types, custom taxonomies, custom taxonomy, date, dates, default, define, delete, detach, exchange, featured, featured image, featured images, filter, gallery, galleries, image, image size, images, mass, media, mime, multimedia, nextgen, pages, parent page, period, português do brasil, portuguese, post type, post types, posts, quick, random, rapid, remove, replace, rules, search, set, standard, tag, taxonomies, taxonomy, thumb, thumbnail, thumbnails, thumbs, time, unset, update, user, video, videos, spanish, español, deutsch, german
|
5 |
Requires at least: 3.8
|
6 |
Tested up to: 4.5.3
|
7 |
+
Stable tag: 11.8.1
|
8 |
License: GPLv2 or later
|
9 |
License URI: http://www.gnu.org/licenses/gpl-2.0.html
|
10 |
|
277 |
|
278 |
== Changelog ==
|
279 |
|
280 |
+
= 11.8.1 =
|
281 |
+
* Improved: media dialogs show only images instead of all files
|
282 |
+
* Improved in Presets: only authors instead of all users are listed
|
283 |
+
* Fixed in Presets: empty user data
|
284 |
+
|
285 |
= 11.8 =
|
286 |
* Added brazilian portuguese translation
|
287 |
* Tested successfully with WordPress 4.5.2
|
571 |
|
572 |
== Upgrade Notice ==
|
573 |
|
574 |
+
= 11.8.1 =
|
575 |
+
Improved media dialogs, revised users list in Presets
|
576 |
+
|
577 |
= 11.8 =
|
578 |
Added brazilian portuguese translation, tested with WP 4.5.3
|
579 |
|
admin/assets/js/admin-defaults.js
CHANGED
@@ -21,6 +21,9 @@ jQuery( document ).ready( function( $ ){
|
|
21 |
var selector_upload_text = '#upload_image_XX';
|
22 |
custom_uploader = wp.media.frames.file_frame = wp.media( {
|
23 |
title: $( selector_upload_text ).val(),
|
|
|
|
|
|
|
24 |
button: {
|
25 |
text: $( selector_upload_text ).val()
|
26 |
},
|
21 |
var selector_upload_text = '#upload_image_XX';
|
22 |
custom_uploader = wp.media.frames.file_frame = wp.media( {
|
23 |
title: $( selector_upload_text ).val(),
|
24 |
+
library: {
|
25 |
+
type: 'image'
|
26 |
+
},
|
27 |
button: {
|
28 |
text: $( selector_upload_text ).val()
|
29 |
},
|
admin/assets/js/admin.js
CHANGED
@@ -12,6 +12,9 @@ jQuery( document ).ready( function( $ ){
|
|
12 |
//Extend the wp.media object
|
13 |
custom_uploader = wp.media.frames.file_frame = wp.media( {
|
14 |
title: $( selector_single_image_button ).val(),
|
|
|
|
|
|
|
15 |
button: {
|
16 |
text: $( selector_single_image_button ).val()
|
17 |
},
|
@@ -46,6 +49,9 @@ jQuery( document ).ready( function( $ ){
|
|
46 |
|
47 |
custom_uploader = wp.media.frames.file_frame = wp.media( {
|
48 |
title: $( selector_multiple_images_button ).val() + ': ' + $( selector_advice ).val(),
|
|
|
|
|
|
|
49 |
button: {
|
50 |
text: $( selector_multiple_images_button ).val()
|
51 |
},
|
12 |
//Extend the wp.media object
|
13 |
custom_uploader = wp.media.frames.file_frame = wp.media( {
|
14 |
title: $( selector_single_image_button ).val(),
|
15 |
+
library: {
|
16 |
+
type: 'image'
|
17 |
+
},
|
18 |
button: {
|
19 |
text: $( selector_single_image_button ).val()
|
20 |
},
|
49 |
|
50 |
custom_uploader = wp.media.frames.file_frame = wp.media( {
|
51 |
title: $( selector_multiple_images_button ).val() + ': ' + $( selector_advice ).val(),
|
52 |
+
library: {
|
53 |
+
type: 'image'
|
54 |
+
},
|
55 |
button: {
|
56 |
text: $( selector_multiple_images_button ).val()
|
57 |
},
|
admin/class-quick-featured-images-admin.php
CHANGED
@@ -19,7 +19,7 @@
|
|
19 |
*
|
20 |
* @var string
|
21 |
*/
|
22 |
-
protected $plugin_version = '11.8';
|
23 |
|
24 |
/**
|
25 |
* Instance of this class.
|
19 |
*
|
20 |
* @var string
|
21 |
*/
|
22 |
+
protected $plugin_version = '11.8.1';
|
23 |
|
24 |
/**
|
25 |
* Instance of this class.
|
admin/class-quick-featured-images-defaults.php
CHANGED
@@ -411,12 +411,7 @@ class Quick_Featured_Images_Defaults {
|
|
411 |
*
|
412 |
* @access private
|
413 |
* @since 8.0
|
414 |
-
|
415 |
-
* @updated 8.2: added user (author) rule
|
416 |
-
* @updated 8.2.2: added overwrite rule
|
417 |
-
* @updated 8.2.2: added user to array of skipped taxonomies
|
418 |
-
* @updated 8.3: deleted check wp_attachment_is_image()
|
419 |
-
*/
|
420 |
public function add_featured_image( $post_id, $post, $is_update ) {
|
421 |
// get out if post is autosave type
|
422 |
if ( wp_is_post_autosave( $post_id ) ) return;
|
@@ -716,10 +711,6 @@ class Quick_Featured_Images_Defaults {
|
|
716 |
*
|
717 |
* @access private
|
718 |
* @since 5.0
|
719 |
-
* @updated 5.1.1: refactored
|
720 |
-
* @updated 7.0: improved performance by changing intval() to (int)
|
721 |
-
* @updated 8.3: deleted detection for site url, added detection for id in img's class attribute
|
722 |
-
* @updated 8.3: improved security by changing (int) to absint()
|
723 |
*
|
724 |
* @return integer the post id of the image
|
725 |
*/
|
411 |
*
|
412 |
* @access private
|
413 |
* @since 8.0
|
414 |
+
*/
|
|
|
|
|
|
|
|
|
|
|
415 |
public function add_featured_image( $post_id, $post, $is_update ) {
|
416 |
// get out if post is autosave type
|
417 |
if ( wp_is_post_autosave( $post_id ) ) return;
|
711 |
*
|
712 |
* @access private
|
713 |
* @since 5.0
|
|
|
|
|
|
|
|
|
714 |
*
|
715 |
* @return integer the post id of the image
|
716 |
*/
|
admin/views/section_defaults.php
CHANGED
@@ -66,8 +66,22 @@ $tags = get_tags( $args );
|
|
66 |
// get stored categories
|
67 |
$categories = get_categories( $args );
|
68 |
|
69 |
-
// get
|
70 |
-
$
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
71 |
|
72 |
// get stored post types
|
73 |
$post_types = $this->get_custom_post_types_labels();
|
@@ -164,7 +178,7 @@ print "\n";
|
|
164 |
printf( 'options[ \'%s\' ].push( \'<option value="">%s</option>\' );', $key, $first_option_label );
|
165 |
print "\n";
|
166 |
foreach ( $users as $user ) {
|
167 |
-
printf( 'options[ \'%s\' ].push( \'<option value="%d">%s</option>\' );', $key, absint( $user
|
168 |
print "\n";
|
169 |
}
|
170 |
?>
|
@@ -329,7 +343,7 @@ if ( isset( $this->selected_rules[ 'rules' ] ) ) {
|
|
329 |
<?php
|
330 |
foreach ( $users as $user ) {
|
331 |
?>
|
332 |
-
<option value="<?php echo absint( $user
|
333 |
<?php
|
334 |
}
|
335 |
break;
|
66 |
// get stored categories
|
67 |
$categories = get_categories( $args );
|
68 |
|
69 |
+
// get authors: Return List all blog editors, return limited fields in resulting row objects:
|
70 |
+
$user_query = new WP_User_Query( array(
|
71 |
+
'who' => 'authors',
|
72 |
+
'fields' => array( 'ID', 'user_nicename', 'display_name' ),
|
73 |
+
'order' => 'ASC',
|
74 |
+
'orderby' => 'display_name'
|
75 |
+
) );
|
76 |
+
$user_data = $user_query->get_results();
|
77 |
+
// make selection box entries
|
78 |
+
$users = array();
|
79 |
+
if ( 0 < count( $user_data ) ) {
|
80 |
+
// loop through each author
|
81 |
+
foreach ( $user_data as $user ) {
|
82 |
+
$users[] = array( 'id' => $user->ID, 'name' => sprintf( '%s (%s)', $user->display_name, $user->user_nicename ) );
|
83 |
+
}
|
84 |
+
}
|
85 |
|
86 |
// get stored post types
|
87 |
$post_types = $this->get_custom_post_types_labels();
|
178 |
printf( 'options[ \'%s\' ].push( \'<option value="">%s</option>\' );', $key, $first_option_label );
|
179 |
print "\n";
|
180 |
foreach ( $users as $user ) {
|
181 |
+
printf( 'options[ \'%s\' ].push( \'<option value="%d">%s</option>\' );', $key, absint( $user[ 'id' ] ), esc_html( $user[ 'name' ] ) );
|
182 |
print "\n";
|
183 |
}
|
184 |
?>
|
343 |
<?php
|
344 |
foreach ( $users as $user ) {
|
345 |
?>
|
346 |
+
<option value="<?php echo absint( $user[ 'id' ] ); ?>"<?php selected( $user[ 'id' ] == $rule[ 'matchterm' ], true ); ?>><?php echo esc_html( $user[ 'name' ] ); ?></option>
|
347 |
<?php
|
348 |
}
|
349 |
break;
|
quick-featured-images.php
CHANGED
@@ -10,7 +10,7 @@
|
|
10 |
* Plugin Name: Quick Featured Images
|
11 |
* Plugin URI: http://wordpress.org/plugins/quick-featured-images
|
12 |
* Description: Your time-saving Swiss Army Knife for featured images: Set, replace and delete them in bulk, set default images, get overview lists.
|
13 |
-
* Version: 11.8
|
14 |
* Author: Martin Stehle
|
15 |
* Author URI: http://stehle-internet.de
|
16 |
* Text Domain: quick-featured-images
|
10 |
* Plugin Name: Quick Featured Images
|
11 |
* Plugin URI: http://wordpress.org/plugins/quick-featured-images
|
12 |
* Description: Your time-saving Swiss Army Knife for featured images: Set, replace and delete them in bulk, set default images, get overview lists.
|
13 |
+
* Version: 11.8.1
|
14 |
* Author: Martin Stehle
|
15 |
* Author URI: http://stehle-internet.de
|
16 |
* Text Domain: quick-featured-images
|