Changeset 1848632
- Timestamp:
- 03/28/2018 03:29:16 PM (8 years ago)
- Location:
- sponsors-carousel/trunk
- Files:
-
- 9 edited
-
js/sponsors-carousel-admin.js (modified) (1 diff)
-
js/sponsors-carousel.js (modified) (1 diff)
-
languages/sponsors-carousel-ru_RU.mo (modified) (previous)
-
languages/sponsors-carousel-ru_RU.po (modified) (2 diffs)
-
languages/sponsors-carousel-uk.mo (modified) (previous)
-
languages/sponsors-carousel-uk.po (modified) (1 diff)
-
languages/sponsors-carousel.pot (modified) (2 diffs)
-
readme.txt (modified) (2 diffs)
-
sponsors-carousel.php (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
sponsors-carousel/trunk/js/sponsors-carousel-admin.js
r1791978 r1848632 1 jQuery(document).ready( function($) {2 $.sponsorsCarousel = {3 uploader:false,4 editor:false,5 };1 jQuery(document).ready( function( $ ) { 2 $.sponsorsCarousel = { 3 uploader:false, 4 editor:false, 5 }; 6 6 7 jQuery.sponsorsCarousel.selectImages = function() {8 if ($.sponsorsCarousel.uploader) {9 $.sponsorsCarousel.uploader.open();10 return;11 }12 $.sponsorsCarousel.uploader = wp.media({13 title: $.sponsorsCarousel.i18("Choose Images"),14 button: {15 text: $.sponsorsCarousel.i18("Insert in Carousel")16 },17 library: { type: 'image' },18 multiple: true19 });20 $.sponsorsCarousel.uploader.on('select', function() {21 $.sponsorsCarousel.addImages($.sponsorsCarousel.uploader.state().get('selection').toJSON());22 });23 $.sponsorsCarousel.uploader.open();24 return false;25 };7 jQuery.sponsorsCarousel.selectImages = function() { 8 if ( $.sponsorsCarousel.uploader ) { 9 $.sponsorsCarousel.uploader.open(); 10 return; 11 } 12 $.sponsorsCarousel.uploader = wp.media( { 13 title: $.sponsorsCarousel.i18( "Choose Images" ), 14 button: { 15 text: $.sponsorsCarousel.i18( "Insert in Carousel" ) 16 }, 17 library: { type: 'image' }, 18 multiple: true 19 }); 20 $.sponsorsCarousel.uploader.on( 'select', function() { 21 $.sponsorsCarousel.addImages( $.sponsorsCarousel.uploader.state().get( 'selection' ).toJSON() ); 22 }); 23 $.sponsorsCarousel.uploader.open(); 24 return false; 25 }; 26 26 27 $.sponsorsCarousel.addImages = function(images) {28 $.each(images, function(i, e) {29 var id = e.id + '';30 console.log(e.sizes); 31 if (typeof e.sizes.thumbnail != 'undefined') 32 $.sponsorsCarouselImages.push({id:id, link:e.caption, src:e.sizes.thumbnail.url}); 33 else 34 $.sponsorsCarouselImages.push({id:id, link:e.caption, src:e.sizes.full.url}); 35 });36 $.sponsorsCarousel.showImages();37 };27 $.sponsorsCarousel.addImages = function( images ) { 28 $.each( images, function( i, e ) { 29 var id = e.id + ''; 30 if ( typeof e.sizes.thumbnail != 'undefined' ) { 31 $.sponsorsCarouselImages.push( {id:id, link:e.caption, src:e.sizes.thumbnail.url} ); 32 } else { 33 $.sponsorsCarouselImages.push( {id:id, link:e.caption, src:e.sizes.full.url} ); 34 } 35 }); 36 $.sponsorsCarousel.showImages(); 37 }; 38 38 39 $.sponsorsCarousel.showImages = function() { 40 var out = ''; 41 if ($.sponsorsCarouselImages.length == 0) return; 42 $.each($.sponsorsCarouselImages, function(i, e) { 43 out += '<div class="sponsors_carousel_image" data-id="' + e.id + '">'; 44 out += '<img src="' + e.src + '">'; 45 out += '<div class="sponsors_carousel_link_edit">'; 46 out += '<div class="sponsors_carousel_link_edit_label">' + $.sponsorsCarousel.i18("Custom link:") + '</div>'; 47 out += '<input onchange="jQuery.sponsorsCarousel.changeLink(' + e.id + ', jQuery(this).val())" value="' + e.link + '">'; 48 out += '</div>'; 49 out += '<div class="sponsors_carousel_image_delete dashicons dashicons-dismiss" onclick="jQuery.sponsorsCarousel .deleteImg(this)"></div>'; 50 out += '</div>'; 51 }); 52 $('.sponsors_carousel_images').html(out); 53 $.sponsorsCarousel.imagesToField(); 54 $( ".sponsors_carousel_images" ).sortable({ 55 stop: function( event, ui ) { 56 $.sponsorsCarousel.imagesToField(); 57 } 58 }); 59 $( ".sponsors_carousel_images" ).disableSelection(); 60 }; 39 $.sponsorsCarousel.showImages = function() { 40 var out = ''; 41 if ( $.sponsorsCarouselImages.length == 0 ) { 42 return; 43 } 44 $.each( $.sponsorsCarouselImages, function( i, e ) { 45 out += '<div class="sponsors_carousel_image" data-id="' + e.id + '">'; 46 out += '<img src="' + e.src + '">'; 47 out += '<div class="sponsors_carousel_link_edit">'; 48 out += '<div class="sponsors_carousel_link_edit_label">' + $.sponsorsCarousel.i18( "Custom link:" ) + '</div>'; 49 out += '<input onchange="jQuery.sponsorsCarousel.changeLink( ' + e.id + ', jQuery( this ).val() )" value="' + e.link + '">'; 50 out += '</div>'; 51 out += '<div class="sponsors_carousel_image_delete dashicons dashicons-dismiss" onclick="jQuery.sponsorsCarousel .deleteImg( this )"></div>'; 52 out += '</div>'; 53 }); 54 $('.sponsors_carousel_images').html( out ); 55 $.sponsorsCarousel.imagesToField(); 56 $( ".sponsors_carousel_images" ).sortable({ 57 stop: function( event, ui ) { 58 $.sponsorsCarousel.imagesToField(); 59 } 60 }); 61 $( ".sponsors_carousel_images" ).disableSelection(); 62 }; 61 63 62 $.sponsorsCarousel.changeLink = function(id, link) { 63 var data = { 64 action: 'sponsors_carousel_change_link', 65 image_id: id, 66 link:link 67 }; 68 jQuery.post( ajaxurl, data, function(response) { 69 console.log(response); 70 }); 71 }; 64 $.sponsorsCarousel.changeLink = function( id, link ) { 65 var data = { 66 action: 'sponsors_carousel_change_link', 67 image_id: id, 68 link:link 69 }; 70 jQuery.post( ajaxurl, data, function( response ) { 72 71 73 $.sponsorsCarousel.imagesToField = function() { 74 var ids = []; 75 var old = JSON.parse(JSON.stringify($.sponsorsCarouselImages)); 76 $.sponsorsCarouselImages = []; 77 $(".sponsors_carousel_image").each(function(i, e) { 78 var id = $(e).data('id'); 79 if(id) { 80 ids.push(id); 81 var data = {}; 82 $.each(old, function(i, e) { 83 if (e.id == id) data = e; 84 }); 85 $.sponsorsCarouselImages.push(data); 86 } 87 }); 88 $('.sponsors-carousel_images_field').val(ids.join(',')); 89 }; 72 }); 73 }; 90 74 91 $.sponsorsCarousel.deleteImg = function(obj) { 92 $(obj).parent().remove(); 93 $.sponsorsCarousel.imagesToField(); 94 }; 75 $.sponsorsCarousel.imagesToField = function() { 76 var ids = []; 77 var old = JSON.parse( JSON.stringify( $.sponsorsCarouselImages ) ); 78 $.sponsorsCarouselImages = []; 79 $( ".sponsors_carousel_image" ).each( function( i, e ) { 80 var id = $( e ).data( 'id' ); 81 if ( id ) { 82 ids.push( id ); 83 var data = {}; 84 $.each( old, function( i, e ) { 85 if ( e.id == id ) { 86 data = e; 87 } 88 }); 89 $.sponsorsCarouselImages.push( data ); 90 } 91 }); 92 $('.sponsors-carousel_images_field').val( ids.join( ',' ) ); 93 }; 95 94 96 $.sponsorsCarousel.deleteCarousel = function(id, question) { 97 if (id > 0 && confirm(question)) { 98 window.location.href = window.location.href + '&delete=' + id; 99 } 100 return false; 101 }; 95 $.sponsorsCarousel.deleteImg = function( obj ) { 96 $( obj ).parent().remove(); 97 $.sponsorsCarousel.imagesToField(); 98 }; 102 99 103 $.sponsorsCarousel.i18 = function(s) { 104 return (typeof $.sponsorsCarouselI18[s] != 'undefined') ? $.sponsorsCarouselI18[s] : s 105 }; 100 $.sponsorsCarousel.deleteCarousel = function( id, question ) { 101 if ( id > 0 && confirm( question ) ) { 102 window.location.href = window.location.href + '&delete=' + id; 103 } 104 return false; 105 }; 106 107 $.sponsorsCarousel.i18 = function( s ) { 108 return ( typeof $.sponsorsCarouselI18[s] != 'undefined' ) ? $.sponsorsCarouselI18[ s ] : s 109 }; 106 110 107 111 }); -
sponsors-carousel/trunk/js/sponsors-carousel.js
r1833978 r1848632 1 jQuery(document).ready(function($) { 2 $.sponsorsCarousel = {list:{}}; 3 $('.sponsors_carousel').each(function(i,e) { 4 var id = parseInt($(e).data('id')); 5 var speed = parseInt($(e).data('speed')); 6 $.sponsorsCarousel.list[id] = $(e); 7 $(e).jcarousel({ 8 wrap: 'circular', 9 animation: { 10 duration: speed 11 } 12 }); 13 var autoscroll = parseInt($(e).data('autoscroll')); 14 var scrollamount = parseInt($(e).data('scrollamount')); 15 if (autoscroll > 0 ) { 16 $(e).jcarouselAutoscroll({ 17 interval: autoscroll*1000, 18 target: ('+=' + scrollamount) 19 }); 20 $(e).mouseenter(function (e) { $(this).jcarouselAutoscroll('stop'); }); 21 $(e).mouseleave(function (e) { $(this).jcarouselAutoscroll('start'); }); 22 } 23 $(e).find('img').bind("contextmenu", function (e) { e.preventDefault(); }); 24 $(e).find('img').attr('draggable', false); 25 }); 1 jQuery( document ).ready( function( $ ) { 2 $.sponsorsCarousel = { list: {} }; 3 $( '.sponsors_carousel' ).each( function( i, e ) { 4 var id = parseInt( $( e ).data( 'id' ) ); 5 var speed = parseInt( $( e ).data( 'speed' ) ); 6 $.sponsorsCarousel.list[ id ] = $( e ); 7 $( e ).jcarousel( { 8 wrap: 'circular', 9 animation: { 10 duration: speed 11 } 12 } ); 13 var autoscroll = parseInt( $( e ).data( 'autoscroll' ) ); 14 var scrollamount = parseInt( $( e ).data( 'scrollamount' ) ); 15 if ( autoscroll > 0 ) { 16 $( e ).jcarouselAutoscroll( { 17 interval: autoscroll*1000, 18 target: ( '+=' + scrollamount ) 19 } ); 20 $( e ).mouseenter(function( e ) { $( this ).jcarouselAutoscroll( 'stop' ); } ); 21 $( e ).mouseleave(function( e ) { $( this ).jcarouselAutoscroll( 'start' ); } ); 22 } 23 $(e).find( 'img' ).bind( "contextmenu", function( e ) { e.preventDefault(); } ); 24 $(e).find( 'img' ).attr( 'draggable', false ); 26 25 27 $.sponsorsCarousel.move = function(id, move) { 28 $.sponsorsCarousel.list[id].jcarousel('scroll', move); 29 return false; 30 } 26 } ); 31 27 32 28 $.sponsorsCarousel.move = function( id, move ) { 29 $.sponsorsCarousel.list[ id ].jcarousel( 'scroll', move ); 30 return false; 31 } 33 32 }); -
sponsors-carousel/trunk/languages/sponsors-carousel-ru_RU.po
r1791978 r1848632 3 3 "Project-Id-Version: Sponsors carousel 3\n" 4 4 "Report-Msgid-Bugs-To: http://wordpress.org/tag/sponsors-carousel\n" 5 "POT-Creation-Date: 201 7-12-23 16:45+0200\n"5 "POT-Creation-Date: 2018-03-28 17:37+0300\n" 6 6 "PO-Revision-Date: \n" 7 7 "Last-Translator: Sergey Panasenko <[email protected]>\n" … … 12 12 "Content-Transfer-Encoding: 8bit\n" 13 13 "X-Generator: Poedit 1.8.7.1\n" 14 "Plural-Forms: nplurals=3; plural=(n%10==1 && n%100!=11 ? 0 : n%10>=2 && n%10<=4 && (n%100<10 || n%100>=20) ? 1 : 2);\n" 14 "Plural-Forms: nplurals=3; plural=(n%10==1 && n%100!=11 ? 0 : n%10>=2 && n" 15 "%10<=4 && (n%100<10 || n%100>=20) ? 1 : 2);\n" 15 16 16 #: SponsorsCarouselClass.php:11517 #: class-sponsors-carousel.php:115 17 18 msgid "Shortcode:" 18 19 msgstr "Короткий код;" 19 20 20 #: SponsorsCarouselClass.php:11821 #: class-sponsors-carousel.php:118 21 22 #, php-format 22 23 msgid "Also you can use %1$s for show this carousel." 23 24 msgstr "Вы также можете использовать %1$s для отображения карусели." 24 25 25 #: SponsorsCarouselClass.php:12226 #: class-sponsors-carousel.php:122 26 27 msgid "Speed:" 27 28 msgstr "Скорость:" 28 29 29 #: SponsorsCarouselClass.php:12530 #: class-sponsors-carousel.php:125 30 31 msgid "The speed of the animation. 0 is instant, 10000 is very slow." 31 32 msgstr "Скорость анимации. 0 сразу, 10000 - очень медленно." 32 33 33 #: SponsorsCarouselClass.php:12934 #: class-sponsors-carousel.php:129 34 35 msgid "Scroll Amount:" 35 36 msgstr "Число прокручивающихся:" 36 37 37 #: SponsorsCarouselClass.php:13238 #: class-sponsors-carousel.php:132 38 39 msgid "How many images should be scrolled in one step" 39 40 msgstr "Как много изображений прокручивать за один раз" 40 41 41 #: SponsorsCarouselClass.php:13642 #: class-sponsors-carousel.php:136 42 43 msgid "Auto scroll:" 43 44 msgstr "Автоматическая прокрутка:" 44 45 45 #: SponsorsCarouselClass.php:13946 #: class-sponsors-carousel.php:139 46 47 msgid "Off" 47 48 msgstr "Выключена" 48 49 49 #: SponsorsCarouselClass.php:14050 #: class-sponsors-carousel.php:140 50 51 msgid "Continuous" 51 52 msgstr "Непрерывно" 52 53 53 #: SponsorsCarouselClass.php:14154 #: class-sponsors-carousel.php:141 54 55 msgid "Fast" 55 56 msgstr "Быстрая" 56 57 57 #: SponsorsCarouselClass.php:14258 #: class-sponsors-carousel.php:142 58 59 msgid "Medium" 59 60 msgstr "Средняя" 60 61 61 #: SponsorsCarouselClass.php:14362 #: class-sponsors-carousel.php:143 62 63 msgid "Slow" 63 64 msgstr "Медленная" 64 65 65 #: SponsorsCarouselClass.php:14866 #: class-sponsors-carousel.php:148 66 67 msgid "Width of Image:" 67 68 msgstr "Ширина изображения:" 68 69 69 #: SponsorsCarouselClass.php:15470 #: class-sponsors-carousel.php:154 70 71 msgid "Height of Image:" 71 72 msgstr "Высота изображения:" 72 73 73 #: SponsorsCarouselClass.php:16074 #: class-sponsors-carousel.php:160 74 75 msgid "Width of Carousel:" 75 76 msgstr "Ширина карусели:" 76 77 77 #: SponsorsCarouselClass.php:16678 #: class-sponsors-carousel.php:166 78 79 msgid "Distance between images:" 79 80 msgstr "Расстояние между изображениями:" 80 81 81 #: SponsorsCarouselClass.php:17282 #: class-sponsors-carousel.php:172 82 83 msgid "Show titles for images:" 83 84 msgstr "Отображать заголовки изображений:" 84 85 85 #: SponsorsCarouselClass.php:175 SponsorsCarouselClass.php:18486 #: class-sponsors-carousel.php:175 class-sponsors-carousel.php:184 86 87 msgid "No" 87 88 msgstr "Нет" 88 89 89 #: SponsorsCarouselClass.php:176 SponsorsCarouselClass.php:18590 #: class-sponsors-carousel.php:176 class-sponsors-carousel.php:185 90 91 msgid "Yes" 91 92 msgstr "Да" 92 93 93 #: SponsorsCarouselClass.php:18194 #: class-sponsors-carousel.php:181 94 95 msgid "Show controls:" 95 96 msgstr "Показывать стрелки:" 96 97 97 #: SponsorsCarouselClass.php:19098 #: class-sponsors-carousel.php:190 98 99 msgid "Open in new window:" 99 100 msgstr "Открыть в новом окне:" 100 101 101 #: SponsorsCarouselClass.php:193102 #: class-sponsors-carousel.php:193 102 103 msgid "No, open in same window" 103 104 msgstr "Нет, открыть в том же окне" 104 105 105 #: SponsorsCarouselClass.php:194106 #: class-sponsors-carousel.php:194 106 107 msgid "Yes, open in new window" 107 108 msgstr "Да, открыть в новом окне" 108 109 109 #: SponsorsCarouselClass.php:199110 #: class-sponsors-carousel.php:199 110 111 msgid "Default link:" 111 112 msgstr "Ссылка по-умолчанию:" 112 113 113 #: SponsorsCarouselClass.php:209114 #: class-sponsors-carousel.php:209 114 115 msgid "Add images" 115 116 msgstr "Добавить изображения" 116 117 117 #: SponsorsCarouselClass.php:210118 #: class-sponsors-carousel.php:210 118 119 msgid "Save Changes" 119 120 msgstr "Сохранить изменения" 120 121 121 #: SponsorsCarouselClass.php:213122 #: class-sponsors-carousel.php:213 122 123 msgid "Delete carousel" 123 124 msgstr "Удалить карусель" 124 125 125 #: SponsorsCarouselClass.php:213126 #: class-sponsors-carousel.php:213 126 127 msgid "Are you sure?" 127 128 msgstr "Вы уверены?" 128 129 129 #: SponsorsCarouselClass.php:322130 #: class-sponsors-carousel.php:322 130 131 msgid "Choose Images" 131 132 msgstr "Выбрать изображения" 132 133 133 #: SponsorsCarouselClass.php:323134 #: class-sponsors-carousel.php:323 134 135 msgid "Insert in Carousel" 135 136 msgstr "Добавить в карусель" 136 137 137 #: SponsorsCarouselClass.php:324138 #: class-sponsors-carousel.php:324 138 139 msgid "Custom link:" 139 140 msgstr "Ссылка для этого изображения:" 140 141 141 #: sponsors-carousel.php: 29142 #: sponsors-carousel.php:31 142 143 msgid "Sponsors Carousel" 143 144 msgstr "Карусель спонсоров" 144 145 145 #: sponsors-carousel.php: 78146 #: sponsors-carousel.php:80 146 147 msgid "Options updated" 147 148 msgstr "Параметры сохранены" 148 149 149 #: sponsors-carousel.php: 88150 #: sponsors-carousel.php:90 150 151 #, php-format 151 152 msgid "%s Settings" -
sponsors-carousel/trunk/languages/sponsors-carousel-uk.po
r1792009 r1848632 5 5 "Project-Id-Version: Sponsors Carousel 3\n" 6 6 "Report-Msgid-Bugs-To: http://wordpress.org/tag/sponsors-carousel\n" 7 "POT-Creation-Date: 2017-12-23 18:25+0200\n" 7 "POT-Creation-Date: 2018-03-28 17:38+0300\n" 8 "PO-Revision-Date: 2018-03-28 17:38+0300\n" 9 "Last-Translator: Sergey Panasenko <[email protected]>\n" 10 "Language-Team: \n" 11 "Language: uk\n" 8 12 "MIME-Version: 1.0\n" 9 13 "Content-Type: text/plain; charset=UTF-8\n" 10 14 "Content-Transfer-Encoding: 8bit\n" 11 "PO-Revision-Date: 2017-12-23 18:40+0200\n"12 "Language-Team: \n"13 15 "X-Generator: Poedit 1.8.7.1\n" 14 16 "X-Poedit-KeywordsList: __\n" 15 17 "X-Poedit-Basepath: ..\n" 16 "Last-Translator: Sergey Panasenko <[email protected]>\n" 17 "Plural-Forms: nplurals=3; plural=(n%10==1 && n%100!=11 ? 0 : n%10>=2 && n%10<=4 && (n%100<10 || n%100>=20) ? 1 : 2);\n" 18 "Language: uk\n" 18 "Plural-Forms: nplurals=3; plural=(n%10==1 && n%100!=11 ? 0 : n%10>=2 && n" 19 "%10<=4 && (n%100<10 || n%100>=20) ? 1 : 2);\n" 19 20 "X-Poedit-SearchPath-0: sponsors-carousel.php\n" 20 21 "X-Poedit-SearchPath-1: SponsorsCarouselClass.php\n" 21 22 22 #: SponsorsCarouselClass.php:11523 #: class-sponsors-carousel.php:115 23 24 msgid "Shortcode:" 24 25 msgstr "Короткий код:" 25 26 26 #: SponsorsCarouselClass.php:11827 #: class-sponsors-carousel.php:118 27 28 #, php-format 28 29 msgid "Also you can use %1$s for show this carousel." 29 30 msgstr "Також ви можете використовувати %1$s для показу цієї каруселі." 30 31 31 #: SponsorsCarouselClass.php:12232 #: class-sponsors-carousel.php:122 32 33 msgid "Speed:" 33 34 msgstr "Швидкість:" 34 35 35 #: SponsorsCarouselClass.php:12536 #: class-sponsors-carousel.php:125 36 37 msgid "The speed of the animation. 0 is instant, 10000 is very slow." 37 38 msgstr "Швидкість анімації. 0 миттєвий, 10000 дуже повільний." 38 39 39 #: SponsorsCarouselClass.php:12940 #: class-sponsors-carousel.php:129 40 41 msgid "Scroll Amount:" 41 42 msgstr "Кількість прокрутки:" 42 43 43 #: SponsorsCarouselClass.php:13244 #: class-sponsors-carousel.php:132 44 45 msgid "How many images should be scrolled in one step" 45 46 msgstr "Скількі зображень буде прокручено за один крок." 46 47 47 #: SponsorsCarouselClass.php:13648 #: class-sponsors-carousel.php:136 48 49 msgid "Auto scroll:" 49 50 msgstr "Автоматична прокрутка:" 50 51 51 #: SponsorsCarouselClass.php:13952 #: class-sponsors-carousel.php:139 52 53 msgid "Off" 53 54 msgstr "Вимкнено" 54 55 55 #: SponsorsCarouselClass.php:14056 #: class-sponsors-carousel.php:140 56 57 msgid "Continuous" 57 58 msgstr "Бесперервно" 58 59 59 #: SponsorsCarouselClass.php:14160 #: class-sponsors-carousel.php:141 60 61 msgid "Fast" 61 62 msgstr "Швидко" 62 63 63 #: SponsorsCarouselClass.php:14264 #: class-sponsors-carousel.php:142 64 65 msgid "Medium" 65 66 msgstr "Середньої швидкості" 66 67 67 #: SponsorsCarouselClass.php:14368 #: class-sponsors-carousel.php:143 68 69 msgid "Slow" 69 70 msgstr "Повільна" 70 71 71 #: SponsorsCarouselClass.php:14872 #: class-sponsors-carousel.php:148 72 73 msgid "Width of Image:" 73 74 msgstr "Ширина зображення:" 74 75 75 #: SponsorsCarouselClass.php:15476 #: class-sponsors-carousel.php:154 76 77 msgid "Height of Image:" 77 78 msgstr "Висота зображення:" 78 79 79 #: SponsorsCarouselClass.php:16080 #: class-sponsors-carousel.php:160 80 81 msgid "Width of Carousel:" 81 82 msgstr "Ширина каруселі:" 82 83 83 #: SponsorsCarouselClass.php:16684 #: class-sponsors-carousel.php:166 84 85 msgid "Distance between images:" 85 86 msgstr "Відстань між зображеннями:" 86 87 87 #: SponsorsCarouselClass.php:17288 #: class-sponsors-carousel.php:172 88 89 msgid "Show titles for images:" 89 90 msgstr "Показати назви для зображень:" 90 91 91 #: SponsorsCarouselClass.php:175 SponsorsCarouselClass.php:18492 #: class-sponsors-carousel.php:175 class-sponsors-carousel.php:184 92 93 msgid "No" 93 94 msgstr "Ні" 94 95 95 #: SponsorsCarouselClass.php:176 SponsorsCarouselClass.php:18596 #: class-sponsors-carousel.php:176 class-sponsors-carousel.php:185 96 97 msgid "Yes" 97 98 msgstr "Так" 98 99 99 #: SponsorsCarouselClass.php:181100 #: class-sponsors-carousel.php:181 100 101 msgid "Show controls:" 101 102 msgstr "Показати елементи управління:" 102 103 103 #: SponsorsCarouselClass.php:190104 #: class-sponsors-carousel.php:190 104 105 msgid "Open in new window:" 105 106 msgstr "Відкрити в новому вікні:" 106 107 107 #: SponsorsCarouselClass.php:193108 #: class-sponsors-carousel.php:193 108 109 msgid "No, open in same window" 109 110 msgstr "Ні, у тому ж вікні" 110 111 111 #: SponsorsCarouselClass.php:194112 #: class-sponsors-carousel.php:194 112 113 msgid "Yes, open in new window" 113 114 msgstr "Так, у новому вікні" 114 115 115 #: SponsorsCarouselClass.php:199116 #: class-sponsors-carousel.php:199 116 117 msgid "Default link:" 117 118 msgstr "Посилання за замовченням:" 118 119 119 #: SponsorsCarouselClass.php:209120 #: class-sponsors-carousel.php:209 120 121 msgid "Add images" 121 122 msgstr "Додати зображення" 122 123 123 #: SponsorsCarouselClass.php:210124 #: class-sponsors-carousel.php:210 124 125 msgid "Save Changes" 125 126 msgstr "Зберегти зміни" 126 127 127 #: SponsorsCarouselClass.php:213128 #: class-sponsors-carousel.php:213 128 129 msgid "Delete carousel" 129 130 msgstr "Видалити карусель" 130 131 131 #: SponsorsCarouselClass.php:213132 #: class-sponsors-carousel.php:213 132 133 msgid "Are you sure?" 133 134 msgstr "Ви впевнені?" 134 135 135 #: SponsorsCarouselClass.php:322136 #: class-sponsors-carousel.php:322 136 137 msgid "Choose Images" 137 138 msgstr "Обрати зображення" 138 139 139 #: SponsorsCarouselClass.php:323140 #: class-sponsors-carousel.php:323 140 141 msgid "Insert in Carousel" 141 142 msgstr "Додати у карусель" 142 143 143 #: SponsorsCarouselClass.php:324144 #: class-sponsors-carousel.php:324 144 145 msgid "Custom link:" 145 146 msgstr "Окреме посилання:" 146 147 147 #: sponsors-carousel.php: 29148 #: sponsors-carousel.php:31 148 149 msgid "Sponsors Carousel" 149 150 msgstr "Карусель Спонсорів" 150 151 151 #: sponsors-carousel.php: 78152 #: sponsors-carousel.php:80 152 153 msgid "Options updated" 153 154 msgstr "Параметри оновлені" 154 155 155 #: sponsors-carousel.php: 88156 #: sponsors-carousel.php:90 156 157 #, php-format 157 158 msgid "%s Settings" -
sponsors-carousel/trunk/languages/sponsors-carousel.pot
r1791978 r1848632 6 6 "Project-Id-Version: Sponsors Carousel 3\n" 7 7 "Report-Msgid-Bugs-To: http://wordpress.org/tag/sponsors-carousel\n" 8 "POT-Creation-Date: 201 7-12-23 16:43+0200\n"8 "POT-Creation-Date: 2018-03-28 17:37+0300\n" 9 9 "MIME-Version: 1.0\n" 10 10 "Content-Type: text/plain; charset=UTF-8\n" … … 17 17 "X-Poedit-Basepath: ..\n" 18 18 "X-Poedit-SearchPath-0: sponsors-carousel.php\n" 19 "X-Poedit-SearchPath-1: SponsorsCarouselClass.php\n"19 "X-Poedit-SearchPath-1: class-sponsors-carousel.php\n" 20 20 21 #: SponsorsCarouselClass.php:11521 #: class-sponsors-carousel.php:115 22 22 msgid "Shortcode:" 23 23 msgstr "" 24 24 25 #: SponsorsCarouselClass.php:11825 #: class-sponsors-carousel.php:118 26 26 #, php-format 27 27 msgid "Also you can use %1$s for show this carousel." 28 28 msgstr "" 29 29 30 #: SponsorsCarouselClass.php:12230 #: class-sponsors-carousel.php:122 31 31 msgid "Speed:" 32 32 msgstr "" 33 33 34 #: SponsorsCarouselClass.php:12534 #: class-sponsors-carousel.php:125 35 35 msgid "The speed of the animation. 0 is instant, 10000 is very slow." 36 36 msgstr "" 37 37 38 #: SponsorsCarouselClass.php:12938 #: class-sponsors-carousel.php:129 39 39 msgid "Scroll Amount:" 40 40 msgstr "" 41 41 42 #: SponsorsCarouselClass.php:13242 #: class-sponsors-carousel.php:132 43 43 msgid "How many images should be scrolled in one step" 44 44 msgstr "" 45 45 46 #: SponsorsCarouselClass.php:13646 #: class-sponsors-carousel.php:136 47 47 msgid "Auto scroll:" 48 48 msgstr "" 49 49 50 #: SponsorsCarouselClass.php:13950 #: class-sponsors-carousel.php:139 51 51 msgid "Off" 52 52 msgstr "" 53 53 54 #: SponsorsCarouselClass.php:14054 #: class-sponsors-carousel.php:140 55 55 msgid "Continuous" 56 56 msgstr "" 57 57 58 #: SponsorsCarouselClass.php:14158 #: class-sponsors-carousel.php:141 59 59 msgid "Fast" 60 60 msgstr "" 61 61 62 #: SponsorsCarouselClass.php:14262 #: class-sponsors-carousel.php:142 63 63 msgid "Medium" 64 64 msgstr "" 65 65 66 #: SponsorsCarouselClass.php:14366 #: class-sponsors-carousel.php:143 67 67 msgid "Slow" 68 68 msgstr "" 69 69 70 #: SponsorsCarouselClass.php:14870 #: class-sponsors-carousel.php:148 71 71 msgid "Width of Image:" 72 72 msgstr "" 73 73 74 #: SponsorsCarouselClass.php:15474 #: class-sponsors-carousel.php:154 75 75 msgid "Height of Image:" 76 76 msgstr "" 77 77 78 #: SponsorsCarouselClass.php:16078 #: class-sponsors-carousel.php:160 79 79 msgid "Width of Carousel:" 80 80 msgstr "" 81 81 82 #: SponsorsCarouselClass.php:16682 #: class-sponsors-carousel.php:166 83 83 msgid "Distance between images:" 84 84 msgstr "" 85 85 86 #: SponsorsCarouselClass.php:17286 #: class-sponsors-carousel.php:172 87 87 msgid "Show titles for images:" 88 88 msgstr "" 89 89 90 #: SponsorsCarouselClass.php:175 SponsorsCarouselClass.php:18490 #: class-sponsors-carousel.php:175 class-sponsors-carousel.php:184 91 91 msgid "No" 92 92 msgstr "" 93 93 94 #: SponsorsCarouselClass.php:176 SponsorsCarouselClass.php:18594 #: class-sponsors-carousel.php:176 class-sponsors-carousel.php:185 95 95 msgid "Yes" 96 96 msgstr "" 97 97 98 #: SponsorsCarouselClass.php:18198 #: class-sponsors-carousel.php:181 99 99 msgid "Show controls:" 100 100 msgstr "" 101 101 102 #: SponsorsCarouselClass.php:190102 #: class-sponsors-carousel.php:190 103 103 msgid "Open in new window:" 104 104 msgstr "" 105 105 106 #: SponsorsCarouselClass.php:193106 #: class-sponsors-carousel.php:193 107 107 msgid "No, open in same window" 108 108 msgstr "" 109 109 110 #: SponsorsCarouselClass.php:194110 #: class-sponsors-carousel.php:194 111 111 msgid "Yes, open in new window" 112 112 msgstr "" 113 113 114 #: SponsorsCarouselClass.php:199114 #: class-sponsors-carousel.php:199 115 115 msgid "Default link:" 116 116 msgstr "" 117 117 118 #: SponsorsCarouselClass.php:209118 #: class-sponsors-carousel.php:209 119 119 msgid "Add images" 120 120 msgstr "" 121 121 122 #: SponsorsCarouselClass.php:210122 #: class-sponsors-carousel.php:210 123 123 msgid "Save Changes" 124 124 msgstr "" 125 125 126 #: SponsorsCarouselClass.php:213126 #: class-sponsors-carousel.php:213 127 127 msgid "Delete carousel" 128 128 msgstr "" 129 129 130 #: SponsorsCarouselClass.php:213130 #: class-sponsors-carousel.php:213 131 131 msgid "Are you sure?" 132 132 msgstr "" 133 133 134 #: SponsorsCarouselClass.php:322134 #: class-sponsors-carousel.php:322 135 135 msgid "Choose Images" 136 136 msgstr "" 137 137 138 #: SponsorsCarouselClass.php:323138 #: class-sponsors-carousel.php:323 139 139 msgid "Insert in Carousel" 140 140 msgstr "" 141 141 142 #: SponsorsCarouselClass.php:324142 #: class-sponsors-carousel.php:324 143 143 msgid "Custom link:" 144 144 msgstr "" 145 145 146 #: sponsors-carousel.php: 29146 #: sponsors-carousel.php:31 147 147 msgid "Sponsors Carousel" 148 148 msgstr "" 149 149 150 #: sponsors-carousel.php: 78150 #: sponsors-carousel.php:80 151 151 msgid "Options updated" 152 152 msgstr "" 153 153 154 #: sponsors-carousel.php: 88154 #: sponsors-carousel.php:90 155 155 #, php-format 156 156 msgid "%s Settings" -
sponsors-carousel/trunk/readme.txt
r1835522 r1848632 5 5 Requires at least: 4.6 6 6 Requires PHP: 5.2 7 Tested up to: 4.9. 17 Tested up to: 4.9.4 8 8 Stable tag: trunk 9 9 … … 61 61 * 3.00: added possibility to make some carousels, added resize images from admin area, new version of jCarousel 62 62 * 3.01: made carousel to stop on hover, thanks dadi2404 63 * 3.02: fix bug, brought into line with the Coding Standards -
sponsors-carousel/trunk/sponsors-carousel.php
r1833978 r1848632 4 4 * Plugin URI: http://wordpress.org/extend/plugins/sponsors-carousel 5 5 * Description: Sponsors logos on javascript carousel. 6 * Version: 3.0 16 * Version: 3.02 7 7 * Author: Sergey Panasenko <[email protected]> 8 8 * Text Domain: sponsors-carousel … … 12 12 /* Copyright 2017 Sergey Panasenko (email: [email protected]) 13 13 14 This program is free software; you can redistribute it and/or modify15 it under the terms of the GNU General Public License as published by16 the Free Software Foundation; either version 2 of the License, or17 (at your option) any later version.14 This program is free software; you can redistribute it and/or modify 15 it under the terms of the GNU General Public License as published by 16 the Free Software Foundation; either version 2 of the License, or 17 (at your option) any later version. 18 18 19 This program is distributed in the hope that it will be useful,20 but WITHOUT ANY WARRANTY; without even the implied warranty of21 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the22 GNU General Public License for more details.19 This program is distributed in the hope that it will be useful, 20 but WITHOUT ANY WARRANTY; without even the implied warranty of 21 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 22 GNU General Public License for more details. 23 23 24 You should have received a copy of the GNU General Public License25 along with this program; if not, write to the Free Software26 Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA24 You should have received a copy of the GNU General Public License 25 along with this program; if not, write to the Free Software 26 Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA 27 27 */ 28 28 29 include_once(" SponsorsCarouselClass.php");29 include_once("class-sponsors-carousel.php"); 30 30 31 $scwp_plugin_name = __( "Sponsors Carousel", 'sponsors-carousel');32 $scwp_plugin_filename = basename( __FILE__); //"sponsors-carousel.php";33 load_plugin_textdomain( 'sponsors-carousel', NULL, dirname(plugin_basename(__FILE__))."/languages");31 $scwp_plugin_name = __( "Sponsors Carousel", 'sponsors-carousel' ); 32 $scwp_plugin_filename = basename( __FILE__ ); //"sponsors-carousel.php"; 33 load_plugin_textdomain( 'sponsors-carousel', NULL, dirname( plugin_basename( __FILE__ ) ) . "/languages" ); 34 34 35 add_shortcode( 'sponsors_carousel', function($arg) {36 return sponsors_carousel(isset($arg['id']) ? $arg['id'] : 0);35 add_shortcode( 'sponsors_carousel', function( $arg ) { 36 return sponsors_carousel( isset( $arg['id'] ) ? $arg['id'] : 0 ); 37 37 }); 38 38 39 add_action( 'wp_enqueue_scripts', function () {40 wp_enqueue_script('jcarousel', plugins_url('/js/jquery.jcarousel.min.js', __FILE__), ['jquery']);41 wp_enqueue_script('jcarousel-autoscroll', plugins_url('/js/jquery.jcarousel-autoscroll.min.js', __FILE__), ['jquery','jcarousel']);42 wp_enqueue_script('sponsors-carousel', plugins_url('/js/sponsors-carousel.js', __FILE__), ['jquery','jcarousel','jcarousel-autoscroll']);43 } );39 add_action( 'wp_enqueue_scripts', function () { 40 wp_enqueue_script( 'jcarousel', plugins_url( '/js/jquery.jcarousel.min.js', __FILE__ ), ['jquery']); 41 wp_enqueue_script( 'jcarousel-autoscroll', plugins_url( '/js/jquery.jcarousel-autoscroll.min.js', __FILE__ ), ['jquery','jcarousel'] ); 42 wp_enqueue_script( 'sponsors-carousel', plugins_url( '/js/sponsors-carousel.js', __FILE__ ), ['jquery','jcarousel','jcarousel-autoscroll'] ); 43 } ); 44 44 45 45 add_action('wp_print_styles', function () { 46 wp_enqueue_style('dashicons');47 wp_enqueue_style('sponsors-carousel', plugins_url('/css/sponsors-carousel.css', __FILE__));48 } );46 wp_enqueue_style( 'dashicons' ); 47 wp_enqueue_style( 'sponsors-carousel', plugins_url( '/css/sponsors-carousel.css', __FILE__ ) ); 48 } ); 49 49 50 add_action( 'admin_enqueue_scripts', function () {51 wp_enqueue_script('jquery-ui-core', ['jquery']);52 wp_enqueue_script('jquery-ui-sortable', ['jquery', 'jquery-ui-core']);53 wp_enqueue_script('sponsors-carousel-admin', plugins_url('/js/sponsors-carousel-admin.js', __FILE__), ['jquery', 'jquery-ui-core', 'jquery-ui-sortable']);54 wp_enqueue_style('sponsors-carousel-admin', plugins_url('/css/sponsors-carousel-admin.css', __FILE__));55 } );50 add_action( 'admin_enqueue_scripts', function () { 51 wp_enqueue_script( 'jquery-ui-core', ['jquery'] ); 52 wp_enqueue_script( 'jquery-ui-sortable', ['jquery', 'jquery-ui-core'] ); 53 wp_enqueue_script( 'sponsors-carousel-admin', plugins_url('/js/sponsors-carousel-admin.js', __FILE__ ), ['jquery', 'jquery-ui-core', 'jquery-ui-sortable'] ); 54 wp_enqueue_style( 'sponsors-carousel-admin', plugins_url('/css/sponsors-carousel-admin.css', __FILE__ ) ); 55 } ); 56 56 57 add_action( 'admin_menu', function () {58 global $scwp_plugin_name;59 wp_enqueue_media();60 add_menu_page($scwp_plugin_name, $scwp_plugin_name, 'manage_options', 'sponsors_carousel', 'scwp_options_page', 'dashicons-format-gallery', 55);61 } );57 add_action( 'admin_menu', function () { 58 global $scwp_plugin_name; 59 wp_enqueue_media(); 60 add_menu_page( $scwp_plugin_name, $scwp_plugin_name, 'manage_options', 'sponsors_carousel', 'scwp_options_page', 'dashicons-format-gallery', 55 ); 61 } ); 62 62 63 add_action('wp_ajax_sponsors_carousel_change_link', function () { 64 if (!is_admin()) die(); 65 $post = array( 66 'ID' => intval($_POST['image_id']), 67 'post_excerpt' => $_POST['link'], 68 ); 69 wp_update_post($post); 70 echo 'Saved'; 71 wp_die(); 72 }); 63 add_action( 'wp_ajax_sponsors_carousel_change_link', function () { 64 if ( is_admin() ) { 65 $post = array( 66 'ID' => intval($_POST['image_id']), 67 'post_excerpt' => $_POST['link'], 68 ); 69 wp_update_post( $post ); 70 echo 'Saved'; 71 } 72 wp_die(); 73 } ); 73 74 74 75 // Show options page 75 76 function scwp_options_page() { 76 77 77 if (isset($_POST['save'])) { // Update options78 $sponsors_carousel = new SponsorsCarousel($id);79 if ($sponsors_carousel->update($_POST)) {80 echo "<div class='updated fade'><p><strong>" . __('Options updated', 'sponsors-carousel') . "</strong></p></div>";81 }82 }78 if ( isset( $_POST['save'] ) ) { // Update options 79 $sponsors_carousel = new SponsorsCarousel( $id ); 80 if ( $sponsors_carousel->update( $_POST ) ) { 81 echo "<div class='updated fade'><p><strong>" . __( 'Options updated', 'sponsors-carousel' ) . "</strong></p></div>"; 82 } 83 } 83 84 84 if (isset($_GET['delete']) && isset($_GET['id']) && intval($_GET['id']) == intval($_GET['delete'])) { // Delete carousel85 echo SponsorsCarousel::delete(intval($_GET['delete']));86 die();87 }85 if ( isset( $_GET['delete'] ) && isset( $_GET['id'] ) && intval( $_GET['id'] ) == intval( $_GET['delete'] ) ) { // Delete carousel 86 echo SponsorsCarousel::delete( intval( $_GET['delete'] ) ); 87 die(); 88 } 88 89 89 global $scwp_plugin_name; 90 echo '<h2>' . sprintf(__('%s Settings', 'sponsors-carousel'), $scwp_plugin_name) . '</h2>'; 91 $id = isset($_REQUEST['id']) ? intval($_REQUEST['id']) : 0; 92 echo SponsorsCarousel::showButtons($id); 93 $option = get_option('sponsors-carousel-' . $id); 94 if ($option == false) $sponsors_carousel = new SponsorsCarousel($id); 95 else $sponsors_carousel = unserialize($option); 96 echo $sponsors_carousel->getForm(); 90 global $scwp_plugin_name; 91 echo '<h2>' . sprintf( __( '%s Settings', 'sponsors-carousel' ), $scwp_plugin_name ) . '</h2>'; 92 $id = isset( $_REQUEST['id'] ) ? intval( $_REQUEST['id'] ) : 0; 93 echo SponsorsCarousel::show_buttons( $id ); 94 $option = get_option( 'sponsors-carousel-' . $id ); 95 if ( false == $option ) { 96 $sponsors_carousel = new SponsorsCarousel( $id ); 97 } 98 else $sponsors_carousel = unserialize( $option ); 99 echo $sponsors_carousel->get_form(); 97 100 } 98 101 99 function sponsors_carousel($id = 0) { 100 $id = intval($id); 101 $option = get_option('sponsors-carousel-' . $id); 102 if ($option == false) return false; 103 $sponsors_carousel = unserialize($option); 104 return $sponsors_carousel->show(); 102 function sponsors_carousel( $id = 0 ) { 103 $id = intval( $id ); 104 $option = get_option( 'sponsors-carousel-' . $id ); 105 if ( false == $option ) { 106 return false; 107 } 108 $sponsors_carousel = unserialize( $option ); 109 return $sponsors_carousel->show(); 105 110 } 106 111
Note: See TracChangeset
for help on using the changeset viewer.