SEO Friendly Images - Version 3,0

Version Description

Download this release

Release Info

Developer freediver
Plugin Icon 128x128 SEO Friendly Images
Version 3,0
Comparing to
See all releases

Code changes from version 2.7.6 to 3,0

i/arrows.png ADDED
Binary file
i/icon.png ADDED
Binary file
i/logo.png ADDED
Binary file
i/mwp250_2.png ADDED
Binary file
i/seoimages125_v2.jpg ADDED
Binary file
i/seosmart125.png ADDED
Binary file
javascripts/jquery.colorbox-min.js ADDED
@@ -0,0 +1,6 @@
 
 
 
 
 
 
1
+ /*
2
+ jQuery ColorBox v1.3.32 - 2013-01-31
3
+ (c) 2013 Jack Moore - jacklmoore.com/colorbox
4
+ license: http://www.opensource.org/licenses/mit-license.php
5
+ */
6
+ (function(e,t,i){function o(i,o,n){var h=t.createElement(i);return o&&(h.id=U+o),n&&(h.style.cssText=n),e(h)}function n(e){var t=b.length,i=(A+e)%t;return 0>i?t+i:i}function h(e,t){return Math.round((/%/.test(e)?("x"===t?T.width():T.height())/100:1)*parseInt(e,10))}function l(e){return _.photo||/\.(gif|png|jp(e|g|eg)|bmp|ico)((#|\?).*)?$/i.test(e)}function r(){var t,i=e.data(N,J);null==i?(_=e.extend({},$),console&&console.log&&console.log("Error: cboxElement missing settings object")):_=e.extend({},i);for(t in _)e.isFunction(_[t])&&"on"!==t.slice(0,2)&&(_[t]=_[t].call(N));_.rel=_.rel||N.rel||e(N).data("rel")||"nofollow",_.href=_.href||e(N).attr("href"),_.title=_.title||N.title,"string"==typeof _.href&&(_.href=e.trim(_.href))}function s(i,o){e(t).trigger(i),rt.trigger(i),e.isFunction(o)&&o.call(N)}function a(){var e,t,i,o,n,h=U+"Slideshow_",l="click."+U;_.slideshow&&b[1]?(t=function(){clearTimeout(e)},i=function(){(_.loop||b[A+1])&&(e=setTimeout(G.next,_.slideshowSpeed))},o=function(){I.html(_.slideshowStop).unbind(l).one(l,n),rt.bind(et,i).bind(Z,t).bind(tt,n),p.removeClass(h+"off").addClass(h+"on")},n=function(){t(),rt.unbind(et,i).unbind(Z,t).unbind(tt,n),I.html(_.slideshowStart).unbind(l).one(l,function(){G.next(),o()}),p.removeClass(h+"on").addClass(h+"off")},_.slideshowAuto?o():n()):p.removeClass(h+"off "+h+"on")}function d(t){j||(N=t,r(),b=e(N),A=0,"nofollow"!==_.rel&&(b=e("."+V).filter(function(){var t,i=e.data(this,J);return i&&(t=e(this).data("rel")||i.rel||this.rel),t===_.rel}),A=b.index(N),-1===A&&(b=b.add(N),A=b.length-1)),P||(P=R=!0,p.css({visibility:"hidden",display:"block"}),C=o(st,"LoadedContent","width:0; height:0; overflow:hidden").appendTo(w),K=g.height()+x.height()+w.outerHeight(!0)-w.height(),z=y.width()+v.width()+w.outerWidth(!0)-w.width(),D=C.outerHeight(!0),B=C.outerWidth(!0),_.returnFocus&&(e(N).blur(),rt.one(it,function(){e(N).focus()})),f.css({opacity:parseFloat(_.opacity),cursor:_.overlayClose?"pointer":"auto",visibility:"visible"}).show(),_.w=h(_.initialWidth,"x"),_.h=h(_.initialHeight,"y"),G.position(),ht&&T.bind("resize."+lt+" scroll."+lt,function(){f.css({width:T.width(),height:T.height(),top:T.scrollTop(),left:T.scrollLeft()})}).trigger("resize."+lt),a(),s(Y,_.onOpen),S.add(H).hide(),F.html(_.close).show()),G.load(!0))}function c(){!p&&t.body&&(X=!1,T=e(i),p=o(st).attr({id:J,"class":nt?U+(ht?"IE6":"IE"):""}).hide(),f=o(st,"Overlay",ht?"position:absolute":"").hide(),W=o(st,"LoadingOverlay").add(o(st,"LoadingGraphic")),m=o(st,"Wrapper"),w=o(st,"Content").append(H=o(st,"Title"),E=o(st,"Current"),L=o(st,"Next"),M=o(st,"Previous"),I=o(st,"Slideshow"),F=o(st,"Close")),m.append(o(st).append(o(st,"TopLeft"),g=o(st,"TopCenter"),o(st,"TopRight")),o(st,!1,"clear:left").append(y=o(st,"MiddleLeft"),w,v=o(st,"MiddleRight")),o(st,!1,"clear:left").append(o(st,"BottomLeft"),x=o(st,"BottomCenter"),o(st,"BottomRight"))).find("div div").css({"float":"left"}),k=o(st,!1,"position:absolute; width:9999px; visibility:hidden; display:none"),S=L.add(M).add(E).add(I),e(t.body).append(f,p.append(m,k)))}function u(){function i(e){e.which>1||e.shiftKey||e.altKey||e.metaKey||(e.preventDefault(),d(this))}return p?(X||(X=!0,L.click(function(){G.next()}),M.click(function(){G.prev()}),F.click(function(){G.close()}),f.click(function(){_.overlayClose&&G.close()}),e(t).bind("keydown."+U,function(e){var t=e.keyCode;P&&_.escKey&&27===t&&(e.preventDefault(),G.close()),P&&_.arrowKey&&b[1]&&(37===t?(e.preventDefault(),M.click()):39===t&&(e.preventDefault(),L.click()))}),e.isFunction(e.fn.on)?e(t).on("click."+U,"."+V,i):e("."+V).live("click."+U,i)),!0):!1}var f,p,m,w,g,y,v,x,b,T,C,k,W,H,E,I,L,M,F,S,_,K,z,D,B,N,A,O,P,R,j,q,G,Q,X,$={transition:"elastic",speed:300,width:!1,initialWidth:"600",innerWidth:!1,maxWidth:!1,height:!1,initialHeight:"450",innerHeight:!1,maxHeight:!1,scalePhotos:!0,scrolling:!0,inline:!1,html:!1,iframe:!1,fastIframe:!0,photo:!1,href:!1,title:!1,rel:!1,opacity:.9,preloading:!0,className:!1,current:"image {current} of {total}",previous:"previous",next:"next",close:"close",xhrError:"This content failed to load.",imgError:"This image failed to load.",open:!1,returnFocus:!0,reposition:!0,loop:!0,slideshow:!1,slideshowAuto:!0,slideshowSpeed:2500,slideshowStart:"start slideshow",slideshowStop:"stop slideshow",onOpen:!1,onLoad:!1,onComplete:!1,onCleanup:!1,onClosed:!1,overlayClose:!0,escKey:!0,arrowKey:!0,top:!1,bottom:!1,left:!1,right:!1,fixed:!1,data:void 0},J="colorbox",U="cbox",V=U+"Element",Y=U+"_open",Z=U+"_load",et=U+"_complete",tt=U+"_cleanup",it=U+"_closed",ot=U+"_purge",nt=!e.support.leadingWhitespace,ht=nt&&!i.XMLHttpRequest,lt=U+"_IE6",rt=e({}),st="div";e.colorbox||(e(c),G=e.fn[J]=e[J]=function(t,i){var o=this;if(t=t||{},c(),u()){if(e.isFunction(o))o=e("<a/>"),t.open=!0;else if(!o[0])return o;i&&(t.onComplete=i),o.each(function(){e.data(this,J,e.extend({},e.data(this,J)||$,t))}).addClass(V),(e.isFunction(t.open)&&t.open.call(o)||t.open)&&d(o[0])}return o},G.position=function(e,t){function i(e){g[0].style.width=x[0].style.width=w[0].style.width=parseInt(e.style.width,10)-z+"px",w[0].style.height=y[0].style.height=v[0].style.height=parseInt(e.style.height,10)-K+"px"}var o,n,l,r=0,s=0,a=p.offset();T.unbind("resize."+U),p.css({top:-9e4,left:-9e4}),n=T.scrollTop(),l=T.scrollLeft(),_.fixed&&!ht?(a.top-=n,a.left-=l,p.css({position:"fixed"})):(r=n,s=l,p.css({position:"absolute"})),s+=_.right!==!1?Math.max(T.width()-_.w-B-z-h(_.right,"x"),0):_.left!==!1?h(_.left,"x"):Math.round(Math.max(T.width()-_.w-B-z,0)/2),r+=_.bottom!==!1?Math.max(T.height()-_.h-D-K-h(_.bottom,"y"),0):_.top!==!1?h(_.top,"y"):Math.round(Math.max(T.height()-_.h-D-K,0)/2),p.css({top:a.top,left:a.left,visibility:"visible"}),e=p.width()===_.w+B&&p.height()===_.h+D?0:e||0,m[0].style.width=m[0].style.height="9999px",o={width:_.w+B+z,height:_.h+D+K,top:r,left:s},0===e&&p.css(o),p.dequeue().animate(o,{duration:e,complete:function(){i(this),R=!1,m[0].style.width=_.w+B+z+"px",m[0].style.height=_.h+D+K+"px",_.reposition&&setTimeout(function(){T.bind("resize."+U,G.position)},1),t&&t()},step:function(){i(this)}})},G.resize=function(e){P&&(e=e||{},e.width&&(_.w=h(e.width,"x")-B-z),e.innerWidth&&(_.w=h(e.innerWidth,"x")),C.css({width:_.w}),e.height&&(_.h=h(e.height,"y")-D-K),e.innerHeight&&(_.h=h(e.innerHeight,"y")),e.innerHeight||e.height||(C.css({height:"auto"}),_.h=C.height()),C.css({height:_.h}),G.position("none"===_.transition?0:_.speed))},G.prep=function(t){function i(){return _.w=_.w||C.width(),_.w=_.mw&&_.mw<_.w?_.mw:_.w,_.w}function h(){return _.h=_.h||C.height(),_.h=_.mh&&_.mh<_.h?_.mh:_.h,_.h}if(P){var r,a="none"===_.transition?0:_.speed;C.empty().remove(),C=o(st,"LoadedContent").append(t),C.hide().appendTo(k.show()).css({width:i(),overflow:_.scrolling?"auto":"hidden"}).css({height:h()}).prependTo(w),k.hide(),e(O).css({"float":"none"}),r=function(){function t(){nt&&p[0].style.removeAttribute("filter")}var i,h,r=b.length,d="frameBorder",c="allowTransparency";P&&(h=function(){clearTimeout(q),W.remove(),s(et,_.onComplete)},nt&&O&&C.fadeIn(100),H.html(_.title).add(C).show(),r>1?("string"==typeof _.current&&E.html(_.current.replace("{current}",A+1).replace("{total}",r)).show(),L[_.loop||r-1>A?"show":"hide"]().html(_.next),M[_.loop||A?"show":"hide"]().html(_.previous),_.slideshow&&I.show(),_.preloading&&e.each([n(-1),n(1)],function(){var t,i,o=b[this],n=e.data(o,J);n&&n.href?(t=n.href,e.isFunction(t)&&(t=t.call(o))):t=o.href,l(t)&&(i=new Image,i.src=t)})):S.hide(),_.iframe?(i=o("iframe")[0],d in i&&(i[d]=0),c in i&&(i[c]="true"),_.scrolling||(i.scrolling="no"),e(i).attr({src:_.href,name:(new Date).getTime(),"class":U+"Iframe",allowFullScreen:!0,webkitAllowFullScreen:!0,mozallowfullscreen:!0}).one("load",h).appendTo(C),rt.one(ot,function(){i.src="//about:blank"}),_.fastIframe&&e(i).trigger("load")):h(),"fade"===_.transition?p.fadeTo(a,1,t):t())},"fade"===_.transition?p.fadeTo(a,0,function(){G.position(0,r)}):G.position(a,r)}},G.load=function(t){var i,n,a,d=G.prep;R=!0,O=!1,N=b[A],t||r(),Q&&p.add(f).removeClass(Q),_.className&&p.add(f).addClass(_.className),Q=_.className,s(ot),s(Z,_.onLoad),_.h=_.height?h(_.height,"y")-D-K:_.innerHeight&&h(_.innerHeight,"y"),_.w=_.width?h(_.width,"x")-B-z:_.innerWidth&&h(_.innerWidth,"x"),_.mw=_.w,_.mh=_.h,_.maxWidth&&(_.mw=h(_.maxWidth,"x")-B-z,_.mw=_.w&&_.w<_.mw?_.w:_.mw),_.maxHeight&&(_.mh=h(_.maxHeight,"y")-D-K,_.mh=_.h&&_.h<_.mh?_.h:_.mh),i=_.href,q=setTimeout(function(){W.appendTo(w)},100),_.inline?(a=o(st).hide().insertBefore(e(i)[0]),rt.one(ot,function(){a.replaceWith(C.children())}),d(e(i))):_.iframe?d(" "):_.html?d(_.html):l(i)?(e(O=new Image).addClass(U+"Photo").bind("error",function(){_.title=!1,d(o(st,"Error").html(_.imgError))}).one("load",function(){var e;_.scalePhotos&&(n=function(){O.height-=O.height*e,O.width-=O.width*e},_.mw&&O.width>_.mw&&(e=(O.width-_.mw)/O.width,n()),_.mh&&O.height>_.mh&&(e=(O.height-_.mh)/O.height,n())),_.h&&(O.style.marginTop=Math.max(_.h-O.height,0)/2+"px"),b[1]&&(_.loop||b[A+1])&&(O.style.cursor="pointer",O.onclick=function(){G.next()}),nt&&(O.style.msInterpolationMode="bicubic"),setTimeout(function(){d(O)},1)}),setTimeout(function(){O.src=i},1)):i&&k.load(i,_.data,function(t,i){d("error"===i?o(st,"Error").html(_.xhrError):e(this).contents())})},G.next=function(){!R&&b[1]&&(_.loop||b[A+1])&&(A=n(1),G.load())},G.prev=function(){!R&&b[1]&&(_.loop||A)&&(A=n(-1),G.load())},G.close=function(){P&&!j&&(j=!0,P=!1,s(tt,_.onCleanup),T.unbind("."+U+" ."+lt),f.fadeTo(200,0),p.stop().fadeTo(300,0,function(){p.add(f).css({opacity:1,cursor:"auto"}).hide(),s(ot),C.empty().remove(),setTimeout(function(){j=!1,s(it,_.onClosed)},1)}))},G.remove=function(){e([]).add(p).add(f).remove(),p=null,e("."+V).removeData(J).removeClass(V),e(t).unbind("click."+U)},G.element=function(){return e(N)},G.settings=$)})(jQuery,document,window);
javascripts/sfi.js ADDED
@@ -0,0 +1,154 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ function expand_group(rule, group_name, group_members)
2
+ {
3
+ (jQuery)('#rule_' + rule + '_domain_' + group_name).change(function(){
4
+ if ((jQuery)(this).attr('checked'))
5
+ {
6
+ for(var i = 0; i < group_members.length; i++) {
7
+ (jQuery)('#rule_' + rule + '_domain_' + group_members[i]).attr('checked', true);
8
+ (jQuery)('#rule_' + rule + '_domain_' + group_members[i]).attr('disabled', true);
9
+ if (group_members[i] == 'date')
10
+ {
11
+ var subgroups = ['year', 'month', 'day', 'time'];
12
+ for(var j = 0; j < subgroups.length; j++) {
13
+ (jQuery)('#rule_' + rule + '_domain_' + subgroups[j]).attr('checked', true);
14
+ (jQuery)('#rule_' + rule + '_domain_' + subgroups[j]).attr('disabled', true);
15
+ }
16
+ }
17
+ }
18
+ }
19
+ else
20
+ {
21
+ for(var i = 0; i < group_members.length; i++) {
22
+ (jQuery)('#rule_' + rule + '_domain_' + group_members[i]).attr('disabled', false);
23
+ (jQuery)('#rule_' + rule + '_domain_' + group_members[i]).attr('checked', false);
24
+ if (group_members[i] == 'date')
25
+ {
26
+ var subgroups = ['year', 'month', 'day', 'time'];
27
+ for(var j = 0; j < subgroups.length; j++) {
28
+ (jQuery)('#rule_' + rule + '_domain_' + subgroups[j]).attr('checked', false);
29
+ (jQuery)('#rule_' + rule + '_domain_' + subgroups[j]).attr('disabled', false);
30
+ }
31
+ }
32
+ }
33
+ }
34
+ });
35
+ }
36
+
37
+ function expand_cbox(rule)
38
+ {
39
+ var prefix = 'default';
40
+ if (rule != 0)
41
+ {
42
+ prefix = 'rule_' + rule;
43
+ }
44
+ if ((jQuery)('#' + prefix + '_attach_internal_images').val() == 'img')
45
+ (jQuery)('#' + prefix + '_colorbox_internal_images_div').show();
46
+ else
47
+ (jQuery)('#' + prefix + '_colorbox_internal_images_div').hide();
48
+ (jQuery)('#' + prefix + '_attach_internal_images').change(function(){
49
+ if ((jQuery)(this).val() == 'img')
50
+ (jQuery)('#' + prefix + '_colorbox_internal_images_div').show();
51
+ else
52
+ (jQuery)('#' + prefix + '_colorbox_internal_images_div').hide();
53
+ });
54
+
55
+ if ((jQuery)('#' + prefix + '_attach_external_images').val() == 'img')
56
+ (jQuery)('#' + prefix + '_colorbox_external_images_div').show();
57
+ else
58
+ (jQuery)('#' + prefix + '_colorbox_external_images_div').hide();
59
+ (jQuery)('#' + prefix + '_attach_external_images').change(function(){
60
+ if ((jQuery)(this).val() == 'img')
61
+ (jQuery)('#' + prefix + '_colorbox_external_images_div').show();
62
+ else
63
+ (jQuery)('#' + prefix + '_colorbox_external_images_div').hide();
64
+ });
65
+ }
66
+
67
+ function load_js(rule, start)
68
+ {
69
+ if ((jQuery)('#rule_' + rule + '_attach_internal_images').val() == 'img')
70
+ (jQuery)('#rule_' + rule + '_colorbox_internal_images_div').show();
71
+ else
72
+ (jQuery)('#rule_' + rule + '_colorbox_internal_images_div').hide();
73
+ (jQuery)('#rule_' + rule + '_attach_internal_images').change(function(){
74
+ if ((jQuery)(this).val() == 'img')
75
+ (jQuery)('#rule_' + rule + '_colorbox_internal_images_div').show();
76
+ else
77
+ (jQuery)('#rule_' + rule + '_colorbox_internal_images_div').hide();
78
+ });
79
+
80
+ if ((jQuery)('#rule_' + rule + '_attach_external_images').val() == 'img')
81
+ (jQuery)('#rule_' + rule + '_colorbox_external_images_div').show();
82
+ else
83
+ (jQuery)('#rule_' + rule + '_colorbox_external_images_div').hide();
84
+ (jQuery)('#rule_' + rule + '_attach_external_images').change(function(){
85
+ if ((jQuery)(this).val() == 'img')
86
+ (jQuery)('#rule_' + rule + '_colorbox_external_images_div').show();
87
+ else
88
+ (jQuery)('#rule_' + rule + '_colorbox_external_images_div').hide();
89
+ });
90
+
91
+ expand_cbox(rule);
92
+ expand_group(rule, 'main', ['home', 'front']);
93
+ expand_group(rule, 'archive', ['category', 'tag', 'taxonomy', 'author', 'date']);
94
+ expand_group(rule, 'singular', ['post', 'page', 'attachment']);
95
+ expand_group(rule, 'date', ['year', 'month', 'day', 'time']);
96
+
97
+ if (!start)
98
+ {
99
+ (jQuery)('#rule_' + rule + '_domain_main').attr('checked', true);
100
+ (jQuery)('#rule_' + rule + '_domain_home').attr('checked', true);
101
+ (jQuery)('#rule_' + rule + '_domain_home').attr('disabled', true);
102
+ (jQuery)('#rule_' + rule + '_domain_front').attr('checked', true);
103
+ (jQuery)('#rule_' + rule + '_domain_front').attr('disabled', true);
104
+
105
+ (jQuery)('#rule_' + rule + '_domain_archive').attr('checked', true);
106
+ (jQuery)('#rule_' + rule + '_domain_category').attr('checked', true);
107
+ (jQuery)('#rule_' + rule + '_domain_category').attr('disabled', true);
108
+
109
+ (jQuery)('#rule_' + rule + '_domain_tag').attr('checked', true);
110
+ (jQuery)('#rule_' + rule + '_domain_tag').attr('disabled', true);
111
+
112
+ (jQuery)('#rule_' + rule + '_domain_taxonomy').attr('checked', true);
113
+ (jQuery)('#rule_' + rule + '_domain_taxonomy').attr('disabled', true);
114
+
115
+ (jQuery)('#rule_' + rule + '_domain_author').attr('checked', true);
116
+ (jQuery)('#rule_' + rule + '_domain_author').attr('disabled', true);
117
+
118
+ (jQuery)('#rule_' + rule + '_domain_date').attr('checked', true);
119
+ (jQuery)('#rule_' + rule + '_domain_date').attr('disabled', true);
120
+ (jQuery)('#rule_' + rule + '_domain_year').attr('checked', true);
121
+ (jQuery)('#rule_' + rule + '_domain_year').attr('disabled', true);
122
+ (jQuery)('#rule_' + rule + '_domain_month').attr('checked', true);
123
+ (jQuery)('#rule_' + rule + '_domain_month').attr('disabled', true);
124
+ (jQuery)('#rule_' + rule + '_domain_day').attr('checked', true);
125
+ (jQuery)('#rule_' + rule + '_domain_day').attr('disabled', true);
126
+ (jQuery)('#rule_' + rule + '_domain_time').attr('checked', true);
127
+ (jQuery)('#rule_' + rule + '_domain_time').attr('disabled', true);
128
+
129
+ (jQuery)('#rule_' + rule + '_domain_singular').attr('checked', true);
130
+ (jQuery)('#rule_' + rule + '_domain_post').attr('checked', true);
131
+ (jQuery)('#rule_' + rule + '_domain_post').attr('disabled', true);
132
+
133
+ (jQuery)('#rule_' + rule + '_domain_page').attr('checked', true);
134
+ (jQuery)('#rule_' + rule + '_domain_page').attr('disabled', true);
135
+
136
+ (jQuery)('#rule_' + rule + '_domain_attachment').attr('checked', true);
137
+ (jQuery)('#rule_' + rule + '_domain_attachment').attr('disabled', true);
138
+ }
139
+
140
+ (jQuery)("input[name='rule_" + rule + "_enable']").change(function(){
141
+ if ((jQuery)("input[name='rule_" + rule + "_enable']:checked").val() == 'enabled')
142
+ {
143
+ var base = (jQuery)(this).attr('id');
144
+ base = base.substring(0, base.length - 6);
145
+ (jQuery)('#' + base + 'rules_div').show();
146
+ }
147
+ else
148
+ {
149
+ var base = (jQuery)(this).attr('id');
150
+ base = base.substring(0, base.length - 6);
151
+ (jQuery)('#' + base + 'rules_div').hide();
152
+ }
153
+ });
154
+ }
languages/seo-friendly-images-hr.mo ADDED
Binary file
languages/seo-friendly-images-hr.po ADDED
@@ -0,0 +1,248 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ msgid ""
2
+ msgstr ""
3
+ "Project-Id-Version: SEO Friendly Images\n"
4
+ "Report-Msgid-Bugs-To: \n"
5
+ "POT-Creation-Date: 2011-02-09 20:13+0100\n"
6
+ "PO-Revision-Date: 2011-02-09 20:15+0100\n"
7
+ "Last-Translator: Marko <atisha34@yahoo.com>\n"
8
+ "Language-Team: Prelovac Media <http://www.prelovac.com/blog>\n"
9
+ "MIME-Version: 1.0\n"
10
+ "Content-Type: text/plain; charset=UTF-8\n"
11
+ "Content-Transfer-Encoding: 8bit\n"
12
+ "X-Poedit-KeywordsList: _;gettext;gettext_noop;__;_e\n"
13
+ "X-Poedit-Basepath: C:\\Program Files (x86)\\Zend\\Apache2\\htdocs\\wordpress-beta\\wp-content\\plugins\\seo-image-pro\n"
14
+ "X-Poedit-Language: Croatian\n"
15
+ "X-Poedit-Country: Serbia\n"
16
+ "X-Poedit-SearchPath-0: C:\\Program Files (x86)\\Zend\\Apache2\\htdocs\\wordpress-beta\\wp-content\\plugins\\seo-image-pro\n"
17
+
18
+ #: C:\Program
19
+ #: Files
20
+ #: (x86)\Zend\Apache2\htdocs\wordpress-beta\wp-content\plugins\seo-image-pro/seo-friendly-images-pro.class.php:48
21
+ msgid "SEO Friendly Images PRO options"
22
+ msgstr "SEO Friendly Images PRO podešavanja sačuvana."
23
+
24
+ #: C:\Program
25
+ #: Files
26
+ #: (x86)\Zend\Apache2\htdocs\wordpress-beta\wp-content\plugins\seo-image-pro/seo-friendly-images-pro.class.php:48
27
+ #: (x86)\Zend\Apache2\htdocs\wordpress-beta\wp-content\plugins\seo-image-pro/seo-friendly-images-pro.class.php:371
28
+ msgid "SEO Friendly Images PRO"
29
+ msgstr "SEO Friendly Images PRO"
30
+
31
+ #: C:\Program
32
+ #: Files
33
+ #: (x86)\Zend\Apache2\htdocs\wordpress-beta\wp-content\plugins\seo-image-pro/seo-friendly-images-pro.class.php:337
34
+ msgid "SEO Friendly Images PRO options saved."
35
+ msgstr "SEO Friendly Images PRO podešavanja sačuvana."
36
+
37
+ #: C:\Program
38
+ #: Files
39
+ #: (x86)\Zend\Apache2\htdocs\wordpress-beta\wp-content\plugins\seo-image-pro/seo-friendly-images-pro.class.php:383
40
+ msgid "SEO Friendly Images PRO automatically adds alt and title attributes to all your images in all your posts specified by parameters below."
41
+ msgstr "SEO Friendly Images PRO automatizirano dodaje alt i title atribute na svije vaše slike i svim vašim postovima specificiranim parametrima ispod."
42
+
43
+ #: C:\Program
44
+ #: Files
45
+ #: (x86)\Zend\Apache2\htdocs\wordpress-beta\wp-content\plugins\seo-image-pro/seo-friendly-images-pro.class.php:384
46
+ msgid "You can enter any text in the field including two special tags:"
47
+ msgstr "Možete unjeti bilo koji tekst u polje uključujući dva specijalna taga:"
48
+
49
+ #: C:\Program
50
+ #: Files
51
+ #: (x86)\Zend\Apache2\htdocs\wordpress-beta\wp-content\plugins\seo-image-pro/seo-friendly-images-pro.class.php:386
52
+ msgid "replaces post title"
53
+ msgstr "zamijenjuje naslovom posta"
54
+
55
+ #: C:\Program
56
+ #: Files
57
+ #: (x86)\Zend\Apache2\htdocs\wordpress-beta\wp-content\plugins\seo-image-pro/seo-friendly-images-pro.class.php:387
58
+ msgid "replaces image file name (without extension)"
59
+ msgstr "zamijenjuje imenom fajla (bez ekstenzije)"
60
+
61
+ #: C:\Program
62
+ #: Files
63
+ #: (x86)\Zend\Apache2\htdocs\wordpress-beta\wp-content\plugins\seo-image-pro/seo-friendly-images-pro.class.php:388
64
+ #, fuzzy
65
+ msgid "replaces post category"
66
+ msgstr "zamijenjuje kategorijama posta"
67
+
68
+ #: C:\Program
69
+ #: Files
70
+ #: (x86)\Zend\Apache2\htdocs\wordpress-beta\wp-content\plugins\seo-image-pro/seo-friendly-images-pro.class.php:389
71
+ msgid "replaces post tags"
72
+ msgstr "zamijenjuje tagovima posta"
73
+
74
+ #: C:\Program
75
+ #: Files
76
+ #: (x86)\Zend\Apache2\htdocs\wordpress-beta\wp-content\plugins\seo-image-pro/seo-friendly-images-pro.class.php:392
77
+ msgid "Example:"
78
+ msgstr "Primjer"
79
+
80
+ #: C:\Program
81
+ #: Files
82
+ #: (x86)\Zend\Apache2\htdocs\wordpress-beta\wp-content\plugins\seo-image-pro/seo-friendly-images-pro.class.php:393
83
+ msgid "In a post titled Car Pictures there is a picture named Ferrari.jpg"
84
+ msgstr "U postu čiji je naslov: Slike automobila za sliku imenovanu Ferrari.jpg"
85
+
86
+ #: C:\Program
87
+ #: Files
88
+ #: (x86)\Zend\Apache2\htdocs\wordpress-beta\wp-content\plugins\seo-image-pro/seo-friendly-images-pro.class.php:394
89
+ msgid "Setting alt attribute to \"%name %title\" will produce alt=\"Ferrari Car Pictures\""
90
+ msgstr "Podješavanje alt svojstva na \"%name %title\" će proizvjesti alt=\"Ferrari Slike automobila\""
91
+
92
+ #: C:\Program
93
+ #: Files
94
+ #: (x86)\Zend\Apache2\htdocs\wordpress-beta\wp-content\plugins\seo-image-pro/seo-friendly-images-pro.class.php:395
95
+ msgid "Setting title attribute to \"%name photo\" will produce title=\"Ferrari photo\""
96
+ msgstr "Podješavanje title svojstva na \"%name slika\" će proizvjesti title=\"Ferrari slika\""
97
+
98
+ #: C:\Program
99
+ #: Files
100
+ #: (x86)\Zend\Apache2\htdocs\wordpress-beta\wp-content\plugins\seo-image-pro/seo-friendly-images-pro.class.php:398
101
+ msgid "Settings"
102
+ msgstr "Podešavanja"
103
+
104
+ #: C:\Program
105
+ #: Files
106
+ #: (x86)\Zend\Apache2\htdocs\wordpress-beta\wp-content\plugins\seo-image-pro/seo-friendly-images-pro.class.php:401
107
+ #: (x86)\Zend\Apache2\htdocs\wordpress-beta\wp-content\plugins\seo-image-pro/seo-friendly-images-pro.class.php:406
108
+ msgid "attribute (example:"
109
+ msgstr "svojstvo (primjer:"
110
+
111
+ #: C:\Program
112
+ #: Files
113
+ #: (x86)\Zend\Apache2\htdocs\wordpress-beta\wp-content\plugins\seo-image-pro/seo-friendly-images-pro.class.php:412
114
+ msgid "Override default image alt tag (recommended)"
115
+ msgstr "Predefinirajte podrazumijevani alt tag slike (preporučeno)"
116
+
117
+ #: C:\Program
118
+ #: Files
119
+ #: (x86)\Zend\Apache2\htdocs\wordpress-beta\wp-content\plugins\seo-image-pro/seo-friendly-images-pro.class.php:416
120
+ msgid "Override default image title tag"
121
+ msgstr "Predefinirajte podrazumijevani title tag slike"
122
+
123
+ #: C:\Program
124
+ #: Files
125
+ #: (x86)\Zend\Apache2\htdocs\wordpress-beta\wp-content\plugins\seo-image-pro/seo-friendly-images-pro.class.php:419
126
+ #, fuzzy
127
+ msgid "On Home/Archive pages"
128
+ msgstr "Na naslovnoj stranici/arhivama"
129
+
130
+ #: C:\Program
131
+ #: Files
132
+ #: (x86)\Zend\Apache2\htdocs\wordpress-beta\wp-content\plugins\seo-image-pro/seo-friendly-images-pro.class.php:421
133
+ #: (x86)\Zend\Apache2\htdocs\wordpress-beta\wp-content\plugins\seo-image-pro/seo-friendly-images-pro.class.php:452
134
+ #: (x86)\Zend\Apache2\htdocs\wordpress-beta\wp-content\plugins\seo-image-pro/seo-friendly-images-pro.class.php:485
135
+ msgid "Automatically link images to"
136
+ msgstr "Automatski linkuje slike ka"
137
+
138
+ #: C:\Program
139
+ #: Files
140
+ #: (x86)\Zend\Apache2\htdocs\wordpress-beta\wp-content\plugins\seo-image-pro/seo-friendly-images-pro.class.php:423
141
+ #: (x86)\Zend\Apache2\htdocs\wordpress-beta\wp-content\plugins\seo-image-pro/seo-friendly-images-pro.class.php:436
142
+ #: (x86)\Zend\Apache2\htdocs\wordpress-beta\wp-content\plugins\seo-image-pro/seo-friendly-images-pro.class.php:454
143
+ #: (x86)\Zend\Apache2\htdocs\wordpress-beta\wp-content\plugins\seo-image-pro/seo-friendly-images-pro.class.php:467
144
+ #: (x86)\Zend\Apache2\htdocs\wordpress-beta\wp-content\plugins\seo-image-pro/seo-friendly-images-pro.class.php:487
145
+ #: (x86)\Zend\Apache2\htdocs\wordpress-beta\wp-content\plugins\seo-image-pro/seo-friendly-images-pro.class.php:500
146
+ msgid "Leave as it is"
147
+ msgstr "Ostavite kako je"
148
+
149
+ #: C:\Program
150
+ #: Files
151
+ #: (x86)\Zend\Apache2\htdocs\wordpress-beta\wp-content\plugins\seo-image-pro/seo-friendly-images-pro.class.php:424
152
+ #: (x86)\Zend\Apache2\htdocs\wordpress-beta\wp-content\plugins\seo-image-pro/seo-friendly-images-pro.class.php:437
153
+ #: (x86)\Zend\Apache2\htdocs\wordpress-beta\wp-content\plugins\seo-image-pro/seo-friendly-images-pro.class.php:455
154
+ #: (x86)\Zend\Apache2\htdocs\wordpress-beta\wp-content\plugins\seo-image-pro/seo-friendly-images-pro.class.php:468
155
+ #: (x86)\Zend\Apache2\htdocs\wordpress-beta\wp-content\plugins\seo-image-pro/seo-friendly-images-pro.class.php:488
156
+ #: (x86)\Zend\Apache2\htdocs\wordpress-beta\wp-content\plugins\seo-image-pro/seo-friendly-images-pro.class.php:501
157
+ msgid "Post"
158
+ msgstr "Postu"
159
+
160
+ #: C:\Program
161
+ #: Files
162
+ #: (x86)\Zend\Apache2\htdocs\wordpress-beta\wp-content\plugins\seo-image-pro/seo-friendly-images-pro.class.php:425
163
+ #: (x86)\Zend\Apache2\htdocs\wordpress-beta\wp-content\plugins\seo-image-pro/seo-friendly-images-pro.class.php:456
164
+ #: (x86)\Zend\Apache2\htdocs\wordpress-beta\wp-content\plugins\seo-image-pro/seo-friendly-images-pro.class.php:489
165
+ msgid "Attachment page"
166
+ msgstr "Stranici sa prilogom"
167
+
168
+ #: C:\Program
169
+ #: Files
170
+ #: (x86)\Zend\Apache2\htdocs\wordpress-beta\wp-content\plugins\seo-image-pro/seo-friendly-images-pro.class.php:426
171
+ #: (x86)\Zend\Apache2\htdocs\wordpress-beta\wp-content\plugins\seo-image-pro/seo-friendly-images-pro.class.php:438
172
+ #: (x86)\Zend\Apache2\htdocs\wordpress-beta\wp-content\plugins\seo-image-pro/seo-friendly-images-pro.class.php:457
173
+ #: (x86)\Zend\Apache2\htdocs\wordpress-beta\wp-content\plugins\seo-image-pro/seo-friendly-images-pro.class.php:469
174
+ #: (x86)\Zend\Apache2\htdocs\wordpress-beta\wp-content\plugins\seo-image-pro/seo-friendly-images-pro.class.php:490
175
+ #: (x86)\Zend\Apache2\htdocs\wordpress-beta\wp-content\plugins\seo-image-pro/seo-friendly-images-pro.class.php:502
176
+ #, fuzzy
177
+ msgid "Image file"
178
+ msgstr "Slici"
179
+
180
+ #: C:\Program
181
+ #: Files
182
+ #: (x86)\Zend\Apache2\htdocs\wordpress-beta\wp-content\plugins\seo-image-pro/seo-friendly-images-pro.class.php:431
183
+ #: (x86)\Zend\Apache2\htdocs\wordpress-beta\wp-content\plugins\seo-image-pro/seo-friendly-images-pro.class.php:443
184
+ #: (x86)\Zend\Apache2\htdocs\wordpress-beta\wp-content\plugins\seo-image-pro/seo-friendly-images-pro.class.php:462
185
+ #: (x86)\Zend\Apache2\htdocs\wordpress-beta\wp-content\plugins\seo-image-pro/seo-friendly-images-pro.class.php:474
186
+ #: (x86)\Zend\Apache2\htdocs\wordpress-beta\wp-content\plugins\seo-image-pro/seo-friendly-images-pro.class.php:495
187
+ #: (x86)\Zend\Apache2\htdocs\wordpress-beta\wp-content\plugins\seo-image-pro/seo-friendly-images-pro.class.php:507
188
+ #, fuzzy
189
+ msgid "Use Colorbox preview"
190
+ msgstr "Koristiti colorbox prikaz"
191
+
192
+ #: C:\Program
193
+ #: Files
194
+ #: (x86)\Zend\Apache2\htdocs\wordpress-beta\wp-content\plugins\seo-image-pro/seo-friendly-images-pro.class.php:434
195
+ #: (x86)\Zend\Apache2\htdocs\wordpress-beta\wp-content\plugins\seo-image-pro/seo-friendly-images-pro.class.php:465
196
+ #: (x86)\Zend\Apache2\htdocs\wordpress-beta\wp-content\plugins\seo-image-pro/seo-friendly-images-pro.class.php:498
197
+ msgid "Automatically link external images to"
198
+ msgstr "Automatski linkuje slike sa drugih sajtova ka"
199
+
200
+ #: C:\Program
201
+ #: Files
202
+ #: (x86)\Zend\Apache2\htdocs\wordpress-beta\wp-content\plugins\seo-image-pro/seo-friendly-images-pro.class.php:447
203
+ #: (x86)\Zend\Apache2\htdocs\wordpress-beta\wp-content\plugins\seo-image-pro/seo-friendly-images-pro.class.php:478
204
+ #: (x86)\Zend\Apache2\htdocs\wordpress-beta\wp-content\plugins\seo-image-pro/seo-friendly-images-pro.class.php:511
205
+ msgid "Retain links to external sites"
206
+ msgstr "Zadržati linkove ka spoljnim sajtovima"
207
+
208
+ #: C:\Program
209
+ #: Files
210
+ #: (x86)\Zend\Apache2\htdocs\wordpress-beta\wp-content\plugins\seo-image-pro/seo-friendly-images-pro.class.php:450
211
+ #, fuzzy
212
+ msgid "On Single posts/pages"
213
+ msgstr "Na jedinstvenim stranicama"
214
+
215
+ #: C:\Program
216
+ #: Files
217
+ #: (x86)\Zend\Apache2\htdocs\wordpress-beta\wp-content\plugins\seo-image-pro/seo-friendly-images-pro.class.php:481
218
+ #, fuzzy
219
+ msgid "Special rules for these posts (seperate IDs with comma)"
220
+ msgstr "Posebna pravila za ove postove"
221
+
222
+ #: C:\Program
223
+ #: Files
224
+ #: (x86)\Zend\Apache2\htdocs\wordpress-beta\wp-content\plugins\seo-image-pro/seo-friendly-images-pro.class.php:517
225
+ #, fuzzy
226
+ msgid "Ignore posts (seperate IDs with comma)"
227
+ msgstr "Ignorirani postovi/stranice (zapetom odvojeni ID-jevi)"
228
+
229
+ #: C:\Program
230
+ #: Files
231
+ #: (x86)\Zend\Apache2\htdocs\wordpress-beta\wp-content\plugins\seo-image-pro/seo-friendly-images-pro.class.php:530
232
+ msgid "Another fine WordPress plugin by"
233
+ msgstr "Još jedan lijepi plugin, koji je razvio"
234
+
235
+ #~ msgid "Latest version available "
236
+ #~ msgstr "Zadnja verzija dostupna"
237
+
238
+ #~ msgid "General Options"
239
+ #~ msgstr "Opća podešavanja"
240
+
241
+ #~ msgid "Images options"
242
+ #~ msgstr "Podešavanja slika"
243
+
244
+ #~ msgid "Latest version available"
245
+ #~ msgstr "Zadnja dostupna verzija"
246
+
247
+ #~ msgid "Update options"
248
+ #~ msgstr "Sačuvajte podešavanja"
languages/seo-friendly-images-sr_RS.mo ADDED
Binary file
languages/seo-friendly-images-sr_RS.po ADDED
@@ -0,0 +1,248 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ msgid ""
2
+ msgstr ""
3
+ "Project-Id-Version: SEO Friendly Images\n"
4
+ "Report-Msgid-Bugs-To: \n"
5
+ "POT-Creation-Date: 2011-02-09 20:16+0100\n"
6
+ "PO-Revision-Date: 2011-02-09 20:17+0100\n"
7
+ "Last-Translator: Marko <atisha34@yahoo.com>\n"
8
+ "Language-Team: Prelovac Media <http://www.prelovac.com/blog>\n"
9
+ "MIME-Version: 1.0\n"
10
+ "Content-Type: text/plain; charset=UTF-8\n"
11
+ "Content-Transfer-Encoding: 8bit\n"
12
+ "X-Poedit-KeywordsList: _;gettext;gettext_noop;__;_e\n"
13
+ "X-Poedit-Basepath: C:\\Program Files (x86)\\Zend\\Apache2\\htdocs\\wordpress-beta\\wp-content\\plugins\\seo-image-pro\n"
14
+ "X-Poedit-Language: Serbian\n"
15
+ "X-Poedit-Country: Serbia\n"
16
+ "X-Poedit-SearchPath-0: C:\\Program Files (x86)\\Zend\\Apache2\\htdocs\\wordpress-beta\\wp-content\\plugins\\seo-image-pro\n"
17
+
18
+ #: C:\Program
19
+ #: Files
20
+ #: (x86)\Zend\Apache2\htdocs\wordpress-beta\wp-content\plugins\seo-image-pro/seo-friendly-images-pro.class.php:48
21
+ msgid "SEO Friendly Images PRO options"
22
+ msgstr "SEO Friendly Images PRO подешавања сачувана."
23
+
24
+ #: C:\Program
25
+ #: Files
26
+ #: (x86)\Zend\Apache2\htdocs\wordpress-beta\wp-content\plugins\seo-image-pro/seo-friendly-images-pro.class.php:48
27
+ #: (x86)\Zend\Apache2\htdocs\wordpress-beta\wp-content\plugins\seo-image-pro/seo-friendly-images-pro.class.php:371
28
+ msgid "SEO Friendly Images PRO"
29
+ msgstr "SEO Friendly Images PRO"
30
+
31
+ #: C:\Program
32
+ #: Files
33
+ #: (x86)\Zend\Apache2\htdocs\wordpress-beta\wp-content\plugins\seo-image-pro/seo-friendly-images-pro.class.php:337
34
+ msgid "SEO Friendly Images PRO options saved."
35
+ msgstr "SEO Friendly Images PRO подешавања сачувана."
36
+
37
+ #: C:\Program
38
+ #: Files
39
+ #: (x86)\Zend\Apache2\htdocs\wordpress-beta\wp-content\plugins\seo-image-pro/seo-friendly-images-pro.class.php:383
40
+ msgid "SEO Friendly Images PRO automatically adds alt and title attributes to all your images in all your posts specified by parameters below."
41
+ msgstr "SEO Friendly Images PRO аутоматски додаје alt i title атрибуте на све слике и свим вашим чланцима специфицираним параметрима испод."
42
+
43
+ #: C:\Program
44
+ #: Files
45
+ #: (x86)\Zend\Apache2\htdocs\wordpress-beta\wp-content\plugins\seo-image-pro/seo-friendly-images-pro.class.php:384
46
+ msgid "You can enter any text in the field including two special tags:"
47
+ msgstr "Можете унети било који текст у поље укључујући две специјалне ознаке:"
48
+
49
+ #: C:\Program
50
+ #: Files
51
+ #: (x86)\Zend\Apache2\htdocs\wordpress-beta\wp-content\plugins\seo-image-pro/seo-friendly-images-pro.class.php:386
52
+ msgid "replaces post title"
53
+ msgstr "замењује наслов чланка"
54
+
55
+ #: C:\Program
56
+ #: Files
57
+ #: (x86)\Zend\Apache2\htdocs\wordpress-beta\wp-content\plugins\seo-image-pro/seo-friendly-images-pro.class.php:387
58
+ msgid "replaces image file name (without extension)"
59
+ msgstr "замењује именом датотеке (без екстензије)"
60
+
61
+ #: C:\Program
62
+ #: Files
63
+ #: (x86)\Zend\Apache2\htdocs\wordpress-beta\wp-content\plugins\seo-image-pro/seo-friendly-images-pro.class.php:388
64
+ msgid "replaces post category"
65
+ msgstr "замењује категоријама чланка"
66
+
67
+ #: C:\Program
68
+ #: Files
69
+ #: (x86)\Zend\Apache2\htdocs\wordpress-beta\wp-content\plugins\seo-image-pro/seo-friendly-images-pro.class.php:389
70
+ msgid "replaces post tags"
71
+ msgstr "замењује ознакама чланка"
72
+
73
+ #: C:\Program
74
+ #: Files
75
+ #: (x86)\Zend\Apache2\htdocs\wordpress-beta\wp-content\plugins\seo-image-pro/seo-friendly-images-pro.class.php:392
76
+ msgid "Example:"
77
+ msgstr "Пример:"
78
+
79
+ #: C:\Program
80
+ #: Files
81
+ #: (x86)\Zend\Apache2\htdocs\wordpress-beta\wp-content\plugins\seo-image-pro/seo-friendly-images-pro.class.php:393
82
+ msgid "In a post titled Car Pictures there is a picture named Ferrari.jpg"
83
+ msgstr "У чланку чији је наслов: Слике аутомобила за слику именовану Ферари.jpg"
84
+
85
+ #: C:\Program
86
+ #: Files
87
+ #: (x86)\Zend\Apache2\htdocs\wordpress-beta\wp-content\plugins\seo-image-pro/seo-friendly-images-pro.class.php:394
88
+ msgid "Setting alt attribute to \"%name %title\" will produce alt=\"Ferrari Car Pictures\""
89
+ msgstr "Подешавање алт својства \"%name %title\" ће произвести алт=\"Ферари Слике аутомобила\""
90
+
91
+ #: C:\Program
92
+ #: Files
93
+ #: (x86)\Zend\Apache2\htdocs\wordpress-beta\wp-content\plugins\seo-image-pro/seo-friendly-images-pro.class.php:395
94
+ msgid "Setting title attribute to \"%name photo\" will produce title=\"Ferrari photo\""
95
+ msgstr "Подешавање title својства на \"%name слика\" ће произвести title=\"Ферари слика\""
96
+
97
+ #: C:\Program
98
+ #: Files
99
+ #: (x86)\Zend\Apache2\htdocs\wordpress-beta\wp-content\plugins\seo-image-pro/seo-friendly-images-pro.class.php:398
100
+ msgid "Settings"
101
+ msgstr "Подешавања"
102
+
103
+ #: C:\Program
104
+ #: Files
105
+ #: (x86)\Zend\Apache2\htdocs\wordpress-beta\wp-content\plugins\seo-image-pro/seo-friendly-images-pro.class.php:401
106
+ #: (x86)\Zend\Apache2\htdocs\wordpress-beta\wp-content\plugins\seo-image-pro/seo-friendly-images-pro.class.php:406
107
+ msgid "attribute (example:"
108
+ msgstr "својство (пример:"
109
+
110
+ #: C:\Program
111
+ #: Files
112
+ #: (x86)\Zend\Apache2\htdocs\wordpress-beta\wp-content\plugins\seo-image-pro/seo-friendly-images-pro.class.php:412
113
+ msgid "Override default image alt tag (recommended)"
114
+ msgstr "Предефинишите подразумевани алт ознаку слике (препоручено)"
115
+
116
+ #: C:\Program
117
+ #: Files
118
+ #: (x86)\Zend\Apache2\htdocs\wordpress-beta\wp-content\plugins\seo-image-pro/seo-friendly-images-pro.class.php:416
119
+ msgid "Override default image title tag"
120
+ msgstr "Предефинишите подразумевану титле ознаку слике"
121
+
122
+ #: C:\Program
123
+ #: Files
124
+ #: (x86)\Zend\Apache2\htdocs\wordpress-beta\wp-content\plugins\seo-image-pro/seo-friendly-images-pro.class.php:419
125
+ #, fuzzy
126
+ msgid "On Home/Archive pages"
127
+ msgstr "На насловним страницама/архивама"
128
+
129
+ #: C:\Program
130
+ #: Files
131
+ #: (x86)\Zend\Apache2\htdocs\wordpress-beta\wp-content\plugins\seo-image-pro/seo-friendly-images-pro.class.php:421
132
+ #: (x86)\Zend\Apache2\htdocs\wordpress-beta\wp-content\plugins\seo-image-pro/seo-friendly-images-pro.class.php:452
133
+ #: (x86)\Zend\Apache2\htdocs\wordpress-beta\wp-content\plugins\seo-image-pro/seo-friendly-images-pro.class.php:485
134
+ msgid "Automatically link images to"
135
+ msgstr "Аутоматски везује слике ка"
136
+
137
+ #: C:\Program
138
+ #: Files
139
+ #: (x86)\Zend\Apache2\htdocs\wordpress-beta\wp-content\plugins\seo-image-pro/seo-friendly-images-pro.class.php:423
140
+ #: (x86)\Zend\Apache2\htdocs\wordpress-beta\wp-content\plugins\seo-image-pro/seo-friendly-images-pro.class.php:436
141
+ #: (x86)\Zend\Apache2\htdocs\wordpress-beta\wp-content\plugins\seo-image-pro/seo-friendly-images-pro.class.php:454
142
+ #: (x86)\Zend\Apache2\htdocs\wordpress-beta\wp-content\plugins\seo-image-pro/seo-friendly-images-pro.class.php:467
143
+ #: (x86)\Zend\Apache2\htdocs\wordpress-beta\wp-content\plugins\seo-image-pro/seo-friendly-images-pro.class.php:487
144
+ #: (x86)\Zend\Apache2\htdocs\wordpress-beta\wp-content\plugins\seo-image-pro/seo-friendly-images-pro.class.php:500
145
+ msgid "Leave as it is"
146
+ msgstr "Оставите како јесте"
147
+
148
+ #: C:\Program
149
+ #: Files
150
+ #: (x86)\Zend\Apache2\htdocs\wordpress-beta\wp-content\plugins\seo-image-pro/seo-friendly-images-pro.class.php:424
151
+ #: (x86)\Zend\Apache2\htdocs\wordpress-beta\wp-content\plugins\seo-image-pro/seo-friendly-images-pro.class.php:437
152
+ #: (x86)\Zend\Apache2\htdocs\wordpress-beta\wp-content\plugins\seo-image-pro/seo-friendly-images-pro.class.php:455
153
+ #: (x86)\Zend\Apache2\htdocs\wordpress-beta\wp-content\plugins\seo-image-pro/seo-friendly-images-pro.class.php:468
154
+ #: (x86)\Zend\Apache2\htdocs\wordpress-beta\wp-content\plugins\seo-image-pro/seo-friendly-images-pro.class.php:488
155
+ #: (x86)\Zend\Apache2\htdocs\wordpress-beta\wp-content\plugins\seo-image-pro/seo-friendly-images-pro.class.php:501
156
+ msgid "Post"
157
+ msgstr "Чланку"
158
+
159
+ #: C:\Program
160
+ #: Files
161
+ #: (x86)\Zend\Apache2\htdocs\wordpress-beta\wp-content\plugins\seo-image-pro/seo-friendly-images-pro.class.php:425
162
+ #: (x86)\Zend\Apache2\htdocs\wordpress-beta\wp-content\plugins\seo-image-pro/seo-friendly-images-pro.class.php:456
163
+ #: (x86)\Zend\Apache2\htdocs\wordpress-beta\wp-content\plugins\seo-image-pro/seo-friendly-images-pro.class.php:489
164
+ msgid "Attachment page"
165
+ msgstr "Страници са прилогом"
166
+
167
+ #: C:\Program
168
+ #: Files
169
+ #: (x86)\Zend\Apache2\htdocs\wordpress-beta\wp-content\plugins\seo-image-pro/seo-friendly-images-pro.class.php:426
170
+ #: (x86)\Zend\Apache2\htdocs\wordpress-beta\wp-content\plugins\seo-image-pro/seo-friendly-images-pro.class.php:438
171
+ #: (x86)\Zend\Apache2\htdocs\wordpress-beta\wp-content\plugins\seo-image-pro/seo-friendly-images-pro.class.php:457
172
+ #: (x86)\Zend\Apache2\htdocs\wordpress-beta\wp-content\plugins\seo-image-pro/seo-friendly-images-pro.class.php:469
173
+ #: (x86)\Zend\Apache2\htdocs\wordpress-beta\wp-content\plugins\seo-image-pro/seo-friendly-images-pro.class.php:490
174
+ #: (x86)\Zend\Apache2\htdocs\wordpress-beta\wp-content\plugins\seo-image-pro/seo-friendly-images-pro.class.php:502
175
+ #, fuzzy
176
+ msgid "Image file"
177
+ msgstr "Слици"
178
+
179
+ #: C:\Program
180
+ #: Files
181
+ #: (x86)\Zend\Apache2\htdocs\wordpress-beta\wp-content\plugins\seo-image-pro/seo-friendly-images-pro.class.php:431
182
+ #: (x86)\Zend\Apache2\htdocs\wordpress-beta\wp-content\plugins\seo-image-pro/seo-friendly-images-pro.class.php:443
183
+ #: (x86)\Zend\Apache2\htdocs\wordpress-beta\wp-content\plugins\seo-image-pro/seo-friendly-images-pro.class.php:462
184
+ #: (x86)\Zend\Apache2\htdocs\wordpress-beta\wp-content\plugins\seo-image-pro/seo-friendly-images-pro.class.php:474
185
+ #: (x86)\Zend\Apache2\htdocs\wordpress-beta\wp-content\plugins\seo-image-pro/seo-friendly-images-pro.class.php:495
186
+ #: (x86)\Zend\Apache2\htdocs\wordpress-beta\wp-content\plugins\seo-image-pro/seo-friendly-images-pro.class.php:507
187
+ #, fuzzy
188
+ msgid "Use Colorbox preview"
189
+ msgstr "Користи colorbox приказ"
190
+
191
+ #: C:\Program
192
+ #: Files
193
+ #: (x86)\Zend\Apache2\htdocs\wordpress-beta\wp-content\plugins\seo-image-pro/seo-friendly-images-pro.class.php:434
194
+ #: (x86)\Zend\Apache2\htdocs\wordpress-beta\wp-content\plugins\seo-image-pro/seo-friendly-images-pro.class.php:465
195
+ #: (x86)\Zend\Apache2\htdocs\wordpress-beta\wp-content\plugins\seo-image-pro/seo-friendly-images-pro.class.php:498
196
+ msgid "Automatically link external images to"
197
+ msgstr "Аутоматски везује слике са других сатова ка"
198
+
199
+ #: C:\Program
200
+ #: Files
201
+ #: (x86)\Zend\Apache2\htdocs\wordpress-beta\wp-content\plugins\seo-image-pro/seo-friendly-images-pro.class.php:447
202
+ #: (x86)\Zend\Apache2\htdocs\wordpress-beta\wp-content\plugins\seo-image-pro/seo-friendly-images-pro.class.php:478
203
+ #: (x86)\Zend\Apache2\htdocs\wordpress-beta\wp-content\plugins\seo-image-pro/seo-friendly-images-pro.class.php:511
204
+ msgid "Retain links to external sites"
205
+ msgstr "Задржати везе ка другим сајтовима"
206
+
207
+ #: C:\Program
208
+ #: Files
209
+ #: (x86)\Zend\Apache2\htdocs\wordpress-beta\wp-content\plugins\seo-image-pro/seo-friendly-images-pro.class.php:450
210
+ #, fuzzy
211
+ msgid "On Single posts/pages"
212
+ msgstr "На јединственим страницама"
213
+
214
+ #: C:\Program
215
+ #: Files
216
+ #: (x86)\Zend\Apache2\htdocs\wordpress-beta\wp-content\plugins\seo-image-pro/seo-friendly-images-pro.class.php:481
217
+ #, fuzzy
218
+ msgid "Special rules for these posts (seperate IDs with comma)"
219
+ msgstr "Посебна правила за ове чланке"
220
+
221
+ #: C:\Program
222
+ #: Files
223
+ #: (x86)\Zend\Apache2\htdocs\wordpress-beta\wp-content\plugins\seo-image-pro/seo-friendly-images-pro.class.php:517
224
+ #, fuzzy
225
+ msgid "Ignore posts (seperate IDs with comma)"
226
+ msgstr "Игнорисани чланци/странице (зарезом одвојени ИД-еви)"
227
+
228
+ #: C:\Program
229
+ #: Files
230
+ #: (x86)\Zend\Apache2\htdocs\wordpress-beta\wp-content\plugins\seo-image-pro/seo-friendly-images-pro.class.php:530
231
+ msgid "Another fine WordPress plugin by"
232
+ msgstr "Још један леп додатак, који је развио"
233
+
234
+ #, fuzzy
235
+ #~ msgid "Latest version available "
236
+ #~ msgstr "Последња доступна верзија"
237
+
238
+ #~ msgid "General Options"
239
+ #~ msgstr "Општа подешавања"
240
+
241
+ #~ msgid "Images options"
242
+ #~ msgstr "Подешавања слика"
243
+
244
+ #~ msgid "Latest version available"
245
+ #~ msgstr "Последња доступна верзија"
246
+
247
+ #~ msgid "Update options"
248
+ #~ msgstr "Сачувајте подешавања"
languages/seo-friendly-images.mo ADDED
Binary file
languages/seo-friendly-images.po ADDED
@@ -0,0 +1,175 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ msgid ""
2
+ msgstr ""
3
+ "Project-Id-Version: SEO Friendly Images\n"
4
+ "Report-Msgid-Bugs-To: \n"
5
+ "POT-Creation-Date: 2010-12-27 12:10+0100\n"
6
+ "PO-Revision-Date: 2010-12-27 12:10+0100\n"
7
+ "Last-Translator: Marko <atisha34@yahoo.com>\n"
8
+ "Language-Team: Prelovac Media <http://www.prelovac.com/blog>\n"
9
+ "MIME-Version: 1.0\n"
10
+ "Content-Type: text/plain; charset=UTF-8\n"
11
+ "Content-Transfer-Encoding: 8bit\n"
12
+ "X-Poedit-KeywordsList: _;gettext;gettext_noop;__;_e\n"
13
+ "X-Poedit-Basepath: C:\\Program Files (x86)\\Zend\\Apache2\\htdocs\\wordpress-sample\\wp-content\\plugins\\seo-image-pro\n"
14
+ "X-Poedit-Language: English\n"
15
+ "X-Poedit-Country: Serbia\n"
16
+ "X-Poedit-SearchPath-0: C:\\Program Files (x86)\\Zend\\Apache2\\htdocs\\wordpress-sample\\wp-content\\plugins\\seo-image-pro\n"
17
+
18
+ #: C:\Program
19
+ #: Files
20
+ #: (x86)\Zend\Apache2\htdocs\wordpress-sample\wp-content\plugins\seo-image-pro/seo-friendly-images-pro.php:31
21
+ msgid "SEO Friendly Images PRO options"
22
+ msgstr ""
23
+
24
+ #: C:\Program
25
+ #: Files
26
+ #: (x86)\Zend\Apache2\htdocs\wordpress-sample\wp-content\plugins\seo-image-pro/seo-friendly-images-pro.php:31
27
+ #: (x86)\Zend\Apache2\htdocs\wordpress-sample\wp-content\plugins\seo-image-pro/seo-friendly-images-pro.php:94
28
+ msgid "SEO Friendly Images PRO"
29
+ msgstr ""
30
+
31
+ #: C:\Program
32
+ #: Files
33
+ #: (x86)\Zend\Apache2\htdocs\wordpress-sample\wp-content\plugins\seo-image-pro/seo-friendly-images-pro.php:48
34
+ msgid "Latest version available "
35
+ msgstr ""
36
+
37
+ #: C:\Program
38
+ #: Files
39
+ #: (x86)\Zend\Apache2\htdocs\wordpress-sample\wp-content\plugins\seo-image-pro/seo-friendly-images-pro.php:67
40
+ msgid "SEO Friendly Images PRO options saved."
41
+ msgstr ""
42
+
43
+ #: C:\Program
44
+ #: Files
45
+ #: (x86)\Zend\Apache2\htdocs\wordpress-sample\wp-content\plugins\seo-image-pro/seo-friendly-images-pro.php:86
46
+ msgid "Leave as it is"
47
+ msgstr ""
48
+
49
+ #: C:\Program
50
+ #: Files
51
+ #: (x86)\Zend\Apache2\htdocs\wordpress-sample\wp-content\plugins\seo-image-pro/seo-friendly-images-pro.php:87
52
+ msgid "Post"
53
+ msgstr ""
54
+
55
+ #: C:\Program
56
+ #: Files
57
+ #: (x86)\Zend\Apache2\htdocs\wordpress-sample\wp-content\plugins\seo-image-pro/seo-friendly-images-pro.php:88
58
+ msgid "Attachment page"
59
+ msgstr ""
60
+
61
+ #: C:\Program
62
+ #: Files
63
+ #: (x86)\Zend\Apache2\htdocs\wordpress-sample\wp-content\plugins\seo-image-pro/seo-friendly-images-pro.php:89
64
+ msgid "Image"
65
+ msgstr ""
66
+
67
+ #: C:\Program
68
+ #: Files
69
+ #: (x86)\Zend\Apache2\htdocs\wordpress-sample\wp-content\plugins\seo-image-pro/seo-friendly-images-pro.php:106
70
+ msgid "General Options"
71
+ msgstr ""
72
+
73
+ #: C:\Program
74
+ #: Files
75
+ #: (x86)\Zend\Apache2\htdocs\wordpress-sample\wp-content\plugins\seo-image-pro/seo-friendly-images-pro.php:107
76
+ msgid "SEO Friendly Images PRO automatically adds alt and title attributes to all your images in all your posts specified by parameters below."
77
+ msgstr ""
78
+
79
+ #: C:\Program
80
+ #: Files
81
+ #: (x86)\Zend\Apache2\htdocs\wordpress-sample\wp-content\plugins\seo-image-pro/seo-friendly-images-pro.php:108
82
+ msgid "You can enter any text in the field including two special tags:"
83
+ msgstr ""
84
+
85
+ #: C:\Program
86
+ #: Files
87
+ #: (x86)\Zend\Apache2\htdocs\wordpress-sample\wp-content\plugins\seo-image-pro/seo-friendly-images-pro.php:110
88
+ msgid "replaces post title"
89
+ msgstr ""
90
+
91
+ #: C:\Program
92
+ #: Files
93
+ #: (x86)\Zend\Apache2\htdocs\wordpress-sample\wp-content\plugins\seo-image-pro/seo-friendly-images-pro.php:111
94
+ msgid "replaces image file name (without extension)"
95
+ msgstr ""
96
+
97
+ #: C:\Program
98
+ #: Files
99
+ #: (x86)\Zend\Apache2\htdocs\wordpress-sample\wp-content\plugins\seo-image-pro/seo-friendly-images-pro.php:112
100
+ msgid "replaces post category"
101
+ msgstr ""
102
+
103
+ #: C:\Program
104
+ #: Files
105
+ #: (x86)\Zend\Apache2\htdocs\wordpress-sample\wp-content\plugins\seo-image-pro/seo-friendly-images-pro.php:113
106
+ msgid "replaces post tags"
107
+ msgstr ""
108
+
109
+ #: C:\Program
110
+ #: Files
111
+ #: (x86)\Zend\Apache2\htdocs\wordpress-sample\wp-content\plugins\seo-image-pro/seo-friendly-images-pro.php:115
112
+ msgid "Images options"
113
+ msgstr ""
114
+
115
+ #: C:\Program
116
+ #: Files
117
+ #: (x86)\Zend\Apache2\htdocs\wordpress-sample\wp-content\plugins\seo-image-pro/seo-friendly-images-pro.php:117
118
+ #: (x86)\Zend\Apache2\htdocs\wordpress-sample\wp-content\plugins\seo-image-pro/seo-friendly-images-pro.php:122
119
+ msgid "attribute (example:"
120
+ msgstr ""
121
+
122
+ #: C:\Program
123
+ #: Files
124
+ #: (x86)\Zend\Apache2\htdocs\wordpress-sample\wp-content\plugins\seo-image-pro/seo-friendly-images-pro.php:128
125
+ msgid "Override default Wordpress image alt tag (recommended)"
126
+ msgstr ""
127
+
128
+ #: C:\Program
129
+ #: Files
130
+ #: (x86)\Zend\Apache2\htdocs\wordpress-sample\wp-content\plugins\seo-image-pro/seo-friendly-images-pro.php:132
131
+ msgid "Override default Wordpress image title"
132
+ msgstr ""
133
+
134
+ #: C:\Program
135
+ #: Files
136
+ #: (x86)\Zend\Apache2\htdocs\wordpress-sample\wp-content\plugins\seo-image-pro/seo-friendly-images-pro.php:136
137
+ msgid "Automatically link images to"
138
+ msgstr ""
139
+
140
+ #: C:\Program
141
+ #: Files
142
+ #: (x86)\Zend\Apache2\htdocs\wordpress-sample\wp-content\plugins\seo-image-pro/seo-friendly-images-pro.php:141
143
+ msgid "Example:"
144
+ msgstr ""
145
+
146
+ #: C:\Program
147
+ #: Files
148
+ #: (x86)\Zend\Apache2\htdocs\wordpress-sample\wp-content\plugins\seo-image-pro/seo-friendly-images-pro.php:142
149
+ msgid "In a post titled Car Pictures there is a picture named Ferrari.jpg"
150
+ msgstr ""
151
+
152
+ #: C:\Program
153
+ #: Files
154
+ #: (x86)\Zend\Apache2\htdocs\wordpress-sample\wp-content\plugins\seo-image-pro/seo-friendly-images-pro.php:143
155
+ msgid "Setting alt attribute to \"%name %title\" will produce alt=\"Ferrari Car Pictures\""
156
+ msgstr ""
157
+
158
+ #: C:\Program
159
+ #: Files
160
+ #: (x86)\Zend\Apache2\htdocs\wordpress-sample\wp-content\plugins\seo-image-pro/seo-friendly-images-pro.php:144
161
+ msgid "Setting title attribute to \"%name photo\" will produce title=\"Ferrari photo\""
162
+ msgstr ""
163
+
164
+ #: C:\Program
165
+ #: Files
166
+ #: (x86)\Zend\Apache2\htdocs\wordpress-sample\wp-content\plugins\seo-image-pro/seo-friendly-images-pro.php:154
167
+ msgid "Another fine WordPress plugin by"
168
+ msgstr ""
169
+
170
+ #: C:\Program
171
+ #: Files
172
+ #: (x86)\Zend\Apache2\htdocs\wordpress-sample\wp-content\plugins\seo-image-pro/seo-friendly-images-pro.php:343
173
+ msgid "Latest version available"
174
+ msgstr ""
175
+
languages/seo-friendly-images.pot ADDED
@@ -0,0 +1,175 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ msgid ""
2
+ msgstr ""
3
+ "Project-Id-Version: SEO Friendly Images\n"
4
+ "Report-Msgid-Bugs-To: \n"
5
+ "POT-Creation-Date: 2010-12-27 12:10+0100\n"
6
+ "PO-Revision-Date: 2010-12-27 12:10+0100\n"
7
+ "Last-Translator: Marko <atisha34@yahoo.com>\n"
8
+ "Language-Team: Prelovac Media <http://www.prelovac.com/blog>\n"
9
+ "MIME-Version: 1.0\n"
10
+ "Content-Type: text/plain; charset=UTF-8\n"
11
+ "Content-Transfer-Encoding: 8bit\n"
12
+ "X-Poedit-KeywordsList: _;gettext;gettext_noop;__;_e\n"
13
+ "X-Poedit-Basepath: C:\\Program Files (x86)\\Zend\\Apache2\\htdocs\\wordpress-sample\\wp-content\\plugins\\seo-image-pro\n"
14
+ "X-Poedit-Language: English\n"
15
+ "X-Poedit-Country: Serbia\n"
16
+ "X-Poedit-SearchPath-0: C:\\Program Files (x86)\\Zend\\Apache2\\htdocs\\wordpress-sample\\wp-content\\plugins\\seo-image-pro\n"
17
+
18
+ #: C:\Program
19
+ #: Files
20
+ #: (x86)\Zend\Apache2\htdocs\wordpress-sample\wp-content\plugins\seo-image-pro/seo-friendly-images-pro.php:31
21
+ msgid "SEO Friendly Images PRO options"
22
+ msgstr ""
23
+
24
+ #: C:\Program
25
+ #: Files
26
+ #: (x86)\Zend\Apache2\htdocs\wordpress-sample\wp-content\plugins\seo-image-pro/seo-friendly-images-pro.php:31
27
+ #: (x86)\Zend\Apache2\htdocs\wordpress-sample\wp-content\plugins\seo-image-pro/seo-friendly-images-pro.php:94
28
+ msgid "SEO Friendly Images PRO"
29
+ msgstr ""
30
+
31
+ #: C:\Program
32
+ #: Files
33
+ #: (x86)\Zend\Apache2\htdocs\wordpress-sample\wp-content\plugins\seo-image-pro/seo-friendly-images-pro.php:48
34
+ msgid "Latest version available "
35
+ msgstr ""
36
+
37
+ #: C:\Program
38
+ #: Files
39
+ #: (x86)\Zend\Apache2\htdocs\wordpress-sample\wp-content\plugins\seo-image-pro/seo-friendly-images-pro.php:67
40
+ msgid "SEO Friendly Images PRO options saved."
41
+ msgstr ""
42
+
43
+ #: C:\Program
44
+ #: Files
45
+ #: (x86)\Zend\Apache2\htdocs\wordpress-sample\wp-content\plugins\seo-image-pro/seo-friendly-images-pro.php:86
46
+ msgid "Leave as it is"
47
+ msgstr ""
48
+
49
+ #: C:\Program
50
+ #: Files
51
+ #: (x86)\Zend\Apache2\htdocs\wordpress-sample\wp-content\plugins\seo-image-pro/seo-friendly-images-pro.php:87
52
+ msgid "Post"
53
+ msgstr ""
54
+
55
+ #: C:\Program
56
+ #: Files
57
+ #: (x86)\Zend\Apache2\htdocs\wordpress-sample\wp-content\plugins\seo-image-pro/seo-friendly-images-pro.php:88
58
+ msgid "Attachment page"
59
+ msgstr ""
60
+
61
+ #: C:\Program
62
+ #: Files
63
+ #: (x86)\Zend\Apache2\htdocs\wordpress-sample\wp-content\plugins\seo-image-pro/seo-friendly-images-pro.php:89
64
+ msgid "Image"
65
+ msgstr ""
66
+
67
+ #: C:\Program
68
+ #: Files
69
+ #: (x86)\Zend\Apache2\htdocs\wordpress-sample\wp-content\plugins\seo-image-pro/seo-friendly-images-pro.php:106
70
+ msgid "General Options"
71
+ msgstr ""
72
+
73
+ #: C:\Program
74
+ #: Files
75
+ #: (x86)\Zend\Apache2\htdocs\wordpress-sample\wp-content\plugins\seo-image-pro/seo-friendly-images-pro.php:107
76
+ msgid "SEO Friendly Images PRO automatically adds alt and title attributes to all your images in all your posts specified by parameters below."
77
+ msgstr ""
78
+
79
+ #: C:\Program
80
+ #: Files
81
+ #: (x86)\Zend\Apache2\htdocs\wordpress-sample\wp-content\plugins\seo-image-pro/seo-friendly-images-pro.php:108
82
+ msgid "You can enter any text in the field including two special tags:"
83
+ msgstr ""
84
+
85
+ #: C:\Program
86
+ #: Files
87
+ #: (x86)\Zend\Apache2\htdocs\wordpress-sample\wp-content\plugins\seo-image-pro/seo-friendly-images-pro.php:110
88
+ msgid "replaces post title"
89
+ msgstr ""
90
+
91
+ #: C:\Program
92
+ #: Files
93
+ #: (x86)\Zend\Apache2\htdocs\wordpress-sample\wp-content\plugins\seo-image-pro/seo-friendly-images-pro.php:111
94
+ msgid "replaces image file name (without extension)"
95
+ msgstr ""
96
+
97
+ #: C:\Program
98
+ #: Files
99
+ #: (x86)\Zend\Apache2\htdocs\wordpress-sample\wp-content\plugins\seo-image-pro/seo-friendly-images-pro.php:112
100
+ msgid "replaces post category"
101
+ msgstr ""
102
+
103
+ #: C:\Program
104
+ #: Files
105
+ #: (x86)\Zend\Apache2\htdocs\wordpress-sample\wp-content\plugins\seo-image-pro/seo-friendly-images-pro.php:113
106
+ msgid "replaces post tags"
107
+ msgstr ""
108
+
109
+ #: C:\Program
110
+ #: Files
111
+ #: (x86)\Zend\Apache2\htdocs\wordpress-sample\wp-content\plugins\seo-image-pro/seo-friendly-images-pro.php:115
112
+ msgid "Images options"
113
+ msgstr ""
114
+
115
+ #: C:\Program
116
+ #: Files
117
+ #: (x86)\Zend\Apache2\htdocs\wordpress-sample\wp-content\plugins\seo-image-pro/seo-friendly-images-pro.php:117
118
+ #: (x86)\Zend\Apache2\htdocs\wordpress-sample\wp-content\plugins\seo-image-pro/seo-friendly-images-pro.php:122
119
+ msgid "attribute (example:"
120
+ msgstr ""
121
+
122
+ #: C:\Program
123
+ #: Files
124
+ #: (x86)\Zend\Apache2\htdocs\wordpress-sample\wp-content\plugins\seo-image-pro/seo-friendly-images-pro.php:128
125
+ msgid "Override default Wordpress image alt tag (recommended)"
126
+ msgstr ""
127
+
128
+ #: C:\Program
129
+ #: Files
130
+ #: (x86)\Zend\Apache2\htdocs\wordpress-sample\wp-content\plugins\seo-image-pro/seo-friendly-images-pro.php:132
131
+ msgid "Override default Wordpress image title"
132
+ msgstr ""
133
+
134
+ #: C:\Program
135
+ #: Files
136
+ #: (x86)\Zend\Apache2\htdocs\wordpress-sample\wp-content\plugins\seo-image-pro/seo-friendly-images-pro.php:136
137
+ msgid "Automatically link images to"
138
+ msgstr ""
139
+
140
+ #: C:\Program
141
+ #: Files
142
+ #: (x86)\Zend\Apache2\htdocs\wordpress-sample\wp-content\plugins\seo-image-pro/seo-friendly-images-pro.php:141
143
+ msgid "Example:"
144
+ msgstr ""
145
+
146
+ #: C:\Program
147
+ #: Files
148
+ #: (x86)\Zend\Apache2\htdocs\wordpress-sample\wp-content\plugins\seo-image-pro/seo-friendly-images-pro.php:142
149
+ msgid "In a post titled Car Pictures there is a picture named Ferrari.jpg"
150
+ msgstr ""
151
+
152
+ #: C:\Program
153
+ #: Files
154
+ #: (x86)\Zend\Apache2\htdocs\wordpress-sample\wp-content\plugins\seo-image-pro/seo-friendly-images-pro.php:143
155
+ msgid "Setting alt attribute to \"%name %title\" will produce alt=\"Ferrari Car Pictures\""
156
+ msgstr ""
157
+
158
+ #: C:\Program
159
+ #: Files
160
+ #: (x86)\Zend\Apache2\htdocs\wordpress-sample\wp-content\plugins\seo-image-pro/seo-friendly-images-pro.php:144
161
+ msgid "Setting title attribute to \"%name photo\" will produce title=\"Ferrari photo\""
162
+ msgstr ""
163
+
164
+ #: C:\Program
165
+ #: Files
166
+ #: (x86)\Zend\Apache2\htdocs\wordpress-sample\wp-content\plugins\seo-image-pro/seo-friendly-images-pro.php:154
167
+ msgid "Another fine WordPress plugin by"
168
+ msgstr ""
169
+
170
+ #: C:\Program
171
+ #: Files
172
+ #: (x86)\Zend\Apache2\htdocs\wordpress-sample\wp-content\plugins\seo-image-pro/seo-friendly-images-pro.php:343
173
+ msgid "Latest version available"
174
+ msgstr ""
175
+
readme.txt CHANGED
@@ -1,16 +1,15 @@
1
  === SEO Friendly Images ===
2
  Contributors: freediver
3
  Donate link: https://www.networkforgood.org/donation/MakeDonation.aspx?ORGID2=920155875
4
- Tags: seo, images, Post, admin, google
5
  Requires at least: 2.7
6
- Tested up to: 4.0
7
  Stable tag: trunk
8
 
9
  SEO Friendly Images automatically adds alt and title attributes to all your images improving traffic from search engines.
10
 
11
  == Description ==
12
 
13
-
14
  SEO Friendly Images is a Wordpress SEO plugin which automatically updates all images with proper ALT and TITLE attributes for SEO purposes. If your images do not have ALT and TITLE already set, SEO Friendly Images will add them according the options you set. Additionally this makes the post W3C/xHTML valid as well.
15
 
16
  ALT attribute is important part of search engine optimization. It describes your images to search engine and when a user searches for a certain image this is a key determining factor for a match.
@@ -19,10 +18,16 @@ TITLE attribute play lesser role but is important for visitors as this text will
19
 
20
  Plugin by [Vladimir Prelovac](http://www.prelovac.com/vladimir/ "Vladimir Prelovac").
21
 
22
- If you like what I do in WordPress, you will also like [ManageWP](http://managewp.com "Manage WordPress sites") service.
23
 
24
  == Changelog ==
25
 
 
 
 
 
 
 
26
  = 2.7.6 =
27
  * WordPress 3.8 compatibility.
28
 
1
  === SEO Friendly Images ===
2
  Contributors: freediver
3
  Donate link: https://www.networkforgood.org/donation/MakeDonation.aspx?ORGID2=920155875
4
+ Tags: seo, images, Post, admin, google, attachment, optimize, photo, picture, image, media, photos, pictures
5
  Requires at least: 2.7
6
+ Tested up to: 4.1
7
  Stable tag: trunk
8
 
9
  SEO Friendly Images automatically adds alt and title attributes to all your images improving traffic from search engines.
10
 
11
  == Description ==
12
 
 
13
  SEO Friendly Images is a Wordpress SEO plugin which automatically updates all images with proper ALT and TITLE attributes for SEO purposes. If your images do not have ALT and TITLE already set, SEO Friendly Images will add them according the options you set. Additionally this makes the post W3C/xHTML valid as well.
14
 
15
  ALT attribute is important part of search engine optimization. It describes your images to search engine and when a user searches for a certain image this is a key determining factor for a match.
18
 
19
  Plugin by [Vladimir Prelovac](http://www.prelovac.com/vladimir/ "Vladimir Prelovac").
20
 
21
+ If you like what I do in WordPress, you will also like the [ManageWP](https://managewp.com "Manage WordPress sites") service.
22
 
23
  == Changelog ==
24
 
25
+ = 3.0 =
26
+ * Major rewrite and optimization of the plugin
27
+ * New tags to use in ALT and TITLE attributes
28
+ * All reported bugs fixed
29
+ * WordPress 4.1 and up compatible
30
+
31
  = 2.7.6 =
32
  * WordPress 3.8 compatibility.
33
 
seo-friendly-images.class.php ADDED
@@ -0,0 +1,1317 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ class SEOFriendlyImages {
3
+ var $local_version;
4
+ var $plugin_url;
5
+ var $key;
6
+ var $name;
7
+ var $cap;
8
+ var $rules;
9
+
10
+ var $global;
11
+ var $tree;
12
+ var $process_parameters;
13
+
14
+ function SEOFriendlyImages() {
15
+ $this->local_version = "3.0";
16
+ $this->plugin_url = trailingslashit(plugins_url(null, __FILE__));
17
+ $this->key = 'seo-friendly-images';
18
+ $this->name = 'SEO Friendly Images';
19
+ $this->cap = 'manage_options';
20
+
21
+ $domain_name = 'seo-friendly-images';
22
+ $locale_name = get_locale();
23
+ $mofile_name = dirname( __FILE__ ) . '/languages';
24
+ $mofile_name .= "/$domain_name-$locale_name.mo";
25
+ load_textdomain( 'seo-friendly-images', $mofile_name );
26
+ load_plugin_textdomain( 'seo-friendly-images', false, dirname( plugin_basename( __FILE__ ) ) . '/languages/' );
27
+
28
+
29
+
30
+ $this->add_filters_and_hooks();
31
+ $options = $this->get_options();
32
+ $this->rules = $options['rules'];
33
+ $this->global = $options['global'];
34
+ $this->tree = null;
35
+ $this->build_tree();
36
+ }
37
+
38
+ function add_filters_and_hooks() {
39
+ add_action( 'wp_enqueue_scripts', array( $this, 'load_scripts' ) );
40
+ add_action( 'wp_enqueue_scripts', array( $this, 'load_styles' ) );
41
+ add_action( 'admin_menu', array( $this, 'seo_friendly_images_add_pages' ) );
42
+ add_filter( 'the_content', array( $this, 'seo_friendly_images' ), 500 );
43
+ add_filter( 'post_thumbnail_html', array( $this, 'seo_friendly_images_featured' ), 500 );
44
+
45
+ }
46
+
47
+ function seo_friendly_images_add_pages() {
48
+ $image = $this->plugin_url . '/i/icon.png';
49
+
50
+ add_menu_page( $this->name, $this->name, $this->cap, 'sfi_settings', array(
51
+ &$this,
52
+ 'handle_settings'
53
+ ), $image );
54
+ $page_settings = add_submenu_page( 'sfi_settings', $this->name . ' Settings', 'Settings', $this->cap, 'sfi_settings', array(
55
+ &$this,
56
+ 'handle_settings'
57
+ ) );
58
+
59
+ $page_about = add_submenu_page( 'sfi_settings', $this->name . ' About', 'About', $this->cap, 'sfi_about', array(
60
+ &$this,
61
+ 'handle_about'
62
+ ) );
63
+
64
+ add_action( 'admin_print_scripts-' . $page_settings, array( $this, 'admin_scripts' ) );
65
+ add_action( 'admin_head-' . $page_settings, array( $this, 'options_head_settings' ) );
66
+
67
+ add_action( 'admin_head-' . $page_about, array( $this, 'options_head_about' ) );
68
+ }
69
+
70
+ function head() {
71
+
72
+ }
73
+
74
+ function admin_scripts() {
75
+ if ( ! empty( $_REQUEST['page'] ) ) {
76
+ $page = $_REQUEST['page'];
77
+ } else {
78
+ $page = false;
79
+ }
80
+ if ( $page == 'sfi_settings' ) {
81
+ $script_path = $this->plugin_url . '/javascripts/sfi.js';
82
+ wp_register_script( 'sfi', $script_path );
83
+
84
+ wp_enqueue_script( 'sfi' );
85
+ }
86
+ }
87
+
88
+ function options_head_settings() {
89
+ ?>
90
+ <style type="text/css">
91
+ .settings {
92
+ margin:5px;
93
+ }
94
+ .holder{
95
+ width:750px;
96
+ margin:0 0 10px;
97
+ }
98
+ h4.big{font-size: 18px;margin: 15px 0 10px 0;padding: 0; background:url('<?php echo $this->plugin_url .'/i/arrows.png'; ?>') no-repeat right -37px;}
99
+ h4.big.col{background-position: right 0px;}
100
+ h4#title_global{ background:none;}
101
+ #icon-sfi_settings { background:transparent url( '<?php echo $this->plugin_url .'/i/logo.png'; ?>' ) no-repeat; }
102
+ .line{display:inline-block; width:220px; padding:0 40px 0 0;}
103
+ .line2{display:inline-block; width:190px; padding:0 40px 0 0;}
104
+ #defualt_settings div{margin:0 0 15px;}
105
+ #mainblock .regular-text{border-color: #DFDFDF;background: white; border-radius:3px;-webkit-border-radius:3px;-moz-border-radius:3px;border-radius:3px; width:275px;margin: 0;}
106
+ #mainblock .regular-text.small{width:100px;}
107
+ #mainblock .regular-text.smaller{width:130px;margin:4px 0 0;}
108
+ #default_override_div ul li,.rule,ul.lists li{margin-bottom:15px;}
109
+ #default_override_div input[type=checkbox],#global_settings input[type=checkbox]{vertical-align:top;}
110
+ #default_attach_internal_images_div select{margin:0;}
111
+ #rule_buttons{}
112
+ .settings{margin:0;}
113
+ .settingstop{width: 100%;clear: both;float: left;margin-bottom: 20px;}
114
+ .settingstop div{
115
+ display:inline-block;
116
+ }
117
+ .settingssec{display: block;width: 100%;clear: both;}
118
+ .settingssec .settings, .rew{display: inline-block;width: 170px;vertical-align: top;margin:0 0 20px;}
119
+ .radios ul li input[type=radio], ul.lists li input[type=checbox]{vertical-align:top;}
120
+ h4.big:hover{cursor:pointer;}
121
+
122
+ </style>
123
+ <script>
124
+ jQuery(document).ready(function($) {
125
+ expand_cbox( 0 );
126
+
127
+ $('#add_rule').click(function() {
128
+ var temp = 1;
129
+ while ($('#title_rule_' + temp).length != 0) temp = temp + 1;
130
+ var rule = jQuery('#rule_copy').html();
131
+ rule = rule.replace(/number/g, temp );
132
+ $('#rule_buttons').before(rule);
133
+ load_js(temp, false);
134
+ temp = temp + 1;
135
+ });
136
+ $('#remove_rule').click(function() {
137
+ var temp = 1;
138
+ while ($('#title_rule_' + temp).length != 0 ) temp = temp + 1;
139
+ $('#title_rule_' + (temp - 1 )).remove();
140
+ $('#rule_' + (temp - 1) + '_settings_div').remove();
141
+ });
142
+ $('#post-box h4.big').click(function() {
143
+ $(this).toggleClass('col');
144
+ $(this).next().toggle();
145
+ });
146
+ });
147
+ </script>
148
+ <?php
149
+ }
150
+
151
+
152
+ function options_head_about() {
153
+
154
+ }
155
+
156
+ function load_scripts() {
157
+
158
+ }
159
+
160
+ function load_styles() {
161
+
162
+ }
163
+
164
+ function remove_from_domains( $rule, $domain ) {
165
+ if ( isset( $this->rules[$rule]['domains'] ) ) {
166
+ if ( ! empty( $this->rules[$rule]['domains'] ) ) {
167
+ if ( in_array( $domain, $this->rules[$rule]['domains'] ) ) {
168
+ foreach( $this->rules[$rule]['domains'] as $key => $value ) {
169
+ if ( $value == $domain ) {
170
+ unset( $this->rules[$rule]['domains'][$key] );
171
+ }
172
+ }
173
+ }
174
+ }
175
+ }
176
+ }
177
+
178
+
179
+
180
+ function handle_settings() {
181
+ if ( isset( $_POST['submitted'] ) ) {
182
+
183
+ $this->rules[0]['domains'] = array( 'all' );
184
+ $this->rules[0]['options']['alt'] = ( ! isset( $_POST['default_alt'] ) ? '' : $_POST['default_alt'] );
185
+ $this->rules[0]['options']['title'] = ( ! isset( $_POST['default_title'] ) ? '' : $_POST['default_title'] );
186
+ $this->rules[0]['options']['override_alt'] = ( ! isset( $_POST['default_override_alt'] ) ? 'off' : 'on' );
187
+ $this->rules[0]['options']['override_title'] = ( ! isset( $_POST['default_override_title'] ) ? 'off' : 'on' );
188
+ $this->rules[0]['options']['strip_extension_title'] = ( ! isset( $_POST['default_strip_extension_title'] ) ? 'off' : 'on' );
189
+
190
+
191
+ $this->rules[0]['options']['enable'] = 'on';
192
+
193
+
194
+
195
+
196
+ $i = 1;
197
+ while ( isset( $_POST['rule_' . $i . '_hidden'] ) ) {
198
+ $this->rules[$i]['domains'] = array();
199
+ if ( isset( $_POST['rule_' . $i . '_domain_main'] ) ) {
200
+ array_push( $this->rules[$i]['domains'], 'main' );
201
+ $this->remove_from_domains( $i, 'home' );
202
+ $this->remove_from_domains( $i, 'front' );
203
+ } else {
204
+ if ( isset( $_POST['rule_' . $i . '_domain_home'] ) ) {
205
+ array_push( $this->rules[$i]['domains'], 'home' );
206
+ }
207
+ if ( isset( $_POST['rule_' . $i . '_domain_front'] ) ) {
208
+ array_push( $this->rules[$i]['domains'], 'front' );
209
+ }
210
+ }
211
+ if ( isset( $_POST['rule_' . $i . '_domain_archive'] ) ) {
212
+ if ( ( $_POST['rule_' . $i . '_domain_category_ids'] == '' ) && ( $_POST['rule_' . $i . '_domain_tag_ids'] == '' ) && ( $_POST['rule_' . $i . '_domain_taxonomy_ids'] == '' ) && ( $_POST['rule_' . $i . '_domain_author_ids'] == '' ) ) {
213
+ array_push( $this->rules[$i]['domains'], 'archive' );
214
+ $this->remove_from_domains( $i, 'category' );
215
+ $this->remove_from_domains( $i, 'tag' );
216
+ $this->remove_from_domains( $i, 'taxonomy' );
217
+ $this->remove_from_domains( $i, 'author' );
218
+ $this->remove_from_domains( $i, 'date' );
219
+ $this->remove_from_domains( $i, 'year' );
220
+ $this->remove_from_domains( $i, 'month' );
221
+ $this->remove_from_domains( $i, 'day' );
222
+ $this->remove_from_domains( $i, 'time' );
223
+ } else {
224
+ if ( isset( $_POST['rule_' . $i . '_domain_category_ids'] ) && ( "" != $_POST['rule_' . $i . '_domain_category_ids'] ) ) {
225
+ $ids = $_POST['rule_' . $i . '_domain_category_ids'];
226
+ $array_ids = explode( ',', $ids );
227
+ $this->rules[$i]['domains']['category'] = $array_ids;
228
+ $this->remove_from_domains( $i, 'category' );
229
+ } else {
230
+ array_push( $this->rules[$i]['domains'], 'category' );
231
+ unset( $this->rules[$i]['domains']['category'] );
232
+ }
233
+ if ( isset( $_POST['rule_' . $i . '_domain_tag_ids'] ) && ( "" != $_POST['rule_' . $i . '_domain_tag_ids'] ) ) {
234
+ $ids = $_POST['rule_' . $i . '_domain_tag_ids'];
235
+ $array_ids = explode( ',', $ids );
236
+ $this->rules[$i]['domains']['tag'] = $array_ids;
237
+ $this->remove_from_domains( $i, 'tag' );
238
+ } else {
239
+ array_push( $this->rules[$i]['domains'], 'tag' );
240
+ unset( $this->rules[$i]['domains']['tag'] );
241
+ }
242
+ if ( isset( $_POST['rule_' . $i . '_domain_taxonomy_ids'] ) && ( "" != $_POST['rule_' . $i . '_domain_taxonomy_ids'] ) ) {
243
+ $ids = $_POST['rule_' . $i . '_domain_taxonomy_ids'];
244
+ $array_ids = explode( ',', $ids );
245
+ $this->rules[$i]['domains']['taxonomy'] = $array_ids;
246
+ $this->remove_from_domains( $i, 'taxonomy' );
247
+ } else {
248
+ array_push( $this->rules[$i]['domains'], 'taxonomy' );
249
+ unset( $this->rules[$i]['domains']['taxonomy'] );
250
+ }
251
+ if ( isset( $_POST['rule_' . $i . '_domain_author_ids'] ) && ( "" != $_POST['rule_' . $i . '_domain_author_ids'] ) ) {
252
+ $ids = $_POST['rule_' . $i . '_domain_author_ids'];
253
+ $array_ids = explode( ',', $ids );
254
+ $this->rules[$i]['domains']['author'] = $array_ids;
255
+ $this->remove_from_domains( $i, 'author' );
256
+ } else {
257
+ array_push( $this->rules[$i]['domains'], 'author' );
258
+ unset( $this->rules[$i]['domains']['author'] );
259
+ }
260
+ array_push( $this->rules[$i]['domains'], 'date' );
261
+ $this->remove_from_domains( $i, 'year' );
262
+ $this->remove_from_domains( $i, 'month' );
263
+ $this->remove_from_domains( $i, 'day' );
264
+ $this->remove_from_domains( $i, 'time' );
265
+ }
266
+ } else {
267
+ if ( isset( $_POST['rule_' . $i . '_domain_category_ids'] ) && ( "" != $_POST['rule_' . $i . '_domain_category_ids'] ) ) {
268
+ $ids = $_POST['rule_' . $i . '_domain_category_ids'];
269
+ $array_ids = explode( ',', $ids );
270
+ $this->rules[$i]['domains']['category'] = $array_ids;
271
+ $this->remove_from_domains( $i, 'category' );
272
+ } else {
273
+ if ( isset( $_POST['rule_' . $i . '_domain_category'] ) ) {
274
+ array_push( $this->rules[$i]['domains'], 'category' );
275
+ }
276
+ unset( $this->rules[$i]['domains']['category'] );
277
+ }
278
+ if ( isset( $_POST['rule_' . $i . '_domain_tag_ids'] ) && ( "" != $_POST['rule_' . $i . '_domain_tag_ids'] ) ) {
279
+ $ids = $_POST['rule_' . $i . '_domain_tag_ids'];
280
+ $array_ids = explode( ',', $ids );
281
+ $this->rules[$i]['domains']['tag'] = $array_ids;
282
+ $this->remove_from_domains( $i, 'tag' );
283
+ } else {
284
+ if ( isset( $_POST['rule_' . $i . '_domain_tag'] ) ) {
285
+ array_push( $this->rules[$i]['domains'], 'tag' );
286
+ }
287
+ unset( $this->rules[$i]['domains']['tag'] );
288
+ }
289
+ if ( isset( $_POST['rule_' . $i . '_domain_taxonomy_ids'] ) && ( "" != $_POST['rule_' . $i . '_domain_taxonomy_ids'] ) ) {
290
+ $ids = $_POST['rule_' . $i . '_domain_taxonomy_ids'];
291
+ $array_ids = explode( ',', $ids );
292
+ $this->rules[$i]['domains']['taxonomy'] = $array_ids;
293
+ $this->remove_from_domains( $i, 'taxonomy' );
294
+ } else {
295
+ if ( isset( $_POST['rule_' . $i . '_domain_taxonomy'] ) ) {
296
+ array_push( $this->rules[$i]['domains'], 'taxonomy' );
297
+ }
298
+ unset( $this->rules[$i]['domains']['taxonomy'] );
299
+ }
300
+ if ( isset( $_POST['rule_' . $i . '_domain_author_ids'] ) && ( "" != $_POST['rule_' . $i . '_domain_author_ids'] ) ) {
301
+ $ids = $_POST['rule_' . $i . '_domain_author_ids'];
302
+ $array_ids = explode( ',', $ids );
303
+ $this->rules[$i]['domains']['author'] = $array_ids;
304
+ $this->remove_from_domains( $i, 'author' );
305
+ } else {
306
+ if ( isset( $_POST['rule_' . $i . '_domain_author'] ) ) {
307
+ array_push( $this->rules[$i]['domains'], 'author' );
308
+ }
309
+ unset( $this->rules[$i]['domains']['author'] );
310
+ }
311
+ if ( isset( $_POST['rule_' . $i . '_domain_date'] ) ) {
312
+ array_push( $this->rules[$i]['domains'], 'date' );
313
+ $this->remove_from_domains( $i, 'year' );
314
+ $this->remove_from_domains( $i, 'month' );
315
+ $this->remove_from_domains( $i, 'day' );
316
+ $this->remove_from_domains( $i, 'time' );
317
+ } else {
318
+ if ( isset( $_POST['rule_' . $i . '_domain_year'] ) ) {
319
+ array_push( $this->rules[$i]['domains'], 'year' );
320
+ }
321
+ if ( isset( $_POST['rule_' . $i . '_domain_month'] ) ) {
322
+ array_push( $this->rules[$i]['domains'], 'month' );
323
+ }
324
+ if ( isset( $_POST['rule_' . $i . '_domain_day'] ) ) {
325
+ array_push( $this->rules[$i]['domains'], 'day' );
326
+ }
327
+ if ( isset( $_POST['rule_' . $i . '_domain_time'] ) ) {
328
+ array_push( $this->rules[$i]['domains'], 'time' );
329
+ }
330
+ }
331
+ }
332
+ if ( isset( $_POST['rule_' . $i . '_domain_singular'] ) ) {
333
+ if ( ( $_POST['rule_' . $i . '_domain_post_ids'] == '' ) && ( $_POST['rule_' . $i . '_domain_page_ids'] == '' ) && ( $_POST['rule_' . $i . '_domain_attachment_ids'] == '' ) ) {
334
+ array_push( $this->rules[$i]['domains'], 'singular' );
335
+ $this->remove_from_domains( $i, 'post' );
336
+ $this->remove_from_domains( $i, 'page' );
337
+ $this->remove_from_domains( $i, 'attachment' );
338
+ } else {
339
+ if ( isset( $_POST['rule_' . $i . '_domain_post_ids'] ) && ( "" != $_POST['rule_' . $i . '_domain_post_ids'] ) ) {
340
+ $ids = $_POST['rule_' . $i . '_domain_post_ids'];
341
+ $array_ids = explode( ',', $ids );
342
+ $this->rules[$i]['domains']['post'] = $array_ids;
343
+ } else {
344
+ array_push( $this->rules[$i]['domains'], 'post' );
345
+ unset( $this->rules[$i]['domains']['post'] );
346
+ }
347
+ if ( isset( $_POST['rule_' . $i . '_domain_page_ids'] ) && ( "" != $_POST['rule_' . $i . '_domain_page_ids'] ) ) {
348
+ $ids = $_POST['rule_' . $i . '_domain_page_ids'];
349
+ $array_ids = explode( ',', $ids );
350
+ $this->rules[$i]['domains']['page'] = $array_ids;
351
+ } else {
352
+ array_push( $this->rules[$i]['domains'], 'page' );
353
+ unset( $this->rules[$i]['domains']['page'] );
354
+ }
355
+ if ( isset( $_POST['rule_' . $i . '_domain_attachment_ids'] ) && ( "" != $_POST['rule_' . $i . '_domain_attachment_ids'] ) ) {
356
+ $ids = $_POST['rule_' . $i . '_domain_attachment_ids'];
357
+ $array_ids = explode( ',', $ids );
358
+ $this->rules[$i]['domains']['attachment'] = $array_ids;
359
+ } else {
360
+ array_push( $this->rules[$i]['domains'], 'attachment' );
361
+ unset( $this->rules[$i]['domains']['attachment'] );
362
+ }
363
+ }
364
+ } else {
365
+ if ( isset( $_POST['rule_' . $i . '_domain_post_ids'] ) && ( "" != $_POST['rule_' . $i . '_domain_post_ids'] ) ) {
366
+ $ids = $_POST['rule_' . $i . '_domain_post_ids'];
367
+ $array_ids = explode( ',', $ids );
368
+ $this->rules[$i]['domains']['post'] = $array_ids;
369
+ $this->remove_from_domains( $i, 'post' );
370
+ } else {
371
+ if ( isset( $_POST['rule_' . $i . '_domain_post'] ) ) {
372
+ array_push( $this->rules[$i]['domains'], 'post' );
373
+ }
374
+ unset( $this->rules[$i]['domains']['post'] );
375
+ }
376
+ if ( isset( $_POST['rule_' . $i . '_domain_page_ids'] ) && ( "" != $_POST['rule_' . $i . '_domain_page_ids'] ) ) {
377
+ $ids = $_POST['rule_' . $i . '_domain_page_ids'];
378
+ $array_ids = explode( ',', $ids );
379
+ $this->rules[$i]['domains']['page'] = $array_ids;
380
+ $this->remove_from_domains( $i, 'page' );
381
+ } else {
382
+ if ( isset( $_POST['rule_' . $i . '_domain_page'] ) ) {
383
+ array_push( $this->rules[$i]['domains'], 'page' );
384
+ }
385
+ unset( $this->rules[$i]['domains']['page'] );
386
+ }
387
+ if ( isset( $_POST['rule_' . $i . '_domain_attachment_ids'] ) && ( "" != $_POST['rule_' . $i . '_domain_attachment_ids'] ) ) {
388
+ $ids = $_POST['rule_' . $i . '_domain_attachment_ids'];
389
+ $array_ids = explode( ',', $ids );
390
+ $this->rules[$i]['domains']['attachment'] = $array_ids;
391
+ $this->remove_from_domains( $i, 'attachment' );
392
+ } else {
393
+ if ( isset( $_POST['rule_' . $i . '_domain_attachment'] ) ) {
394
+ array_push( $this->rules[$i]['domains'], 'attachment' );
395
+ }
396
+ unset( $this->rules[$i]['domains']['attachment'] );
397
+ }
398
+ }
399
+
400
+ $this->rules[$i]['options']['enable'] = ( ! isset( $_POST['rule_' . $i . '_enable'] ) ? 'off' : ( ( $_POST['rule_' . $i . '_enable'] == 'enabled' ) ? 'on' : 'off' ) );
401
+
402
+ if ( $this->rules[$i]['options']['enable'] == 'on' ) {
403
+ $this->rules[$i]['options']['alt'] = ( ! isset( $_POST['rule_' . $i . '_alt'] ) ? '' : $_POST['default_alt'] );
404
+ $this->rules[$i]['options']['title'] = ( ! isset( $_POST['rule_' . $i . '_title'] ) ? '' : $_POST['default_title'] );
405
+ $this->rules[$i]['options']['override_alt'] = ( ! isset( $_POST['rule_' . $i . '_override_alt'] ) ? 'off' : 'on' );
406
+ $this->rules[$i]['options']['override_title'] = ( ! isset( $_POST['rule_' . $i . '_override_title'] ) ? 'off' : 'on' );
407
+ $this->rules[$i]['options']['strip_extension_title'] = ( ! isset( $_POST['rule_' . $i . '_strip_extension_title'] ) ? 'off' : 'on' );
408
+
409
+
410
+ } else {
411
+ unset( $this->rules[$i]['options']['alt'] );
412
+ unset( $this->rules[$i]['options']['title'] );
413
+ unset( $this->rules[$i]['options']['override_alt'] );
414
+ unset( $this->rules[$i]['options']['override_title'] );
415
+ unset( $this->rules[$i]['options']['strip_extension_title'] );
416
+
417
+
418
+ }
419
+
420
+ $i++;
421
+ }
422
+
423
+ for ( $j = $i; $j <= count( $this->rules ); $j++ ) {
424
+ unset( $this->rules[$j] );
425
+ }
426
+
427
+ $options['rules'] = $this->rules;
428
+
429
+
430
+
431
+ update_option( $this->key, $options );
432
+ $this->tree = null;
433
+ $this->build_tree();
434
+
435
+ $msg_status = __( 'SEO Friendly Images settings saved.', 'seo-friendly-images' );
436
+
437
+ // Show message
438
+ echo '<div id="message" class="updated fade"><p>' . $msg_status . '</p></div>';
439
+ }
440
+
441
+ // Fetch code from DB
442
+ if (isset($this->rules))
443
+ foreach ( $this->rules as $key => $rule ) {
444
+ $form[$key]['domains'] = $rule['domains'];
445
+ $form[$key]['options'] = $rule['options'];
446
+ $form[$key]['options']['enable'] = ( $rule['options']['enable'] == 'on' ) ? 'checked' : '';
447
+ if ( $key == 0 || $rule['options']['enable'] == 'on' ) {
448
+ $form[$key]['options']['override_alt'] = ( $rule['options']['override_alt'] == 'on' ) ? 'checked' : '';
449
+ $form[$key]['options']['override_title'] = ( $rule['options']['override_title'] == 'on' ) ?'checked' : '';
450
+ $form[$key]['options']['strip_extension_title'] = ( $rule['options']['strip_extension_title'] == 'on' ) ?'checked' : '';
451
+
452
+ $form[$key]['options']['external_links'] = ( $rule['options']['external_links'] == 'on' ) ? 'checked' : '';
453
+ }
454
+ }
455
+
456
+
457
+
458
+ $imgpath = $this->plugin_url . '/i';
459
+ $actionurl = $_SERVER['REQUEST_URI'];
460
+ // Configuration Page
461
+ ?>
462
+ <div class="wrap">
463
+ <?php screen_icon(); ?>
464
+ <h2><?php _e( 'SEO Friendly Images', 'seo-friendly-images' ); echo '&nbsp;' . $this->local_version; ?></h2>
465
+ <a href="admin.php?page=sfi_settings"><?php _e( 'Settings', 'seo-friendly-images' ); ?></a> &nbsp; | &nbsp; <a href="admin.php?page=sfi_about"><?php _e( 'About', 'seo-friendly-images' ); ?></a>
466
+ <div id="poststuff" style="margin-top:10px;">
467
+
468
+ <div id="sideblock" style="float:right;width:270px;margin-left:10px;">
469
+ <div class="ad">
470
+ <a href="https://managewp.com/?utm_source=Plugins&amp;utm_medium=Banner&amp;utm_content=mwp250_2&amp;utm_campaign=SEOFriendlyImages" title="ManageWP.com - Manage your sites from one dashboard"><img src="<?php echo $imgpath ?>/mwp250_2.png" alt="ManageWP.com - Manage Multiple WordPress Sites"></a>
471
+ </div><br>
472
+ <div class="ad">
473
+ <a target="_blank" href="http://www.prelovac.com/products/seo-smart-links"><img src="<?php echo $imgpath ?>/seosmart125.png" title="SEO Smart Links Premium" alt="SEO Smart Links Premium"></a>
474
+ <a target="_blank" href="http://www.prelovac.com/products/seo-friendly-images"><img src="<?php echo $imgpath ?>/seoimages125_v2.jpg" title="SEO Friendly Images Premium" alt="SEO Friendly Images Premium"></a>
475
+ </div>
476
+ </div>
477
+ </div>
478
+ <div id="mainblock" class="submit">
479
+ <div class="dbx-content">
480
+ <form name="sfiform" action="<?php echo $actionurl; ?>" method="post">
481
+ <input type="hidden" name="submitted" value="1" />
482
+ <p><?php _e( 'SEO Friendly Images automatically adds ALT and Title attributes to all your images in all your posts. Default options are usually good but you can change them below.', 'seo-friendly-images' ); ?></p>
483
+ <p><strong><?php _e( 'Plugin supports several special tags:', 'seo-friendly-images' ); ?></strong></p>
484
+ <ul>
485
+ <li><b>%title</b> - <?php _e( 'replaces post title', 'seo-friendly-images' ); ?></li>
486
+ <li><b>%desc</b> - <?php _e( 'replaces post excerpt', 'seo-friendly-images' ); ?></li>
487
+ <li><b>%name</b> - <?php _e( 'replaces image file name ( without extension )', 'seo-friendly-images' ); ?></li>
488
+ <li><b>%category</b> - <?php _e( 'replaces post category', 'seo-friendly-images' ); ?></li>
489
+ <li><b>%tags</b> - <?php _e( 'replaces post tags', 'seo-friendly-images' ); ?></li>
490
+ </ul>
491
+ <p>
492
+ <strong><?php _e( 'Example:', 'seo-friendly-images' ); ?></strong>
493
+ <?php _e( 'In a post titled Car Pictures there is a picture named Ferrari.jpg', 'seo-friendly-images' ); ?><br /><br />
494
+ <?php _e( 'Setting alt attribute to <b>"%name %title"</b> will produce alt="Ferrari Car Pictures"', 'seo-friendly-images' ); ?><br />
495
+ <?php _e( 'Setting title attribute to <b>"%name photo"</b> will produce title="Ferrari photo"', 'seo-friendly-images' ); ?>
496
+ </p>
497
+ <div id="poststuff" class="postbox holder">
498
+ <h3 class="hndle"><span><?php _e( 'Settings', 'seo-friendly-images' ); ?></span></h3>
499
+ <div class="inside">
500
+
501
+
502
+ <div id="defualt_settings" style="width:710px;" class="settings">
503
+ <div id="default_alt_div">
504
+ <label class="line" for="default_alt"><?php _e( 'Image <b>ALT</b> attribute:', 'seo-friendly-images' ); ?></label>
505
+ <input class="regular-text" type="text" id="default_alt" name="default_alt" value="<?php echo $form[0]['options']['alt']; ?>" />
506
+ <span class="description"><?php _e( 'example: %name %title', 'seo-friendly-images' ); ?></span>
507
+ </div>
508
+ <div id="default_title_div">
509
+ <label class="line" for="default_title"><?php _e( 'Image <b>TITLE</b> attribute:', 'seo-friendly-images' ); ?></label>
510
+ <input class="regular-text" type="text" id="default_title" name="default_title" value="<?php echo $form[0]['options']['title']; ?>" />
511
+ <span class="description"><?php _e( 'example: %name photo', 'seo-friendly-images' ); ?></span>
512
+ </div>
513
+ <div id="default_override_div">
514
+ <ul>
515
+ <li>
516
+ <label class="line" for="default_override_alt"><?php _e( 'Override default image alt tag', 'seo-friendly-images' ); ?></label>
517
+ <input type="checkbox" id="default_override_alt" name="default_override_alt" <?php echo $form[0]['options']['override_alt']; ?> />
518
+ <?php _e( '<span class="description">( recommended )</span>', 'seo-friendly-images' ); ?>
519
+ </li>
520
+ <li>
521
+ <label class="line" for="default_override_title"><?php _e( 'Override default image title tag', 'seo-friendly-images' ); ?></label>
522
+ <input type="checkbox" id="default_override_title" name="default_override_title" <?php echo $form[0]['options']['override_title']; ?> />
523
+ </li>
524
+ <li>
525
+ <label class="line" for="default_strip_extension_title"><?php _e( 'Strip extension and delimiter characters (like dot dash etc) from the title tag', 'seo-friendly-images' ); ?></label>
526
+ <input type="checkbox" id="default_strip_extension_title" name="default_strip_extension_title" <?php echo $form[0]['options']['strip_extension_title']; ?> />
527
+ </li>
528
+
529
+ </ul>
530
+ </div>
531
+
532
+ </div>
533
+ </div>
534
+ </div>
535
+ <?php for ( $i = 1; $i < count( $form ) - 1; $i++ ): ?>
536
+ <script type="text/javascript">
537
+ jQuery( document ).ready( function( $){
538
+ load_js(<?php echo $i; ?>, true );
539
+ });
540
+ </script>
541
+ <div id="post-box" class="postbox holder">
542
+ <div class="inside">
543
+ <h4 class="big" id="title_rule_<?php echo $i; ?>"><?php echo __( 'Rule', 'seo-friendly-images' ) . ' ' . $i; ?></h4>
544
+ <div id="rule_<?php echo $i; ?>_settings_div" style="width:710px;" class="settings">
545
+ <div id="rule_<?php echo $i; ?>_domains_div" class="settings">
546
+ <div id="rule_<?php echo $i; ?>_domain_main_all_div" class="settings settingstop">
547
+ <div id="rule_<?php echo $i; ?>_domain_main_div" class="rew">
548
+ <input type="checkbox" id="rule_<?php echo $i; ?>_domain_main" name="rule_<?php echo $i; ?>_domain_main" <?php echo ( in_array( 'main', $form[$i]['domains'] ) ) ? 'checked' : ''; ?> />
549
+ <label for="rule_<?php echo $i; ?>_domain_main"><?php _e( 'Main Pages', 'seo-friendly-images' ); ?></label>
550
+ </div>
551
+ <div id="rule_<?php echo $i; ?>_subdomains_main_div">
552
+ <input type="checkbox" id="rule_<?php echo $i; ?>_domain_home" name="rule_<?php echo $i; ?>_domain_home" <?php echo ( in_array( 'main', $form[$i]['domains'] ) || in_array( 'home', $form[$i]['domains'] ) ) ? 'checked' : ''; ?> <?php echo ( in_array( 'main', $form[$i]['domains'] ) ) ? 'disabled' : ''; ?> />
553
+ <label for="rule_<?php echo $i; ?>_domain_home"><?php _e( 'Home Pages', 'seo-friendly-images' ); ?></label>
554
+ <br />
555
+ <input type="checkbox" id="rule_<?php echo $i; ?>_domain_front" name="rule_<?php echo $i; ?>_domain_front" <?php echo ( in_array( 'main', $form[$i]['domains'] ) || in_array( 'front', $form[$i]['domains'] ) ) ? 'checked' : ''; ?> <?php echo ( in_array( 'main', $form[$i]['domains'] ) ) ? 'disabled' : ''; ?> />
556
+ <label for="rule_<?php echo $i; ?>_domain_front"><?php _e( 'Front Pages', 'seo-friendly-images' ); ?></label>
557
+ </div>
558
+ <div style="clear:both">
559
+ </div>
560
+ </div>
561
+ <div id="rule_<?php echo $i; ?>_domain_archive_all_div" class="settings settingssec">
562
+ <div id="rule_<?php echo $i; ?>_domain_archive_div">
563
+ <input type="checkbox" id="rule_<?php echo $i; ?>_domain_archive" name="rule_<?php echo $i; ?>_domain_archive" <?php echo ( in_array( 'archive', $form[$i]['domains'] ) ) ? 'checked' : ''; ?> />
564
+ <label for="rule_<?php echo $i; ?>_domain_archive"><?php _e( 'Archive Pages', 'seo-friendly-images' ); ?></label>
565
+ </div>
566
+ <br />
567
+ <div id="rule_<?php echo $i; ?>_subdomains_archive_div">
568
+ <div id="rule_<?php echo $i; ?>_domain_category_all_div" class="settings">
569
+ <input type="checkbox" id="rule_<?php echo $i; ?>_domain_category" name="rule_<?php echo $i; ?>_domain_category" <?php echo ( in_array( 'archive', $form[$i]['domains'] ) || in_array( 'category', $form[$i]['domains'] ) ) ? 'checked' : ''; ?> <?php echo ( in_array( 'archive', $form[$i]['domains'] ) ) ? 'disabled' : ''; ?> />
570
+ <label for="rule_<?php echo $i; ?>_domain_category"><?php _e( 'All Categories', 'seo-friendly-images' ); ?></label>
571
+ <br />
572
+ <div id="rule_<?php echo $i; ?>_domain_category_ids_div">
573
+ <?php _e( 'or specify by IDs:', 'seo-friendly-images' ); ?>
574
+ <br />
575
+ <input class="regular-text smaller" type="text" id="rule_<?php echo $i; ?>_domain_category_ids" name="rule_<?php echo $i; ?>_domain_category_ids" value="<?php echo ( isset( $form[$i]['domains']['category'] ) ) ? implode( ',', $form[$i]['domains']['category'] ) : ''; ?>" />
576
+ </div>
577
+ </div>
578
+ <div id="rule_<?php echo $i; ?>_domain_tag_all_div" class="settings">
579
+ <input type="checkbox" id="rule_<?php echo $i; ?>_domain_tag" name="rule_<?php echo $i; ?>_domain_tag" <?php echo ( in_array( 'archive', $form[$i]['domains'] ) || in_array( 'tag', $form[$i]['domains'] ) ) ? 'checked' : ''; ?> <?php echo ( in_array( 'archive', $form[$i]['domains'] ) ) ? 'disabled' : ''; ?> />
580
+ <label for="rule_<?php echo $i; ?>_domain_tag"><?php _e( 'All Tags', 'seo-friendly-images' ); ?></label>
581
+ <br />
582
+ <div id="rule_<?php echo $i; ?>_domain_tag_ids_div">
583
+ <?php _e( 'or specify by IDs:', 'seo-friendly-images' ); ?>
584
+ <br />
585
+ <input class="regular-text smaller" type="text" id="rule_<?php echo $i; ?>_domain_tag_ids" name="rule_<?php echo $i; ?>_domain_tag_ids" value="<?php echo ( isset( $form[$i]['domains']['tag'] ) ) ? implode( ',', $form[$i]['domains']['tag'] ) : ''; ?>" />
586
+ </div>
587
+ </div>
588
+ <div id="rule_<?php echo $i; ?>_domain_taxonomy_all_div" class="settings">
589
+ <input type="checkbox" id="rule_<?php echo $i; ?>_domain_taxonomy" name="rule_<?php echo $i; ?>_domain_taxonomy" <?php echo ( in_array( 'archive', $form[$i]['domains'] ) || in_array( 'taxonomy', $form[$i]['domains'] ) ) ? 'checked' : ''; ?> <?php echo ( in_array( 'archive', $form[$i]['domains'] ) ) ? 'disabled' : ''; ?> />
590
+ <label for="rule_<?php echo $i; ?>_domain_taxonomy"><?php _e( 'All Taxonomies', 'seo-friendly-images' ); ?></label>
591
+ <br />
592
+ <div id="rule_<?php echo $i; ?>_domain_taxonomy_ids_div">
593
+ <?php _e( 'or specify by IDs:', 'seo-friendly-images' ); ?>
594
+ <br />
595
+ <input class="regular-text smaller" type="text" id="rule_<?php echo $i; ?>_domain_taxonomy_ids" name="rule_<?php echo $i; ?>_domain_taxonomy_ids" value="<?php echo ( isset( $form[$i]['domains']['taxonomy'] ) ) ? implode( ',', $form[$i]['domains']['taxonomy'] ) : ''; ?>" />
596
+ </div>
597
+ </div>
598
+ <div id="rule_<?php echo $i; ?>_domain_author_all_div" class="settings">
599
+ <input type="checkbox" id="rule_<?php echo $i; ?>_domain_author" name="rule_<?php echo $i; ?>_domain_author" <?php echo ( in_array( 'archive', $form[$i]['domains'] ) || in_array( 'author', $form[$i]['domains'] ) ) ? 'checked' : ''; ?> <?php echo ( in_array( 'archive', $form[$i]['domains'] ) ) ? 'disabled' : ''; ?> />
600
+ <label for="rule_<?php echo $i; ?>_domain_Author"><?php _e( 'All Authors', 'seo-friendly-images' ); ?></label>
601
+ <br />
602
+ <div id="rule_<?php echo $i; ?>_domain_author_ids_div">
603
+ <?php _e( 'or specify by IDs:', 'seo-friendly-images' ); ?>
604
+ <br />
605
+ <input class="regular-text smaller" type="text" id="rule_<?php echo $i; ?>_domain_author_ids" name="rule_<?php echo $i; ?>_domain_author_ids" value="<?php echo ( isset( $form[$i]['domains']['author'] ) ) ? implode( ',', $form[$i]['domains']['author'] ) : ''; ?>" />
606
+ </div>
607
+ </div>
608
+ <div id="rule_<?php echo $i; ?>_domain_date_all_div" class="settings settingssec">
609
+ <div id="rule_<?php echo $i; ?>_subdomains_date_div">
610
+ <input type="checkbox" id="rule_<?php echo $i; ?>_domain_date" name="rule_<?php echo $i; ?>_domain_date" <?php echo ( in_array( 'archive', $form[$i]['domains'] ) || in_array( 'date', $form[$i]['domains'] ) ) ? 'checked' : ''; ?> <?php echo ( in_array( 'archive', $form[$i]['domains'] ) ) ? 'disabled' : ''; ?> />
611
+ <label for="rule_<?php echo $i; ?>_domain_date"><?php _e( 'Date Pages', 'seo-friendly-images' ); ?></label>
612
+ </div>
613
+ <div id="rule_<?php echo $i; ?>_subdomains_date_div" class="settings">
614
+ <input type="checkbox" id="rule_<?php echo $i; ?>_domain_year" name="rule_<?php echo $i; ?>_domain_year" <?php echo ( in_array( 'archive', $form[$i]['domains'] ) || in_array( 'date', $form[$i]['domains'] ) || in_array( 'year', $form[$i]['domains'] ) ) ? 'checked' : ''; ?> <?php echo ( in_array( 'archive', $form[$i]['domains'] ) || in_array( 'date', $form[$i]['domains'] ) ) ? 'disabled' : ''; ?> />
615
+ <label for="rule_<?php echo $i; ?>_domain_year"><?php _e( 'Year Pages', 'seo-friendly-images' ); ?></label>
616
+ <br />
617
+ <input type="checkbox" id="rule_<?php echo $i; ?>_domain_month" name="rule_<?php echo $i; ?>_domain_month" <?php echo ( in_array( 'archive', $form[$i]['domains'] ) || in_array( 'date', $form[$i]['domains'] ) || in_array( 'month', $form[$i]['domains'] ) ) ? 'checked' : ''; ?> <?php echo ( in_array( 'archive', $form[$i]['domains'] ) || in_array( 'date', $form[$i]['domains'] ) ) ? 'disabled' : ''; ?> />
618
+ <label for="rule_<?php echo $i; ?>_domain_month"><?php _e( 'Month Pages', 'seo-friendly-images' ); ?></label>
619
+ <br />
620
+ <input type="checkbox" id="rule_<?php echo $i; ?>_domain_day" name="rule_<?php echo $i; ?>_domain_day" <?php echo ( in_array( 'archive', $form[$i]['domains'] ) || in_array( 'date', $form[$i]['domains'] ) || in_array( 'day', $form[$i]['domains'] ) ) ? 'checked' : ''; ?> <?php echo ( in_array( 'archive', $form[$i]['domains'] ) || in_array( 'date', $form[$i]['domains'] ) ) ? 'disabled' : ''; ?> />
621
+ <label for="rule_<?php echo $i; ?>_domain_day"><?php _e( 'Day Pages', 'seo-friendly-images' ); ?></label>
622
+ <br />
623
+ <input type="checkbox" id="rule_<?php echo $i; ?>_domain_time" name="rule_<?php echo $i; ?>_domain_time" <?php echo ( in_array( 'archive', $form[$i]['domains'] ) || in_array( 'date', $form[$i]['domains'] ) || in_array( 'time', $form[$i]['domains'] ) ) ? 'checked' : ''; ?> <?php echo ( in_array( 'archive', $form[$i]['domains'] ) || in_array( 'date', $form[$i]['domains'] ) ) ? 'disabled' : ''; ?> />
624
+ <label for="rule_<?php echo $i; ?>_domain_time"><?php _e( 'Time Pages', 'seo-friendly-images' ); ?></label>
625
+ </div>
626
+ <div style="clear:both">
627
+ </div>
628
+ </div>
629
+ </div>
630
+ <div style="clear:both">
631
+ </div>
632
+ </div>
633
+ <div id="rule_<?php echo $i; ?>_domain_singular_all_div" class="settings settingssec">
634
+ <div id="rule_<?php echo $i; ?>_domain_singular_div">
635
+ <input type="checkbox" id="rule_<?php echo $i; ?>_domain_singular" name="rule_<?php echo $i; ?>_domain_singular" <?php echo ( in_array( 'singular', $form[$i]['domains'] ) ) ? 'checked' : ''; ?> />
636
+ <label for="rule_<?php echo $i; ?>_domain_singular"><?php _e( 'Singular Pages', 'seo-friendly-images' ); ?></label>
637
+ </div>
638
+ <br />
639
+ <div id="rule_<?php echo $i; ?>_subdomains_singular_div">
640
+ <div id="rule_<?php echo $i; ?>_domain_post_all_div" class="settings settingssec">
641
+ <input type="checkbox" id="rule_<?php echo $i; ?>_domain_post" name="rule_<?php echo $i; ?>_domain_post" <?php echo ( in_array( 'singular', $form[$i]['domains'] ) || in_array( 'post', $form[$i]['domains'] ) ) ? 'checked' : ''; ?> />
642
+ <label for="rule_<?php echo $i; ?>_domain_post"><?php _e( 'All Posts', 'seo-friendly-images' ); ?></label>
643
+ <br />
644
+ <div id="rule_<?php echo $i; ?>_domain_post_ids_div">
645
+ <?php _e( 'or specify by IDs:', 'seo-friendly-images' ); ?>
646
+ <br />
647
+ <input class="regular-text smaller" type="text" id="rule_<?php echo $i; ?>_domain_post_ids" name="rule_<?php echo $i; ?>_domain_post_ids" value="<?php echo ( isset( $form[$i]['domains']['post'] ) ) ? implode( ',', $form[$i]['domains']['post'] ) : ''; ?>" />
648
+ </div>
649
+ </div>
650
+ <div id="rule_<?php echo $i; ?>_domain_page_all_div" class="settings settingssec">
651
+ <input type="checkbox" id="rule_<?php echo $i; ?>_domain_page" name="rule_<?php echo $i; ?>_domain_page" <?php echo ( in_array( 'singular', $form[$i]['domains'] ) || in_array( 'page', $form[$i]['domains'] ) ) ? 'checked' : ''; ?> />
652
+ <label for="rule_<?php echo $i; ?>_domain_page"><?php _e( 'All Pages', 'seo-friendly-images' ); ?></label>
653
+ <br />
654
+ <div id="rule_<?php echo $i; ?>_domain_page_ids_div">
655
+ <?php _e( 'or specify by IDs:', 'seo-friendly-images' ); ?>
656
+ <br />
657
+ <input class="regular-text smaller" type="text" id="rule_<?php echo $i; ?>_domain_page_ids" name="rule_<?php echo $i; ?>_domain_page_ids" value="<?php echo ( isset( $form[$i]['domains']['page'] ) ) ? implode( ',', $form[$i]['domains']['page'] ) : ''; ?>" />
658
+ </div>
659
+ </div>
660
+ <div id="rule_<?php echo $i; ?>_domain_attachment_all_div" class="settings settingssec">
661
+ <input type="checkbox" id="rule_<?php echo $i; ?>_domain_attachment" name="rule_<?php echo $i; ?>_domain_attachment" <?php echo ( in_array( 'singular', $form[$i]['domains'] ) || in_array( 'attachment', $form[$i]['domains'] ) ) ? 'checked' : ''; ?> />
662
+ <label for="rule_<?php echo $i; ?>_domain_attachment"><?php _e( 'All Attachments', 'seo-friendly-images' ); ?></label>
663
+ <br />
664
+ <div id="rule_<?php echo $i; ?>_domain_attachment_ids_div">
665
+ <?php _e( 'or specify by IDs:', 'seo-friendly-images' ); ?>
666
+ <br />
667
+ <input class="regular-text smaller" type="text" id="rule_<?php echo $i; ?>_domain_attachment_ids" name="rule_<?php echo $i; ?>_domain_attachment_ids" value="<?php echo ( isset( $form[$i]['domains']['attachment'] ) ) ? implode( ',', $form[$i]['domains']['attachment'] ) : ''; ?>" />
668
+ </div>
669
+ </div>
670
+ </div>
671
+ <div style="clear:both">
672
+ </div>
673
+ </div>
674
+ </div>
675
+ <input type="hidden" id="rule_<?php echo $i; ?>_hidden" name="rule_<?php echo $i; ?>_hidden" value="1" />
676
+ <br />
677
+ <ul class="radios">
678
+ <li>
679
+ <input type="radio" id="rule_<?php echo $i; ?>_enable" name="rule_<?php echo $i; ?>_enable" value="enabled" <?php echo $form[$i]['options']['enable']; ?> /> <label>Enable plugin for the above rules</label>
680
+ </li>
681
+ <li>
682
+ <input type="radio" id="rule_<?php echo $i; ?>_enable" name="rule_<?php echo $i; ?>_enable" value="disabled" <?php echo ( ( $form[$i]['options']['enable'] == "" ) ? "checked" : "" ); ?> /> <label>Disable plugin for the above rules</label></li>
683
+ </ul>
684
+ <br />
685
+
686
+ <div id="rule_<?php echo $i; ?>_rules_div" <?php echo ( ( $form[$i]['options']['enable'] == 'checked' ) ? "" : "style='display:none;'" ); ?> >
687
+ <div id="rule_<?php echo $i; ?>_alt_div" class="rule">
688
+ <label class="line2" for="rule_<?php echo $i; ?>_alt"><?php _e( 'Image <b>ALT</b> attribute:', 'seo-friendly-images' ); ?></label>
689
+ <input class="regular-text" type="text" id="rule_<?php echo $i; ?>_alt" name="rule_<?php echo $i; ?>_alt" value="<?php echo ( isset( $form[$i]['options']['alt'] ) ) ? $form[$i]['options']['alt'] : '%name %title'; ?>" />
690
+ <span class="description"><?php _e( 'example: %name %title', 'seo-friendly-images' ); ?></span>
691
+ </div>
692
+ <div id="rule_<?php echo $i; ?>_title_div" class="rule">
693
+ <label class="line2" for="rule_<?php echo $i; ?>_title"><?php _e( 'Image <b>TITLE</b> attribute:', 'seo-friendly-images' ); ?></label>
694
+ <input class="regular-text" type="text" id="rule_<?php echo $i; ?>_title" name="rule_<?php echo $i; ?>_title" value="<?php echo ( isset( $form[$i]['options']['title'] ) ) ? $form[$i]['options']['title'] : '%name photo'; ?>" />
695
+ <span class="description"><?php _e( 'example: %name photo', 'seo-friendly-images' ); ?></span>
696
+ </div>
697
+ <div id="rule_<?php echo $i; ?>_override_div" class="rule">
698
+ <ul class="lists">
699
+ <li>
700
+ <label class="line2" for="rule_<?php echo $i; ?>_override_alt"><?php _e( 'Override default image alt tag', 'seo-friendly-images' ); ?></label>
701
+ <input type="checkbox" id="rule_<?php echo $i; ?>_override_alt" name="rule_<?php echo $i; ?>_override_alt" <?php echo ( isset( $form[$i]['options']['override_alt'] ) ) ? $form[$i]['options']['override_alt'] : 'checked'; ?> />
702
+ <span class="description"><?php _e( '( recommended )', 'seo-friendly-images' ); ?></span>
703
+ </li>
704
+ <li>
705
+ <label class="line2" for="rule_<?php echo $i; ?>_override_title"><?php _e( 'Override default image title tag', 'seo-friendly-images' ); ?></label>
706
+ <input type="checkbox" name="rule_<?php echo $i; ?>_override_title" id="rule_<?php echo $i; ?>_override_title" <?php echo ( isset( $form[$i]['options']['override_title'] ) ? $form[$i]['options']['override_title'] : '' ); ?> />
707
+ </li>
708
+ <li>
709
+ <label class="line2" for="rule_<?php echo $i; ?>_strip_extension_title"><?php _e( 'Strip extension and delimiter characters from title tag', 'seo-friendly-images' ); ?></label>
710
+ <input type="checkbox" name="rule_<?php echo $i; ?>_strip_extension_title" id="rule_<?php echo $i; ?>_strip_extension_title" <?php echo ( isset( $form[$i]['options']['strip_extension_title'] ) ? $form[$i]['options']['strip_extension_title'] : '' ); ?> />
711
+
712
+ </li>
713
+
714
+ </ul>
715
+ </div>
716
+ <br />
717
+
718
+ </div>
719
+ </div>
720
+ </div>
721
+ </div>
722
+ <?php endfor; ?>
723
+
724
+ <div style="padding: 1.5em 0;margin: 5px 0;">
725
+ <input type="submit" name="Submit" value="<?php _e( 'Update options', 'seo-friendly-images' ); ?>" />
726
+ </div>
727
+ </form>
728
+ <div id="rule_copy" style="display:none;"><?php echo $this->create_rule_html( 'number' ); ?></div>
729
+ </div>
730
+ </div>
731
+ <h5><?php _e( 'Another fine WordPress plugin by', 'seo-friendly-images' ); ?> <a href="http://www.prelovac.com/vladimir/">Vladimir Prelovac</a></h5>
732
+ </div>
733
+ <?php
734
+ }
735
+
736
+
737
+
738
+ function handle_about() {
739
+ global $wp_version;
740
+
741
+ $upd_msg = "";
742
+
743
+ $actionurl = $_SERVER['REQUEST_URI'];
744
+ $nonce = wp_create_nonce( 'seo-smart-links' );
745
+
746
+ $imgpath = $this->plugin_url . '/i';
747
+ $lic_msg = '<p>Welcome to ' . $this->name . '.</p><p>Thank you for using my plugin, if you find it useful please <a href="https://wordpress.org/plugins/seo-image/">rate it</a>.</p>';
748
+ ?>
749
+ <div class="wrap">
750
+ <?php screen_icon(); ?>
751
+ <h2><?php _e( 'SEO Friendly Images', 'seo-friendly-images' ); echo '&nbsp;' . $this->local_version; ?></h2>
752
+ <a href="admin.php?page=sfi_settings"><?php _e( 'Settings', 'seo-friendly-images' ); ?></a> &nbsp;|&nbsp; <a href="admin.php?page=sfi_about"><?php _e( 'About', 'seo-friendly-images' ); ?></a>
753
+ <div id="poststuff" style="margin-top:10px;">
754
+
755
+ <div id="sideblock" style="float:right;width:270px;margin-left:10px;">
756
+ <div class="ad">
757
+ <a href="https://managewp.com/?utm_source=Plugins&amp;utm_medium=Banner&amp;utm_content=mwp250_2&amp;utm_campaign=SEOFriendlyImages" title="ManageWP.com - Manage your sites from one dashboard"><img src="<?php echo $imgpath ?>/mwp250_2.png" alt="ManageWP.com - Manage Multiple WordPress Sites"></a>
758
+ </div><br>
759
+ <div class="ad">
760
+ <a target="_blank" href="http://www.prelovac.com/products/seo-smart-links"><img src="<?php echo $imgpath ?>/seosmart125.png" title="SEO Smart Links Premium" alt="SEO Smart Links Premium"></a>
761
+ <a target="_blank" href="http://www.prelovac.com/products/seo-friendly-images"><img src="<?php echo $imgpath ?>/seoimages125_v2.jpg" title="SEO Friendly Images Premium" alt="SEO Friendly Images Premium"></a>
762
+ </div>
763
+ </div>
764
+ </div>
765
+ <div id="mainblock" class="submit">
766
+ <div class="dbx-content">
767
+ <h2><?php _e( 'About', 'seo-friendly-images' ); ?></h2>
768
+ <br />
769
+ <form name="SEOLinks_about" action="$actionurl" method="post">
770
+ <input type="hidden" id="_wpnonce" name="_wpnonce" value="$nonce" />
771
+ <input type="hidden" name="submitted" value="1" />
772
+ <?php echo $lic_msg; ?>
773
+ <?php echo __( 'Version:', 'seo-friendly-images' ) . $this->local_version; ?> <?php echo $upd_msg; ?>
774
+ </form>
775
+ </div>
776
+ </div>
777
+ <h5><?php _e( 'Another fine WordPress plugin by', 'seo-friendly-images' ); ?> <a href="http://www.prelovac.com/vladimir/">Vladimir Prelovac</a></h5>
778
+ </div>
779
+ <?php
780
+ }
781
+
782
+ function remove_extension( $name ) {
783
+ return preg_replace( '/(.+)\..*$/', '$1', $name );
784
+ }
785
+
786
+ function seo_friendly_images_process( $matches ) {
787
+ global $post;
788
+
789
+ $alttext_rep = $this->process_parameters["alt"];
790
+ $titletext_rep = $this->process_parameters["title"];
791
+ $override_alt = $this->process_parameters["override_alt"];
792
+ $override_title = $this->process_parameters["override_title"];
793
+ $strip_extension_title = $this->process_parameters["strip_extension_title"];
794
+
795
+ $title = $post->post_title;
796
+
797
+ # take care of unusual endings
798
+ $matches[0] = preg_replace( '|([\'"])[/ ]*$|', '\1 /', $matches[0] );
799
+
800
+ ### Normalize spacing around attributes.
801
+ $matches[0] = preg_replace( '/\s*=\s*/', '=', substr( $matches[0], 0, strlen( $matches[0] ) - 2 ) );
802
+ ### Get source.
803
+
804
+ preg_match( '/src\s*=\s*([\'"])?((?(1).+?|[^\s>]+))(?(1)\1)/', $matches[0], $source );
805
+
806
+ $saved = $source[2];
807
+
808
+ ### Swap with file's base name.
809
+ preg_match( '%[^/]+(?=\.[a-z]{3}(\z|(?=\?)))%', $source[2], $source );
810
+ ### Separate URL by attributes.
811
+ $pieces = preg_split( '/(\w+=)/', $matches[0], -1, PREG_SPLIT_DELIM_CAPTURE | PREG_SPLIT_NO_EMPTY );
812
+ ### Add missing pieces.
813
+
814
+ $tags = "";
815
+ if ( strrpos( $alttext_rep, "%tags" ) !== false || strrpos( $titletext_rep, "%tags" ) !== false ) {
816
+ $posttags = get_the_tags();
817
+
818
+ if ( $posttags ) {
819
+ $i = 0;
820
+ foreach ( $posttags as $tag ) {
821
+ if ( $i == 0 ) {
822
+ $tags = $tag->name . $tags;
823
+ } else {
824
+ $tags = $tag->name . ' ' . $tags;
825
+ }
826
+ ++$i;
827
+ }
828
+ }
829
+ }
830
+
831
+ $cats = "";
832
+ if ( strrpos( $alttext_rep, "%category" ) !== false || strrpos( $titletext_rep, "%category" ) !== false ) {
833
+ $categories = get_the_category();
834
+
835
+ if ( $categories ) {
836
+ $i = 0;
837
+ foreach ( $categories as $cat ) {
838
+ if ( $i == 0 ) {
839
+ $cats = $cat->slug . $cats;
840
+ } else {
841
+ $cats = $cat->slug . ' ' . $cats;
842
+ }
843
+ ++$i;
844
+ }
845
+ }
846
+ }
847
+
848
+ if ( $override_title == "on" || !in_array('alt=', $pieces)) {
849
+ $titletext_rep = str_replace("%title", $post->post_title, $titletext_rep );
850
+ $titletext_rep = str_replace("%name", $source[0], $titletext_rep );
851
+ $titletext_rep = str_replace("%category", $cats, $titletext_rep );
852
+ $titletext_rep = str_replace("%tags", $tags, $titletext_rep );
853
+ $titletext_rep = str_replace("%desc", $post->post_excerpt, $titletext_rep);
854
+
855
+ if ( $strip_extension_title == "on" ) {
856
+ $titletext_rep = str_replace( '"', '', $titletext_rep );
857
+ $titletext_rep = str_replace("'", "", $titletext_rep );
858
+ $titletext_rep = str_replace("_", " ", $titletext_rep );
859
+ $titletext_rep = str_replace("-", " ", $titletext_rep );
860
+ }
861
+
862
+ //$titletext_rep = ucwords( strtolower( $titletext_rep ) );
863
+ if ( ! in_array( 'title=', $pieces ) ) {
864
+ array_push( $pieces, ' title="' . $titletext_rep . '"' );
865
+ } else {
866
+ $index = array_search( 'title=', $pieces );
867
+ $pieces[$index + 1] = '"' . $titletext_rep . '" ';
868
+ }
869
+ }
870
+ if ( $override_alt == "on" || !in_array('alt=', $pieces)) {
871
+ $alttext_rep = str_replace("%title", $post->post_title, $alttext_rep );
872
+ $alttext_rep = str_replace("%name", $source[0], $alttext_rep );
873
+ $alttext_rep = str_replace("%category", $cats, $alttext_rep );
874
+ $alttext_rep = str_replace("%tags", $tags, $alttext_rep );
875
+ $alttext_rep = str_replace("%desc", $post->post_excerpt, $alttext_rep);
876
+ $alttext_rep = str_replace("\"", "", $alttext_rep );
877
+ $alttext_rep = str_replace("'", "", $alttext_rep );
878
+
879
+ $alttext_rep = ( str_replace("-", " ", $alttext_rep ) );
880
+ $alttext_rep = ( str_replace("_", " ", $alttext_rep ) );
881
+
882
+ if ( ! in_array( 'alt=', $pieces ) ) {
883
+ array_push( $pieces, ' alt="' . $alttext_rep . '"' );
884
+ } else {
885
+ $index = array_search( 'alt=', $pieces );
886
+ $pieces[$index + 1] = '"' . $alttext_rep . '" ';
887
+ }
888
+ }
889
+
890
+ return implode( '', $pieces ) . ' /';
891
+ }
892
+
893
+ function get_proper_options() {
894
+ $options = null;
895
+
896
+ if ( is_home() ) {
897
+ if ( $this->tree["main"]["home"]["options"] != null ) {
898
+ $options = $this->tree["main"]["home"]["options"];
899
+ } elseif ( $this->tree["main"]["options"] != null ) {
900
+ $options = $this->tree["main"]["options"];
901
+ } else {
902
+ $options = $this->tree["all"]["options"];
903
+ }
904
+ } elseif ( is_front_page() ) {
905
+ if ( $this->tree["main"]["front"]["options"] != null ) {
906
+ $options = $this->tree["main"]["front"]["options"];
907
+ } elseif ( $this->tree["main"]["options"] != null ) {
908
+ $options = $this->tree["main"]["options"];
909
+ } else {
910
+ $options = $this->tree["all"]["options"];
911
+ }
912
+ } elseif ( is_category() ) {
913
+ $cur_category_id = get_cat_id( single_cat_title("",false ) );
914
+ $found = false;
915
+ $found_group = null;
916
+ foreach ( $this->tree["archive"]["category"] as $key => $group ) {
917
+ if ( $key != 'options' ) {
918
+ $found = $found || in_array( $cur_category_id, $group["ids"] );
919
+ if ( in_array( $cur_category_id, $group["ids"] ) ) {
920
+ $found_group = $key;
921
+ }
922
+ }
923
+ }
924
+ if ( $found ) {
925
+ $options = $this->tree["archive"]["category"][$found_group]["options"];
926
+ } elseif ( $this->tree["archive"]["category"]["options"] != null ) {
927
+ $options = $this->tree["archive"]["category"]["options"];
928
+ } elseif ( $this->tree["archive"]["options"] != null ) {
929
+ $options = $this->tree["archive"]["options"];
930
+ } else {
931
+ $options = $this->tree["all"]["options"];
932
+ }
933
+ } elseif ( is_tag() ) {
934
+ $cur_tag_title = single_tag_title("",false );
935
+ $tag = get_term_by( 'name', $cur_tag_title, 'post_tag' );
936
+ if ( $tag ) {
937
+ $cur_tag_id = $tag->term_id;
938
+ } else {
939
+ $cur_tag_id = 0;
940
+ }
941
+ $found = false;
942
+ $found_group = null;
943
+ foreach ( $this->tree["archive"]["tag"] as $key => $group ) {
944
+ if ( $key != 'options' ) {
945
+ $found = $found || in_array( $cur_tag_id, $group["ids"] );
946
+ if ( in_array( $cur_tag_id, $group["ids"] ) ) {
947
+ $found_group = $key;
948
+ }
949
+ }
950
+ }
951
+ if ( $found ) {
952
+ $options = $this->tree["archive"]["tag"][$found_group]["options"];
953
+ } elseif ( $this->tree["archive"]["tag"]["options"] != null ) {
954
+ $options = $this->tree["archive"]["tag"]["options"];
955
+ } elseif ( $this->tree["archive"]["options"] != null ) {
956
+ $options = $this->tree["archive"]["options"];
957
+ } else {
958
+ $options = $this->tree["all"]["options"];
959
+ }
960
+ } elseif ( is_tax() ) {
961
+ $term = get_queried_object();
962
+ $cur_taxonomy_id = $term->term_id;
963
+ $found = false;
964
+ $found_group = null;
965
+ foreach ( $this->tree["archive"]["taxonomy"] as $key => $group ) {
966
+ if ( $key != 'options' ) {
967
+ $found = $found || in_array( $cur_taxonomy_id, $group["ids"] );
968
+ if ( in_array( $cur_taxonomy_id, $group["ids"] ) ) {
969
+ $found_group = $key;
970
+ }
971
+ }
972
+ }
973
+ if ( $found ) {
974
+ $options = $this->tree["archive"]["taxonomy"][$found_group]["options"];
975
+ } elseif ( $this->tree["archive"]["taxonomy"]["options"] != null ) {
976
+ $options = $this->tree["archive"]["taxonomy"]["options"];
977
+ } elseif ( $this->tree["archive"]["options"] != null ) {
978
+ $options = $this->tree["archive"]["options"];
979
+ } else {
980
+ $options = $this->tree["all"]["options"];
981
+ }
982
+ } elseif ( is_author() ) {
983
+ $term = get_queried_object();
984
+ $cur_author_id = $term->ID;
985
+ $found = false;
986
+ $found_group = null;
987
+ foreach ( $this->tree["archive"]["author"] as $key => $group ) {
988
+ if ( $key != 'options' ) {
989
+ $found = $found || in_array( $cur_author_id, $group["ids"] );
990
+ if ( in_array( $cur_author_id, $group["ids"] ) ) {
991
+ $found_group = $key;
992
+ }
993
+ }
994
+ }
995
+ if ( $found ) {
996
+ $options = $this->tree["archive"]["author"][$found_group]["options"];
997
+ } elseif ( $this->tree["archive"]["author"]["options"] != null ) {
998
+ $options = $this->tree["archive"]["author"]["options"];
999
+ } elseif ( $this->tree["archive"]["options"] != null ) {
1000
+ $options = $this->tree["archive"]["options"];
1001
+ } else {
1002
+ $options = $this->tree["all"]["options"];
1003
+ }
1004
+ } elseif ( is_year() ) {
1005
+ if ( $this->tree["archive"]["date"]["year"]["options"] != null ) {
1006
+ $options = $this->tree["archive"]["date"]["year"]["options"];
1007
+ } elseif ( $this->tree["archive"]["date"]["options"] != null ) {
1008
+ $options = $this->tree["archive"]["date"]["options"];
1009
+ } elseif ( $this->tree["archive"]["options"] != null ) {
1010
+ $options = $this->tree["archive"]["options"];
1011
+ } else {
1012
+ $options = $this->tree["all"]["options"];
1013
+ }
1014
+ } elseif ( is_month() ) {
1015
+ if ( $this->tree["archive"]["date"]["month"]["options"] != null ) {
1016
+ $options = $this->tree["archive"]["date"]["month"]["options"];
1017
+ } elseif ( $this->tree["archive"]["date"]["options"] != null ) {
1018
+ $options = $this->tree["archive"]["date"]["options"];
1019
+ } elseif ( $this->tree["archive"]["options"] != null ) {
1020
+ $options = $this->tree["archive"]["options"];
1021
+ } else {
1022
+ $options = $this->tree["all"]["options"];
1023
+ }
1024
+ } elseif ( is_day() ) {
1025
+ if ( $this->tree["archive"]["date"]["day"]["options"] != null ) {
1026
+ $options = $this->tree["archive"]["date"]["day"]["options"];
1027
+ } elseif ( $this->tree["archive"]["date"]["options"] != null ) {
1028
+ $options = $this->tree["archive"]["date"]["options"];
1029
+ } elseif ( $this->tree["archive"]["options"] != null ) {
1030
+ $options = $this->tree["archive"]["options"];
1031
+ } else {
1032
+ $options = $this->tree["all"]["options"];
1033
+ }
1034
+ } elseif ( is_time() ) {
1035
+ if ( $this->tree["archive"]["date"]["time"]["options"] != null ) {
1036
+ $options = $this->tree["archive"]["date"]["time"]["options"];
1037
+ } elseif ( $this->tree["archive"]["date"]["options"] != null ) {
1038
+ $options = $this->tree["archive"]["date"]["options"];
1039
+ } elseif ( $this->tree["archive"]["options"] != null ) {
1040
+ $options = $this->tree["archive"]["options"];
1041
+ } else {
1042
+ $options = $this->tree["all"]["options"];
1043
+ }
1044
+ } elseif ( is_attachment() ) {
1045
+ global $post;
1046
+ $cur_attachment_id = $post->ID;
1047
+ $found = false;
1048
+ $found_group = null;
1049
+ foreach ( $this->tree["singular"]["attachment"] as $key => $group ) {
1050
+ if ( $key != 'options' ) {
1051
+ $found = $found || in_array( $cur_attachment_id, $group["ids"] );
1052
+ if ( in_array( $cur_attachment_id, $group["ids"] ) ) {
1053
+ $found_group = $key;
1054
+ }
1055
+ }
1056
+ }
1057
+ if ( $found ) {
1058
+ $options = $this->tree["singular"]["attachment"][$found_group]["options"];
1059
+ } elseif ( $this->tree["singular"]["attachment"]["options"] != null ) {
1060
+ $options = $this->tree["singular"]["attachment"]["options"];
1061
+ } elseif ( $this->tree["singular"]["options"] != null ) {
1062
+ $options = $this->tree["singular"]["options"];
1063
+ } else {
1064
+ $options = $this->tree["all"]["options"];
1065
+ }
1066
+ } elseif ( is_page() ) {
1067
+ global $post;
1068
+ $cur_page_id = $post->ID;
1069
+ $found = false;
1070
+ $found_group = null;
1071
+ foreach ( $this->tree["singular"]["page"] as $key => $group ) {
1072
+ if ( $key != 'options' ) {
1073
+ $found = $found || in_array( $cur_page_id, $group["ids"] );
1074
+ if ( in_array( $cur_page_id, $group["ids"] ) ) {
1075
+ $found_group = $key;
1076
+ }
1077
+ }
1078
+ }
1079
+ if ( $found ) {
1080
+ $options = $this->tree["singular"]["page"][$found_group]["options"];
1081
+ } elseif ( $this->tree["singular"]["page"]["options"] != null ) {
1082
+ $options = $this->tree["singular"]["page"]["options"];
1083
+ } elseif ( $this->tree["singular"]["options"] != null ) {
1084
+ $options = $this->tree["singular"]["options"];
1085
+ } else {
1086
+ $options = $this->tree["all"]["options"];
1087
+ }
1088
+ }
1089
+ elseif ( is_single() ) {
1090
+ global $post;
1091
+ $cur_post_id = $post->ID;
1092
+ $found = false;
1093
+ $found_group = null;
1094
+ foreach ( $this->tree["singular"]["post"] as $key => $group ) {
1095
+ if ( $key != 'options' ) {
1096
+ $found = $found || in_array( $cur_post_id, $group["ids"] );
1097
+ if ( in_array( $cur_post_id, $group["ids"] ) ) {
1098
+ $found_group = $key;
1099
+ }
1100
+ }
1101
+ }
1102
+ if ( $found ) {
1103
+ $options = $this->tree["singular"]["post"][$found_group]["options"];
1104
+ } elseif ( $this->tree["singular"]["post"]["options"] != null ) {
1105
+ $options = $this->tree["singular"]["post"]["options"];
1106
+ } elseif ( $this->tree["singular"]["options"] != null ) {
1107
+ $options = $this->tree["singular"]["options"];
1108
+ } else {
1109
+ $options = $this->tree["all"]["options"];
1110
+ }
1111
+ }
1112
+
1113
+ return $options;
1114
+ }
1115
+
1116
+ function seo_friendly_images( $content ) {
1117
+ $options = $this->get_proper_options();
1118
+
1119
+ if ( $options["enable"] == 'on' ) {
1120
+ $this->process_parameters['alt'] = $options['alt'];
1121
+ $this->process_parameters['title'] = $options['title'];
1122
+ $this->process_parameters['override_alt'] = $options['override_alt'];
1123
+ $this->process_parameters['override_title'] = $options['override_title'];
1124
+ $this->process_parameters['strip_extension_title'] = $options['strip_extension_title'];
1125
+ $replaced = preg_replace_callback( '/<img[^>]+/', array( $this, 'seo_friendly_images_process' ), $content, 20 );
1126
+
1127
+ return $replaced;
1128
+ }
1129
+
1130
+ return $content;
1131
+ }
1132
+
1133
+ function seo_friendly_images_featured( $html ) {
1134
+ $options = $this->get_proper_options();
1135
+
1136
+ if ( $options["enable"] == 'on' ) {
1137
+ $this->process_parameters['alt'] = $options['alt'];
1138
+ $this->process_parameters['title'] = $options['title'];
1139
+ $this->process_parameters['override_alt'] = $options['override_alt'];
1140
+ $this->process_parameters['override_title'] = $options['override_title'];
1141
+ $this->process_parameters['strip_extension_title'] = $options['strip_extension_title'];
1142
+ $replaced = preg_replace_callback( '/<img[^>]+/', array( $this, 'seo_friendly_images_process' ), $html );
1143
+ return $replaced;
1144
+ }
1145
+
1146
+ return $html;
1147
+ }
1148
+
1149
+
1150
+
1151
+ //this function removes 640x480 like dimension information from image URLs which is added by wordpress when generating multiple images for the uploaded one
1152
+ function fix_img_url( $url ) {
1153
+ $url = preg_replace( '/-([0-9]{1,5})x([0-9]{1,5})\./i', '.', $url );
1154
+ return $url;
1155
+ }
1156
+
1157
+
1158
+
1159
+
1160
+ function build_tree() {
1161
+ $this->tree["all"]["options"] = null;
1162
+ $this->tree["main"]["options"] = null;
1163
+ $this->tree["main"]["home"]["options"] = null;
1164
+ $this->tree["main"]["front"]["options"] = null;
1165
+ $this->tree["archive"]["options"] = null;
1166
+ $this->tree["archive"]["category"]["options"] = null;
1167
+ $this->tree["archive"]["tag"]["options"] = null;
1168
+ $this->tree["archive"]["taxonomy"]["options"] = null;
1169
+ $this->tree["archive"]["author"]["options"] = null;
1170
+ $this->tree["archive"]["date"]["options"] = null;
1171
+ $this->tree["archive"]["date"]["year"]["options"] = null;
1172
+ $this->tree["archive"]["date"]["month"]["options"] = null;
1173
+ $this->tree["archive"]["date"]["day"]["options"] = null;
1174
+ $this->tree["archive"]["date"]["time"]["options"] = null;
1175
+ $this->tree["archive"]["search"]["options"] = null;
1176
+ $this->tree["singular"]["options"] = null;
1177
+ $this->tree["singular"]["post"]["options"] = null;
1178
+ $this->tree["singular"]["page"]["options"] = null;
1179
+ $this->tree["singular"]["attachment"]["options"] = null;
1180
+ if (isset($this->rules))
1181
+ foreach( $this->rules as $rule ) {
1182
+ if ( isset( $rule["domains"] ) && is_array( $rule["domains"] ) )
1183
+ foreach( $rule["domains"] as $key => $domain ) {
1184
+ if( ! is_int( $key ) ) {
1185
+ switch( $key ) {
1186
+ case "category":
1187
+ $num = count( $this->tree["archive"]["category"] );
1188
+ $this->tree["archive"]["category"]["group_" . $num]["ids"] = $domain;
1189
+ $this->tree["archive"]["category"]["group_" . $num]["options"] = $rule["options"];
1190
+ break;
1191
+ case "tag":
1192
+ $num = count( $this->tree["archive"]["tag"] );
1193
+ $this->tree["archive"]["tag"]["group_" . $num]["ids"] = $domain;
1194
+ $this->tree["archive"]["tag"]["group_" . $num]["options"] = $rule["options"];
1195
+ break;
1196
+ case "taxonomy":
1197
+ $num = count( $this->tree["archive"]["taxonomy"] );
1198
+ $this->tree["archive"]["taxonomy"]["group_" . $num]["ids"] = $domain;
1199
+ $this->tree["archive"]["taxonomy"]["group_" . $num]["options"] = $rule["options"];
1200
+ break;
1201
+ case "author":
1202
+ $num = count( $this->tree["archive"]["author"] );
1203
+ $this->tree["archive"]["author"]["group_" . $num]["ids"] = $domain;
1204
+ $this->tree["archive"]["author"]["group_" . $num]["options"] = $rule["options"];
1205
+
1206
+ break;
1207
+ case "post":
1208
+ $num = count( $this->tree["singular"]["post"] );
1209
+ $this->tree["singular"]["post"]["group_" . $num]["ids"] = $domain;
1210
+ $this->tree["singular"]["post"]["group_" . $num]["options"] = $rule["options"];
1211
+ break;
1212
+ case "page":
1213
+ $num = count( $this->tree["singular"]["page"] );
1214
+ $this->tree["singular"]["page"]["group_" . $num]["ids"] = $domain;
1215
+ $this->tree["singular"]["page"]["group_" . $num]["options"] = $rule["options"];
1216
+ break;
1217
+ case "attachment":
1218
+ $num = count( $this->tree["singular"]["attachment"] );
1219
+ $this->tree["singular"]["attachment"]["group_" . $num]["ids"] = $domain;
1220
+ $this->tree["singular"]["attachment"]["group_" . $num]["options"] = $rule["options"];
1221
+ break;
1222
+ }
1223
+ } else {
1224
+ switch( $domain )
1225
+ {
1226
+ case "all":
1227
+ case "main":
1228
+ case "archive":
1229
+ case "singular":
1230
+ if( $this->tree[$domain]["options"] == null )
1231
+ {
1232
+ $this->tree[$domain]["options"] = $rule["options"];
1233
+ }
1234
+ break;
1235
+ case "home":
1236
+ case "front":
1237
+ if( $this->tree["main"][$domain]["options"] == null )
1238
+ {
1239
+ $this->tree["main"][$domain]["options"] = $rule["options"];
1240
+ }
1241
+ break;
1242
+ case "category":
1243
+ case "tag":
1244
+ case "taxonomy":
1245
+ case "author":
1246
+ case "date":
1247
+ case "search":
1248
+ if( $this->tree["archive"][$domain]["options"] == null )
1249
+ {
1250
+ $this->tree["archive"][$domain]["options"] = $rule["options"];
1251
+ }
1252
+ break;
1253
+ case "year":
1254
+ case "month":
1255
+ case "day":
1256
+ case "time":
1257
+ if( $this->tree["archive"]["date"][$domain]["options"] == null )
1258
+ {
1259
+ $this->tree["archive"]["date"][$domain]["options"] = $rule["options"];
1260
+ }
1261
+ break;
1262
+ case "post":
1263
+ case "page":
1264
+ case "attachment":
1265
+ if( $this->tree["singular"][$domain]["options"] == null ) {
1266
+ $this->tree["singular"][$domain]["options"] = $rule["options"];
1267
+ }
1268
+ break;
1269
+ }
1270
+ }
1271
+ }
1272
+ }
1273
+ }
1274
+
1275
+ function get_options() {
1276
+ $options = array(
1277
+
1278
+ 'rules' => array(
1279
+ 0 => array(
1280
+ 'domains' => array(
1281
+ 'all'
1282
+ ),
1283
+ 'options' => array(
1284
+ 'alt' => '%name %title',
1285
+ 'title' => '%name photo',
1286
+ 'override_alt' => 'on',
1287
+ 'override_title' => 'off',
1288
+ 'strip_extension_title' => 'on',
1289
+
1290
+ 'attach_internal_images' => 'def',
1291
+
1292
+ 'attach_external_images' => 'def',
1293
+
1294
+ 'external_links' => 'on',
1295
+ 'enable' => true
1296
+ )
1297
+ )
1298
+ ),
1299
+
1300
+ );
1301
+
1302
+ $saved = get_option( $this->key );
1303
+
1304
+ if (!empty($saved)) {
1305
+ foreach ($options['rules'] as $key => $option)
1306
+ if (!isset($saved['rules'][$key]))
1307
+ $saved['rules'][$key] = $option;
1308
+ }
1309
+
1310
+ if ( $saved != $options ) {
1311
+ update_option( $this->key, $saved );
1312
+ }
1313
+
1314
+ return $saved;
1315
+ }
1316
+ }
1317
+ ?>
seo-friendly-images.php CHANGED
@@ -1,273 +1,18 @@
1
- <?php
2
-
3
  /*
4
  Plugin Name: SEO Friendly Images
5
  Plugin URI: http://www.prelovac.com/vladimir/wordpress-plugins/seo-friendly-images
6
  Description: Automatically adds alt and title attributes to all your images. Improves traffic from search results and makes them W3C/xHTML valid as well.
7
- Version: 2.7.6
8
  Author: Vladimir Prelovac
9
  Author URI: http://www.prelovac.com/vladimir
10
 
11
- To-Do:
12
- - localization (done in premium version)
13
- - integration module with google xml sitempas to support images sitemap (done in premium version)
14
-
15
- Copyright 2008 Vladimir Prelovac vprelovac@gmail.com
16
-
17
- */
18
- $seo_friendly_images_localversion="2.7.6";
19
- $sfi_plugin_url = trailingslashit( get_bloginfo('wpurl') ).PLUGINDIR.'/'. dirname( plugin_basename(__FILE__) );
20
- function seo_friendly_images_add_pages() {
21
- add_options_page('SEO Friendly Images options', 'SEO Friendly Images', 'manage_options', __FILE__, 'seo_friendly_images_options_page');
22
- }
23
- function seo_friendly_images_admin_notice() {
24
- echo '<div class="updated" style="text-align: center;"><p style="font-size:13px">Get the paid version of <a target="_blank" href="http://www.prelovac.com/products/seo-friendly-images">SEO Friendly Images</a> with more features and support. <a target="_blank" href="http://www.prelovac.com/products/seo-friendly-images">Click to learn what is new</a></p><p style="text-align:right"><a href="options-general.php?page=seo-image/seo-friendly-images.php&notice=1">hide</a></p></div>';
25
- }
26
 
27
- // Options Page
28
- function seo_friendly_images_options_page() {
29
- global $seo_friendly_images_localversion;
30
-
31
- $status=seo_friendly_images_getinfo();
32
- $theVersion = ( isset($status[1]) ? $status[1] : '');
33
- $theMessage = ( isset($status[3]) ? $status[3] : '');
34
-
35
- if( (version_compare(strval($theVersion), strval($seo_friendly_images_localversion), '>') == 1) ) {
36
- $msg = 'Latest version available '.' <strong>'.$theVersion.'</strong><br/>'.$theMessage;
37
- _e('<div id="message" class="updated fade"><p>' . $msg . '</p></div>');
38
- }
39
-
40
- // If form was submitted
41
- if (isset($_POST['submitted']) && check_admin_referer('CSRFcheck','CSRF_check')) {
42
- $alt_text=(!isset($_POST['alttext'])? '': htmlentities(stripslashes(strip_tags($_POST['alttext']))));
43
- $title_text=(!isset($_POST['titletext'])? '': htmlentities(stripslashes(strip_tags($_POST['titletext']))));
44
- $override=(!isset($_POST['override'])? 'off': 'on');
45
- $override_title=(!isset($_POST['override_title'])? 'off': 'on');
46
- update_option('seo_friendly_images_alt', $alt_text);
47
- update_option('seo_friendly_images_title', $title_text );
48
- update_option('seo_friendly_images_override', $override );
49
- update_option('seo_friendly_images_override_title', $override_title );
50
-
51
- $msg_status = 'SEO Friendly Images options saved.';
52
-
53
- // Show message
54
- _e('<div id="message" class="updated fade"><p>' . $msg_status . '</p></div>');
55
- }
56
-
57
- if (isset($_GET['notice'])) {
58
- if ($_GET['notice']==1) {
59
- update_option('seo_friendly_images_notice', 1);
60
- }
61
- }
62
-
63
- // Fetch code from DB
64
- $alt_text = get_option('seo_friendly_images_alt');
65
- $title_text = get_option('seo_friendly_images_title');
66
- $override =( get_option('seo_friendly_images_override')=='on' ) ? "checked":"";
67
- $override_title =( get_option('seo_friendly_images_override_title')=='on' ) ? "checked":"";
68
-
69
- global $sfi_plugin_url;
70
- $imgpath=$sfi_plugin_url.'/i';
71
- $action_url=htmlentities(stripslashes(strip_tags($_SERVER['REQUEST_URI'])));
72
-
73
- // Configuration Page
74
- echo <<<END
75
- <div class="wrap">
76
- <h2>SEO Friendly Images $seo_friendly_images_localversion</h2>
77
- <div id="poststuff" style="margin-top:10px;">
78
- <div id="sideblock" style="float:right;width:270px;margin-left:10px;">
79
- <iframe width=270 height=800 frameborder="0" src="http://www.prelovac.com/plugin/news.php?id=2&utm_source=plugin&utm_medium=plugin&utm_campaign=SEO%2BFriendly%2BImages"></iframe>
80
- </div>
81
- </div>
82
- <div id="mainblock" style="width:710px">
83
- <form name="sfiform" action="$action_url" method="post">
84
- <div class="dbx-content">
85
- <input type="hidden" name="submitted" value="1" />
86
- <h2>General Options</h2>
87
- <p>SEO Friendly Images automatically adds alt and title attributes to all your images in all your posts specified by parameters below.</p>
88
- <p>You can enter any text in the field including two special tags:</p>
89
- <ul>
90
- <li>%title - replaces post title</li>
91
- <li>%name - replaces image file name (without extension)</li>
92
- <li>%category - replaces post category</li>
93
- <li>%tags - replaces post tags</li>
94
- </ul>
95
- <h4>Images options</h4>
96
- <div>
97
- <label for="alt_text"><b>ALT</b> attribute (example: %name %title)</label><br>
98
- <input style="border:1px solid #D1D1D1;width:165px;" id="alt_text" name="alttext" value="$alt_text"/>
99
- </div>
100
- <br>
101
- <div>
102
- <label for="title_text"><b>TITLE</b> attribute (example: %name photo)</label><br>
103
- <input style="border:1px solid #D1D1D1;width:165px;" id="title_text" name="titletext" value="$title_text"/>
104
- </div>
105
- <br/>
106
- <div>
107
- <input id="check1" type="checkbox" name="override" $override />
108
- <label for="check1">Override default Wordpress image alt tag (recommended)</label>
109
- </div>
110
- <br/>
111
- <div>
112
- <input id="check2" type="checkbox" name="override_title" $override_title />
113
- <label for="check2">Override default Wordpress image title</label>
114
- </div>
115
- <br/><br/>
116
- <p>
117
- Example:<br/>
118
- In a post titled Car Pictures there is a picture named Ferrari.jpg<br/><br/>
119
- Setting alt attribute to "%name %title" will produce alt="Ferrari Car Pictures"<br/>
120
- Setting title attribute to "%name photo" will produce title="Ferrari photo"
121
- </p>
122
- <div class="submit"><input type="submit" name="Submit" value="Update options" /></div>
123
- </div>
124
- END;
125
- wp_nonce_field('CSRFcheck','CSRF_check', false);
126
- echo <<<END
127
- </form>
128
- <br/><br/><h3>&nbsp;</h3>
129
- </div>
130
- </div>
131
- <h5>Another fine WordPress plugin by <a href="http://www.prelovac.com/vladimir/">Vladimir Prelovac</a></h5>
132
- END;
133
- }
134
-
135
- // Add Options Page
136
- add_action('admin_menu', 'seo_friendly_images_add_pages');
137
-
138
- function remove_extension($name) {
139
- return preg_replace('/(.+)\..*$/', '$1', $name);
140
- }
141
- function seo_friendly_images_process($matches) {
142
- global $post;
143
- $title = $post->post_title;
144
- $alttext_rep = get_option('seo_friendly_images_alt');
145
- $titletext_rep = get_option('seo_friendly_images_title');
146
- $override= get_option('seo_friendly_images_override');
147
- $override_title= get_option('seo_friendly_images_override_title');
148
-
149
- # take care of unsusal endings
150
- $matches[0]=preg_replace('|([\'"])[/ ]*$|', '\1 /', $matches[0]);
151
-
152
- ### Normalize spacing around attributes.
153
- $matches[0] = preg_replace('/\s*=\s*/', '=', substr($matches[0],0,strlen($matches[0])-2));
154
- ### Get source.
155
-
156
- preg_match('/src\s*=\s*([\'"])?((?(1).+?|[^\s>]+))(?(1)\1)/', $matches[0], $source);
157
-
158
- $saved=$source[2];
159
-
160
- ### Swap with file's base name.
161
- preg_match('%[^/]+(?=\.[a-z]{3}\z)%', $source[2], $source);
162
- ### Separate URL by attributes.
163
- $pieces = preg_split('/(\w+=)/', $matches[0], -1, PREG_SPLIT_DELIM_CAPTURE | PREG_SPLIT_NO_EMPTY);
164
- ### Add missing pieces.
165
-
166
- $postcats=get_the_category();
167
- $cats="";
168
- if ($postcats) {
169
- foreach($postcats as $cat) {
170
- $cats = $cat->slug. ' '. $cats;
171
- }
172
- }
173
-
174
- $posttags = get_the_tags();
175
-
176
- $tags="";
177
- if ($posttags) {
178
- foreach($posttags as $tag) {
179
- $tags = $tag->name . ' ' . $tags;
180
- }
181
- }
182
-
183
- if (!in_array('title=', $pieces) || $override_title=="on") {
184
- $titletext_rep=str_replace("%title", $post->post_title, $titletext_rep);
185
- $titletext_rep=str_replace("%name", $source[0], $titletext_rep);
186
- $titletext_rep=str_replace("%category", $cats, $titletext_rep);
187
- $titletext_rep=str_replace("%tags", $tags, $titletext_rep);
188
-
189
- $titletext_rep=str_replace('"', '', $titletext_rep);
190
- $titletext_rep=str_replace("'", "", $titletext_rep);
191
-
192
- $titletext_rep=str_replace("_", " ", $titletext_rep);
193
- $titletext_rep=str_replace("-", " ", $titletext_rep);
194
- //$titletext_rep=ucwords(strtolower($titletext_rep));
195
- if (!in_array('title=', $pieces)) {
196
- array_push($pieces, ' title="' . $titletext_rep . '"');
197
- } else {
198
- $key=array_search('title=',$pieces);
199
- $pieces[$key+1]='"'.$titletext_rep.'" ';
200
- }
201
- }
202
-
203
- if (!in_array('alt=', $pieces) || $override=="on" ) {
204
- $alttext_rep=str_replace("%title", $post->post_title, $alttext_rep);
205
- $alttext_rep=str_replace("%name", $source[0], $alttext_rep);
206
- $alttext_rep=str_replace("%category", $cats, $alttext_rep);
207
- $alttext_rep=str_replace("%tags", $tags, $alttext_rep);
208
- $alttext_rep=str_replace("\"", "", $alttext_rep);
209
- $alttext_rep=str_replace("'", "", $alttext_rep);
210
- $alttext_rep=(str_replace("-", " ", $alttext_rep));
211
- $alttext_rep=(str_replace("_", " ", $alttext_rep));
212
-
213
- if (!in_array('alt=', $pieces)) {
214
- array_push($pieces, ' alt="' . $alttext_rep . '"');
215
- } else {
216
- $key=array_search('alt=',$pieces);
217
- $pieces[$key+1]='"'.$alttext_rep.'" ';
218
- }
219
- }
220
- return implode('', $pieces).' /';
221
- }
222
- function seo_friendly_images($content) {
223
- return preg_replace_callback('/<img[^>]+/', 'seo_friendly_images_process', $content);
224
- }
225
- add_filter('the_content', 'seo_friendly_images', 100);
226
- //add_action( 'after_plugin_row', 'seo_friendly_images_check_plugin_version' );
227
 
228
- function seo_friendly_images_getinfo() {
229
- $checkfile = "http://svn.wp-plugins.org/seo-image/trunk/seo-friendly-images.chk";
230
- $status=array();
231
- return $status;
232
- $vcheck = wp_remote_fopen($checkfile);
233
-
234
- if($vcheck) {
235
- $version = $seo_friendly_images_localversion;
236
- $status = explode('@', $vcheck);
237
- return $status;
238
- }
239
- }
240
- function seo_friendly_images_check_plugin_version($plugin) {
241
- global $plugindir, $seo_friendly_images_localversion;
242
-
243
- if( strpos($plugin,'seo-friendly-images.php')!==false ) {
244
- $status=seo_friendly_images_getinfo();
245
- $theVersion = $status[1];
246
- $theMessage = $status[3];
247
-
248
- if( (version_compare(strval($theVersion), strval($seo_friendly_images_localversion), '>') == 1) ) {
249
- $msg = 'Latest version available '.' <strong>'.$theVersion.'</strong><br/>'.$theMessage;
250
- echo '<td colspan="5" class="plugin-update" style="line-height:1.2em;">'.$msg.'</td>';
251
- } else {
252
- return;
253
- }
254
- }
255
- }
256
- function seo_friendly_images_install() {
257
- if(!get_option('seo_friendly_images_alt')) {
258
- add_option('seo_friendly_images_alt', '%name %title');
259
- }
260
- if(!get_option('seo_friendly_images_title')) {
261
- add_option('seo_friendly_images_title', '%title');
262
- }
263
- if(get_option('seo_friendly_images_override' == '') || !get_option('seo_friendly_images_override')) {
264
- add_option('seo_friendly_images_override', 'on');
265
- }
266
- if(get_option('seo_friendly_images_override_title' == '') || !get_option('seo_friendly_images_override_title')) {
267
- add_option('seo_friendly_images_override_title', 'off');
268
- }
269
- if (!get_option('seo_friendly_images_notice'))
270
- add_action('admin_notices', 'seo_friendly_images_admin_notice');
271
- }
272
 
273
- add_action( 'plugins_loaded', 'seo_friendly_images_install' );
1
+ <?php
 
2
  /*
3
  Plugin Name: SEO Friendly Images
4
  Plugin URI: http://www.prelovac.com/vladimir/wordpress-plugins/seo-friendly-images
5
  Description: Automatically adds alt and title attributes to all your images. Improves traffic from search results and makes them W3C/xHTML valid as well.
6
+ Version: 3.0
7
  Author: Vladimir Prelovac
8
  Author URI: http://www.prelovac.com/vladimir
9
 
10
+ Copyright 2008-2011 Vladimir Prelovac vprelovac@gmail.com
 
 
 
 
 
 
 
 
 
 
 
 
 
 
11
 
12
+ */
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
13
 
14
+ if ( isset( $seo_friendly_images_pro ) ) return false;
15
+ require_once( dirname( __FILE__ ) . '/seo-friendly-images.class.php' );
16
+ $seo_friendly_images_pro = new SEOFriendlyImages();
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
17
 
18
+ ?>