Version Description
Download this release
Release Info
Developer | Rahe |
Plugin | Simple Image Sizes |
Version | 3.0 |
Comparing to | |
See all releases |
Code changes from version 2.4.3 to 3.0
- Gruntfile.js +57 -0
- README +185 -0
- {css → assets/css}/sis-style.css +6 -10
- assets/css/sis-style.min.css +1 -0
- {js → assets/js}/sis-attachments.js +4 -2
- assets/js/sis-attachments.min.js +1 -0
- {js → assets/js}/sis.js +29 -67
- assets/js/sis.min.js +1 -0
- classes/admin/main.php +308 -0
- classes/admin/media.php +477 -0
- classes/admin/post.php +252 -0
- inc/class.client.php → classes/main.php +51 -35
- css/Aristo/images/bg_fallback.png +0 -0
- css/Aristo/images/icon_sprite.png +0 -0
- css/Aristo/images/progress_bar.gif +0 -0
- css/Aristo/images/slider_handles.png +0 -0
- css/Aristo/images/ui-icons_222222_256x240.png +0 -0
- css/Aristo/images/ui-icons_454545_256x240.png +0 -0
- css/Aristo/jquery-ui-1.8.7.custom.css +0 -738
- inc/class.admin.php +0 -811
- js/sis-attachments.min.js +0 -4
- js/sis-pointers.js +0 -20
- js/sis.min.js +0 -21
- languages/simple-image-sizes-de_DE.mo +0 -0
- languages/simple-image-sizes-de_DE.po +367 -0
- languages/simple-image-sizes-fr_FR.mo +0 -0
- languages/{sis-fr_FR.po → simple-image-sizes-fr_FR.po} +114 -79
- languages/{sis.pot → simple-image-sizes.pot} +116 -77
- languages/sis-de_DE.mo +0 -0
- languages/sis-de_DE.po +0 -373
- languages/sis-fr_FR.mo +0 -0
- package.json +13 -0
- readme.txt +9 -4
- screenshot-1.png +0 -0
- screenshot-2.png +0 -0
- screenshot-3.png +0 -0
- screenshot-4.png +0 -0
- simple_image_sizes.php +25 -14
- templates/admin-js.html +9 -3
- templates/options-media.php +31 -21
Gruntfile.js
ADDED
@@ -0,0 +1,57 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
// Ici c'est du javascript
|
2 |
+
module.exports = function(grunt) {
|
3 |
+
grunt.initConfig({
|
4 |
+
// On lit le fichier de package
|
5 |
+
pkg: grunt.file.readJSON('package.json'),
|
6 |
+
watch: {
|
7 |
+
scripts : {
|
8 |
+
files: ['assets/js/*.js'],
|
9 |
+
tasks: ['jshint:dev']
|
10 |
+
}
|
11 |
+
},
|
12 |
+
jshint : {
|
13 |
+
dev : {
|
14 |
+
src: [ 'Gruntfile.js', 'assets/*.js' ],
|
15 |
+
options: {
|
16 |
+
// options here to override JSHint defaults
|
17 |
+
globals: {
|
18 |
+
jQuery: true,
|
19 |
+
console: true,
|
20 |
+
document: true
|
21 |
+
}
|
22 |
+
}
|
23 |
+
}
|
24 |
+
},
|
25 |
+
uglify : {
|
26 |
+
dist : {
|
27 |
+
files: {
|
28 |
+
'assets/js/sis.min.js': [
|
29 |
+
'assets/js/sis.js',
|
30 |
+
],
|
31 |
+
'assets/js/sis-attachments.min.js': [
|
32 |
+
'assets/js/sis-attachments.js',
|
33 |
+
|
34 |
+
]
|
35 |
+
}
|
36 |
+
}
|
37 |
+
},
|
38 |
+
cssmin : {
|
39 |
+
minify: {
|
40 |
+
expand: true,
|
41 |
+
cwd: 'assets/css/',
|
42 |
+
src: ['*.css', '!*.min.css'],
|
43 |
+
dest: 'assets/css/',
|
44 |
+
ext: '.min.css'
|
45 |
+
}
|
46 |
+
}
|
47 |
+
});
|
48 |
+
|
49 |
+
grunt.loadNpmTasks('grunt-contrib-uglify');
|
50 |
+
grunt.loadNpmTasks('grunt-contrib-watch');
|
51 |
+
grunt.loadNpmTasks('grunt-contrib-jshint');
|
52 |
+
grunt.loadNpmTasks('grunt-contrib-cssmin');
|
53 |
+
|
54 |
+
grunt.registerTask('default', ['watch:scripts'] );
|
55 |
+
|
56 |
+
grunt.registerTask('dist', ['uglify:dist', 'cssmin'] );
|
57 |
+
};
|
README
ADDED
@@ -0,0 +1,185 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
# Simple Image Sizes #
|
2 |
+
**Contributors:** Rahe
|
3 |
+
|
4 |
+
**Donate link:** http://www.beapi.fr/donate/
|
5 |
+
|
6 |
+
**Tags:** images, image, custom sizes, custom images, thumbnail regenerate, thumbnail, regenerate, cropping
|
7 |
+
|
8 |
+
**Requires at least:** 3.5
|
9 |
+
|
10 |
+
**Tested up to:** 3.9
|
11 |
+
|
12 |
+
**Stable tag:** 3.0
|
13 |
+
|
14 |
+
|
15 |
+
## Description ##
|
16 |
+
|
17 |
+
This plugin allow create custom image sizes for your site. Override your theme sizes directly on the media option page.
|
18 |
+
You can regenerate all the sizes you have just created and choose which one you wanted to regenerate.
|
19 |
+
You can now get all the code to copy and paste to your function theme file.
|
20 |
+
Now you can use the generated sizes directly into your posts and insert images at the right size !
|
21 |
+
Now you choose if you want display the size in the post insert image.
|
22 |
+
Now you can regenerate the images one by one in the 'Medias' general pane.
|
23 |
+
Now you can regenerate the images by bulk action in the 'Medias' general pane.
|
24 |
+
Now you can regenerate the image sizes on single attachment edit page.
|
25 |
+
|
26 |
+
I have added a timer so when you regeneration your thumbnails, you can know approximately when the regeneration will be ended.
|
27 |
+
I have improved the php and javascript, you can know if the image have been regenerated or not or if there is an error and which one.
|
28 |
+
|
29 |
+
Contribute on https://github.com/Rahe/Simple-image-sizes
|
30 |
+
|
31 |
+
## Installation ##
|
32 |
+
**PHP5 Required.**
|
33 |
+
|
34 |
+
1. Download, unzip and upload to your WordPress plugins directory
|
35 |
+
2. Activate the plugin within you WordPress Administration Backend
|
36 |
+
3. Go to Settings > Medias
|
37 |
+
4. Configure your new image sizes and regenerate the thumbnails !
|
38 |
+
|
39 |
+
|
40 |
+
## Frequently Asked Questions ##
|
41 |
+
|
42 |
+
### Where can I add image sizes ? ####
|
43 |
+
Go to Settings -> Media then you can add a image size. You have to add a unique custom name without any spaces or special chars.
|
44 |
+
The best is to use something like my-custom-size.
|
45 |
+
Then you have several fields for configuring the image size, the widht, the height, cropping.
|
46 |
+
And then you can choose if the image is displayed on the media insertion or not ( this will be displayed on the dropdown list ).
|
47 |
+
|
48 |
+
|
49 |
+
## Screenshots ##
|
50 |
+
|
51 |
+
###1. Settings page
|
52 |
+
###
|
53 |
+
![Settings page
|
54 |
+
](http://s.wordpress.org/extend/plugins/simple-image-sizes/screenshot-1.png)
|
55 |
+
|
56 |
+
###2. Get PHP for the theme
|
57 |
+
###
|
58 |
+
![Get PHP for the theme
|
59 |
+
](http://s.wordpress.org/extend/plugins/simple-image-sizes/screenshot-2.png)
|
60 |
+
|
61 |
+
###3. Choose the sizes to regenerate and regenerate them
|
62 |
+
###
|
63 |
+
![Choose the sizes to regenerate
|
64 |
+
](http://s.wordpress.org/extend/plugins/simple-image-sizes/screenshot-3.png)
|
65 |
+
|
66 |
+
## Changelog ##
|
67 |
+
* 3.0
|
68 |
+
* Revamping all the code, change classes and structure
|
69 |
+
* Use grunt for compiling files
|
70 |
+
* Handle the 3.9 new cropping position
|
71 |
+
* Remove aristo css
|
72 |
+
* Use UI from WordPress
|
73 |
+
* 2.4.3
|
74 |
+
* Remove some php notices
|
75 |
+
* Remove notice when wrong image size
|
76 |
+
* 2.4.2
|
77 |
+
* Selective regeneration fix by g100g on http://wordpress.org/support/topic/regenerating-fix
|
78 |
+
* 2.4.1
|
79 |
+
* Remove function not working on admin file
|
80 |
+
* 2.4
|
81 |
+
* Made for 3.5 and up
|
82 |
+
* Refactoring PHP/Javascript code
|
83 |
+
* Javascript improvements
|
84 |
+
* Remove useless UI
|
85 |
+
* UI improvements
|
86 |
+
* Global PHP performance improvements
|
87 |
+
* 2.3.1
|
88 |
+
* Add Ajax bulk actions on medias list
|
89 |
+
* Add ajax thumbnail rebuild on single media
|
90 |
+
* 2.3
|
91 |
+
* Add the custom size name in the attachment insertion
|
92 |
+
* Exclude post_type wich do not support the post-thumbnail feature
|
93 |
+
* 2.2.5
|
94 |
+
* Debug the regeneration buggy !
|
95 |
+
* Complete the french translation
|
96 |
+
* Security update for single regeneration, include the nonce this time :)
|
97 |
+
* 2.2.4
|
98 |
+
* Add security nonces for every actions
|
99 |
+
* Put the messages at the begining of the log
|
100 |
+
* Add a select all checkbox Thank to cocola
|
101 |
+
* Add the german translation thanks to glueckpress
|
102 |
+
* Remove notice tnahks to christianwach
|
103 |
+
* Remove useless and buggy for my scripting pointers
|
104 |
+
* 2.2.3
|
105 |
+
* Do not force network usage
|
106 |
+
* 2.2.2
|
107 |
+
* Debug js for the buttons
|
108 |
+
* Remove console.log calls
|
109 |
+
* 2.2.1
|
110 |
+
* Use buttonset for the checkboxes
|
111 |
+
* Add Pointer for WordPress 3.3
|
112 |
+
* Fix translation in French
|
113 |
+
* Some medias queries for small windows ( change size of buttons and alignment )
|
114 |
+
* 2.2
|
115 |
+
* Add new version of css aristo
|
116 |
+
* Add some icons
|
117 |
+
* Display button for saving changes only when changes detected
|
118 |
+
* Display message when a size is modified but not saved and wanted to regenerate
|
119 |
+
* Debug functionnality when regenerating only some sizes, metas not crushed
|
120 |
+
* Add solo regenerating
|
121 |
+
* Remove displaying for theme/not theme sizes
|
122 |
+
* Use WordPress class for small inputs
|
123 |
+
* 2.1
|
124 |
+
* Add javascript timer
|
125 |
+
* Improve javascript and more IE friendly
|
126 |
+
* You can now choose if you want to display the image sizes in image insertion or not
|
127 |
+
* Handle errors and messages
|
128 |
+
* Remove some css useless rules
|
129 |
+
* Fix bad translation for french
|
130 |
+
* Remove accents in image sizes
|
131 |
+
* Do not update size properties if there is an ajax query for an another size name
|
132 |
+
* 2.0.3
|
133 |
+
* Resolve issue with theme sizes witch by default are displayed as not cropped. Thanks to momo360modena for the bug signalment.
|
134 |
+
* 2.0.2
|
135 |
+
* Remove debug on php for javascript
|
136 |
+
* Resolve issue with the different versions on jquery ( like in WP3.2 ) with attr return for checked components
|
137 |
+
* 2.0.1
|
138 |
+
* Resolve javascript issue when clicking on delete button
|
139 |
+
* Resolve issue of never unchecking crop button
|
140 |
+
* 2.0
|
141 |
+
* Code refactoring
|
142 |
+
* Update translations
|
143 |
+
* Ajaxification of the process
|
144 |
+
* Deleting by Ajax
|
145 |
+
* Updating by Ajax
|
146 |
+
* Adding by Ajax
|
147 |
+
* Change UI
|
148 |
+
* Change theme
|
149 |
+
* Handle ajax errors
|
150 |
+
* Handle not modified sizes, cropped
|
151 |
+
* Handle same names
|
152 |
+
* Sanitize the names
|
153 |
+
* Customize jQuery ui
|
154 |
+
* Customize jQuery ui theme
|
155 |
+
* HTML5 Elements
|
156 |
+
* CSS3 Animations
|
157 |
+
* 1.0.6
|
158 |
+
* Minify javascript names
|
159 |
+
* Change progressbar style
|
160 |
+
* Add animations on progressbar
|
161 |
+
* 1.0.5
|
162 |
+
* Only add css and js script in the media page to avoid any javascript error in other pages
|
163 |
+
* Rectify css
|
164 |
+
* Add function to get the code for the function.php file of the theme
|
165 |
+
* Don't redefine the Wordpress basic size names
|
166 |
+
* 1.0.4
|
167 |
+
* Fix the add_image_size issue ( height and width reversed )
|
168 |
+
* 1.0.3
|
169 |
+
* Fix the plugin language
|
170 |
+
* Add some translations
|
171 |
+
* Externalise some css
|
172 |
+
* Add sizes in the image adding to an article
|
173 |
+
* Add setting link in the plugins list
|
174 |
+
* Use admin_url instead of home_url
|
175 |
+
* Add legend for colors
|
176 |
+
* Some code refactoring
|
177 |
+
* 1.0.2
|
178 |
+
* Fix the plugin license
|
179 |
+
* 1.0.1
|
180 |
+
* Add POT file
|
181 |
+
* Add french translation
|
182 |
+
* 1.0
|
183 |
+
* First release
|
184 |
+
* Thumbnail regenerate
|
185 |
+
* Image size generation
|
{css → assets/css}/sis-style.css
RENAMED
@@ -1,11 +1,9 @@
|
|
1 |
-
.
|
2 |
-
position: relative;
|
3 |
-
height: 13px;
|
4 |
-
margin-bottom: 13px;
|
5 |
-
margin-top: 60px;
|
6 |
-
color: #FFFFFF;
|
7 |
display: none;
|
8 |
}
|
|
|
|
|
|
|
9 |
input.h, input.w {
|
10 |
border-color: #DFDFDF;
|
11 |
background-color: white;
|
@@ -58,8 +56,6 @@ tr.notChangedAdding {
|
|
58 |
margin-top: 20px;
|
59 |
padding: 0 .7em;
|
60 |
}
|
61 |
-
|
62 |
-
|
63 |
-
float: left;
|
64 |
-
margin-right: .7em;
|
65 |
}
|
1 |
+
.media-item.sis {
|
|
|
|
|
|
|
|
|
|
|
2 |
display: none;
|
3 |
}
|
4 |
+
.media-item.sis .progress {
|
5 |
+
width: 100%;
|
6 |
+
}
|
7 |
input.h, input.w {
|
8 |
border-color: #DFDFDF;
|
9 |
background-color: white;
|
56 |
margin-top: 20px;
|
57 |
padding: 0 .7em;
|
58 |
}
|
59 |
+
#post-body .sis-regenerate-one{
|
60 |
+
float:left;
|
|
|
|
|
61 |
}
|
assets/css/sis-style.min.css
ADDED
@@ -0,0 +1 @@
|
|
|
1 |
+
.media-item.sis{display:none}.media-item.sis .progress{width:100%}input.h,input.w{border-color:#DFDFDF;background-color:#fff;border-width:1px;border-style:solid;-moz-border-radius:3px;-khtml-border-radius:3px;-webkit-border-radius:3px;border-radius:3px}tr{-webkit-transition:all .5s ease-in-out;-moz-transition:all .5s ease-in-out;-o-transition:all .5s ease-in-out;transition:all .5s ease-in-out}table.sis tr:nth-child(even){background-color:#FCFCFC}table.sis tr:nth-child(odd){background-color:transparent}tr.addPending{background-color:#6CA1D7}tr.successAdding{background-color:#89D76A}tr.errorAdding{background-color:#C45858}tr.notChangedAdding{background-color:#F2A13A}#regenerate_message,#thumb,#time{display:none}#ajax_thumbnail_rebuild{margin-top:40px}#sis_progress-percent{width:100%;text-align:center;font-weight:700}#time .ui-state-highlight{margin-top:20px;padding:0 .7em}#post-body .sis-regenerate-one{float:left}
|
{js → assets/js}/sis-attachments.js
RENAMED
@@ -83,7 +83,8 @@ jQuery( function() {
|
|
83 |
nonce : sis.regen_one
|
84 |
},
|
85 |
beforeSend : function() {
|
86 |
-
self.parent.
|
|
|
87 |
},
|
88 |
success: function( r ) {
|
89 |
var message ='';
|
@@ -94,7 +95,8 @@ jQuery( function() {
|
|
94 |
message = sis.soloRegenerated.replace( '%s', r.time );
|
95 |
}
|
96 |
self.setMessage( message );
|
97 |
-
self.parent.
|
|
|
98 |
}
|
99 |
});
|
100 |
}
|
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 ) {
|
90 |
var message ='';
|
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 |
});
|
102 |
}
|
assets/js/sis-attachments.min.js
ADDED
@@ -0,0 +1 @@
|
|
|
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 a=jQuery(document.body),b=null,c=null;jQuery('select[name="action"], select[name="action2"]').append(jQuery("<option/>").attr("value","sis-regenerate").text(sis.regenerate)),a.on("click",".sis-regenerate-one",function(a){a.preventDefault(),c=new b(this)}),jQuery("#doaction, #doaction2").on("click",function(a){if("sis-regenerate"===jQuery(this).parent().find("select").val()){var d=jQuery('#the-list .check-column input[type="checkbox"]:checked').closest("tr").find(".sis-regenerate-one");d.length>0&&(a.preventDefault(),d.each(function(){c=new b(this)}))}}),b=function(a){var b={list:{},parent:null,el:null,id:null,messageZone:"",init:function(a){this.el=a,this.parent=a.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(a){this.messageZone.html(" - "+a).addClass("updated").addClass("fade").show()},regenItem:function(){var a=this;jQuery.ajax({url:sis.ajaxUrl,type:"POST",dataType:"json",cache:!1,data:{action:"sis_rebuild_image",id:this.list.id,nonce:sis.regen_one},beforeSend:function(){a.parent.addClass("ajaxing").find(".sis-regenerate-one").hide().end().find(".spinner").show(),a.parent.find("a.sis-regenerate-one").closest("tr").fadeTo("fast","0.3")},success:function(b){var c="";c=b.src&&b.time&&!b.error&&"object"==typeof b?sis.soloRegenerated.replace("%s",b.time):"object"!=typeof b?c=sis.phpError:b.error,a.setMessage(c),a.parent.removeClass("ajaxing").find(".sis-regenerate-one").show().end().find(".spinner").hide(),a.parent.find("a.sis-regenerate-one").closest("tr").fadeTo("fast","1")}})}};b.init(jQuery(a))}});
|
{js → assets/js}/sis.js
RENAMED
@@ -15,7 +15,7 @@ if( !rahe.sis ) {
|
|
15 |
rahe.sis.regenerate = {
|
16 |
post_types : [],
|
17 |
thumbnails : [],
|
18 |
-
|
19 |
cur : 0,
|
20 |
timeScript: [],
|
21 |
dateScript: '',
|
@@ -67,15 +67,10 @@ rahe.sis.regenerate = {
|
|
67 |
setMessage : function( msg ) {
|
68 |
// Display the message
|
69 |
this.messageZone.html( "<p>" + msg + "</p>" ).addClass( 'updated' ).addClass( 'fade' ).show();
|
70 |
-
this.refreshProgressBar();
|
71 |
},
|
72 |
setTimeMessage : function ( msg ) {
|
73 |
this.timeZone.html( msg );
|
74 |
},
|
75 |
-
refreshProgressBar: function(){
|
76 |
-
// Refresh the progress Bar
|
77 |
-
this.progress.progressbar();
|
78 |
-
},
|
79 |
checkStartRegenerating : function(){
|
80 |
if( jQuery( '.notSaved' ).size() > 0 ) {
|
81 |
var confirmation = confirm( sis.notSaved );
|
@@ -128,13 +123,13 @@ rahe.sis.regenerate = {
|
|
128 |
self.time.show();
|
129 |
|
130 |
// Eval the response
|
131 |
-
self.
|
132 |
|
133 |
// Set the current to 0
|
134 |
self.curr = 0;
|
135 |
|
136 |
// Display the progress Bar
|
137 |
-
self.progress.show();
|
138 |
|
139 |
// Start Regenerating
|
140 |
self.regenItem();
|
@@ -144,16 +139,16 @@ rahe.sis.regenerate = {
|
|
144 |
regenItem : function( ) {
|
145 |
var self = this,
|
146 |
wp_nonce = jQuery('input.regen').val();
|
147 |
-
|
148 |
// If the list is empty display the message of emptyness and reinitialize the form
|
149 |
-
if (
|
150 |
this.reInit();
|
151 |
this.setMessage( sis.noMedia );
|
152 |
return false;
|
153 |
}
|
154 |
|
155 |
// If we have finished the regeneration display message and init again
|
156 |
-
if ( this.curr >= this.
|
157 |
var now = new Date();
|
158 |
this.reInit();
|
159 |
this.setMessage( sis.done+this.curr+' '+sis.messageRegenerated+sis.startedAt+' '+this.dateScript.getHours()+":"+this.dateScript.getMinutes()+":"+this.dateScript.getSeconds()+sis.finishedAt+' '+now.getHours()+":"+now.getMinutes()+":"+now.getSeconds() );
|
@@ -161,24 +156,25 @@ rahe.sis.regenerate = {
|
|
161 |
}
|
162 |
|
163 |
// Set the message of current image regenerating
|
164 |
-
this.setMessage( sis.regenerating + ( this.curr + 1 ) + sis.of + this.
|
165 |
|
166 |
jQuery.ajax( {
|
167 |
url: sis.ajaxUrl,
|
168 |
type: "POST",
|
169 |
dataType: 'json',
|
170 |
data: {
|
171 |
-
action : '
|
172 |
-
|
173 |
thumbnails : this.thumbnails,
|
174 |
nonce : wp_nonce
|
175 |
},
|
176 |
beforeSend : function() {
|
177 |
// Calculate the percentage of regeneration
|
178 |
-
self.percent = ( self.curr / self.
|
179 |
|
180 |
// Change the progression
|
181 |
-
self.progress.
|
|
|
182 |
|
183 |
// Change the text of progression
|
184 |
self.percentText.removeClass( 'hidden' ).html( Math.round( self.percent ) + "%");
|
@@ -213,10 +209,12 @@ rahe.sis.regenerate = {
|
|
213 |
curDate = new Date(),
|
214 |
num = 0,
|
215 |
sum = 0,
|
216 |
-
i = 0
|
|
|
|
|
217 |
|
218 |
// Add the regenerating time to the array
|
219 |
-
self.timeScript.push(r.time);
|
220 |
|
221 |
// Get the number of elements in array
|
222 |
num = self.timeScript.length;
|
@@ -227,16 +225,16 @@ rahe.sis.regenerate = {
|
|
227 |
}
|
228 |
|
229 |
// Make the average value of the regenerating time
|
230 |
-
|
231 |
|
232 |
// Round the value in miliseconds and add 25% or error
|
233 |
-
t = Math.round( ( ( ave *self.
|
234 |
|
235 |
// Set the predicted time
|
236 |
dateEnd.setTime( self.dateScript.getTime() + t );
|
237 |
|
238 |
// Get the difference between the two dates
|
239 |
-
|
240 |
|
241 |
// Set the message in the notice box
|
242 |
self.setTimeMessage( dateEnd.getHours()+":"+dateEnd.getMinutes()+":"+dateEnd.getSeconds()+sis.or+time+sis.beforeEnd );
|
@@ -314,6 +312,7 @@ rahe.sis.sizes = {
|
|
314 |
maximumHeight : sis.maximumHeight,
|
315 |
customName : sis.customName,
|
316 |
crop : sis.crop,
|
|
|
317 |
show : sis.show,
|
318 |
deleteImage : sis.deleteImage,
|
319 |
validateButton : sis.validateButton
|
@@ -321,9 +320,6 @@ rahe.sis.sizes = {
|
|
321 |
|
322 |
// Add the row to the current list
|
323 |
jQuery('#' + id).closest( 'tr' ).html( row );
|
324 |
-
|
325 |
-
// Refresh the buttons
|
326 |
-
this.setButtons();
|
327 |
},
|
328 |
deleteSize: function( e, el ) {
|
329 |
e.preventDefault();
|
@@ -368,14 +364,11 @@ rahe.sis.sizes = {
|
|
368 |
wp_nonce = jQuery( '.addSize' ).val(),
|
369 |
parent = jQuery( el ).closest( 'tr' ),
|
370 |
n = parent.find( 'input[name="image_name"]' ).val(),
|
371 |
-
c = parent.find( '
|
372 |
-
s = parent.find( '
|
373 |
-
cn = parent.find( 'input.n' ).val()
|
374 |
h = 0,
|
375 |
w = 0;
|
376 |
-
|
377 |
-
|
378 |
-
c = ( c == false || c == undefined ) ? false : true ;
|
379 |
s = ( s == false || s == undefined ) ? false : true ;
|
380 |
w = parseInt( parent.find( 'input.w' ).val() );
|
381 |
h = parseInt( parent.find( 'input.h' ).val() );
|
@@ -416,7 +409,7 @@ rahe.sis.sizes = {
|
|
416 |
// Add the new sizes values for checking of changed or not
|
417 |
parent.find( 'input.h' ).attr( { base_h : h } );
|
418 |
parent.find( 'input.w' ).attr( { base_w : w } );
|
419 |
-
parent.find( '
|
420 |
parent.find( 'input.s' ).attr( { base_s : s } );
|
421 |
|
422 |
// Add the generated class
|
@@ -430,7 +423,7 @@ rahe.sis.sizes = {
|
|
430 |
// Remove classes after 3 seconds
|
431 |
timer = setTimeout(function() {
|
432 |
parent.removeClass( 'errorAdding notChangedAdding successAdding' );
|
433 |
-
},
|
434 |
}
|
435 |
});
|
436 |
}
|
@@ -464,7 +457,7 @@ rahe.sis.sizes = {
|
|
464 |
newRow = jQuery( '#sis-regen .wrapper > table#sis_sizes > tbody > tr:first' ).clone().attr( 'id', 'sis-'+n );
|
465 |
}
|
466 |
|
467 |
-
c = c
|
468 |
|
469 |
// Set the datas with the given datas
|
470 |
newRow.find( 'th > label' ).attr( 'for', n )
|
@@ -500,34 +493,6 @@ rahe.sis.sizes = {
|
|
500 |
// Remove the given name from the array
|
501 |
jQuery( '#sis-'+n ).remove();
|
502 |
},
|
503 |
-
setButtons: function() {
|
504 |
-
// UI for delete,crop and add buttons
|
505 |
-
jQuery(".delete_size").button( {
|
506 |
-
icons: {
|
507 |
-
primary: 'ui-icon-circle-close'
|
508 |
-
},
|
509 |
-
text: true
|
510 |
-
} );
|
511 |
-
jQuery(".add_size").button( {
|
512 |
-
icons: {
|
513 |
-
primary: 'ui-icon-check'
|
514 |
-
},
|
515 |
-
text: true
|
516 |
-
} );
|
517 |
-
jQuery(".crop").button({
|
518 |
-
icons: {
|
519 |
-
primary: 'ui-icon-arrow-4-diag'
|
520 |
-
},
|
521 |
-
text: true
|
522 |
-
});
|
523 |
-
jQuery(".show").button({
|
524 |
-
icons: {
|
525 |
-
primary: 'ui-icon-lightbulb'
|
526 |
-
},
|
527 |
-
text: true
|
528 |
-
});
|
529 |
-
jQuery( '.size_options' ).buttonset();
|
530 |
-
},
|
531 |
displayChange : function( el ) {
|
532 |
var el = jQuery( el ),
|
533 |
parent = el.closest( 'tr' );
|
@@ -539,14 +504,14 @@ rahe.sis.sizes = {
|
|
539 |
|
540 |
var h_el = parent.find( 'input.h' ),
|
541 |
w_el = parent.find( 'input.w' ),
|
542 |
-
c_el = parent.find( '
|
543 |
s_el = parent.find( 'input.s' ),
|
544 |
n_el = parent.find( 'input.n' ),
|
545 |
|
546 |
h = h_el.val(),
|
547 |
w = w_el.val(),
|
548 |
-
c =
|
549 |
-
s =
|
550 |
n = n_el.val(),
|
551 |
|
552 |
base_h = h_el.attr( 'base_h' ),
|
@@ -589,7 +554,4 @@ jQuery(function() {
|
|
589 |
jQuery('#get_php').nextAll('code').hide();
|
590 |
|
591 |
jQuery(".add_size").hide();
|
592 |
-
|
593 |
-
// Set the buttons
|
594 |
-
rahe.sis.sizes.setButtons();
|
595 |
});
|
15 |
rahe.sis.regenerate = {
|
16 |
post_types : [],
|
17 |
thumbnails : [],
|
18 |
+
total : 0,
|
19 |
cur : 0,
|
20 |
timeScript: [],
|
21 |
dateScript: '',
|
67 |
setMessage : function( msg ) {
|
68 |
// Display the message
|
69 |
this.messageZone.html( "<p>" + msg + "</p>" ).addClass( 'updated' ).addClass( 'fade' ).show();
|
|
|
70 |
},
|
71 |
setTimeMessage : function ( msg ) {
|
72 |
this.timeZone.html( msg );
|
73 |
},
|
|
|
|
|
|
|
|
|
74 |
checkStartRegenerating : function(){
|
75 |
if( jQuery( '.notSaved' ).size() > 0 ) {
|
76 |
var confirmation = confirm( sis.notSaved );
|
123 |
self.time.show();
|
124 |
|
125 |
// Eval the response
|
126 |
+
self.total = r.total ;
|
127 |
|
128 |
// Set the current to 0
|
129 |
self.curr = 0;
|
130 |
|
131 |
// Display the progress Bar
|
132 |
+
self.progress.show().parent().show();
|
133 |
|
134 |
// Start Regenerating
|
135 |
self.regenItem();
|
139 |
regenItem : function( ) {
|
140 |
var self = this,
|
141 |
wp_nonce = jQuery('input.regen').val();
|
142 |
+
|
143 |
// If the list is empty display the message of emptyness and reinitialize the form
|
144 |
+
if ( this.total == 0 || _.isUndefined( this.total ) ) {
|
145 |
this.reInit();
|
146 |
this.setMessage( sis.noMedia );
|
147 |
return false;
|
148 |
}
|
149 |
|
150 |
// If we have finished the regeneration display message and init again
|
151 |
+
if ( this.curr >= this.total ) {
|
152 |
var now = new Date();
|
153 |
this.reInit();
|
154 |
this.setMessage( sis.done+this.curr+' '+sis.messageRegenerated+sis.startedAt+' '+this.dateScript.getHours()+":"+this.dateScript.getMinutes()+":"+this.dateScript.getSeconds()+sis.finishedAt+' '+now.getHours()+":"+now.getMinutes()+":"+now.getSeconds() );
|
156 |
}
|
157 |
|
158 |
// Set the message of current image regenerating
|
159 |
+
this.setMessage( sis.regenerating + ( this.curr + 1 ) + sis.of + this.total );
|
160 |
|
161 |
jQuery.ajax( {
|
162 |
url: sis.ajaxUrl,
|
163 |
type: "POST",
|
164 |
dataType: 'json',
|
165 |
data: {
|
166 |
+
action : 'sis_rebuild_images',
|
167 |
+
offset : this.curr,
|
168 |
thumbnails : this.thumbnails,
|
169 |
nonce : wp_nonce
|
170 |
},
|
171 |
beforeSend : function() {
|
172 |
// Calculate the percentage of regeneration
|
173 |
+
self.percent = ( self.curr / self.total ) * 100;
|
174 |
|
175 |
// Change the progression
|
176 |
+
self.progress.find( '.bar' ).width( self.percent+'%' )
|
177 |
+
.find('.percent').html( self.percent + '%' );
|
178 |
|
179 |
// Change the text of progression
|
180 |
self.percentText.removeClass( 'hidden' ).html( Math.round( self.percent ) + "%");
|
209 |
curDate = new Date(),
|
210 |
num = 0,
|
211 |
sum = 0,
|
212 |
+
i = 0,
|
213 |
+
ave = 0,
|
214 |
+
time = '';
|
215 |
|
216 |
// Add the regenerating time to the array
|
217 |
+
self.timeScript.push( parseFloat( r.time.replace( ',', '.' ), 10 ) );
|
218 |
|
219 |
// Get the number of elements in array
|
220 |
num = self.timeScript.length;
|
225 |
}
|
226 |
|
227 |
// Make the average value of the regenerating time
|
228 |
+
ave = sum/num,
|
229 |
|
230 |
// Round the value in miliseconds and add 25% or error
|
231 |
+
t = Math.round( ( ( ave * self.total ) * 1000 ) );
|
232 |
|
233 |
// Set the predicted time
|
234 |
dateEnd.setTime( self.dateScript.getTime() + t );
|
235 |
|
236 |
// Get the difference between the two dates
|
237 |
+
time = self.s2t( Math.abs( ( dateEnd.getTime() - curDate.getTime() ) ) / 1000 );
|
238 |
|
239 |
// Set the message in the notice box
|
240 |
self.setTimeMessage( dateEnd.getHours()+":"+dateEnd.getMinutes()+":"+dateEnd.getSeconds()+sis.or+time+sis.beforeEnd );
|
312 |
maximumHeight : sis.maximumHeight,
|
313 |
customName : sis.customName,
|
314 |
crop : sis.crop,
|
315 |
+
crop_positions :sis.crop_positions,
|
316 |
show : sis.show,
|
317 |
deleteImage : sis.deleteImage,
|
318 |
validateButton : sis.validateButton
|
320 |
|
321 |
// Add the row to the current list
|
322 |
jQuery('#' + id).closest( 'tr' ).html( row );
|
|
|
|
|
|
|
323 |
},
|
324 |
deleteSize: function( e, el ) {
|
325 |
e.preventDefault();
|
364 |
wp_nonce = jQuery( '.addSize' ).val(),
|
365 |
parent = jQuery( el ).closest( 'tr' ),
|
366 |
n = parent.find( 'input[name="image_name"]' ).val(),
|
367 |
+
c = parent.find( 'select.crop' ).val(),
|
368 |
+
s = parent.find( 'input.show' ).val(),
|
369 |
+
cn = parent.find( 'input.n' ).val(),
|
370 |
h = 0,
|
371 |
w = 0;
|
|
|
|
|
|
|
372 |
s = ( s == false || s == undefined ) ? false : true ;
|
373 |
w = parseInt( parent.find( 'input.w' ).val() );
|
374 |
h = parseInt( parent.find( 'input.h' ).val() );
|
409 |
// Add the new sizes values for checking of changed or not
|
410 |
parent.find( 'input.h' ).attr( { base_h : h } );
|
411 |
parent.find( 'input.w' ).attr( { base_w : w } );
|
412 |
+
parent.find( 'select.c' ).attr( { base_c : c } );
|
413 |
parent.find( 'input.s' ).attr( { base_s : s } );
|
414 |
|
415 |
// Add the generated class
|
423 |
// Remove classes after 3 seconds
|
424 |
timer = setTimeout(function() {
|
425 |
parent.removeClass( 'errorAdding notChangedAdding successAdding' );
|
426 |
+
}, 2 * 1000 );
|
427 |
}
|
428 |
});
|
429 |
}
|
457 |
newRow = jQuery( '#sis-regen .wrapper > table#sis_sizes > tbody > tr:first' ).clone().attr( 'id', 'sis-'+n );
|
458 |
}
|
459 |
|
460 |
+
c = !_.isUndefined( sis.crop_positions[c] ) ? sis.crop_positions[c] : sis.fl ;
|
461 |
|
462 |
// Set the datas with the given datas
|
463 |
newRow.find( 'th > label' ).attr( 'for', n )
|
493 |
// Remove the given name from the array
|
494 |
jQuery( '#sis-'+n ).remove();
|
495 |
},
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
496 |
displayChange : function( el ) {
|
497 |
var el = jQuery( el ),
|
498 |
parent = el.closest( 'tr' );
|
504 |
|
505 |
var h_el = parent.find( 'input.h' ),
|
506 |
w_el = parent.find( 'input.w' ),
|
507 |
+
c_el = parent.find( 'select.c' ),
|
508 |
s_el = parent.find( 'input.s' ),
|
509 |
n_el = parent.find( 'input.n' ),
|
510 |
|
511 |
h = h_el.val(),
|
512 |
w = w_el.val(),
|
513 |
+
c = c_el.val(),
|
514 |
+
s = s_el.val(),
|
515 |
n = n_el.val(),
|
516 |
|
517 |
base_h = h_el.attr( 'base_h' ),
|
554 |
jQuery('#get_php').nextAll('code').hide();
|
555 |
|
556 |
jQuery(".add_size").hide();
|
|
|
|
|
|
|
557 |
});
|
assets/js/sis.min.js
ADDED
@@ -0,0 +1 @@
|
|
|
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,time:null,timeZone:null,buttonRegenerate:null,errorZone:null,errorMessages:null,thumb:null,thumbImg:null,init:function(){this.percentText=jQuery("#sis_progress-percent"),this.progress=jQuery(".progress"),this.messageZone=jQuery("#regenerate_message"),this.time=jQuery("#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=jQuery("#thumb"),this.thumbImg=jQuery("#thumb-img")},getThumbnails:function(){var a=this,b=jQuery("input.thumbnails:checked");b.length!=jQuery('input.thumbnails[type="checkbox"]').length&&b.each(function(){a.thumbnails.push(this.value)})},getPostTypes:function(){var a=this,b=jQuery("input.post_types:checked");b.length!=jQuery('input.post_types[type="checkbox"]').length&&b.each(function(){a.post_types.push(this.value)})},setMessage:function(a){this.messageZone.html("<p>"+a+"</p>").addClass("updated").addClass("fade").show()},setTimeMessage:function(a){this.timeZone.html(a)},checkStartRegenerating:function(){if(jQuery(".notSaved").size()>0){var a=confirm(sis.notSaved);if(1!=a)return!1;this.startRegenerating()}else this.startRegenerating()},startRegenerating:function(){var a=this,b=jQuery("input.getList").val();a.getThumbnails(),a.getPostTypes(),this.dateScript=new Date,jQuery.ajax({url:sis.ajaxUrl,type:"POST",dataType:"json",data:{action:"sis_get_list",post_types:a.post_types,nonce:b},beforeSend:function(){a.buttonRegenerate.attr("disabled",!0),a.setMessage(sis.reading)},success:function(b){return"object"!=typeof b?(a.reInit(),a.setMessage(sis.phpError),!1):(a.time.show(),a.total=b.total,a.curr=0,a.progress.show().parent().show(),void a.regenItem())}})},regenItem:function(){var a=this,b=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 c=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+" "+c.getHours()+":"+c.getMinutes()+":"+c.getSeconds())}this.setMessage(sis.regenerating+(this.curr+1)+sis.of+this.total),jQuery.ajax({url:sis.ajaxUrl,type:"POST",dataType:"json",data:{action:"sis_rebuild_images",offset:this.curr,thumbnails:this.thumbnails,nonce:b},beforeSend:function(){a.percent=a.curr/a.total*100,a.progress.find(".bar").width(a.percent+"%").find(".percent").html(a.percent+"%"),a.percentText.removeClass("hidden").html(Math.round(a.percent)+"%")},success:function(b){if(b.src&&b.time&&!b.error&&"object"==typeof b){b.message&&a.time.find("ul.messages").prepend("<li>"+b.message+"</li>"),a.thumb.show(),a.thumbImg.attr("src",b.src);var c=new Date,d=new Date,e=0,f=0,g=0,h=0,i="";for(a.timeScript.push(parseFloat(b.time.replace(",","."),10)),e=a.timeScript.length,g;e>g;g++)f+=a.timeScript[g];h=f/e,t=Math.round(h*a.total*1e3),c.setTime(a.dateScript.getTime()+t),i=a.s2t(Math.abs(c.getTime()-d.getTime())/1e3),a.setTimeMessage(c.getHours()+":"+c.getMinutes()+":"+c.getSeconds()+sis.or+i+sis.beforeEnd)}else{var j="";j="object"!=typeof b?sis.phpError:b.error,a.errorZone.addClass("error message"),a.errorMessages.prepend("<li>"+j+"</li>")}a.curr++,a.regenItem()}})},s2t:function(a){var a=a%86400,b=new Date(1970,0,1),c=0;return b.setSeconds(a),c=b.toTimeString().substr(0,8),a>86399&&(c=Math.floor((b-Date.parse("1/1/70"))/36e5)+c.substr(2)),c},reInit:function(){this.buttonRegenerate.removeAttr("disabled"),this.thumb.hide(),this.progress.hide(),this.percentText.addClass("hidden")}},rahe.sis.sizes={i:0,add:function(a,b){a.preventDefault();var c=_.template(document.getElementById("sis-new_size").text,{size_id:this.i,validate:sis.validate});jQuery(b).closest("tr").before(c),this.i++},register:function(a,b){a.preventDefault();var c=jQuery(b).closest("tr").children("th").find("input").val(),d=jQuery(b).closest("tr").children("th").find("input").attr("id"),e=jQuery(b).closest("tbody").find('input[value="'+c+'"]').length;if("thumbnail"==c||"medium"==c||"large"==c)return alert(sis.notOriginal),!1;if(0!=e)return alert(sis.alreadyPresent),!1;var f=_.template(document.getElementById("sis-new_size_row").text,{size:sis.size,size_name:c,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("#"+d).closest("tr").html(f)},deleteSize:function(a,b){a.preventDefault();var c=confirm(sis.confirmDelete);1==c&&(jQuery(b).closest("tr").remove(),this.ajaxUnregister(b))},getPhp:function(a,b){a.preventDefault();var c=jQuery(b).closest("tr");jQuery.ajax({url:sis.ajaxUrl,type:"POST",data:{action:"sis_get_sizes"},beforeSend:function(){c.removeClass("addPending"),c.addClass("addPending")},success:function(a){jQuery("#get_php").nextAll("code").html("<br />"+a).show().css({display:"block"}),c.removeClass("addPending")}})},ajaxRegister:function(a,b){a.preventDefault();var c,d=this,e=jQuery(b).closest("table"),f=jQuery(".addSize").val(),g=jQuery(b).closest("tr"),h=g.find('input[name="image_name"]').val(),i=g.find("select.crop").val(),j=g.find("input.show").val(),k=g.find("input.n").val(),l=0,m=0;j=0==j||void 0==j?!1:!0,m=parseInt(g.find("input.w").val()),l=parseInt(g.find("input.h").val()),e.hasClass("ajaxing")||jQuery.ajax({url:sis.ajaxUrl,type:"POST",dataType:"json",data:{action:"sis_add_size",width:m,height:l,crop:i,name:h,show:j,customName:k,nonce:f},beforeSend:function(){g.removeClass(),g.addClass("addPending"),e.addClass("ajaxing")},success:function(a){var b="";g.removeClass(),e.removeClass("ajaxing"),0==a?b="errorAdding":2==a?(b="notChangedAdding",d.addToArray(h,m,l,i,b)):(b="successAdding",d.addToArray(h,m,l,i,b)),g.find("input.h").attr({base_h:l}),g.find("input.w").attr({base_w:m}),g.find("select.c").attr({base_c:i}),g.find("input.s").attr({base_s:j}),g.addClass(b),g.find("td").removeClass("notSaved"),g.find(".add_size").removeClass("validate_size").hide().children(".ui-button-text").text(sis.update),clearTimeout(c),c=setTimeout(function(){g.removeClass("errorAdding notChangedAdding successAdding")},2e3)}})},ajaxUnregister:function(a){var b=this,c=jQuery(a).closest("tr").find('input[name="image_name"]').val(),d=jQuery(a).closest("tr").find("input.deleteSize").val();jQuery.ajax({url:sis.ajaxUrl,type:"POST",data:{action:"sis_remove_size",name:c,nonce:d},success:function(){b.removeFromArray(a)}})},addToArray:function(a,b,c,d,e){var f,g=jQuery("#sis-"+a),h="";h=0!=g.length?g.closest("tr"):jQuery("#sis-regen .wrapper > table#sis_sizes > tbody > tr:first").clone().attr("id","sis-"+a),d=_.isUndefined(sis.crop_positions[d])?sis.fl:sis.crop_positions[d],h.find("th > label").attr("for",a).end().find("input.thumbnails").val(a).attr("id",a).end().find("th:nth-child(2) > label").text(a).end().find("th:nth-child(3) > label").text(b+"px").end().find("th:nth-child(4) > label").text(c+"px").end().find("th:nth-child(5) > label").text(d),0==g.length&&h.appendTo("#sis-regen .wrapper > table#sis_sizes > tbody"),h.removeClass("errorAdding notChangedAdding successAdding").addClass(e),clearTimeout(f),f=setTimeout(function(){h.removeClass("errorAdding notChangedAdding successAdding")},3e3)},removeFromArray:function(a){var b=jQuery(a).closest("tr").find("input[name=image_name]").val();jQuery("#sis-"+b).remove()},displayChange:function(a){var a=jQuery(a),b=a.closest("tr");if(b.hasClass("new_size"))return!1;var c=b.find("input.h"),d=b.find("input.w"),e=b.find("select.c"),f=b.find("input.s"),g=b.find("input.n"),h=c.val(),i=d.val(),j=e.val(),k=f.val(),l=g.val(),m=c.attr("base_h"),n=d.attr("base_w"),o=e.attr("base_c"),p=f.attr("base_s"),q=g.attr("base_n");o="0"==o?!1:!0,p="0"==p?!1:!0,h!=m||i!=n||j!=o||k!=p||l!=q?a.closest("td").addClass("notSaved").find(".add_size").css("display","inline-block"):a.closest("td").removeClass("notSaved").find(".add_size").css("display","none")}},jQuery(function(){rahe.sis.regenerate.init();var a=jQuery("#wpbody-content");jQuery("#ajax_thumbnail_rebuild").click(function(){rahe.sis.regenerate.checkStartRegenerating()}),a.on("click","#add_size",function(a){rahe.sis.sizes.add(a,this)}).on("click",".add_size_name",function(a){rahe.sis.sizes.register(a,this)}).on("click",".delete_size",function(a){rahe.sis.sizes.deleteSize(a,this)}).on("click",".add_size",function(a){rahe.sis.sizes.ajaxRegister(a,this)}).on("click keyup change",".h,.w,.c,.s,.n",function(){rahe.sis.sizes.displayChange(this)}).on("click","#get_php",function(a){rahe.sis.sizes.getPhp(a,this)}),jQuery("#get_php").nextAll("code").hide(),jQuery(".add_size").hide()});
|
classes/admin/main.php
ADDED
@@ -0,0 +1,308 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
Class SIS_Admin_Main {
|
3 |
+
|
4 |
+
public function __construct() {
|
5 |
+
add_action( 'admin_init', array( __CLASS__, 'register_assets' ) );
|
6 |
+
}
|
7 |
+
|
8 |
+
/**
|
9 |
+
*
|
10 |
+
*/
|
11 |
+
public static function register_assets() {
|
12 |
+
$suffix = defined( 'SCRIPT_DEBUG' ) && SCRIPT_DEBUG === true ? '' : '.min' ;
|
13 |
+
// Add javascript
|
14 |
+
wp_register_script( 'underscore', '//cdnjs.cloudflare.com/ajax/libs/underscore.js/1.6.0/underscore-min.js' , array(), '1.6.0' );
|
15 |
+
wp_register_script( 'sis_js', SIS_URL.'/assets/js/sis'.$suffix.'.js', array( 'jquery', 'jquery-ui-button', 'jquery-ui-progressbar', 'underscore' ), SIS_VERSION );
|
16 |
+
|
17 |
+
// Differencitate the scripts
|
18 |
+
wp_register_script( 'sis_js_attachments', SIS_URL.'/assets/js/sis-attachments'.$suffix.'.js', array( 'jquery' ), SIS_VERSION );
|
19 |
+
|
20 |
+
// Add javascript translation
|
21 |
+
wp_localize_script( 'sis_js', 'sis', self::localize_vars() );
|
22 |
+
wp_localize_script( 'sis_js_attachments', 'sis', self::localize_vars() );
|
23 |
+
|
24 |
+
// Add CSS
|
25 |
+
wp_enqueue_style( 'sis_css', SIS_URL.'/assets/css/sis-style'.$suffix.'.css', array(), SIS_VERSION );
|
26 |
+
}
|
27 |
+
|
28 |
+
|
29 |
+
/**
|
30 |
+
* Localize the var for javascript
|
31 |
+
*
|
32 |
+
* @access public
|
33 |
+
* @return array
|
34 |
+
* @author Nicolas Juen
|
35 |
+
*/
|
36 |
+
public static function localize_vars() {
|
37 |
+
return array(
|
38 |
+
'ajaxUrl' => admin_url( '/admin-ajax.php' ),
|
39 |
+
'reading' => __( 'Reading attachments...', 'simple-image-sizes' ),
|
40 |
+
'maximumWidth' => __( 'Maximum width', 'simple-image-sizes' ),
|
41 |
+
'maximumHeight' => __( 'Maximum height', 'simple-image-sizes' ),
|
42 |
+
'crop' => __( 'Crop', 'simple-image-sizes' ),
|
43 |
+
'tr' => __( 'yes', 'simple-image-sizes' ),
|
44 |
+
'fl' => __( 'no', 'simple-image-sizes' ),
|
45 |
+
'show' => __( 'Show in post insertion ?', 'simple-image-sizes' ),
|
46 |
+
'of' => __( ' of ', 'simple-image-sizes' ),
|
47 |
+
'or' => __( ' or ', 'simple-image-sizes' ),
|
48 |
+
'beforeEnd' => __( ' before the end.', 'simple-image-sizes' ),
|
49 |
+
'deleteImage' => __( 'Delete', 'simple-image-sizes' ),
|
50 |
+
'noMedia' => __( 'No media in your site to regenerate !', 'simple-image-sizes' ),
|
51 |
+
'regenerating' => __( 'Regenerating ', 'simple-image-sizes'),
|
52 |
+
'regenerate' => __( 'Regenerate ', 'simple-image-sizes'),
|
53 |
+
'validate' => __( 'Validate image size name', 'simple-image-sizes' ),
|
54 |
+
'done' => __( 'Done.', 'simple-image-sizes' ),
|
55 |
+
'size' => __( 'Size', 'simple-image-sizes' ),
|
56 |
+
'notOriginal' => __( 'Don\'t use the basic Wordpress thumbnail size name, use the form above to edit them', 'simple-image-sizes' ),
|
57 |
+
'alreadyPresent' => __( 'This size is already registered, edit it instead of recreating it.', 'simple-image-sizes' ),
|
58 |
+
'confirmDelete' => __( 'Do you really want to delete these size ?', 'simple-image-sizes' ),
|
59 |
+
'update' => __( 'Update', 'simple-image-sizes' ),
|
60 |
+
'ajaxErrorHandler' => __( 'Error requesting page', 'simple-image-sizes' ),
|
61 |
+
'messageRegenerated' => __( 'images have been regenerated !', 'simple-image-sizes' ),
|
62 |
+
'validateButton' => __( 'Validate', 'simple-image-sizes' ),
|
63 |
+
'startedAt' => __( ' started at', 'simple-image-sizes' ),
|
64 |
+
'customName' => __( 'Public name', 'simple-image-sizes' ),
|
65 |
+
'finishedAt' => __( ' finished at :', 'simple-image-sizes' ),
|
66 |
+
'phpError' => __( 'Error during the php treatment, be sure to not have php errors in your page', 'simple-image-sizes' ),
|
67 |
+
'notSaved' => __( 'All the sizes you have modifed are not saved, continue anyway ?', 'simple-image-sizes' ),
|
68 |
+
'soloRegenerated' => __( 'This image has been regenerated in %s seconds', 'simple-image-sizes' ),
|
69 |
+
'crop_positions' => self::get_available_crop(),
|
70 |
+
'regen_one' => wp_create_nonce( 'regen' )
|
71 |
+
);
|
72 |
+
}
|
73 |
+
|
74 |
+
/**
|
75 |
+
* Rebuild the given attribute with the given thumbnails
|
76 |
+
*
|
77 |
+
* @param $att_id
|
78 |
+
* @param $thumbnails
|
79 |
+
* @return array
|
80 |
+
* @author Nicolas Juen
|
81 |
+
*/
|
82 |
+
public static function thumbnail_rebuild( $att_id, $thumbnails = null ) {
|
83 |
+
global $wpdb;
|
84 |
+
// Time a the begining
|
85 |
+
timer_start();
|
86 |
+
|
87 |
+
// Check Id
|
88 |
+
if( (int)$att_id <= 0 ) {
|
89 |
+
return array(
|
90 |
+
'time' => timer_stop( false, 4 ),
|
91 |
+
'error' => __( 'No id given in POST datas.', 'simple-image-sizes' )
|
92 |
+
);
|
93 |
+
}
|
94 |
+
|
95 |
+
// Get the path
|
96 |
+
$fullsizepath = get_attached_file( $att_id );
|
97 |
+
|
98 |
+
// Regen the attachment
|
99 |
+
if ( false !== $fullsizepath && file_exists( $fullsizepath ) ) {
|
100 |
+
if( wp_update_attachment_metadata( $att_id, self::wp_generate_attachment_metadata_custom( $att_id, $fullsizepath, $thumbnails ) ) == false ) {
|
101 |
+
return array(
|
102 |
+
'src' => wp_get_attachment_thumb_url( $att_id ),
|
103 |
+
'time' => timer_stop( false, 4 ),
|
104 |
+
'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 ) )
|
105 |
+
);
|
106 |
+
}
|
107 |
+
} else {
|
108 |
+
return array(
|
109 |
+
'src' => wp_get_attachment_thumb_url( $att_id ),
|
110 |
+
'time' => timer_stop( false, 4 ),
|
111 |
+
'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 ) )
|
112 |
+
);
|
113 |
+
|
114 |
+
}
|
115 |
+
// Display the attachment url for feedback
|
116 |
+
return array(
|
117 |
+
'time' => timer_stop( false, 4 ),
|
118 |
+
'src' => wp_get_attachment_thumb_url( $att_id ),
|
119 |
+
'title' => get_the_title( $att_id )
|
120 |
+
);
|
121 |
+
}
|
122 |
+
|
123 |
+
/**
|
124 |
+
* Include the javascript template
|
125 |
+
*
|
126 |
+
* @param void
|
127 |
+
* @return bool
|
128 |
+
*/
|
129 |
+
public static function add_template() {
|
130 |
+
global $pagenow;
|
131 |
+
if( $pagenow != 'options-media.php' ) {
|
132 |
+
return false;
|
133 |
+
}
|
134 |
+
|
135 |
+
if( is_file( SIS_DIR.'/templates/admin-js.html' ) ) {
|
136 |
+
include( SIS_DIR.'/templates/admin-js.html' );
|
137 |
+
}
|
138 |
+
|
139 |
+
return true;
|
140 |
+
}
|
141 |
+
|
142 |
+
/**
|
143 |
+
* Get all the available cropping
|
144 |
+
*
|
145 |
+
* @return array
|
146 |
+
* @param void
|
147 |
+
* @author Nicolas Juen
|
148 |
+
*/
|
149 |
+
public static function get_available_crop() {
|
150 |
+
global $wp_version;
|
151 |
+
|
152 |
+
// Return the only possible
|
153 |
+
if( version_compare( '3.9', $wp_version, '<' ) ) {
|
154 |
+
return array( );
|
155 |
+
}
|
156 |
+
|
157 |
+
$x = array(
|
158 |
+
'left' => __( 'Left', 'simple-image-sizes' ),
|
159 |
+
'center' => __( 'Center', 'simple-image-sizes' ),
|
160 |
+
'right' => __( 'Right', 'simple-image-sizes' ),
|
161 |
+
);
|
162 |
+
|
163 |
+
$y = array(
|
164 |
+
'top' => __( 'top', 'simple-image-sizes' ),
|
165 |
+
'center' => __( 'center', 'simple-image-sizes' ),
|
166 |
+
'bottom' => __( 'bottom', 'simple-image-sizes' ),
|
167 |
+
);
|
168 |
+
|
169 |
+
$crops = array();
|
170 |
+
foreach ( $x as $x_pos => $x_pos_label ) {
|
171 |
+
foreach ( $y as $y_pos => $y_pos_label ) {
|
172 |
+
$crops[$x_pos.'_'.$y_pos] = $x_pos_label.' '.$y_pos_label;
|
173 |
+
}
|
174 |
+
}
|
175 |
+
|
176 |
+
return $crops;
|
177 |
+
}
|
178 |
+
|
179 |
+
/**
|
180 |
+
* Check if the crop is available
|
181 |
+
*
|
182 |
+
* @param string $crop_position
|
183 |
+
* @return bool
|
184 |
+
* @author Nicolas Juen
|
185 |
+
*/
|
186 |
+
public static function is_crop_position( $crop_position = '' ) {
|
187 |
+
$crops = self::get_available_crop();
|
188 |
+
return isset( $crops[$crop_position] );
|
189 |
+
}
|
190 |
+
|
191 |
+
/**
|
192 |
+
* Return the crop position label from the slug
|
193 |
+
*
|
194 |
+
*
|
195 |
+
* @param string $crop_position
|
196 |
+
* @return string
|
197 |
+
* @author Nicolas Juen
|
198 |
+
*/
|
199 |
+
public static function get_crop_position_label( $crop_position = '' ) {
|
200 |
+
if( !self::is_crop_position( $crop_position ) ) {
|
201 |
+
return '';
|
202 |
+
}
|
203 |
+
$crops = self::get_available_crop();
|
204 |
+
return $crops[$crop_position];
|
205 |
+
}
|
206 |
+
|
207 |
+
|
208 |
+
/**
|
209 |
+
* Display a json encoded element with right headers
|
210 |
+
*
|
211 |
+
* @param $data(optional) : the element to display ( if needed )
|
212 |
+
* @return void
|
213 |
+
* @author Nicolas Juen
|
214 |
+
*/
|
215 |
+
public static function displayJson( $data = array() ) {
|
216 |
+
if( function_exists( 'wp_send_json' ) ) {
|
217 |
+
wp_send_json( $data );
|
218 |
+
}
|
219 |
+
|
220 |
+
header('Cache-Control: no-cache, must-revalidate');
|
221 |
+
header('Expires: Mon, 26 Jul 1997 05:00:00 GMT');
|
222 |
+
header('Content-type: application/json');
|
223 |
+
echo json_encode( $data );
|
224 |
+
die();
|
225 |
+
}
|
226 |
+
|
227 |
+
/**
|
228 |
+
* Generate post thumbnail attachment meta data.
|
229 |
+
*
|
230 |
+
* @since 2.1.0
|
231 |
+
*
|
232 |
+
* @param int $attachment_id Attachment Id to process.
|
233 |
+
* @param string $file Filepath of the Attached image.
|
234 |
+
* @return mixed Metadata for attachment.
|
235 |
+
*/
|
236 |
+
public static function wp_generate_attachment_metadata_custom( $attachment_id, $file, $thumbnails = NULL ) {
|
237 |
+
$attachment = get_post( $attachment_id );
|
238 |
+
|
239 |
+
$meta_datas = get_post_meta( $attachment_id, '_wp_attachment_metadata', true );
|
240 |
+
|
241 |
+
$metadata = array();
|
242 |
+
if ( preg_match('!^image/!', get_post_mime_type( $attachment )) && file_is_displayable_image($file) ) {
|
243 |
+
$imagesize = getimagesize( $file );
|
244 |
+
$metadata['width'] = $imagesize[0];
|
245 |
+
$metadata['height'] = $imagesize[1];
|
246 |
+
list($uwidth, $uheight) = wp_constrain_dimensions($metadata['width'], $metadata['height'], 128, 96);
|
247 |
+
$metadata['hwstring_small'] = "height='$uheight' width='$uwidth'";
|
248 |
+
|
249 |
+
// Make the file path relative to the upload dir
|
250 |
+
$metadata['file'] = _wp_relative_upload_path($file);
|
251 |
+
|
252 |
+
// make thumbnails and other intermediate sizes
|
253 |
+
global $_wp_additional_image_sizes;
|
254 |
+
|
255 |
+
foreach ( get_intermediate_image_sizes() as $s ) {
|
256 |
+
$sizes[$s] = array( 'width' => '', 'height' => '', 'crop' => FALSE );
|
257 |
+
if ( isset( $_wp_additional_image_sizes[$s]['width'] ) )
|
258 |
+
$sizes[$s]['width'] = intval( $_wp_additional_image_sizes[$s]['width'] ); // For theme-added sizes
|
259 |
+
else
|
260 |
+
$sizes[$s]['width'] = get_option( "{$s}_size_w" ); // For default sizes set in options
|
261 |
+
if ( isset( $_wp_additional_image_sizes[$s]['height'] ) )
|
262 |
+
$sizes[$s]['height'] = intval( $_wp_additional_image_sizes[$s]['height'] ); // For theme-added sizes
|
263 |
+
else
|
264 |
+
$sizes[$s]['height'] = get_option( "{$s}_size_h" ); // For default sizes set in options
|
265 |
+
if ( isset( $_wp_additional_image_sizes[$s]['crop'] ) )
|
266 |
+
$sizes[$s]['crop'] = intval( $_wp_additional_image_sizes[$s]['crop'] ); // For theme-added sizes
|
267 |
+
else
|
268 |
+
$sizes[$s]['crop'] = get_option( "{$s}_crop" ); // For default sizes set in options
|
269 |
+
}
|
270 |
+
|
271 |
+
$sizes = apply_filters( 'intermediate_image_sizes_advanced', $sizes );
|
272 |
+
|
273 |
+
// Only if not all sizes
|
274 |
+
if( isset( $thumbnails ) && is_array( $thumbnails ) && isset( $meta_datas['sizes'] ) && !empty( $meta_datas['sizes'] ) ) {
|
275 |
+
// Fill the array with the other sizes not have to be done
|
276 |
+
foreach( $meta_datas['sizes'] as $name => $fsize ) {
|
277 |
+
$metadata['sizes'][$name] = $fsize;
|
278 |
+
}
|
279 |
+
}
|
280 |
+
|
281 |
+
foreach ( $sizes as $size => $size_data ) {
|
282 |
+
if( isset( $thumbnails ) )
|
283 |
+
if( !in_array( $size, $thumbnails ) ) {
|
284 |
+
continue;
|
285 |
+
}
|
286 |
+
|
287 |
+
$resized = image_make_intermediate_size( $file, $size_data['width'], $size_data['height'], $size_data['crop'] );
|
288 |
+
|
289 |
+
if( isset( $meta_datas['size'][$size] ) ) {
|
290 |
+
// Remove the size from the orignal sizes for after work
|
291 |
+
unset( $meta_datas['size'][$size] );
|
292 |
+
}
|
293 |
+
|
294 |
+
if ( $resized ) {
|
295 |
+
$metadata['sizes'][$size] = $resized;
|
296 |
+
}
|
297 |
+
}
|
298 |
+
|
299 |
+
// fetch additional metadata from exif/iptc
|
300 |
+
$image_meta = wp_read_image_metadata( $file );
|
301 |
+
if ( $image_meta ) {
|
302 |
+
$metadata['image_meta'] = $image_meta;
|
303 |
+
}
|
304 |
+
}
|
305 |
+
|
306 |
+
return apply_filters( 'wp_generate_attachment_metadata', $metadata, $attachment_id );
|
307 |
+
}
|
308 |
+
}
|
classes/admin/media.php
ADDED
@@ -0,0 +1,477 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
Class SIS_Admin_Media {
|
3 |
+
|
4 |
+
// Original sizes
|
5 |
+
public static $original = array( 'thumbnail', 'medium', 'large' );
|
6 |
+
|
7 |
+
public function __construct() {
|
8 |
+
// Init
|
9 |
+
|
10 |
+
add_action( 'admin_menu', array( __CLASS__, 'init' ) );
|
11 |
+
add_action( 'admin_enqueue_scripts', array( __CLASS__, 'enqueue_assets' ), 11 );
|
12 |
+
|
13 |
+
// Add ajax action
|
14 |
+
// Option page
|
15 |
+
add_action( 'wp_ajax_'.'sis_get_list', array( __CLASS__, 'a_get_list' ) );
|
16 |
+
add_action( 'wp_ajax_'.'sis_rebuild_images', array( __CLASS__, 'a_thumbnails_rebuild' ) );
|
17 |
+
add_action( 'wp_ajax_'.'sis_get_sizes', array( __CLASS__, 'a_get_sizes' ) );
|
18 |
+
add_action( 'wp_ajax_'.'sis_add_size', array( __CLASS__, 'a_add_size' ) );
|
19 |
+
add_action( 'wp_ajax_'.'sis_remove_size', array( __CLASS__, 'a_remove_size' ) );
|
20 |
+
|
21 |
+
// Add link in plugins list
|
22 |
+
add_filter( 'plugin_action_links', array( __CLASS__,'add_settings_link' ), 10, 2 );
|
23 |
+
}
|
24 |
+
|
25 |
+
/**
|
26 |
+
* Register javascripts and css.
|
27 |
+
*
|
28 |
+
* @access public
|
29 |
+
* @return void
|
30 |
+
* @author Nicolas Juen
|
31 |
+
*/
|
32 |
+
public static function enqueue_assets( $hook_suffix = '' ) {
|
33 |
+
if( !isset( $hook_suffix ) || empty( $hook_suffix ) ) {
|
34 |
+
return false;
|
35 |
+
}
|
36 |
+
|
37 |
+
if( $hook_suffix == 'options-media.php' ) {
|
38 |
+
// Add javascript
|
39 |
+
wp_enqueue_script( 'sis_js' );
|
40 |
+
|
41 |
+
// Add CSS
|
42 |
+
wp_enqueue_style( 'sis_css' );
|
43 |
+
|
44 |
+
// Add underscore template
|
45 |
+
add_action( 'admin_footer', array( 'SIS_Admin_Main', 'add_template' ) );
|
46 |
+
}
|
47 |
+
}
|
48 |
+
|
49 |
+
|
50 |
+
|
51 |
+
/**
|
52 |
+
* Add a link to the setting option page
|
53 |
+
*
|
54 |
+
* @access public
|
55 |
+
* @param array $links
|
56 |
+
* @param string $file
|
57 |
+
* @return void
|
58 |
+
* @author Nicolas Juen
|
59 |
+
*/
|
60 |
+
public static function add_settings_link( $links, $file ) {
|
61 |
+
|
62 |
+
if( $file != 'simple-image-sizes/simple_image_sizes.php' ) {
|
63 |
+
return $links;
|
64 |
+
}
|
65 |
+
|
66 |
+
$settings_link = '<a href="'.admin_url('options-media.php').'"> '.__( 'Settings', 'simple-image-sizes' ).' </a>';
|
67 |
+
array_unshift( $links, $settings_link );
|
68 |
+
|
69 |
+
return $links;
|
70 |
+
}
|
71 |
+
|
72 |
+
/**
|
73 |
+
* Init for the option page
|
74 |
+
*
|
75 |
+
* @access public
|
76 |
+
* @return void
|
77 |
+
* @author Nicolas Juen
|
78 |
+
*/
|
79 |
+
public static function init() {
|
80 |
+
// Check if admin
|
81 |
+
if( !is_admin() ) {
|
82 |
+
return false;
|
83 |
+
}
|
84 |
+
|
85 |
+
// Get the image sizes
|
86 |
+
global $_wp_additional_image_sizes;
|
87 |
+
$options = get_option( SIS_OPTION );
|
88 |
+
|
89 |
+
// Get the sizes and add the settings
|
90 |
+
foreach ( get_intermediate_image_sizes() as $s ) {
|
91 |
+
// Don't make the original sizes or numeric sizes that appear
|
92 |
+
if( in_array( $s, self::$original ) || is_integer( $s ) ) {
|
93 |
+
continue;
|
94 |
+
}
|
95 |
+
|
96 |
+
// Set width
|
97 |
+
$width = isset( $_wp_additional_image_sizes[$s]['width'] ) ? intval( $_wp_additional_image_sizes[$s]['width'] ) : get_option( "{$s}_size_w" ) ;
|
98 |
+
|
99 |
+
// Set height
|
100 |
+
$height = isset( $_wp_additional_image_sizes[$s]['height'] ) ? intval( $_wp_additional_image_sizes[$s]['height'] ) : get_option( "{$s}_size_h" ) ;
|
101 |
+
|
102 |
+
//Set crop
|
103 |
+
$crop = isset( $_wp_additional_image_sizes[$s]['crop'] ) ? intval( $_wp_additional_image_sizes[$s]['crop'] ) : get_option( "{$s}_crop" ) ;
|
104 |
+
|
105 |
+
// Add the setting field for this size
|
106 |
+
add_settings_field( 'image_size_'.$s, sprintf( __( '%s size', 'simple-image-sizes' ), $s ), array( __CLASS__, 'image_sizes' ), 'media' , 'default', array( 'name' => $s , 'width' => $width , 'height' => $height, 'c' => $crop ) );
|
107 |
+
}
|
108 |
+
|
109 |
+
// Register the setting for media option page
|
110 |
+
register_setting( 'media', SIS_OPTION );
|
111 |
+
|
112 |
+
// Add the button
|
113 |
+
add_settings_field( 'add_size_button', __( 'Add a new size', 'simple-image-sizes' ), array( __CLASS__, 'addSizeButton' ), 'media' );
|
114 |
+
|
115 |
+
// Add php button
|
116 |
+
add_settings_field( 'get_php_button', __( 'Get php for theme', 'simple-image-sizes' ), array( __CLASS__, 'getPhpButton' ), 'media' );
|
117 |
+
|
118 |
+
// Add section for the thumbnail regeneration
|
119 |
+
add_settings_section( 'thumbnail_regenerate', __( 'Thumbnail regeneration', 'simple-image-sizes' ), array( __CLASS__, 'thumbnailRegenerate' ), 'media' );
|
120 |
+
}
|
121 |
+
|
122 |
+
/**
|
123 |
+
* Display the row of the image size
|
124 |
+
*
|
125 |
+
* @access public
|
126 |
+
* @param mixed $args
|
127 |
+
* @return void
|
128 |
+
* @author Nicolas Juen
|
129 |
+
*/
|
130 |
+
public static function image_sizes( $args ) {
|
131 |
+
|
132 |
+
if( is_integer( $args['name'] ) ) {
|
133 |
+
return false;
|
134 |
+
}
|
135 |
+
|
136 |
+
// Get the options
|
137 |
+
$sizes = (array)get_option( SIS_OPTION, array() );
|
138 |
+
|
139 |
+
// Get the vars
|
140 |
+
$height = isset( $sizes[$args['name']]['h'] )? $sizes[$args['name']]['h'] : $args['height'] ;
|
141 |
+
$width = isset( $sizes[$args['name']]['w'] )? $sizes[$args['name']]['w'] : $args['width'] ;
|
142 |
+
$crop = isset( $sizes[$args['name']]['c'] ) && !empty( $sizes[$args['name']]['c'] )? $sizes[$args['name']]['c'] : $args['c'] ;
|
143 |
+
$show = isset( $sizes[$args['name']]['s'] ) && !empty( $sizes[$args['name']]['s'] )? '1' : '0' ;
|
144 |
+
$custom = isset( $sizes[$args['name']]['custom'] ) && !empty( $sizes[$args['name']]['custom'] )? '1' : '0' ;
|
145 |
+
$name = isset( $sizes[$args['name']]['n'] ) && !empty( $sizes[$args['name']]['n'] )? esc_html( $sizes[$args['name']]['n'] ) : esc_html( $args['name'] ) ;
|
146 |
+
?>
|
147 |
+
<input type="hidden" value="<?php echo esc_attr( $args['name'] ); ?>" name="image_name" />
|
148 |
+
<?php if( $custom ): ?>
|
149 |
+
<input name="<?php echo esc_attr( 'custom_image_sizes['.$args['name'].'][custom]' ); ?>" type="hidden" id="<?php echo esc_attr( 'custom_image_sizes['.$args['name'].'][custom]' ); ?>" value="1" />
|
150 |
+
<?php else: ?>
|
151 |
+
<input name="<?php echo esc_attr( 'custom_image_sizes['.$args['name'].'][theme]' ); ?>" type="hidden" id="<?php echo esc_attr( 'custom_image_sizes['.$args['name'].'][theme]' ); ?>" value="1" />
|
152 |
+
<?php endif; ?>
|
153 |
+
<label class="sis-label" for="<?php echo esc_attr( 'custom_image_sizes['.$args['name'].'][w]' ); ?>">
|
154 |
+
<?php _e( 'Maximum width', 'simple-image-sizes'); ?>
|
155 |
+
<input name="<?php esc_attr_e( 'custom_image_sizes['.$args['name'].'][w]' ); ?>" class='w small-text' type="number" step='1' min='0' id="<?php echo esc_attr( 'custom_image_sizes['.$args['name'].'][w]' ); ?>" base_w='<?php echo esc_attr( $width ); ?>' value="<?php echo esc_attr( $width ); ?>" />
|
156 |
+
</label>
|
157 |
+
<label class="sis-label" for="<?php esc_attr_e( 'custom_image_sizes['.$args['name'].'][h]' ); ?>">
|
158 |
+
<?php _e( 'Maximum height', 'simple-image-sizes'); ?>
|
159 |
+
<input name="<?php esc_attr_e( 'custom_image_sizes['.$args['name'].'][h]' ); ?>" class='h small-text' type="number" step='1' min='0' id="<?php echo esc_attr( 'custom_image_sizes['.$args['name'].'][h]' ); ?>" base_h='<?php echo esc_attr( $height ); ?>' value="<?php echo esc_attr( $height ); ?>" />
|
160 |
+
</label>
|
161 |
+
<label class="sis-label" for="<?php echo esc_attr( 'custom_image_sizes['.$args['name'].'][n]' ); ?>">
|
162 |
+
<?php _e( 'Public name', 'simple-image-sizes'); ?>
|
163 |
+
<input name="<?php echo esc_attr( 'custom_image_sizes['.$args['name'].'][n]' ); ?>" class='n' type="text" id="<?php echo esc_attr( 'custom_image_sizes['.$args['name'].'][n]' ); ?>" base_n='<?php echo $name; ?>' value="<?php echo $name ?>" />
|
164 |
+
</label>
|
165 |
+
<span class="size_options">
|
166 |
+
<label class="c" for="<?php echo esc_attr( 'custom_image_sizes['.$args['name'].'][c]' ); ?>"><?php _e( 'Cropping', 'simple-image-sizes'); ?></label>
|
167 |
+
<select id="<?php echo esc_attr( 'custom_image_sizes['.$args['name'].'][c]' ); ?>" class="c crop" base_c='<?php echo esc_attr( $crop ); ?>' name="<?php echo esc_attr( 'custom_image_sizes['.$args['name'].'][c]' ); ?>" >
|
168 |
+
<option value="0" <?php selected( 0, $crop ); ?>><?php esc_html_e( 'No', 'simple-image-sizes' ); ?></option>
|
169 |
+
<option value="1" <?php selected( 1, $crop ); ?>><?php esc_html_e( 'Yes', 'simple-image-sizes' ); ?></option>
|
170 |
+
<?php foreach( SIS_Admin_Main::get_available_crop() as $crop_position => $label ): ?>
|
171 |
+
<option <?php selected( $crop_position, $crop ); ?> value="<?php echo esc_attr( $crop_position ) ?>"><?php echo esc_html( $label ); ?></option>
|
172 |
+
<?php endforeach; ?>
|
173 |
+
</select>
|
174 |
+
|
175 |
+
<input type='checkbox' id="<?php echo esc_attr( 'custom_image_sizes['.$args['name'].'][s]'); ?>" <?php checked( $show, 1 ) ?> class="s show" base_s='<?php echo esc_attr( $show ); ?>' name="<?php echo esc_attr( 'custom_image_sizes['.$args['name'].'][s]'); ?>" value="1" />
|
176 |
+
<label class="s" for="<?php echo esc_attr( 'custom_image_sizes['.$args['name'].'][s]'); ?>"><?php _e( 'Show in post insertion ?', 'simple-image-sizes'); ?></label>
|
177 |
+
</span>
|
178 |
+
<span class="delete_size button-secondary"><?php _e( 'Delete', 'simple-image-sizes'); ?></span>
|
179 |
+
<span class="add_size validate_size button-primary"><?php _e( 'Update', 'simple-image-sizes'); ?></span>
|
180 |
+
|
181 |
+
<input type="hidden" class="deleteSize button-primary" value='<?php echo wp_create_nonce( 'delete_'.$args['name'] ); ?>' />
|
182 |
+
<?php }
|
183 |
+
|
184 |
+
/**
|
185 |
+
* Add the button to add a size
|
186 |
+
*
|
187 |
+
* @access public
|
188 |
+
* @return void
|
189 |
+
* @author Nicolas Juen
|
190 |
+
*/
|
191 |
+
public static function addSizeButton() { ?>
|
192 |
+
<input type="button" class="button-secondary action" id="add_size" value="<?php esc_attr_e( 'Add a new size of thumbnail', 'simple-image-sizes'); ?>" />
|
193 |
+
<?php
|
194 |
+
}
|
195 |
+
|
196 |
+
/**
|
197 |
+
* Add the button to get the php for th sizes
|
198 |
+
*
|
199 |
+
* @access public
|
200 |
+
* @return void
|
201 |
+
* @author Nicolas Juen
|
202 |
+
*/
|
203 |
+
public static function getPhpButton() { ?>
|
204 |
+
<input type="button" class="button-secondary action" id="get_php" value="<?php esc_attr_e( 'Get the PHP for the theme', 'simple-image-sizes'); ?>" />
|
205 |
+
<p> <?php _e( 'Copy and paste the code below into your Wordpress theme function file if you wanted to save them and deactivate the plugin.', 'simple-image-sizes'); ?> </p>
|
206 |
+
<code></code>
|
207 |
+
<?php
|
208 |
+
}
|
209 |
+
|
210 |
+
/**
|
211 |
+
* Display the Table of sizes and post types for regenerating
|
212 |
+
*
|
213 |
+
* @access public
|
214 |
+
* @return void
|
215 |
+
* @author Nicolas Juen
|
216 |
+
*/
|
217 |
+
public static function thumbnailRegenerate() {
|
218 |
+
if( is_file( SIS_DIR.'/templates/options-media.php' ) ) {
|
219 |
+
include( SIS_DIR.'/templates/options-media.php' );
|
220 |
+
} else {
|
221 |
+
esc_html_e( 'Admin option-media template missing', 'simple-image-sizes' );
|
222 |
+
}
|
223 |
+
}
|
224 |
+
|
225 |
+
/**
|
226 |
+
* Add a size by Ajax
|
227 |
+
*
|
228 |
+
* @access public
|
229 |
+
* @return void
|
230 |
+
* @author Nicolas Juen
|
231 |
+
*/
|
232 |
+
public static function a_add_size() {
|
233 |
+
|
234 |
+
// Get the nonce
|
235 |
+
$nonce = isset( $_POST['nonce'] ) ? $_POST['nonce']: '' ;
|
236 |
+
|
237 |
+
// Get old options
|
238 |
+
$sizes = (array)get_option( SIS_OPTION, array() );
|
239 |
+
$croppings = SIS_Admin_Main::get_available_crop();
|
240 |
+
$croppings[true] = '';
|
241 |
+
$croppings[false] = '';
|
242 |
+
|
243 |
+
// Check entries
|
244 |
+
$name = isset( $_POST['name'] ) ? sanitize_title( $_POST['name'] ): '' ;
|
245 |
+
$height = !isset( $_POST['height'] )? 0 : absint( $_POST['height'] );
|
246 |
+
$width = !isset( $_POST['width'] )? 0 : absint( $_POST['width'] );
|
247 |
+
$crop = isset( $_POST['crop'] ) && isset( $croppings[$_POST['crop']] ) ? $_POST['crop'] : false;
|
248 |
+
$show = isset( $_POST['show'] ) && $_POST['show'] == 'false' ? false : true;
|
249 |
+
$cn = isset( $_POST['customName'] ) && !empty( $_POST['customName'] ) ? sanitize_text_field( $_POST['customName'] ): $name ;
|
250 |
+
|
251 |
+
// Check the nonce
|
252 |
+
if( !wp_verify_nonce( $nonce , 'add_size' ) ) {
|
253 |
+
die(0);
|
254 |
+
}
|
255 |
+
|
256 |
+
// If no name given do not save
|
257 |
+
if( empty( $name ) ) {
|
258 |
+
die(0);
|
259 |
+
}
|
260 |
+
|
261 |
+
// Make values
|
262 |
+
$values = array( 'custom' => 1, 'w' => $width , 'h' => $height, 'c' => $crop, 's' => $show, 'n' => $cn );
|
263 |
+
|
264 |
+
// If the size have not changed return 2
|
265 |
+
if( isset( $sizes[$name] ) && $sizes[$name] === $values ) {
|
266 |
+
die(2);
|
267 |
+
}
|
268 |
+
|
269 |
+
// Put the new values
|
270 |
+
$sizes[$name] = $values;
|
271 |
+
|
272 |
+
// display update result
|
273 |
+
echo (int)update_option( 'custom_image_sizes', $sizes );
|
274 |
+
die();
|
275 |
+
}
|
276 |
+
|
277 |
+
/**
|
278 |
+
* Remove a size by Ajax
|
279 |
+
*
|
280 |
+
* @access public
|
281 |
+
* @return void
|
282 |
+
* @author Nicolas Juen
|
283 |
+
*/
|
284 |
+
public static function a_remove_size() {
|
285 |
+
|
286 |
+
// Get old options
|
287 |
+
$sizes = (array)get_option( SIS_OPTION, array() );
|
288 |
+
|
289 |
+
// Get the nonce and name
|
290 |
+
$nonce = isset( $_POST['nonce'] ) ? $_POST['nonce']: '' ;
|
291 |
+
$name = isset( $_POST['name'] ) ? sanitize_title( $_POST['name'] ): '' ;
|
292 |
+
|
293 |
+
// Check the nonce
|
294 |
+
if( !wp_verify_nonce( $nonce , 'delete_'.$name ) ) {
|
295 |
+
die(0);
|
296 |
+
}
|
297 |
+
|
298 |
+
// Remove the size
|
299 |
+
unset( $sizes[sanitize_title( $name )] );
|
300 |
+
unset( $sizes[0] );
|
301 |
+
|
302 |
+
// Display the results
|
303 |
+
echo (int)update_option( SIS_OPTION, $sizes );
|
304 |
+
die();
|
305 |
+
}
|
306 |
+
|
307 |
+
/**
|
308 |
+
* Display the add_image_size for the registered sizes
|
309 |
+
*
|
310 |
+
* @access public
|
311 |
+
* @return void
|
312 |
+
*/
|
313 |
+
public static function a_get_sizes() {
|
314 |
+
global $_wp_additional_image_sizes,$wp_version;
|
315 |
+
|
316 |
+
foreach ( get_intermediate_image_sizes() as $s ) {
|
317 |
+
// Don't make the original sizes
|
318 |
+
if( in_array( $s, self::$original ) ) {
|
319 |
+
continue;
|
320 |
+
}
|
321 |
+
|
322 |
+
// Set width
|
323 |
+
$width = isset( $_wp_additional_image_sizes[$s]['width'] ) ? intval( $_wp_additional_image_sizes[$s]['width'] ) : get_option( "{$s}_size_w" ) ;
|
324 |
+
|
325 |
+
// Set height
|
326 |
+
$height = isset( $_wp_additional_image_sizes[$s]['height'] ) ? intval( $_wp_additional_image_sizes[$s]['height'] ) : get_option( "{$s}_size_h" ) ;
|
327 |
+
|
328 |
+
//Set crop
|
329 |
+
$crop = isset( $_wp_additional_image_sizes[$s]['crop'] ) ? $_wp_additional_image_sizes[$s]['crop'] : get_option( "{$s}_crop" ) ;
|
330 |
+
|
331 |
+
if( is_bool( $crop ) || is_numeric( $crop ) || version_compare( '3.9', $wp_version, '<' ) ) {
|
332 |
+
$crop = ( absint( $crop ) == 0 )? 'false' : 'true' ;
|
333 |
+
} else {
|
334 |
+
if( !Sis_Admin_Main::is_crop_position( $crop ) ){
|
335 |
+
$crop = "false";
|
336 |
+
} else {
|
337 |
+
$crop = explode( '_', $crop );
|
338 |
+
$crop = 'array( "'.$crop[0].'", "'.$crop[1].'")';
|
339 |
+
}
|
340 |
+
}
|
341 |
+
?>
|
342 |
+
add_image_size( '<?php echo $s; ?>', '<?php echo $width; ?>', '<?php echo $height; ?>', <?php echo $crop; ?> );<br />
|
343 |
+
<?php
|
344 |
+
}
|
345 |
+
|
346 |
+
die();
|
347 |
+
}
|
348 |
+
|
349 |
+
/**
|
350 |
+
*
|
351 |
+
* Get the media list to regenerate
|
352 |
+
*
|
353 |
+
* @param : void
|
354 |
+
* @return oid
|
355 |
+
*/
|
356 |
+
public static function a_get_list() {
|
357 |
+
global $wpdb;
|
358 |
+
// Basic vars
|
359 |
+
$res = array();
|
360 |
+
$nonce = isset( $_POST['nonce'] ) ? $_POST['nonce']: '' ;
|
361 |
+
|
362 |
+
// Check the nonce
|
363 |
+
if( !wp_verify_nonce( $nonce , 'getList' ) ) {
|
364 |
+
SIS_Admin_Main::displayJson();
|
365 |
+
}
|
366 |
+
|
367 |
+
if ( isset( $_POST['post_types'] ) && !empty( $_POST['post_types'] ) ) {
|
368 |
+
|
369 |
+
foreach( $_POST['post_types'] as $key => $type ) {
|
370 |
+
if( !post_type_exists( $type ) ) {
|
371 |
+
unset( $_POST['post_types'][$key] );
|
372 |
+
}
|
373 |
+
}
|
374 |
+
|
375 |
+
if( empty( $_POST['post_types'][$key]) ) {
|
376 |
+
SIS_Admin_Main::displayJson();
|
377 |
+
}
|
378 |
+
|
379 |
+
// Get image medias
|
380 |
+
$whichmimetype = wp_post_mime_type_where( 'image', $wpdb->posts );
|
381 |
+
|
382 |
+
// Get all parent from post type
|
383 |
+
$attachments = $wpdb->get_var( "SELECT COUNT( ID )
|
384 |
+
FROM $wpdb->posts
|
385 |
+
WHERE 1 = 1
|
386 |
+
AND post_type = 'attachment'
|
387 |
+
$whichmimetype
|
388 |
+
AND post_parent IN (
|
389 |
+
SELECT DISTINCT ID
|
390 |
+
FROM $wpdb->posts
|
391 |
+
WHERE post_type IN ('".implode( "', '", $_POST['post_types'] )."')
|
392 |
+
)" );
|
393 |
+
|
394 |
+
} else {
|
395 |
+
$attachments = get_children( array(
|
396 |
+
'post_type' => 'attachment',
|
397 |
+
'post_mime_type' => 'image',
|
398 |
+
'numberposts' => -1,
|
399 |
+
'post_status' => null,
|
400 |
+
'post_parent' => null, // any parent
|
401 |
+
'output' => 'ids',
|
402 |
+
) );
|
403 |
+
}
|
404 |
+
|
405 |
+
// Return the Id's and Title of medias
|
406 |
+
SIS_Admin_Main::displayJson( array( 'total' => count( $attachments ) ) );
|
407 |
+
}
|
408 |
+
|
409 |
+
/**
|
410 |
+
* Regenerate the thumbnails ajax action
|
411 |
+
*
|
412 |
+
* @return array
|
413 |
+
* @param void
|
414 |
+
* @author Nicolas Juen
|
415 |
+
*/
|
416 |
+
public static function a_thumbnails_rebuild() {
|
417 |
+
// Get the nonce
|
418 |
+
$nonce = isset( $_POST['nonce'] ) ? $_POST['nonce']: '' ;
|
419 |
+
$offset = isset( $_POST['offset'] ) ? absint( $_POST['offset'] ) : 0 ;
|
420 |
+
$post_types = isset( $_POST['post_types'] ) ? $_POST['post_types'] : 'any' ;
|
421 |
+
$thumbnails = isset( $_POST['thumbnails'] )? $_POST['thumbnails'] : NULL;
|
422 |
+
|
423 |
+
// Check the nonce
|
424 |
+
if( !wp_verify_nonce( $nonce , 'regen' ) ) {
|
425 |
+
SIS_Admin_Main::displayJson( array( 'error' => _e( 'Trying to cheat ?', 'simple-image-sizes' ) ) );
|
426 |
+
}
|
427 |
+
|
428 |
+
if ( $post_types !== 'any' ) {
|
429 |
+
|
430 |
+
foreach( $_POST['post_types'] as $key => $type ) {
|
431 |
+
if( !post_type_exists( $type ) ) {
|
432 |
+
unset( $_POST['post_types'][$key] );
|
433 |
+
}
|
434 |
+
}
|
435 |
+
|
436 |
+
if( empty( $_POST['post_types'][$key]) ) {
|
437 |
+
SIS_Admin_Main::displayJson();
|
438 |
+
}
|
439 |
+
|
440 |
+
// Get image medias
|
441 |
+
$whichmimetype = wp_post_mime_type_where( 'image', $wpdb->posts );
|
442 |
+
|
443 |
+
// Get all parent from post type
|
444 |
+
$attachment = $wpdb->get_var( $wpdb->prepare( "SELECT ID
|
445 |
+
FROM $wpdb->posts
|
446 |
+
WHERE 1 = 1
|
447 |
+
AND post_type = 'attachment'
|
448 |
+
$whichmimetype
|
449 |
+
AND post_parent IN (
|
450 |
+
SELECT DISTINCT ID
|
451 |
+
FROM $wpdb->posts
|
452 |
+
WHERE post_type IN ('".implode( "', '", $_POST['post_types'] )."')
|
453 |
+
)
|
454 |
+
LIMIT %d,1
|
455 |
+
", $offset ) );
|
456 |
+
|
457 |
+
} else {
|
458 |
+
$attachment = get_posts( array(
|
459 |
+
'post_type' => 'attachment',
|
460 |
+
'post_mime_type' => 'image',
|
461 |
+
'numberposts' => 1,
|
462 |
+
'post_status' => 'any',
|
463 |
+
'output' => 'object',
|
464 |
+
'offset' => $offset
|
465 |
+
) );
|
466 |
+
|
467 |
+
$attachment = !empty( $attachment ) ? $attachment[0]->ID : 0 ;
|
468 |
+
}
|
469 |
+
|
470 |
+
if( empty( $attachment ) ) {
|
471 |
+
return array(
|
472 |
+
'message' => __( 'Regeneration ended', 'simple-image-sizes')
|
473 |
+
);
|
474 |
+
}
|
475 |
+
SIS_Admin_Main::displayJson( SIS_Admin_Main::thumbnail_rebuild( $attachment, $thumbnails ) );
|
476 |
+
}
|
477 |
+
}
|
classes/admin/post.php
ADDED
@@ -0,0 +1,252 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
Class SIS_Admin_Post {
|
3 |
+
public function __construct(){
|
4 |
+
// Add image sizes in the form, check if 3.3 is installed or not
|
5 |
+
if( !function_exists( 'is_main_query' ) ) {
|
6 |
+
add_filter( 'attachment_fields_to_edit', array( __CLASS__, 'sizes_in_form' ), 11, 2 ); // Add our sizes to media forms
|
7 |
+
} else {
|
8 |
+
add_filter( 'image_size_names_choose', array( __CLASS__, 'add_thumbnail_name' ) );
|
9 |
+
}
|
10 |
+
|
11 |
+
add_action( 'admin_enqueue_scripts', array( __CLASS__, 'enqueue_assets' ), 11 );
|
12 |
+
|
13 |
+
// Rebuilt the image
|
14 |
+
add_action( 'wp_ajax_'.'sis_rebuild_image', array( __CLASS__, 'a_thumbnail_rebuild' ) );
|
15 |
+
|
16 |
+
// Add action in media row quick actions
|
17 |
+
add_filter( 'media_row_actions', array( __CLASS__, 'add_actions_list' ), 10, 2 );
|
18 |
+
|
19 |
+
// Add filter for the Media single
|
20 |
+
add_filter( 'attachment_fields_to_edit', array( __CLASS__, 'add_field_regenerate' ), 9, 2 );
|
21 |
+
}
|
22 |
+
|
23 |
+
/**
|
24 |
+
* Register javascripts and css.
|
25 |
+
*
|
26 |
+
* @access public
|
27 |
+
* @return void
|
28 |
+
* @author Nicolas Juen
|
29 |
+
*/
|
30 |
+
public static function enqueue_assets( $hook_suffix = '' ) {
|
31 |
+
if( !isset( $hook_suffix ) || empty( $hook_suffix ) ) {
|
32 |
+
return false;
|
33 |
+
}
|
34 |
+
|
35 |
+
if( $hook_suffix == 'upload.php' || ( $hook_suffix == 'post.php' && isset( $_GET['post'] ) && isset( $_GET['action'] ) && $_GET['action'] == 'edit' ) ) {
|
36 |
+
// Add javascript
|
37 |
+
wp_enqueue_script( 'sis_js_attachments' );
|
38 |
+
|
39 |
+
// Add underscore template
|
40 |
+
add_action( 'admin_footer', array( 'SIS_Admin_Main', 'add_template' ) );
|
41 |
+
}
|
42 |
+
}
|
43 |
+
|
44 |
+
/**
|
45 |
+
* Rebuild the image
|
46 |
+
*
|
47 |
+
* @access public
|
48 |
+
* @return void
|
49 |
+
* @author Nicolas Juen
|
50 |
+
*/
|
51 |
+
public static function a_thumbnail_rebuild() {
|
52 |
+
global $wpdb;
|
53 |
+
|
54 |
+
// Get the nonce
|
55 |
+
$nonce = isset( $_POST['nonce'] ) ? $_POST['nonce']: '' ;
|
56 |
+
|
57 |
+
// Time a the begining
|
58 |
+
timer_start();
|
59 |
+
|
60 |
+
// Get the thumbnails
|
61 |
+
$thumbnails = isset( $_POST['thumbnails'] )? $_POST['thumbnails'] : NULL;
|
62 |
+
|
63 |
+
// Check the nonce
|
64 |
+
if( !wp_verify_nonce( $nonce , 'regen' ) ) {
|
65 |
+
SIS_Admin_Main::displayJson( array( 'error' => _e( 'Trying to cheat ?', 'simple-image-sizes' ) ) );
|
66 |
+
}
|
67 |
+
|
68 |
+
// Get the id
|
69 |
+
$id = isset( $_POST["id"] ) ? $_POST["id"] : 0 ;
|
70 |
+
SIS_Admin_Main::displayJson( SIS_Admin_Main::thumbnail_rebuild( $id, $thumbnails ) );
|
71 |
+
}
|
72 |
+
|
73 |
+
/**
|
74 |
+
* Add the custom sizes to the image sizes in article edition
|
75 |
+
*
|
76 |
+
* @access public
|
77 |
+
* @param array $form_fields
|
78 |
+
* @param object $post
|
79 |
+
* @return void
|
80 |
+
* @author Nicolas Juen
|
81 |
+
* @author Additional Image Sizes (zui)
|
82 |
+
*/
|
83 |
+
public static function sizes_in_form( $form_fields, $post ) {
|
84 |
+
// Protect from being view in Media editor where there are no sizes
|
85 |
+
if ( !isset( $form_fields['image-size'] ) ) {
|
86 |
+
return $form_fields;
|
87 |
+
}
|
88 |
+
|
89 |
+
$out = NULL;
|
90 |
+
$size_names = array();
|
91 |
+
$sizes_custom = get_option( SIS_OPTION, array() );
|
92 |
+
|
93 |
+
if ( is_array( $sizes_custom ) ) {
|
94 |
+
foreach( $sizes_custom as $key => $value ) {
|
95 |
+
if( isset( $value['s'] ) && $value['s'] == 1 ) {
|
96 |
+
$size_names[$key] = self::_get_thumbnail_name( $key );;
|
97 |
+
}
|
98 |
+
}
|
99 |
+
}
|
100 |
+
foreach ( $size_names as $size => $label ) {
|
101 |
+
$downsize = image_downsize( $post->ID, $size );
|
102 |
+
|
103 |
+
// is this size selectable?
|
104 |
+
$enabled = ( $downsize[3] || 'full' == $size );
|
105 |
+
$css_id = "image-size-{$size}-{$post->ID}";
|
106 |
+
|
107 |
+
// We must do a clumsy search of the existing html to determine is something has been checked yet
|
108 |
+
if ( FALSE === strpos( 'checked="checked"', $form_fields['image-size']['html'] ) ) {
|
109 |
+
if ( empty($check) )
|
110 |
+
$check = get_user_setting( 'imgsize' ); // See if they checked a custom size last time
|
111 |
+
|
112 |
+
$checked = '';
|
113 |
+
|
114 |
+
// if this size is the default but that's not available, don't select it
|
115 |
+
if ( $size == $check || str_replace( " ", "", $size ) == $check ) {
|
116 |
+
if ( $enabled )
|
117 |
+
$checked = " checked='checked'";
|
118 |
+
else
|
119 |
+
$check = '';
|
120 |
+
} elseif ( !$check && $enabled && 'thumbnail' != $size ) {
|
121 |
+
// if $check is not enabled, default to the first available size that's bigger than a thumbnail
|
122 |
+
$check = $size;
|
123 |
+
$checked = " checked='checked'";
|
124 |
+
}
|
125 |
+
}
|
126 |
+
$html = "<div class='image-size-item' style='min-height: 50px; margin-top: 18px;'><input type='radio' " . disabled( $enabled, false, false ) . "name='attachments[$post->ID][image-size]' id='{$css_id}' value='{$size}'$checked />";
|
127 |
+
|
128 |
+
$html .= "<label for='{$css_id}'>$label</label>";
|
129 |
+
// only show the dimensions if that choice is available
|
130 |
+
if ( $enabled )
|
131 |
+
$html .= " <label for='{$css_id}' class='help'>" . sprintf( "(%d × %d)", $downsize[1], $downsize[2] ). "</label>";
|
132 |
+
|
133 |
+
$html .= '</div>';
|
134 |
+
|
135 |
+
$out .= $html;
|
136 |
+
}
|
137 |
+
$form_fields['image-size']['html'] .= $out;
|
138 |
+
|
139 |
+
return $form_fields;
|
140 |
+
}
|
141 |
+
|
142 |
+
/**
|
143 |
+
* Add the thumbnail name in the post insertion, based on new WP filter
|
144 |
+
*
|
145 |
+
* @access public
|
146 |
+
* @param array $sizes
|
147 |
+
* @return array
|
148 |
+
* @since 2.3
|
149 |
+
* @author Nicolas Juen
|
150 |
+
* @author radeno based on this post : http://www.wpmayor.com/wordpress-hacks/how-to-add-custom-image-sizes-to-wordpress-uploader/
|
151 |
+
*/
|
152 |
+
public static function add_thumbnail_name($sizes) {
|
153 |
+
// Get options
|
154 |
+
$sizes_custom = get_option( SIS_OPTION, array() );
|
155 |
+
// init size array
|
156 |
+
$addsizes = array();
|
157 |
+
|
158 |
+
// check there is custom sizes
|
159 |
+
if ( is_array( $sizes_custom ) && !empty( $sizes_custom ) ) {
|
160 |
+
foreach( $sizes_custom as $key => $value ) {
|
161 |
+
// If we show this size in the admin
|
162 |
+
if( isset( $value['s'] ) && $value['s'] == 1 ) {
|
163 |
+
$addsizes[$key] = self::_get_thumbnail_name( $key );
|
164 |
+
}
|
165 |
+
}
|
166 |
+
}
|
167 |
+
|
168 |
+
// Merge the two array
|
169 |
+
$newsizes = array_merge($sizes, $addsizes);
|
170 |
+
|
171 |
+
// Add new size
|
172 |
+
return $newsizes;
|
173 |
+
}
|
174 |
+
|
175 |
+
/**
|
176 |
+
* Get a thumbnail name from its slug
|
177 |
+
*
|
178 |
+
* @access private
|
179 |
+
* @param string $thumbnailSlug : the slug of the thumbnail
|
180 |
+
* @return array
|
181 |
+
* @since 2.3
|
182 |
+
* @author Nicolas Juen
|
183 |
+
*/
|
184 |
+
private static function _get_thumbnail_name( $thumbnailSlug = '' ) {
|
185 |
+
|
186 |
+
// get the options
|
187 |
+
$sizes_custom = get_option( SIS_OPTION );
|
188 |
+
|
189 |
+
if( !isset( $sizes_custom[$thumbnailSlug] ) ) {
|
190 |
+
// return slug if not found
|
191 |
+
return $thumbnailSlug;
|
192 |
+
}
|
193 |
+
|
194 |
+
// If the name exists return it, slug by default
|
195 |
+
if( isset( $sizes_custom[$thumbnailSlug]['n'] ) && !empty( $sizes_custom[$thumbnailSlug]['n'] ) ) {
|
196 |
+
return $sizes_custom[$thumbnailSlug]['n'];
|
197 |
+
}
|
198 |
+
|
199 |
+
return $thumbnailSlug;
|
200 |
+
}
|
201 |
+
|
202 |
+
|
203 |
+
/**
|
204 |
+
* Add action in media row
|
205 |
+
*
|
206 |
+
* @since 2.2
|
207 |
+
* @access public
|
208 |
+
* @return $actions : array of actions and content to display
|
209 |
+
* @author Nicolas Juen
|
210 |
+
*/
|
211 |
+
public static function add_actions_list( $actions, $object ) {
|
212 |
+
if( !wp_attachment_is_image( $object->ID ) ) {
|
213 |
+
return $actions;
|
214 |
+
}
|
215 |
+
// Add action for regeneration
|
216 |
+
$actions['sis-regenerate'] = "<a href='#' data-id='".$object->ID."' class='sis-regenerate-one'>".__( 'Regenerate thumbnails', 'simple-image-sizes' )."</a>";
|
217 |
+
|
218 |
+
// Return actions
|
219 |
+
return $actions;
|
220 |
+
}
|
221 |
+
|
222 |
+
|
223 |
+
/**
|
224 |
+
* Get a thumbnail name from its slug
|
225 |
+
*
|
226 |
+
* @access public
|
227 |
+
* @param array $fields : the fields of the media
|
228 |
+
* @param object $post : the post object
|
229 |
+
* @return array
|
230 |
+
* @since 2.3.1
|
231 |
+
* @author Nicolas Juen
|
232 |
+
*/
|
233 |
+
public static function add_field_regenerate( $fields, $post ) {
|
234 |
+
// Check this is an image
|
235 |
+
if( strpos( $post->post_mime_type, 'image' ) === false ) {
|
236 |
+
return $fields;
|
237 |
+
}
|
238 |
+
|
239 |
+
$fields['sis-regenerate'] = array(
|
240 |
+
'label' => __( 'Regenerate Thumbnails', 'simple-image-sizes' ),
|
241 |
+
'input' => 'html',
|
242 |
+
'html' => '
|
243 |
+
<input type="button" data-id="'.$post->ID.'" class="button title sis-regenerate-one" value="'.__( 'Regenerate Thumbnails', 'simple-image-sizes' ).'" />
|
244 |
+
<span class="spinner"></span>
|
245 |
+
<span class="title"><em></em></span>
|
246 |
+
<input type="hidden" class="regen" value="'.wp_create_nonce( 'regen' ).'" />',
|
247 |
+
'show_in_edit' => true,
|
248 |
+
'show_in_modal' => false,
|
249 |
+
);
|
250 |
+
return $fields;
|
251 |
+
}
|
252 |
+
}
|
inc/class.client.php → classes/main.php
RENAMED
@@ -1,36 +1,52 @@
|
|
1 |
-
<?php
|
2 |
-
Class
|
3 |
-
|
4 |
-
// Set the original
|
5 |
-
var $original = array( 'thumbnail', 'medium', 'large' );
|
6 |
-
|
7 |
-
function __construct() {
|
8 |
-
|
9 |
-
|
10 |
-
|
11 |
-
|
12 |
-
|
13 |
-
|
14 |
-
|
15 |
-
|
16 |
-
|
17 |
-
|
18 |
-
|
19 |
-
|
20 |
-
|
21 |
-
|
22 |
-
|
23 |
-
|
24 |
-
|
25 |
-
|
26 |
-
|
27 |
-
//
|
28 |
-
|
29 |
-
|
30 |
-
|
31 |
-
|
32 |
-
|
33 |
-
|
34 |
-
|
35 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
36 |
}
|
1 |
+
<?php
|
2 |
+
Class SIS_Client {
|
3 |
+
|
4 |
+
// Set the original
|
5 |
+
var $original = array( 'thumbnail', 'medium', 'large' );
|
6 |
+
|
7 |
+
function __construct() {
|
8 |
+
|
9 |
+
// Make new image sizes
|
10 |
+
add_action ( 'init', array( __CLASS__, 'init' ), 1 );
|
11 |
+
|
12 |
+
// Add translation
|
13 |
+
add_action ( 'init', array( __CLASS__, 'init_translation' ), 2 );
|
14 |
+
}
|
15 |
+
|
16 |
+
/**
|
17 |
+
* Override the images by the plugin images
|
18 |
+
*
|
19 |
+
* @access public
|
20 |
+
* @return void
|
21 |
+
* @author Nicolas Juen
|
22 |
+
*/
|
23 |
+
public static function init() {
|
24 |
+
// Get inital options
|
25 |
+
$sizes = get_option( SIS_OPTION, array() );
|
26 |
+
|
27 |
+
// Return flase if empty
|
28 |
+
if( empty( $sizes ) || !is_array( $sizes ) ) {
|
29 |
+
return false;
|
30 |
+
}
|
31 |
+
|
32 |
+
// Set the new sizes
|
33 |
+
foreach( $sizes as $name => $size ) {
|
34 |
+
if( empty( $size ) || !isset( $size['w'] ) || !isset( $size['h'] ) ) {
|
35 |
+
continue;
|
36 |
+
}
|
37 |
+
// Add the images sizes
|
38 |
+
add_image_size( $name, $size['w'], $size['h'], ( isset( $size['c'] ) && !empty( $size['c'] ) )? $size['c'] : 0 );
|
39 |
+
}
|
40 |
+
}
|
41 |
+
|
42 |
+
/**
|
43 |
+
* Load the plugin text domain
|
44 |
+
*
|
45 |
+
* @param void
|
46 |
+
* @return void
|
47 |
+
* @author Nicolas Juen
|
48 |
+
*/
|
49 |
+
public static function init_translation() {
|
50 |
+
load_plugin_textdomain ( 'simple-image-sizes', false, basename( rtrim( SIS_DIR, '/' ) ) . '/languages' );
|
51 |
+
}
|
52 |
}
|
css/Aristo/images/bg_fallback.png
DELETED
Binary file
|
css/Aristo/images/icon_sprite.png
DELETED
Binary file
|
css/Aristo/images/progress_bar.gif
DELETED
Binary file
|
css/Aristo/images/slider_handles.png
DELETED
Binary file
|
css/Aristo/images/ui-icons_222222_256x240.png
DELETED
Binary file
|
css/Aristo/images/ui-icons_454545_256x240.png
DELETED
Binary file
|
css/Aristo/jquery-ui-1.8.7.custom.css
DELETED
@@ -1,738 +0,0 @@
|
|
1 |
-
/*
|
2 |
-
* jQuery UI CSS Framework 1.8.7
|
3 |
-
*
|
4 |
-
* Copyright 2010, AUTHORS.txt (http://jqueryui.com/about)
|
5 |
-
* Dual licensed under the MIT or GPL Version 2 licenses.
|
6 |
-
* http://jquery.org/license
|
7 |
-
*
|
8 |
-
* http://docs.jquery.com/UI/Theming/API
|
9 |
-
*/
|
10 |
-
|
11 |
-
/* Layout helpers
|
12 |
-
----------------------------------*/
|
13 |
-
.ui-helper-hidden { display: none; }
|
14 |
-
.ui-helper-hidden-accessible { position: absolute !important; clip: rect(1px 1px 1px 1px); clip: rect(1px,1px,1px,1px); }
|
15 |
-
.ui-helper-reset { margin: 0; padding: 0; border: 0; outline: 0; line-height: 1.3; text-decoration: none; font-size: 100%; list-style: none; }
|
16 |
-
.ui-helper-clearfix:after { content: "."; display: block; height: 0; clear: both; visibility: hidden; }
|
17 |
-
.ui-helper-clearfix { display: inline-block; }
|
18 |
-
/* required comment for clearfix to work in Opera \*/
|
19 |
-
* html .ui-helper-clearfix { height:1%; }
|
20 |
-
.ui-helper-clearfix { display:block; }
|
21 |
-
/* end clearfix */
|
22 |
-
.ui-helper-zfix { width: 100%; height: 100%; top: 0; left: 0; position: absolute; opacity: 0; filter:Alpha(Opacity=0); }
|
23 |
-
|
24 |
-
|
25 |
-
/* Interaction Cues
|
26 |
-
----------------------------------*/
|
27 |
-
.ui-state-disabled { cursor: default !important; }
|
28 |
-
|
29 |
-
|
30 |
-
/* Icons
|
31 |
-
----------------------------------*/
|
32 |
-
|
33 |
-
/* states and images */
|
34 |
-
.ui-icon { display: block; text-indent: -99999px; overflow: hidden; background-repeat: no-repeat; }
|
35 |
-
|
36 |
-
|
37 |
-
/* Misc visuals
|
38 |
-
----------------------------------*/
|
39 |
-
|
40 |
-
/* Overlays */
|
41 |
-
.ui-widget-overlay { position: absolute; top: 0; left: 0; width: 100%; height: 100%; }
|
42 |
-
|
43 |
-
|
44 |
-
/*
|
45 |
-
* jQuery UI CSS Framework 1.8.7
|
46 |
-
*
|
47 |
-
* Copyright 2010, AUTHORS.txt (http://jqueryui.com/about)
|
48 |
-
* Dual licensed under the MIT or GPL Version 2 licenses.
|
49 |
-
* http://jquery.org/license
|
50 |
-
*
|
51 |
-
* http://docs.jquery.com/UI/Theming/API
|
52 |
-
*
|
53 |
-
* To view and modify this theme, visit http://jqueryui.com/themeroller/?ctl=themeroller
|
54 |
-
*/
|
55 |
-
|
56 |
-
|
57 |
-
/* Component containers
|
58 |
-
----------------------------------*/
|
59 |
-
.ui-widget { font-family: Arial,sans-serif; font-size: 1.1em; }
|
60 |
-
.ui-widget .ui-widget { font-size: 1em; }
|
61 |
-
.ui-widget input, .ui-widget select, .ui-widget textarea, .ui-widget button { font-family: Arial,sans-serif; font-size: 1em; }
|
62 |
-
.ui-widget-content { border: 1px solid #B6B6B6; background: #ffffff; color: #4F4F4F; }
|
63 |
-
.ui-widget-content a { color: #4F4F4F; }
|
64 |
-
.ui-widget-header { border: 1px solid #B6B6B6; color: #4F4F4F; font-weight: bold; }
|
65 |
-
.ui-widget-header {
|
66 |
-
background: #ededed url(images/bg_fallback.png) 0 0 repeat-x; /* Old browsers */
|
67 |
-
background: -moz-linear-gradient(top, #ededed 0%, #c4c4c4 100%); /* FF3.6+ */
|
68 |
-
background: -webkit-gradient(linear, left top, left bottom, color-stop(0%,#ededed), color-stop(100%,#c4c4c4)); /* Chrome,Safari4+ */
|
69 |
-
background: -webkit-linear-gradient(top, #ededed 0%,#c4c4c4 100%); /* Chrome10+,Safari5.1+ */
|
70 |
-
background: -o-linear-gradient(top, #ededed 0%,#c4c4c4 100%); /* Opera11.10+ */
|
71 |
-
background: -ms-linear-gradient(top, #ededed 0%,#c4c4c4 100%); /* IE10+ */
|
72 |
-
background: linear-gradient(top, #ededed 0%,#c4c4c4 100%); /* W3C */
|
73 |
-
}
|
74 |
-
.ui-widget-header a { color: #4F4F4F; }
|
75 |
-
|
76 |
-
/* Interaction states
|
77 |
-
----------------------------------*/
|
78 |
-
.ui-state-default, .ui-widget-content .ui-state-default, .ui-widget-header .ui-state-default { border: 1px solid #B6B6B6; font-weight: normal; color: #4F4F4F; }
|
79 |
-
.ui-state-default, .ui-widget-content .ui-state-default, .ui-widget-header .ui-state-default {
|
80 |
-
background: #ededed url(images/bg_fallback.png) 0 0 repeat-x; /* Old browsers */
|
81 |
-
background: -moz-linear-gradient(top, #ededed 0%, #c4c4c4 100%); /* FF3.6+ */
|
82 |
-
background: -webkit-gradient(linear, left top, left bottom, color-stop(0%,#ededed), color-stop(100%,#c4c4c4)); /* Chrome,Safari4+ */
|
83 |
-
background: -webkit-linear-gradient(top, #ededed 0%,#c4c4c4 100%); /* Chrome10+,Safari5.1+ */
|
84 |
-
background: -o-linear-gradient(top, #ededed 0%,#c4c4c4 100%); /* Opera11.10+ */
|
85 |
-
background: -ms-linear-gradient(top, #ededed 0%,#c4c4c4 100%); /* IE10+ */
|
86 |
-
background: linear-gradient(top, #ededed 0%,#c4c4c4 100%); /* W3C */
|
87 |
-
-webkit-box-shadow: 0 1px 0 rgba(255,255,255,0.6) inset;
|
88 |
-
-moz-box-shadow: 0 1px 0 rgba(255,255,255,0.6) inset;
|
89 |
-
box-shadow: 0 1px 0 rgba(255,255,255,0.6) inset;
|
90 |
-
}
|
91 |
-
.ui-state-default a, .ui-state-default a:link, .ui-state-default a:visited { color: #4F4F4F; text-decoration: none; }
|
92 |
-
.ui-state-hover, .ui-widget-content .ui-state-hover, .ui-widget-header .ui-state-hover, .ui-state-focus, .ui-widget-content .ui-state-focus, .ui-widget-header .ui-state-focus { border: 1px solid #9D9D9D; font-weight: normal; color: #313131; }
|
93 |
-
.ui-state-hover a, .ui-state-hover a:hover { color: #313131; text-decoration: none; }
|
94 |
-
.ui-state-active, .ui-widget-content .ui-state-active, .ui-widget-header .ui-state-active {
|
95 |
-
outline: none;
|
96 |
-
color: #1c4257; border: 1px solid #7096ab;
|
97 |
-
background: #ededed url(images/bg_fallback.png) 0 -50px repeat-x; /* Old browsers */
|
98 |
-
background: -moz-linear-gradient(top, #b9e0f5 0%, #92bdd6 100%); /* FF3.6+ */
|
99 |
-
background: -webkit-gradient(linear, left top, left bottom, color-stop(0%,#b9e0f5), color-stop(100%,#92bdd6)); /* Chrome,Safari4+ */
|
100 |
-
background: -webkit-linear-gradient(top, #b9e0f5 0%,#92bdd6 100%); /* Chrome10+,Safari5.1+ */
|
101 |
-
background: -o-linear-gradient(top, #b9e0f5 0%,#92bdd6 100%); /* Opera11.10+ */
|
102 |
-
background: -ms-linear-gradient(top, #b9e0f5 0%,#92bdd6 100%); /* IE10+ */
|
103 |
-
background: linear-gradient(top, #b9e0f5 0%,#92bdd6 100%); /* W3C */
|
104 |
-
-webkit-box-shadow: none;
|
105 |
-
-moz-box-shadow: none;
|
106 |
-
box-shadow: none;
|
107 |
-
}
|
108 |
-
.ui-state-active a, .ui-state-active a:link, .ui-state-active a:visited { color: #313131; text-decoration: none; }
|
109 |
-
.ui-widget :active { outline: none; }
|
110 |
-
|
111 |
-
/* Interaction Cues
|
112 |
-
----------------------------------*/
|
113 |
-
.ui-state-highlight, .ui-widget-content .ui-state-highlight, .ui-widget-header .ui-state-highlight { border: 1px solid #d2dbf4; background: #f4f8fd; color: #0d2054; -moz-border-radius: 0 !important; -webkit-border-radius: 0 !important; border-radius: 0 !important; }
|
114 |
-
.ui-state-highlight a, .ui-widget-content .ui-state-highlight a,.ui-widget-header .ui-state-highlight a { color: #363636; }
|
115 |
-
.ui-state-error, .ui-widget-content .ui-state-error, .ui-widget-header .ui-state-error { border: 1px solid #e2d0d0; background: #fcf0f0; color: #280b0b; -moz-border-radius: 0 !important; -webkit-border-radius: 0 !important; border-radius: 0 !important; }
|
116 |
-
.ui-state-error a, .ui-widget-content .ui-state-error a, .ui-widget-header .ui-state-error a { color: #cd0a0a; }
|
117 |
-
.ui-state-error-text, .ui-widget-content .ui-state-error-text, .ui-widget-header .ui-state-error-text { color: #cd0a0a; }
|
118 |
-
.ui-priority-primary, .ui-widget-content .ui-priority-primary, .ui-widget-header .ui-priority-primary { font-weight: bold; }
|
119 |
-
.ui-priority-secondary, .ui-widget-content .ui-priority-secondary, .ui-widget-header .ui-priority-secondary { opacity: .7; filter:Alpha(Opacity=70); font-weight: normal; }
|
120 |
-
.ui-state-disabled, .ui-widget-content .ui-state-disabled, .ui-widget-header .ui-state-disabled { opacity: .35; filter:Alpha(Opacity=35); background-image: none; }
|
121 |
-
|
122 |
-
/* Icons
|
123 |
-
----------------------------------*/
|
124 |
-
|
125 |
-
/* states and images */
|
126 |
-
.ui-icon { width: 16px; height: 16px; background-image: url(images/ui-icons_222222_256x240.png); }
|
127 |
-
.ui-widget-content .ui-icon {background-image: url(images/ui-icons_222222_256x240.png); }
|
128 |
-
.ui-widget-header .ui-icon {background-image: url(images/ui-icons_222222_256x240.png); }
|
129 |
-
.ui-state-default .ui-icon { background-image: url(images/ui-icons_454545_256x240.png); }
|
130 |
-
.ui-state-hover .ui-icon, .ui-state-focus .ui-icon {background-image: url(images/ui-icons_454545_256x240.png); }
|
131 |
-
.ui-state-active .ui-icon {background-image: url(images/ui-icons_454545_256x240.png); }
|
132 |
-
.ui-state-highlight .ui-icon {background-image: url(images/ui-icons_454545_256x240.png); }
|
133 |
-
.ui-state-error .ui-icon, .ui-state-error-text .ui-icon { background: url(images/icon_sprite.png) -16px 0 no-repeat !important; }
|
134 |
-
.ui-state-highlight .ui-icon, .ui-state-error .ui-icon { margin-top: -1px; }
|
135 |
-
|
136 |
-
/* positioning */
|
137 |
-
.ui-icon-carat-1-n { background-position: 0 0; }
|
138 |
-
.ui-icon-carat-1-ne { background-position: -16px 0; }
|
139 |
-
.ui-icon-carat-1-e { background-position: -32px 0; }
|
140 |
-
.ui-icon-carat-1-se { background-position: -48px 0; }
|
141 |
-
.ui-icon-carat-1-s { background-position: -64px 0; }
|
142 |
-
.ui-icon-carat-1-sw { background-position: -80px 0; }
|
143 |
-
.ui-icon-carat-1-w { background-position: -96px 0; }
|
144 |
-
.ui-icon-carat-1-nw { background-position: -112px 0; }
|
145 |
-
.ui-icon-carat-2-n-s { background-position: -128px 0; }
|
146 |
-
.ui-icon-carat-2-e-w { background-position: -144px 0; }
|
147 |
-
.ui-icon-triangle-1-n { background-position: 0 -16px; }
|
148 |
-
.ui-icon-triangle-1-ne { background-position: -16px -16px; }
|
149 |
-
.ui-icon-triangle-1-e { background-position: -32px -16px; }
|
150 |
-
.ui-icon-triangle-1-se { background-position: -48px -16px; }
|
151 |
-
.ui-icon-triangle-1-s { background-position: -64px -16px; }
|
152 |
-
.ui-icon-triangle-1-sw { background-position: -80px -16px; }
|
153 |
-
.ui-icon-triangle-1-w { background-position: -96px -16px; }
|
154 |
-
.ui-icon-triangle-1-nw { background-position: -112px -16px; }
|
155 |
-
.ui-icon-triangle-2-n-s { background-position: -128px -16px; }
|
156 |
-
.ui-icon-triangle-2-e-w { background-position: -144px -16px; }
|
157 |
-
.ui-icon-arrow-1-n { background-position: 0 -32px; }
|
158 |
-
.ui-icon-arrow-1-ne { background-position: -16px -32px; }
|
159 |
-
.ui-icon-arrow-1-e { background-position: -32px -32px; }
|
160 |
-
.ui-icon-arrow-1-se { background-position: -48px -32px; }
|
161 |
-
.ui-icon-arrow-1-s { background-position: -64px -32px; }
|
162 |
-
.ui-icon-arrow-1-sw { background-position: -80px -32px; }
|
163 |
-
.ui-icon-arrow-1-w { background-position: -96px -32px; }
|
164 |
-
.ui-icon-arrow-1-nw { background-position: -112px -32px; }
|
165 |
-
.ui-icon-arrow-2-n-s { background-position: -128px -32px; }
|
166 |
-
.ui-icon-arrow-2-ne-sw { background-position: -144px -32px; }
|
167 |
-
.ui-icon-arrow-2-e-w { background-position: -160px -32px; }
|
168 |
-
.ui-icon-arrow-2-se-nw { background-position: -176px -32px; }
|
169 |
-
.ui-icon-arrowstop-1-n { background-position: -192px -32px; }
|
170 |
-
.ui-icon-arrowstop-1-e { background-position: -208px -32px; }
|
171 |
-
.ui-icon-arrowstop-1-s { background-position: -224px -32px; }
|
172 |
-
.ui-icon-arrowstop-1-w { background-position: -240px -32px; }
|
173 |
-
.ui-icon-arrowthick-1-n { background-position: 0 -48px; }
|
174 |
-
.ui-icon-arrowthick-1-ne { background-position: -16px -48px; }
|
175 |
-
.ui-icon-arrowthick-1-e { background-position: -32px -48px; }
|
176 |
-
.ui-icon-arrowthick-1-se { background-position: -48px -48px; }
|
177 |
-
.ui-icon-arrowthick-1-s { background-position: -64px -48px; }
|
178 |
-
.ui-icon-arrowthick-1-sw { background-position: -80px -48px; }
|
179 |
-
.ui-icon-arrowthick-1-w { background-position: -96px -48px; }
|
180 |
-
.ui-icon-arrowthick-1-nw { background-position: -112px -48px; }
|
181 |
-
.ui-icon-arrowthick-2-n-s { background-position: -128px -48px; }
|
182 |
-
.ui-icon-arrowthick-2-ne-sw { background-position: -144px -48px; }
|
183 |
-
.ui-icon-arrowthick-2-e-w { background-position: -160px -48px; }
|
184 |
-
.ui-icon-arrowthick-2-se-nw { background-position: -176px -48px; }
|
185 |
-
.ui-icon-arrowthickstop-1-n { background-position: -192px -48px; }
|
186 |
-
.ui-icon-arrowthickstop-1-e { background-position: -208px -48px; }
|
187 |
-
.ui-icon-arrowthickstop-1-s { background-position: -224px -48px; }
|
188 |
-
.ui-icon-arrowthickstop-1-w { background-position: -240px -48px; }
|
189 |
-
.ui-icon-arrowreturnthick-1-w { background-position: 0 -64px; }
|
190 |
-
.ui-icon-arrowreturnthick-1-n { background-position: -16px -64px; }
|
191 |
-
.ui-icon-arrowreturnthick-1-e { background-position: -32px -64px; }
|
192 |
-
.ui-icon-arrowreturnthick-1-s { background-position: -48px -64px; }
|
193 |
-
.ui-icon-arrowreturn-1-w { background-position: -64px -64px; }
|
194 |
-
.ui-icon-arrowreturn-1-n { background-position: -80px -64px; }
|
195 |
-
.ui-icon-arrowreturn-1-e { background-position: -96px -64px; }
|
196 |
-
.ui-icon-arrowreturn-1-s { background-position: -112px -64px; }
|
197 |
-
.ui-icon-arrowrefresh-1-w { background-position: -128px -64px; }
|
198 |
-
.ui-icon-arrowrefresh-1-n { background-position: -144px -64px; }
|
199 |
-
.ui-icon-arrowrefresh-1-e { background-position: -160px -64px; }
|
200 |
-
.ui-icon-arrowrefresh-1-s { background-position: -176px -64px; }
|
201 |
-
.ui-icon-arrow-4 { background-position: 0 -80px; }
|
202 |
-
.ui-icon-arrow-4-diag { background-position: -16px -80px; }
|
203 |
-
.ui-icon-extlink { background-position: -32px -80px; }
|
204 |
-
.ui-icon-newwin { background-position: -48px -80px; }
|
205 |
-
.ui-icon-refresh { background-position: -64px -80px; }
|
206 |
-
.ui-icon-shuffle { background-position: -80px -80px; }
|
207 |
-
.ui-icon-transfer-e-w { background-position: -96px -80px; }
|
208 |
-
.ui-icon-transferthick-e-w { background-position: -112px -80px; }
|
209 |
-
.ui-icon-folder-collapsed { background-position: 0 -96px; }
|
210 |
-
.ui-icon-folder-open { background-position: -16px -96px; }
|
211 |
-
.ui-icon-document { background-position: -32px -96px; }
|
212 |
-
.ui-icon-document-b { background-position: -48px -96px; }
|
213 |
-
.ui-icon-note { background-position: -64px -96px; }
|
214 |
-
.ui-icon-mail-closed { background-position: -80px -96px; }
|
215 |
-
.ui-icon-mail-open { background-position: -96px -96px; }
|
216 |
-
.ui-icon-suitcase { background-position: -112px -96px; }
|
217 |
-
.ui-icon-comment { background-position: -128px -96px; }
|
218 |
-
.ui-icon-person { background-position: -144px -96px; }
|
219 |
-
.ui-icon-print { background-position: -160px -96px; }
|
220 |
-
.ui-icon-trash { background-position: -176px -96px; }
|
221 |
-
.ui-icon-locked { background-position: -192px -96px; }
|
222 |
-
.ui-icon-unlocked { background-position: -208px -96px; }
|
223 |
-
.ui-icon-bookmark { background-position: -224px -96px; }
|
224 |
-
.ui-icon-tag { background-position: -240px -96px; }
|
225 |
-
.ui-icon-home { background-position: 0 -112px; }
|
226 |
-
.ui-icon-flag { background-position: -16px -112px; }
|
227 |
-
.ui-icon-calendar { background-position: -32px -112px; }
|
228 |
-
.ui-icon-cart { background-position: -48px -112px; }
|
229 |
-
.ui-icon-pencil { background-position: -64px -112px; }
|
230 |
-
.ui-icon-clock { background-position: -80px -112px; }
|
231 |
-
.ui-icon-disk { background-position: -96px -112px; }
|
232 |
-
.ui-icon-calculator { background-position: -112px -112px; }
|
233 |
-
.ui-icon-zoomin { background-position: -128px -112px; }
|
234 |
-
.ui-icon-zoomout { background-position: -144px -112px; }
|
235 |
-
.ui-icon-search { background-position: -160px -112px; }
|
236 |
-
.ui-icon-wrench { background-position: -176px -112px; }
|
237 |
-
.ui-icon-gear { background-position: -192px -112px; }
|
238 |
-
.ui-icon-heart { background-position: -208px -112px; }
|
239 |
-
.ui-icon-star { background-position: -224px -112px; }
|
240 |
-
.ui-icon-link { background-position: -240px -112px; }
|
241 |
-
.ui-icon-cancel { background-position: 0 -128px; }
|
242 |
-
.ui-icon-plus { background-position: -16px -128px; }
|
243 |
-
.ui-icon-plusthick { background-position: -32px -128px; }
|
244 |
-
.ui-icon-minus { background-position: -48px -128px; }
|
245 |
-
.ui-icon-minusthick { background-position: -64px -128px; }
|
246 |
-
.ui-icon-close { background-position: -80px -128px; }
|
247 |
-
.ui-icon-closethick { background-position: -96px -128px; }
|
248 |
-
.ui-icon-key { background-position: -112px -128px; }
|
249 |
-
.ui-icon-lightbulb { background-position: -128px -128px; }
|
250 |
-
.ui-icon-scissors { background-position: -144px -128px; }
|
251 |
-
.ui-icon-clipboard { background-position: -160px -128px; }
|
252 |
-
.ui-icon-copy { background-position: -176px -128px; }
|
253 |
-
.ui-icon-contact { background-position: -192px -128px; }
|
254 |
-
.ui-icon-image { background-position: -208px -128px; }
|
255 |
-
.ui-icon-video { background-position: -224px -128px; }
|
256 |
-
.ui-icon-script { background-position: -240px -128px; }
|
257 |
-
.ui-icon-alert { background-position: 0 -144px; }
|
258 |
-
.ui-icon-info { background: url(images/icon_sprite.png) 0 0 no-repeat !important; }
|
259 |
-
.ui-icon-notice { background-position: -32px -144px; }
|
260 |
-
.ui-icon-help { background-position: -48px -144px; }
|
261 |
-
.ui-icon-check { background-position: -64px -144px; }
|
262 |
-
.ui-icon-bullet { background-position: -80px -144px; }
|
263 |
-
.ui-icon-radio-off { background-position: -96px -144px; }
|
264 |
-
.ui-icon-radio-on { background-position: -112px -144px; }
|
265 |
-
.ui-icon-pin-w { background-position: -128px -144px; }
|
266 |
-
.ui-icon-pin-s { background-position: -144px -144px; }
|
267 |
-
.ui-icon-play { background-position: 0 -160px; }
|
268 |
-
.ui-icon-pause { background-position: -16px -160px; }
|
269 |
-
.ui-icon-seek-next { background-position: -32px -160px; }
|
270 |
-
.ui-icon-seek-prev { background-position: -48px -160px; }
|
271 |
-
.ui-icon-seek-end { background-position: -64px -160px; }
|
272 |
-
.ui-icon-seek-start { background-position: -80px -160px; }
|
273 |
-
/* ui-icon-seek-first is deprecated, use ui-icon-seek-start instead */
|
274 |
-
.ui-icon-seek-first { background-position: -80px -160px; }
|
275 |
-
.ui-icon-stop { background-position: -96px -160px; }
|
276 |
-
.ui-icon-eject { background-position: -112px -160px; }
|
277 |
-
.ui-icon-volume-off { background-position: -128px -160px; }
|
278 |
-
.ui-icon-volume-on { background-position: -144px -160px; }
|
279 |
-
.ui-icon-power { background-position: 0 -176px; }
|
280 |
-
.ui-icon-signal-diag { background-position: -16px -176px; }
|
281 |
-
.ui-icon-signal { background-position: -32px -176px; }
|
282 |
-
.ui-icon-battery-0 { background-position: -48px -176px; }
|
283 |
-
.ui-icon-battery-1 { background-position: -64px -176px; }
|
284 |
-
.ui-icon-battery-2 { background-position: -80px -176px; }
|
285 |
-
.ui-icon-battery-3 { background-position: -96px -176px; }
|
286 |
-
.ui-icon-circle-plus { background-position: 0 -192px; }
|
287 |
-
.ui-icon-circle-minus { background-position: -16px -192px; }
|
288 |
-
.ui-icon-circle-close { background-position: -32px -192px; }
|
289 |
-
.ui-icon-circle-triangle-e { background-position: -48px -192px; }
|
290 |
-
.ui-icon-circle-triangle-s { background-position: -64px -192px; }
|
291 |
-
.ui-icon-circle-triangle-w { background-position: -80px -192px; }
|
292 |
-
.ui-icon-circle-triangle-n { background-position: -96px -192px; }
|
293 |
-
.ui-icon-circle-arrow-e { background-position: -112px -192px; }
|
294 |
-
.ui-icon-circle-arrow-s { background-position: -128px -192px; }
|
295 |
-
.ui-icon-circle-arrow-w { background-position: -144px -192px; }
|
296 |
-
.ui-icon-circle-arrow-n { background-position: -160px -192px; }
|
297 |
-
.ui-icon-circle-zoomin { background-position: -176px -192px; }
|
298 |
-
.ui-icon-circle-zoomout { background-position: -192px -192px; }
|
299 |
-
.ui-icon-circle-check { background-position: -208px -192px; }
|
300 |
-
.ui-icon-circlesmall-plus { background-position: 0 -208px; }
|
301 |
-
.ui-icon-circlesmall-minus { background-position: -16px -208px; }
|
302 |
-
.ui-icon-circlesmall-close { background-position: -32px -208px; }
|
303 |
-
.ui-icon-squaresmall-plus { background-position: -48px -208px; }
|
304 |
-
.ui-icon-squaresmall-minus { background-position: -64px -208px; }
|
305 |
-
.ui-icon-squaresmall-close { background-position: -80px -208px; }
|
306 |
-
.ui-icon-grip-dotted-vertical { background-position: 0 -224px; }
|
307 |
-
.ui-icon-grip-dotted-horizontal { background-position: -16px -224px; }
|
308 |
-
.ui-icon-grip-solid-vertical { background-position: -32px -224px; }
|
309 |
-
.ui-icon-grip-solid-horizontal { background-position: -48px -224px; }
|
310 |
-
.ui-icon-gripsmall-diagonal-se { background-position: -64px -224px; }
|
311 |
-
.ui-icon-grip-diagonal-se { background-position: -80px -224px; }
|
312 |
-
|
313 |
-
|
314 |
-
/* Misc visuals
|
315 |
-
----------------------------------*/
|
316 |
-
|
317 |
-
/* Corner radius */
|
318 |
-
.ui-corner-tl { -moz-border-radius-topleft: 3px; -webkit-border-top-left-radius: 3px; border-top-left-radius: 3px; }
|
319 |
-
.ui-corner-tr { -moz-border-radius-topright: 3px; -webkit-border-top-right-radius: 3px; border-top-right-radius: 3px; }
|
320 |
-
.ui-corner-bl { -moz-border-radius-bottomleft: 3px; -webkit-border-bottom-left-radius: 3px; border-bottom-left-radius: 3px; }
|
321 |
-
.ui-corner-br { -moz-border-radius-bottomright: 3px; -webkit-border-bottom-right-radius: 3px; border-bottom-right-radius: 3px; }
|
322 |
-
.ui-corner-top { -moz-border-radius-topleft: 3px; -webkit-border-top-left-radius: 3px; border-top-left-radius: 3px; -moz-border-radius-topright: 3px; -webkit-border-top-right-radius: 3px; border-top-right-radius: 3px; }
|
323 |
-
.ui-corner-bottom { -moz-border-radius-bottomleft: 3px; -webkit-border-bottom-left-radius: 3px; border-bottom-left-radius: 3px; -moz-border-radius-bottomright: 3px; -webkit-border-bottom-right-radius: 3px; border-bottom-right-radius: 3px; }
|
324 |
-
.ui-corner-right { -moz-border-radius-topright: 3px; -webkit-border-top-right-radius: 3px; border-top-right-radius: 3px; -moz-border-radius-bottomright: 3px; -webkit-border-bottom-right-radius: 3px; border-bottom-right-radius: 3px; }
|
325 |
-
.ui-corner-left { -moz-border-radius-topleft: 3px; -webkit-border-top-left-radius: 3px; border-top-left-radius: 3px; -moz-border-radius-bottomleft: 3px; -webkit-border-bottom-left-radius: 3px; border-bottom-left-radius: 3px; }
|
326 |
-
.ui-corner-all { -moz-border-radius: 3px; -webkit-border-radius: 3px; border-radius: 3px; }
|
327 |
-
|
328 |
-
/* Overlays */
|
329 |
-
.ui-widget-overlay { background: #262b33; opacity: .70;filter:Alpha(Opacity=70); }
|
330 |
-
.ui-widget-shadow { margin: -8px 0 0 -8px; padding: 8px; background: #000000; opacity: .30;filter:Alpha(Opacity=30); -moz-border-radius: 8px; -webkit-border-radius: 8px; border-radius: 8px; }/*
|
331 |
-
* jQuery UI Resizable 1.8.7
|
332 |
-
*
|
333 |
-
* Copyright 2010, AUTHORS.txt (http://jqueryui.com/about)
|
334 |
-
* Dual licensed under the MIT or GPL Version 2 licenses.
|
335 |
-
* http://jquery.org/license
|
336 |
-
*
|
337 |
-
* http://docs.jquery.com/UI/Resizable#theming
|
338 |
-
*/
|
339 |
-
.ui-resizable { position: relative;}
|
340 |
-
.ui-resizable-handle { position: absolute; font-size: 0.1px; z-index: 999; display: block;}
|
341 |
-
.ui-resizable-disabled .ui-resizable-handle, .ui-resizable-autohide .ui-resizable-handle { display: none; }
|
342 |
-
.ui-resizable-n { cursor: n-resize; height: 7px; width: 100%; top: -5px; left: 0; }
|
343 |
-
.ui-resizable-s { cursor: s-resize; height: 7px; width: 100%; bottom: -5px; left: 0; }
|
344 |
-
.ui-resizable-e { cursor: e-resize; width: 7px; right: -5px; top: 0; height: 100%; }
|
345 |
-
.ui-resizable-w { cursor: w-resize; width: 7px; left: -5px; top: 0; height: 100%; }
|
346 |
-
.ui-resizable-se { cursor: se-resize; width: 12px; height: 12px; right: 1px; bottom: 1px; }
|
347 |
-
.ui-resizable-sw { cursor: sw-resize; width: 9px; height: 9px; left: -5px; bottom: -5px; }
|
348 |
-
.ui-resizable-nw { cursor: nw-resize; width: 9px; height: 9px; left: -5px; top: -5px; }
|
349 |
-
.ui-resizable-ne { cursor: ne-resize; width: 9px; height: 9px; right: -5px; top: -5px;}/*
|
350 |
-
* jQuery UI Selectable 1.8.7
|
351 |
-
*
|
352 |
-
* Copyright 2010, AUTHORS.txt (http://jqueryui.com/about)
|
353 |
-
* Dual licensed under the MIT or GPL Version 2 licenses.
|
354 |
-
* http://jquery.org/license
|
355 |
-
*
|
356 |
-
* http://docs.jquery.com/UI/Selectable#theming
|
357 |
-
*/
|
358 |
-
.ui-selectable-helper { position: absolute; z-index: 100; border:1px dotted black; }
|
359 |
-
/*
|
360 |
-
* jQuery UI Accordion 1.8.7
|
361 |
-
*
|
362 |
-
* Copyright 2010, AUTHORS.txt (http://jqueryui.com/about)
|
363 |
-
* Dual licensed under the MIT or GPL Version 2 licenses.
|
364 |
-
* http://jquery.org/license
|
365 |
-
*
|
366 |
-
* http://docs.jquery.com/UI/Accordion#theming
|
367 |
-
*/
|
368 |
-
/* IE/Win - Fix animation bug - #4615 */
|
369 |
-
.ui-accordion { width: 100%; }
|
370 |
-
.ui-accordion .ui-accordion-header { cursor: pointer; position: relative; margin-top: 1px; zoom: 1; }
|
371 |
-
.ui-accordion .ui-accordion-header, .ui-accordion .ui-accordion-content { -moz-border-radius: 0; -webkit-border-radius: 0; border-radius: 0; }
|
372 |
-
.ui-accordion .ui-accordion-li-fix { display: inline; }
|
373 |
-
.ui-accordion .ui-accordion-header-active { border-bottom: 0 !important; }
|
374 |
-
.ui-accordion .ui-accordion-header a { display: block; font-size: 12px; font-weight: bold; padding: .5em .5em .5em .7em; }
|
375 |
-
.ui-accordion-icons .ui-accordion-header a { padding-left: 2.2em; }
|
376 |
-
.ui-accordion .ui-accordion-header .ui-icon { position: absolute; left: .5em; top: 50%; margin-top: -8px; }
|
377 |
-
.ui-accordion .ui-accordion-content { padding: 1em 2.2em; border-top: 0; margin-top: -2px; position: relative; top: 1px; margin-bottom: 2px; overflow: auto; display: none; zoom: 1; }
|
378 |
-
.ui-accordion .ui-accordion-content-active { display: block; }/*
|
379 |
-
* jQuery UI Autocomplete 1.8.7
|
380 |
-
*
|
381 |
-
* Copyright 2010, AUTHORS.txt (http://jqueryui.com/about)
|
382 |
-
* Dual licensed under the MIT or GPL Version 2 licenses.
|
383 |
-
* http://jquery.org/license
|
384 |
-
*
|
385 |
-
* http://docs.jquery.com/UI/Autocomplete#theming
|
386 |
-
*/
|
387 |
-
.ui-autocomplete {
|
388 |
-
position: absolute; cursor: default; z-index: 3;
|
389 |
-
-moz-border-radius: 0;
|
390 |
-
-webkit-border-radius: 0;
|
391 |
-
border-radius: 0;
|
392 |
-
-moz-box-shadow: 0 1px 5px rgba(0,0,0,0.3);
|
393 |
-
-webkit-box-shadow: 0 1px 5px rgba(0,0,0,0.3);
|
394 |
-
box-shadow: 0 1px 5px rgba(0,0,0,0.3);
|
395 |
-
}
|
396 |
-
|
397 |
-
/* workarounds */
|
398 |
-
* html .ui-autocomplete { width:1px; } /* without this, the menu expands to 100% in IE6 */
|
399 |
-
|
400 |
-
/*
|
401 |
-
* jQuery UI Menu 1.8.7
|
402 |
-
*
|
403 |
-
* Copyright 2010, AUTHORS.txt (http://jqueryui.com/about)
|
404 |
-
* Dual licensed under the MIT or GPL Version 2 licenses.
|
405 |
-
* http://jquery.org/license
|
406 |
-
*
|
407 |
-
* http://docs.jquery.com/UI/Menu#theming
|
408 |
-
*/
|
409 |
-
.ui-menu {
|
410 |
-
list-style:none;
|
411 |
-
padding: 2px;
|
412 |
-
margin: 0;
|
413 |
-
display:block;
|
414 |
-
float: left;
|
415 |
-
}
|
416 |
-
.ui-menu .ui-menu {
|
417 |
-
margin-top: -3px;
|
418 |
-
}
|
419 |
-
.ui-menu .ui-menu-item {
|
420 |
-
margin:0;
|
421 |
-
padding: 0;
|
422 |
-
zoom: 1;
|
423 |
-
float: left;
|
424 |
-
clear: left;
|
425 |
-
width: 100%;
|
426 |
-
}
|
427 |
-
.ui-menu .ui-menu-item a {
|
428 |
-
text-decoration:none;
|
429 |
-
display:block;
|
430 |
-
padding:.2em .4em;
|
431 |
-
line-height:1.5;
|
432 |
-
zoom:1;
|
433 |
-
}
|
434 |
-
.ui-menu .ui-menu-item a.ui-state-hover,
|
435 |
-
.ui-menu .ui-menu-item a.ui-state-active {
|
436 |
-
font-weight: normal;
|
437 |
-
margin: -1px;
|
438 |
-
background: #5f83b9;
|
439 |
-
color: #FFFFFF;
|
440 |
-
text-shadow: 0px 1px 1px #234386;
|
441 |
-
border-color: #466086;
|
442 |
-
-moz-border-radius: 0;
|
443 |
-
-webkit-border-radius: 0;
|
444 |
-
border-radius: 0;
|
445 |
-
}
|
446 |
-
/*
|
447 |
-
* jQuery UI Button 1.8.7
|
448 |
-
*
|
449 |
-
* Copyright 2010, AUTHORS.txt (http://jqueryui.com/about)
|
450 |
-
* Dual licensed under the MIT or GPL Version 2 licenses.
|
451 |
-
* http://jquery.org/license
|
452 |
-
*
|
453 |
-
* http://docs.jquery.com/UI/Button#theming
|
454 |
-
*/
|
455 |
-
.ui-button { display: inline-block; position: relative; padding: 0; margin-right: .1em; text-decoration: none !important; cursor: pointer; text-align: center; zoom: 1; overflow: visible; -webkit-user-select: none; -moz-user-select: none; user-select: none; } /* the overflow property removes extra width in IE */
|
456 |
-
.ui-button-icon-only { width: 2.2em; } /* to make room for the icon, a width needs to be set here */
|
457 |
-
button.ui-button-icon-only { width: 2.4em; } /* button elements seem to need a little more width */
|
458 |
-
.ui-button-icons-only { width: 3.4em; }
|
459 |
-
button.ui-button-icons-only { width: 3.7em; }
|
460 |
-
|
461 |
-
/* button animation properties */
|
462 |
-
.ui-button {
|
463 |
-
-webkit-transition: all 250ms ease-in-out;
|
464 |
-
-moz-transition: all 250ms ease-in-out;
|
465 |
-
-o-transition: all 250ms ease-in-out;
|
466 |
-
transition: all 250ms ease-in-out;
|
467 |
-
}
|
468 |
-
|
469 |
-
/*states*/
|
470 |
-
.ui-button.ui-state-hover {
|
471 |
-
-moz-box-shadow: 0 0 8px rgba(0, 0, 0, 0.15), 0 1px 0 rgba(255,255,255,0.8) inset;
|
472 |
-
-webkit-box-shadow: 0 0 8px rgba(0, 0, 0, 0.15), 0 1px 0 rgba(255,255,255,0.8) inset;
|
473 |
-
box-shadow: 0 0 8px rgba(0, 0, 0, 0.15), 0 1px 0 rgba(255,255,255,0.8) inset;
|
474 |
-
}
|
475 |
-
.ui-button.ui-state-focus {
|
476 |
-
outline: none;
|
477 |
-
color: #1c4257;
|
478 |
-
border-color: #7096ab;
|
479 |
-
background: #ededed url(images/bg_fallback.png) 0 -50px repeat-x; /* Old browsers */
|
480 |
-
background: -moz-linear-gradient(top, #b9e0f5 0%, #92bdd6 100%); /* FF3.6+ */
|
481 |
-
background: -webkit-gradient(linear, left top, left bottom, color-stop(0%,#b9e0f5), color-stop(100%,#92bdd6)); /* Chrome,Safari4+ */
|
482 |
-
background: -webkit-linear-gradient(top, #b9e0f5 0%,#92bdd6 100%); /* Chrome10+,Safari5.1+ */
|
483 |
-
background: -o-linear-gradient(top, #b9e0f5 0%,#92bdd6 100%); /* Opera11.10+ */
|
484 |
-
background: -ms-linear-gradient(top, #b9e0f5 0%,#92bdd6 100%); /* IE10+ */
|
485 |
-
background: linear-gradient(top, #b9e0f5 0%,#92bdd6 100%); /* W3C */
|
486 |
-
-moz-box-shadow: 0 0 8px rgba(0, 0, 0, 0.15), 0 1px 0 rgba(255,255,255,0.8) inset;
|
487 |
-
-webkit-box-shadow: 0 0 8px rgba(0, 0, 0, 0.15), 0 1px 0 rgba(255,255,255,0.8) inset;
|
488 |
-
box-shadow: 0 0 8px rgba(0, 0, 0, 0.15), 0 1px 0 rgba(255,255,255,0.8) inset;
|
489 |
-
}
|
490 |
-
|
491 |
-
/*button text element */
|
492 |
-
.ui-button .ui-button-text { display: block; line-height: 1.4; font-size: 14px; font-weight: bold; text-shadow: 0 1px 0 rgba(255, 255, 255, 0.6); }
|
493 |
-
.ui-button-text-only .ui-button-text { padding: .4em 1em; }
|
494 |
-
.ui-button-icon-only .ui-button-text, .ui-button-icons-only .ui-button-text { padding: .4em; text-indent: -9999999px; }
|
495 |
-
.ui-button-text-icon-primary .ui-button-text, .ui-button-text-icons .ui-button-text { padding: .4em 1em .4em 2.1em; }
|
496 |
-
.ui-button-text-icon-secondary .ui-button-text, .ui-button-text-icons .ui-button-text { padding: .4em 2.1em .4em 1em; }
|
497 |
-
.ui-button-text-icons .ui-button-text { padding-left: 2.1em; padding-right: 2.1em; }
|
498 |
-
/* no icon support for input elements, provide padding by default */
|
499 |
-
input.ui-button, .ui-widget-content input.ui-button { font-size: 14px; font-weight: bold; text-shadow: 0 1px 0 rgba(255, 255, 255, 0.6); padding: 0 1em !important; height: 33px; }
|
500 |
-
/*remove submit button internal padding in Firefox*/
|
501 |
-
input.ui-button::-moz-focus-inner {
|
502 |
-
border: 0;
|
503 |
-
padding: 0;
|
504 |
-
}
|
505 |
-
/* fix webkits handling of the box model */
|
506 |
-
@media screen and (-webkit-min-device-pixel-ratio:0) {
|
507 |
-
input.ui-button {
|
508 |
-
height: 31px !important;
|
509 |
-
}
|
510 |
-
}
|
511 |
-
|
512 |
-
|
513 |
-
/*button icon element(s) */
|
514 |
-
.ui-button-icon-only .ui-icon, .ui-button-text-icon-primary .ui-icon, .ui-button-text-icon-secondary .ui-icon, .ui-button-text-icons .ui-icon, .ui-button-icons-only .ui-icon { position: absolute; top: 50%; margin-top: -8px; }
|
515 |
-
.ui-button-icon-only .ui-icon { left: 50%; margin-left: -8px; }
|
516 |
-
.ui-button-text-icon-primary .ui-button-icon-primary, .ui-button-text-icons .ui-button-icon-primary, .ui-button-icons-only .ui-button-icon-primary { left: .5em; }
|
517 |
-
.ui-button-text-icon-secondary .ui-button-icon-secondary, .ui-button-text-icons .ui-button-icon-secondary, .ui-button-icons-only .ui-button-icon-secondary { right: .5em; }
|
518 |
-
.ui-button-text-icons .ui-button-icon-secondary, .ui-button-icons-only .ui-button-icon-secondary { right: .5em; }
|
519 |
-
|
520 |
-
/*button sets*/
|
521 |
-
.ui-buttonset { margin-right: 7px; }
|
522 |
-
.ui-buttonset .ui-button { margin-left: 0; margin-right: -.3em; }
|
523 |
-
.ui-buttonset .ui-button.ui-state-active { color: #1c4257; border-color: #7096ab; }
|
524 |
-
.ui-buttonset .ui-button.ui-state-active {
|
525 |
-
background: #ededed url(images/bg_fallback.png) 0 -50px repeat-x; /* Old browsers */
|
526 |
-
background: -moz-linear-gradient(top, #b9e0f5 0%, #92bdd6 100%); /* FF3.6+ */
|
527 |
-
background: -webkit-gradient(linear, left top, left bottom, color-stop(0%,#b9e0f5), color-stop(100%,#92bdd6)); /* Chrome,Safari4+ */
|
528 |
-
background: -webkit-linear-gradient(top, #b9e0f5 0%,#92bdd6 100%); /* Chrome10+,Safari5.1+ */
|
529 |
-
background: -o-linear-gradient(top, #b9e0f5 0%,#92bdd6 100%); /* Opera11.10+ */
|
530 |
-
background: -ms-linear-gradient(top, #b9e0f5 0%,#92bdd6 100%); /* IE10+ */
|
531 |
-
background: linear-gradient(top, #b9e0f5 0%,#92bdd6 100%); /* W3C */
|
532 |
-
-webkit-box-shadow: none;
|
533 |
-
-moz-box-shadow: none;
|
534 |
-
box-shadow: none;
|
535 |
-
}
|
536 |
-
|
537 |
-
/* workarounds */
|
538 |
-
button.ui-button::-moz-focus-inner { border: 0; padding: 0; } /* reset extra padding in Firefox */
|
539 |
-
/*
|
540 |
-
* jQuery UI Dialog 1.8.7
|
541 |
-
*
|
542 |
-
* Copyright 2010, AUTHORS.txt (http://jqueryui.com/about)
|
543 |
-
* Dual licensed under the MIT or GPL Version 2 licenses.
|
544 |
-
* http://jquery.org/license
|
545 |
-
*
|
546 |
-
* http://docs.jquery.com/UI/Dialog#theming
|
547 |
-
*/
|
548 |
-
.ui-dialog { position: absolute; padding: 0; width: 300px; overflow: hidden; }
|
549 |
-
.ui-dialog {
|
550 |
-
-webkit-box-shadow: 0 2px 12px rgba(0,0,0,0.6);
|
551 |
-
-moz-box-shadow: 0 2px 12px rgba(0,0,0,0.6);
|
552 |
-
box-shadow: 0 2px 12px rgba(0,0,0,0.6);
|
553 |
-
}
|
554 |
-
.ui-dialog .ui-dialog-titlebar { padding: 0.7em 1em 0.6em 1em; position: relative; border: none; border-bottom: 1px solid #979797; -moz-border-radius: 0; -webkit-border-radius: 0; border-radius: 0; }
|
555 |
-
.ui-dialog .ui-dialog-title { float: left; margin: .1em 16px .2em 0; font-size: 14px; text-shadow: 0 1px 0 rgba(255,255,255,0.5); }
|
556 |
-
.ui-dialog .ui-dialog-titlebar-close { position: absolute; right: .8em; top: 55%; width: 16px; margin: -10px 0 0 0; padding: 0; height: 16px; }
|
557 |
-
.ui-dialog .ui-dialog-titlebar-close span { display: block; margin: 1px; background: url(images/icon_sprite.png) 0 -16px no-repeat; }
|
558 |
-
.ui-dialog .ui-dialog-titlebar-close:hover span { background-position: -16px -16px; }
|
559 |
-
.ui-dialog .ui-dialog-titlebar-close:hover, .ui-dialog .ui-dialog-titlebar-close:focus { padding: 0; border: 0; }
|
560 |
-
.ui-dialog .ui-dialog-content { position: relative; border: 0; padding: .5em 1em; background: none; overflow: auto; zoom: 1; }
|
561 |
-
.ui-dialog .ui-dialog-buttonpane { text-align: left; border-width: 1px 0 0 0; background-image: none; margin: .5em 0 0 0; padding: .3em 1em .5em .4em; }
|
562 |
-
.ui-dialog .ui-dialog-buttonpane .ui-dialog-buttonset { float: right; }
|
563 |
-
.ui-dialog .ui-dialog-buttonpane button { margin: .5em .4em .5em 0; cursor: pointer; }
|
564 |
-
.ui-dialog .ui-resizable-se { width: 14px; height: 14px; right: 3px; bottom: 3px; }
|
565 |
-
.ui-draggable .ui-dialog-titlebar { cursor: move; }
|
566 |
-
/*
|
567 |
-
* jQuery UI Slider 1.8.7
|
568 |
-
*
|
569 |
-
* Copyright 2010, AUTHORS.txt (http://jqueryui.com/about)
|
570 |
-
* Dual licensed under the MIT or GPL Version 2 licenses.
|
571 |
-
* http://jquery.org/license
|
572 |
-
*
|
573 |
-
* http://docs.jquery.com/UI/Slider#theming
|
574 |
-
*/
|
575 |
-
.ui-slider { position: relative; text-align: left; background: #d7d7d7; z-index: 1; }
|
576 |
-
.ui-slider { -moz-box-shadow: 0 1px 2px rgba(0,0,0,0.5) inset; -webkit-box-shadow: 0 1px 2px rgba(0,0,0,0.5) inset; box-shadow: 0 1px 2px rgba(0,0,0,0.5) inset; }
|
577 |
-
.ui-slider .ui-slider-handle { background: url(images/slider_handles.png) 0px -23px no-repeat; position: absolute; z-index: 2; width: 23px; height: 23px; cursor: default; border: none; outline: none; -moz-box-shadow: none; -webkit-box-shadow: none; box-shadow: none; }
|
578 |
-
.ui-slider .ui-state-hover, .ui-slider .ui-state-active { background-position: 0 0; }
|
579 |
-
.ui-slider .ui-slider-range { background: #a3cae0; position: absolute; z-index: 1; font-size: .7em; display: block; border: 0; background-position: 0 0; }
|
580 |
-
.ui-slider .ui-slider-range { -moz-box-shadow: 0 1px 2px rgba(17,35,45,0.6) inset; -webkit-box-shadow: 0 1px 2px rgba(17,35,45,0.6) inset; box-shadow: 0 1px 2px rgba(17,35,45,0.6) inset; }
|
581 |
-
|
582 |
-
|
583 |
-
.ui-slider-horizontal { height: 5px; }
|
584 |
-
.ui-slider-horizontal .ui-slider-handle { top: -8px; margin-left: -13px; }
|
585 |
-
.ui-slider-horizontal .ui-slider-range { top: 0; height: 100%; }
|
586 |
-
.ui-slider-horizontal .ui-slider-range-min { left: 0; }
|
587 |
-
.ui-slider-horizontal .ui-slider-range-max { right: 0; }
|
588 |
-
|
589 |
-
.ui-slider-vertical { width: 5px; height: 100px; }
|
590 |
-
.ui-slider-vertical .ui-slider-handle { left: -8px; margin-left: 0; margin-bottom: -13px; }
|
591 |
-
.ui-slider-vertical .ui-slider-range { left: 0; width: 100%; }
|
592 |
-
.ui-slider-vertical .ui-slider-range-min { bottom: 0; }
|
593 |
-
.ui-slider-vertical .ui-slider-range-max { top: 0; }/*
|
594 |
-
* jQuery UI Tabs 1.8.7
|
595 |
-
*
|
596 |
-
* Copyright 2010, AUTHORS.txt (http://jqueryui.com/about)
|
597 |
-
* Dual licensed under the MIT or GPL Version 2 licenses.
|
598 |
-
* http://jquery.org/license
|
599 |
-
*
|
600 |
-
* http://docs.jquery.com/UI/Tabs#theming
|
601 |
-
*/
|
602 |
-
.ui-tabs { position: relative; zoom: 1; border: 0; background: transparent; } /* position: relative prevents IE scroll bug (element with position: relative inside container with overflow: auto appear as "fixed") */
|
603 |
-
.ui-tabs .ui-tabs-nav { margin: 0; padding: 0; background: transparent; border-width: 0 0 1px 0; }
|
604 |
-
.ui-tabs .ui-tabs-nav {
|
605 |
-
-moz-border-radius: 0;
|
606 |
-
-webkit-border-radius: 0;
|
607 |
-
border-radius: 0;
|
608 |
-
}
|
609 |
-
.ui-tabs .ui-tabs-nav li { list-style: none; float: left; position: relative; top: 1px; margin: 0 .2em 1px 0; border-bottom: 0 !important; padding: 0; white-space: nowrap; }
|
610 |
-
.ui-tabs .ui-tabs-nav li a { float: left; padding: .5em 1em; text-decoration: none; font-size: 12px; font-weight: bold; text-shadow: 0 1px 0 rgba(255,255,255,0.5); }
|
611 |
-
.ui-tabs .ui-tabs-nav li.ui-tabs-selected { margin-bottom: 0; padding-bottom: 1px; background: #fff; border-color: #B6B6B6; }
|
612 |
-
.ui-tabs .ui-tabs-nav li.ui-tabs-selected a, .ui-tabs .ui-tabs-nav li.ui-state-disabled a, .ui-tabs .ui-tabs-nav li.ui-state-processing a { cursor: text; outline: none; }
|
613 |
-
.ui-tabs .ui-tabs-nav li a, .ui-tabs.ui-tabs-collapsible .ui-tabs-nav li.ui-tabs-selected a { cursor: pointer; } /* first selector in group seems obsolete, but required to overcome bug in Opera applying cursor: text overall if defined elsewhere... */
|
614 |
-
.ui-tabs .ui-tabs-panel { display: block; border-width: 0 1px 1px 1px; padding: 1em 1.4em; background: none; }
|
615 |
-
.ui-tabs .ui-tabs-panel { background: #FFF;
|
616 |
-
-moz-border-radius: 0;
|
617 |
-
-webkit-border-radius: 0;
|
618 |
-
border-radius: 0;
|
619 |
-
}
|
620 |
-
.ui-tabs .ui-tabs-hide { display: none !important; }
|
621 |
-
/*
|
622 |
-
* jQuery UI Datepicker 1.8.7
|
623 |
-
*
|
624 |
-
* Copyright 2010, AUTHORS.txt (http://jqueryui.com/about)
|
625 |
-
* Dual licensed under the MIT or GPL Version 2 licenses.
|
626 |
-
* http://jquery.org/license
|
627 |
-
*
|
628 |
-
* http://docs.jquery.com/UI/Datepicker#theming
|
629 |
-
*/
|
630 |
-
.ui-datepicker { width: 17em; padding: 0; display: none; border-color: #DDDDDD; }
|
631 |
-
.ui-datepicker {
|
632 |
-
-moz-box-shadow: 0 4px 8px rgba(0,0,0,0.5);
|
633 |
-
-webkit-box-shadow: 0 4px 8px rgba(0,0,0,0.5);
|
634 |
-
box-shadow: 0 4px 8px rgba(0,0,0,0.5);
|
635 |
-
}
|
636 |
-
.ui-datepicker .ui-datepicker-header { position:relative; padding:.35em 0; border: none; border-bottom: 1px solid #B6B6B6; -moz-border-radius: 0; -webkit-border-radius: 0; border-radius: 0; }
|
637 |
-
.ui-datepicker .ui-datepicker-prev, .ui-datepicker .ui-datepicker-next { position:absolute; top: 6px; width: 1.8em; height: 1.8em; }
|
638 |
-
.ui-datepicker .ui-datepicker-prev-hover, .ui-datepicker .ui-datepicker-next-hover { border: 1px none; }
|
639 |
-
.ui-datepicker .ui-datepicker-prev { left:2px; }
|
640 |
-
.ui-datepicker .ui-datepicker-next { right:2px; }
|
641 |
-
.ui-datepicker .ui-datepicker-prev span { background-position: 0px -32px !important; }
|
642 |
-
.ui-datepicker .ui-datepicker-next span { background-position: -16px -32px !important; }
|
643 |
-
.ui-datepicker .ui-datepicker-prev-hover span { background-position: 0px -48px !important; }
|
644 |
-
.ui-datepicker .ui-datepicker-next-hover span { background-position: -16px -48px !important; }
|
645 |
-
.ui-datepicker .ui-datepicker-prev span, .ui-datepicker .ui-datepicker-next span { display: block; position: absolute; left: 50%; margin-left: -8px; top: 50%; margin-top: -8px; background: url(images/icon_sprite.png) no-repeat; }
|
646 |
-
.ui-datepicker .ui-datepicker-title { margin: 0 2.3em; line-height: 1.8em; text-align: center; font-size: 12px; text-shadow: 0 1px 0 rgba(255,255,255,0.6); }
|
647 |
-
.ui-datepicker .ui-datepicker-title select { font-size:1em; margin:1px 0; }
|
648 |
-
.ui-datepicker select.ui-datepicker-month-year {width: 100%;}
|
649 |
-
.ui-datepicker select.ui-datepicker-month,
|
650 |
-
.ui-datepicker select.ui-datepicker-year { width: 49%;}
|
651 |
-
.ui-datepicker table {width: 100%; font-size: .9em; border-collapse: collapse; margin:0 0 .4em; }
|
652 |
-
.ui-datepicker th { padding: .7em .3em; text-align: center; font-weight: bold; border: 0; }
|
653 |
-
.ui-datepicker td { border: 0; padding: 1px; }
|
654 |
-
.ui-datepicker td span, .ui-datepicker td a { display: block; padding: .2em; text-align: right; text-decoration: none; }
|
655 |
-
.ui-datepicker .ui-datepicker-buttonpane { background-image: none; margin: .7em 0 0 0; padding:0 .2em; border-left: 0; border-right: 0; border-bottom: 0; }
|
656 |
-
.ui-datepicker .ui-datepicker-buttonpane button { float: right; margin: .5em .2em .4em; cursor: pointer; padding: .2em .6em .3em .6em; width:auto; overflow:visible; }
|
657 |
-
.ui-datepicker .ui-datepicker-buttonpane button.ui-datepicker-current { float:left; }
|
658 |
-
.ui-datepicker table .ui-state-highlight { border-color: #5F83B9; }
|
659 |
-
.ui-datepicker table .ui-state-hover { background: #5F83B9; color: #FFF; font-weight: bold; text-shadow: 0 1px 1px #234386; -webkit-box-shadow: 0 0px 0 rgba(255,255,255,0.6) inset; -moz-box-shadow: 0 0px 0 rgba(255,255,255,0.6) inset; box-shadow: 0 0px 0 rgba(255,255,255,0.6) inset; border-color: #5F83B9; }
|
660 |
-
.ui-datepicker-calendar .ui-state-default { background: transparent; border-color: #FFF; }
|
661 |
-
.ui-datepicker-calendar .ui-state-active { background: #5F83B9; border-color: #5F83B9; color: #FFF; font-weight: bold; text-shadow: 0 1px 1px #234386; }
|
662 |
-
|
663 |
-
/* with multiple calendars */
|
664 |
-
.ui-datepicker.ui-datepicker-multi { width:auto; }
|
665 |
-
.ui-datepicker-multi .ui-datepicker-group { float:left; }
|
666 |
-
.ui-datepicker-multi .ui-datepicker-group table { width:95%; margin:0 auto .4em; }
|
667 |
-
.ui-datepicker-multi-2 .ui-datepicker-group { width:50%; }
|
668 |
-
.ui-datepicker-multi-3 .ui-datepicker-group { width:33.3%; }
|
669 |
-
.ui-datepicker-multi-4 .ui-datepicker-group { width:25%; }
|
670 |
-
.ui-datepicker-multi .ui-datepicker-group-last .ui-datepicker-header { border-left-width:0; }
|
671 |
-
.ui-datepicker-multi .ui-datepicker-group-middle .ui-datepicker-header { border-left-width:0; }
|
672 |
-
.ui-datepicker-multi .ui-datepicker-buttonpane { clear:left; }
|
673 |
-
.ui-datepicker-row-break { clear:both; width:100%; }
|
674 |
-
|
675 |
-
/* RTL support */
|
676 |
-
.ui-datepicker-rtl { direction: rtl; }
|
677 |
-
.ui-datepicker-rtl .ui-datepicker-prev { right: 2px; left: auto; }
|
678 |
-
.ui-datepicker-rtl .ui-datepicker-next { left: 2px; right: auto; }
|
679 |
-
.ui-datepicker-rtl .ui-datepicker-prev:hover { right: 1px; left: auto; }
|
680 |
-
.ui-datepicker-rtl .ui-datepicker-next:hover { left: 1px; right: auto; }
|
681 |
-
.ui-datepicker-rtl .ui-datepicker-buttonpane { clear:right; }
|
682 |
-
.ui-datepicker-rtl .ui-datepicker-buttonpane button { float: left; }
|
683 |
-
.ui-datepicker-rtl .ui-datepicker-buttonpane button.ui-datepicker-current { float:right; }
|
684 |
-
.ui-datepicker-rtl .ui-datepicker-group { float:right; }
|
685 |
-
.ui-datepicker-rtl .ui-datepicker-group-last .ui-datepicker-header { border-right-width:0; border-left-width:1px; }
|
686 |
-
.ui-datepicker-rtl .ui-datepicker-group-middle .ui-datepicker-header { border-right-width:0; border-left-width:1px; }
|
687 |
-
|
688 |
-
/* IE6 IFRAME FIX (taken from datepicker 1.5.3 */
|
689 |
-
.ui-datepicker-cover {
|
690 |
-
display: none; /*sorry for IE5*/
|
691 |
-
display/**/: block; /*sorry for IE5*/
|
692 |
-
position: absolute; /*must have*/
|
693 |
-
z-index: -1; /*must have*/
|
694 |
-
filter: mask(); /*must have*/
|
695 |
-
top: -4px; /*must have*/
|
696 |
-
left: -4px; /*must have*/
|
697 |
-
width: 200px; /*must have*/
|
698 |
-
height: 200px; /*must have*/
|
699 |
-
}/*
|
700 |
-
* jQuery UI Progressbar 1.8.7
|
701 |
-
*
|
702 |
-
* Copyright 2010, AUTHORS.txt (http://jqueryui.com/about)
|
703 |
-
* Dual licensed under the MIT or GPL Version 2 licenses.
|
704 |
-
* http://jquery.org/license
|
705 |
-
*
|
706 |
-
* http://docs.jquery.com/UI/Progressbar#theming
|
707 |
-
*/
|
708 |
-
.ui-progressbar { height: 12px; text-align: left; background: #FFF url(images/progress_bar.gif) 0 -14px repeat-x; }
|
709 |
-
.ui-progressbar .ui-progressbar-value {margin: -1px; height:100%; background: url(images/progress_bar.gif) 0 0 repeat-x; }
|
710 |
-
|
711 |
-
/* Extra Input Field Styling */
|
712 |
-
.ui-form textarea, .ui-form input:not([type="submit"]):not([type="button"]):not([type="checkbox"]):not([type="radio"]):not([type="file"]):not([type="range"]) {
|
713 |
-
padding: 3px;
|
714 |
-
-webkit-border-radius: 2px;
|
715 |
-
-moz-border-radius: 2px;
|
716 |
-
border-radius: 2px;
|
717 |
-
border: 1px solid #cecece;
|
718 |
-
outline: none;
|
719 |
-
-webkit-box-shadow: 0 1px 3px rgba(0,0,0,0.1) inset, 0 1px 0 rgba(255,255,255,0.2);
|
720 |
-
-moz-box-shadow: 0 1px 3px rgba(0,0,0,0.1) inset, 0 1px 0 rgba(255,255,255,0.2);
|
721 |
-
box-shadow: 0 1px 3px rgba(0,0,0,0.1) inset, 0 1px 0 rgba(255,255,255,0.2);
|
722 |
-
-webkit-transition: all 250ms ease-in-out;
|
723 |
-
-moz-transition: all 250ms ease-in-out;
|
724 |
-
-o-transition: all 250ms ease-in-out;
|
725 |
-
transition: all 250ms ease-in-out;
|
726 |
-
}
|
727 |
-
.ui-form textarea:hover, .ui-form input:not([type="submit"]):not([type="button"]):not([type="checkbox"]):not([type="radio"]):not([type="file"]):not([type="range"]):hover {
|
728 |
-
border: 1px solid #bdbdbd;
|
729 |
-
-webkit-box-shadow: 0 1px 3px rgba(0,0,0,0.2) inset, 0 1px 0 rgba(255,255,255,0.2);
|
730 |
-
-moz-box-shadow: 0 1px 3px rgba(0,0,0,0.2) inset, 0 1px 0 rgba(255,255,255,0.2);
|
731 |
-
box-shadow: 0 1px 3px rgba(0,0,0,0.2) inset, 0 1px 0 rgba(255,255,255,0.2);
|
732 |
-
}
|
733 |
-
.ui-form textarea:focus, .ui-form input:not([type="submit"]):not([type="button"]):not([type="checkbox"]):not([type="radio"]):not([type="file"]):not([type="range"]):focus {
|
734 |
-
border: 1px solid #95bdd4;
|
735 |
-
-webkit-box-shadow: 0 2px 3px rgba(161,202,226,0.5) inset, 0 1px 0 rgba(255,255,255,0.2);
|
736 |
-
-moz-box-shadow: 0 2px 3px rgba(161,202,226,0.5) inset, 0 1px 0 rgba(255,255,255,0.2);
|
737 |
-
box-shadow: 0 2px 3px rgba(161,202,226,0.5) inset, 0 1px 0 rgba(255,255,255,0.2);
|
738 |
-
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
inc/class.admin.php
DELETED
@@ -1,811 +0,0 @@
|
|
1 |
-
<?php
|
2 |
-
Class SISAdmin {
|
3 |
-
|
4 |
-
// Original sizes
|
5 |
-
public static $original = array( 'thumbnail', 'medium', 'large' );
|
6 |
-
|
7 |
-
public function __construct(){
|
8 |
-
// Init
|
9 |
-
add_action ( 'admin_menu', array( &$this, 'init' ) );
|
10 |
-
add_action ( 'admin_enqueue_scripts', array( __CLASS__, 'registerScripts' ), 11 );
|
11 |
-
|
12 |
-
// Add underscore template
|
13 |
-
add_action( 'admin_footer', array( __CLASS__, 'addTemplate' ) );
|
14 |
-
|
15 |
-
// Add ajax action
|
16 |
-
// Option page
|
17 |
-
add_action( 'wp_ajax_'.'sis_get_list', array( __CLASS__, 'a_GetList' ) );
|
18 |
-
add_action( 'wp_ajax_'.'sis_rebuild_image', array( __CLASS__, 'a_ThumbnailRebuild' ) );
|
19 |
-
add_action( 'wp_ajax_'.'sis_get_sizes', array( __CLASS__, 'a_GetSizes' ) );
|
20 |
-
add_action( 'wp_ajax_'.'sis_add_size', array( __CLASS__, 'a_AddSize' ) );
|
21 |
-
add_action( 'wp_ajax_'.'sis_remove_size', array( __CLASS__, 'a_RemoveSize' ) );
|
22 |
-
|
23 |
-
// Add image sizes in the form, check if 3.3 is installed or not
|
24 |
-
if( !function_exists( 'is_main_query' ) ) {
|
25 |
-
add_filter( 'attachment_fields_to_edit', array( __CLASS__, 'sizesInForm' ), 11, 2 ); // Add our sizes to media forms
|
26 |
-
} else {
|
27 |
-
add_filter( 'image_size_names_choose', array( __CLASS__, 'AddThumbnailName' ) );
|
28 |
-
}
|
29 |
-
|
30 |
-
// Add link in plugins list
|
31 |
-
add_filter( 'plugin_action_links', array( __CLASS__,'addSettingsLink' ), 10, 2 );
|
32 |
-
|
33 |
-
// Add action in media row quick actions
|
34 |
-
add_filter( 'media_row_actions', array( __CLASS__, 'addActionsList' ), 10, 2 );
|
35 |
-
|
36 |
-
// Add filter for the Media single
|
37 |
-
add_filter( 'attachment_fields_to_edit', array( __CLASS__, 'addFieldRegenerate' ), 9, 2 );
|
38 |
-
|
39 |
-
}
|
40 |
-
|
41 |
-
/**
|
42 |
-
* Register javascripts and css.
|
43 |
-
*
|
44 |
-
* @access public
|
45 |
-
* @return void
|
46 |
-
* @author Nicolas Juen
|
47 |
-
*/
|
48 |
-
public static function registerScripts( $hook_suffix = '' ) {
|
49 |
-
if( !isset( $hook_suffix ) || empty( $hook_suffix ) ) {
|
50 |
-
return false;
|
51 |
-
}
|
52 |
-
|
53 |
-
if( $hook_suffix == 'options-media.php' ) {
|
54 |
-
// Add javascript
|
55 |
-
wp_enqueue_script( 'underscore', 'http://cdnjs.cloudflare.com/ajax/libs/underscore.js/1.4.3/underscore-min.js' , array(), '1.4.3' );
|
56 |
-
wp_enqueue_script( 'sis_js', SIS_URL.'/js/sis.min.js', array( 'jquery', 'jquery-ui-button', 'jquery-ui-progressbar', 'underscore' ), SIS_VERSION );
|
57 |
-
|
58 |
-
// Add CSS
|
59 |
-
wp_enqueue_style( 'jquery-ui-sis', SIS_URL.'/css/Aristo/jquery-ui-1.8.7.custom.css', array(), '1.8.7' );
|
60 |
-
wp_enqueue_style( 'sis_css', SIS_URL.'/css/sis-style.css', array(), SIS_VERSION );
|
61 |
-
} elseif( $hook_suffix == 'upload.php' || ( $hook_suffix == 'post.php' && isset( $_GET['post'] ) && isset( $_GET['action'] ) && $_GET['action'] == 'edit' ) ) {
|
62 |
-
// Add javascript
|
63 |
-
wp_enqueue_script( 'sis_js', SIS_URL.'/js/sis-attachments.min.js', array( 'jquery' ), SIS_VERSION );
|
64 |
-
}
|
65 |
-
|
66 |
-
// Add javascript translation
|
67 |
-
wp_localize_script( 'sis_js', 'sis', self::localizeVars() );
|
68 |
-
}
|
69 |
-
|
70 |
-
/**
|
71 |
-
* Localize the var for javascript
|
72 |
-
*
|
73 |
-
* @access public
|
74 |
-
* @return void
|
75 |
-
* @author Nicolas Juen
|
76 |
-
*/
|
77 |
-
public static function localizeVars() {
|
78 |
-
return array(
|
79 |
-
'ajaxUrl' => admin_url( '/admin-ajax.php' ),
|
80 |
-
'reading' => __( 'Reading attachments...', 'sis' ),
|
81 |
-
'maximumWidth' => __( 'Maximum width', 'sis' ),
|
82 |
-
'maximumHeight' => __( 'Maximum height', 'sis' ),
|
83 |
-
'crop' => __( 'Crop ?', 'sis' ),
|
84 |
-
'tr' => __( 'yes', 'sis' ),
|
85 |
-
'fl' => __( 'no', 'sis' ),
|
86 |
-
'show' => __( 'Show in post insertion ?', 'sis' ),
|
87 |
-
'of' => __( ' of ', 'sis' ),
|
88 |
-
'or' => __( ' or ', 'sis' ),
|
89 |
-
'beforeEnd' => __( ' before the end.', 'sis' ),
|
90 |
-
'deleteImage' => __( 'Delete', 'sis' ),
|
91 |
-
'noMedia' => __( 'No media in your site to regenerate !', 'sis' ),
|
92 |
-
'regenerating' => __( 'Regenerating ', 'sis'),
|
93 |
-
'regenerate' => __( 'Regenerate ', 'sis'),
|
94 |
-
'validate' => __( 'Validate image size name', 'sis' ),
|
95 |
-
'done' => __( 'Done.', 'sis' ),
|
96 |
-
'size' => __( 'Size', 'sis' ),
|
97 |
-
'notOriginal' => __( 'Don\'t use the basic Wordpress thumbnail size name, use the form above to edit them', 'sis' ),
|
98 |
-
'alreadyPresent' => __( 'This size is already registered, edit it instead of recreating it.', 'sis' ),
|
99 |
-
'confirmDelete' => __( 'Do you really want to delete these size ?', 'sis' ),
|
100 |
-
'update' => __( 'Update', 'sis' ),
|
101 |
-
'ajaxErrorHandler' => __( 'Error requesting page', 'sis' ),
|
102 |
-
'messageRegenerated' => __( 'images have been regenerated !', 'sis' ),
|
103 |
-
'validateButton' => __( 'Validate', 'sis' ),
|
104 |
-
'startedAt' => __( ' started at', 'sis' ),
|
105 |
-
'customName' => __( 'Public name', 'sis' ),
|
106 |
-
'finishedAt' => __( ' finished at :', 'sis' ),
|
107 |
-
'phpError' => __( 'Error during the php treatment, be sure to not have php errors in your page', 'sis' ),
|
108 |
-
'notSaved' => __( 'All the sizes you have modifed are not saved, continue anyway ?', 'sis' ),
|
109 |
-
'soloRegenerated' => __( 'This image has been regenerated in %s seconds', 'sis' ),
|
110 |
-
'regen_one' => wp_create_nonce( 'regen' )
|
111 |
-
);
|
112 |
-
}
|
113 |
-
|
114 |
-
public static function addTemplate() {
|
115 |
-
global $pagenow;
|
116 |
-
if( $pagenow != 'options-media.php' ) {
|
117 |
-
return false;
|
118 |
-
}
|
119 |
-
|
120 |
-
if( is_file( SIS_DIR.'/templates/admin-js.html' ) ) {
|
121 |
-
include( SIS_DIR.'/templates/admin-js.html' );
|
122 |
-
}
|
123 |
-
|
124 |
-
return true;
|
125 |
-
}
|
126 |
-
|
127 |
-
/**
|
128 |
-
* Add action in media row
|
129 |
-
*
|
130 |
-
* @since 2.2
|
131 |
-
* @access public
|
132 |
-
* @return $actions : array of actions and content to display
|
133 |
-
* @author Nicolas Juen
|
134 |
-
*/
|
135 |
-
public static function addActionsList( $actions, $object ) {
|
136 |
-
|
137 |
-
// Add action for regeneration
|
138 |
-
$actions['sis-regenerate'] = "<a href='#' data-id='".$object->ID."' class='sis-regenerate-one'>".__( 'Regenerate thumbnails', 'sis' )."</a>";
|
139 |
-
|
140 |
-
// Return actions
|
141 |
-
return $actions;
|
142 |
-
}
|
143 |
-
|
144 |
-
/**
|
145 |
-
* Add a link to the setting option page
|
146 |
-
*
|
147 |
-
* @access public
|
148 |
-
* @param array $links
|
149 |
-
* @param string $file
|
150 |
-
* @return void
|
151 |
-
* @author Nicolas Juen
|
152 |
-
*/
|
153 |
-
public static function addSettingsLink( $links, $file ) {
|
154 |
-
|
155 |
-
if( $file != 'simple-image-sizes/simple_image_sizes.php' ) {
|
156 |
-
return $links;
|
157 |
-
}
|
158 |
-
|
159 |
-
$settings_link = '<a href="'.admin_url('options-media.php').'"> '.__( 'Settings', 'sis' ).' </a>';
|
160 |
-
array_unshift( $links, $settings_link );
|
161 |
-
|
162 |
-
return $links;
|
163 |
-
}
|
164 |
-
|
165 |
-
/**
|
166 |
-
* Init for the option page
|
167 |
-
*
|
168 |
-
* @access public
|
169 |
-
* @return void
|
170 |
-
* @author Nicolas Juen
|
171 |
-
*/
|
172 |
-
function init() {
|
173 |
-
// Check if admin
|
174 |
-
if( !is_admin() ) {
|
175 |
-
return false;
|
176 |
-
}
|
177 |
-
|
178 |
-
// Get the image sizes
|
179 |
-
global $_wp_additional_image_sizes;
|
180 |
-
$options = get_option( SIS_OPTION );
|
181 |
-
|
182 |
-
// Get the sizes and add the settings
|
183 |
-
foreach ( get_intermediate_image_sizes() as $s ) {
|
184 |
-
// Don't make the original sizes or numeric sizes that appear
|
185 |
-
if( in_array( $s, self::$original ) || is_integer( $s ) ) {
|
186 |
-
continue;
|
187 |
-
}
|
188 |
-
|
189 |
-
// Set width
|
190 |
-
$width = isset( $_wp_additional_image_sizes[$s]['width'] ) ? intval( $_wp_additional_image_sizes[$s]['width'] ) : get_option( "{$s}_size_w" ) ;
|
191 |
-
|
192 |
-
// Set height
|
193 |
-
$height = isset( $_wp_additional_image_sizes[$s]['height'] ) ? intval( $_wp_additional_image_sizes[$s]['height'] ) : get_option( "{$s}_size_h" ) ;
|
194 |
-
|
195 |
-
//Set crop
|
196 |
-
$crop = isset( $_wp_additional_image_sizes[$s]['crop'] ) ? intval( $_wp_additional_image_sizes[$s]['crop'] ) : get_option( "{$s}_crop" ) ;
|
197 |
-
|
198 |
-
// Add the setting field for this size
|
199 |
-
add_settings_field( 'image_size_'.$s, sprintf( __( '%s size', 'sis' ), $s ), array( &$this, 'imageSizes' ), 'media' , 'default', array( 'name' => $s , 'width' => $width , 'height' => $height, 'c' => $crop ) );
|
200 |
-
}
|
201 |
-
|
202 |
-
// Register the setting for media option page
|
203 |
-
register_setting( 'media', SIS_OPTION );
|
204 |
-
|
205 |
-
// Add the button
|
206 |
-
add_settings_field( 'add_size_button', __( 'Add a new size', 'sis' ), array( &$this, 'addSizeButton' ), 'media' );
|
207 |
-
|
208 |
-
// Add php button
|
209 |
-
add_settings_field( 'get_php_button', __( 'Get php for theme', 'sis' ), array( &$this, 'getPhpButton' ), 'media' );
|
210 |
-
|
211 |
-
// Add section for the thumbnail regeneration
|
212 |
-
add_settings_section( 'thumbnail_regenerate', __( 'Thumbnail regeneration', 'sis' ), array( &$this, 'thumbnailRegenerate' ), 'media' );
|
213 |
-
}
|
214 |
-
|
215 |
-
/**
|
216 |
-
* Display the row of the image size
|
217 |
-
*
|
218 |
-
* @access public
|
219 |
-
* @param mixed $args
|
220 |
-
* @return void
|
221 |
-
* @author Nicolas Juen
|
222 |
-
*/
|
223 |
-
public function imageSizes( $args ) {
|
224 |
-
|
225 |
-
if( is_integer( $args['name'] ) )
|
226 |
-
return false;
|
227 |
-
|
228 |
-
// Get the options
|
229 |
-
$sizes = (array)get_option( SIS_OPTION, array() );
|
230 |
-
|
231 |
-
// Get the vars
|
232 |
-
$height = isset( $sizes[$args['name']]['h'] )? $sizes[$args['name']]['h'] : $args['height'] ;
|
233 |
-
$width = isset( $sizes[$args['name']]['w'] )? $sizes[$args['name']]['w'] : $args['width'] ;
|
234 |
-
$crop = isset( $sizes[$args['name']]['c'] ) && !empty( $sizes[$args['name']]['c'] )? $sizes[$args['name']]['c'] : $args['c'] ;
|
235 |
-
$show = isset( $sizes[$args['name']]['s'] ) && !empty( $sizes[$args['name']]['s'] )? '1' : '0' ;
|
236 |
-
$custom = isset( $sizes[$args['name']]['custom'] ) && !empty( $sizes[$args['name']]['custom'] )? '1' : '0' ;
|
237 |
-
$name = isset( $sizes[$args['name']]['n'] ) && !empty( $sizes[$args['name']]['n'] )? esc_html( $sizes[$args['name']]['n'] ) : esc_html( $args['name'] ) ;
|
238 |
-
|
239 |
-
?>
|
240 |
-
<input type="hidden" value="<?php echo esc_attr( $args['name'] ); ?>" name="image_name" />
|
241 |
-
<?php if( $custom ): ?>
|
242 |
-
<input name="<?php echo esc_attr( 'custom_image_sizes['.$args['name'].'][custom]' ); ?>" type="hidden" id="<?php echo esc_attr( 'custom_image_sizes['.$args['name'].'][custom]' ); ?>" value="1" />
|
243 |
-
<?php else: ?>
|
244 |
-
<input name="<?php echo esc_attr( 'custom_image_sizes['.$args['name'].'][theme]' ); ?>" type="hidden" id="<?php echo esc_attr( 'custom_image_sizes['.$args['name'].'][theme]' ); ?>" value="1" />
|
245 |
-
<?php endif; ?>
|
246 |
-
<label class="sis-label" for="<?php echo esc_attr( 'custom_image_sizes['.$args['name'].'][w]' ); ?>">
|
247 |
-
<?php _e( 'Maximum width', 'sis'); ?>
|
248 |
-
<input name="<?php esc_attr_e( 'custom_image_sizes['.$args['name'].'][w]' ); ?>" class='w small-text' type="number" step='1' min='0' id="<?php echo esc_attr( 'custom_image_sizes['.$args['name'].'][w]' ); ?>" base_w='<?php echo esc_attr( $width ); ?>' value="<?php echo esc_attr( $width ); ?>" />
|
249 |
-
</label>
|
250 |
-
<label class="sis-label" for="<?php esc_attr_e( 'custom_image_sizes['.$args['name'].'][h]' ); ?>">
|
251 |
-
<?php _e( 'Maximum height', 'sis'); ?>
|
252 |
-
<input name="<?php esc_attr_e( 'custom_image_sizes['.$args['name'].'][h]' ); ?>" class='h small-text' type="number" step='1' min='0' id="<?php echo esc_attr( 'custom_image_sizes['.$args['name'].'][h]' ); ?>" base_h='<?php echo esc_attr( $height ); ?>' value="<?php echo esc_attr( $height ); ?>" />
|
253 |
-
</label>
|
254 |
-
<label class="sis-label" for="<?php echo esc_attr( 'custom_image_sizes['.$args['name'].'][n]' ); ?>">
|
255 |
-
<?php _e( 'Public name', 'sis'); ?>
|
256 |
-
<input name="<?php echo esc_attr( 'custom_image_sizes['.$args['name'].'][n]' ); ?>" class='n' type="text" id="<?php echo esc_attr( 'custom_image_sizes['.$args['name'].'][n]' ); ?>" base_n='<?php echo $name; ?>' value="<?php echo $name ?>" />
|
257 |
-
</label>
|
258 |
-
<span class="size_options">
|
259 |
-
<input type='checkbox' id="<?php echo esc_attr( 'custom_image_sizes['.$args['name'].'][c]' ); ?>" <?php checked( $crop, 1 ) ?> class="c crop" base_c='<?php echo esc_attr( $crop ); ?>' name="<?php echo esc_attr( 'custom_image_sizes['.$args['name'].'][c]' ); ?>" value="1" />
|
260 |
-
<label class="c" for="<?php echo esc_attr( 'custom_image_sizes['.$args['name'].'][c]' ); ?>"><?php _e( 'Crop ?', 'sis'); ?></label>
|
261 |
-
|
262 |
-
<input type='checkbox' id="<?php echo esc_attr( 'custom_image_sizes['.$args['name'].'][s]'); ?>" <?php checked( $show, 1 ) ?> class="s show" base_s='<?php echo esc_attr( $show ); ?>' name="<?php echo esc_attr( 'custom_image_sizes['.$args['name'].'][s]'); ?>" value="1" />
|
263 |
-
<label class="s" for="<?php echo esc_attr( 'custom_image_sizes['.$args['name'].'][s]'); ?>"><?php _e( 'Show in post insertion ?', 'sis'); ?></label>
|
264 |
-
</span>
|
265 |
-
<span class="delete_size"><?php _e( 'Delete', 'sis'); ?></span>
|
266 |
-
<span class="add_size validate_size"><?php _e( 'Update', 'sis'); ?></span>
|
267 |
-
|
268 |
-
<input type="hidden" class="deleteSize" value='<?php echo wp_create_nonce( 'delete_'.$args['name'] ); ?>' />
|
269 |
-
<?php }
|
270 |
-
|
271 |
-
/**
|
272 |
-
* Add the button to add a size
|
273 |
-
*
|
274 |
-
* @access public
|
275 |
-
* @return void
|
276 |
-
* @author Nicolas Juen
|
277 |
-
*/
|
278 |
-
public function addSizeButton() { ?>
|
279 |
-
<input type="button" class="button-secondary action" id="add_size" value="<?php esc_attr_e( 'Add a new size of thumbnail', 'sis'); ?>" />
|
280 |
-
<?php
|
281 |
-
}
|
282 |
-
|
283 |
-
/**
|
284 |
-
* Add the button to get the php for th sizes
|
285 |
-
*
|
286 |
-
* @access public
|
287 |
-
* @return void
|
288 |
-
* @author Nicolas Juen
|
289 |
-
*/
|
290 |
-
public function getPhpButton() { ?>
|
291 |
-
<input type="button" class="button-secondary action" id="get_php" value="<?php esc_attr_e( 'Get the PHP for the theme', 'sis'); ?>" />
|
292 |
-
<p> <?php _e( 'Copy and paste the code below into your Wordpress theme function file if you wanted to save them and deactivate the plugin.', 'sis'); ?> </p>
|
293 |
-
<code></code>
|
294 |
-
<?php
|
295 |
-
}
|
296 |
-
|
297 |
-
/**
|
298 |
-
* Display the Table of sizes and post types for regenerating
|
299 |
-
*
|
300 |
-
* @access public
|
301 |
-
* @return void
|
302 |
-
* @author Nicolas Juen
|
303 |
-
*/
|
304 |
-
public function thumbnailRegenerate() {
|
305 |
-
if( is_file( SIS_DIR.'/templates/options-media.php' ) ) {
|
306 |
-
include( SIS_DIR.'/templates/options-media.php' );
|
307 |
-
} else {
|
308 |
-
esc_html_e( 'Admin option-media template missing' );
|
309 |
-
}
|
310 |
-
}
|
311 |
-
|
312 |
-
/**
|
313 |
-
* Add a size by Ajax
|
314 |
-
*
|
315 |
-
* @access public
|
316 |
-
* @return void
|
317 |
-
* @author Nicolas Juen
|
318 |
-
*/
|
319 |
-
public static function a_AddSize() {
|
320 |
-
|
321 |
-
// Get the nonce
|
322 |
-
$nonce = isset( $_POST['nonce'] ) ? $_POST['nonce']: '' ;
|
323 |
-
|
324 |
-
// Get old options
|
325 |
-
$sizes = (array)get_option( SIS_OPTION, array() );
|
326 |
-
|
327 |
-
// Check entries
|
328 |
-
$name = isset( $_POST['name'] ) ? sanitize_title( $_POST['name'] ): '' ;
|
329 |
-
$height = !isset( $_POST['height'] )? 0 : absint( $_POST['height'] );
|
330 |
-
$width = !isset( $_POST['width'] )? 0 : absint( $_POST['width'] );
|
331 |
-
$crop = isset( $_POST['crop'] ) && $_POST['crop'] == 'false' ? false : true;
|
332 |
-
$show = isset( $_POST['show'] ) && $_POST['show'] == 'false' ? false : true;
|
333 |
-
$cn = isset( $_POST['customName'] ) && !empty( $_POST['customName'] ) ? sanitize_text_field( $_POST['customName'] ): $name ;
|
334 |
-
|
335 |
-
// Check the nonce
|
336 |
-
if( !wp_verify_nonce( $nonce , 'add_size' ) ) {
|
337 |
-
die(0);
|
338 |
-
}
|
339 |
-
|
340 |
-
// If no name given do not save
|
341 |
-
if( empty( $name ) ) {
|
342 |
-
die(0);
|
343 |
-
}
|
344 |
-
|
345 |
-
// Make values
|
346 |
-
$values = array( 'custom' => 1, 'w' => $width , 'h' => $height, 'c' => $crop, 's' => $show, 'n' => $cn );
|
347 |
-
|
348 |
-
// If the size have not changed return 2
|
349 |
-
if( isset( $sizes[$name] ) && $sizes[$name] === $values ) {
|
350 |
-
die(2);
|
351 |
-
}
|
352 |
-
|
353 |
-
// Put the new values
|
354 |
-
$sizes[$name] = $values;
|
355 |
-
|
356 |
-
// display update result
|
357 |
-
echo (int)update_option( 'custom_image_sizes', $sizes );
|
358 |
-
die();
|
359 |
-
}
|
360 |
-
|
361 |
-
/**
|
362 |
-
* Remove a size by Ajax
|
363 |
-
*
|
364 |
-
* @access public
|
365 |
-
* @return void
|
366 |
-
* @author Nicolas Juen
|
367 |
-
*/
|
368 |
-
public static function a_RemoveSize() {
|
369 |
-
|
370 |
-
// Get old options
|
371 |
-
$sizes = (array)get_option( SIS_OPTION, array() );
|
372 |
-
|
373 |
-
// Get the nonce and name
|
374 |
-
$nonce = isset( $_POST['nonce'] ) ? $_POST['nonce']: '' ;
|
375 |
-
$name = isset( $_POST['name'] ) ? sanitize_title( $_POST['name'] ): '' ;
|
376 |
-
|
377 |
-
// Check the nonce
|
378 |
-
if( !wp_verify_nonce( $nonce , 'delete_'.$name ) ) {
|
379 |
-
die(0);
|
380 |
-
}
|
381 |
-
|
382 |
-
// Remove the size
|
383 |
-
unset( $sizes[sanitize_title( $name )] );
|
384 |
-
unset( $sizes[0] );
|
385 |
-
|
386 |
-
// Display the results
|
387 |
-
echo (int)update_option( SIS_OPTION, $sizes );
|
388 |
-
die();
|
389 |
-
}
|
390 |
-
|
391 |
-
/**
|
392 |
-
* Display the add_image_size for the registered sizes
|
393 |
-
*
|
394 |
-
* @access public
|
395 |
-
* @return void
|
396 |
-
*/
|
397 |
-
public static function a_GetSizes() {
|
398 |
-
global $_wp_additional_image_sizes;
|
399 |
-
|
400 |
-
foreach ( get_intermediate_image_sizes() as $s ) {
|
401 |
-
// Don't make the original sizes
|
402 |
-
if( in_array( $s, self::$original ) ) {
|
403 |
-
continue;
|
404 |
-
}
|
405 |
-
|
406 |
-
// Set width
|
407 |
-
$width = isset( $_wp_additional_image_sizes[$s]['width'] ) ? intval( $_wp_additional_image_sizes[$s]['width'] ) : get_option( "{$s}_size_w" ) ;
|
408 |
-
|
409 |
-
// Set height
|
410 |
-
$height = isset( $_wp_additional_image_sizes[$s]['height'] ) ? intval( $_wp_additional_image_sizes[$s]['height'] ) : get_option( "{$s}_size_h" ) ;
|
411 |
-
|
412 |
-
//Set crop
|
413 |
-
$crop = isset( $_wp_additional_image_sizes[$s]['crop'] ) ? intval( $_wp_additional_image_sizes[$s]['crop'] ) : get_option( "{$s}_crop" ) ;
|
414 |
-
|
415 |
-
$crop = ( $crop == 0 )? 'false' : 'true' ;
|
416 |
-
?>
|
417 |
-
add_image_size( '<?php echo $s; ?>', '<?php echo $width; ?>', '<?php echo $height; ?>', <?php echo $crop ?> );<br />
|
418 |
-
<?php
|
419 |
-
}
|
420 |
-
|
421 |
-
die();
|
422 |
-
}
|
423 |
-
/**
|
424 |
-
*
|
425 |
-
* Get the media list to regenerate
|
426 |
-
*
|
427 |
-
* @param : void
|
428 |
-
* @return oid
|
429 |
-
*/
|
430 |
-
public static function a_GetList() {
|
431 |
-
global $wpdb;
|
432 |
-
// Basic vars
|
433 |
-
$res = array();
|
434 |
-
$nonce = isset( $_POST['nonce'] ) ? $_POST['nonce']: '' ;
|
435 |
-
|
436 |
-
// Check the nonce
|
437 |
-
if( !wp_verify_nonce( $nonce , 'getList' ) ) {
|
438 |
-
self::displayJson();
|
439 |
-
}
|
440 |
-
|
441 |
-
if ( isset( $_POST['post_types'] ) && !empty( $_POST['post_types'] ) ) {
|
442 |
-
|
443 |
-
foreach( $_POST['post_types'] as $key => $type ) {
|
444 |
-
if( !post_type_exists( $type ) ) {
|
445 |
-
unset( $_POST['post_types'][$key] );
|
446 |
-
}
|
447 |
-
}
|
448 |
-
|
449 |
-
if( empty( $_POST['post_types'][$key]) ) {
|
450 |
-
self::displayJson();
|
451 |
-
}
|
452 |
-
|
453 |
-
// Get image medias
|
454 |
-
$whichmimetype = wp_post_mime_type_where( 'image', $wpdb->posts );
|
455 |
-
|
456 |
-
// Get all parent from post type
|
457 |
-
$attachments = $wpdb->get_results( "SELECT *
|
458 |
-
FROM $wpdb->posts
|
459 |
-
WHERE 1 = 1
|
460 |
-
AND post_type = 'attachment'
|
461 |
-
$whichmimetype
|
462 |
-
AND post_parent IN (
|
463 |
-
SELECT DISTINCT ID
|
464 |
-
FROM $wpdb->posts
|
465 |
-
WHERE post_type IN ('".implode( "', '", $_POST['post_types'] )."')
|
466 |
-
)" );
|
467 |
-
|
468 |
-
} else {
|
469 |
-
$attachments =& get_children( array(
|
470 |
-
'post_type' => 'attachment',
|
471 |
-
'post_mime_type' => 'image',
|
472 |
-
'numberposts' => -1,
|
473 |
-
'post_status' => null,
|
474 |
-
'post_parent' => null, // any parent
|
475 |
-
'output' => 'object',
|
476 |
-
) );
|
477 |
-
}
|
478 |
-
|
479 |
-
// Get the attachments
|
480 |
-
foreach ( $attachments as $attachment ) {
|
481 |
-
$res[] = array( 'id' => $attachment->ID, 'title' => $attachment->post_title );
|
482 |
-
}
|
483 |
-
// Return the Id's and Title of medias
|
484 |
-
self::displayJson( $res );
|
485 |
-
}
|
486 |
-
|
487 |
-
/**
|
488 |
-
* Rebuild the image
|
489 |
-
*
|
490 |
-
* @access public
|
491 |
-
* @return void
|
492 |
-
* @author Nicolas Juen
|
493 |
-
*/
|
494 |
-
public static function a_ThumbnailRebuild() {
|
495 |
-
global $wpdb;
|
496 |
-
|
497 |
-
// Get the nonce
|
498 |
-
$nonce = isset( $_POST['nonce'] ) ? $_POST['nonce']: '' ;
|
499 |
-
|
500 |
-
// Time a the begining
|
501 |
-
$start_time = microtime( true );
|
502 |
-
|
503 |
-
// Get the thumbnails
|
504 |
-
$thumbnails = isset( $_POST['thumbnails'] )? $_POST['thumbnails'] : NULL;
|
505 |
-
|
506 |
-
// Check the nonce
|
507 |
-
if( !wp_verify_nonce( $nonce , 'regen' ) ) {
|
508 |
-
self::displayJson( array( 'error' => _e( 'Trying to cheat ?', 'sis' ) ) );
|
509 |
-
}
|
510 |
-
|
511 |
-
// Get the id
|
512 |
-
$id = isset( $_POST["id"] ) ? $_POST["id"] : 0 ;
|
513 |
-
|
514 |
-
// Check Id
|
515 |
-
if( (int)$id <= 0 ) {
|
516 |
-
self::displayJson(
|
517 |
-
array(
|
518 |
-
'time' => round( microtime( true ) - $start_time, 4 ),
|
519 |
-
'error' => __( 'No id given in POST datas.', 'sis' )
|
520 |
-
)
|
521 |
-
);
|
522 |
-
}
|
523 |
-
|
524 |
-
// Get the path
|
525 |
-
$fullsizepath = get_attached_file( $id );
|
526 |
-
|
527 |
-
// Regen the attachment
|
528 |
-
if ( false !== $fullsizepath && @file_exists( $fullsizepath ) ) {
|
529 |
-
set_time_limit( 60 );
|
530 |
-
if( wp_update_attachment_metadata( $id, self::wp_generate_attachment_metadata_custom( $id, $fullsizepath, $thumbnails ) ) == false ) {
|
531 |
-
self::displayJson(
|
532 |
-
array(
|
533 |
-
'src' => wp_get_attachment_thumb_url( $id ),
|
534 |
-
'time' => round( microtime( true ) - $start_time, 4 ),
|
535 |
-
'message' => sprintf( __( 'This file already exists in this size and have not been regenerated :<br/><a target="_blank" href="%1$s" >%2$s</a>', 'sis'), get_edit_post_link( $id ), get_the_title( $id ) )
|
536 |
-
)
|
537 |
-
);
|
538 |
-
}
|
539 |
-
} else {
|
540 |
-
self::displayJson(
|
541 |
-
array(
|
542 |
-
'src' => wp_get_attachment_thumb_url( $id ),
|
543 |
-
'time' => round( microtime( true ) - $start_time, 4 ),
|
544 |
-
'error' => sprintf( __( 'This file does not exists and have not been regenerated :<br/><a target="_blank" href="%1$s" >%2$s</a>', 'sis'), get_edit_post_link( $id ), get_the_title( $id ) )
|
545 |
-
)
|
546 |
-
);
|
547 |
-
}
|
548 |
-
// Display the attachment url for feedback
|
549 |
-
self::displayJson(
|
550 |
-
array(
|
551 |
-
'time' => round( microtime( true ) - $start_time, 4 ) ,
|
552 |
-
'src' => wp_get_attachment_thumb_url( $id ),
|
553 |
-
'title' => get_the_title( $id )
|
554 |
-
)
|
555 |
-
);
|
556 |
-
}
|
557 |
-
|
558 |
-
/**
|
559 |
-
* Generate post thumbnail attachment meta data.
|
560 |
-
*
|
561 |
-
* @since 2.1.0
|
562 |
-
*
|
563 |
-
* @param int $attachment_id Attachment Id to process.
|
564 |
-
* @param string $file Filepath of the Attached image.
|
565 |
-
* @return mixed Metadata for attachment.
|
566 |
-
*/
|
567 |
-
public static function wp_generate_attachment_metadata_custom( $attachment_id, $file, $thumbnails = NULL ) {
|
568 |
-
$attachment = get_post( $attachment_id );
|
569 |
-
|
570 |
-
$meta_datas = get_post_meta( $attachment_id, '_wp_attachment_metadata', true );
|
571 |
-
|
572 |
-
$metadata = array();
|
573 |
-
if ( preg_match('!^image/!', get_post_mime_type( $attachment )) && file_is_displayable_image($file) ) {
|
574 |
-
$imagesize = getimagesize( $file );
|
575 |
-
$metadata['width'] = $imagesize[0];
|
576 |
-
$metadata['height'] = $imagesize[1];
|
577 |
-
list($uwidth, $uheight) = wp_constrain_dimensions($metadata['width'], $metadata['height'], 128, 96);
|
578 |
-
$metadata['hwstring_small'] = "height='$uheight' width='$uwidth'";
|
579 |
-
|
580 |
-
// Make the file path relative to the upload dir
|
581 |
-
$metadata['file'] = _wp_relative_upload_path($file);
|
582 |
-
|
583 |
-
// make thumbnails and other intermediate sizes
|
584 |
-
global $_wp_additional_image_sizes;
|
585 |
-
|
586 |
-
foreach ( get_intermediate_image_sizes() as $s ) {
|
587 |
-
$sizes[$s] = array( 'width' => '', 'height' => '', 'crop' => FALSE );
|
588 |
-
if ( isset( $_wp_additional_image_sizes[$s]['width'] ) )
|
589 |
-
$sizes[$s]['width'] = intval( $_wp_additional_image_sizes[$s]['width'] ); // For theme-added sizes
|
590 |
-
else
|
591 |
-
$sizes[$s]['width'] = get_option( "{$s}_size_w" ); // For default sizes set in options
|
592 |
-
if ( isset( $_wp_additional_image_sizes[$s]['height'] ) )
|
593 |
-
$sizes[$s]['height'] = intval( $_wp_additional_image_sizes[$s]['height'] ); // For theme-added sizes
|
594 |
-
else
|
595 |
-
$sizes[$s]['height'] = get_option( "{$s}_size_h" ); // For default sizes set in options
|
596 |
-
if ( isset( $_wp_additional_image_sizes[$s]['crop'] ) )
|
597 |
-
$sizes[$s]['crop'] = intval( $_wp_additional_image_sizes[$s]['crop'] ); // For theme-added sizes
|
598 |
-
else
|
599 |
-
$sizes[$s]['crop'] = get_option( "{$s}_crop" ); // For default sizes set in options
|
600 |
-
}
|
601 |
-
|
602 |
-
$sizes = apply_filters( 'intermediate_image_sizes_advanced', $sizes );
|
603 |
-
|
604 |
-
// Only if not all sizes
|
605 |
-
if( isset( $thumbnails ) && is_array( $thumbnails ) && isset( $meta_datas['sizes'] ) && !empty( $meta_datas['sizes'] ) ) {
|
606 |
-
// Fill the array with the other sizes not have to be done
|
607 |
-
foreach( $meta_datas['sizes'] as $name => $fsize ) {
|
608 |
-
$metadata['sizes'][$name] = $fsize;
|
609 |
-
}
|
610 |
-
}
|
611 |
-
|
612 |
-
foreach ( $sizes as $size => $size_data ) {
|
613 |
-
if( isset( $thumbnails ) )
|
614 |
-
if( !in_array( $size, $thumbnails ) ) {
|
615 |
-
continue;
|
616 |
-
}
|
617 |
-
|
618 |
-
$resized = image_make_intermediate_size( $file, $size_data['width'], $size_data['height'], $size_data['crop'] );
|
619 |
-
|
620 |
-
if( isset( $meta_datas['size'][$size] ) ) {
|
621 |
-
// Remove the size from the orignal sizes for after work
|
622 |
-
unset( $meta_datas['size'][$size] );
|
623 |
-
}
|
624 |
-
|
625 |
-
if ( $resized ) {
|
626 |
-
$metadata['sizes'][$size] = $resized;
|
627 |
-
}
|
628 |
-
}
|
629 |
-
|
630 |
-
// fetch additional metadata from exif/iptc
|
631 |
-
$image_meta = wp_read_image_metadata( $file );
|
632 |
-
if ( $image_meta ) {
|
633 |
-
$metadata['image_meta'] = $image_meta;
|
634 |
-
}
|
635 |
-
}
|
636 |
-
|
637 |
-
return apply_filters( 'wp_generate_attachment_metadata', $metadata, $attachment_id );
|
638 |
-
}
|
639 |
-
|
640 |
-
/**
|
641 |
-
* Add the custom sizes to the image sizes in article edition
|
642 |
-
*
|
643 |
-
* @access public
|
644 |
-
* @param array $form_fields
|
645 |
-
* @param object $post
|
646 |
-
* @return void
|
647 |
-
* @author Nicolas Juen
|
648 |
-
* @author Additional Image Sizes (zui)
|
649 |
-
*/
|
650 |
-
public static function sizesInForm( $form_fields, $post ) {
|
651 |
-
// Protect from being view in Media editor where there are no sizes
|
652 |
-
if ( isset( $form_fields['image-size'] ) ) {
|
653 |
-
$out = NULL;
|
654 |
-
$size_names = array();
|
655 |
-
$sizes_custom = get_option( SIS_OPTION, array() );
|
656 |
-
|
657 |
-
if ( is_array( $sizes_custom ) ) {
|
658 |
-
foreach( $sizes_custom as $key => $value ) {
|
659 |
-
if( isset( $value['s'] ) && $value['s'] == 1 ) {
|
660 |
-
$size_names[$key] = self::_getThumbnailName( $key );;
|
661 |
-
}
|
662 |
-
}
|
663 |
-
}
|
664 |
-
foreach ( $size_names as $size => $label ) {
|
665 |
-
$downsize = image_downsize( $post->ID, $size );
|
666 |
-
|
667 |
-
// is this size selectable?
|
668 |
-
$enabled = ( $downsize[3] || 'full' == $size );
|
669 |
-
$css_id = "image-size-{$size}-{$post->ID}";
|
670 |
-
|
671 |
-
// We must do a clumsy search of the existing html to determine is something has been checked yet
|
672 |
-
if ( FALSE === strpos( 'checked="checked"', $form_fields['image-size']['html'] ) ) {
|
673 |
-
if ( empty($check) )
|
674 |
-
$check = get_user_setting( 'imgsize' ); // See if they checked a custom size last time
|
675 |
-
|
676 |
-
$checked = '';
|
677 |
-
|
678 |
-
// if this size is the default but that's not available, don't select it
|
679 |
-
if ( $size == $check || str_replace( " ", "", $size ) == $check ) {
|
680 |
-
if ( $enabled )
|
681 |
-
$checked = " checked='checked'";
|
682 |
-
else
|
683 |
-
$check = '';
|
684 |
-
} elseif ( !$check && $enabled && 'thumbnail' != $size ) {
|
685 |
-
// if $check is not enabled, default to the first available size that's bigger than a thumbnail
|
686 |
-
$check = $size;
|
687 |
-
$checked = " checked='checked'";
|
688 |
-
}
|
689 |
-
}
|
690 |
-
$html = "<div class='image-size-item' style='min-height: 50px; margin-top: 18px;'><input type='radio' " . disabled( $enabled, false, false ) . "name='attachments[$post->ID][image-size]' id='{$css_id}' value='{$size}'$checked />";
|
691 |
-
|
692 |
-
$html .= "<label for='{$css_id}'>$label</label>";
|
693 |
-
// only show the dimensions if that choice is available
|
694 |
-
if ( $enabled )
|
695 |
-
$html .= " <label for='{$css_id}' class='help'>" . sprintf( "(%d × %d)", $downsize[1], $downsize[2] ). "</label>";
|
696 |
-
|
697 |
-
$html .= '</div>';
|
698 |
-
|
699 |
-
$out .= $html;
|
700 |
-
}
|
701 |
-
$form_fields['image-size']['html'] .= $out;
|
702 |
-
} // End protect from Media editor
|
703 |
-
|
704 |
-
return $form_fields;
|
705 |
-
}
|
706 |
-
|
707 |
-
/**
|
708 |
-
* Add the thumbnail name in the post insertion, based on new WP filter
|
709 |
-
*
|
710 |
-
* @access public
|
711 |
-
* @param array $sizes
|
712 |
-
* @return array
|
713 |
-
* @since 2.3
|
714 |
-
* @author Nicolas Juen
|
715 |
-
* @author radeno based on this post : http://www.wpmayor.com/wordpress-hacks/how-to-add-custom-image-sizes-to-wordpress-uploader/
|
716 |
-
*/
|
717 |
-
public static function AddThumbnailName($sizes) {
|
718 |
-
// Get options
|
719 |
-
$sizes_custom = get_option( SIS_OPTION, array() );
|
720 |
-
// init size array
|
721 |
-
$addsizes = array();
|
722 |
-
|
723 |
-
// check there is custom sizes
|
724 |
-
if ( is_array( $sizes_custom ) && !empty( $sizes_custom ) ) {
|
725 |
-
foreach( $sizes_custom as $key => $value ) {
|
726 |
-
// If we show this size in the admin
|
727 |
-
if( isset( $value['s'] ) && $value['s'] == 1 ) {
|
728 |
-
$addsizes[$key] = self::_getThumbnailName( $key );
|
729 |
-
}
|
730 |
-
}
|
731 |
-
}
|
732 |
-
|
733 |
-
// Merge the two array
|
734 |
-
$newsizes = array_merge($sizes, $addsizes);
|
735 |
-
|
736 |
-
// Add new size
|
737 |
-
return $newsizes;
|
738 |
-
}
|
739 |
-
|
740 |
-
/**
|
741 |
-
* Get a thumbnail name from its slug
|
742 |
-
*
|
743 |
-
* @access private
|
744 |
-
* @param string $thumbnailSlug : the slug of the thumbnail
|
745 |
-
* @return array
|
746 |
-
* @since 2.3
|
747 |
-
* @author Nicolas Juen
|
748 |
-
*/
|
749 |
-
private static function _getThumbnailName( $thumbnailSlug = '' ) {
|
750 |
-
|
751 |
-
// get the options
|
752 |
-
$sizes_custom = get_option( SIS_OPTION );
|
753 |
-
|
754 |
-
// If the size exists
|
755 |
-
if( isset( $sizes_custom[$thumbnailSlug] ) ) {
|
756 |
-
// If the name exists return it, slug by default
|
757 |
-
if( isset( $sizes_custom[$thumbnailSlug]['n'] ) && !empty( $sizes_custom[$thumbnailSlug]['n'] ) ) {
|
758 |
-
return $sizes_custom[$thumbnailSlug]['n'];
|
759 |
-
} else {
|
760 |
-
return $thumbnailSlug;
|
761 |
-
}
|
762 |
-
}
|
763 |
-
|
764 |
-
// return slug if not found
|
765 |
-
return $thumbnailSlug;
|
766 |
-
}
|
767 |
-
|
768 |
-
/**
|
769 |
-
* Get a thumbnail name from its slug
|
770 |
-
*
|
771 |
-
* @access public
|
772 |
-
* @param array $fields : the fields of the media
|
773 |
-
* @param object $post : the post object
|
774 |
-
* @return array
|
775 |
-
* @since 2.3.1
|
776 |
-
* @author Nicolas Juen
|
777 |
-
*/
|
778 |
-
public static function addFieldRegenerate( $fields, $post ) {
|
779 |
-
// Check this is an image
|
780 |
-
if( strpos( $post->post_mime_type, 'image' ) === false ) {
|
781 |
-
return $fields;
|
782 |
-
}
|
783 |
-
|
784 |
-
$fields['sis-regenerate'] = array(
|
785 |
-
'label' => __( 'Regenerate Thumbnails', 'sis' ),
|
786 |
-
'input' => 'html',
|
787 |
-
'html' => '
|
788 |
-
<input type="button" data-id="'.$post->ID.'" class="button title sis-regenerate-one" value="'.__( 'Regenerate Thumbnails', 'sis' ).'" />
|
789 |
-
<span class="title"><em></em></span>
|
790 |
-
<input type="hidden" class="regen" value="'.wp_create_nonce( 'regen' ).'" />',
|
791 |
-
'show_in_edit' => true,
|
792 |
-
'show_in_modal' => false,
|
793 |
-
);
|
794 |
-
return $fields;
|
795 |
-
}
|
796 |
-
|
797 |
-
/**
|
798 |
-
* Display a json encoded element with right headers
|
799 |
-
*
|
800 |
-
* @param $data(optional) : the element to display ( if needed )
|
801 |
-
* @return void
|
802 |
-
* @author Nicolas Juen
|
803 |
-
*/
|
804 |
-
private static function displayJson( $data = array() ) {
|
805 |
-
header('Cache-Control: no-cache, must-revalidate');
|
806 |
-
header('Expires: Mon, 26 Jul 1997 05:00:00 GMT');
|
807 |
-
header('Content-type: application/json');
|
808 |
-
echo json_encode( $data );
|
809 |
-
die();
|
810 |
-
}
|
811 |
-
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
js/sis-attachments.min.js
DELETED
@@ -1,4 +0,0 @@
|
|
1 |
-
var sis;if(sis){if("object"!==typeof sis)throw Error("sis already exists and not an object");}else sis={};
|
2 |
-
jQuery(function(){var e=jQuery(document.body),d=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(b){b.preventDefault();new d(this)});jQuery("#doaction, #doaction2").on("click",function(b){if("sis-regenerate"===jQuery(this).parent().find("select").val()){var a=jQuery('#the-list .check-column input[type="checkbox"]:checked').closest("tr").find(".sis-regenerate-one");
|
3 |
-
0<a.length&&(b.preventDefault(),a.each(function(){new d(this)}))}});d=function(b){({list:{},parent:null,el:null,id:null,messageZone:"",init:function(a){this.el=a;this.parent=a.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(a){this.messageZone.html(" - "+
|
4 |
-
a).addClass("updated").addClass("fade").show()},regenItem:function(){var a=this;jQuery.ajax({url:sis.ajaxUrl,type:"POST",dataType:"json",cache:!1,data:{action:"sis_rebuild_image",id:this.list.id,nonce:sis.regen_one},beforeSend:function(){a.parent.fadeTo("fast","0.2").addClass("ajaxing")},success:function(c){var b="",b=!c.src||!c.time||c.error||"object"!==typeof c?"object"!==typeof c?b=sis.phpError:c.error:sis.soloRegenerated.replace("%s",c.time);a.setMessage(b);a.parent.fadeTo("fast","1").removeClass("ajaxing")}})}}).init(jQuery(b))}});
|
|
|
|
|
|
|
|
js/sis-pointers.js
DELETED
@@ -1,20 +0,0 @@
|
|
1 |
-
jQuery(function() {
|
2 |
-
if( getUserSetting('sis_medias_config_pointer') == false ) {
|
3 |
-
jQuery('#menu-settings').pointer({
|
4 |
-
content: sis_pointer.pointerMediasConfig,
|
5 |
-
position: {
|
6 |
-
my: 'right top',
|
7 |
-
at: 'left top',
|
8 |
-
offset: '0 -2'
|
9 |
-
},
|
10 |
-
arrow: {
|
11 |
-
edge: 'left',
|
12 |
-
align: 'top',
|
13 |
-
offset: 10
|
14 |
-
},
|
15 |
-
close: function() {
|
16 |
-
setUserSetting( 'sis_medias_config_pointer', true );
|
17 |
-
}
|
18 |
-
}).pointer('open');
|
19 |
-
}
|
20 |
-
});
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
js/sis.min.js
DELETED
@@ -1,21 +0,0 @@
|
|
1 |
-
var rahe;if(rahe){if("object"!==typeof rahe)throw Error("rahe already exists and not an object");}else rahe={};if(rahe.sis){if("object"!==typeof rahe.sis)throw Error("rahe.sis already exists and not an object");}else rahe.sis={};
|
2 |
-
rahe.sis.regenerate={post_types:[],thumbnails:[],list:{},cur:0,timeScript:[],dateScript:"",percent:"",percentText:null,progress:null,messageZone:null,time:null,timeZone:null,buttonRegenerate:null,errorZone:null,errorMessages:null,thumb:null,thumbImg:null,init:function(){this.percentText=jQuery("#sis_progress-percent");this.progress=jQuery(".progress");this.messageZone=jQuery("#regenerate_message");this.time=jQuery("#time");this.timeZone=this.time.find("p span.time_message");this.buttonRegenerate=
|
3 |
-
jQuery("#ajax_thumbnail_rebuild");this.errorZone=jQuery("#error_messages");this.errorMessages=this.errorZone.find("ul.messages");this.thumb=jQuery("#thumb");this.thumbImg=jQuery("#thumb-img")},getThumbnails:function(){var a=this,b=jQuery("input.thumbnails:checked");b.length!=jQuery('input.thumbnails[type="checkbox"]').length&&b.each(function(){a.thumbnails.push(this.value)})},getPostTypes:function(){var a=this,b=jQuery("input.post_types:checked");b.length!=jQuery('input.post_types[type="checkbox"]').length&&
|
4 |
-
b.each(function(){a.post_types.push(this.value)})},setMessage:function(a){this.messageZone.html("<p>"+a+"</p>").addClass("updated").addClass("fade").show();this.refreshProgressBar()},setTimeMessage:function(a){this.timeZone.html(a)},refreshProgressBar:function(){this.progress.progressbar()},checkStartRegenerating:function(){if(0<jQuery(".notSaved").size())if(!0==confirm(sis.notSaved))this.startRegenerating();else return!1;else this.startRegenerating()},startRegenerating:function(){var a=this,b=jQuery("input.getList").val();
|
5 |
-
a.getThumbnails();a.getPostTypes();this.dateScript=new Date;jQuery.ajax({url:sis.ajaxUrl,type:"POST",dataType:"json",data:{action:"sis_get_list",post_types:a.post_types,nonce:b},beforeSend:function(){a.buttonRegenerate.attr("disabled",!0);a.setMessage(sis.reading)},success:function(b){if("object"!==typeof b)return a.reInit(),a.setMessage(sis.phpError),!1;a.time.show();a.list=b;a.curr=0;a.progress.show();a.regenItem()}})},regenItem:function(){var a=this,b=jQuery("input.regen").val();if(!this.list)return this.reInit(),
|
6 |
-
this.setMessage(sis.noMedia),!1;this.curr>=this.list.length?(b=new Date,this.reInit(),this.setMessage(sis.done+this.curr+" "+sis.messageRegenerated+sis.startedAt+" "+this.dateScript.getHours()+":"+this.dateScript.getMinutes()+":"+this.dateScript.getSeconds()+sis.finishedAt+" "+b.getHours()+":"+b.getMinutes()+":"+b.getSeconds())):(this.setMessage(sis.regenerating+(this.curr+1)+sis.of+this.list.length+" ("+this.list[this.curr].title+")..."),jQuery.ajax({url:sis.ajaxUrl,type:"POST",dataType:"json",data:{action:"sis_rebuild_image",
|
7 |
-
id:this.list[this.curr].id,thumbnails:this.thumbnails,nonce:b},beforeSend:function(){a.percent=100*(a.curr/a.list.length);a.progress.progressbar("value",a.percent);a.percentText.removeClass("hidden").html(Math.round(a.percent)+"%")},success:function(b){if(!b.src||!b.time||b.error||"object"!==typeof b){var e="",e="object"!==typeof b?sis.phpError:b.error;a.errorZone.addClass("error message");a.errorMessages.prepend("<li>"+e+"</li>")}else{b.message&&a.time.find("ul.messages").prepend("<li>"+b.message+
|
8 |
-
"</li>");a.thumb.show();a.thumbImg.attr("src",b.src);var e=new Date,g=new Date,f=0,c=0,j=0;a.timeScript.push(b.time);f=a.timeScript.length;for(j;j<f;j++)c+=a.timeScript[j];b=Math.round(1E3*c/f*a.list.length);e.setTime(a.dateScript.getTime()+b);b=a.s2t(Math.abs(e.getTime()-g.getTime())/1E3);a.setTimeMessage(e.getHours()+":"+e.getMinutes()+":"+e.getSeconds()+sis.or+b+sis.beforeEnd)}a.curr++;a.regenItem()}}))},s2t:function(a){a%=86400;var b=new Date(1970,0,1),d=0;b.setSeconds(a);d=b.toTimeString().substr(0,
|
9 |
-
8);86399<a&&(d=Math.floor((b-Date.parse("1/1/70"))/36E5)+d.substr(2));return d},reInit:function(){this.buttonRegenerate.removeAttr("disabled");this.thumb.hide();this.progress.hide();this.percentText.addClass("hidden")}};
|
10 |
-
rahe.sis.sizes={i:0,add:function(a,b){a.preventDefault();var d=_.template(document.getElementById("sis-new_size").text,{size_id:this.i,validate:sis.validate});jQuery(b).closest("tr").before(d);this.i++},register:function(a,b){a.preventDefault();var d=jQuery(b).closest("tr").children("th").find("input").val(),e=jQuery(b).closest("tr").children("th").find("input").attr("id"),g=jQuery(b).closest("tbody").find('input[value="'+d+'"]').length;if("thumbnail"==d||"medium"==d||"large"==d)return alert(sis.notOriginal),
|
11 |
-
!1;if(0!=g)return alert(sis.alreadyPresent),!1;d=_.template(document.getElementById("sis-new_size_row").text,{size:sis.size,size_name:d,maximumWidth:sis.maximumWidth,maximumHeight:sis.maximumHeight,customName:sis.customName,crop:sis.crop,show:sis.show,deleteImage:sis.deleteImage,validateButton:sis.validateButton});jQuery("#"+e).closest("tr").html(d);this.setButtons()},deleteSize:function(a,b){a.preventDefault();!0==confirm(sis.confirmDelete)&&(jQuery(b).closest("tr").remove(),this.ajaxUnregister(b))},
|
12 |
-
getPhp:function(a,b){a.preventDefault();var d=jQuery(b).closest("tr");jQuery.ajax({url:sis.ajaxUrl,type:"POST",data:{action:"sis_get_sizes"},beforeSend:function(){d.removeClass("addPending");d.addClass("addPending")},success:function(a){jQuery("#get_php").nextAll("code").html("<br />"+a).show().css({display:"block"});d.removeClass("addPending")}})},ajaxRegister:function(a,b){a.preventDefault();var d=this,e=jQuery(b).closest("table"),g,f=jQuery(".addSize").val(),c=jQuery(b).closest("tr"),j=c.find('input[name="image_name"]').val(),
|
13 |
-
k=c.find("label.c").hasClass("ui-state-active"),l=c.find("label.s").hasClass("ui-state-active"),m=c.find("input.n").val();w=h=0;k=!1==k||void 0==k?!1:!0;l=!1==l||void 0==l?!1:!0;w=parseInt(c.find("input.w").val());h=parseInt(c.find("input.h").val());e.hasClass("ajaxing")||jQuery.ajax({url:sis.ajaxUrl,type:"POST",dataType:"json",data:{action:"sis_add_size",width:w,height:h,crop:k,name:j,show:l,customName:m,nonce:f},beforeSend:function(){c.removeClass();c.addClass("addPending");e.addClass("ajaxing")},
|
14 |
-
success:function(a){var b="";c.removeClass();e.removeClass("ajaxing");0==a?b="errorAdding":(b=2==a?"notChangedAdding":"successAdding",d.addToArray(j,w,h,k,b));c.find("input.h").attr({base_h:h});c.find("input.w").attr({base_w:w});c.find("input.c").attr({base_c:k});c.find("input.s").attr({base_s:l});c.addClass(b);c.find("td").removeClass("notSaved");c.find(".add_size").removeClass("validate_size").hide().children(".ui-button-text").text(sis.update);clearTimeout(g);g=setTimeout(function(){c.removeClass("errorAdding notChangedAdding successAdding")},
|
15 |
-
3E3)}})},ajaxUnregister:function(a){var b=this,d=jQuery(a).closest("tr").find('input[name="image_name"]').val(),e=jQuery(a).closest("tr").find("input.deleteSize").val();jQuery.ajax({url:sis.ajaxUrl,type:"POST",data:{action:"sis_remove_size",name:d,nonce:e},success:function(){b.removeFromArray(a)}})},addToArray:function(a,b,d,e,g){var f=jQuery("#sis-"+a),c="",j,c=0!=f.length?f.closest("tr"):jQuery("#sis-regen .wrapper > table#sis_sizes > tbody > tr:first").clone().attr("id","sis-"+a);e=!0==e?sis.tr:
|
16 |
-
sis.fl;c.find("th > label").attr("for",a).end().find("input.thumbnails").val(a).attr("id",a).end().find("th:nth-child(2) > label").text(a).end().find("th:nth-child(3) > label").text(b+"px").end().find("th:nth-child(4) > label").text(d+"px").end().find("th:nth-child(5) > label").text(e);0==f.length&&c.appendTo("#sis-regen .wrapper > table#sis_sizes > tbody");c.removeClass("errorAdding notChangedAdding successAdding").addClass(g);clearTimeout(j);j=setTimeout(function(){c.removeClass("errorAdding notChangedAdding successAdding")},
|
17 |
-
3E3)},removeFromArray:function(a){a=jQuery(a).closest("tr").find("input[name=image_name]").val();jQuery("#sis-"+a).remove()},setButtons:function(){jQuery(".delete_size").button({icons:{primary:"ui-icon-circle-close"},text:!0});jQuery(".add_size").button({icons:{primary:"ui-icon-check"},text:!0});jQuery(".crop").button({icons:{primary:"ui-icon-arrow-4-diag"},text:!0});jQuery(".show").button({icons:{primary:"ui-icon-lightbulb"},text:!0});jQuery(".size_options").buttonset()},displayChange:function(a){a=
|
18 |
-
jQuery(a);var b=a.closest("tr");if(b.hasClass("new_size"))return!1;var d=b.find("input.h"),e=b.find("input.w"),g=b.find("input.c"),f=b.find("input.s"),c=b.find("input.n"),j=d.val(),k=e.val(),l=b.find("label.c").hasClass("ui-state-active"),b=b.find("label.s").hasClass("ui-state-active"),m=c.val(),d=d.attr("base_h"),e=e.attr("base_w"),g=g.attr("base_c"),f=f.attr("base_s"),c=c.attr("base_n");j!=d||k!=e||l!=("0"==g?!1:!0)||b!=("0"==f?!1:!0)||m!=c?a.closest("td").addClass("notSaved").find(".add_size").css("display",
|
19 |
-
"inline-block"):a.closest("td").removeClass("notSaved").find(".add_size").css("display","none")}};
|
20 |
-
jQuery(function(){rahe.sis.regenerate.init();var a=jQuery("#wpbody-content");jQuery("#ajax_thumbnail_rebuild").click(function(){rahe.sis.regenerate.checkStartRegenerating()});a.on("click","#add_size",function(a){rahe.sis.sizes.add(a,this)}).on("click",".add_size_name",function(a){rahe.sis.sizes.register(a,this)}).on("click",".delete_size",function(a){rahe.sis.sizes.deleteSize(a,this)}).on("click",".add_size",function(a){rahe.sis.sizes.ajaxRegister(a,this)}).on("click keyup change",".h,.w,.c,.s,.n",
|
21 |
-
function(){rahe.sis.sizes.displayChange(this)}).on("click","#get_php",function(a){rahe.sis.sizes.getPhp(a,this)});jQuery("#get_php").nextAll("code").hide();jQuery(".add_size").hide();rahe.sis.sizes.setButtons()});
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
languages/simple-image-sizes-de_DE.mo
ADDED
Binary file
|
languages/simple-image-sizes-de_DE.po
ADDED
@@ -0,0 +1,367 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
msgid ""
|
2 |
+
msgstr ""
|
3 |
+
"Project-Id-Version: \n"
|
4 |
+
"Report-Msgid-Bugs-To: \n"
|
5 |
+
"POT-Creation-Date: 2014-04-20 15:24+0100\n"
|
6 |
+
"PO-Revision-Date: 2014-04-20 15:32+0100\n"
|
7 |
+
"Last-Translator: Nicolas Juen <nicolas.juen@gmail.com>\n"
|
8 |
+
"Language-Team: LANGUAGE <LL@li.org>\n"
|
9 |
+
"Language: de_DE\n"
|
10 |
+
"MIME-Version: 1.0\n"
|
11 |
+
"Content-Type: text/plain; charset=UTF-8\n"
|
12 |
+
"Content-Transfer-Encoding: 8bit\n"
|
13 |
+
"Plural-Forms: nplurals=2; plural=n != 1;\n"
|
14 |
+
"X-Poedit-SourceCharset: utf-8\n"
|
15 |
+
"X-Poedit-KeywordsList: __;_e;__ngettext:1,2;_n:1,2;__ngettext_noop:1,2;"
|
16 |
+
"_n_noop:1,2;_c,_nc:4c,1,2;_x:1,2c;_ex:1,2c;_nx:4c,1,2;_nx_noop:4c,1,2\n"
|
17 |
+
"X-Poedit-Basepath: .\n"
|
18 |
+
"X-Textdomain-Support: yes\n"
|
19 |
+
"X-Generator: Poedit 1.6.3\n"
|
20 |
+
"X-Poedit-SearchPath-0: .\n"
|
21 |
+
|
22 |
+
# @ sis
|
23 |
+
#: ../classes/admin/main.php:39
|
24 |
+
msgid "Reading attachments..."
|
25 |
+
msgstr "Lese Anhänge…"
|
26 |
+
|
27 |
+
# @ sis
|
28 |
+
#: ../classes/admin/main.php:40 ../classes/admin/media.php:154
|
29 |
+
msgid "Maximum width"
|
30 |
+
msgstr "Maximale Breite"
|
31 |
+
|
32 |
+
# @ sis
|
33 |
+
#: ../classes/admin/main.php:41 ../classes/admin/media.php:158
|
34 |
+
msgid "Maximum height"
|
35 |
+
msgstr "Maximale Höhe"
|
36 |
+
|
37 |
+
# @ sis
|
38 |
+
#: ../classes/admin/main.php:42
|
39 |
+
msgid "Crop"
|
40 |
+
msgstr ""
|
41 |
+
|
42 |
+
# @ sis
|
43 |
+
#: ../classes/admin/main.php:43
|
44 |
+
msgid "yes"
|
45 |
+
msgstr "ja"
|
46 |
+
|
47 |
+
# @ sis
|
48 |
+
#: ../classes/admin/main.php:44
|
49 |
+
msgid "no"
|
50 |
+
msgstr "nein"
|
51 |
+
|
52 |
+
# @ sis
|
53 |
+
#: ../classes/admin/main.php:45 ../classes/admin/media.php:176
|
54 |
+
msgid "Show in post insertion ?"
|
55 |
+
msgstr "Beim Einfügen in den Beitrag anzeigen?"
|
56 |
+
|
57 |
+
# @ sis
|
58 |
+
#: ../classes/admin/main.php:46
|
59 |
+
msgid " of "
|
60 |
+
msgstr "von"
|
61 |
+
|
62 |
+
# @ sis
|
63 |
+
#: ../classes/admin/main.php:47
|
64 |
+
msgid " or "
|
65 |
+
msgstr "oder"
|
66 |
+
|
67 |
+
# @ sis
|
68 |
+
#: ../classes/admin/main.php:48
|
69 |
+
msgid " before the end."
|
70 |
+
msgstr "vor dem Ende."
|
71 |
+
|
72 |
+
# @ sis
|
73 |
+
#: ../classes/admin/main.php:49 ../classes/admin/media.php:178
|
74 |
+
msgid "Delete"
|
75 |
+
msgstr "Löschen"
|
76 |
+
|
77 |
+
# @ sis
|
78 |
+
#: ../classes/admin/main.php:50
|
79 |
+
msgid "No media in your site to regenerate !"
|
80 |
+
msgstr "Keine Medien neu zu generieren!"
|
81 |
+
|
82 |
+
# @ sis
|
83 |
+
#: ../classes/admin/main.php:51
|
84 |
+
msgid "Regenerating "
|
85 |
+
msgstr "Neu generieren"
|
86 |
+
|
87 |
+
# @ sis
|
88 |
+
#: ../classes/admin/main.php:52
|
89 |
+
msgid "Regenerate "
|
90 |
+
msgstr ""
|
91 |
+
|
92 |
+
# @ sis
|
93 |
+
#: ../classes/admin/main.php:53
|
94 |
+
msgid "Validate image size name"
|
95 |
+
msgstr "Bildgrößenbezeichnung überprüfen"
|
96 |
+
|
97 |
+
# @ sis
|
98 |
+
#: ../classes/admin/main.php:54
|
99 |
+
msgid "Done."
|
100 |
+
msgstr "Fertig."
|
101 |
+
|
102 |
+
# @ sis
|
103 |
+
#: ../classes/admin/main.php:55
|
104 |
+
msgid "Size"
|
105 |
+
msgstr "Bildgröße"
|
106 |
+
|
107 |
+
# @ sis
|
108 |
+
#: ../classes/admin/main.php:56
|
109 |
+
msgid ""
|
110 |
+
"Don't use the basic Wordpress thumbnail size name, use the form above to "
|
111 |
+
"edit them"
|
112 |
+
msgstr ""
|
113 |
+
"Nutze nicht die vorgegebene Thumbnail-Bezeichnung in WordPress! Nutze das "
|
114 |
+
"Formular, um diese zu bearbeiten."
|
115 |
+
|
116 |
+
# @ sis
|
117 |
+
#: ../classes/admin/main.php:57
|
118 |
+
msgid "This size is already registered, edit it instead of recreating it."
|
119 |
+
msgstr ""
|
120 |
+
"Die Bildgröße existiert bereits. Du kannst sie bearbeiten, anstatt sie "
|
121 |
+
"doppelt anzulegen."
|
122 |
+
|
123 |
+
# @ sis
|
124 |
+
#: ../classes/admin/main.php:58
|
125 |
+
msgid "Do you really want to delete these size ?"
|
126 |
+
msgstr "Willst du diese Bildgröße/n wirklich löschen?"
|
127 |
+
|
128 |
+
# @ sis
|
129 |
+
#: ../classes/admin/main.php:59 ../classes/admin/media.php:179
|
130 |
+
msgid "Update"
|
131 |
+
msgstr "Aktualisieren"
|
132 |
+
|
133 |
+
# @ sis
|
134 |
+
#: ../classes/admin/main.php:60
|
135 |
+
msgid "Error requesting page"
|
136 |
+
msgstr "Fehler beim Abruf der Seite"
|
137 |
+
|
138 |
+
# @ sis
|
139 |
+
#: ../classes/admin/main.php:61
|
140 |
+
msgid "images have been regenerated !"
|
141 |
+
msgstr "Bilder wurden neu generiert!"
|
142 |
+
|
143 |
+
# @ sis
|
144 |
+
#: ../classes/admin/main.php:62
|
145 |
+
msgid "Validate"
|
146 |
+
msgstr "Überprüfen"
|
147 |
+
|
148 |
+
# @ sis
|
149 |
+
#: ../classes/admin/main.php:63
|
150 |
+
msgid " started at"
|
151 |
+
msgstr "begonnen: "
|
152 |
+
|
153 |
+
# @ sis
|
154 |
+
#: ../classes/admin/main.php:64 ../classes/admin/media.php:162
|
155 |
+
msgid "Public name"
|
156 |
+
msgstr ""
|
157 |
+
|
158 |
+
# @ sis
|
159 |
+
#: ../classes/admin/main.php:65
|
160 |
+
msgid " finished at :"
|
161 |
+
msgstr "beendet: "
|
162 |
+
|
163 |
+
# @ sis
|
164 |
+
#: ../classes/admin/main.php:66
|
165 |
+
msgid ""
|
166 |
+
"Error during the php treatment, be sure to not have php errors in your page"
|
167 |
+
msgstr ""
|
168 |
+
"Fehler während des PHP-Durchlaufs! Stelle sicher, dass sich keine PHP-Fehler "
|
169 |
+
"in deiner Seite befinden."
|
170 |
+
|
171 |
+
# @ sis
|
172 |
+
#: ../classes/admin/main.php:67
|
173 |
+
msgid "All the sizes you have modifed are not saved, continue anyway ?"
|
174 |
+
msgstr ""
|
175 |
+
"Deine veränderten Bildgrößen wurden noch nicht gespeichert. Trotzdem "
|
176 |
+
"fortfahren?"
|
177 |
+
|
178 |
+
# @ sis
|
179 |
+
#: ../classes/admin/main.php:68
|
180 |
+
#, php-format
|
181 |
+
msgid "This image has been regenerated in %s seconds"
|
182 |
+
msgstr "Dieses Bild wurde neu generiert in %s Sekunden."
|
183 |
+
|
184 |
+
# @ sis
|
185 |
+
#: ../classes/admin/main.php:91
|
186 |
+
msgid "No id given in POST datas."
|
187 |
+
msgstr "Keine ID in den POST-Daten gegeben."
|
188 |
+
|
189 |
+
# @ sis
|
190 |
+
#: ../classes/admin/main.php:104
|
191 |
+
#, php-format
|
192 |
+
msgid ""
|
193 |
+
"This file already exists in this size and have not been regenerated :<br/><a "
|
194 |
+
"target=\"_blank\" href=\"%1$s\" >%2$s</a>"
|
195 |
+
msgstr ""
|
196 |
+
|
197 |
+
# @ sis
|
198 |
+
#: ../classes/admin/main.php:111
|
199 |
+
#, php-format
|
200 |
+
msgid ""
|
201 |
+
"This file does not exists and have not been regenerated :<br/><a target="
|
202 |
+
"\"_blank\" href=\"%1$s\" >%2$s</a>"
|
203 |
+
msgstr ""
|
204 |
+
"Diese Datei existiert nicht und wurde nicht neu generiert:<br/><a target="
|
205 |
+
"\"_blank\" href=\"%1$s\" >%2$s</a>"
|
206 |
+
|
207 |
+
#: ../classes/admin/main.php:158
|
208 |
+
msgid "Left"
|
209 |
+
msgstr ""
|
210 |
+
|
211 |
+
#: ../classes/admin/main.php:159
|
212 |
+
msgid "Center"
|
213 |
+
msgstr ""
|
214 |
+
|
215 |
+
# @ sis
|
216 |
+
#: ../classes/admin/main.php:160
|
217 |
+
msgid "Right"
|
218 |
+
msgstr ""
|
219 |
+
|
220 |
+
#: ../classes/admin/main.php:164
|
221 |
+
msgid "top"
|
222 |
+
msgstr ""
|
223 |
+
|
224 |
+
#: ../classes/admin/main.php:165
|
225 |
+
msgid "center"
|
226 |
+
msgstr ""
|
227 |
+
|
228 |
+
#: ../classes/admin/main.php:166
|
229 |
+
msgid "bottom"
|
230 |
+
msgstr ""
|
231 |
+
|
232 |
+
# @ sis
|
233 |
+
#: ../classes/admin/media.php:66
|
234 |
+
msgid "Settings"
|
235 |
+
msgstr "Einstellungen"
|
236 |
+
|
237 |
+
# @ sis
|
238 |
+
#: ../classes/admin/media.php:106
|
239 |
+
#, php-format
|
240 |
+
msgid "%s size"
|
241 |
+
msgstr "Bildgröße „%s“"
|
242 |
+
|
243 |
+
# @ sis
|
244 |
+
#: ../classes/admin/media.php:113
|
245 |
+
msgid "Add a new size"
|
246 |
+
msgstr "Neue Bildgröße hinzufügen"
|
247 |
+
|
248 |
+
# @ sis
|
249 |
+
#: ../classes/admin/media.php:116
|
250 |
+
msgid "Get php for theme"
|
251 |
+
msgstr "PHP für dein Theme generieren"
|
252 |
+
|
253 |
+
# @ sis
|
254 |
+
#: ../classes/admin/media.php:119
|
255 |
+
msgid "Thumbnail regeneration"
|
256 |
+
msgstr "Artikelbilder neu generieren"
|
257 |
+
|
258 |
+
#: ../classes/admin/media.php:155 ../classes/admin/media.php:157
|
259 |
+
#: ../classes/admin/media.php:159
|
260 |
+
msgid "custom_image_sizes["
|
261 |
+
msgstr ""
|
262 |
+
|
263 |
+
#: ../classes/admin/media.php:166
|
264 |
+
msgid "Cropping"
|
265 |
+
msgstr ""
|
266 |
+
|
267 |
+
#: ../classes/admin/media.php:168 ../templates/options-media.php:39
|
268 |
+
msgid "No"
|
269 |
+
msgstr ""
|
270 |
+
|
271 |
+
# @ sis
|
272 |
+
#: ../classes/admin/media.php:169 ../templates/options-media.php:39
|
273 |
+
msgid "Yes"
|
274 |
+
msgstr "Ja"
|
275 |
+
|
276 |
+
# @ sis
|
277 |
+
#: ../classes/admin/media.php:192
|
278 |
+
msgid "Add a new size of thumbnail"
|
279 |
+
msgstr "Neue Bildgröße für Thumbnail hinzufügen"
|
280 |
+
|
281 |
+
# @ sis
|
282 |
+
#: ../classes/admin/media.php:204
|
283 |
+
msgid "Get the PHP for the theme"
|
284 |
+
msgstr "Hol‘ dir den PHP-Code für dein Theme!"
|
285 |
+
|
286 |
+
# @ sis
|
287 |
+
#: ../classes/admin/media.php:205
|
288 |
+
msgid ""
|
289 |
+
"Copy and paste the code below into your Wordpress theme function file if you "
|
290 |
+
"wanted to save them and deactivate the plugin."
|
291 |
+
msgstr ""
|
292 |
+
"Falls du deine Bildgrößen behalten und das Plugin deaktivieren möchtest, "
|
293 |
+
"kopiere diesen PHP-Code in die Datei functions.php deines Theme."
|
294 |
+
|
295 |
+
#: ../classes/admin/media.php:221
|
296 |
+
msgid "Admin option-media template missing"
|
297 |
+
msgstr ""
|
298 |
+
|
299 |
+
#: ../classes/admin/media.php:425 ../classes/admin/post.php:65
|
300 |
+
msgid "Trying to cheat ?"
|
301 |
+
msgstr ""
|
302 |
+
|
303 |
+
# @ sis
|
304 |
+
#: ../classes/admin/media.php:472
|
305 |
+
msgid "Regeneration ended"
|
306 |
+
msgstr ""
|
307 |
+
|
308 |
+
# @ sis
|
309 |
+
#: ../classes/admin/post.php:216
|
310 |
+
msgid "Regenerate thumbnails"
|
311 |
+
msgstr "Artikelbilder neu generieren"
|
312 |
+
|
313 |
+
# @ sis
|
314 |
+
#: ../classes/admin/post.php:240 ../classes/admin/post.php:243
|
315 |
+
#: ../templates/options-media.php:138
|
316 |
+
msgid "Regenerate Thumbnails"
|
317 |
+
msgstr "Artikelbilder neu generieren"
|
318 |
+
|
319 |
+
# @ sis
|
320 |
+
#: ../templates/options-media.php:10
|
321 |
+
msgid "Select which thumbnails you want to rebuild:"
|
322 |
+
msgstr "Wähle die Artikelbilder aus, die neu generiert werden sollen:"
|
323 |
+
|
324 |
+
# @ sis
|
325 |
+
#: ../templates/options-media.php:15 ../templates/options-media.php:67
|
326 |
+
msgid "Size name"
|
327 |
+
msgstr "Bildgrößenbezeichnung"
|
328 |
+
|
329 |
+
# @ sis
|
330 |
+
#: ../templates/options-media.php:16 ../templates/options-media.php:68
|
331 |
+
msgid "Width"
|
332 |
+
msgstr "Breite"
|
333 |
+
|
334 |
+
# @ sis
|
335 |
+
#: ../templates/options-media.php:17 ../templates/options-media.php:69
|
336 |
+
msgid "Height"
|
337 |
+
msgstr "Höhe"
|
338 |
+
|
339 |
+
# @ sis
|
340 |
+
#: ../templates/options-media.php:18 ../templates/options-media.php:70
|
341 |
+
msgid "Crop ?"
|
342 |
+
msgstr "Beschneiden?"
|
343 |
+
|
344 |
+
# @ sis
|
345 |
+
#: ../templates/options-media.php:75
|
346 |
+
msgid "Select which post type source thumbnails you want to rebuild:"
|
347 |
+
msgstr ""
|
348 |
+
"Wähle die Inhaltstypen aus, deren Artikelbilder du neu generieren willst:"
|
349 |
+
|
350 |
+
# @ sis
|
351 |
+
#: ../templates/options-media.php:80 ../templates/options-media.php:107
|
352 |
+
msgid "Post type"
|
353 |
+
msgstr "Inhaltstyp"
|
354 |
+
|
355 |
+
# @ sis
|
356 |
+
#: ../templates/options-media.php:126
|
357 |
+
msgid "End time calculated :"
|
358 |
+
msgstr "Berechnetes Ende:"
|
359 |
+
|
360 |
+
#: ../templates/options-media.php:126
|
361 |
+
msgid "Calculating..."
|
362 |
+
msgstr ""
|
363 |
+
|
364 |
+
# @ sis
|
365 |
+
#: ../templates/options-media.php:137
|
366 |
+
msgid "Last image:"
|
367 |
+
msgstr "Letztes Bild:"
|
languages/simple-image-sizes-fr_FR.mo
ADDED
Binary file
|
languages/{sis-fr_FR.po → simple-image-sizes-fr_FR.po}
RENAMED
@@ -4,9 +4,9 @@ msgid ""
|
|
4 |
msgstr ""
|
5 |
"Project-Id-Version: Simple image sizes\n"
|
6 |
"Report-Msgid-Bugs-To: \n"
|
7 |
-
"POT-Creation-Date:
|
8 |
-
"PO-Revision-Date:
|
9 |
-
"Last-Translator:
|
10 |
"Language-Team: Beapi <njuen@beapi.fr>\n"
|
11 |
"Language: fr_FR\n"
|
12 |
"MIME-Version: 1.0\n"
|
@@ -15,79 +15,78 @@ 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 |
-
#:
|
26 |
msgid "Maximum width"
|
27 |
msgstr "Largeur maximum"
|
28 |
|
29 |
-
#:
|
30 |
msgid "Maximum height"
|
31 |
msgstr "Hauteur maximum"
|
32 |
|
33 |
-
#:
|
34 |
-
|
35 |
-
|
36 |
-
msgstr "Rogner ?"
|
37 |
|
38 |
-
#:
|
39 |
msgid "yes"
|
40 |
msgstr "oui"
|
41 |
|
42 |
-
#:
|
43 |
msgid "no"
|
44 |
msgstr "non"
|
45 |
|
46 |
-
#:
|
47 |
msgid "Show in post insertion ?"
|
48 |
msgstr "Afficher dans l'insertion ?"
|
49 |
|
50 |
-
#:
|
51 |
msgid " of "
|
52 |
msgstr " de "
|
53 |
|
54 |
-
#:
|
55 |
msgid " or "
|
56 |
msgstr " ou "
|
57 |
|
58 |
-
#:
|
59 |
msgid " before the end."
|
60 |
msgstr " avant la fin."
|
61 |
|
62 |
-
#:
|
63 |
msgid "Delete"
|
64 |
msgstr "Supprimer"
|
65 |
|
66 |
-
#:
|
67 |
msgid "No media in your site to regenerate !"
|
68 |
msgstr "Pas de médias à regénérer !"
|
69 |
|
70 |
-
#:
|
71 |
msgid "Regenerating "
|
72 |
msgstr "Regénération "
|
73 |
|
74 |
-
#:
|
75 |
msgid "Regenerate "
|
76 |
msgstr "Regénérer "
|
77 |
|
78 |
-
#:
|
79 |
msgid "Validate image size name"
|
80 |
msgstr "Valider le nom de la taille d'image"
|
81 |
|
82 |
-
#:
|
83 |
msgid "Done."
|
84 |
msgstr "Fini."
|
85 |
|
86 |
-
#:
|
87 |
msgid "Size"
|
88 |
msgstr "Taille "
|
89 |
|
90 |
-
#:
|
91 |
msgid ""
|
92 |
"Don't use the basic Wordpress thumbnail size name, use the form above to "
|
93 |
"edit them"
|
@@ -95,86 +94,132 @@ msgstr ""
|
|
95 |
"N'utilisez pas les tailles par défaut de WordPress comme nom de taille, "
|
96 |
"éditez leurs valeurs avec le formulaire ci-dessus."
|
97 |
|
98 |
-
#:
|
99 |
msgid "This size is already registered, edit it instead of recreating it."
|
100 |
msgstr "Cette taille existe déjà, éditez la au lieu de la recréer."
|
101 |
|
102 |
-
#:
|
103 |
msgid "Do you really want to delete these size ?"
|
104 |
msgstr "Voulez-vous réellement supprimer cette taille ?"
|
105 |
|
106 |
-
#:
|
107 |
msgid "Update"
|
108 |
msgstr "Mettre à jour"
|
109 |
|
110 |
-
#:
|
111 |
msgid "Error requesting page"
|
112 |
msgstr "Erreur lors de la requête vers la page"
|
113 |
|
114 |
-
#:
|
115 |
msgid "images have been regenerated !"
|
116 |
msgstr "images ont été regénérées !"
|
117 |
|
118 |
-
#:
|
119 |
msgid "Validate"
|
120 |
msgstr "Valider"
|
121 |
|
122 |
-
#:
|
123 |
msgid " started at"
|
124 |
msgstr " commencé à "
|
125 |
|
126 |
-
#:
|
127 |
msgid "Public name"
|
128 |
msgstr "Nom public"
|
129 |
|
130 |
-
#:
|
131 |
msgid " finished at :"
|
132 |
msgstr " terminé à :"
|
133 |
|
134 |
-
#:
|
135 |
msgid ""
|
136 |
"Error during the php treatment, be sure to not have php errors in your page"
|
137 |
msgstr ""
|
138 |
"Erreur durant le traitement, soyez sûr de ne pas avoir d'erreurs php dans "
|
139 |
"votre page"
|
140 |
|
141 |
-
#:
|
142 |
msgid "All the sizes you have modifed are not saved, continue anyway ?"
|
143 |
msgstr ""
|
144 |
"Toutes les tailles qui ont été modifiée n'ont pas été sauvées, continuer "
|
145 |
"tout de même ?"
|
146 |
|
147 |
-
#:
|
148 |
#, php-format
|
149 |
msgid "This image has been regenerated in %s seconds"
|
150 |
msgstr "Cette image a été regénérée en %s secondes"
|
151 |
|
152 |
-
#:
|
153 |
-
msgid "
|
154 |
-
msgstr "
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
155 |
|
156 |
-
#:
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
157 |
msgid "Settings"
|
158 |
msgstr "Paramètres"
|
159 |
|
160 |
-
#:
|
161 |
#, php-format
|
162 |
msgid "%s size"
|
163 |
msgstr "Taille %s"
|
164 |
|
165 |
-
#:
|
166 |
msgid "Add a new size"
|
167 |
msgstr "Ajouter une nouvelle taille"
|
168 |
|
169 |
-
#:
|
170 |
msgid "Get php for theme"
|
171 |
msgstr "Récupérer le PHP pour le thème"
|
172 |
|
173 |
-
#:
|
174 |
msgid "Thumbnail regeneration"
|
175 |
msgstr "Régénération des vignettes"
|
176 |
|
177 |
-
#:
|
|
|
|
|
|
|
|
|
178 |
msgid ""
|
179 |
"Copy and paste the code below into your Wordpress theme function file if you "
|
180 |
"wanted to save them and deactivate the plugin."
|
@@ -182,34 +227,20 @@ msgstr ""
|
|
182 |
"Copiez et collez le code ci-dessous dans votre fichier de fonctions de votre "
|
183 |
"thème WordPress si vous voulez les conserver et désactiver ce plugin."
|
184 |
|
185 |
-
#:
|
186 |
msgid "Trying to cheat ?"
|
187 |
msgstr "Cheater ?"
|
188 |
|
189 |
-
#:
|
190 |
-
msgid "
|
191 |
-
msgstr "
|
192 |
-
|
193 |
-
#: inc/class.admin.php:535
|
194 |
-
#, php-format
|
195 |
-
msgid ""
|
196 |
-
"This file already exists in this size and have not been regenerated :<br/><a "
|
197 |
-
"target=\"_blank\" href=\"%1$s\" >%2$s</a>"
|
198 |
-
msgstr ""
|
199 |
-
"Ce fichier existe déjà dans cette ces tailles d'image et n'a pas été "
|
200 |
-
"regénéré :<br/><a target=\"_blank\" href=\"%1$s\" >%2$s</a>"
|
201 |
|
202 |
-
#:
|
203 |
-
|
204 |
-
|
205 |
-
"This file does not exists and have not been regenerated :<br/><a target="
|
206 |
-
"\"_blank\" href=\"%1$s\" >%2$s</a>"
|
207 |
-
msgstr ""
|
208 |
-
"Ce fichier existe déjà dans cette ces tailles d'image et n'a pas été "
|
209 |
-
"regénéré :<br/><a target=\"_blank\" href=\"%1$s\" >%2$s</a>"
|
210 |
|
211 |
-
#:
|
212 |
-
#: templates/options-media.php:
|
213 |
msgid "Regenerate Thumbnails"
|
214 |
msgstr "Régénérer les vignettes"
|
215 |
|
@@ -217,45 +248,49 @@ msgstr "Régénérer les vignettes"
|
|
217 |
msgid "Select which thumbnails you want to rebuild:"
|
218 |
msgstr "Sélectionnez les tailles de vignettes à régénérer"
|
219 |
|
220 |
-
#: templates/options-media.php:15 templates/options-media.php:
|
221 |
msgid "Size name"
|
222 |
msgstr "Nom de la taille"
|
223 |
|
224 |
-
#: templates/options-media.php:16 templates/options-media.php:
|
225 |
msgid "Width"
|
226 |
msgstr "Largeur"
|
227 |
|
228 |
-
#: templates/options-media.php:17 templates/options-media.php:
|
229 |
msgid "Height"
|
230 |
msgstr "Hauteur"
|
231 |
|
232 |
-
#: templates/options-media.php:
|
|
|
|
|
|
|
|
|
233 |
msgid "Yes"
|
234 |
msgstr "Oui"
|
235 |
|
236 |
-
#: templates/options-media.php:
|
237 |
msgid "No"
|
238 |
msgstr "Non"
|
239 |
|
240 |
-
#: templates/options-media.php:
|
241 |
msgid "Select which post type source thumbnails you want to rebuild:"
|
242 |
msgstr ""
|
243 |
"Sélectionnez quelles vignettes de quel type de contenu vous souhaitez "
|
244 |
"régénérer : "
|
245 |
|
246 |
-
#: templates/options-media.php:
|
247 |
msgid "Post type"
|
248 |
msgstr "Type de contenu"
|
249 |
|
250 |
-
#: templates/options-media.php:
|
251 |
msgid "End time calculated :"
|
252 |
msgstr "Fin du traitement calculé :"
|
253 |
|
254 |
-
#: templates/options-media.php:
|
255 |
msgid "Calculating..."
|
256 |
msgstr "Calcul en cours..."
|
257 |
|
258 |
-
#: templates/options-media.php:
|
259 |
msgid "Last image:"
|
260 |
msgstr "Dernière image :"
|
261 |
|
4 |
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: 2014-04-20 15:31+0100\n"
|
9 |
+
"Last-Translator: Nicolas Juen <nicolas.juen@gmail.com>\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.6.3\n"
|
19 |
"X-Poedit-SearchPath-0: .\n"
|
20 |
|
21 |
+
#: classes/admin/main.php:39
|
22 |
msgid "Reading attachments..."
|
23 |
msgstr "Chargement des médias..."
|
24 |
|
25 |
+
#: classes/admin/main.php:40 classes/admin/media.php:154
|
26 |
msgid "Maximum width"
|
27 |
msgstr "Largeur maximum"
|
28 |
|
29 |
+
#: classes/admin/main.php:41 classes/admin/media.php:158
|
30 |
msgid "Maximum height"
|
31 |
msgstr "Hauteur maximum"
|
32 |
|
33 |
+
#: classes/admin/main.php:42
|
34 |
+
msgid "Crop"
|
35 |
+
msgstr "Rogner"
|
|
|
36 |
|
37 |
+
#: classes/admin/main.php:43
|
38 |
msgid "yes"
|
39 |
msgstr "oui"
|
40 |
|
41 |
+
#: classes/admin/main.php:44
|
42 |
msgid "no"
|
43 |
msgstr "non"
|
44 |
|
45 |
+
#: classes/admin/main.php:45 classes/admin/media.php:176
|
46 |
msgid "Show in post insertion ?"
|
47 |
msgstr "Afficher dans l'insertion ?"
|
48 |
|
49 |
+
#: classes/admin/main.php:46
|
50 |
msgid " of "
|
51 |
msgstr " de "
|
52 |
|
53 |
+
#: classes/admin/main.php:47
|
54 |
msgid " or "
|
55 |
msgstr " ou "
|
56 |
|
57 |
+
#: classes/admin/main.php:48
|
58 |
msgid " before the end."
|
59 |
msgstr " avant la fin."
|
60 |
|
61 |
+
#: classes/admin/main.php:49 classes/admin/media.php:178
|
62 |
msgid "Delete"
|
63 |
msgstr "Supprimer"
|
64 |
|
65 |
+
#: classes/admin/main.php:50
|
66 |
msgid "No media in your site to regenerate !"
|
67 |
msgstr "Pas de médias à regénérer !"
|
68 |
|
69 |
+
#: classes/admin/main.php:51
|
70 |
msgid "Regenerating "
|
71 |
msgstr "Regénération "
|
72 |
|
73 |
+
#: classes/admin/main.php:52
|
74 |
msgid "Regenerate "
|
75 |
msgstr "Regénérer "
|
76 |
|
77 |
+
#: classes/admin/main.php:53
|
78 |
msgid "Validate image size name"
|
79 |
msgstr "Valider le nom de la taille d'image"
|
80 |
|
81 |
+
#: classes/admin/main.php:54
|
82 |
msgid "Done."
|
83 |
msgstr "Fini."
|
84 |
|
85 |
+
#: classes/admin/main.php:55
|
86 |
msgid "Size"
|
87 |
msgstr "Taille "
|
88 |
|
89 |
+
#: classes/admin/main.php:56
|
90 |
msgid ""
|
91 |
"Don't use the basic Wordpress thumbnail size name, use the form above to "
|
92 |
"edit them"
|
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:57
|
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:58
|
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:59 classes/admin/media.php:179
|
106 |
msgid "Update"
|
107 |
msgstr "Mettre à jour"
|
108 |
|
109 |
+
#: classes/admin/main.php:60
|
110 |
msgid "Error requesting page"
|
111 |
msgstr "Erreur lors de la requête vers la page"
|
112 |
|
113 |
+
#: classes/admin/main.php:61
|
114 |
msgid "images have been regenerated !"
|
115 |
msgstr "images ont été regénérées !"
|
116 |
|
117 |
+
#: classes/admin/main.php:62
|
118 |
msgid "Validate"
|
119 |
msgstr "Valider"
|
120 |
|
121 |
+
#: classes/admin/main.php:63
|
122 |
msgid " started at"
|
123 |
msgstr " commencé à "
|
124 |
|
125 |
+
#: classes/admin/main.php:64 classes/admin/media.php:162
|
126 |
msgid "Public name"
|
127 |
msgstr "Nom public"
|
128 |
|
129 |
+
#: classes/admin/main.php:65
|
130 |
msgid " finished at :"
|
131 |
msgstr " terminé à :"
|
132 |
|
133 |
+
#: classes/admin/main.php:66
|
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:67
|
141 |
msgid "All the sizes you have modifed are not saved, continue anyway ?"
|
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:68
|
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:91
|
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:104
|
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>"
|
160 |
+
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:111
|
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>"
|
169 |
+
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:158
|
174 |
+
msgid "Left"
|
175 |
+
msgstr "Gauche"
|
176 |
+
|
177 |
+
#: classes/admin/main.php:159
|
178 |
+
msgid "Center"
|
179 |
+
msgstr "Centre"
|
180 |
+
|
181 |
+
#: classes/admin/main.php:160
|
182 |
+
msgid "Right"
|
183 |
+
msgstr "Droite"
|
184 |
+
|
185 |
+
#: classes/admin/main.php:164
|
186 |
+
msgid "top"
|
187 |
+
msgstr "haut"
|
188 |
|
189 |
+
#: classes/admin/main.php:165
|
190 |
+
msgid "center"
|
191 |
+
msgstr "centre"
|
192 |
+
|
193 |
+
#: classes/admin/main.php:166
|
194 |
+
msgid "bottom"
|
195 |
+
msgstr "bas"
|
196 |
+
|
197 |
+
#: classes/admin/media.php:66
|
198 |
msgid "Settings"
|
199 |
msgstr "Paramètres"
|
200 |
|
201 |
+
#: classes/admin/media.php:106
|
202 |
#, php-format
|
203 |
msgid "%s size"
|
204 |
msgstr "Taille %s"
|
205 |
|
206 |
+
#: classes/admin/media.php:113
|
207 |
msgid "Add a new size"
|
208 |
msgstr "Ajouter une nouvelle taille"
|
209 |
|
210 |
+
#: classes/admin/media.php:116
|
211 |
msgid "Get php for theme"
|
212 |
msgstr "Récupérer le PHP pour le thème"
|
213 |
|
214 |
+
#: classes/admin/media.php:119
|
215 |
msgid "Thumbnail regeneration"
|
216 |
msgstr "Régénération des vignettes"
|
217 |
|
218 |
+
#: classes/admin/media.php:166
|
219 |
+
msgid "Cropping"
|
220 |
+
msgstr "Rognage"
|
221 |
+
|
222 |
+
#: classes/admin/media.php:205
|
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 |
"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:425 classes/admin/post.php:65
|
231 |
msgid "Trying to cheat ?"
|
232 |
msgstr "Cheater ?"
|
233 |
|
234 |
+
#: classes/admin/media.php:472
|
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 |
|
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 |
|
languages/{sis.pot → simple-image-sizes.pot}
RENAMED
@@ -4,8 +4,8 @@ msgid ""
|
|
4 |
msgstr ""
|
5 |
"Project-Id-Version: \n"
|
6 |
"Report-Msgid-Bugs-To: \n"
|
7 |
-
"POT-Creation-Date:
|
8 |
-
"PO-Revision-Date:
|
9 |
"Last-Translator: \n"
|
10 |
"Language-Team: LANGUAGE <LL@li.org>\n"
|
11 |
"MIME-Version: 1.0\n"
|
@@ -13,202 +13,245 @@ msgstr ""
|
|
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.
|
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 |
-
|
33 |
-
msgid "Crop ?"
|
34 |
msgstr ""
|
35 |
|
36 |
-
#: ../
|
37 |
msgid "yes"
|
38 |
msgstr ""
|
39 |
|
40 |
-
#: ../
|
41 |
msgid "no"
|
42 |
msgstr ""
|
43 |
|
44 |
-
#: ../
|
45 |
msgid "Show in post insertion ?"
|
46 |
msgstr ""
|
47 |
|
48 |
-
#: ../
|
49 |
msgid " of "
|
50 |
msgstr ""
|
51 |
|
52 |
-
#: ../
|
53 |
msgid " or "
|
54 |
msgstr ""
|
55 |
|
56 |
-
#: ../
|
57 |
msgid " before the end."
|
58 |
msgstr ""
|
59 |
|
60 |
-
#: ../
|
61 |
msgid "Delete"
|
62 |
msgstr ""
|
63 |
|
64 |
-
#: ../
|
65 |
msgid "No media in your site to regenerate !"
|
66 |
msgstr ""
|
67 |
|
68 |
-
#: ../
|
69 |
msgid "Regenerating "
|
70 |
msgstr ""
|
71 |
|
72 |
-
#: ../
|
73 |
msgid "Regenerate "
|
74 |
msgstr ""
|
75 |
|
76 |
-
#: ../
|
77 |
msgid "Validate image size name"
|
78 |
msgstr ""
|
79 |
|
80 |
-
#: ../
|
81 |
msgid "Done."
|
82 |
msgstr ""
|
83 |
|
84 |
-
#: ../
|
85 |
msgid "Size"
|
86 |
msgstr ""
|
87 |
|
88 |
-
#: ../
|
89 |
msgid ""
|
90 |
"Don't use the basic Wordpress thumbnail size name, use the form above to "
|
91 |
"edit them"
|
92 |
msgstr ""
|
93 |
|
94 |
-
#: ../
|
95 |
msgid "This size is already registered, edit it instead of recreating it."
|
96 |
msgstr ""
|
97 |
|
98 |
-
#: ../
|
99 |
msgid "Do you really want to delete these size ?"
|
100 |
msgstr ""
|
101 |
|
102 |
-
#: ../
|
103 |
msgid "Update"
|
104 |
msgstr ""
|
105 |
|
106 |
-
#: ../
|
107 |
msgid "Error requesting page"
|
108 |
msgstr ""
|
109 |
|
110 |
-
#: ../
|
111 |
msgid "images have been regenerated !"
|
112 |
msgstr ""
|
113 |
|
114 |
-
#: ../
|
115 |
msgid "Validate"
|
116 |
msgstr ""
|
117 |
|
118 |
-
#: ../
|
119 |
msgid " started at"
|
120 |
msgstr ""
|
121 |
|
122 |
-
#: ../
|
123 |
msgid "Public name"
|
124 |
msgstr ""
|
125 |
|
126 |
-
#: ../
|
127 |
msgid " finished at :"
|
128 |
msgstr ""
|
129 |
|
130 |
-
#: ../
|
131 |
msgid ""
|
132 |
"Error during the php treatment, be sure to not have php errors in your page"
|
133 |
msgstr ""
|
134 |
|
135 |
-
#: ../
|
136 |
msgid "All the sizes you have modifed are not saved, continue anyway ?"
|
137 |
msgstr ""
|
138 |
|
139 |
-
#: ../
|
140 |
#, php-format
|
141 |
msgid "This image has been regenerated in %s seconds"
|
142 |
msgstr ""
|
143 |
|
144 |
-
#: ../
|
145 |
-
msgid "
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
146 |
msgstr ""
|
147 |
|
148 |
-
#: ../
|
149 |
msgid "Settings"
|
150 |
msgstr ""
|
151 |
|
152 |
-
#: ../
|
153 |
#, php-format
|
154 |
msgid "%s size"
|
155 |
msgstr ""
|
156 |
|
157 |
-
#: ../
|
158 |
msgid "Add a new size"
|
159 |
msgstr ""
|
160 |
|
161 |
-
#: ../
|
162 |
msgid "Get php for theme"
|
163 |
msgstr ""
|
164 |
|
165 |
-
#: ../
|
166 |
msgid "Thumbnail regeneration"
|
167 |
msgstr ""
|
168 |
|
169 |
-
#: ../
|
170 |
-
#: ../
|
171 |
msgid "custom_image_sizes["
|
172 |
msgstr ""
|
173 |
|
174 |
-
#: ../
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
175 |
msgid "Add a new size of thumbnail"
|
176 |
msgstr ""
|
177 |
|
178 |
-
#: ../
|
179 |
msgid "Get the PHP for the theme"
|
180 |
msgstr ""
|
181 |
|
182 |
-
#: ../
|
183 |
msgid ""
|
184 |
"Copy and paste the code below into your Wordpress theme function file if you "
|
185 |
"wanted to save them and deactivate the plugin."
|
186 |
msgstr ""
|
187 |
|
188 |
-
#: ../
|
189 |
-
msgid "
|
190 |
msgstr ""
|
191 |
|
192 |
-
#: ../
|
193 |
-
msgid "
|
194 |
msgstr ""
|
195 |
|
196 |
-
#: ../
|
197 |
-
|
198 |
-
msgid ""
|
199 |
-
"This file already exists in this size and have not been regenerated :<br/><a "
|
200 |
-
"target=\"_blank\" href=\"%1$s\" >%2$s</a>"
|
201 |
msgstr ""
|
202 |
|
203 |
-
#: ../
|
204 |
-
|
205 |
-
msgid ""
|
206 |
-
"This file does not exists and have not been regenerated :<br/><a target="
|
207 |
-
"\"_blank\" href=\"%1$s\" >%2$s</a>"
|
208 |
msgstr ""
|
209 |
|
210 |
-
#: ../
|
211 |
-
#: ../templates/options-media.php:
|
212 |
msgid "Regenerate Thumbnails"
|
213 |
msgstr ""
|
214 |
|
@@ -216,42 +259,38 @@ msgstr ""
|
|
216 |
msgid "Select which thumbnails you want to rebuild:"
|
217 |
msgstr ""
|
218 |
|
219 |
-
#: ../templates/options-media.php:15 ../templates/options-media.php:
|
220 |
msgid "Size name"
|
221 |
msgstr ""
|
222 |
|
223 |
-
#: ../templates/options-media.php:16 ../templates/options-media.php:
|
224 |
msgid "Width"
|
225 |
msgstr ""
|
226 |
|
227 |
-
#: ../templates/options-media.php:17 ../templates/options-media.php:
|
228 |
msgid "Height"
|
229 |
msgstr ""
|
230 |
|
231 |
-
#: ../templates/options-media.php:
|
232 |
-
msgid "
|
233 |
-
msgstr ""
|
234 |
-
|
235 |
-
#: ../templates/options-media.php:54
|
236 |
-
msgid "No"
|
237 |
msgstr ""
|
238 |
|
239 |
-
#: ../templates/options-media.php:
|
240 |
msgid "Select which post type source thumbnails you want to rebuild:"
|
241 |
msgstr ""
|
242 |
|
243 |
-
#: ../templates/options-media.php:
|
244 |
msgid "Post type"
|
245 |
msgstr ""
|
246 |
|
247 |
-
#: ../templates/options-media.php:
|
248 |
msgid "End time calculated :"
|
249 |
msgstr ""
|
250 |
|
251 |
-
#: ../templates/options-media.php:
|
252 |
msgid "Calculating..."
|
253 |
msgstr ""
|
254 |
|
255 |
-
#: ../templates/options-media.php:
|
256 |
msgid "Last image:"
|
257 |
msgstr ""
|
4 |
msgstr ""
|
5 |
"Project-Id-Version: \n"
|
6 |
"Report-Msgid-Bugs-To: \n"
|
7 |
+
"POT-Creation-Date: 2014-04-20 15:24+0100\n"
|
8 |
+
"PO-Revision-Date: 2014-04-20 15:24+0100\n"
|
9 |
"Last-Translator: \n"
|
10 |
"Language-Team: LANGUAGE <LL@li.org>\n"
|
11 |
"MIME-Version: 1.0\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 |
+
#: ../classes/admin/main.php:39
|
20 |
msgid "Reading attachments..."
|
21 |
msgstr ""
|
22 |
|
23 |
+
#: ../classes/admin/main.php:40 ../classes/admin/media.php:154
|
24 |
msgid "Maximum width"
|
25 |
msgstr ""
|
26 |
|
27 |
+
#: ../classes/admin/main.php:41 ../classes/admin/media.php:158
|
28 |
msgid "Maximum height"
|
29 |
msgstr ""
|
30 |
|
31 |
+
#: ../classes/admin/main.php:42
|
32 |
+
msgid "Crop"
|
|
|
33 |
msgstr ""
|
34 |
|
35 |
+
#: ../classes/admin/main.php:43
|
36 |
msgid "yes"
|
37 |
msgstr ""
|
38 |
|
39 |
+
#: ../classes/admin/main.php:44
|
40 |
msgid "no"
|
41 |
msgstr ""
|
42 |
|
43 |
+
#: ../classes/admin/main.php:45 ../classes/admin/media.php:176
|
44 |
msgid "Show in post insertion ?"
|
45 |
msgstr ""
|
46 |
|
47 |
+
#: ../classes/admin/main.php:46
|
48 |
msgid " of "
|
49 |
msgstr ""
|
50 |
|
51 |
+
#: ../classes/admin/main.php:47
|
52 |
msgid " or "
|
53 |
msgstr ""
|
54 |
|
55 |
+
#: ../classes/admin/main.php:48
|
56 |
msgid " before the end."
|
57 |
msgstr ""
|
58 |
|
59 |
+
#: ../classes/admin/main.php:49 ../classes/admin/media.php:178
|
60 |
msgid "Delete"
|
61 |
msgstr ""
|
62 |
|
63 |
+
#: ../classes/admin/main.php:50
|
64 |
msgid "No media in your site to regenerate !"
|
65 |
msgstr ""
|
66 |
|
67 |
+
#: ../classes/admin/main.php:51
|
68 |
msgid "Regenerating "
|
69 |
msgstr ""
|
70 |
|
71 |
+
#: ../classes/admin/main.php:52
|
72 |
msgid "Regenerate "
|
73 |
msgstr ""
|
74 |
|
75 |
+
#: ../classes/admin/main.php:53
|
76 |
msgid "Validate image size name"
|
77 |
msgstr ""
|
78 |
|
79 |
+
#: ../classes/admin/main.php:54
|
80 |
msgid "Done."
|
81 |
msgstr ""
|
82 |
|
83 |
+
#: ../classes/admin/main.php:55
|
84 |
msgid "Size"
|
85 |
msgstr ""
|
86 |
|
87 |
+
#: ../classes/admin/main.php:56
|
88 |
msgid ""
|
89 |
"Don't use the basic Wordpress thumbnail size name, use the form above to "
|
90 |
"edit them"
|
91 |
msgstr ""
|
92 |
|
93 |
+
#: ../classes/admin/main.php:57
|
94 |
msgid "This size is already registered, edit it instead of recreating it."
|
95 |
msgstr ""
|
96 |
|
97 |
+
#: ../classes/admin/main.php:58
|
98 |
msgid "Do you really want to delete these size ?"
|
99 |
msgstr ""
|
100 |
|
101 |
+
#: ../classes/admin/main.php:59 ../classes/admin/media.php:179
|
102 |
msgid "Update"
|
103 |
msgstr ""
|
104 |
|
105 |
+
#: ../classes/admin/main.php:60
|
106 |
msgid "Error requesting page"
|
107 |
msgstr ""
|
108 |
|
109 |
+
#: ../classes/admin/main.php:61
|
110 |
msgid "images have been regenerated !"
|
111 |
msgstr ""
|
112 |
|
113 |
+
#: ../classes/admin/main.php:62
|
114 |
msgid "Validate"
|
115 |
msgstr ""
|
116 |
|
117 |
+
#: ../classes/admin/main.php:63
|
118 |
msgid " started at"
|
119 |
msgstr ""
|
120 |
|
121 |
+
#: ../classes/admin/main.php:64 ../classes/admin/media.php:162
|
122 |
msgid "Public name"
|
123 |
msgstr ""
|
124 |
|
125 |
+
#: ../classes/admin/main.php:65
|
126 |
msgid " finished at :"
|
127 |
msgstr ""
|
128 |
|
129 |
+
#: ../classes/admin/main.php:66
|
130 |
msgid ""
|
131 |
"Error during the php treatment, be sure to not have php errors in your page"
|
132 |
msgstr ""
|
133 |
|
134 |
+
#: ../classes/admin/main.php:67
|
135 |
msgid "All the sizes you have modifed are not saved, continue anyway ?"
|
136 |
msgstr ""
|
137 |
|
138 |
+
#: ../classes/admin/main.php:68
|
139 |
#, php-format
|
140 |
msgid "This image has been regenerated in %s seconds"
|
141 |
msgstr ""
|
142 |
|
143 |
+
#: ../classes/admin/main.php:91
|
144 |
+
msgid "No id given in POST datas."
|
145 |
+
msgstr ""
|
146 |
+
|
147 |
+
#: ../classes/admin/main.php:104
|
148 |
+
#, php-format
|
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 |
+
#: ../classes/admin/main.php:111
|
155 |
+
#, php-format
|
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 |
+
#: ../classes/admin/main.php:158
|
162 |
+
msgid "Left"
|
163 |
+
msgstr ""
|
164 |
+
|
165 |
+
#: ../classes/admin/main.php:159
|
166 |
+
msgid "Center"
|
167 |
+
msgstr ""
|
168 |
+
|
169 |
+
#: ../classes/admin/main.php:160
|
170 |
+
msgid "Right"
|
171 |
+
msgstr ""
|
172 |
+
|
173 |
+
#: ../classes/admin/main.php:164
|
174 |
+
msgid "top"
|
175 |
+
msgstr ""
|
176 |
+
|
177 |
+
#: ../classes/admin/main.php:165
|
178 |
+
msgid "center"
|
179 |
+
msgstr ""
|
180 |
+
|
181 |
+
#: ../classes/admin/main.php:166
|
182 |
+
msgid "bottom"
|
183 |
msgstr ""
|
184 |
|
185 |
+
#: ../classes/admin/media.php:66
|
186 |
msgid "Settings"
|
187 |
msgstr ""
|
188 |
|
189 |
+
#: ../classes/admin/media.php:106
|
190 |
#, php-format
|
191 |
msgid "%s size"
|
192 |
msgstr ""
|
193 |
|
194 |
+
#: ../classes/admin/media.php:113
|
195 |
msgid "Add a new size"
|
196 |
msgstr ""
|
197 |
|
198 |
+
#: ../classes/admin/media.php:116
|
199 |
msgid "Get php for theme"
|
200 |
msgstr ""
|
201 |
|
202 |
+
#: ../classes/admin/media.php:119
|
203 |
msgid "Thumbnail regeneration"
|
204 |
msgstr ""
|
205 |
|
206 |
+
#: ../classes/admin/media.php:155 ../classes/admin/media.php:157
|
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 |
+
#: ../classes/admin/media.php:168 ../templates/options-media.php:39
|
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 |
+
#: ../classes/admin/media.php:204
|
228 |
msgid "Get the PHP for the theme"
|
229 |
msgstr ""
|
230 |
|
231 |
+
#: ../classes/admin/media.php:205
|
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 |
+
#: ../classes/admin/media.php:221
|
238 |
+
msgid "Admin option-media template missing"
|
239 |
msgstr ""
|
240 |
|
241 |
+
#: ../classes/admin/media.php:425 ../classes/admin/post.php:65
|
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 |
|
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 ""
|
languages/sis-de_DE.mo
DELETED
Binary file
|
languages/sis-de_DE.po
DELETED
@@ -1,373 +0,0 @@
|
|
1 |
-
msgid ""
|
2 |
-
msgstr ""
|
3 |
-
"Project-Id-Version: \n"
|
4 |
-
"Report-Msgid-Bugs-To: \n"
|
5 |
-
"POT-Creation-Date: 2011-10-02 00:11+0100\n"
|
6 |
-
"PO-Revision-Date: 2011-10-02 00:11+0100\n"
|
7 |
-
"Last-Translator: \n"
|
8 |
-
"Language-Team: LANGUAGE <LL@li.org>\n"
|
9 |
-
"MIME-Version: 1.0\n"
|
10 |
-
"Content-Type: text/plain; charset=UTF-8\n"
|
11 |
-
"Content-Transfer-Encoding: 8bit\n"
|
12 |
-
"Plural-Forms: nplurals=2; plural=n != 1;\n"
|
13 |
-
"X-Poedit-Language: \n"
|
14 |
-
"X-Poedit-Country: \n"
|
15 |
-
"X-Poedit-SourceCharset: utf-8\n"
|
16 |
-
"X-Poedit-KeywordsList: __;_e;__ngettext:1,2;_n:1,2;__ngettext_noop:1,2;_n_noop:1,2;_c,_nc:4c,1,2;_x:1,2c;_ex:1,2c;_nx:4c,1,2;_nx_noop:4c,1,2;\n"
|
17 |
-
"X-Poedit-Basepath: .\n"
|
18 |
-
"X-Poedit-Bookmarks: \n"
|
19 |
-
"X-Poedit-SearchPath-0: .\n"
|
20 |
-
"X-Textdomain-Support: yes"
|
21 |
-
|
22 |
-
#: inc/class.admin.php:89
|
23 |
-
#@ sis
|
24 |
-
msgid "Reading attachments..."
|
25 |
-
msgstr "Lese Anhänge…"
|
26 |
-
|
27 |
-
#: inc/class.admin.php:90
|
28 |
-
#: inc/class.admin.php:249
|
29 |
-
#@ sis
|
30 |
-
msgid "Maximum width"
|
31 |
-
msgstr "Maximale Breite"
|
32 |
-
|
33 |
-
#: inc/class.admin.php:91
|
34 |
-
#: inc/class.admin.php:254
|
35 |
-
#@ sis
|
36 |
-
msgid "Maximum height"
|
37 |
-
msgstr "Maximale Höhe"
|
38 |
-
|
39 |
-
#: inc/class.admin.php:92
|
40 |
-
#: inc/class.admin.php:259
|
41 |
-
#: inc/class.admin.php:327
|
42 |
-
#: inc/class.admin.php:386
|
43 |
-
#@ sis
|
44 |
-
msgid "Crop ?"
|
45 |
-
msgstr "Beschneiden?"
|
46 |
-
|
47 |
-
#: inc/class.admin.php:93
|
48 |
-
#: inc/class.admin.php:374
|
49 |
-
#@ sis
|
50 |
-
msgid "yes"
|
51 |
-
msgstr "ja"
|
52 |
-
|
53 |
-
#: inc/class.admin.php:94
|
54 |
-
#: inc/class.admin.php:374
|
55 |
-
#@ sis
|
56 |
-
msgid "no"
|
57 |
-
msgstr "nein"
|
58 |
-
|
59 |
-
#: inc/class.admin.php:95
|
60 |
-
#: inc/class.admin.php:262
|
61 |
-
#@ sis
|
62 |
-
msgid "Show in post insertion ?"
|
63 |
-
msgstr "Beim Einfügen in den Beitrag anzeigen?"
|
64 |
-
|
65 |
-
#: inc/class.admin.php:96
|
66 |
-
#@ sis
|
67 |
-
msgid " of "
|
68 |
-
msgstr "von"
|
69 |
-
|
70 |
-
#: inc/class.admin.php:97
|
71 |
-
#@ sis
|
72 |
-
msgid " or "
|
73 |
-
msgstr "oder"
|
74 |
-
|
75 |
-
#: inc/class.admin.php:98
|
76 |
-
#@ sis
|
77 |
-
msgid " before the end."
|
78 |
-
msgstr "vor dem Ende."
|
79 |
-
|
80 |
-
#: inc/class.admin.php:99
|
81 |
-
#: inc/class.admin.php:264
|
82 |
-
#@ sis
|
83 |
-
msgid "Delete"
|
84 |
-
msgstr "Löschen"
|
85 |
-
|
86 |
-
#: inc/class.admin.php:100
|
87 |
-
#@ sis
|
88 |
-
msgid "No media in your site to regenerate !"
|
89 |
-
msgstr "Keine Medien neu zu generieren!"
|
90 |
-
|
91 |
-
#: inc/class.admin.php:101
|
92 |
-
#@ sis
|
93 |
-
msgid "Regenerating "
|
94 |
-
msgstr "Neu generieren"
|
95 |
-
|
96 |
-
#: inc/class.admin.php:102
|
97 |
-
#@ sis
|
98 |
-
msgid "Validate image size name"
|
99 |
-
msgstr "Bildgrößenbezeichnung überprüfen"
|
100 |
-
|
101 |
-
#: inc/class.admin.php:103
|
102 |
-
#@ sis
|
103 |
-
msgid "Done."
|
104 |
-
msgstr "Fertig."
|
105 |
-
|
106 |
-
#: inc/class.admin.php:104
|
107 |
-
#@ sis
|
108 |
-
msgid "Size"
|
109 |
-
msgstr "Bildgröße"
|
110 |
-
|
111 |
-
#: inc/class.admin.php:105
|
112 |
-
#@ sis
|
113 |
-
msgid "Don't use the basic Wordpress thumbnail size name, use the form above to edit them"
|
114 |
-
msgstr "Nutze nicht die vorgegebene Thumbnail-Bezeichnung in WordPress! Nutze das Formular, um diese zu bearbeiten."
|
115 |
-
|
116 |
-
#: inc/class.admin.php:106
|
117 |
-
#@ sis
|
118 |
-
msgid "This size is already registered, edit it instead of recreating it."
|
119 |
-
msgstr "Die Bildgröße existiert bereits. Du kannst sie bearbeiten, anstatt sie doppelt anzulegen."
|
120 |
-
|
121 |
-
#: inc/class.admin.php:107
|
122 |
-
#@ sis
|
123 |
-
msgid "Do you really want to delete these size ?"
|
124 |
-
msgstr "Willst du diese Bildgröße/n wirklich löschen?"
|
125 |
-
|
126 |
-
#: inc/class.admin.php:108
|
127 |
-
#: inc/class.admin.php:265
|
128 |
-
#@ sis
|
129 |
-
msgid "Update"
|
130 |
-
msgstr "Aktualisieren"
|
131 |
-
|
132 |
-
#: inc/class.admin.php:109
|
133 |
-
#@ sis
|
134 |
-
msgid "Error requesting page"
|
135 |
-
msgstr "Fehler beim Abruf der Seite"
|
136 |
-
|
137 |
-
#: inc/class.admin.php:110
|
138 |
-
#@ sis
|
139 |
-
msgid "images have been regenerated !"
|
140 |
-
msgstr "Bilder wurden neu generiert!"
|
141 |
-
|
142 |
-
#: inc/class.admin.php:111
|
143 |
-
#@ sis
|
144 |
-
msgid "Validate"
|
145 |
-
msgstr "Überprüfen"
|
146 |
-
|
147 |
-
#: inc/class.admin.php:112
|
148 |
-
#@ sis
|
149 |
-
msgid " started at"
|
150 |
-
msgstr "begonnen: "
|
151 |
-
|
152 |
-
#: inc/class.admin.php:113
|
153 |
-
#@ sis
|
154 |
-
msgid " finished at :"
|
155 |
-
msgstr "beendet: "
|
156 |
-
|
157 |
-
#: inc/class.admin.php:114
|
158 |
-
#@ sis
|
159 |
-
msgid "Error during the php treatment, be sure to not have php errors in your page"
|
160 |
-
msgstr "Fehler während des PHP-Durchlaufs! Stelle sicher, dass sich keine PHP-Fehler in deiner Seite befinden."
|
161 |
-
|
162 |
-
#: inc/class.admin.php:115
|
163 |
-
#@ sis
|
164 |
-
msgid "All the sizes you have modifed are not saved, continue anyway ?"
|
165 |
-
msgstr "Deine veränderten Bildgrößen wurden noch nicht gespeichert. Trotzdem fortfahren?"
|
166 |
-
|
167 |
-
#: inc/class.admin.php:116
|
168 |
-
#, php-format
|
169 |
-
#@ sis
|
170 |
-
msgid "This image has been regenerated in %s seconds"
|
171 |
-
msgstr "Dieses Bild wurde neu generiert in %s Sekunden."
|
172 |
-
|
173 |
-
#: inc/class.admin.php:131
|
174 |
-
#@ sis
|
175 |
-
msgid "Regenerate thumbnails"
|
176 |
-
msgstr "Artikelbilder neu generieren"
|
177 |
-
|
178 |
-
#: inc/class.admin.php:151
|
179 |
-
#@ sis
|
180 |
-
msgid "Settings"
|
181 |
-
msgstr "Einstellungen"
|
182 |
-
|
183 |
-
#: inc/class.admin.php:200
|
184 |
-
#, php-format
|
185 |
-
#@ sis
|
186 |
-
msgid "%s size"
|
187 |
-
msgstr "Bildgröße „%s“"
|
188 |
-
|
189 |
-
#: inc/class.admin.php:207
|
190 |
-
#@ sis
|
191 |
-
msgid "Add a new size"
|
192 |
-
msgstr "Neue Bildgröße hinzufügen"
|
193 |
-
|
194 |
-
#: inc/class.admin.php:210
|
195 |
-
#@ sis
|
196 |
-
msgid "Legend of the sizes"
|
197 |
-
msgstr "Legende für deine Bildgrößen"
|
198 |
-
|
199 |
-
#: inc/class.admin.php:213
|
200 |
-
#@ sis
|
201 |
-
msgid "Get php for theme"
|
202 |
-
msgstr "PHP für dein Theme generieren"
|
203 |
-
|
204 |
-
#: inc/class.admin.php:216
|
205 |
-
#@ sis
|
206 |
-
msgid "Thumbnail regeneration"
|
207 |
-
msgstr "Artikelbilder neu generieren"
|
208 |
-
|
209 |
-
#: inc/class.admin.php:276
|
210 |
-
#@ sis
|
211 |
-
msgid "Add a new size of thumbnail"
|
212 |
-
msgstr "Neue Bildgröße für Thumbnail hinzufügen"
|
213 |
-
|
214 |
-
#: inc/class.admin.php:288
|
215 |
-
#@ sis
|
216 |
-
msgid "Get the PHP for the theme"
|
217 |
-
msgstr "Hol‘ dir den PHP-Code für dein Theme!"
|
218 |
-
|
219 |
-
#: inc/class.admin.php:289
|
220 |
-
#@ sis
|
221 |
-
msgid "Copy and paste the code below into your Wordpress theme function file if you wanted to save them and deactivate the plugin."
|
222 |
-
msgstr "Falls du deine Bildgrößen behalten und das Plugin deaktivieren möchtest, kopiere diesen PHP-Code in die Datei functions.php deines Theme."
|
223 |
-
|
224 |
-
#: inc/class.admin.php:302
|
225 |
-
#@ sis
|
226 |
-
msgid "The images created on your theme are <span style=\"color:#F2A13A\">orange</span> and your custom size are <span style=\"color:#89D76A\"> green </span>."
|
227 |
-
msgstr "Die von deinem Theme generierten Bildgrößen sind <span style=\"color:#F2A13A\">orange</span>, deine selbst erstellten Bildgrößen sind <span style=\"color:#89D76A\"> grün </span>."
|
228 |
-
|
229 |
-
#: inc/class.admin.php:319
|
230 |
-
#@ sis
|
231 |
-
msgid "Select which thumbnails you want to rebuild:"
|
232 |
-
msgstr "Wähle die Artikelbilder aus, die neu generiert werden sollen:"
|
233 |
-
|
234 |
-
#: inc/class.admin.php:323
|
235 |
-
#: inc/class.admin.php:382
|
236 |
-
#: inc/class.admin.php:395
|
237 |
-
#: inc/class.admin.php:420
|
238 |
-
#@ sis
|
239 |
-
msgid "Resize ?"
|
240 |
-
msgstr "Bearbeiten?"
|
241 |
-
|
242 |
-
#: inc/class.admin.php:324
|
243 |
-
#: inc/class.admin.php:383
|
244 |
-
#@ sis
|
245 |
-
msgid "Size name"
|
246 |
-
msgstr "Bildgrößenbezeichnung"
|
247 |
-
|
248 |
-
#: inc/class.admin.php:325
|
249 |
-
#: inc/class.admin.php:384
|
250 |
-
#@ sis
|
251 |
-
msgid "Width"
|
252 |
-
msgstr "Breite"
|
253 |
-
|
254 |
-
#: inc/class.admin.php:326
|
255 |
-
#: inc/class.admin.php:385
|
256 |
-
#@ sis
|
257 |
-
msgid "Height"
|
258 |
-
msgstr "Höhe"
|
259 |
-
|
260 |
-
#: inc/class.admin.php:391
|
261 |
-
#@ sis
|
262 |
-
msgid "Select which post type source thumbnails you want to rebuild:"
|
263 |
-
msgstr "Wähle die Inhaltstypen aus, deren Artikelbilder du neu generieren willst:"
|
264 |
-
|
265 |
-
#: inc/class.admin.php:396
|
266 |
-
#: inc/class.admin.php:421
|
267 |
-
#@ sis
|
268 |
-
msgid "Post type"
|
269 |
-
msgstr "Inhaltstyp"
|
270 |
-
|
271 |
-
#: inc/class.admin.php:443
|
272 |
-
#@ sis
|
273 |
-
msgid "End time calculated :"
|
274 |
-
msgstr "Berechnetes Ende:"
|
275 |
-
|
276 |
-
#: inc/class.admin.php:454
|
277 |
-
#@ sis
|
278 |
-
msgid "Last image:"
|
279 |
-
msgstr "Letztes Bild:"
|
280 |
-
|
281 |
-
#: inc/class.admin.php:455
|
282 |
-
#@ sis
|
283 |
-
msgid "Regenerate Thumbnails"
|
284 |
-
msgstr "Artikelbilder neu generieren"
|
285 |
-
|
286 |
-
#: inc/class.admin.php:620
|
287 |
-
#@ sis
|
288 |
-
msgid "No id given in POST datas."
|
289 |
-
msgstr "Keine ID in den POST-Daten gegeben."
|
290 |
-
|
291 |
-
#: inc/class.admin.php:630
|
292 |
-
#: inc/class.admin.php:632
|
293 |
-
#, php-format
|
294 |
-
#@ sis
|
295 |
-
msgid "This file does not exists and have not been regenerated :<br/><a target=\"_blank\" href=\"%1$s\" >%2$s</a>"
|
296 |
-
msgstr "Diese Datei existiert nicht und wurde nicht neu generiert:<br/><a target=\"_blank\" href=\"%1$s\" >%2$s</a>"
|
297 |
-
|
298 |
-
#: inc/class.admin.php:73
|
299 |
-
#, php-format
|
300 |
-
#@ sis
|
301 |
-
msgid "<h3>Welcome to Simple Image Sizes !</h3><p>In this plugin, you can add new image sizes<br/> and regenerate the images that doesn't exist yet.<br/> Click on <a href=\"%s\">Medias</a> for configurate the images</p>"
|
302 |
-
msgstr "<h3>Willkommen bei Simple Image Sizes!</h3><p>Mit diesem Plugin kannst du neue Bildgrößen hinzufügen<br/> und für bereits existierende Bilder neu generieren.<br/> Gehe zur <a href=\"%s\">Mediathek</a>, um deine Bilder neu zu konfigurieren.</p>"
|
303 |
-
|
304 |
-
#: inc/class.admin.php:244
|
305 |
-
#@ default
|
306 |
-
msgid "custom_image_sizes[name][custom]"
|
307 |
-
msgstr ""
|
308 |
-
|
309 |
-
#: inc/class.admin.php:246
|
310 |
-
#@ default
|
311 |
-
msgid "custom_image_sizes[name][theme]"
|
312 |
-
msgstr ""
|
313 |
-
|
314 |
-
#: inc/class.admin.php:248
|
315 |
-
#: inc/class.admin.php:250
|
316 |
-
#@ default
|
317 |
-
msgid "custom_image_sizes[name][w]"
|
318 |
-
msgstr ""
|
319 |
-
|
320 |
-
#: inc/class.admin.php:253
|
321 |
-
#: inc/class.admin.php:255
|
322 |
-
#@ default
|
323 |
-
msgid "custom_image_sizes[name][h]"
|
324 |
-
msgstr ""
|
325 |
-
|
326 |
-
#: inc/class.admin.php:258
|
327 |
-
#: inc/class.admin.php:259
|
328 |
-
#@ default
|
329 |
-
msgid "custom_image_sizes[name][c]"
|
330 |
-
msgstr ""
|
331 |
-
|
332 |
-
#: inc/class.admin.php:261
|
333 |
-
#: inc/class.admin.php:262
|
334 |
-
#@ default
|
335 |
-
msgid "custom_image_sizes[name][s]"
|
336 |
-
msgstr ""
|
337 |
-
|
338 |
-
#. translators: plugin header field 'Name'
|
339 |
-
#: simple_image_sizes.php:0
|
340 |
-
#@ sis
|
341 |
-
msgid "Simple Image Size"
|
342 |
-
msgstr "Simple Image Size"
|
343 |
-
|
344 |
-
#. translators: plugin header field 'PluginURI'
|
345 |
-
#: simple_image_sizes.php:0
|
346 |
-
#@ sis
|
347 |
-
msgid "http://redmine.beapi.fr/projects/show/simple-image-sizes"
|
348 |
-
msgstr "http://redmine.beapi.fr/projects/show/simple-image-sizes"
|
349 |
-
|
350 |
-
#. translators: plugin header field 'Description'
|
351 |
-
#: simple_image_sizes.php:0
|
352 |
-
#@ sis
|
353 |
-
msgid "Add options in media setting page for images sizes"
|
354 |
-
msgstr "Optionen für Bildgrößen in den Mediathek-Einstellungen hinzufügen"
|
355 |
-
|
356 |
-
#. translators: plugin header field 'Author'
|
357 |
-
#: simple_image_sizes.php:0
|
358 |
-
#@ sis
|
359 |
-
msgid "Rahe"
|
360 |
-
msgstr "Rahe"
|
361 |
-
|
362 |
-
#. translators: plugin header field 'AuthorURI'
|
363 |
-
#: simple_image_sizes.php:0
|
364 |
-
#@ sis
|
365 |
-
msgid "http://nicolas-juen.fr"
|
366 |
-
msgstr "http://nicolas-juen.fr"
|
367 |
-
|
368 |
-
#. translators: plugin header field 'Version'
|
369 |
-
#: simple_image_sizes.php:0
|
370 |
-
#@ sis
|
371 |
-
msgid "2.2.3"
|
372 |
-
msgstr ""
|
373 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
languages/sis-fr_FR.mo
DELETED
Binary file
|
package.json
ADDED
@@ -0,0 +1,13 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
{
|
2 |
+
"name": "simple-image-sizes",
|
3 |
+
"version": "2.4.3",
|
4 |
+
"description": "Simple image sizes for WordPress",
|
5 |
+
"author": "Nicolas Juen",
|
6 |
+
"devDependencies": {
|
7 |
+
"grunt": "~0.4.4",
|
8 |
+
"grunt-contrib-jshint": "~0.10.0",
|
9 |
+
"grunt-contrib-uglify": "~0.4.0",
|
10 |
+
"grunt-contrib-watch":"~0.6.1",
|
11 |
+
"grunt-contrib-cssmin":"~0.9.0"
|
12 |
+
}
|
13 |
+
}
|
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: 3.
|
7 |
-
Stable tag:
|
8 |
License: GPLv2 or later
|
9 |
License URI: http://www.gnu.org/licenses/gpl-2.0.html
|
10 |
|
@@ -45,10 +45,15 @@ And then you can choose if the image is displayed on the media insertion or not
|
|
45 |
|
46 |
1. Settings page
|
47 |
2. Get PHP for the theme
|
48 |
-
3. Choose the sizes to regenerate
|
49 |
-
4. Regenerating image sizes
|
50 |
|
51 |
== Changelog ==
|
|
|
|
|
|
|
|
|
|
|
|
|
52 |
* 2.4.3
|
53 |
* Remove some php notices
|
54 |
* Remove notice when wrong image size
|
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: 3.9
|
7 |
+
Stable tag: 3.0
|
8 |
License: GPLv2 or later
|
9 |
License URI: http://www.gnu.org/licenses/gpl-2.0.html
|
10 |
|
45 |
|
46 |
1. Settings page
|
47 |
2. Get PHP for the theme
|
48 |
+
3. Choose the sizes to regenerate and regenerate them
|
|
|
49 |
|
50 |
== Changelog ==
|
51 |
+
* 3.0
|
52 |
+
* Revamping all the code, change classes and structure
|
53 |
+
* Use grunt for compiling files
|
54 |
+
* Handle the 3.9 new cropping position
|
55 |
+
* Remove aristo css
|
56 |
+
* Use UI from WordPress
|
57 |
* 2.4.3
|
58 |
* Remove some php notices
|
59 |
* Remove notice when wrong image size
|
screenshot-1.png
CHANGED
Binary file
|
screenshot-2.png
CHANGED
Binary file
|
screenshot-3.png
CHANGED
Binary file
|
screenshot-4.png
DELETED
Binary file
|
simple_image_sizes.php
CHANGED
@@ -1,13 +1,13 @@
|
|
1 |
<?php
|
2 |
/*
|
3 |
Plugin Name: Simple Image Sizes
|
4 |
-
Plugin URI: https://github.com/Rahe/
|
5 |
Description: Add options in media setting page for images sizes
|
6 |
-
Version:
|
7 |
Author: Rahe
|
8 |
Author URI: http://nicolas-juen.fr
|
9 |
-
Text Domain:
|
10 |
-
Domain Path: /languages
|
11 |
License: GPLv2 or later
|
12 |
License URI: http://www.gnu.org/licenses/gpl-2.0.html
|
13 |
|
@@ -28,22 +28,33 @@ along with this program; if not, write to the Free Software
|
|
28 |
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
29 |
*/
|
30 |
|
31 |
-
define( 'SIS_URL',
|
32 |
-
define( 'SIS_DIR',
|
33 |
-
define( 'SIS_VERSION', '
|
34 |
define( 'SIS_OPTION', 'custom_image_sizes' );
|
35 |
|
36 |
-
|
37 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
38 |
|
39 |
add_action ( 'plugins_loaded', 'initSIS' );
|
40 |
function initSIS() {
|
41 |
-
global $SIS;
|
42 |
if( is_admin() ) {
|
43 |
-
|
|
|
|
|
44 |
}
|
45 |
|
46 |
-
|
47 |
-
|
48 |
-
load_plugin_textdomain ( 'sis', false, basename( rtrim( SIS_DIR, '/' ) ) . '/languages' );
|
49 |
}
|
1 |
<?php
|
2 |
/*
|
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'
|
10 |
+
Domain Path: /languages
|
11 |
License: GPLv2 or later
|
12 |
License URI: http://www.gnu.org/licenses/gpl-2.0.html
|
13 |
|
28 |
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
29 |
*/
|
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
|
37 |
+
function _sis_load_files($dir, $files, $prefix = '') {
|
38 |
+
foreach ( $files as $file ) {
|
39 |
+
if ( is_file( $dir . $prefix . $file . ".php" ) ) {
|
40 |
+
require_once( $dir . $prefix . $file . ".php" );
|
41 |
+
}
|
42 |
+
}
|
43 |
+
}
|
44 |
+
|
45 |
+
// Plugin client classes
|
46 |
+
_sis_load_files( SIS_DIR . 'classes/', array( 'main' ) );
|
47 |
+
|
48 |
+
// Admins classes
|
49 |
+
_sis_load_files( SIS_DIR . 'classes/admin/', array( 'main', 'post', 'media' ) );
|
50 |
|
51 |
add_action ( 'plugins_loaded', 'initSIS' );
|
52 |
function initSIS() {
|
|
|
53 |
if( is_admin() ) {
|
54 |
+
new SIS_Admin_Main();
|
55 |
+
new SIS_Admin_Post();
|
56 |
+
new SIS_Admin_Media();
|
57 |
}
|
58 |
|
59 |
+
new SIS_Client();
|
|
|
|
|
60 |
}
|
templates/admin-js.html
CHANGED
@@ -26,16 +26,22 @@
|
|
26 |
<input type="text" name="custom_image_sizes[<%= size_name %>][n]" id="custom_image_sizes[<%= size_name %>][n]" base_n="<%= size_name %>" class="n">
|
27 |
</label>
|
28 |
<span class="size_options">
|
29 |
-
<input type="checkbox" name="custom_image_sizes[<%= size_name %>][c]" id="custom_image_sizes[<%= size_name %>][c]" base_c="0" value="1" class="c crop">
|
30 |
<label for="custom_image_sizes[<%= size_name %>][c]" id="custom_image_sizes[<%= size_name %>][c]" class="c" title="<%= crop %>">
|
31 |
<%= crop %>
|
32 |
</label>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
33 |
<input type="checkbox" name="custom_image_sizes[<%= size_name %>][s]" id="custom_image_sizes[<%= size_name %>][s]" base_s="0" value="1" class="s show">
|
34 |
<label for="custom_image_sizes[<%= size_name %>][s]" id="custom_image_sizes[<%= size_name %>][s]" class="s" title="<%= show %>">
|
35 |
<%= show %>
|
36 |
</label>
|
37 |
</span>
|
38 |
-
<div class="delete_size"><%= deleteImage %></div>
|
39 |
-
<div class="add_size"><%= validateButton %></div>
|
40 |
</td>
|
41 |
</script>
|
26 |
<input type="text" name="custom_image_sizes[<%= size_name %>][n]" id="custom_image_sizes[<%= size_name %>][n]" base_n="<%= size_name %>" class="n">
|
27 |
</label>
|
28 |
<span class="size_options">
|
|
|
29 |
<label for="custom_image_sizes[<%= size_name %>][c]" id="custom_image_sizes[<%= size_name %>][c]" class="c" title="<%= crop %>">
|
30 |
<%= crop %>
|
31 |
</label>
|
32 |
+
<select type="checkbox" name="custom_image_sizes[<%= size_name %>][c]" id="custom_image_sizes[<%= 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 |
+
<% }); %>
|
38 |
+
</select>
|
39 |
<input type="checkbox" name="custom_image_sizes[<%= size_name %>][s]" id="custom_image_sizes[<%= size_name %>][s]" base_s="0" value="1" class="s show">
|
40 |
<label for="custom_image_sizes[<%= size_name %>][s]" id="custom_image_sizes[<%= size_name %>][s]" class="s" title="<%= show %>">
|
41 |
<%= show %>
|
42 |
</label>
|
43 |
</span>
|
44 |
+
<div class="delete_size button-secondary"><%= deleteImage %></div>
|
45 |
+
<div class="add_size button-secondary"><%= validateButton %></div>
|
46 |
</td>
|
47 |
</script>
|
templates/options-media.php
CHANGED
@@ -7,15 +7,15 @@
|
|
7 |
<input type="hidden" class="getList" value='<?php echo wp_create_nonce( 'getList' ); ?>' />
|
8 |
<div id="sis-regen">
|
9 |
<div class="wrapper" style="">
|
10 |
-
<h4> <?php _e( 'Select which thumbnails you want to rebuild:', '
|
11 |
<table cellspacing="0" id="sis_sizes" class="widefat page fixed sis">
|
12 |
<thead>
|
13 |
<tr>
|
14 |
<th scope="col" id="cb" class="manage-column column-cb check-column" style=""><input checked="checked" type="checkbox"></th>
|
15 |
-
<th class="manage-column" scope="col"><?php _e( 'Size name', '
|
16 |
-
<th class="manage-column" scope="col"><?php _e( 'Width', '
|
17 |
-
<th class="manage-column" scope="col"><?php _e( 'Height', '
|
18 |
-
<th class="manage-column" scope="col"><?php _e( 'Crop ?', '
|
19 |
</tr>
|
20 |
</thead>
|
21 |
<tbody>
|
@@ -34,7 +34,12 @@
|
|
34 |
$height = isset( $_wp_additional_image_sizes[$s]['height'] ) ? intval( $_wp_additional_image_sizes[$s]['height'] ) : get_option( "{$s}_size_h" ) ;
|
35 |
|
36 |
//Set crop
|
37 |
-
$crop = isset( $_wp_additional_image_sizes[$s]['crop'] ) ?
|
|
|
|
|
|
|
|
|
|
|
38 |
|
39 |
?>
|
40 |
<tr id="sis-<?php echo esc_attr( $s ) ?>">
|
@@ -45,13 +50,13 @@
|
|
45 |
<label for="<?php esc_attr_e( $s ); ?>"><?php echo esc_html( $s ); ?></label>
|
46 |
</th>
|
47 |
<th>
|
48 |
-
<label for="<?php esc_attr_e( $s ); ?>"><?php echo esc_html( $width); ?> px</label>
|
49 |
</th>
|
50 |
<th>
|
51 |
<label for="<?php esc_attr_e( $s ); ?>"><?php echo esc_html( $height ); ?> px</label>
|
52 |
</th>
|
53 |
<th>
|
54 |
-
<label for="<?php esc_attr_e( $s ); ?>"><?php echo
|
55 |
</th>
|
56 |
</tr>
|
57 |
<?php endforeach;?>
|
@@ -59,26 +64,26 @@
|
|
59 |
<tfoot>
|
60 |
<tr>
|
61 |
<th scope="col" id="cb" class="manage-column column-cb check-column" style=""><input checked="checked" type="checkbox"></th>
|
62 |
-
<th class="manage-column" scope="col"><?php _e( 'Size name', '
|
63 |
-
<th class="manage-column" scope="col"><?php _e( 'Width', '
|
64 |
-
<th class="manage-column" scope="col"><?php _e( 'Height', '
|
65 |
-
<th class="manage-column" scope="col"><?php _e( 'Crop ?', '
|
66 |
</tr>
|
67 |
</tfoot>
|
68 |
</table>
|
69 |
|
70 |
-
<h4><?php _e( 'Select which post type source thumbnails you want to rebuild:', '
|
71 |
<table cellspacing="0" class="widefat page fixed sis">
|
72 |
<thead>
|
73 |
<tr>
|
74 |
<th scope="col" id="cb" class="manage-column column-cb check-column" style=""><input checked="checked" type="checkbox"></th>
|
75 |
-
<th class="manage-column" scope="col"><?php _e( 'Post type', '
|
76 |
</tr>
|
77 |
</thead>
|
78 |
<tbody>
|
79 |
<?php
|
80 |
// Diplay the post types table
|
81 |
-
foreach ( get_post_types( array( 'public' => true
|
82 |
// Avoid the post_types without post thumbnails feature
|
83 |
if( !array_key_exists( 'thumbnail' , $_wp_post_type_features[$ptype->name] ) || $_wp_post_type_features[$ptype->name] == false ) {
|
84 |
continue;
|
@@ -99,7 +104,7 @@
|
|
99 |
<tfoot>
|
100 |
<tr>
|
101 |
<th scope="col" id="cb" class="manage-column column-cb check-column"><input checked="checked" type="checkbox"></th>
|
102 |
-
<th class="manage-column" scope="col"><?php _e( 'Post type', '
|
103 |
</tr>
|
104 |
</tfoot>
|
105 |
</table>
|
@@ -107,13 +112,18 @@
|
|
107 |
</div>
|
108 |
<div >
|
109 |
<div id="regenerate_message"></div>
|
110 |
-
<div class="
|
111 |
-
|
|
|
|
|
|
|
|
|
|
|
112 |
<div class="ui-widget" id="time">
|
113 |
<div class="ui-state-highlight ui-corner-all">
|
114 |
<p>
|
115 |
<span class="ui-icon ui-icon-info"></span>
|
116 |
-
<span><strong><?php _e( 'End time calculated :', '
|
117 |
</p>
|
118 |
<ul class="messages"></ul>
|
119 |
</div>
|
@@ -124,6 +134,6 @@
|
|
124 |
</ol>
|
125 |
</p>
|
126 |
</div>
|
127 |
-
<div id="thumb"><h4><?php _e( 'Last image:', '
|
128 |
-
<input type="button" class="button" name="ajax_thumbnail_rebuild" id="ajax_thumbnail_rebuild" value="<?php _e( 'Regenerate Thumbnails', '
|
129 |
</div>
|
7 |
<input type="hidden" class="getList" value='<?php echo wp_create_nonce( 'getList' ); ?>' />
|
8 |
<div id="sis-regen">
|
9 |
<div class="wrapper" style="">
|
10 |
+
<h4> <?php _e( 'Select which thumbnails you want to rebuild:', 'simple-image-sizes'); ?> </h4>
|
11 |
<table cellspacing="0" id="sis_sizes" class="widefat page fixed sis">
|
12 |
<thead>
|
13 |
<tr>
|
14 |
<th scope="col" id="cb" class="manage-column column-cb check-column" style=""><input checked="checked" type="checkbox"></th>
|
15 |
+
<th class="manage-column" scope="col"><?php _e( 'Size name', 'simple-image-sizes'); ?></th>
|
16 |
+
<th class="manage-column" scope="col"><?php _e( 'Width', 'simple-image-sizes'); ?></th>
|
17 |
+
<th class="manage-column" scope="col"><?php _e( 'Height', 'simple-image-sizes'); ?></th>
|
18 |
+
<th class="manage-column" scope="col"><?php _e( 'Crop ?', 'simple-image-sizes'); ?></th>
|
19 |
</tr>
|
20 |
</thead>
|
21 |
<tbody>
|
34 |
$height = isset( $_wp_additional_image_sizes[$s]['height'] ) ? intval( $_wp_additional_image_sizes[$s]['height'] ) : get_option( "{$s}_size_h" ) ;
|
35 |
|
36 |
//Set crop
|
37 |
+
$crop = isset( $_wp_additional_image_sizes[$s]['crop'] ) ? $_wp_additional_image_sizes[$s]['crop'] : get_option( "{$s}_crop" ) ;
|
38 |
+
if( is_numeric( $crop ) || is_bool( $crop ) ) {
|
39 |
+
$crop = absint( $crop ) > 0 ? __( 'Yes', 'simple-image-sizes' ) : __( 'No', 'simple-image-sizes' ) ;
|
40 |
+
} else {
|
41 |
+
$crop = Sis_Admin_Main::get_crop_position_label( $crop );
|
42 |
+
}
|
43 |
|
44 |
?>
|
45 |
<tr id="sis-<?php echo esc_attr( $s ) ?>">
|
50 |
<label for="<?php esc_attr_e( $s ); ?>"><?php echo esc_html( $s ); ?></label>
|
51 |
</th>
|
52 |
<th>
|
53 |
+
<label for="<?php esc_attr_e( $s ); ?>"><?php echo esc_html( $width ); ?> px</label>
|
54 |
</th>
|
55 |
<th>
|
56 |
<label for="<?php esc_attr_e( $s ); ?>"><?php echo esc_html( $height ); ?> px</label>
|
57 |
</th>
|
58 |
<th>
|
59 |
+
<label for="<?php esc_attr_e( $s ); ?>"><?php echo $crop; ?> </label>
|
60 |
</th>
|
61 |
</tr>
|
62 |
<?php endforeach;?>
|
64 |
<tfoot>
|
65 |
<tr>
|
66 |
<th scope="col" id="cb" class="manage-column column-cb check-column" style=""><input checked="checked" type="checkbox"></th>
|
67 |
+
<th class="manage-column" scope="col"><?php _e( 'Size name', 'simple-image-sizes'); ?></th>
|
68 |
+
<th class="manage-column" scope="col"><?php _e( 'Width', 'simple-image-sizes'); ?></th>
|
69 |
+
<th class="manage-column" scope="col"><?php _e( 'Height', 'simple-image-sizes'); ?></th>
|
70 |
+
<th class="manage-column" scope="col"><?php _e( 'Crop ?', 'simple-image-sizes'); ?></th>
|
71 |
</tr>
|
72 |
</tfoot>
|
73 |
</table>
|
74 |
|
75 |
+
<h4><?php _e( 'Select which post type source thumbnails you want to rebuild:', 'simple-image-sizes'); ?></h4>
|
76 |
<table cellspacing="0" class="widefat page fixed sis">
|
77 |
<thead>
|
78 |
<tr>
|
79 |
<th scope="col" id="cb" class="manage-column column-cb check-column" style=""><input checked="checked" type="checkbox"></th>
|
80 |
+
<th class="manage-column" scope="col"><?php _e( 'Post type', 'simple-image-sizes'); ?></th>
|
81 |
</tr>
|
82 |
</thead>
|
83 |
<tbody>
|
84 |
<?php
|
85 |
// Diplay the post types table
|
86 |
+
foreach ( get_post_types( array( 'public' => true ), 'objects' ) as $ptype ):
|
87 |
// Avoid the post_types without post thumbnails feature
|
88 |
if( !array_key_exists( 'thumbnail' , $_wp_post_type_features[$ptype->name] ) || $_wp_post_type_features[$ptype->name] == false ) {
|
89 |
continue;
|
104 |
<tfoot>
|
105 |
<tr>
|
106 |
<th scope="col" id="cb" class="manage-column column-cb check-column"><input checked="checked" type="checkbox"></th>
|
107 |
+
<th class="manage-column" scope="col"><?php _e( 'Post type', 'simple-image-sizes'); ?></th>
|
108 |
</tr>
|
109 |
</tfoot>
|
110 |
</table>
|
112 |
</div>
|
113 |
<div >
|
114 |
<div id="regenerate_message"></div>
|
115 |
+
<div class="media-item sis">
|
116 |
+
<div class="progress">
|
117 |
+
<div id="sis_progress-percent" class="percent">100%</div>
|
118 |
+
<div class="bar"></div>
|
119 |
+
</div>
|
120 |
+
</div>
|
121 |
+
|
122 |
<div class="ui-widget" id="time">
|
123 |
<div class="ui-state-highlight ui-corner-all">
|
124 |
<p>
|
125 |
<span class="ui-icon ui-icon-info"></span>
|
126 |
+
<span><strong><?php _e( 'End time calculated :', 'simple-image-sizes' ); ?></strong> <span class='time_message'><?php _e( 'Calculating...', 'simple-image-sizes' ) ?></span> </span>
|
127 |
</p>
|
128 |
<ul class="messages"></ul>
|
129 |
</div>
|
134 |
</ol>
|
135 |
</p>
|
136 |
</div>
|
137 |
+
<div id="thumb"><h4><?php _e( 'Last image:', 'simple-image-sizes'); ?></h4><img id="thumb-img" /></div>
|
138 |
+
<input type="button" class="button" name="ajax_thumbnail_rebuild" id="ajax_thumbnail_rebuild" value="<?php _e( 'Regenerate Thumbnails', 'simple-image-sizes' ) ?>" />
|
139 |
</div>
|