Version Description
Download this release
Release Info
Developer | Rahe |
Plugin | Simple Image Sizes |
Version | 3.0.9 |
Comparing to | |
See all releases |
Code changes from version 3.0.8 to 3.0.9
- .gitignore +165 -0
- README +11 -5
- assets/js/sis-attachments.js +3 -3
- assets/js/sis-attachments.min.js +1 -1
- assets/js/sis.js +5 -5
- assets/js/sis.min.js +1 -1
- classes/admin/main.php +17 -12
- classes/admin/media.php +8 -11
- classes/admin/post.php +14 -10
- classes/main.php +1 -1
- languages/simple-image-sizes-fr_FR.mo +0 -0
- languages/simple-image-sizes-fr_FR.po +126 -124
- languages/simple-image-sizes.pot +119 -141
- readme.txt +6 -2
- simple_image_sizes.php +2 -2
- templates/admin-js.html +1 -3
- templates/options-media.php +6 -6
.gitignore
ADDED
@@ -0,0 +1,165 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
#################
|
2 |
+
## Eclipse
|
3 |
+
#################
|
4 |
+
|
5 |
+
*.pydevproject
|
6 |
+
.project
|
7 |
+
.metadata
|
8 |
+
bin/
|
9 |
+
tmp/
|
10 |
+
*.tmp
|
11 |
+
*.bak
|
12 |
+
*.swp
|
13 |
+
*~.nib
|
14 |
+
local.properties
|
15 |
+
.classpath
|
16 |
+
.settings/
|
17 |
+
.loadpath
|
18 |
+
|
19 |
+
# External tool builders
|
20 |
+
.externalToolBuilders/
|
21 |
+
|
22 |
+
# Locally stored "Eclipse launch configurations"
|
23 |
+
*.launch
|
24 |
+
|
25 |
+
# CDT-specific
|
26 |
+
.cproject
|
27 |
+
|
28 |
+
# PDT-specific
|
29 |
+
.buildpath
|
30 |
+
|
31 |
+
|
32 |
+
#################
|
33 |
+
## Visual Studio
|
34 |
+
#################
|
35 |
+
|
36 |
+
## Ignore Visual Studio temporary files, build results, and
|
37 |
+
## files generated by popular Visual Studio add-ons.
|
38 |
+
|
39 |
+
# User-specific files
|
40 |
+
*.suo
|
41 |
+
*.user
|
42 |
+
*.sln.docstates
|
43 |
+
|
44 |
+
# Build results
|
45 |
+
[Dd]ebug/
|
46 |
+
[Rr]elease/
|
47 |
+
*_i.c
|
48 |
+
*_p.c
|
49 |
+
*.ilk
|
50 |
+
*.meta
|
51 |
+
*.obj
|
52 |
+
*.pch
|
53 |
+
*.pdb
|
54 |
+
*.pgc
|
55 |
+
*.pgd
|
56 |
+
*.rsp
|
57 |
+
*.sbr
|
58 |
+
*.tlb
|
59 |
+
*.tli
|
60 |
+
*.tlh
|
61 |
+
*.tmp
|
62 |
+
*.vspscc
|
63 |
+
.builds
|
64 |
+
*.dotCover
|
65 |
+
|
66 |
+
## TODO: If you have NuGet Package Restore enabled, uncomment this
|
67 |
+
#packages/
|
68 |
+
|
69 |
+
# Visual C++ cache files
|
70 |
+
ipch/
|
71 |
+
*.aps
|
72 |
+
*.ncb
|
73 |
+
*.opensdf
|
74 |
+
*.sdf
|
75 |
+
|
76 |
+
# Visual Studio profiler
|
77 |
+
*.psess
|
78 |
+
*.vsp
|
79 |
+
|
80 |
+
# ReSharper is a .NET coding add-in
|
81 |
+
_ReSharper*
|
82 |
+
|
83 |
+
# Installshield output folder
|
84 |
+
[Ee]xpress
|
85 |
+
|
86 |
+
# DocProject is a documentation generator add-in
|
87 |
+
DocProject/buildhelp/
|
88 |
+
DocProject/Help/*.HxT
|
89 |
+
DocProject/Help/*.HxC
|
90 |
+
DocProject/Help/*.hhc
|
91 |
+
DocProject/Help/*.hhk
|
92 |
+
DocProject/Help/*.hhp
|
93 |
+
DocProject/Help/Html2
|
94 |
+
DocProject/Help/html
|
95 |
+
|
96 |
+
# Click-Once directory
|
97 |
+
publish
|
98 |
+
|
99 |
+
# Others
|
100 |
+
[Bb]in
|
101 |
+
[Oo]bj
|
102 |
+
sql
|
103 |
+
TestResults
|
104 |
+
*.Cache
|
105 |
+
ClientBin
|
106 |
+
stylecop.*
|
107 |
+
~$*
|
108 |
+
*.dbmdl
|
109 |
+
Generated_Code #added for RIA/Silverlight projects
|
110 |
+
|
111 |
+
# Backup & report files from converting an old project file to a newer
|
112 |
+
# Visual Studio version. Backup files are not needed, because we have git ;-)
|
113 |
+
_UpgradeReport_Files/
|
114 |
+
Backup*/
|
115 |
+
UpgradeLog*.XML
|
116 |
+
|
117 |
+
|
118 |
+
|
119 |
+
############
|
120 |
+
## Windows
|
121 |
+
############
|
122 |
+
|
123 |
+
# Windows image file caches
|
124 |
+
Thumbs.db
|
125 |
+
|
126 |
+
# Folder config file
|
127 |
+
Desktop.ini
|
128 |
+
|
129 |
+
|
130 |
+
#############
|
131 |
+
## Python
|
132 |
+
#############
|
133 |
+
|
134 |
+
*.py[co]
|
135 |
+
|
136 |
+
# Packages
|
137 |
+
*.egg
|
138 |
+
*.egg-info
|
139 |
+
dist
|
140 |
+
build
|
141 |
+
eggs
|
142 |
+
parts
|
143 |
+
bin
|
144 |
+
var
|
145 |
+
sdist
|
146 |
+
develop-eggs
|
147 |
+
.installed.cfg
|
148 |
+
|
149 |
+
# Installer logs
|
150 |
+
pip-log.txt
|
151 |
+
|
152 |
+
# Unit test / coverage reports
|
153 |
+
.coverage
|
154 |
+
.tox
|
155 |
+
|
156 |
+
#Mr Developer
|
157 |
+
.mr.developer.cfg
|
158 |
+
|
159 |
+
# Mac crap
|
160 |
+
.DS_Store
|
161 |
+
|
162 |
+
.settings
|
163 |
+
|
164 |
+
#Grunt
|
165 |
+
node_modules/
|
README
CHANGED
@@ -7,9 +7,9 @@
|
|
7 |
|
8 |
**Requires at least:** 3.5
|
9 |
|
10 |
-
**Tested up to:** 4.
|
11 |
|
12 |
-
**Stable tag:** 3.
|
13 |
|
14 |
|
15 |
## Description ##
|
@@ -64,9 +64,15 @@ And then you can choose if the image is displayed on the media insertion or not
|
|
64 |
](http://s.wordpress.org/extend/plugins/simple-image-sizes/screenshot-3.png)
|
65 |
|
66 |
## Changelog ##
|
67 |
-
* 3.0.
|
68 |
-
*
|
69 |
-
*
|
|
|
|
|
|
|
|
|
|
|
|
|
70 |
* 3.0.6
|
71 |
* Fix bug for the image adding
|
72 |
* 3.0.5
|
7 |
|
8 |
**Requires at least:** 3.5
|
9 |
|
10 |
+
**Tested up to:** 4.3
|
11 |
|
12 |
+
**Stable tag:** 3.9
|
13 |
|
14 |
|
15 |
## Description ##
|
64 |
](http://s.wordpress.org/extend/plugins/simple-image-sizes/screenshot-3.png)
|
65 |
|
66 |
## Changelog ##
|
67 |
+
* 3.0.9
|
68 |
+
* Reuse the after_setup_theme for image size registering
|
69 |
+
* Code formatting and cleaning
|
70 |
+
* Check compatibility wth 4.3
|
71 |
+
* 3.0.8
|
72 |
+
* Fix potential bug on error ajax
|
73 |
+
* Stop using init hook and use after_setup_theme for image size registering
|
74 |
+
* Update underscore cdn version for WP install without it
|
75 |
+
* Remove useless timer_start
|
76 |
* 3.0.6
|
77 |
* Fix bug for the image adding
|
78 |
* 3.0.5
|
assets/js/sis-attachments.js
CHANGED
@@ -73,7 +73,7 @@ jQuery( function() {
|
|
73 |
var self = this;
|
74 |
|
75 |
jQuery.ajax( {
|
76 |
-
url:
|
77 |
type: "POST",
|
78 |
dataType: 'json',
|
79 |
cache: false,
|
@@ -83,7 +83,7 @@ jQuery( function() {
|
|
83 |
nonce : sis.regen_one
|
84 |
},
|
85 |
beforeSend : function() {
|
86 |
-
self.parent.addClass( 'ajaxing' ).find( '.sis-regenerate-one' ).hide().end().find('.spinner').show();
|
87 |
self.parent.find( 'a.sis-regenerate-one' ).closest( 'tr' ).fadeTo( 'fast', '0.3' );
|
88 |
},
|
89 |
success: function( r ) {
|
@@ -95,7 +95,7 @@ jQuery( function() {
|
|
95 |
message = sis.soloRegenerated.replace( '%s', r.time );
|
96 |
}
|
97 |
self.setMessage( message );
|
98 |
-
self.parent.removeClass( 'ajaxing' ).find( '.sis-regenerate-one' ).show().end().find('.spinner').hide();
|
99 |
self.parent.find( 'a.sis-regenerate-one' ).closest( 'tr' ).fadeTo( 'fast', '1' );
|
100 |
}
|
101 |
});
|
73 |
var self = this;
|
74 |
|
75 |
jQuery.ajax( {
|
76 |
+
url: ajaxurl,
|
77 |
type: "POST",
|
78 |
dataType: 'json',
|
79 |
cache: false,
|
83 |
nonce : sis.regen_one
|
84 |
},
|
85 |
beforeSend : function() {
|
86 |
+
self.parent.addClass( 'ajaxing' ).find( '.sis-regenerate-one' ).hide().end().find('.spinner').addClass( 'is-active').show();
|
87 |
self.parent.find( 'a.sis-regenerate-one' ).closest( 'tr' ).fadeTo( 'fast', '0.3' );
|
88 |
},
|
89 |
success: function( r ) {
|
95 |
message = sis.soloRegenerated.replace( '%s', r.time );
|
96 |
}
|
97 |
self.setMessage( message );
|
98 |
+
self.parent.removeClass( 'ajaxing' ).find( '.sis-regenerate-one' ).show().end().find('.spinner').removeClass( 'is-active' ).hide();
|
99 |
self.parent.find( 'a.sis-regenerate-one' ).closest( 'tr' ).fadeTo( 'fast', '1' );
|
100 |
}
|
101 |
});
|
assets/js/sis-attachments.min.js
CHANGED
@@ -1,3 +1,3 @@
|
|
1 |
-
var sis;if(sis){if("object"!=typeof sis)throw new Error("sis already exists and not an object")}else sis={};jQuery(function(){"use strict";var e=jQuery(document.body),t=null,s=null;jQuery('select[name="action"], select[name="action2"]').append(jQuery("<option/>").attr("value","sis-regenerate").text(sis.regenerate)),e.on("click",".sis-regenerate-one",function(e){e.preventDefault(),s=new t(this)}),jQuery("#doaction, #doaction2").on("click",function(e){if("sis-regenerate"===jQuery(this).parent().find("select").val()){var n=jQuery('#the-list .check-column input[type="checkbox"]:checked').closest("tr").find(".sis-regenerate-one");n.length>0&&(e.preventDefault(),n.each(function(e,n){s=new t(this)}))}}),t=function(e){var t={list:{},parent:null,el:null,id:null,messageZone:"",init:function(e){this.el=e,this.parent=e.closest("tr"),this.id=this.el.data("id"),this.list={id:this.id,title:""},this.messageZone=this.parent.find(".title em"),0===this.parent.find(".title em").length&&this.parent.find(".title strong").after("<em/>"),this.messageZone=this.parent.find(".title em"),this.parent.hasClass("ajaxing")||this.regenItem()},setMessage:function(e){this.messageZone.html(" - "+e).addClass("updated").addClass("fade").show()},regenItem:function(){var e=this;jQuery.ajax({url:
|
2 |
|
3 |
//# sourceMappingURL=sis-attachments.min.js.map
|
1 |
+
var sis;if(sis){if("object"!=typeof sis)throw new Error("sis already exists and not an object")}else sis={};jQuery(function(){"use strict";var e=jQuery(document.body),t=null,s=null;jQuery('select[name="action"], select[name="action2"]').append(jQuery("<option/>").attr("value","sis-regenerate").text(sis.regenerate)),e.on("click",".sis-regenerate-one",function(e){e.preventDefault(),s=new t(this)}),jQuery("#doaction, #doaction2").on("click",function(e){if("sis-regenerate"===jQuery(this).parent().find("select").val()){var n=jQuery('#the-list .check-column input[type="checkbox"]:checked').closest("tr").find(".sis-regenerate-one");n.length>0&&(e.preventDefault(),n.each(function(e,n){s=new t(this)}))}}),t=function(e){var t={list:{},parent:null,el:null,id:null,messageZone:"",init:function(e){this.el=e,this.parent=e.closest("tr"),this.id=this.el.data("id"),this.list={id:this.id,title:""},this.messageZone=this.parent.find(".title em"),0===this.parent.find(".title em").length&&this.parent.find(".title strong").after("<em/>"),this.messageZone=this.parent.find(".title em"),this.parent.hasClass("ajaxing")||this.regenItem()},setMessage:function(e){this.messageZone.html(" - "+e).addClass("updated").addClass("fade").show()},regenItem:function(){var e=this;jQuery.ajax({url:ajaxurl,type:"POST",dataType:"json",cache:!1,data:{action:"sis_rebuild_image",id:this.list.id,nonce:sis.regen_one},beforeSend:function(){e.parent.addClass("ajaxing").find(".sis-regenerate-one").hide().end().find(".spinner").addClass("is-active").show(),e.parent.find("a.sis-regenerate-one").closest("tr").fadeTo("fast","0.3")},success:function(t){var s="";s=t.src&&t.time&&!t.error&&"object"==typeof t?sis.soloRegenerated.replace("%s",t.time):"object"!=typeof t?s=sis.phpError:t.error,e.setMessage(s),e.parent.removeClass("ajaxing").find(".sis-regenerate-one").show().end().find(".spinner").removeClass("is-active").hide(),e.parent.find("a.sis-regenerate-one").closest("tr").fadeTo("fast","1")}})}};t.init(jQuery(e))}});
|
2 |
|
3 |
//# sourceMappingURL=sis-attachments.min.js.map
|
assets/js/sis.js
CHANGED
@@ -98,7 +98,7 @@ rahe.sis.regenerate = {
|
|
98 |
this.dateScript = new Date();
|
99 |
// Start ajax
|
100 |
jQuery.ajax( {
|
101 |
-
url:
|
102 |
type: "POST",
|
103 |
dataType: 'json',
|
104 |
data: {
|
@@ -162,7 +162,7 @@ rahe.sis.regenerate = {
|
|
162 |
this.setMessage( sis.regenerating + ( this.curr + 1 ) + sis.of + this.total );
|
163 |
|
164 |
jQuery.ajax( {
|
165 |
-
url:
|
166 |
type: "POST",
|
167 |
dataType: 'json',
|
168 |
data: {
|
@@ -345,7 +345,7 @@ rahe.sis.sizes = {
|
|
345 |
var parent = jQuery( el ).closest( 'tr' );
|
346 |
|
347 |
jQuery.ajax( {
|
348 |
-
url:
|
349 |
type: "POST",
|
350 |
data: { action : "sis_get_sizes" },
|
351 |
beforeSend: function() {
|
@@ -381,7 +381,7 @@ rahe.sis.sizes = {
|
|
381 |
|
382 |
if( !parentTable.hasClass( 'ajaxing' ) ) {
|
383 |
jQuery.ajax({
|
384 |
-
url:
|
385 |
type: "POST",
|
386 |
dataType :'json',
|
387 |
data: { action : "sis_add_size", width: w, height: h, crop: c, name: n, show: s, customName : cn , nonce : wp_nonce },
|
@@ -442,7 +442,7 @@ rahe.sis.sizes = {
|
|
442 |
|
443 |
// Make the ajax call
|
444 |
jQuery.ajax({
|
445 |
-
url:
|
446 |
type: "POST",
|
447 |
data: { action : "sis_remove_size", name: n, nonce : wp_nonce },
|
448 |
success: function(result) {
|
98 |
this.dateScript = new Date();
|
99 |
// Start ajax
|
100 |
jQuery.ajax( {
|
101 |
+
url: ajaxurl,
|
102 |
type: "POST",
|
103 |
dataType: 'json',
|
104 |
data: {
|
162 |
this.setMessage( sis.regenerating + ( this.curr + 1 ) + sis.of + this.total );
|
163 |
|
164 |
jQuery.ajax( {
|
165 |
+
url: ajaxurl,
|
166 |
type: "POST",
|
167 |
dataType: 'json',
|
168 |
data: {
|
345 |
var parent = jQuery( el ).closest( 'tr' );
|
346 |
|
347 |
jQuery.ajax( {
|
348 |
+
url: ajaxurl,
|
349 |
type: "POST",
|
350 |
data: { action : "sis_get_sizes" },
|
351 |
beforeSend: function() {
|
381 |
|
382 |
if( !parentTable.hasClass( 'ajaxing' ) ) {
|
383 |
jQuery.ajax({
|
384 |
+
url: ajaxurl,
|
385 |
type: "POST",
|
386 |
dataType :'json',
|
387 |
data: { action : "sis_add_size", width: w, height: h, crop: c, name: n, show: s, customName : cn , nonce : wp_nonce },
|
442 |
|
443 |
// Make the ajax call
|
444 |
jQuery.ajax({
|
445 |
+
url: ajaxurl,
|
446 |
type: "POST",
|
447 |
data: { action : "sis_remove_size", name: n, nonce : wp_nonce },
|
448 |
success: function(result) {
|
assets/js/sis.min.js
CHANGED
@@ -1,3 +1,3 @@
|
|
1 |
-
var rahe;if(rahe){if("object"!=typeof rahe)throw new Error("rahe already exists and not an object")}else rahe={};if(rahe.sis){if("object"!=typeof rahe.sis)throw new Error("rahe.sis already exists and not an object")}else rahe.sis={};rahe.sis.regenerate={post_types:[],thumbnails:[],total:0,cur:0,timeScript:[],dateScript:"",percent:"",percentText:null,progress:null,messageZone:null,sisZone:null,time:null,timeZone:null,buttonRegenerate:null,errorZone:null,errorMessages:null,thumb:null,thumbImg:null,init:function(){this.sisZone=jQuery(".sis"),this.percentText=jQuery("#sis_progress-percent"),this.progress=jQuery(".progress"),this.messageZone=this.sisZone.find(".regenerate_message"),this.time=this.sisZone.find(".time"),this.timeZone=this.time.find("p span.time_message"),this.buttonRegenerate=jQuery("#ajax_thumbnail_rebuild"),this.errorZone=jQuery("#error_messages"),this.errorMessages=this.errorZone.find("ul.messages"),this.thumb=this.sisZone.find(".thumb"),this.thumbImg=this.sisZone.find(".thumb-img")},getThumbnails:function(){var e=this,t=jQuery("input.thumbnails:checked");t.length!=jQuery('input.thumbnails[type="checkbox"]').length&&t.each(function(t){e.thumbnails.push(this.value)})},getPostTypes:function(){var e=this,t=jQuery("input.post_types:checked");t.length!=jQuery('input.post_types[type="checkbox"]').length&&t.each(function(){e.post_types.push(this.value)})},setMessage:function(e){this.messageZone.html("<p>"+e+"</p>").addClass("updated").addClass("fade").show()},setTimeMessage:function(e){this.timeZone.html(e)},checkStartRegenerating:function(){if(jQuery(".notSaved").size()>0){var e=confirm(sis.notSaved);if(1!=e)return!1;this.startRegenerating()}else this.startRegenerating()},startRegenerating:function(){var e=this,t=jQuery("input.getList").val();e.getThumbnails(),e.getPostTypes(),this.dateScript=new Date,jQuery.ajax({url:
|
2 |
|
3 |
//# sourceMappingURL=sis.min.js.map
|
1 |
+
var rahe;if(rahe){if("object"!=typeof rahe)throw new Error("rahe already exists and not an object")}else rahe={};if(rahe.sis){if("object"!=typeof rahe.sis)throw new Error("rahe.sis already exists and not an object")}else rahe.sis={};rahe.sis.regenerate={post_types:[],thumbnails:[],total:0,cur:0,timeScript:[],dateScript:"",percent:"",percentText:null,progress:null,messageZone:null,sisZone:null,time:null,timeZone:null,buttonRegenerate:null,errorZone:null,errorMessages:null,thumb:null,thumbImg:null,init:function(){this.sisZone=jQuery(".sis"),this.percentText=jQuery("#sis_progress-percent"),this.progress=jQuery(".progress"),this.messageZone=this.sisZone.find(".regenerate_message"),this.time=this.sisZone.find(".time"),this.timeZone=this.time.find("p span.time_message"),this.buttonRegenerate=jQuery("#ajax_thumbnail_rebuild"),this.errorZone=jQuery("#error_messages"),this.errorMessages=this.errorZone.find("ul.messages"),this.thumb=this.sisZone.find(".thumb"),this.thumbImg=this.sisZone.find(".thumb-img")},getThumbnails:function(){var e=this,t=jQuery("input.thumbnails:checked");t.length!=jQuery('input.thumbnails[type="checkbox"]').length&&t.each(function(t){e.thumbnails.push(this.value)})},getPostTypes:function(){var e=this,t=jQuery("input.post_types:checked");t.length!=jQuery('input.post_types[type="checkbox"]').length&&t.each(function(){e.post_types.push(this.value)})},setMessage:function(e){this.messageZone.html("<p>"+e+"</p>").addClass("updated").addClass("fade").show()},setTimeMessage:function(e){this.timeZone.html(e)},checkStartRegenerating:function(){if(jQuery(".notSaved").size()>0){var e=confirm(sis.notSaved);if(1!=e)return!1;this.startRegenerating()}else this.startRegenerating()},startRegenerating:function(){var e=this,t=jQuery("input.getList").val();e.getThumbnails(),e.getPostTypes(),this.dateScript=new Date,jQuery.ajax({url:ajaxurl,type:"POST",dataType:"json",data:{action:"sis_get_list",post_types:e.post_types,nonce:t},beforeSend:function(){e.buttonRegenerate.attr("disabled",!0),e.setMessage(sis.reading)},success:function(t){return"object"!=typeof t?(e.reInit(),e.setMessage(sis.phpError),!1):(e.time.show(),e.total=t.total,e.curr=0,e.progress.show().parent().show(),void e.regenItem())}})},regenItem:function(){var e=this,s=jQuery("input.regen").val();if(0==this.total||_.isUndefined(this.total))return this.reInit(),this.setMessage(sis.noMedia),!1;if(this.curr>=this.total){var i=new Date;return this.reInit(),void this.setMessage(sis.done+this.curr+" "+sis.messageRegenerated+sis.startedAt+" "+this.dateScript.getHours()+":"+this.dateScript.getMinutes()+":"+this.dateScript.getSeconds()+sis.finishedAt+" "+i.getHours()+":"+i.getMinutes()+":"+i.getSeconds())}this.setMessage(sis.regenerating+(this.curr+1)+sis.of+this.total),this.setMessage(sis.regenerating+(this.curr+1)+sis.of+this.total),jQuery.ajax({url:ajaxurl,type:"POST",dataType:"json",data:{action:"sis_rebuild_images",offset:this.curr,thumbnails:this.thumbnails,nonce:s},beforeSend:function(){e.percent=e.curr/e.total*100,e.progress.find(".bar").width(e.percent+"%").find(".percent").html(e.percent+"%"),e.percentText.removeClass("hidden").html(Math.round(e.percent)+"%")},success:function(s){if(s.src&&s.time&&!s.error&&"object"==typeof s){s.message&&e.time.find("ul.messages").prepend("<li>"+s.message+"</li>"),e.thumb.show(),e.thumbImg.attr("src",s.src);var i=new Date,n=new Date,a=0,r=0,o=0,d=0,l="";for(e.timeScript.push(parseFloat(s.time.replace(",","."),10)),a=e.timeScript.length,o;a>o;o++)r+=e.timeScript[o];d=r/a,t=Math.round(d*e.total*1e3),i.setTime(e.dateScript.getTime()+t),l=e.s2t(Math.abs(i.getTime()-n.getTime())/1e3),e.setTimeMessage(i.getHours()+":"+i.getMinutes()+":"+i.getSeconds()+sis.or+l+sis.beforeEnd)}else{var u="";u="object"!=typeof s?sis.phpError:s.error,e.errorZone.addClass("error message"),e.errorMessages.prepend("<li>"+u+"</li>")}e.curr++,e.regenItem()}})},s2t:function(e){var e=e%86400,t=new Date(1970,0,1),s=0;return t.setSeconds(e),s=t.toTimeString().substr(0,8),e>86399&&(s=Math.floor((t-Date.parse("1/1/70"))/36e5)+s.substr(2)),s},reInit:function(){this.buttonRegenerate.removeAttr("disabled"),this.thumb.hide(),this.progress.hide(),this.percentText.addClass("hidden")}},rahe.sis.sizes={i:0,add:function(e,t){e.preventDefault();var s=rahe.sis.template("new_size");s=s({size_id:this.i,validate:sis.validate}),jQuery(t).closest("tr").before(s),this.i++},register:function(e,t){e.preventDefault();var s=jQuery(t).closest("tr").children("th").find("input").val(),i=jQuery(t).closest("tr").children("th").find("input").attr("id"),n=jQuery(t).closest("tbody").find('input[value="'+s+'"]').length;if("thumbnail"==s||"medium"==s||"large"==s)return alert(sis.notOriginal),!1;if(0!=n)return alert(sis.alreadyPresent),!1;var a=rahe.sis.template("new_size_row");a=a({size:sis.size,size_name:s,maximumWidth:sis.maximumWidth,maximumHeight:sis.maximumHeight,customName:sis.customName,crop:sis.crop,crop_positions:sis.crop_positions,show:sis.show,deleteImage:sis.deleteImage,validateButton:sis.validateButton}),jQuery("#"+i).closest("tr").html(a)},deleteSize:function(e,t){e.preventDefault();var s=confirm(sis.confirmDelete);1==s&&(jQuery(t).closest("tr").remove(),this.ajaxUnregister(t))},getPhp:function(e,t){e.preventDefault();var s=jQuery(t).closest("tr");jQuery.ajax({url:ajaxurl,type:"POST",data:{action:"sis_get_sizes"},beforeSend:function(){s.removeClass("addPending"),s.addClass("addPending")},success:function(e){jQuery("#get_php").nextAll("code").html("<br />"+e).show().css({display:"block"}),s.removeClass("addPending")}})},ajaxRegister:function(e,t){e.preventDefault();var s,i=this,n=jQuery(t).closest("table"),a=jQuery(".addSize").val(),r=jQuery(t).closest("tr"),o=r.find('input[name="image_name"]').val(),d=r.find("select.crop").val(),l=r.find("input.show").val(),u=r.find("input.n").val(),h=0,c=0;l=0==l||void 0==l?!1:!0,c=parseInt(r.find("input.w").val()),h=parseInt(r.find("input.h").val()),n.hasClass("ajaxing")||jQuery.ajax({url:ajaxurl,type:"POST",dataType:"json",data:{action:"sis_add_size",width:c,height:h,crop:d,name:o,show:l,customName:u,nonce:a},beforeSend:function(){r.removeClass(),r.addClass("addPending"),n.addClass("ajaxing")},success:function(e){var t="";r.removeClass(),n.removeClass("ajaxing"),0==e?t="errorAdding":2==e?(t="notChangedAdding",i.addToArray(o,c,h,d,t)):(t="successAdding",i.addToArray(o,c,h,d,t)),r.find("input.h").attr({base_h:h}),r.find("input.w").attr({base_w:c}),r.find("select.c").attr({base_c:d}),r.find("input.s").attr({base_s:l}),r.addClass(t),r.find("td").removeClass("notSaved"),r.find(".add_size").removeClass("validate_size").hide().children(".ui-button-text").text(sis.update),clearTimeout(s),s=setTimeout(function(){r.removeClass("errorAdding notChangedAdding successAdding")},2e3)}})},ajaxUnregister:function(e){var t=this,s=jQuery(e).closest("tr").find('input[name="image_name"]').val(),i=jQuery(e).closest("tr").find("input.deleteSize").val();jQuery.ajax({url:ajaxurl,type:"POST",data:{action:"sis_remove_size",name:s,nonce:i},success:function(s){t.removeFromArray(e)}})},addToArray:function(e,t,s,i,n){var a,r=jQuery("#sis-"+e),o="";o=0!=r.length?r.closest("tr"):jQuery("#sis-regen .wrapper > table#sis_sizes > tbody > tr:first").clone().attr("id","sis-"+e),i=_.isUndefined(sis.crop_positions[i])?sis.fl:sis.crop_positions[i],o.find("th > label").attr("for",e).end().find("input.thumbnails").val(e).attr("id",e).end().find("th:nth-child(2) > label").text(e).end().find("th:nth-child(3) > label").text(t+"px").end().find("th:nth-child(4) > label").text(s+"px").end().find("th:nth-child(5) > label").text(i),0==r.length&&o.appendTo("#sis-regen .wrapper > table#sis_sizes > tbody"),o.removeClass("errorAdding notChangedAdding successAdding").addClass(n),clearTimeout(a),a=setTimeout(function(){o.removeClass("errorAdding notChangedAdding successAdding")},3e3)},removeFromArray:function(e){var t=jQuery(e).closest("tr").find("input[name=image_name]").val();jQuery("#sis-"+t).remove()},displayChange:function(e){var e=jQuery(e),t=e.closest("tr");if(t.hasClass("new_size"))return!1;var s=t.find("input.h"),i=t.find("input.w"),n=t.find("select.c"),a=t.find("input.s"),r=t.find("input.n"),o=s.val(),d=i.val(),l=n.val(),u=a.val(),h=r.val(),c=s.attr("base_h"),p=i.attr("base_w"),g=n.attr("base_c"),m=a.attr("base_s"),f=r.attr("base_n");g="0"==g?!1:!0,m="0"==m?!1:!0,o!=c||d!=p||l!=g||u!=m||h!=f?e.closest("td").addClass("notSaved").find(".add_size").css("display","inline-block"):e.closest("td").removeClass("notSaved").find(".add_size").css("display","none")}},rahe.sis.template=_.memoize(function(e){var t,s={evaluate:/<#([\s\S]+?)#>/g,interpolate:/\{\{\{([\s\S]+?)\}\}\}/g,escape:/\{\{([^\}]+?)\}\}(?!\})/g,variable:"data"};return function(i){return(t=t||_.template(jQuery("#sis-"+e).html(),null,s))(i)}}),jQuery(function(){rahe.sis.regenerate.init();var e=jQuery("#wpbody-content");jQuery("#ajax_thumbnail_rebuild").click(function(){rahe.sis.regenerate.checkStartRegenerating()}),e.on("click","#add_size",function(e){rahe.sis.sizes.add(e,this)}).on("click",".add_size_name",function(e){rahe.sis.sizes.register(e,this)}).on("click",".delete_size",function(e){rahe.sis.sizes.deleteSize(e,this)}).on("click",".add_size",function(e){rahe.sis.sizes.ajaxRegister(e,this)}).on("click keyup change",".h,.w,.c,.s,.n",function(e){rahe.sis.sizes.displayChange(this)}).on("click","#get_php",function(e){rahe.sis.sizes.getPhp(e,this)}),jQuery("#get_php").nextAll("code").hide(),jQuery(".add_size").hide()});
|
2 |
|
3 |
//# sourceMappingURL=sis.min.js.map
|
classes/admin/main.php
CHANGED
@@ -17,7 +17,7 @@ Class SIS_Admin_Main {
|
|
17 |
'jquery',
|
18 |
'jquery-ui-button',
|
19 |
'jquery-ui-progressbar',
|
20 |
-
'underscore'
|
21 |
), SIS_VERSION );
|
22 |
|
23 |
// Differencitate the scripts
|
@@ -41,7 +41,6 @@ Class SIS_Admin_Main {
|
|
41 |
*/
|
42 |
public static function localize_vars() {
|
43 |
return array(
|
44 |
-
'ajaxUrl' => admin_url( '/admin-ajax.php' ),
|
45 |
'reading' => __( 'Reading attachments...', 'simple-image-sizes' ),
|
46 |
'maximumWidth' => __( 'Maximum width', 'simple-image-sizes' ),
|
47 |
'maximumHeight' => __( 'Maximum height', 'simple-image-sizes' ),
|
@@ -59,7 +58,7 @@ Class SIS_Admin_Main {
|
|
59 |
'validate' => __( 'Validate image size name', 'simple-image-sizes' ),
|
60 |
'done' => __( 'Done.', 'simple-image-sizes' ),
|
61 |
'size' => __( 'Size', 'simple-image-sizes' ),
|
62 |
-
'notOriginal' => __( 'Don\'t use the basic
|
63 |
'alreadyPresent' => __( 'This size is already registered, edit it instead of recreating it.', 'simple-image-sizes' ),
|
64 |
'confirmDelete' => __( 'Do you really want to delete these size ?', 'simple-image-sizes' ),
|
65 |
'update' => __( 'Update', 'simple-image-sizes' ),
|
@@ -70,10 +69,10 @@ Class SIS_Admin_Main {
|
|
70 |
'customName' => __( 'Public name', 'simple-image-sizes' ),
|
71 |
'finishedAt' => __( ' finished at :', 'simple-image-sizes' ),
|
72 |
'phpError' => __( 'Error during the php treatment, be sure to not have php errors in your page', 'simple-image-sizes' ),
|
73 |
-
'notSaved' => __( 'All the sizes you have
|
74 |
'soloRegenerated' => __( 'This image has been regenerated in %s seconds', 'simple-image-sizes' ),
|
75 |
'crop_positions' => self::get_available_crop(),
|
76 |
-
'regen_one' => wp_create_nonce( 'regen' )
|
77 |
);
|
78 |
}
|
79 |
|
@@ -94,7 +93,7 @@ Class SIS_Admin_Main {
|
|
94 |
if ( (int) $att_id <= 0 ) {
|
95 |
return array(
|
96 |
'time' => timer_stop( false, 4 ),
|
97 |
-
'error' => __( 'No id given in POST datas.', 'simple-image-sizes' )
|
98 |
);
|
99 |
}
|
100 |
|
@@ -107,14 +106,14 @@ Class SIS_Admin_Main {
|
|
107 |
return array(
|
108 |
'src' => wp_get_attachment_thumb_url( $att_id ),
|
109 |
'time' => timer_stop( false, 4 ),
|
110 |
-
'message' => sprintf( __( 'This file already exists in this size and have not been regenerated :<br/><a target="_blank" href="%1$s" >%2$s</a>', 'simple-image-sizes' ), get_edit_post_link( $att_id ), get_the_title( $att_id ) )
|
111 |
);
|
112 |
}
|
113 |
} else {
|
114 |
return array(
|
115 |
'src' => wp_get_attachment_thumb_url( $att_id ),
|
116 |
'time' => timer_stop( false, 4 ),
|
117 |
-
'error' => sprintf( __( 'This file does not exists and have not been regenerated :<br/><a target="_blank" href="%1$s" >%2$s</a>', 'simple-image-sizes' ), get_edit_post_link( $att_id ), get_the_title( $att_id ) )
|
118 |
);
|
119 |
|
120 |
}
|
@@ -123,7 +122,7 @@ Class SIS_Admin_Main {
|
|
123 |
return array(
|
124 |
'time' => timer_stop( false, 4 ),
|
125 |
'src' => wp_get_attachment_thumb_url( $att_id ),
|
126 |
-
'title' => get_the_title( $att_id )
|
127 |
);
|
128 |
}
|
129 |
|
@@ -176,7 +175,13 @@ Class SIS_Admin_Main {
|
|
176 |
'bottom' => __( 'bottom', 'simple-image-sizes' ),
|
177 |
);
|
178 |
|
179 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
180 |
foreach ( $x as $x_pos => $x_pos_label ) {
|
181 |
foreach ( $y as $y_pos => $y_pos_label ) {
|
182 |
$crops[ $x_pos . '_' . $y_pos ] = $x_pos_label . ' ' . $y_pos_label;
|
@@ -197,7 +202,7 @@ Class SIS_Admin_Main {
|
|
197 |
public static function is_crop_position( $crop_position ) {
|
198 |
$crops = self::get_available_crop();
|
199 |
|
200 |
-
return isset( $crops[ $crop_position ] );
|
201 |
}
|
202 |
|
203 |
/**
|
@@ -227,7 +232,7 @@ Class SIS_Admin_Main {
|
|
227 |
* @return void
|
228 |
* @author Nicolas Juen
|
229 |
*/
|
230 |
-
public static function
|
231 |
if ( function_exists( 'wp_send_json' ) ) {
|
232 |
wp_send_json( $data );
|
233 |
}
|
17 |
'jquery',
|
18 |
'jquery-ui-button',
|
19 |
'jquery-ui-progressbar',
|
20 |
+
'underscore',
|
21 |
), SIS_VERSION );
|
22 |
|
23 |
// Differencitate the scripts
|
41 |
*/
|
42 |
public static function localize_vars() {
|
43 |
return array(
|
|
|
44 |
'reading' => __( 'Reading attachments...', 'simple-image-sizes' ),
|
45 |
'maximumWidth' => __( 'Maximum width', 'simple-image-sizes' ),
|
46 |
'maximumHeight' => __( 'Maximum height', 'simple-image-sizes' ),
|
58 |
'validate' => __( 'Validate image size name', 'simple-image-sizes' ),
|
59 |
'done' => __( 'Done.', 'simple-image-sizes' ),
|
60 |
'size' => __( 'Size', 'simple-image-sizes' ),
|
61 |
+
'notOriginal' => __( 'Don\'t use the basic WordPress thumbnail size name, use the form above to edit them', 'simple-image-sizes' ),
|
62 |
'alreadyPresent' => __( 'This size is already registered, edit it instead of recreating it.', 'simple-image-sizes' ),
|
63 |
'confirmDelete' => __( 'Do you really want to delete these size ?', 'simple-image-sizes' ),
|
64 |
'update' => __( 'Update', 'simple-image-sizes' ),
|
69 |
'customName' => __( 'Public name', 'simple-image-sizes' ),
|
70 |
'finishedAt' => __( ' finished at :', 'simple-image-sizes' ),
|
71 |
'phpError' => __( 'Error during the php treatment, be sure to not have php errors in your page', 'simple-image-sizes' ),
|
72 |
+
'notSaved' => __( 'All the sizes you have modified are not saved, continue anyway ?', 'simple-image-sizes' ),
|
73 |
'soloRegenerated' => __( 'This image has been regenerated in %s seconds', 'simple-image-sizes' ),
|
74 |
'crop_positions' => self::get_available_crop(),
|
75 |
+
'regen_one' => wp_create_nonce( 'regen' ),
|
76 |
);
|
77 |
}
|
78 |
|
93 |
if ( (int) $att_id <= 0 ) {
|
94 |
return array(
|
95 |
'time' => timer_stop( false, 4 ),
|
96 |
+
'error' => __( 'No id given in POST datas.', 'simple-image-sizes' ),
|
97 |
);
|
98 |
}
|
99 |
|
106 |
return array(
|
107 |
'src' => wp_get_attachment_thumb_url( $att_id ),
|
108 |
'time' => timer_stop( false, 4 ),
|
109 |
+
'message' => sprintf( __( 'This file already exists in this size and have not been regenerated :<br/><a target="_blank" href="%1$s" >%2$s</a>', 'simple-image-sizes' ), get_edit_post_link( $att_id ), get_the_title( $att_id ) ),
|
110 |
);
|
111 |
}
|
112 |
} else {
|
113 |
return array(
|
114 |
'src' => wp_get_attachment_thumb_url( $att_id ),
|
115 |
'time' => timer_stop( false, 4 ),
|
116 |
+
'error' => sprintf( __( 'This file does not exists and have not been regenerated :<br/><a target="_blank" href="%1$s" >%2$s</a>', 'simple-image-sizes' ), get_edit_post_link( $att_id ), get_the_title( $att_id ) ),
|
117 |
);
|
118 |
|
119 |
}
|
122 |
return array(
|
123 |
'time' => timer_stop( false, 4 ),
|
124 |
'src' => wp_get_attachment_thumb_url( $att_id ),
|
125 |
+
'title' => get_the_title( $att_id ),
|
126 |
);
|
127 |
}
|
128 |
|
175 |
'bottom' => __( 'bottom', 'simple-image-sizes' ),
|
176 |
);
|
177 |
|
178 |
+
/**
|
179 |
+
* Base crops
|
180 |
+
*/
|
181 |
+
$crops = array(
|
182 |
+
0 => __( 'No','simple-image-sizes' ),
|
183 |
+
1 => __( 'Yes','simple-image-sizes' ),
|
184 |
+
);
|
185 |
foreach ( $x as $x_pos => $x_pos_label ) {
|
186 |
foreach ( $y as $y_pos => $y_pos_label ) {
|
187 |
$crops[ $x_pos . '_' . $y_pos ] = $x_pos_label . ' ' . $y_pos_label;
|
202 |
public static function is_crop_position( $crop_position ) {
|
203 |
$crops = self::get_available_crop();
|
204 |
|
205 |
+
return is_bool( $crop_position ) ? $crop_position : isset( $crops[ $crop_position ] );
|
206 |
}
|
207 |
|
208 |
/**
|
232 |
* @return void
|
233 |
* @author Nicolas Juen
|
234 |
*/
|
235 |
+
public static function display_json( $data = array() ) {
|
236 |
if ( function_exists( 'wp_send_json' ) ) {
|
237 |
wp_send_json( $data );
|
238 |
}
|
classes/admin/media.php
CHANGED
@@ -193,10 +193,7 @@ Class SIS_Admin_Media {
|
|
193 |
<select id="<?php echo esc_attr( 'custom_image_sizes[' . $args['name'] . '][c]' ); ?>" class="c crop"
|
194 |
base_c='<?php echo esc_attr( $crop ); ?>'
|
195 |
name="<?php echo esc_attr( 'custom_image_sizes[' . $args['name'] . '][c]' ); ?>">
|
196 |
-
|
197 |
-
value="0" <?php selected( 0, $crop ); ?>><?php esc_html_e( 'No', 'simple-image-sizes' ); ?></option>
|
198 |
-
<option
|
199 |
-
value="1" <?php selected( 1, $crop ); ?>><?php esc_html_e( 'Yes', 'simple-image-sizes' ); ?></option>
|
200 |
<?php foreach ( SIS_Admin_Main::get_available_crop() as $crop_position => $label ): ?>
|
201 |
<option <?php selected( $crop_position, $crop ); ?>
|
202 |
value="<?php echo esc_attr( $crop_position ) ?>"><?php echo esc_html( $label ); ?></option>
|
@@ -404,7 +401,7 @@ Class SIS_Admin_Media {
|
|
404 |
|
405 |
// Check the nonce
|
406 |
if ( ! wp_verify_nonce( $nonce, 'getList' ) ) {
|
407 |
-
SIS_Admin_Main::
|
408 |
}
|
409 |
|
410 |
if ( isset( $_POST['post_types'] ) && ! empty( $_POST['post_types'] ) ) {
|
@@ -416,7 +413,7 @@ Class SIS_Admin_Media {
|
|
416 |
}
|
417 |
|
418 |
if ( empty( $_POST['post_types'][ $key ] ) ) {
|
419 |
-
SIS_Admin_Main::
|
420 |
}
|
421 |
|
422 |
// Get image medias
|
@@ -434,7 +431,7 @@ Class SIS_Admin_Media {
|
|
434 |
WHERE post_type IN ('" . implode( "', '", $_POST['post_types'] ) . "')
|
435 |
)" );
|
436 |
// Return the Id's and Title of medias
|
437 |
-
SIS_Admin_Main::
|
438 |
|
439 |
} else {
|
440 |
$attachments = get_children( array(
|
@@ -446,7 +443,7 @@ Class SIS_Admin_Media {
|
|
446 |
'output' => 'ids',
|
447 |
) );
|
448 |
// Return the Id's and Title of medias
|
449 |
-
SIS_Admin_Main::
|
450 |
}
|
451 |
|
452 |
}
|
@@ -474,7 +471,7 @@ Class SIS_Admin_Media {
|
|
474 |
|
475 |
// Check the nonce
|
476 |
if ( ! wp_verify_nonce( $nonce, 'regen' ) ) {
|
477 |
-
SIS_Admin_Main::
|
478 |
}
|
479 |
|
480 |
if ( 'any' !== $post_types ) {
|
@@ -486,7 +483,7 @@ Class SIS_Admin_Media {
|
|
486 |
}
|
487 |
|
488 |
if ( empty( $_POST['post_types'] ) ) {
|
489 |
-
SIS_Admin_Main::
|
490 |
}
|
491 |
|
492 |
// Get image medias
|
@@ -524,6 +521,6 @@ Class SIS_Admin_Media {
|
|
524 |
'message' => __( 'Regeneration ended', 'simple-image-sizes' )
|
525 |
);
|
526 |
}
|
527 |
-
SIS_Admin_Main::
|
528 |
}
|
529 |
}
|
193 |
<select id="<?php echo esc_attr( 'custom_image_sizes[' . $args['name'] . '][c]' ); ?>" class="c crop"
|
194 |
base_c='<?php echo esc_attr( $crop ); ?>'
|
195 |
name="<?php echo esc_attr( 'custom_image_sizes[' . $args['name'] . '][c]' ); ?>">
|
196 |
+
|
|
|
|
|
|
|
197 |
<?php foreach ( SIS_Admin_Main::get_available_crop() as $crop_position => $label ): ?>
|
198 |
<option <?php selected( $crop_position, $crop ); ?>
|
199 |
value="<?php echo esc_attr( $crop_position ) ?>"><?php echo esc_html( $label ); ?></option>
|
401 |
|
402 |
// Check the nonce
|
403 |
if ( ! wp_verify_nonce( $nonce, 'getList' ) ) {
|
404 |
+
SIS_Admin_Main::display_json();
|
405 |
}
|
406 |
|
407 |
if ( isset( $_POST['post_types'] ) && ! empty( $_POST['post_types'] ) ) {
|
413 |
}
|
414 |
|
415 |
if ( empty( $_POST['post_types'][ $key ] ) ) {
|
416 |
+
SIS_Admin_Main::display_json();
|
417 |
}
|
418 |
|
419 |
// Get image medias
|
431 |
WHERE post_type IN ('" . implode( "', '", $_POST['post_types'] ) . "')
|
432 |
)" );
|
433 |
// Return the Id's and Title of medias
|
434 |
+
SIS_Admin_Main::display_json( array( 'total' => $attachments ) );
|
435 |
|
436 |
} else {
|
437 |
$attachments = get_children( array(
|
443 |
'output' => 'ids',
|
444 |
) );
|
445 |
// Return the Id's and Title of medias
|
446 |
+
SIS_Admin_Main::display_json( array( 'total' => count( $attachments ) ) );
|
447 |
}
|
448 |
|
449 |
}
|
471 |
|
472 |
// Check the nonce
|
473 |
if ( ! wp_verify_nonce( $nonce, 'regen' ) ) {
|
474 |
+
SIS_Admin_Main::display_json( array( 'error' => __( 'Trying to cheat ?', 'simple-image-sizes' ) ) );
|
475 |
}
|
476 |
|
477 |
if ( 'any' !== $post_types ) {
|
483 |
}
|
484 |
|
485 |
if ( empty( $_POST['post_types'] ) ) {
|
486 |
+
SIS_Admin_Main::display_json();
|
487 |
}
|
488 |
|
489 |
// Get image medias
|
521 |
'message' => __( 'Regeneration ended', 'simple-image-sizes' )
|
522 |
);
|
523 |
}
|
524 |
+
SIS_Admin_Main::display_json( SIS_Admin_Main::thumbnail_rebuild( $attachment, $thumbnails ) );
|
525 |
}
|
526 |
}
|
classes/admin/post.php
CHANGED
@@ -61,12 +61,12 @@ Class SIS_Admin_Post {
|
|
61 |
|
62 |
// Check the nonce
|
63 |
if ( ! wp_verify_nonce( $nonce, 'regen' ) ) {
|
64 |
-
SIS_Admin_Main::
|
65 |
}
|
66 |
|
67 |
// Get the id
|
68 |
$id = isset( $_POST['id'] ) ? $_POST['id'] : 0;
|
69 |
-
SIS_Admin_Main::
|
70 |
}
|
71 |
|
72 |
/**
|
@@ -159,23 +159,23 @@ Class SIS_Admin_Post {
|
|
159 |
// Get options
|
160 |
$sizes_custom = get_option( SIS_OPTION, array() );
|
161 |
// init size array
|
162 |
-
$
|
163 |
|
164 |
// check there is custom sizes
|
165 |
if ( is_array( $sizes_custom ) && ! empty( $sizes_custom ) ) {
|
166 |
foreach ( $sizes_custom as $key => $value ) {
|
167 |
// If we show this size in the admin
|
168 |
if ( isset( $value['s'] ) && 1 == $value['s'] ) {
|
169 |
-
$
|
170 |
}
|
171 |
}
|
172 |
}
|
173 |
|
174 |
// Merge the two array
|
175 |
-
$
|
176 |
|
177 |
// Add new size
|
178 |
-
return $
|
179 |
}
|
180 |
|
181 |
/**
|
@@ -221,7 +221,7 @@ Class SIS_Admin_Post {
|
|
221 |
return $actions;
|
222 |
}
|
223 |
// Add action for regeneration
|
224 |
-
$actions['sis-regenerate'] = "<a href='#' data-id='
|
225 |
|
226 |
// Return actions
|
227 |
return $actions;
|
@@ -249,11 +249,15 @@ Class SIS_Admin_Post {
|
|
249 |
$fields['sis-regenerate'] = array(
|
250 |
'label' => __( 'Regenerate Thumbnails', 'simple-image-sizes' ),
|
251 |
'input' => 'html',
|
252 |
-
'html' => '
|
253 |
-
<input type="button" data-id="
|
254 |
<span class="spinner"></span>
|
255 |
<span class="title"><em></em></span>
|
256 |
-
<input type="hidden" class="regen" value="
|
|
|
|
|
|
|
|
|
257 |
'show_in_edit' => true,
|
258 |
'show_in_modal' => false,
|
259 |
);
|
61 |
|
62 |
// Check the nonce
|
63 |
if ( ! wp_verify_nonce( $nonce, 'regen' ) ) {
|
64 |
+
SIS_Admin_Main::display_json( array( 'error' => __( 'Trying to cheat ?', 'simple-image-sizes' ) ) );
|
65 |
}
|
66 |
|
67 |
// Get the id
|
68 |
$id = isset( $_POST['id'] ) ? $_POST['id'] : 0;
|
69 |
+
SIS_Admin_Main::display_json( SIS_Admin_Main::thumbnail_rebuild( $id, $thumbnails ) );
|
70 |
}
|
71 |
|
72 |
/**
|
159 |
// Get options
|
160 |
$sizes_custom = get_option( SIS_OPTION, array() );
|
161 |
// init size array
|
162 |
+
$add_sizes = array();
|
163 |
|
164 |
// check there is custom sizes
|
165 |
if ( is_array( $sizes_custom ) && ! empty( $sizes_custom ) ) {
|
166 |
foreach ( $sizes_custom as $key => $value ) {
|
167 |
// If we show this size in the admin
|
168 |
if ( isset( $value['s'] ) && 1 == $value['s'] ) {
|
169 |
+
$add_sizes[ $key ] = self::_get_thumbnail_name( $key );
|
170 |
}
|
171 |
}
|
172 |
}
|
173 |
|
174 |
// Merge the two array
|
175 |
+
$new_sizes = array_merge( $sizes, $add_sizes );
|
176 |
|
177 |
// Add new size
|
178 |
+
return $new_sizes;
|
179 |
}
|
180 |
|
181 |
/**
|
221 |
return $actions;
|
222 |
}
|
223 |
// Add action for regeneration
|
224 |
+
$actions['sis-regenerate'] = sprintf( "<a href='#' data-id='%s' class='sis-regenerate-one'>%s</a>", esc_attr( $object->ID ), esc_html__( 'Regenerate thumbnails', 'simple-image-sizes' ) );
|
225 |
|
226 |
// Return actions
|
227 |
return $actions;
|
249 |
$fields['sis-regenerate'] = array(
|
250 |
'label' => __( 'Regenerate Thumbnails', 'simple-image-sizes' ),
|
251 |
'input' => 'html',
|
252 |
+
'html' => sprintf( '
|
253 |
+
<input type="button" data-id="%s" class="button title sis-regenerate-one" value="%s" />
|
254 |
<span class="spinner"></span>
|
255 |
<span class="title"><em></em></span>
|
256 |
+
<input type="hidden" class="regen" value="%s" />',
|
257 |
+
esc_attr( $post->ID ),
|
258 |
+
esc_attr__( 'Regenerate Thumbnails', 'simple-image-sizes' ),
|
259 |
+
wp_create_nonce( 'regen' )
|
260 |
+
),
|
261 |
'show_in_edit' => true,
|
262 |
'show_in_modal' => false,
|
263 |
);
|
classes/main.php
CHANGED
@@ -7,7 +7,7 @@ Class SIS_Client {
|
|
7 |
|
8 |
function __construct() {
|
9 |
// Make new image sizes
|
10 |
-
add_action( '
|
11 |
|
12 |
// Add translation
|
13 |
add_action( 'init', array( __CLASS__, 'init_translation' ), 2 );
|
7 |
|
8 |
function __construct() {
|
9 |
// Make new image sizes
|
10 |
+
add_action( 'init', array( __CLASS__, 'after_setup_theme' ), 1 );
|
11 |
|
12 |
// Add translation
|
13 |
add_action( 'init', array( __CLASS__, 'init_translation' ), 2 );
|
languages/simple-image-sizes-fr_FR.mo
CHANGED
Binary file
|
languages/simple-image-sizes-fr_FR.po
CHANGED
@@ -5,8 +5,8 @@ msgstr ""
|
|
5 |
"Project-Id-Version: Simple image sizes\n"
|
6 |
"Report-Msgid-Bugs-To: \n"
|
7 |
"POT-Creation-Date: 2014-04-20 15:24+0100\n"
|
8 |
-
"PO-Revision-Date:
|
9 |
-
"Last-Translator: Nicolas Juen <
|
10 |
"Language-Team: Beapi <njuen@beapi.fr>\n"
|
11 |
"Language: fr_FR\n"
|
12 |
"MIME-Version: 1.0\n"
|
@@ -15,145 +15,206 @@ msgstr ""
|
|
15 |
"X-Poedit-SourceCharset: utf-8\n"
|
16 |
"X-Poedit-KeywordsList: __;_e;__\n"
|
17 |
"X-Poedit-Basepath: ../\n"
|
18 |
-
"X-Generator: Poedit 1.
|
19 |
"X-Poedit-SearchPath-0: .\n"
|
20 |
|
21 |
-
#:
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
22 |
msgid "Reading attachments..."
|
23 |
msgstr "Chargement des médias..."
|
24 |
|
25 |
-
#: classes/admin/main.php:
|
26 |
msgid "Maximum width"
|
27 |
msgstr "Largeur maximum"
|
28 |
|
29 |
-
#: classes/admin/main.php:
|
30 |
msgid "Maximum height"
|
31 |
msgstr "Hauteur maximum"
|
32 |
|
33 |
-
#: classes/admin/main.php:
|
34 |
msgid "Crop"
|
35 |
msgstr "Rogner"
|
36 |
|
37 |
-
#: classes/admin/main.php:
|
38 |
msgid "yes"
|
39 |
msgstr "oui"
|
40 |
|
41 |
-
#: classes/admin/main.php:
|
42 |
msgid "no"
|
43 |
msgstr "non"
|
44 |
|
45 |
-
#: classes/admin/main.php:
|
46 |
msgid "Show in post insertion ?"
|
47 |
msgstr "Afficher dans l'insertion ?"
|
48 |
|
49 |
-
#: classes/admin/main.php:
|
50 |
msgid " of "
|
51 |
msgstr " de "
|
52 |
|
53 |
-
#: classes/admin/main.php:
|
54 |
msgid " or "
|
55 |
msgstr " ou "
|
56 |
|
57 |
-
#: classes/admin/main.php:
|
58 |
msgid " before the end."
|
59 |
msgstr " avant la fin."
|
60 |
|
61 |
-
#: classes/admin/main.php:
|
62 |
msgid "Delete"
|
63 |
msgstr "Supprimer"
|
64 |
|
65 |
-
#: classes/admin/main.php:
|
66 |
msgid "No media in your site to regenerate !"
|
67 |
msgstr "Pas de médias à regénérer !"
|
68 |
|
69 |
-
#: classes/admin/main.php:
|
70 |
msgid "Regenerating "
|
71 |
msgstr "Regénération "
|
72 |
|
73 |
-
#: classes/admin/main.php:
|
74 |
msgid "Regenerate "
|
75 |
msgstr "Regénérer "
|
76 |
|
77 |
-
#: classes/admin/main.php:
|
78 |
msgid "Validate image size name"
|
79 |
msgstr "Valider le nom de la taille d'image"
|
80 |
|
81 |
-
#: classes/admin/main.php:
|
82 |
msgid "Done."
|
83 |
msgstr "Fini."
|
84 |
|
85 |
-
#: classes/admin/main.php:
|
86 |
msgid "Size"
|
87 |
msgstr "Taille "
|
88 |
|
89 |
-
#: classes/admin/main.php:
|
90 |
msgid ""
|
91 |
-
"Don't use the basic
|
92 |
"edit them"
|
93 |
msgstr ""
|
94 |
"N'utilisez pas les tailles par défaut de WordPress comme nom de taille, "
|
95 |
"éditez leurs valeurs avec le formulaire ci-dessus."
|
96 |
|
97 |
-
#: classes/admin/main.php:
|
98 |
msgid "This size is already registered, edit it instead of recreating it."
|
99 |
msgstr "Cette taille existe déjà, éditez la au lieu de la recréer."
|
100 |
|
101 |
-
#: classes/admin/main.php:
|
102 |
msgid "Do you really want to delete these size ?"
|
103 |
msgstr "Voulez-vous réellement supprimer cette taille ?"
|
104 |
|
105 |
-
#: classes/admin/main.php:
|
106 |
msgid "Update"
|
107 |
msgstr "Mettre à jour"
|
108 |
|
109 |
-
#: classes/admin/main.php:
|
110 |
msgid "Error requesting page"
|
111 |
msgstr "Erreur lors de la requête vers la page"
|
112 |
|
113 |
-
#: classes/admin/main.php:
|
114 |
msgid "images have been regenerated !"
|
115 |
msgstr "images ont été regénérées !"
|
116 |
|
117 |
-
#: classes/admin/main.php:
|
118 |
msgid "Validate"
|
119 |
msgstr "Valider"
|
120 |
|
121 |
-
#: classes/admin/main.php:
|
122 |
msgid " started at"
|
123 |
msgstr " commencé à "
|
124 |
|
125 |
-
#: classes/admin/main.php:
|
126 |
msgid "Public name"
|
127 |
msgstr "Nom public"
|
128 |
|
129 |
-
#: classes/admin/main.php:
|
130 |
msgid " finished at :"
|
131 |
msgstr " terminé à :"
|
132 |
|
133 |
-
#: classes/admin/main.php:
|
134 |
msgid ""
|
135 |
"Error during the php treatment, be sure to not have php errors in your page"
|
136 |
msgstr ""
|
137 |
"Erreur durant le traitement, soyez sûr de ne pas avoir d'erreurs php dans "
|
138 |
"votre page"
|
139 |
|
140 |
-
#: classes/admin/main.php:
|
141 |
-
msgid "All the sizes you have
|
142 |
msgstr ""
|
143 |
"Toutes les tailles qui ont été modifiée n'ont pas été sauvées, continuer "
|
144 |
"tout de même ?"
|
145 |
|
146 |
-
#: classes/admin/main.php:
|
147 |
-
#, php-format
|
148 |
msgid "This image has been regenerated in %s seconds"
|
149 |
msgstr "Cette image a été regénérée en %s secondes"
|
150 |
|
151 |
-
#: classes/admin/main.php:
|
152 |
msgid "No id given in POST datas."
|
153 |
msgstr "Pas d'id donné dans les données du POST."
|
154 |
|
155 |
-
#: classes/admin/main.php:
|
156 |
-
#, php-format
|
157 |
msgid ""
|
158 |
"This file already exists in this size and have not been regenerated :<br/><a "
|
159 |
"target=\"_blank\" href=\"%1$s\" >%2$s</a>"
|
@@ -161,8 +222,7 @@ msgstr ""
|
|
161 |
"Ce fichier existe déjà dans cette ces tailles d'image et n'a pas été "
|
162 |
"regénéré :<br/><a target=\"_blank\" href=\"%1$s\" >%2$s</a>"
|
163 |
|
164 |
-
#: classes/admin/main.php:
|
165 |
-
#, php-format
|
166 |
msgid ""
|
167 |
"This file does not exists and have not been regenerated :<br/><a target="
|
168 |
"\"_blank\" href=\"%1$s\" >%2$s</a>"
|
@@ -170,56 +230,63 @@ msgstr ""
|
|
170 |
"Ce fichier existe déjà dans cette ces tailles d'image et n'a pas été "
|
171 |
"regénéré :<br/><a target=\"_blank\" href=\"%1$s\" >%2$s</a>"
|
172 |
|
173 |
-
#: classes/admin/main.php:
|
174 |
msgid "Left"
|
175 |
msgstr "Gauche"
|
176 |
|
177 |
-
#: classes/admin/main.php:
|
178 |
msgid "Center"
|
179 |
msgstr "Centre"
|
180 |
|
181 |
-
#: classes/admin/main.php:
|
182 |
msgid "Right"
|
183 |
msgstr "Droite"
|
184 |
|
185 |
-
#: classes/admin/main.php:
|
186 |
msgid "top"
|
187 |
msgstr "haut"
|
188 |
|
189 |
-
#: classes/admin/main.php:
|
190 |
msgid "center"
|
191 |
msgstr "centre"
|
192 |
|
193 |
-
#: classes/admin/main.php:
|
194 |
msgid "bottom"
|
195 |
msgstr "bas"
|
196 |
|
197 |
-
#: classes/admin/media.php:
|
198 |
msgid "Settings"
|
199 |
msgstr "Paramètres"
|
200 |
|
201 |
-
#: classes/admin/media.php:
|
202 |
-
#, php-format
|
203 |
msgid "%s size"
|
204 |
msgstr "Taille %s"
|
205 |
|
206 |
-
#: classes/admin/media.php:
|
207 |
msgid "Add a new size"
|
208 |
msgstr "Ajouter une nouvelle taille"
|
209 |
|
210 |
-
#: classes/admin/media.php:
|
211 |
msgid "Get php for theme"
|
212 |
msgstr "Récupérer le PHP pour le thème"
|
213 |
|
214 |
-
#: classes/admin/media.php:
|
215 |
msgid "Thumbnail regeneration"
|
216 |
msgstr "Régénération des vignettes"
|
217 |
|
218 |
-
#: classes/admin/media.php:
|
219 |
msgid "Cropping"
|
220 |
msgstr "Rognage"
|
221 |
|
222 |
-
#: classes/admin/media.php:
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
223 |
msgid ""
|
224 |
"Copy and paste the code below into your Wordpress theme function file if you "
|
225 |
"wanted to save them and deactivate the plugin."
|
@@ -227,73 +294,14 @@ msgstr ""
|
|
227 |
"Copiez et collez le code ci-dessous dans votre fichier de fonctions de votre "
|
228 |
"thème WordPress si vous voulez les conserver et désactiver ce plugin."
|
229 |
|
230 |
-
#: classes/admin/media.php:
|
231 |
-
msgid "
|
232 |
-
msgstr "
|
233 |
|
234 |
-
#: classes/admin/media.php:
|
235 |
msgid "Regeneration ended"
|
236 |
msgstr "Regénération terminée"
|
237 |
|
238 |
-
#: classes/admin/post.php:216
|
239 |
-
msgid "Regenerate thumbnails"
|
240 |
-
msgstr "Régénérer les vignettes"
|
241 |
-
|
242 |
-
#: classes/admin/post.php:240 classes/admin/post.php:243
|
243 |
-
#: templates/options-media.php:138
|
244 |
-
msgid "Regenerate Thumbnails"
|
245 |
-
msgstr "Régénérer les vignettes"
|
246 |
-
|
247 |
-
#: templates/options-media.php:10
|
248 |
-
msgid "Select which thumbnails you want to rebuild:"
|
249 |
-
msgstr "Sélectionnez les tailles de vignettes à régénérer"
|
250 |
-
|
251 |
-
#: templates/options-media.php:15 templates/options-media.php:67
|
252 |
-
msgid "Size name"
|
253 |
-
msgstr "Nom de la taille"
|
254 |
-
|
255 |
-
#: templates/options-media.php:16 templates/options-media.php:68
|
256 |
-
msgid "Width"
|
257 |
-
msgstr "Largeur"
|
258 |
-
|
259 |
-
#: templates/options-media.php:17 templates/options-media.php:69
|
260 |
-
msgid "Height"
|
261 |
-
msgstr "Hauteur"
|
262 |
-
|
263 |
-
#: templates/options-media.php:18 templates/options-media.php:70
|
264 |
-
msgid "Crop ?"
|
265 |
-
msgstr "Rogner ?"
|
266 |
-
|
267 |
-
#: templates/options-media.php:39
|
268 |
-
msgid "Yes"
|
269 |
-
msgstr "Oui"
|
270 |
-
|
271 |
-
#: templates/options-media.php:39
|
272 |
-
msgid "No"
|
273 |
-
msgstr "Non"
|
274 |
-
|
275 |
-
#: templates/options-media.php:75
|
276 |
-
msgid "Select which post type source thumbnails you want to rebuild:"
|
277 |
-
msgstr ""
|
278 |
-
"Sélectionnez quelles vignettes de quel type de contenu vous souhaitez "
|
279 |
-
"régénérer : "
|
280 |
-
|
281 |
-
#: templates/options-media.php:80 templates/options-media.php:107
|
282 |
-
msgid "Post type"
|
283 |
-
msgstr "Type de contenu"
|
284 |
-
|
285 |
-
#: templates/options-media.php:126
|
286 |
-
msgid "End time calculated :"
|
287 |
-
msgstr "Fin du traitement calculé :"
|
288 |
-
|
289 |
-
#: templates/options-media.php:126
|
290 |
-
msgid "Calculating..."
|
291 |
-
msgstr "Calcul en cours..."
|
292 |
-
|
293 |
-
#: templates/options-media.php:137
|
294 |
-
msgid "Last image:"
|
295 |
-
msgstr "Dernière image :"
|
296 |
-
|
297 |
#~ msgid "Legend of the sizes"
|
298 |
#~ msgstr "Légende des tailles"
|
299 |
|
@@ -312,11 +320,5 @@ msgstr "Dernière image :"
|
|
312 |
#~ msgid "Theme size"
|
313 |
#~ msgstr "Taille de thème"
|
314 |
|
315 |
-
#~ msgid "Add a new size of thumbnail"
|
316 |
-
#~ msgstr "Ajouter une nouvelle taille de vignette"
|
317 |
-
|
318 |
-
#~ msgid "Get the PHP for the theme"
|
319 |
-
#~ msgstr "Récupérer le PHP pour le thème"
|
320 |
-
|
321 |
#~ msgid "Resize ?"
|
322 |
#~ msgstr "Regénérer ?"
|
5 |
"Project-Id-Version: Simple image sizes\n"
|
6 |
"Report-Msgid-Bugs-To: \n"
|
7 |
"POT-Creation-Date: 2014-04-20 15:24+0100\n"
|
8 |
+
"PO-Revision-Date: 2015-08-20 14:35+0100\n"
|
9 |
+
"Last-Translator: Nicolas Juen <njuen@beapi.fr>\n"
|
10 |
"Language-Team: Beapi <njuen@beapi.fr>\n"
|
11 |
"Language: fr_FR\n"
|
12 |
"MIME-Version: 1.0\n"
|
15 |
"X-Poedit-SourceCharset: utf-8\n"
|
16 |
"X-Poedit-KeywordsList: __;_e;__\n"
|
17 |
"X-Poedit-Basepath: ../\n"
|
18 |
+
"X-Generator: Poedit 1.7.5\n"
|
19 |
"X-Poedit-SearchPath-0: .\n"
|
20 |
|
21 |
+
#: templates/options-media.php:10
|
22 |
+
msgid "Select which thumbnails you want to rebuild:"
|
23 |
+
msgstr "Sélectionnez les tailles de vignettes à régénérer"
|
24 |
+
|
25 |
+
#: templates/options-media.php:17 templates/options-media.php:73
|
26 |
+
msgid "Size name"
|
27 |
+
msgstr "Nom de la taille"
|
28 |
+
|
29 |
+
#: templates/options-media.php:18 templates/options-media.php:74
|
30 |
+
msgid "Width"
|
31 |
+
msgstr "Largeur"
|
32 |
+
|
33 |
+
#: templates/options-media.php:19 templates/options-media.php:75
|
34 |
+
msgid "Height"
|
35 |
+
msgstr "Hauteur"
|
36 |
+
|
37 |
+
#: templates/options-media.php:20 templates/options-media.php:76
|
38 |
+
msgid "Crop ?"
|
39 |
+
msgstr "Rogner ?"
|
40 |
+
|
41 |
+
#: templates/options-media.php:42 classes/admin/main.php:183
|
42 |
+
msgid "Yes"
|
43 |
+
msgstr "Oui"
|
44 |
+
|
45 |
+
#: templates/options-media.php:42 classes/admin/main.php:182
|
46 |
+
msgid "No"
|
47 |
+
msgstr "Non"
|
48 |
+
|
49 |
+
#: templates/options-media.php:81
|
50 |
+
msgid "Select which post type source thumbnails you want to rebuild:"
|
51 |
+
msgstr ""
|
52 |
+
"Sélectionnez quelles vignettes de quel type de contenu vous souhaitez "
|
53 |
+
"régénérer : "
|
54 |
+
|
55 |
+
#: templates/options-media.php:88 templates/options-media.php:119
|
56 |
+
msgid "Post type"
|
57 |
+
msgstr "Type de contenu"
|
58 |
+
|
59 |
+
#: templates/options-media.php:138
|
60 |
+
msgid "End time calculated :"
|
61 |
+
msgstr "Fin du traitement calculé :"
|
62 |
+
|
63 |
+
#: templates/options-media.php:139
|
64 |
+
msgid "Calculating..."
|
65 |
+
msgstr "Calcul en cours..."
|
66 |
+
|
67 |
+
#: templates/options-media.php:150
|
68 |
+
msgid "Last image:"
|
69 |
+
msgstr "Dernière image :"
|
70 |
+
|
71 |
+
#: templates/options-media.php:152 classes/admin/post.php:250
|
72 |
+
#: classes/admin/post.php:258
|
73 |
+
msgid "Regenerate Thumbnails"
|
74 |
+
msgstr "Régénérer les vignettes"
|
75 |
+
|
76 |
+
#: classes/admin/post.php:64 classes/admin/media.php:474
|
77 |
+
msgid "Trying to cheat ?"
|
78 |
+
msgstr "Cheater ?"
|
79 |
+
|
80 |
+
#: classes/admin/post.php:224
|
81 |
+
msgid "Regenerate thumbnails"
|
82 |
+
msgstr "Régénérer les vignettes"
|
83 |
+
|
84 |
+
#: classes/admin/main.php:44
|
85 |
msgid "Reading attachments..."
|
86 |
msgstr "Chargement des médias..."
|
87 |
|
88 |
+
#: classes/admin/main.php:45 classes/admin/media.php:171
|
89 |
msgid "Maximum width"
|
90 |
msgstr "Largeur maximum"
|
91 |
|
92 |
+
#: classes/admin/main.php:46 classes/admin/media.php:178
|
93 |
msgid "Maximum height"
|
94 |
msgstr "Hauteur maximum"
|
95 |
|
96 |
+
#: classes/admin/main.php:47
|
97 |
msgid "Crop"
|
98 |
msgstr "Rogner"
|
99 |
|
100 |
+
#: classes/admin/main.php:48
|
101 |
msgid "yes"
|
102 |
msgstr "oui"
|
103 |
|
104 |
+
#: classes/admin/main.php:49
|
105 |
msgid "no"
|
106 |
msgstr "non"
|
107 |
|
108 |
+
#: classes/admin/main.php:50 classes/admin/media.php:208
|
109 |
msgid "Show in post insertion ?"
|
110 |
msgstr "Afficher dans l'insertion ?"
|
111 |
|
112 |
+
#: classes/admin/main.php:51
|
113 |
msgid " of "
|
114 |
msgstr " de "
|
115 |
|
116 |
+
#: classes/admin/main.php:52
|
117 |
msgid " or "
|
118 |
msgstr " ou "
|
119 |
|
120 |
+
#: classes/admin/main.php:53
|
121 |
msgid " before the end."
|
122 |
msgstr " avant la fin."
|
123 |
|
124 |
+
#: classes/admin/main.php:54 classes/admin/media.php:210
|
125 |
msgid "Delete"
|
126 |
msgstr "Supprimer"
|
127 |
|
128 |
+
#: classes/admin/main.php:55
|
129 |
msgid "No media in your site to regenerate !"
|
130 |
msgstr "Pas de médias à regénérer !"
|
131 |
|
132 |
+
#: classes/admin/main.php:56
|
133 |
msgid "Regenerating "
|
134 |
msgstr "Regénération "
|
135 |
|
136 |
+
#: classes/admin/main.php:57
|
137 |
msgid "Regenerate "
|
138 |
msgstr "Regénérer "
|
139 |
|
140 |
+
#: classes/admin/main.php:58
|
141 |
msgid "Validate image size name"
|
142 |
msgstr "Valider le nom de la taille d'image"
|
143 |
|
144 |
+
#: classes/admin/main.php:59
|
145 |
msgid "Done."
|
146 |
msgstr "Fini."
|
147 |
|
148 |
+
#: classes/admin/main.php:60
|
149 |
msgid "Size"
|
150 |
msgstr "Taille "
|
151 |
|
152 |
+
#: classes/admin/main.php:61
|
153 |
msgid ""
|
154 |
+
"Don't use the basic WordPress thumbnail size name, use the form above to "
|
155 |
"edit them"
|
156 |
msgstr ""
|
157 |
"N'utilisez pas les tailles par défaut de WordPress comme nom de taille, "
|
158 |
"éditez leurs valeurs avec le formulaire ci-dessus."
|
159 |
|
160 |
+
#: classes/admin/main.php:62
|
161 |
msgid "This size is already registered, edit it instead of recreating it."
|
162 |
msgstr "Cette taille existe déjà, éditez la au lieu de la recréer."
|
163 |
|
164 |
+
#: classes/admin/main.php:63
|
165 |
msgid "Do you really want to delete these size ?"
|
166 |
msgstr "Voulez-vous réellement supprimer cette taille ?"
|
167 |
|
168 |
+
#: classes/admin/main.php:64 classes/admin/media.php:211
|
169 |
msgid "Update"
|
170 |
msgstr "Mettre à jour"
|
171 |
|
172 |
+
#: classes/admin/main.php:65
|
173 |
msgid "Error requesting page"
|
174 |
msgstr "Erreur lors de la requête vers la page"
|
175 |
|
176 |
+
#: classes/admin/main.php:66
|
177 |
msgid "images have been regenerated !"
|
178 |
msgstr "images ont été regénérées !"
|
179 |
|
180 |
+
#: classes/admin/main.php:67
|
181 |
msgid "Validate"
|
182 |
msgstr "Valider"
|
183 |
|
184 |
+
#: classes/admin/main.php:68
|
185 |
msgid " started at"
|
186 |
msgstr " commencé à "
|
187 |
|
188 |
+
#: classes/admin/main.php:69 classes/admin/media.php:185
|
189 |
msgid "Public name"
|
190 |
msgstr "Nom public"
|
191 |
|
192 |
+
#: classes/admin/main.php:70
|
193 |
msgid " finished at :"
|
194 |
msgstr " terminé à :"
|
195 |
|
196 |
+
#: classes/admin/main.php:71
|
197 |
msgid ""
|
198 |
"Error during the php treatment, be sure to not have php errors in your page"
|
199 |
msgstr ""
|
200 |
"Erreur durant le traitement, soyez sûr de ne pas avoir d'erreurs php dans "
|
201 |
"votre page"
|
202 |
|
203 |
+
#: classes/admin/main.php:72
|
204 |
+
msgid "All the sizes you have modified are not saved, continue anyway ?"
|
205 |
msgstr ""
|
206 |
"Toutes les tailles qui ont été modifiée n'ont pas été sauvées, continuer "
|
207 |
"tout de même ?"
|
208 |
|
209 |
+
#: classes/admin/main.php:73
|
|
|
210 |
msgid "This image has been regenerated in %s seconds"
|
211 |
msgstr "Cette image a été regénérée en %s secondes"
|
212 |
|
213 |
+
#: classes/admin/main.php:96
|
214 |
msgid "No id given in POST datas."
|
215 |
msgstr "Pas d'id donné dans les données du POST."
|
216 |
|
217 |
+
#: classes/admin/main.php:109
|
|
|
218 |
msgid ""
|
219 |
"This file already exists in this size and have not been regenerated :<br/><a "
|
220 |
"target=\"_blank\" href=\"%1$s\" >%2$s</a>"
|
222 |
"Ce fichier existe déjà dans cette ces tailles d'image et n'a pas été "
|
223 |
"regénéré :<br/><a target=\"_blank\" href=\"%1$s\" >%2$s</a>"
|
224 |
|
225 |
+
#: classes/admin/main.php:116
|
|
|
226 |
msgid ""
|
227 |
"This file does not exists and have not been regenerated :<br/><a target="
|
228 |
"\"_blank\" href=\"%1$s\" >%2$s</a>"
|
230 |
"Ce fichier existe déjà dans cette ces tailles d'image et n'a pas été "
|
231 |
"regénéré :<br/><a target=\"_blank\" href=\"%1$s\" >%2$s</a>"
|
232 |
|
233 |
+
#: classes/admin/main.php:167
|
234 |
msgid "Left"
|
235 |
msgstr "Gauche"
|
236 |
|
237 |
+
#: classes/admin/main.php:168
|
238 |
msgid "Center"
|
239 |
msgstr "Centre"
|
240 |
|
241 |
+
#: classes/admin/main.php:169
|
242 |
msgid "Right"
|
243 |
msgstr "Droite"
|
244 |
|
245 |
+
#: classes/admin/main.php:173
|
246 |
msgid "top"
|
247 |
msgstr "haut"
|
248 |
|
249 |
+
#: classes/admin/main.php:174
|
250 |
msgid "center"
|
251 |
msgstr "centre"
|
252 |
|
253 |
+
#: classes/admin/main.php:175
|
254 |
msgid "bottom"
|
255 |
msgstr "bas"
|
256 |
|
257 |
+
#: classes/admin/media.php:67
|
258 |
msgid "Settings"
|
259 |
msgstr "Paramètres"
|
260 |
|
261 |
+
#: classes/admin/media.php:107
|
|
|
262 |
msgid "%s size"
|
263 |
msgstr "Taille %s"
|
264 |
|
265 |
+
#: classes/admin/media.php:117
|
266 |
msgid "Add a new size"
|
267 |
msgstr "Ajouter une nouvelle taille"
|
268 |
|
269 |
+
#: classes/admin/media.php:123
|
270 |
msgid "Get php for theme"
|
271 |
msgstr "Récupérer le PHP pour le thème"
|
272 |
|
273 |
+
#: classes/admin/media.php:129
|
274 |
msgid "Thumbnail regeneration"
|
275 |
msgstr "Régénération des vignettes"
|
276 |
|
277 |
+
#: classes/admin/media.php:192
|
278 |
msgid "Cropping"
|
279 |
msgstr "Rognage"
|
280 |
|
281 |
+
#: classes/admin/media.php:226
|
282 |
+
msgid "Add a new size of thumbnail"
|
283 |
+
msgstr "Ajouter une nouvelle taille de vignette"
|
284 |
+
|
285 |
+
#: classes/admin/media.php:239
|
286 |
+
msgid "Get the PHP for the theme"
|
287 |
+
msgstr "Récupérer le PHP pour le thème"
|
288 |
+
|
289 |
+
#: classes/admin/media.php:240
|
290 |
msgid ""
|
291 |
"Copy and paste the code below into your Wordpress theme function file if you "
|
292 |
"wanted to save them and deactivate the plugin."
|
294 |
"Copiez et collez le code ci-dessous dans votre fichier de fonctions de votre "
|
295 |
"thème WordPress si vous voulez les conserver et désactiver ce plugin."
|
296 |
|
297 |
+
#: classes/admin/media.php:256
|
298 |
+
msgid "Admin option-media template missing"
|
299 |
+
msgstr "Template d'affichage admin manquant"
|
300 |
|
301 |
+
#: classes/admin/media.php:521
|
302 |
msgid "Regeneration ended"
|
303 |
msgstr "Regénération terminée"
|
304 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
305 |
#~ msgid "Legend of the sizes"
|
306 |
#~ msgstr "Légende des tailles"
|
307 |
|
320 |
#~ msgid "Theme size"
|
321 |
#~ msgstr "Taille de thème"
|
322 |
|
|
|
|
|
|
|
|
|
|
|
|
|
323 |
#~ msgid "Resize ?"
|
324 |
#~ msgstr "Regénérer ?"
|
languages/simple-image-sizes.pot
CHANGED
@@ -1,4 +1,4 @@
|
|
1 |
-
# Copyright (C) 2010
|
2 |
# This file is distributed under the same license as the package.
|
3 |
msgid ""
|
4 |
msgstr ""
|
@@ -11,286 +11,264 @@ msgstr ""
|
|
11 |
"MIME-Version: 1.0\n"
|
12 |
"Content-Type: text/plain; charset=UTF-8\n"
|
13 |
"Content-Transfer-Encoding: 8bit\n"
|
14 |
-
"X-Poedit-Basepath: .\n"
|
15 |
-
"X-Poedit-KeywordsList: esc_attr_e;esc_html_e;esc_attr__;esc_html__;_e;__\n"
|
16 |
-
"X-Generator: Poedit 1.6.3\n"
|
17 |
-
"X-Poedit-SearchPath-0: ..\n"
|
18 |
|
19 |
-
#:
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
20 |
msgid "Reading attachments..."
|
21 |
msgstr ""
|
22 |
|
23 |
-
#:
|
24 |
msgid "Maximum width"
|
25 |
msgstr ""
|
26 |
|
27 |
-
#:
|
28 |
msgid "Maximum height"
|
29 |
msgstr ""
|
30 |
|
31 |
-
#:
|
32 |
msgid "Crop"
|
33 |
msgstr ""
|
34 |
|
35 |
-
#:
|
36 |
msgid "yes"
|
37 |
msgstr ""
|
38 |
|
39 |
-
#:
|
40 |
msgid "no"
|
41 |
msgstr ""
|
42 |
|
43 |
-
#:
|
44 |
msgid "Show in post insertion ?"
|
45 |
msgstr ""
|
46 |
|
47 |
-
#:
|
48 |
msgid " of "
|
49 |
msgstr ""
|
50 |
|
51 |
-
#:
|
52 |
msgid " or "
|
53 |
msgstr ""
|
54 |
|
55 |
-
#:
|
56 |
msgid " before the end."
|
57 |
msgstr ""
|
58 |
|
59 |
-
#:
|
60 |
msgid "Delete"
|
61 |
msgstr ""
|
62 |
|
63 |
-
#:
|
64 |
msgid "No media in your site to regenerate !"
|
65 |
msgstr ""
|
66 |
|
67 |
-
#:
|
68 |
msgid "Regenerating "
|
69 |
msgstr ""
|
70 |
|
71 |
-
#:
|
72 |
msgid "Regenerate "
|
73 |
msgstr ""
|
74 |
|
75 |
-
#:
|
76 |
msgid "Validate image size name"
|
77 |
msgstr ""
|
78 |
|
79 |
-
#:
|
80 |
msgid "Done."
|
81 |
msgstr ""
|
82 |
|
83 |
-
#:
|
84 |
msgid "Size"
|
85 |
msgstr ""
|
86 |
|
87 |
-
#:
|
88 |
-
msgid ""
|
89 |
-
"Don't use the basic Wordpress thumbnail size name, use the form above to "
|
90 |
-
"edit them"
|
91 |
msgstr ""
|
92 |
|
93 |
-
#:
|
94 |
msgid "This size is already registered, edit it instead of recreating it."
|
95 |
msgstr ""
|
96 |
|
97 |
-
#:
|
98 |
msgid "Do you really want to delete these size ?"
|
99 |
msgstr ""
|
100 |
|
101 |
-
#:
|
102 |
msgid "Update"
|
103 |
msgstr ""
|
104 |
|
105 |
-
#:
|
106 |
msgid "Error requesting page"
|
107 |
msgstr ""
|
108 |
|
109 |
-
#:
|
110 |
msgid "images have been regenerated !"
|
111 |
msgstr ""
|
112 |
|
113 |
-
#:
|
114 |
msgid "Validate"
|
115 |
msgstr ""
|
116 |
|
117 |
-
#:
|
118 |
msgid " started at"
|
119 |
msgstr ""
|
120 |
|
121 |
-
#:
|
122 |
msgid "Public name"
|
123 |
msgstr ""
|
124 |
|
125 |
-
#:
|
126 |
msgid " finished at :"
|
127 |
msgstr ""
|
128 |
|
129 |
-
#:
|
130 |
-
msgid ""
|
131 |
-
"Error during the php treatment, be sure to not have php errors in your page"
|
132 |
msgstr ""
|
133 |
|
134 |
-
#:
|
135 |
-
msgid "All the sizes you have
|
136 |
msgstr ""
|
137 |
|
138 |
-
#:
|
139 |
-
#, php-format
|
140 |
msgid "This image has been regenerated in %s seconds"
|
141 |
msgstr ""
|
142 |
|
143 |
-
#:
|
144 |
msgid "No id given in POST datas."
|
145 |
msgstr ""
|
146 |
|
147 |
-
#:
|
148 |
-
|
149 |
-
msgid ""
|
150 |
-
"This file already exists in this size and have not been regenerated :<br/><a "
|
151 |
-
"target=\"_blank\" href=\"%1$s\" >%2$s</a>"
|
152 |
msgstr ""
|
153 |
|
154 |
-
#:
|
155 |
-
|
156 |
-
msgid ""
|
157 |
-
"This file does not exists and have not been regenerated :<br/><a target="
|
158 |
-
"\"_blank\" href=\"%1$s\" >%2$s</a>"
|
159 |
msgstr ""
|
160 |
|
161 |
-
#:
|
162 |
msgid "Left"
|
163 |
msgstr ""
|
164 |
|
165 |
-
#:
|
166 |
msgid "Center"
|
167 |
msgstr ""
|
168 |
|
169 |
-
#:
|
170 |
msgid "Right"
|
171 |
msgstr ""
|
172 |
|
173 |
-
#:
|
174 |
msgid "top"
|
175 |
msgstr ""
|
176 |
|
177 |
-
#:
|
178 |
msgid "center"
|
179 |
msgstr ""
|
180 |
|
181 |
-
#:
|
182 |
msgid "bottom"
|
183 |
msgstr ""
|
184 |
|
185 |
-
#:
|
186 |
msgid "Settings"
|
187 |
msgstr ""
|
188 |
|
189 |
-
#:
|
190 |
-
#, php-format
|
191 |
msgid "%s size"
|
192 |
msgstr ""
|
193 |
|
194 |
-
#:
|
195 |
msgid "Add a new size"
|
196 |
msgstr ""
|
197 |
|
198 |
-
#:
|
199 |
msgid "Get php for theme"
|
200 |
msgstr ""
|
201 |
|
202 |
-
#:
|
203 |
msgid "Thumbnail regeneration"
|
204 |
msgstr ""
|
205 |
|
206 |
-
#:
|
207 |
-
#: ../classes/admin/media.php:159
|
208 |
-
msgid "custom_image_sizes["
|
209 |
-
msgstr ""
|
210 |
-
|
211 |
-
#: ../classes/admin/media.php:166
|
212 |
msgid "Cropping"
|
213 |
msgstr ""
|
214 |
|
215 |
-
#:
|
216 |
-
msgid "No"
|
217 |
-
msgstr ""
|
218 |
-
|
219 |
-
#: ../classes/admin/media.php:169 ../templates/options-media.php:39
|
220 |
-
msgid "Yes"
|
221 |
-
msgstr ""
|
222 |
-
|
223 |
-
#: ../classes/admin/media.php:192
|
224 |
msgid "Add a new size of thumbnail"
|
225 |
msgstr ""
|
226 |
|
227 |
-
#:
|
228 |
msgid "Get the PHP for the theme"
|
229 |
msgstr ""
|
230 |
|
231 |
-
#:
|
232 |
-
msgid ""
|
233 |
-
"Copy and paste the code below into your Wordpress theme function file if you "
|
234 |
-
"wanted to save them and deactivate the plugin."
|
235 |
msgstr ""
|
236 |
|
237 |
-
#:
|
238 |
msgid "Admin option-media template missing"
|
239 |
msgstr ""
|
240 |
|
241 |
-
#:
|
242 |
-
msgid "Trying to cheat ?"
|
243 |
-
msgstr ""
|
244 |
-
|
245 |
-
#: ../classes/admin/media.php:472
|
246 |
msgid "Regeneration ended"
|
247 |
-
msgstr ""
|
248 |
-
|
249 |
-
#: ../classes/admin/post.php:216
|
250 |
-
msgid "Regenerate thumbnails"
|
251 |
-
msgstr ""
|
252 |
-
|
253 |
-
#: ../classes/admin/post.php:240 ../classes/admin/post.php:243
|
254 |
-
#: ../templates/options-media.php:138
|
255 |
-
msgid "Regenerate Thumbnails"
|
256 |
-
msgstr ""
|
257 |
-
|
258 |
-
#: ../templates/options-media.php:10
|
259 |
-
msgid "Select which thumbnails you want to rebuild:"
|
260 |
-
msgstr ""
|
261 |
-
|
262 |
-
#: ../templates/options-media.php:15 ../templates/options-media.php:67
|
263 |
-
msgid "Size name"
|
264 |
-
msgstr ""
|
265 |
-
|
266 |
-
#: ../templates/options-media.php:16 ../templates/options-media.php:68
|
267 |
-
msgid "Width"
|
268 |
-
msgstr ""
|
269 |
-
|
270 |
-
#: ../templates/options-media.php:17 ../templates/options-media.php:69
|
271 |
-
msgid "Height"
|
272 |
-
msgstr ""
|
273 |
-
|
274 |
-
#: ../templates/options-media.php:18 ../templates/options-media.php:70
|
275 |
-
msgid "Crop ?"
|
276 |
-
msgstr ""
|
277 |
-
|
278 |
-
#: ../templates/options-media.php:75
|
279 |
-
msgid "Select which post type source thumbnails you want to rebuild:"
|
280 |
-
msgstr ""
|
281 |
-
|
282 |
-
#: ../templates/options-media.php:80 ../templates/options-media.php:107
|
283 |
-
msgid "Post type"
|
284 |
-
msgstr ""
|
285 |
-
|
286 |
-
#: ../templates/options-media.php:126
|
287 |
-
msgid "End time calculated :"
|
288 |
-
msgstr ""
|
289 |
-
|
290 |
-
#: ../templates/options-media.php:126
|
291 |
-
msgid "Calculating..."
|
292 |
-
msgstr ""
|
293 |
-
|
294 |
-
#: ../templates/options-media.php:137
|
295 |
-
msgid "Last image:"
|
296 |
-
msgstr ""
|
1 |
+
# Copyright (C) 2010
|
2 |
# This file is distributed under the same license as the package.
|
3 |
msgid ""
|
4 |
msgstr ""
|
11 |
"MIME-Version: 1.0\n"
|
12 |
"Content-Type: text/plain; charset=UTF-8\n"
|
13 |
"Content-Transfer-Encoding: 8bit\n"
|
|
|
|
|
|
|
|
|
14 |
|
15 |
+
#: templates/options-media.php:10
|
16 |
+
msgid "Select which thumbnails you want to rebuild:"
|
17 |
+
msgstr ""
|
18 |
+
|
19 |
+
#: templates/options-media.php:17 templates/options-media.php:73
|
20 |
+
msgid "Size name"
|
21 |
+
msgstr ""
|
22 |
+
|
23 |
+
#: templates/options-media.php:18 templates/options-media.php:74
|
24 |
+
msgid "Width"
|
25 |
+
msgstr ""
|
26 |
+
|
27 |
+
#: templates/options-media.php:19 templates/options-media.php:75
|
28 |
+
msgid "Height"
|
29 |
+
msgstr ""
|
30 |
+
|
31 |
+
#: templates/options-media.php:20 templates/options-media.php:76
|
32 |
+
msgid "Crop ?"
|
33 |
+
msgstr ""
|
34 |
+
|
35 |
+
#: templates/options-media.php:42 classes/admin/main.php:183
|
36 |
+
msgid "Yes"
|
37 |
+
msgstr ""
|
38 |
+
|
39 |
+
#: templates/options-media.php:42 classes/admin/main.php:182
|
40 |
+
msgid "No"
|
41 |
+
msgstr ""
|
42 |
+
|
43 |
+
#: templates/options-media.php:81
|
44 |
+
msgid "Select which post type source thumbnails you want to rebuild:"
|
45 |
+
msgstr ""
|
46 |
+
|
47 |
+
#: templates/options-media.php:88 templates/options-media.php:119
|
48 |
+
msgid "Post type"
|
49 |
+
msgstr ""
|
50 |
+
|
51 |
+
#: templates/options-media.php:138
|
52 |
+
msgid "End time calculated :"
|
53 |
+
msgstr ""
|
54 |
+
|
55 |
+
#: templates/options-media.php:139
|
56 |
+
msgid "Calculating..."
|
57 |
+
msgstr ""
|
58 |
+
|
59 |
+
#: templates/options-media.php:150
|
60 |
+
msgid "Last image:"
|
61 |
+
msgstr ""
|
62 |
+
|
63 |
+
#: templates/options-media.php:152 classes/admin/post.php:250
|
64 |
+
#: classes/admin/post.php:258
|
65 |
+
msgid "Regenerate Thumbnails"
|
66 |
+
msgstr ""
|
67 |
+
|
68 |
+
#: classes/admin/post.php:64 classes/admin/media.php:474
|
69 |
+
msgid "Trying to cheat ?"
|
70 |
+
msgstr ""
|
71 |
+
|
72 |
+
#: classes/admin/post.php:224
|
73 |
+
msgid "Regenerate thumbnails"
|
74 |
+
msgstr ""
|
75 |
+
|
76 |
+
#: classes/admin/main.php:44
|
77 |
msgid "Reading attachments..."
|
78 |
msgstr ""
|
79 |
|
80 |
+
#: classes/admin/main.php:45 classes/admin/media.php:171
|
81 |
msgid "Maximum width"
|
82 |
msgstr ""
|
83 |
|
84 |
+
#: classes/admin/main.php:46 classes/admin/media.php:178
|
85 |
msgid "Maximum height"
|
86 |
msgstr ""
|
87 |
|
88 |
+
#: classes/admin/main.php:47
|
89 |
msgid "Crop"
|
90 |
msgstr ""
|
91 |
|
92 |
+
#: classes/admin/main.php:48
|
93 |
msgid "yes"
|
94 |
msgstr ""
|
95 |
|
96 |
+
#: classes/admin/main.php:49
|
97 |
msgid "no"
|
98 |
msgstr ""
|
99 |
|
100 |
+
#: classes/admin/main.php:50 classes/admin/media.php:208
|
101 |
msgid "Show in post insertion ?"
|
102 |
msgstr ""
|
103 |
|
104 |
+
#: classes/admin/main.php:51
|
105 |
msgid " of "
|
106 |
msgstr ""
|
107 |
|
108 |
+
#: classes/admin/main.php:52
|
109 |
msgid " or "
|
110 |
msgstr ""
|
111 |
|
112 |
+
#: classes/admin/main.php:53
|
113 |
msgid " before the end."
|
114 |
msgstr ""
|
115 |
|
116 |
+
#: classes/admin/main.php:54 classes/admin/media.php:210
|
117 |
msgid "Delete"
|
118 |
msgstr ""
|
119 |
|
120 |
+
#: classes/admin/main.php:55
|
121 |
msgid "No media in your site to regenerate !"
|
122 |
msgstr ""
|
123 |
|
124 |
+
#: classes/admin/main.php:56
|
125 |
msgid "Regenerating "
|
126 |
msgstr ""
|
127 |
|
128 |
+
#: classes/admin/main.php:57
|
129 |
msgid "Regenerate "
|
130 |
msgstr ""
|
131 |
|
132 |
+
#: classes/admin/main.php:58
|
133 |
msgid "Validate image size name"
|
134 |
msgstr ""
|
135 |
|
136 |
+
#: classes/admin/main.php:59
|
137 |
msgid "Done."
|
138 |
msgstr ""
|
139 |
|
140 |
+
#: classes/admin/main.php:60
|
141 |
msgid "Size"
|
142 |
msgstr ""
|
143 |
|
144 |
+
#: classes/admin/main.php:61
|
145 |
+
msgid "Don't use the basic WordPress thumbnail size name, use the form above to edit them"
|
|
|
|
|
146 |
msgstr ""
|
147 |
|
148 |
+
#: classes/admin/main.php:62
|
149 |
msgid "This size is already registered, edit it instead of recreating it."
|
150 |
msgstr ""
|
151 |
|
152 |
+
#: classes/admin/main.php:63
|
153 |
msgid "Do you really want to delete these size ?"
|
154 |
msgstr ""
|
155 |
|
156 |
+
#: classes/admin/main.php:64 classes/admin/media.php:211
|
157 |
msgid "Update"
|
158 |
msgstr ""
|
159 |
|
160 |
+
#: classes/admin/main.php:65
|
161 |
msgid "Error requesting page"
|
162 |
msgstr ""
|
163 |
|
164 |
+
#: classes/admin/main.php:66
|
165 |
msgid "images have been regenerated !"
|
166 |
msgstr ""
|
167 |
|
168 |
+
#: classes/admin/main.php:67
|
169 |
msgid "Validate"
|
170 |
msgstr ""
|
171 |
|
172 |
+
#: classes/admin/main.php:68
|
173 |
msgid " started at"
|
174 |
msgstr ""
|
175 |
|
176 |
+
#: classes/admin/main.php:69 classes/admin/media.php:185
|
177 |
msgid "Public name"
|
178 |
msgstr ""
|
179 |
|
180 |
+
#: classes/admin/main.php:70
|
181 |
msgid " finished at :"
|
182 |
msgstr ""
|
183 |
|
184 |
+
#: classes/admin/main.php:71
|
185 |
+
msgid "Error during the php treatment, be sure to not have php errors in your page"
|
|
|
186 |
msgstr ""
|
187 |
|
188 |
+
#: classes/admin/main.php:72
|
189 |
+
msgid "All the sizes you have modified are not saved, continue anyway ?"
|
190 |
msgstr ""
|
191 |
|
192 |
+
#: classes/admin/main.php:73
|
|
|
193 |
msgid "This image has been regenerated in %s seconds"
|
194 |
msgstr ""
|
195 |
|
196 |
+
#: classes/admin/main.php:96
|
197 |
msgid "No id given in POST datas."
|
198 |
msgstr ""
|
199 |
|
200 |
+
#: classes/admin/main.php:109
|
201 |
+
msgid "This file already exists in this size and have not been regenerated :<br/><a target=\"_blank\" href=\"%1$s\" >%2$s</a>"
|
|
|
|
|
|
|
202 |
msgstr ""
|
203 |
|
204 |
+
#: classes/admin/main.php:116
|
205 |
+
msgid "This file does not exists and have not been regenerated :<br/><a target=\"_blank\" href=\"%1$s\" >%2$s</a>"
|
|
|
|
|
|
|
206 |
msgstr ""
|
207 |
|
208 |
+
#: classes/admin/main.php:167
|
209 |
msgid "Left"
|
210 |
msgstr ""
|
211 |
|
212 |
+
#: classes/admin/main.php:168
|
213 |
msgid "Center"
|
214 |
msgstr ""
|
215 |
|
216 |
+
#: classes/admin/main.php:169
|
217 |
msgid "Right"
|
218 |
msgstr ""
|
219 |
|
220 |
+
#: classes/admin/main.php:173
|
221 |
msgid "top"
|
222 |
msgstr ""
|
223 |
|
224 |
+
#: classes/admin/main.php:174
|
225 |
msgid "center"
|
226 |
msgstr ""
|
227 |
|
228 |
+
#: classes/admin/main.php:175
|
229 |
msgid "bottom"
|
230 |
msgstr ""
|
231 |
|
232 |
+
#: classes/admin/media.php:67
|
233 |
msgid "Settings"
|
234 |
msgstr ""
|
235 |
|
236 |
+
#: classes/admin/media.php:107
|
|
|
237 |
msgid "%s size"
|
238 |
msgstr ""
|
239 |
|
240 |
+
#: classes/admin/media.php:117
|
241 |
msgid "Add a new size"
|
242 |
msgstr ""
|
243 |
|
244 |
+
#: classes/admin/media.php:123
|
245 |
msgid "Get php for theme"
|
246 |
msgstr ""
|
247 |
|
248 |
+
#: classes/admin/media.php:129
|
249 |
msgid "Thumbnail regeneration"
|
250 |
msgstr ""
|
251 |
|
252 |
+
#: classes/admin/media.php:192
|
|
|
|
|
|
|
|
|
|
|
253 |
msgid "Cropping"
|
254 |
msgstr ""
|
255 |
|
256 |
+
#: classes/admin/media.php:226
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
257 |
msgid "Add a new size of thumbnail"
|
258 |
msgstr ""
|
259 |
|
260 |
+
#: classes/admin/media.php:239
|
261 |
msgid "Get the PHP for the theme"
|
262 |
msgstr ""
|
263 |
|
264 |
+
#: classes/admin/media.php:240
|
265 |
+
msgid "Copy and paste the code below into your Wordpress theme function file if you wanted to save them and deactivate the plugin."
|
|
|
|
|
266 |
msgstr ""
|
267 |
|
268 |
+
#: classes/admin/media.php:256
|
269 |
msgid "Admin option-media template missing"
|
270 |
msgstr ""
|
271 |
|
272 |
+
#: classes/admin/media.php:521
|
|
|
|
|
|
|
|
|
273 |
msgid "Regeneration ended"
|
274 |
+
msgstr ""
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
readme.txt
CHANGED
@@ -3,8 +3,8 @@ Contributors: Rahe
|
|
3 |
Donate link: http://www.beapi.fr/donate/
|
4 |
Tags: images, image, custom sizes, custom images, thumbnail regenerate, thumbnail, regenerate
|
5 |
Requires at least: 3.5
|
6 |
-
Tested up to: 4.
|
7 |
-
Stable tag: 3.0.
|
8 |
License: GPLv2 or later
|
9 |
License URI: http://www.gnu.org/licenses/gpl-2.0.html
|
10 |
|
@@ -48,6 +48,10 @@ And then you can choose if the image is displayed on the media insertion or not
|
|
48 |
3. Choose the sizes to regenerate and regenerate them
|
49 |
|
50 |
== Changelog ==
|
|
|
|
|
|
|
|
|
51 |
* 3.0.8
|
52 |
* Fix potential bug on error ajax
|
53 |
* Stop using init hook and use after_setup_theme for image size registering
|
3 |
Donate link: http://www.beapi.fr/donate/
|
4 |
Tags: images, image, custom sizes, custom images, thumbnail regenerate, thumbnail, regenerate
|
5 |
Requires at least: 3.5
|
6 |
+
Tested up to: 4.3
|
7 |
+
Stable tag: 3.0.9
|
8 |
License: GPLv2 or later
|
9 |
License URI: http://www.gnu.org/licenses/gpl-2.0.html
|
10 |
|
48 |
3. Choose the sizes to regenerate and regenerate them
|
49 |
|
50 |
== Changelog ==
|
51 |
+
* 3.0.9
|
52 |
+
* Reuse the after_setup_theme for image size registering
|
53 |
+
* Code formatting and cleaning
|
54 |
+
* Check compatibility wth 4.3
|
55 |
* 3.0.8
|
56 |
* Fix potential bug on error ajax
|
57 |
* Stop using init hook and use after_setup_theme for image size registering
|
simple_image_sizes.php
CHANGED
@@ -3,7 +3,7 @@
|
|
3 |
Plugin Name: Simple Image Sizes
|
4 |
Plugin URI: https://github.com/Rahe/simple-image-sizes
|
5 |
Description: Add options in media setting page for images sizes
|
6 |
-
Version: 3.0.
|
7 |
Author: Rahe
|
8 |
Author URI: http://nicolas-juen.fr
|
9 |
Text Domain: 'simple-image-sizes'
|
@@ -30,7 +30,7 @@ Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
|
30 |
|
31 |
define( 'SIS_URL', plugin_dir_url( __FILE__ ) );
|
32 |
define( 'SIS_DIR', plugin_dir_path( __FILE__ ) );
|
33 |
-
define( 'SIS_VERSION', '3.0.
|
34 |
define( 'SIS_OPTION', 'custom_image_sizes' );
|
35 |
|
36 |
// Function for easy load files
|
3 |
Plugin Name: Simple Image Sizes
|
4 |
Plugin URI: https://github.com/Rahe/simple-image-sizes
|
5 |
Description: Add options in media setting page for images sizes
|
6 |
+
Version: 3.0.9
|
7 |
Author: Rahe
|
8 |
Author URI: http://nicolas-juen.fr
|
9 |
Text Domain: 'simple-image-sizes'
|
30 |
|
31 |
define( 'SIS_URL', plugin_dir_url( __FILE__ ) );
|
32 |
define( 'SIS_DIR', plugin_dir_path( __FILE__ ) );
|
33 |
+
define( 'SIS_VERSION', '3.0.9' );
|
34 |
define( 'SIS_OPTION', 'custom_image_sizes' );
|
35 |
|
36 |
// Function for easy load files
|
templates/admin-js.html
CHANGED
@@ -30,8 +30,6 @@
|
|
30 |
{{ data.crop }}
|
31 |
</label>
|
32 |
<select type="checkbox" name="custom_image_sizes[{{ data.size_name }}][c]" id="custom_image_sizes[{{ data.size_name }}][c]" base_c="0" class="c crop">
|
33 |
-
<option value="0"> {{ sis.fl }} </option>
|
34 |
-
<option value="1"> {{ sis.tr }} </option>
|
35 |
<# _.each( sis.crop_positions, function( label, name ) { #>
|
36 |
<option value="{{ name }}"> {{ label }} </option>
|
37 |
<# }); #>
|
@@ -42,6 +40,6 @@
|
|
42 |
</label>
|
43 |
</span>
|
44 |
<div class="delete_size button-secondary">{{ data.deleteImage }}</div>
|
45 |
-
<div class="add_size button-
|
46 |
</td>
|
47 |
</script>
|
30 |
{{ data.crop }}
|
31 |
</label>
|
32 |
<select type="checkbox" name="custom_image_sizes[{{ data.size_name }}][c]" id="custom_image_sizes[{{ data.size_name }}][c]" base_c="0" class="c crop">
|
|
|
|
|
33 |
<# _.each( sis.crop_positions, function( label, name ) { #>
|
34 |
<option value="{{ name }}"> {{ label }} </option>
|
35 |
<# }); #>
|
40 |
</label>
|
41 |
</span>
|
42 |
<div class="delete_size button-secondary">{{ data.deleteImage }}</div>
|
43 |
+
<div class="add_size button-primary">{{ data.validateButton }}</div>
|
44 |
</td>
|
45 |
</script>
|
templates/options-media.php
CHANGED
@@ -51,16 +51,16 @@ global $_wp_additional_image_sizes, $_wp_post_type_features;
|
|
51 |
checked="checked" value="<?php echo esc_attr( $s ); ?>"/>
|
52 |
</th>
|
53 |
<th>
|
54 |
-
<label for="<?php
|
55 |
</th>
|
56 |
<th>
|
57 |
-
<label for="<?php
|
58 |
</th>
|
59 |
<th>
|
60 |
-
<label for="<?php
|
61 |
</th>
|
62 |
<th>
|
63 |
-
<label for="<?php
|
64 |
</th>
|
65 |
</tr>
|
66 |
<?php endforeach; ?>
|
@@ -99,7 +99,7 @@ global $_wp_additional_image_sizes, $_wp_post_type_features;
|
|
99 |
?>
|
100 |
<tr>
|
101 |
<th class="check-column">
|
102 |
-
<label for="<?php
|
103 |
<input type="checkbox" class="post_types" name="post_types[]" checked="checked"
|
104 |
id="<?php echo esc_attr( $ptype->name ); ?>"
|
105 |
value="<?php echo esc_attr( $ptype->name ); ?>"/>
|
@@ -107,7 +107,7 @@ global $_wp_additional_image_sizes, $_wp_post_type_features;
|
|
107 |
</th>
|
108 |
<th>
|
109 |
<label
|
110 |
-
for="<?php
|
111 |
</th>
|
112 |
</tr>
|
113 |
<?php endforeach; ?>
|
51 |
checked="checked" value="<?php echo esc_attr( $s ); ?>"/>
|
52 |
</th>
|
53 |
<th>
|
54 |
+
<label for="<?php echo esc_attr( $s ); ?>"><?php echo esc_html( $s ); ?></label>
|
55 |
</th>
|
56 |
<th>
|
57 |
+
<label for="<?php echo esc_attr( $s ); ?>"><?php echo esc_html( $width ); ?> px</label>
|
58 |
</th>
|
59 |
<th>
|
60 |
+
<label for="<?php echo esc_attr( $s ); ?>"><?php echo esc_html( $height ); ?> px</label>
|
61 |
</th>
|
62 |
<th>
|
63 |
+
<label for="<?php echo esc_attr( $s ); ?>"><?php echo $crop; ?> </label>
|
64 |
</th>
|
65 |
</tr>
|
66 |
<?php endforeach; ?>
|
99 |
?>
|
100 |
<tr>
|
101 |
<th class="check-column">
|
102 |
+
<label for="<?php echo esc_attr( $ptype->name ); ?>">
|
103 |
<input type="checkbox" class="post_types" name="post_types[]" checked="checked"
|
104 |
id="<?php echo esc_attr( $ptype->name ); ?>"
|
105 |
value="<?php echo esc_attr( $ptype->name ); ?>"/>
|
107 |
</th>
|
108 |
<th>
|
109 |
<label
|
110 |
+
for="<?php echo esc_attr( $ptype->name ); ?>"><em><?php echo esc_html( $ptype->labels->name ); ?></em></label>
|
111 |
</th>
|
112 |
</tr>
|
113 |
<?php endforeach; ?>
|