Version Description
- Rectified =
Release date:
- February 27th, 2017
Summarized:
- An issue with outdated browsers not parsing TSF's admin JavaScript has been resolved.
View the detailed log.
Download this release
Release Info
Developer | Cybr |
Plugin | The SEO Framework |
Version | 3.0.5 |
Comparing to | |
See all releases |
Code changes from version 3.0.4 to 3.0.5
- autodescription.php +2 -2
- lib/js/tsf.min.js +1 -1
- readme.txt +35 -13
autodescription.php
CHANGED
@@ -3,7 +3,7 @@
|
|
3 |
* Plugin Name: The SEO Framework
|
4 |
* Plugin URI: https://theseoframework.com/
|
5 |
* Description: An automated, advanced, accessible, unbranded and extremely fast SEO solution for any WordPress website.
|
6 |
-
* Version: 3.0.
|
7 |
* Author: Sybre Waaijer
|
8 |
* Author URI: https://theseoframework.com/
|
9 |
* License: GPLv3
|
@@ -51,7 +51,7 @@ defined( 'ABSPATH' ) or die;
|
|
51 |
*
|
52 |
* @since 1.0.0
|
53 |
*/
|
54 |
-
define( 'THE_SEO_FRAMEWORK_VERSION', '3.0.
|
55 |
|
56 |
/**
|
57 |
* The plugin Database version.
|
3 |
* Plugin Name: The SEO Framework
|
4 |
* Plugin URI: https://theseoframework.com/
|
5 |
* Description: An automated, advanced, accessible, unbranded and extremely fast SEO solution for any WordPress website.
|
6 |
+
* Version: 3.0.5
|
7 |
* Author: Sybre Waaijer
|
8 |
* Author URI: https://theseoframework.com/
|
9 |
* License: GPLv3
|
51 |
*
|
52 |
* @since 1.0.0
|
53 |
*/
|
54 |
+
define( 'THE_SEO_FRAMEWORK_VERSION', '3.0.5' );
|
55 |
|
56 |
/**
|
57 |
* The plugin Database version.
|
lib/js/tsf.min.js
CHANGED
@@ -1 +1 @@
|
|
1 |
-
'use strict';window.tsf={nonces:tsfL10n.nonces,i18n:tsfL10n.i18n,states:tsfL10n.states,params:tsfL10n.params,other:tsfL10n.other,settingsChanged:!1,counterType:0,hasInput:!1,additionsClass:'',cropper:{},confirm:function(t){return confirm(t)},escapeString:function(t){if(!t.length)return'';let s={'&':'&','<':'<','>':'>','"':'"','\'':'''};return t.replace(/[&<>"']/g,a=>{return s[a]})},unescapeString:function(t){if(!t.length)return'';let s={'&':'&','<':'<','>':'>','"':'"','\'':'''},a=Object.keys(s).map(n=>s[n]),o=new RegExp(a.map(n=>{return n.replace(/[\-\[\]\/\{\}\(\)\*\+\?\.\\\^\$\|]/g,'\\$&')}).join('|'),'g');return t.replace(o,n=>{return Object.keys(s).find(r=>{return s[r]===n})})},getStringLength:function(t){let s,a=0;return t.length&&(s=document.createElement('span'),s.innerHTML=tsf.escapeString(t),a=s.childNodes[0].nodeValue.length),+a},updatePixelCounter:function(t){let s=t.e,a=t.text,o=t.guideline,n=s.parentElement;if(n){let r=n.querySelector('.tsf-pixel-counter-bar'),l=n.querySelector('.tsf-pixel-counter-shadow');if(r&&l){l.innerHTML=tsf.escapeString(a);let d=l.offsetWidth,c='',g='',f='tsf-pixel-counter-fit',u='tsf-pixel-counter-overflown';d>o?(g=100*(o/(d+2*(d-o)/3))+'%',c=u):(g=100*(d/o)+'%',c=f);let x,y=r.querySelector('.tsf-pixel-counter-fluid');x=tsf.i18n.pixelsUsed.replace(/%1\$d/g,d),x=x.replace(/%2\$d/g,o),r.classList.remove(f,u),r.classList.add(c),r.dataset.desc=x,r.setAttribute('aria-label',x),y.style.width=g,tsf._triggerTooltipUpdate(r)}}},_initTitleInputs:function(){if(tsf.hasInput){let t=jQuery('#autodescription_title, #autodescription-meta\\[doctitle\\], #autodescription-site-settings\\[homepage_title\\]');if(t.length){let o,n,r,d,s=!1,a=!!navigator.userAgent.match(/Trident\/7\./),l='',c='',g=tsf.params.titleSeparator,f=tsf.params.objectTitle,u=tsf.states.useTagline,y=tsf.states.isRTL,x=tsf.states.isPrivate,b=tsf.states.isPasswordProtected;o=y?'after':'before';const T=function(){let Y='before';tsf.states.isSettingsPage?y?'right'===jQuery('#tsf-home-title-location input:checked').val()&&(Y='after'):'left'===jQuery('#tsf-home-title-location input:checked').val()&&(Y='after'):tsf.states.isHome?y?'right'===tsf.params.titleLocation&&(Y='after'):'left'===tsf.params.titleLocation&&(Y='after'):y?'left'===tsf.params.titleLocation&&(Y='after'):'right'===tsf.params.titleLocation&&(Y='after'),n=Y};T();const C=function(){let Y='';if(!tsf.states.isSettingsPage)tsf.states.isHome?u&&(Y=tsf.params.titleAdditions):u&&(Y=tsf.params.titleAdditions);else if(u){let Z=document.getElementById('autodescription-site-settings[homepage_title_tagline]'),Q=Z?Z.value:'';Y=Q.length?Q:tsf.params.blogDescription}Y.length&&(Y=tsf.escapeString(Y),'before'===n?Y=Y+' '+g+' ':'after'===n?Y=' '+g+' '+Y:void 0),c=Y.length?Y:'',d=document.getElementById('tsf-title-placeholder'),c.length&&d&&(d.innerHTML=c)};C();const S=function(){let Y='';x?Y=tsf.i18n.privateTitle:b&&(Y=tsf.i18n.protectedTitle),Y.length&&(Y=tsf.escapeString(Y),'before'===o?Y+=' ':'after'===o?Y=' '+Y:void 0),l=Y.length?Y:'',l.length&&r&&(r.innerHTML=l),r=document.getElementById('tsf-title-placeholder-prefix'),l.length&&r&&(r.innerHTML=l)};S();const I=function(Y){if(d||r){let Z=jQuery(Y.target),Q=Z.val(),tt=!!c.length,et=!!l.length;if(!tt&&d&&(d.style.display='none'),!et&&r&&(r.style.display='none'),!tt&&!et)return void Z.css('text-indent','initial');if(!Q.length)return Z.css('text-indent','initial'),d&&(d.style.display='none'),void(r&&(r.style.display='none'));let it=Z.outerWidth(!0),st=(Z.outerHeight(!0)-Z.height())/2,at=(it-Z.innerWidth())/2,ot=y?'right':'left',nt=(Z.outerWidth(!0)-Z.width())/2,rt={display:Z.css('display'),lineHeight:Z.css('lineHeight'),fontFamily:Z.css('fontFamily'),fontWeight:Z.css('fontWeight'),fontSize:Z.css('fontSize'),letterSpacing:Z.css('letterSpacing'),paddingTop:st+'px',paddingBottom:st+'px'},lt=jQuery(r),pt=jQuery(d),dt=0,ct=0,gt=0,ft=0,ut=0,ht=0;if(et&&(lt.css(rt),lt.css({maxWidth:'initial'}),ut=lt[0].getBoundingClientRect().width,ut<ht&&(ut=0)),tt){let yt=0;switch(function(){let xt=jQuery('#tsf-title-offset');xt.text(Q),xt.css({fontFamily:rt.fontFamily,fontWeight:rt.fontWeight,letterSpacing:rt.letterSpacing,fontSize:rt.fontSize}),yt=xt[0].getBoundingClientRect().width}(),dt=Z[0].getBoundingClientRect().width-at-nt-yt-ut,dt<ht&&(ut+=dt,dt=0),pt.css(rt),pt.css({maxWidth:'initial'}),n){case'before':let xt=pt[0].getBoundingClientRect().width;xt=dt<xt?dt:xt,xt<ht&&(xt=0),dt=xt,ft+=dt,gt+=dt,ct+=nt;break;case'after':ct+=nt+yt+ut;}}gt+=nt,ut=0>ut?0:ut,ft+=ut;let mt;et&&(mt={},mt[ot]=gt+'px',mt.maxWidth=ut+'px',lt.css(mt)),tt&&(mt={},mt[ot]=ct+'px',mt.maxWidth=dt+'px',pt.css(mt)),mt={},mt['text-indent']=ft+'px',Z.css(mt)}},L=function(){let Z='',Q=!!c.length,tt=!!l.length,et=c,it=l;tsf.states.isTermEdit&&tsf.params.termName&&(it=y?' :'+tsf.params.termName:tsf.params.termName+': ',tt=tsf.states.useTermPrefix),Z=f,tt&&('before'===o?Z=it+Z:'after'===o?Z+=it:void 0),Q&&('before'===n?Z=et+Z:'after'===n?Z+=et:void 0),a&&(s=!0);let st=document.createElement('span');st.innerHTML=Z,t.prop('placeholder',st.textContent),a&&setTimeout(function(){s=!1},0)},E=function(Y){let Z=document.getElementById('tsf-title-reference'),Q='';Z&&(1>Y.target.value.length?Q=Y.target.placeholder:(Q=Y.target.value,l.length&&('before'===o?Q=l+Q:'after'===o?Q+=l:void 0),c.length&&('before'===n?Q=c+Q:'after'===n?Q+=c:void 0)),Z.innerHTML=tsf.escapeString(Q),setTimeout(()=>{jQuery(Z).change()},0))},W=function(Y){let Z=document.getElementById(Y.target.id+'_chars'),Q=document.getElementById('tsf-title-reference');if(Z&&Q){let tt=tsf.getStringLength(tsf.unescapeString(Q.innerHTML)),et=Y.target,it='',st=tsf.counterType,at='',ot='';25>tt||75<=tt?(it+='tsf-count-bad',at=tsf.i18n.bad):42>tt||55<tt?(it+='tsf-count-okay',at=tsf.i18n.okay):(it+='tsf-count-good',at=tsf.i18n.good),st&&1!=st?2==st?ot=at:3==st&&(ot=tt.toString()+' - '+at):ot=tt.toString(),Z.innerHTML=ot,tsf.additionsClass&&(it+=' '+tsf.additionsClass),Z.className!==it&&(Z.className=it)}},j=function(Y){let Z=document.getElementById(Y.target.id+'_pixels'),Q=document.getElementById('tsf-title-reference');if(Z&&Q){let tt={e:Z,text:tsf.unescapeString(Q.innerHTML),guideline:tsf.params.titlePixelGuideline};tsf.updatePixelCounter(tt)}};t.on('input.tsfUpdateTitles',function(Y){return!s&&void(I(Y),L(),E(Y),W(Y),j(Y))});t.on('tsf-update-title-counter',function(Y){E(Y),W(Y),j(Y)});const P=function(){t.trigger('tsf-update-title-counter')},D=function(){t.trigger('input.tsfUpdateTitles')};D();const A=function(){C(),D()};jQuery('#autodescription-site-settings\\[homepage_title_tagline\\]').on('input',A),jQuery('#autodescription-site-settings\\[homepage_tagline\\]').on('change',A);let B=0;const O=function(){clearTimeout(B),B=setTimeout(function(){D()},50)};jQuery(window).on('tsf-counter-updated',O);jQuery('#tsf-title-tagline-toggle :input').on('click',function(Y){let Z=u;jQuery(Y.target).is(':checked')?(jQuery('.tsf-custom-blogname-js').css('display','inline'),u=!0):(jQuery('.tsf-custom-blogname-js').css('display','none'),u=!1),Z^u&&(C(),O())});jQuery('#visibility .save-post-visibility').on('click',function(){let Z=jQuery('#visibility').find('input:radio:checked').val();switch(x=!1,b=!1,Z){case'password':let Q=jQuery('#visibility').find('#post_password').val();b=!!Q&&!!Q.length;break;case'private':x=!0;break;default:case'public':}S(),O()});jQuery('#tsf-title-separator :input').on('click',function(Y){let Z=jQuery(Y.target).val(),Q='';Q='pipe'===Z?'|':'dash'===Z?'-':jQuery('<div/>').html('&'+Z+';').text(),g=Q,jQuery('.tsf-sep-js').text(' '+g+' '),C(),O()});const M=function(){let Y=tsf.settingsChanged;D(!0),tsf.settingsChanged=Y};jQuery('#homepage-tab-general').on('tsf-tab-toggled',M),jQuery('#tsf-flex-inpost-tab-general').on('tsf-flex-tab-toggled',M);let N=0;const F=function(){clearTimeout(N),N=setTimeout(M,50)};jQuery(window).one('tsf-ready',function(){jQuery(window).on('tsf-flex-resize',F)});let X=['autodescription-homepage-settings','tsf-inpost-box'];jQuery(document).on('postbox-toggled',function(Y,Z){if(0<=X.indexOf(Z.id)){let Q=Z.querySelector('.inside');0<Q.offsetHeight&&0<Q.offsetWidth&&M()}});jQuery('#tsf-home-title-location :input').on('click',function(){T(),C(),O()});tsf.states.isHome||jQuery('#edittag #name, #titlewrap #title').on('input',function(Y){let Z=Y.target.value;Z=Z.trim(),f=Z.length?tsf.escapeString(Z):tsf.params.untitledTitle,L(),P()});(function(){let Y=0,Z=window.innerWidth;window.addEventListener('resize',function(){clearTimeout(Y),Y=setTimeout(function(){let Q=window.innerWidth;Z<Q?782>=Z&&782<=Q&&M():782<=Z&&782>=Q&&M(),Z=Q},50)})})()}}},_initUnboundTitleSettings:function(){if(tsf.hasInput){let t=jQuery('#autodescription_title, #autodescription-meta\\[doctitle\\], #autodescription-site-settings\\[homepage_title\\]');jQuery('#tsf-title-placeholder, #tsf-title-placeholder-prefix').on('click',function(d){let c=jQuery(d.target).siblings(t)[0];if('function'==typeof c.setSelectionRange){c.focus();let g=2*c.value.length;c.setSelectionRange(g,g)}else{let g=c.value;c.value='',c.focus(),c.value=g}});jQuery('#autodescription-site-settings\\[title_rem_additions\\]').on('click',function(d){jQuery(d.target).is(':checked')?jQuery('.tsf-title-additions-js').css('display','none'):jQuery('.tsf-title-additions-js').css('display','inline')});jQuery('#tsf-title-location input').on('click',function(d){let c=jQuery('.tsf-title-additions-example-left'),g=jQuery('.tsf-title-additions-example-right');'right'===jQuery(d.target).val()?(c.css('display','none'),g.css('display','inline')):(c.css('display','inline'),g.css('display','none'))});jQuery('#autodescription-site-settings\\[homepage_title\\]').on('input',function(d){let c=d.target.value||'',g=jQuery('.tsf-custom-title-js');0===c.length?g.text(tsf.params.objectTitle):g.text(c)});jQuery('#autodescription-site-settings\\[homepage_title_tagline\\]').on('input.tsfInputTagline',function(d){let c=d.target.value||'',g=jQuery('.tsf-custom-tagline-js');0===c.length?(g.text(tsf.params.blogDescription),0===tsf.params.blogDescription.length?jQuery('#tsf-home-title-location .tsf-sep-js').hide():jQuery('#tsf-home-title-location .tsf-sep-js').show()):(g.text(c),jQuery('#tsf-home-title-location .tsf-sep-js').show())}),jQuery('#autodescription-site-settings\\[homepage_title_tagline\\]').trigger('input.tsfInputTagline');jQuery('#title-prefixes-toggle :input').on('click',function(d){let c=jQuery(d.target),g=jQuery('.tsf-title-prefix-example');c.is(':checked')?g.css('display','none'):g.css('display','inline')})}},_initDescInputs:function(){if(tsf.hasInput){let t=jQuery('#autodescription_description, #autodescription-meta\\[description\\], #autodescription-site-settings\\[homepage_description\\]');if(t.length){let s=tsf.params.descriptionSeparator;jQuery('#tsf-description-separator input').on('click',function(x){let b=jQuery(x.target).val(),T='';T='pipe'===b?'|':'dash'===b?'-':jQuery('<div/>').html('&'+b+';').text(),s=T,jQuery('#autodescription-descsep-js').text(' '+s+' '),g()});const o=function(x){let b=document.getElementById(x.target.id+'_chars');if(b){let T=0,C=x.target,S='',I=tsf.counterType,L='',E='';T=1>C.value.length?tsf.getStringLength(C.placeholder):tsf.getStringLength(C.value),100>T||330<=T?(S+='tsf-count-bad',L=tsf.i18n.bad):137>T||300<T?(S+='tsf-count-okay',L=tsf.i18n.okay):(S+='tsf-count-good',L=tsf.i18n.good),I&&1!=I?2==I?E=L:3==I&&(E=T.toString()+' - '+L):E=T.toString(),b.innerHTML=E,tsf.additionsClass&&(S+=' '+tsf.additionsClass),b.className!==S&&(b.className=S)}},n=function(x){let b=document.getElementById('tsf-description-reference'),T='';b&&(T=1>x.target.value.length?x.target.placeholder:x.target.value,b.innerHTML=tsf.escapeString(T),setTimeout(()=>{jQuery(b).change()},0))},r=function(x){let b=document.getElementById(x.target.id+'_pixels'),T=document.getElementById('tsf-description-reference');if(b&&T){let C={e:b,text:tsf.unescapeString(T.innerHTML),guideline:tsf.params.descPixelGuideline};tsf.updatePixelCounter(C)}};t.on('input.tsfUpdateDescriptions',function(x){n(x),o(x),r(x)});const d=function(){t.trigger('input.tsfUpdateDescriptions')};d();let c=0;const g=function(){clearTimeout(c),c=setTimeout(function(){d()},50)};jQuery(window).on('tsf-counter-updated',g);let u=['autodescription-homepage-settings','tsf-inpost-box'];jQuery(document).on('postbox-toggled',function(x,b){if(0<=u.indexOf(b.id)){let T=b.querySelector('.inside');0<T.offsetHeight&&0<T.offsetWidth&&g()}})}}},_initSocialTitleInputs:function(){if(tsf.hasInput){let t=jQuery('#autodescription_og_title'),s=jQuery('#autodescription_twitter_title'),a=jQuery('#tsf-title-reference');if(t.length&&s.length&&a.length){let o=!1,n=!!navigator.userAgent.match(/Trident\/7\./),r=tsf.escapeString(t.val()),l=tsf.escapeString(s.val()),d=a.text();const c=x=>{let b='';switch(x){case'twitter':b=l;case'og':b=b.length?b:r;case'reference':b=b.length?b:d;}return b},g=()=>{n&&(o=!0),t.attr('placeholder',c('reference')),s.attr('placeholder',c('og')),n&&setTimeout(function(){o=!1},0)},f=(x,b,T)=>{x&&b&&T?tsf.updateSocialCounter(x,b,T):(t.each((C,S)=>f(S,c('og'),88)),s.each((C,S)=>f(S,c('twitter'),70)))};a.on('change',()=>{d=a.text(),g(),f()});t.on('input.tsfUpdateOgTitle',x=>{o||(r=x.target.value.length?tsf.escapeString(x.target.value):'',g(),f())}),s.on('input.tsfUpdateOgTitle',x=>{o||(l=x.target.value.length?tsf.escapeString(x.target.value):'',g(),f())})}}},_initSocialDescInputs:function(){if(tsf.hasInput){let t=jQuery('#autodescription_og_description'),s=jQuery('#autodescription_twitter_description'),a=jQuery('#tsf-description-reference');if(t.length&&s.length&&a.length){let o=!1,n=!!navigator.userAgent.match(/Trident\/7\./),r=tsf.escapeString(t.val()),l=tsf.escapeString(s.val()),d=a.text();const c=x=>{let b='';switch(x){case'twitter':b=l;case'og':b=b.length?b:r;case'reference':b=b.length?b:d;}return b},g=()=>{n&&(o=!0),t.attr('placeholder',c('reference')),s.attr('placeholder',c('og')),n&&setTimeout(function(){o=!1},0)},f=(x,b,T)=>{x&&b&&T?tsf.updateSocialCounter(x,b,T):(t.each((C,S)=>f(S,c('og'),300)),s.each((C,S)=>f(S,c('twitter'),200)))};a.on('change',()=>{d=a.text(),g(),f()});t.on('input.tsfUpdateOgDesc',x=>{o||(r=x.target.value.length?tsf.escapeString(x.target.value):'',g(),f())}),s.on('input.tsfUpdateOgDesc',x=>{o||(l=x.target.value.length?tsf.escapeString(x.target.value):'',g(),f())})}}},updateSocialCounter:function(t,s,a){let o=document.getElementById(t.id+'_chars');if(o){let n=tsf.getStringLength(tsf.unescapeString(s)),r='',l=tsf.counterType,d='',c='';n>a?(r+='tsf-count-bad',d=tsf.i18n.bad):(r+='tsf-count-good',d=tsf.i18n.good),l&&1!=l?2==l?c=d:3==l&&(c=n.toString()+' - '+d):c=n.toString(),o.innerHTML=c,tsf.additionsClass&&(r+=' '+tsf.additionsClass),o.className!==r&&(o.className=r)}},_initCounters:function(){if(tsf.hasInput){jQuery('.tsf-counter').on('click',function(){++tsf.counterType,3<tsf.counterType&&(tsf.counterType=0),s();let r='.tsf-counter-wrap .tsf-ajax',l=0;tsf.resetAjaxLoader(r),tsf.setAjaxLoader(r);let d={method:'POST',url:ajaxurl,datatype:'json',data:{action:'the_seo_framework_update_counter',nonce:tsf.nonces.edit_posts,val:tsf.counterType},async:!0,success:function(c){switch(c=jQuery.parseJSON(c),'success'===c.type&&(l=1),l){case 0:tsf.unsetAjaxLoader(r,!1);break;case 1:tsf.unsetAjaxLoader(r,!0);break;default:tsf.resetAjaxLoader(r);}}};jQuery.ajax(d)});const s=function(){let n=tsf.counterType;1==n?(tsf.additionsClass='tsf-counter-one',tsf.counterType=1):2==n?(tsf.additionsClass='tsf-counter-two',tsf.counterType=2):3==n?(tsf.additionsClass='tsf-counter-three',tsf.counterType=3):(tsf.additionsClass='tsf-counter-zero',tsf.counterType=0),tsf._triggerCounterUpdate()};s();jQuery('#autodescription-site-settings\\[display_character_counter\\]').on('click',function(n){jQuery(n.target).is(':checked')?jQuery('.tsf-counter-wrap').show():jQuery('.tsf-counter-wrap').hide()});jQuery('#autodescription-site-settings\\[display_pixel_counter\\]').on('click',function(n){jQuery(n.target).is(':checked')?(jQuery('.tsf-pixel-counter-wrap').show(),tsf._triggerCounterUpdate()):jQuery('.tsf-pixel-counter-wrap').hide()})}},_initPrimaryTerm:function(){if(tsf.hasInput&&Object.keys(tsf.states.taxonomies).length){let t=tsf.states.taxonomies,s=wp.template('tsf-primary-term-selector'),a=wp.template('tsf-primary-term-selector-help'),o=document.createElement('span');o.classList.add('tsf-primary-term-selector'),o.classList.add('tsf-set-primary-term'),function(){let q=document.createElement('input');q.setAttribute('type','radio'),o.appendChild(q)}();let n={},r={},l={},d={},c={};const g=function(q){let M=jQuery('#'+q+'div'),N=s({taxonomy:t[q]});M.append(N)},f=function(q){let M=jQuery('#taxonomy-'+q),N=a({taxonomy:t[q]});M.append(N),u(q)},u=function(q){let M=document.getElementById('taxonomy-'+q),N=M.querySelectorAll('.tabs-panel'),F=jQuery(M).closest('.postbox');if(!(F.length&&F.hasClass('closed'))){let X=Array.prototype.slice.call(N).filter(function(G){return 0<G.offsetWidth||0<G.offsetHeight||0<G.getClientRects().length})[0];if(X){let V=X.scrollHeight>X.clientHeight?X.offsetWidth-X.clientWidth+25-2:25;tsf.states.isRTL?M.querySelector('.tsf-primary-term-selector-help-wrap').style.left=V+'px':M.querySelector('.tsf-primary-term-selector-help-wrap').style.right=V+'px'}}},y=function(q){u(q.data.taxonomy)},x=function(q){let M=o.cloneNode(!0);return M.setAttribute('title',t[q].i18n.makePrimary),M.setAttribute('aria-label',t[q].i18n.makePrimary),M},b=function(q,M){let N=document.getElementById('autodescription[_primary_term_'+q+']');N&&N instanceof Element&&(N.value=M)},T=function(q,M){return!M&&d[q]?d[q]:(d[q]=jQuery('#'+q+'checklist, #'+q+'checklist-pop'),d[q])},C=function(q,M){return n[q].filter('[value="'+M+'"]')},S=function(q,M){let N=C(q,M).closest('label');N.length?(N.addClass('tsf-is-primary-term'),N.find('.tsf-set-primary-term').each(function(F,X){X.setAttribute('title',t[q].i18n.primary),X.setAttribute('aria-label',t[q].i18n.primary),X.querySelector('input').checked=!0}),b(q,M),c[q]=M):L(q)},I=function(q){let M=T(q).find('label');M.removeClass('tsf-is-primary-term'),M.find('.tsf-set-primary-term').each(function(N,F){F.setAttribute('title',t[q].i18n.makePrimary),F.setAttribute('aria-label',t[q].i18n.makePrimary),F.querySelector('input').checked=!1}),b(q,'')},L=function(q){let N,M=l[q].first();M.length&&(N=M.val()||'',S(q,N),c[q]=N)},E=function(q){let M=q.data.taxonomy,N=jQuery(q.target).closest('label').find('input[type=checkbox]').val();return I(M),S(M,N),!1},W=function(q){let M=q.data.taxonomy;switch(q.target.checked?(R(M,q.target),j(M,q.target)):(P(M,q.target),H(M,q.target)),l[M].length){case 0:b(M,'');break;case 1:L(M);}},j=function(q,M){let N;C(q,M.value).each(function(F,X){N=jQuery(X).closest('label'),N.find('.tsf-primary-term-selector').length||N.append(x(q))})},H=function(q,M){let N,F;C(q,M.value).each(function(X,V){N=jQuery(V).closest('label'),F=N.hasClass('tsf-is-primary-term'),N.removeClass('tsf-is-primary-term'),N.find('.tsf-primary-term-selector').remove(),F&&L(q)})},R=function(q,M){r[q]=r[q].add('[value="'+M.value+'"]'),l[q]=l[q].add(M)},P=function(q,M){r[q]=r[q].not('[value="'+M.value+'"]'),l[q]=l[q].not('[value="'+M.value+'"]')},D=function(q){u(q.data.taxonomy)},A=function(q){let M=T(q,1);n[q]=M.find('input[type=checkbox]'),r[q]=M.find('input[type=checkbox]:checked');let F,N={};l[q]=r[q],l[q].each(function(X,V){F=jQuery(V).val(),N[F]?l[q].splice(X,1):N[F]=!0})},B=function(q,M,N){N.hasOwnProperty('settings')&&N.settings.hasOwnProperty('what')&&(A(N.settings.what),O(N.settings.what),U(N.settings.what),u(N.settings.what))},O=function(q){let M='tsfShowPrimary'+q,N={taxonomy:q},F=T(q),X=jQuery('#'+q+'div'),V=jQuery('#'+q+'-tabs'),G=F.closest('.postbox');F.off('click.'+M),F.on('click.'+M,'input[type="checkbox"]',N,W),F.on('click.'+M,'.tsf-primary-term-selector',N,E),X.off('wpListAddEnd.'+M),X.on('wpListAddEnd.'+M,'#'+q+'checklist',B),V.off('click.'+M),V.on('click.'+M,'a',N,y),G.off('click.postboxes.'+M),G.on('click.postboxes.'+M,N,D)},U=function(q){T(q).find('input[type="checkbox"]:checked').each(function(M,N){j(q,N)}),t[q].primary?S(q,t[q].primary):L(q)};(function(){for(let q in t)T(q).length&&(g(q),f(q),A(q),O(q),U(q))})()}},_initToolTips:function(){let t=0,s=!1;const a=function(){s=!0,clearTimeout(t),t=setTimeout(function(){s=!1},250)},o=function(y,x){x=x||!1;let b='pointerdown.tsfTT touchstart.tsfTT click.tsfTT',T=jQuery(y);x?(T.off('mousemove mouseleave mouseout tsf-tooltip-update'),jQuery(document.body).off(b)):(T.on({mousemove:d,mouseleave:c,mouseout:c}),jQuery(document.body).off(b).on(b,g)),T.on('tsf-tooltip-update',r)},n=function(y){o(y,!0)},r=function(y){if(y.target.classList.contains('tsf-tooltip-item')){let x=y.target.querySelector('.tsf-tooltip-text');x instanceof Element&&(x.innerHTML=y.target.dataset.desc)}},l=function(y){let x=jQuery(y.target),b=y.target.dataset.desc;if(b&&0===x.find('div').length){y.target.title='';let T=jQuery('<div class="tsf-tooltip"><span class="tsf-tooltip-text-wrap"><span class="tsf-tooltip-text">'+b+'</span></span><div class="tsf-tooltip-arrow"></div></div>');x.append(T);let C=x.closest('.tsf-tooltip-boundary');C=C.length&&C||jQuery(document.body);let S=x.outerHeight()+9,I=T.offset().top-S,L=C.offset().top-(C.prop('scrolltop')||0);L>I?(T.addClass('tsf-tooltip-down'),T.css('top',S+'px')):T.css('bottom',S+'px');let E=x.closest('.tsf-tooltip-wrap'),W=T.find('.tsf-tooltip-text-wrap'),j=W.find('.tsf-tooltip-text'),H=E.width(),R=W.outerWidth(!0),P=j.outerWidth(!0),D=W.offset().left,A=D+P,B=C.offset().left-(C.prop('scrollLeft')||0),O=B+C.outerWidth(),U='left';if(D<B){let z=B-D+12,q=parseInt(W.css('flex-basis'),10);z<-q&&(z=-q),T.css(U,z+'px'),T.data('overflow',z),T.data('overflowDir',U)}else if(A>O){let z=O-A-H-12,q=parseInt(W.css('flex-basis'),10);z<-q&&(z=-q),T.css(U,z+'px'),T.data('overflow',z),T.data('overflowDir',U)}else if(42>H){let z=-15;T.css(U,z+'px'),T.data('overflow',z),T.data('overflowDir',U)}else if(H>R){let z=y.originalEvent&&y.originalEvent.pageX||y.pageX,q=E.offset().left,N=z-q-R/2,F=N+R;0>N?N=0:F>H&&(N=H-P),T.css(U,N+'px'),T.data('adjust',N),T.data('adjustDir',U)}}},d=function(y){let x=jQuery(y.target),b=x.find('.tsf-tooltip'),T=b.find('.tsf-tooltip-arrow'),C=b.data('overflow'),S=b.data('overflowDir');if(C=parseInt(C,10),C=isNaN(C)?0:-Math.round(C),C)T.css(S,C+'px');else{let I=y.originalEvent&&y.originalEvent.pageX||y.pageX,L=7,E=16,W=x.closest('.tsf-tooltip-wrap'),j=I-W.offset().left-E/2,R=b.find('.tsf-tooltip-text-wrap'),P=R.outerWidth(!0),D=b.data('adjust'),A=b.data('adjustDir'),B=P-E-L;if(D=parseInt(D,10),D=isNaN(D)?0:Math.round(D),D&&(D='left'===A?-D:D,j+=D,B-D>W.outerWidth(!0))){let O=R.find('.tsf-tooltip-text'),U=O.outerWidth(!0);B=U-E-L}j<=L?T.css('left',L+'px'):j>=B?T.css('left',B+'px'):T.css('left',j+'px')}},c=function(y){s||(jQuery(y.target).find('.tsf-tooltip').remove(),n(y.target))},g=function(y){a();let C,b='.tsf-tooltip',T=jQuery(y.target);if(T.hasClass('tsf-tooltip-item')&&(C=T.find(b)),!C){let S=T.children('.tsf-tooltip-item');S.length&&(C=S.find(b))}C&&C.length?jQuery(b).not(C).remove():jQuery(b).remove()},f=function(y){if(!s){let x=!1;switch(y.type){case'mouseenter':break;case'pointerdown':case'touchstart':x=!0;break;default:}if(y.target.classList.contains('tsf-tooltip-item'))x&&g(y),l(y),d(y),o(y.target);else{let b=y.target.querySelector('.tsf-tooltip-item:hover'),T=new jQuery.Event(y.type);T.pageX=y.originalEvent&&y.originalEvent.pageX||y.pageX,b?(tsfL10n.states.debug&&console.log('Tooltip event warning: delegation'),jQuery(b).trigger(T)):(tsfL10n.states.debug&&console.log('Tooltip event warning: bubbling'),jQuery(y.target).closest('.tsf-tooltip-wrap').find('.tsf-tooltip-item:hover').trigger(T))}y.stopPropagation()}},u=function(){let y=jQuery('.tsf-tooltip-wrap');y.off('mouseenter pointerdown touchstart'),y.on('mouseenter pointerdown touchstart','.tsf-tooltip-item',f)};u(),jQuery(window).on('tsf-reset-tooltips',u),function(){let y=jQuery('#wpcontent');tsf.addTooltipBoundary(y)}()},addTooltipBoundary:function(t){jQuery(t).addClass('tsf-tooltip-boundary')},tabToggle:function(t){let s=jQuery(t.target);if(s.is(':checked')){let a=s.prop('id'),o=s.prop('name');if('undefined'!=typeof o){let n='tsf-active-tab-content',r=jQuery('#'+a+'-content'),l=jQuery('.'+n);if(!r.is(l)&&'undefined'!=typeof r){let d=jQuery('.'+o+'-content');d.fadeOut(150,function(){jQuery(this).removeClass(n)}),setTimeout(function(){r.addClass(n).fadeIn(250)},150),setTimeout(function(){jQuery('#'+a).trigger('tsf-tab-toggled')},175)}}}},flexTabToggle:function(t){let s=jQuery(t.target);if(s.is(':checked')){let a=s.prop('id'),o=s.prop('name');if('undefined'!=typeof o){let n='tsf-flex-tab-content-active',r=jQuery('#'+a+'-content'),l=jQuery('.'+n);if(!r.is(l)&&'undefined'!=typeof r){let d=jQuery('.'+o+'-content');d.fadeOut(150,function(){jQuery(this).removeClass(n)}),setTimeout(function(){r.addClass(n).fadeIn(250)},150),setTimeout(function(){jQuery('#'+a).trigger('tsf-flex-tab-toggled')},175)}}}},setTabsOnload:function(){if(tsf.hasInput)if(tsf.states.isPostEdit&&jQuery('.tsf-flex-nav-tab-radio').trigger('change'),tsf.states.isSettingsPage){let t=jQuery('.tsf-nav-tab-wrapper .tsf-tab:nth-of-type(n+2) input:checked');t.length&&t.each(function(){let a=jQuery(this),o=a.prop('id'),n=a.prop('name');if('undefined'!=typeof n){let r='tsf-active-tab-content',l=jQuery('#'+o+'-content');if('undefined'!=typeof l){let d=jQuery('.'+n+'-content');d.removeClass(r),l.addClass(r),setTimeout(function(){jQuery('#'+o).trigger('tsf-tab-toggled')},20)}}})}else;},taglineToggleDesc:function(t){let s=jQuery(t.target),a=jQuery('#tsf-on-blogname-js');s.is(':checked')?a.css('display','inline'):a.css('display','none')},additionsToggleDesc:function(t){let s=jQuery(t.target),a=jQuery('#tsf-description-additions-js');s.is(':checked')?a.css('display','inline'):a.css('display','none')},taglineToggleOnload:function(){if(tsf.hasInput){let t=jQuery('#tsf-title-tagline-toggle :input'),s=jQuery('.tsf-custom-blogname-js'),a=jQuery('#tsf-description-additions-toggle :input'),o=jQuery('#tsf-description-additions-js'),n=jQuery('#tsf-description-onblogname-toggle :input'),r=jQuery('#tsf-on-blogname-js'),l=jQuery('#tsf-title-additions-toggle :input'),d=jQuery('.tsf-title-additions-js');t.is(':checked')?s.css('display','inline'):s.css('display','none'),a.is(':checked')?o.css('display','inline'):o.css('display','none'),n.is(':checked')?r.css('display','inline'):r.css('display','none'),l.is(':checked')?d.css('display','none'):d.css('display','inline')}},attachUnsavedChangesListener:function(){if(tsf.hasInput){let t=function(o){tsf.settingsChanged||tsf.registerChange(),jQuery(s).not(a).off(o.type,t)},s='.tsf-metaboxes :input, #tsf-inpost-box .inside :input',a='.tsf-tab :input, .tsf-flex-nav-tab :input';jQuery(s).not(a).on('change',t),s='.tsf-metaboxes input[type=text], .tsf-metaboxes textarea, #tsf-inpost-box .inside input[type=text], #tsf-inpost-box .inside textarea',a='.tsf-nav-tab-wrapper input, .tsf-flex-nav-tab-wrapper input',jQuery(s).not(a).on('input',t),window.onbeforeunload=function(){if(tsf.settingsChanged)return tsf.i18n.saveAlert},jQuery('.tsf-metaboxes input[type="submit"], #publishing-action input[type="submit"], #save-action input[type="submit"], a.submitdelete').click(function(){window.onbeforeunload=null})}},registerChange:function(){tsf.settingsChanged=!0},confirmedReset:function(){return confirm(tsf.i18n.confirmReset)},onLoadUnregisterChange:function(){tsf.settingsChanged=!1},dismissNotice:function(t){jQuery(t.target).parents('.tsf-notice').slideUp(200,function(){this.remove()})},setAjaxLoader:function(t){jQuery(t).toggleClass('tsf-loading')},unsetAjaxLoader:function(t,s){let a='tsf-success',o=2500;s||(a='tsf-error',o=5e3),jQuery(t).removeClass('tsf-loading').addClass(a).fadeOut(o)},resetAjaxLoader:function(t){jQuery(t).stop().empty().prop('class','tsf-ajax').css('opacity','1').removeProp('style')},openImageEditor:function(t){if(jQuery(t.target).prop('disabled')||'undefined'==typeof wp.media)return t.preventDefault(),void t.stopPropagation();let o,s=jQuery(t.target),a=s.data('inputid');if(o)return void o.open();t.preventDefault(),t.stopPropagation(),tsf.extendCropper();let n={suggestedWidth:s.data('width')||1200,suggestedHeight:s.data('height')||630,isFlex:'undefined'==typeof s.data('flex')?1:s.data('flex')};tsf.cropper.control={params:{flex_width:n.isFlex?4096:0,flex_height:n.isFlex?4096:0,width:n.suggestedWidth,height:n.suggestedHeight,isFlex:n.isFlex}},o=wp.media({button:{text:tsf.other[a].frame_button,close:!1},states:[new wp.media.controller.Library({title:tsf.other[a].frame_title,library:wp.media.query({type:'image'}),multiple:!1,date:!1,priority:20,suggestedWidth:n.suggestedWidth,suggestedHeight:n.suggestedHeight}),new tsf.cropper({imgSelectOptions:tsf.calculateImageSelectOptions})]});const r=function(){o.setState('cropper')};o.off('select',r),o.on('select',r);const l=function(g){let f=g.url,u=g.id,y=g.width,x=g.height;jQuery('#'+a+'-url').val(f),jQuery('#'+a+'-id').val(u)};o.off('cropped',l),o.on('cropped',l);const d=function(g){let f=g.get('url'),u=g.get('id'),y=g.get('width'),x=g.get('height');jQuery('#'+a+'-url').val(f),jQuery('#'+a+'-id').val(u)};o.off('skippedcrop',d),o.on('skippedcrop',d);const c=function(){jQuery('#'+a+'-select').text(tsf.other[a].change),jQuery('#'+a+'-url').prop('readonly',!0).css('opacity',0).animate({opacity:1},{queue:!0,duration:1000},'swing'),tsf.appendRemoveButton(s,a,!0),tsf.registerChange()};o.off('skippedcrop cropped',c),o.on('skippedcrop cropped',c),o.open()},appendRemoveButton:function(t,s,a){t&&s&&!jQuery('#'+s+'-remove').length&&(t.after('<a href="javascript:void(0)" id="'+s+'-remove" class="tsf-remove-social-image button button-small" data-inputid="'+s+'" title="'+tsf.other[s].remove_title+'">'+tsf.other[s].remove+'</a>'),a&&jQuery('#'+s+'-remove').css('opacity',0).animate({opacity:1},{queue:!0,duration:1000},'swing')),tsf.resetImageEditorActions()},removeEditorImage:function(t){let s=jQuery(t.target).data('inputid');if(!jQuery('#'+s+'-select').prop('disabled')){jQuery('#'+s+'-select').addClass('disabled').prop('disabled',!0),jQuery('#'+s+'-remove').addClass('disabled').prop('disabled',!0).fadeOut(500,function(){jQuery(this).remove(),jQuery('#'+s+'-select').text(tsf.other[s].select).removeClass('disabled').removeProp('disabled')});let a=jQuery('#'+s+'-url');a.val(''),a.data('readonly')||a.removeProp('readonly'),a.css('opacity',0).animate({opacity:1},{queue:!0,duration:500},'swing'),jQuery('#'+s+'-id').val(''),tsf.registerChange()}},extendCropper:function(){if('undefined'==typeof tsf.cropper.control){let t,a,s=wp.media.controller,o=wp.media.view;return a=o.Cropper.extend({className:'crop-content tsf-image',ready:function(){o.Cropper.prototype.ready.apply(this,arguments)},onImageLoad:function(){let r,n=this.controller.get('imgSelectOptions');'function'==typeof n&&(n=n(this.options.attachment,this.controller)),'undefined'==typeof n.aspectRatio&&(n=_.extend(n,{parent:this.$el,onInit:function(){this.parent.children().on('mousedown touchstart',function(l){l.shiftKey?r.setOptions({aspectRatio:'1:1'}):r.setOptions({aspectRatio:!1})})}})),this.trigger('image-loaded'),r=this.controller.imgSelect=this.$image.imgAreaSelect(n)}}),t=s.Cropper.extend({createCropContent:function(){this.cropperView=new a({controller:this,attachment:this.get('selection').first()}),this.cropperView.on('image-loaded',this.createCropToolbar,this),this.frame.content.set(this.cropperView)},doCrop:function(n){let r=n.get('cropDetails'),l=tsf.cropper.control;if(l.params.flex_width&&l.params.flex_height)if(r.width===r.height)r.width>l.params.flex_width&&(r.dst_width=r.dst_height=l.params.flex_width);else if(r.width>l.params.flex_width||r.height>l.params.flex_height)if(r.width>r.height){let d=r.width/l.params.flex_width;r.dst_width=l.params.flex_width,r.dst_height=Math.round(r.height/d)}else{let d=r.height/l.params.flex_height;r.dst_height=l.params.flex_height,r.dst_width=Math.round(r.width/d)}return'undefined'==typeof r.dst_width&&(r.dst_width=0,r.dst_height=0),wp.ajax.post('tsf-crop-image',{nonce:tsf.nonces.upload_files,id:n.get('id'),context:'tsf-image',cropDetails:r})}}),t.prototype.control={},void(tsf.cropper=t)}},calculateImageSelectOptions:function(t,s){let y,x,b,T,a=tsf.cropper.control,o=!!parseInt(a.params.flex_width,10),n=!!parseInt(a.params.flex_height,10),r=parseInt(a.params.width,10),l=parseInt(a.params.height,10),d=t.get('width'),c=t.get('height'),g=r/l,f=r,u=l;return T=a.params.isFlex?!tsf.mustBeCropped(a.params.flex_width,a.params.flex_height,d,c):g==d/c,s.set('control',a.params),s.set('canSkipCrop',T),d/c>g?(l=c,r=l*g):(r=d,l=r/g),y=(d-r)/2,x=(c-l)/2,b={handles:!0,keys:!0,instance:!0,persistent:!0,imageWidth:d,imageHeight:c,minWidth:f>r?r:f,minHeight:u>l?l:u,x1:y,y1:x,x2:r+y,y2:l+x},a.params.isFlex?n||o?(n&&(b.minHeight=200,b.maxWidth=d),o&&(b.minWidth=200,b.maxHeight=c)):b.aspectRatio=r+':'+l:(b.handles='corners',b.aspectRatio=r+':'+l),b},mustBeCropped:function(t,s,a,o){return a<=t&&o<=s?!1:!0},resetImageEditorActions:function(){jQuery('.tsf-remove-social-image').off('click',tsf.removeEditorImage),jQuery('.tsf-remove-social-image').on('click',tsf.removeEditorImage)},setupImageEditorActions:function(){jQuery('.tsf-set-social-image').off('click',tsf.openImageEditor),jQuery('.tsf-remove-social-image').off('click',tsf.removeEditorImage),jQuery('.tsf-set-social-image').on('click',tsf.openImageEditor),jQuery('.tsf-remove-social-image').on('click',tsf.removeEditorImage)},checkImageEditorInput:function(){let t=jQuery('.tsf-set-social-image');if(t.length){let s='',a='';jQuery.each(t,function(o,n){s=jQuery(n).data('inputid'),a=jQuery('#'+s+'-id'),a.length&&0<a.val()&&(jQuery('#'+s+'-url').prop('readonly',!0),tsf.appendRemoveButton(jQuery(n),s,!1)),jQuery('#'+s+'-url').val()&&jQuery('#'+s+'-select').text(tsf.other[s].change)})}},setColorOnload:function(){let t=jQuery('.tsf-color-picker');t.length&&jQuery.each(t,function(s,a){let o=jQuery(a),n='',r=o.data('tsf-default-color');o.wpColorPicker({defaultColor:r,width:238,change:function(){n=o.wpColorPicker('color'),''==n&&(n=r),o.val(n),tsf.registerChange()},clear:function(){o.parent().siblings('.wp-color-result').css('backgroundColor',r),tsf.registerChange()},palettes:!1})})},_doFlexResizeListener:function(){if(jQuery('.tsf-flex').length){tsf._setResizeListeners();let t=0,s={},a=0,o=jQuery('.tsf-flex-nav-tab-wrapper'),n=jQuery(window);n.on('tsf-flex-resize',function(){clearTimeout(t);let r=0;t=setTimeout(function(){if(o.length){let l=jQuery('.tsf-flex-nav-tab-inner'),d=o.width(),c=l.width(),g=jQuery('.tsf-flex-nav-name');s.tabWrapper||(s.tabWrapper={},s.tabWrapper.outer=0,s.tabWrapper.inner=0,s.tabWrapper.shown=1),!s.tabWrapper.shown&&s.tabWrapper.outer<d&&(g.fadeIn(250),setTimeout(function(){c=l.width()},r)),setTimeout(function(){c>d?(g.hide(),s.tabWrapper.shown=0):s.tabWrapper.outer<d&&(g.fadeIn(250),s.tabWrapper.shown=1)},2*r),setTimeout(function(){s.tabWrapper.outer=d,s.tabWrapper.inner=c},3*r)}},a),r=10,a=75}),n.trigger('tsf-flex-resize')}},_setResizeListeners:function(){jQuery(window).on('resize orientationchange',tsf._triggerResize),jQuery('#collapse-menu').click(tsf._triggerResize),jQuery('.columns-prefs :input[type=radio]').change(tsf._triggerResize),jQuery('.meta-box-sortables').on('sortupdate',tsf._triggerResize)},_triggerTooltipReset:function(){jQuery(window).trigger('tsf-reset-tooltips')},_triggerTooltipUpdate:function(t){jQuery(t).trigger('tsf-tooltip-update')},_triggerResize:function(){jQuery(window).trigger('tsf-flex-resize')},_triggerCounterUpdate:function(){jQuery(window).trigger('tsf-counter-updated')},_triggerReady:function(){jQuery(document.body).trigger('tsf-ready')},_doReady:function(){tsf._initCounters(),tsf._initTitleInputs(),tsf._initUnboundTitleSettings(),tsf._initSocialTitleInputs(),tsf._initDescInputs(),tsf._initSocialDescInputs(),tsf._initPrimaryTerm(),tsf.setTabsOnload(),tsf.taglineToggleOnload(),tsf._initToolTips(),tsf.setupImageEditorActions(),tsf.checkImageEditorInput(),tsf.setColorOnload(),tsf.attachUnsavedChangesListener(),tsf.onLoadUnregisterChange(),tsf._doFlexResizeListener(),tsf._triggerReady()},setupVars:function(){tsf.counterType=parseInt(tsf.states.counterType),tsf.hasInput=tsf.states.hasInput},ready:function(t){tsf.setupVars(),t('div.updated, div.error, div.notice-warning').insertAfter('div.tsf-top-wrap'),t(document.body).ready(tsf._doReady),t('.tsf-js-confirm-reset').on('click',tsf.confirmedReset),t('.tsf-tabs-radio').on('change',tsf.tabToggle),t('.tsf-flex-nav-tab-radio').on('change',tsf.flexTabToggle),t('#tsf-description-onblogname-toggle :input').on('click',tsf.taglineToggleDesc),t('#tsf-description-additions-toggle :input').on('click',tsf.additionsToggleDesc),t('.tsf-dismiss').on('click',tsf.dismissNotice)}},jQuery(tsf.ready);
|
1 |
+
'use strict';window.tsf={nonces:tsfL10n.nonces,i18n:tsfL10n.i18n,states:tsfL10n.states,params:tsfL10n.params,other:tsfL10n.other,settingsChanged:!1,counterType:0,hasInput:!1,additionsClass:'',cropper:{},confirm:function(t){function s(){return t.apply(this,arguments)}return s.toString=function(){return t.toString()},s}(function(t){return confirm(t)}),escapeString:function escapeString(t){if(!t.length)return'';var s={'&':'&','<':'<','>':'>','"':'"','\'':'''};return t.replace(/[&<>"']/g,function(a){return s[a]})},unescapeString:function unescapeString(t){if(!t.length)return'';var s={'&':'&','<':'<','>':'>','"':'"','\'':'''},a=Object.keys(s).map(function(n){return s[n]}),o=new RegExp(a.map(function(n){return n.replace(/[\-\[\]\/\{\}\(\)\*\+\?\.\\\^\$\|]/g,'\\$&')}).join('|'),'g');return t.replace(o,function(n){return Object.keys(s).find(function(r){return s[r]===n})})},getStringLength:function getStringLength(t){var s,a=0;return t.length&&(s=document.createElement('span'),s.innerHTML=tsf.escapeString(t),a=s.childNodes[0].nodeValue.length),+a},updatePixelCounter:function updatePixelCounter(t){var s=t.e,a=t.text,o=t.guideline,n=s.parentElement;if(n){var r=n.querySelector('.tsf-pixel-counter-bar'),l=n.querySelector('.tsf-pixel-counter-shadow');if(r&&l){l.innerHTML=tsf.escapeString(a);var d=l.offsetWidth,c='',g='',f='tsf-pixel-counter-fit',u='tsf-pixel-counter-overflown';d>o?(g=100*(o/(d+2*(d-o)/3))+'%',c=u):(g=100*(d/o)+'%',c=f);var x,y=r.querySelector('.tsf-pixel-counter-fluid');x=tsf.i18n.pixelsUsed.replace(/%1\$d/g,d),x=x.replace(/%2\$d/g,o),r.classList.remove(f,u),r.classList.add(c),r.dataset.desc=x,r.setAttribute('aria-label',x),y.style.width=g,tsf._triggerTooltipUpdate(r)}}},_initTitleInputs:function _initTitleInputs(){if(tsf.hasInput){var t=jQuery('#autodescription_title, #autodescription-meta\\[doctitle\\], #autodescription-site-settings\\[homepage_title\\]');if(t.length){var o,n,r,d,s=!1,a=!!navigator.userAgent.match(/Trident\/7\./),l='',c='',g=tsf.params.titleSeparator,f=tsf.params.objectTitle,u=tsf.states.useTagline,y=tsf.states.isRTL,x=tsf.states.isPrivate,b=tsf.states.isPasswordProtected;o=y?'after':'before';var T=function(){var Y='before';tsf.states.isSettingsPage?y?'right'===jQuery('#tsf-home-title-location input:checked').val()&&(Y='after'):'left'===jQuery('#tsf-home-title-location input:checked').val()&&(Y='after'):tsf.states.isHome?y?'right'===tsf.params.titleLocation&&(Y='after'):'left'===tsf.params.titleLocation&&(Y='after'):y?'left'===tsf.params.titleLocation&&(Y='after'):'right'===tsf.params.titleLocation&&(Y='after'),n=Y};T();var C=function(){var Y='';if(!tsf.states.isSettingsPage)tsf.states.isHome?u&&(Y=tsf.params.titleAdditions):u&&(Y=tsf.params.titleAdditions);else if(u){var Z=document.getElementById('autodescription-site-settings[homepage_title_tagline]'),Q=Z?Z.value:'';Y=Q.length?Q:tsf.params.blogDescription}Y.length&&(Y=tsf.escapeString(Y),'before'===n?Y=Y+' '+g+' ':'after'===n?Y=' '+g+' '+Y:void 0),c=Y.length?Y:'',d=document.getElementById('tsf-title-placeholder'),c.length&&d&&(d.innerHTML=c)};C();var S=function(){var Y='';x?Y=tsf.i18n.privateTitle:b&&(Y=tsf.i18n.protectedTitle),Y.length&&(Y=tsf.escapeString(Y),'before'===o?Y+=' ':'after'===o?Y=' '+Y:void 0),l=Y.length?Y:'',l.length&&r&&(r.innerHTML=l),r=document.getElementById('tsf-title-placeholder-prefix'),l.length&&r&&(r.innerHTML=l)};S();var I=function(Y){if(d||r){var Z=jQuery(Y.target),Q=Z.val(),tt=!!c.length,et=!!l.length;if(!tt&&d&&(d.style.display='none'),!et&&r&&(r.style.display='none'),!tt&&!et)return void Z.css('text-indent','initial');if(!Q.length)return Z.css('text-indent','initial'),d&&(d.style.display='none'),void(r&&(r.style.display='none'));var it=Z.outerWidth(!0),st=(Z.outerHeight(!0)-Z.height())/2,at=(it-Z.innerWidth())/2,ot=y?'right':'left',nt=(Z.outerWidth(!0)-Z.width())/2,rt={display:Z.css('display'),lineHeight:Z.css('lineHeight'),fontFamily:Z.css('fontFamily'),fontWeight:Z.css('fontWeight'),fontSize:Z.css('fontSize'),letterSpacing:Z.css('letterSpacing'),paddingTop:st+'px',paddingBottom:st+'px'},lt=jQuery(r),pt=jQuery(d),dt=0,ct=0,gt=0,ft=0,ut=0,ht=0;if(et&&(lt.css(rt),lt.css({maxWidth:'initial'}),ut=lt[0].getBoundingClientRect().width,ut<ht&&(ut=0)),tt){var mt=0;switch(function(){var vt=jQuery('#tsf-title-offset');vt.text(Q),vt.css({fontFamily:rt.fontFamily,fontWeight:rt.fontWeight,letterSpacing:rt.letterSpacing,fontSize:rt.fontSize}),mt=vt[0].getBoundingClientRect().width}(),dt=Z[0].getBoundingClientRect().width-at-nt-mt-ut,dt<ht&&(ut+=dt,dt=0),pt.css(rt),pt.css({maxWidth:'initial'}),n){case'before':var yt=pt[0].getBoundingClientRect().width;yt=dt<yt?dt:yt,yt<ht&&(yt=0),dt=yt,ft+=dt,gt+=dt,ct+=nt;break;case'after':ct+=nt+mt+ut;}}gt+=nt,ut=0>ut?0:ut,ft+=ut;var xt;et&&(xt={},xt[ot]=gt+'px',xt.maxWidth=ut+'px',lt.css(xt)),tt&&(xt={},xt[ot]=ct+'px',xt.maxWidth=dt+'px',pt.css(xt)),xt={},xt['text-indent']=ft+'px',Z.css(xt)}},L=function(){var Z='',Q=!!c.length,tt=!!l.length,et=c,it=l;tsf.states.isTermEdit&&tsf.params.termName&&(it=y?' :'+tsf.params.termName:tsf.params.termName+': ',tt=tsf.states.useTermPrefix),Z=f,tt&&('before'===o?Z=it+Z:'after'===o?Z+=it:void 0),Q&&('before'===n?Z=et+Z:'after'===n?Z+=et:void 0),a&&(s=!0);var st=document.createElement('span');st.innerHTML=Z,t.prop('placeholder',st.textContent),a&&setTimeout(function(){s=!1},0)},E=function(Y){var Z=document.getElementById('tsf-title-reference'),Q='';Z&&(1>Y.target.value.length?Q=Y.target.placeholder:(Q=Y.target.value,l.length&&('before'===o?Q=l+Q:'after'===o?Q+=l:void 0),c.length&&('before'===n?Q=c+Q:'after'===n?Q+=c:void 0)),Z.innerHTML=tsf.escapeString(Q),setTimeout(function(){jQuery(Z).change()},0))},W=function(Y){var Z=document.getElementById(Y.target.id+'_chars'),Q=document.getElementById('tsf-title-reference');if(Z&&Q){var tt=tsf.getStringLength(tsf.unescapeString(Q.innerHTML)),et=Y.target,it='',st=tsf.counterType,at='',ot='';25>tt||75<=tt?(it+='tsf-count-bad',at=tsf.i18n.bad):42>tt||55<tt?(it+='tsf-count-okay',at=tsf.i18n.okay):(it+='tsf-count-good',at=tsf.i18n.good),st&&1!=st?2==st?ot=at:3==st&&(ot=tt.toString()+' - '+at):ot=tt.toString(),Z.innerHTML=ot,tsf.additionsClass&&(it+=' '+tsf.additionsClass),Z.className!==it&&(Z.className=it)}},j=function(Y){var Z=document.getElementById(Y.target.id+'_pixels'),Q=document.getElementById('tsf-title-reference');if(Z&&Q){var tt={e:Z,text:tsf.unescapeString(Q.innerHTML),guideline:tsf.params.titlePixelGuideline};tsf.updatePixelCounter(tt)}};t.on('input.tsfUpdateTitles',function H(Y){return!s&&void(I(Y),L(),E(Y),W(Y),j(Y))});t.on('tsf-update-title-counter',function R(Y){E(Y),W(Y),j(Y)});var P=function(){t.trigger('tsf-update-title-counter')},D=function(){t.trigger('input.tsfUpdateTitles')};D();var A=function(){C(),D()};jQuery('#autodescription-site-settings\\[homepage_title_tagline\\]').on('input',A),jQuery('#autodescription-site-settings\\[homepage_tagline\\]').on('change',A);var B=0,O=function(){clearTimeout(B),B=setTimeout(function(){D()},50)};jQuery(window).on('tsf-counter-updated',O);jQuery('#tsf-title-tagline-toggle :input').on('click',function U(Y){var Z=u;jQuery(Y.target).is(':checked')?(jQuery('.tsf-custom-blogname-js').css('display','inline'),u=!0):(jQuery('.tsf-custom-blogname-js').css('display','none'),u=!1),Z^u&&(C(),O())});jQuery('#visibility .save-post-visibility').on('click',function z(){var Z=jQuery('#visibility').find('input:radio:checked').val();switch(x=!1,b=!1,Z){case'password':var Q=jQuery('#visibility').find('#post_password').val();b=!!Q&&!!Q.length;break;case'private':x=!0;break;default:case'public':}S(),O()});jQuery('#tsf-title-separator :input').on('click',function q(Y){var Z=jQuery(Y.target).val(),Q='';Q='pipe'===Z?'|':'dash'===Z?'-':jQuery('<div/>').html('&'+Z+';').text(),g=Q,jQuery('.tsf-sep-js').text(' '+g+' '),C(),O()});var M=function(){var Y=tsf.settingsChanged;D(!0),tsf.settingsChanged=Y};jQuery('#homepage-tab-general').on('tsf-tab-toggled',M),jQuery('#tsf-flex-inpost-tab-general').on('tsf-flex-tab-toggled',M);var N=0,F=function(){clearTimeout(N),N=setTimeout(M,50)};jQuery(window).one('tsf-ready',function(){jQuery(window).on('tsf-flex-resize',F)});var X=['autodescription-homepage-settings','tsf-inpost-box'];jQuery(document).on('postbox-toggled',function V(Y,Z){if(0<=X.indexOf(Z.id)){var Q=Z.querySelector('.inside');0<Q.offsetHeight&&0<Q.offsetWidth&&M()}});jQuery('#tsf-home-title-location :input').on('click',function G(){T(),C(),O()});tsf.states.isHome||jQuery('#edittag #name, #titlewrap #title').on('input',function J(Y){var Z=Y.target.value;Z=Z.trim(),f=Z.length?tsf.escapeString(Z):tsf.params.untitledTitle,L(),P()});(function K(){var Y=0,Z=window.innerWidth;window.addEventListener('resize',function(){clearTimeout(Y),Y=setTimeout(function(){var Q=window.innerWidth;Z<Q?782>=Z&&782<=Q&&M():782<=Z&&782>=Q&&M(),Z=Q},50)})})()}}},_initUnboundTitleSettings:function _initUnboundTitleSettings(){if(tsf.hasInput){var t=jQuery('#autodescription_title, #autodescription-meta\\[doctitle\\], #autodescription-site-settings\\[homepage_title\\]');jQuery('#tsf-title-placeholder, #tsf-title-placeholder-prefix').on('click',function s(d){var c=jQuery(d.target).siblings(t)[0];if('function'==typeof c.setSelectionRange){c.focus();var g=2*c.value.length;c.setSelectionRange(g,g)}else{var f=c.value;c.value='',c.focus(),c.value=f}});jQuery('#autodescription-site-settings\\[title_rem_additions\\]').on('click',function a(d){jQuery(d.target).is(':checked')?jQuery('.tsf-title-additions-js').css('display','none'):jQuery('.tsf-title-additions-js').css('display','inline')});jQuery('#tsf-title-location input').on('click',function o(d){var c=jQuery('.tsf-title-additions-example-left'),g=jQuery('.tsf-title-additions-example-right');'right'===jQuery(d.target).val()?(c.css('display','none'),g.css('display','inline')):(c.css('display','inline'),g.css('display','none'))});jQuery('#autodescription-site-settings\\[homepage_title\\]').on('input',function n(d){var c=d.target.value||'',g=jQuery('.tsf-custom-title-js');0===c.length?g.text(tsf.params.objectTitle):g.text(c)});jQuery('#autodescription-site-settings\\[homepage_title_tagline\\]').on('input.tsfInputTagline',function r(d){var c=d.target.value||'',g=jQuery('.tsf-custom-tagline-js');0===c.length?(g.text(tsf.params.blogDescription),0===tsf.params.blogDescription.length?jQuery('#tsf-home-title-location .tsf-sep-js').hide():jQuery('#tsf-home-title-location .tsf-sep-js').show()):(g.text(c),jQuery('#tsf-home-title-location .tsf-sep-js').show())}),jQuery('#autodescription-site-settings\\[homepage_title_tagline\\]').trigger('input.tsfInputTagline');jQuery('#title-prefixes-toggle :input').on('click',function l(d){var c=jQuery(d.target),g=jQuery('.tsf-title-prefix-example');c.is(':checked')?g.css('display','none'):g.css('display','inline')})}},_initDescInputs:function _initDescInputs(){if(tsf.hasInput){var t=jQuery('#autodescription_description, #autodescription-meta\\[description\\], #autodescription-site-settings\\[homepage_description\\]');if(t.length){var s=tsf.params.descriptionSeparator;jQuery('#tsf-description-separator input').on('click',function a(x){var b=jQuery(x.target).val(),T='';T='pipe'===b?'|':'dash'===b?'-':jQuery('<div/>').html('&'+b+';').text(),s=T,jQuery('#autodescription-descsep-js').text(' '+s+' '),g()});var o=function(x){var b=document.getElementById(x.target.id+'_chars');if(b){var T=0,C=x.target,S='',I=tsf.counterType,L='',E='';T=1>C.value.length?tsf.getStringLength(C.placeholder):tsf.getStringLength(C.value),100>T||330<=T?(S+='tsf-count-bad',L=tsf.i18n.bad):137>T||300<T?(S+='tsf-count-okay',L=tsf.i18n.okay):(S+='tsf-count-good',L=tsf.i18n.good),I&&1!=I?2==I?E=L:3==I&&(E=T.toString()+' - '+L):E=T.toString(),b.innerHTML=E,tsf.additionsClass&&(S+=' '+tsf.additionsClass),b.className!==S&&(b.className=S)}},n=function(x){var b=document.getElementById('tsf-description-reference'),T='';b&&(T=1>x.target.value.length?x.target.placeholder:x.target.value,b.innerHTML=tsf.escapeString(T),setTimeout(function(){jQuery(b).change()},0))},r=function(x){var b=document.getElementById(x.target.id+'_pixels'),T=document.getElementById('tsf-description-reference');if(b&&T){var C={e:b,text:tsf.unescapeString(T.innerHTML),guideline:tsf.params.descPixelGuideline};tsf.updatePixelCounter(C)}};t.on('input.tsfUpdateDescriptions',function l(x){n(x),o(x),r(x)});var d=function(){t.trigger('input.tsfUpdateDescriptions')};d();var c=0,g=function(){clearTimeout(c),c=setTimeout(function(){d()},50)};jQuery(window).on('tsf-counter-updated',g);var u=['autodescription-homepage-settings','tsf-inpost-box'];jQuery(document).on('postbox-toggled',function y(x,b){if(0<=u.indexOf(b.id)){var T=b.querySelector('.inside');0<T.offsetHeight&&0<T.offsetWidth&&g()}})}}},_initSocialTitleInputs:function _initSocialTitleInputs(){if(tsf.hasInput){var t=jQuery('#autodescription_og_title'),s=jQuery('#autodescription_twitter_title'),a=jQuery('#tsf-title-reference');if(t.length&&s.length&&a.length){var o=!1,n=!!navigator.userAgent.match(/Trident\/7\./),r=tsf.escapeString(t.val()),l=tsf.escapeString(s.val()),d=a.text(),c=function(x){var b='';switch(x){case'twitter':b=l;case'og':b=b.length?b:r;case'reference':b=b.length?b:d;}return b},g=function(){n&&(o=!0),t.attr('placeholder',c('reference')),s.attr('placeholder',c('og')),n&&setTimeout(function(){o=!1},0)},f=function(x,b,T){x&&b&&T?tsf.updateSocialCounter(x,b,T):(t.each(function(C,S){return f(S,c('og'),88)}),s.each(function(C,S){return f(S,c('twitter'),70)}))};a.on('change',function(){d=a.text(),g(),f()});t.on('input.tsfUpdateOgTitle',function u(x){o||(r=x.target.value.length?tsf.escapeString(x.target.value):'',g(),f())}),s.on('input.tsfUpdateOgTitle',function y(x){o||(l=x.target.value.length?tsf.escapeString(x.target.value):'',g(),f())})}}},_initSocialDescInputs:function _initSocialDescInputs(){if(tsf.hasInput){var t=jQuery('#autodescription_og_description'),s=jQuery('#autodescription_twitter_description'),a=jQuery('#tsf-description-reference');if(t.length&&s.length&&a.length){var o=!1,n=!!navigator.userAgent.match(/Trident\/7\./),r=tsf.escapeString(t.val()),l=tsf.escapeString(s.val()),d=a.text(),c=function(x){var b='';switch(x){case'twitter':b=l;case'og':b=b.length?b:r;case'reference':b=b.length?b:d;}return b},g=function(){n&&(o=!0),t.attr('placeholder',c('reference')),s.attr('placeholder',c('og')),n&&setTimeout(function(){o=!1},0)},f=function(x,b,T){x&&b&&T?tsf.updateSocialCounter(x,b,T):(t.each(function(C,S){return f(S,c('og'),300)}),s.each(function(C,S){return f(S,c('twitter'),200)}))};a.on('change',function(){d=a.text(),g(),f()});t.on('input.tsfUpdateOgDesc',function u(x){o||(r=x.target.value.length?tsf.escapeString(x.target.value):'',g(),f())}),s.on('input.tsfUpdateOgDesc',function y(x){o||(l=x.target.value.length?tsf.escapeString(x.target.value):'',g(),f())})}}},updateSocialCounter:function updateSocialCounter(t,s,a){var o=document.getElementById(t.id+'_chars');if(o){var n=tsf.getStringLength(tsf.unescapeString(s)),r='',l=tsf.counterType,d='',c='';n>a?(r+='tsf-count-bad',d=tsf.i18n.bad):(r+='tsf-count-good',d=tsf.i18n.good),l&&1!=l?2==l?c=d:3==l&&(c=n.toString()+' - '+d):c=n.toString(),o.innerHTML=c,tsf.additionsClass&&(r+=' '+tsf.additionsClass),o.className!==r&&(o.className=r)}},_initCounters:function _initCounters(){if(tsf.hasInput){jQuery('.tsf-counter').on('click',function t(){++tsf.counterType,3<tsf.counterType&&(tsf.counterType=0),s();var r='.tsf-counter-wrap .tsf-ajax',l=0;tsf.resetAjaxLoader(r),tsf.setAjaxLoader(r);var d={method:'POST',url:ajaxurl,datatype:'json',data:{action:'the_seo_framework_update_counter',nonce:tsf.nonces.edit_posts,val:tsf.counterType},async:!0,success:function success(c){switch(c=jQuery.parseJSON(c),'success'===c.type&&(l=1),l){case 0:tsf.unsetAjaxLoader(r,!1);break;case 1:tsf.unsetAjaxLoader(r,!0);break;default:tsf.resetAjaxLoader(r);}}};jQuery.ajax(d)});var s=function(){var n=tsf.counterType;1==n?(tsf.additionsClass='tsf-counter-one',tsf.counterType=1):2==n?(tsf.additionsClass='tsf-counter-two',tsf.counterType=2):3==n?(tsf.additionsClass='tsf-counter-three',tsf.counterType=3):(tsf.additionsClass='tsf-counter-zero',tsf.counterType=0),tsf._triggerCounterUpdate()};s();jQuery('#autodescription-site-settings\\[display_character_counter\\]').on('click',function a(n){jQuery(n.target).is(':checked')?jQuery('.tsf-counter-wrap').show():jQuery('.tsf-counter-wrap').hide()});jQuery('#autodescription-site-settings\\[display_pixel_counter\\]').on('click',function o(n){jQuery(n.target).is(':checked')?(jQuery('.tsf-pixel-counter-wrap').show(),tsf._triggerCounterUpdate()):jQuery('.tsf-pixel-counter-wrap').hide()})}},_initPrimaryTerm:function _initPrimaryTerm(){if(tsf.hasInput&&Object.keys(tsf.states.taxonomies).length){var t=tsf.states.taxonomies,s=wp.template('tsf-primary-term-selector'),a=wp.template('tsf-primary-term-selector-help'),o=document.createElement('span');o.classList.add('tsf-primary-term-selector'),o.classList.add('tsf-set-primary-term'),function(){var q=document.createElement('input');q.setAttribute('type','radio'),o.appendChild(q)}();var n={},r={},l={},d={},c={},g=function(q){var M=jQuery('#'+q+'div'),N=s({taxonomy:t[q]});M.append(N)},f=function(q){var M=jQuery('#taxonomy-'+q),N=a({taxonomy:t[q]});M.append(N),u(q)},u=function(q){var M=document.getElementById('taxonomy-'+q),N=M.querySelectorAll('.tabs-panel'),F=jQuery(M).closest('.postbox');if(!(F.length&&F.hasClass('closed'))){var X=Array.prototype.slice.call(N).filter(function(G){return 0<G.offsetWidth||0<G.offsetHeight||0<G.getClientRects().length})[0];if(X){var V=X.scrollHeight>X.clientHeight?X.offsetWidth-X.clientWidth+25-2:25;tsf.states.isRTL?M.querySelector('.tsf-primary-term-selector-help-wrap').style.left=V+'px':M.querySelector('.tsf-primary-term-selector-help-wrap').style.right=V+'px'}}},y=function(q){u(q.data.taxonomy)},x=function(q){var M=o.cloneNode(!0);return M.setAttribute('title',t[q].i18n.makePrimary),M.setAttribute('aria-label',t[q].i18n.makePrimary),M},b=function(q,M){var N=document.getElementById('autodescription[_primary_term_'+q+']');N&&N instanceof Element&&(N.value=M)},T=function(q,M){return!M&&d[q]?d[q]:(d[q]=jQuery('#'+q+'checklist, #'+q+'checklist-pop'),d[q])},C=function(q,M){return n[q].filter('[value="'+M+'"]')},S=function(q,M){var N=C(q,M).closest('label');N.length?(N.addClass('tsf-is-primary-term'),N.find('.tsf-set-primary-term').each(function(F,X){X.setAttribute('title',t[q].i18n.primary),X.setAttribute('aria-label',t[q].i18n.primary),X.querySelector('input').checked=!0}),b(q,M),c[q]=M):L(q)},I=function(q){var M=T(q).find('label');M.removeClass('tsf-is-primary-term'),M.find('.tsf-set-primary-term').each(function(N,F){F.setAttribute('title',t[q].i18n.makePrimary),F.setAttribute('aria-label',t[q].i18n.makePrimary),F.querySelector('input').checked=!1}),b(q,'')},L=function(q){var N,M=l[q].first();M.length&&(N=M.val()||'',S(q,N),c[q]=N)},E=function(q){var M=q.data.taxonomy,N=jQuery(q.target).closest('label').find('input[type=checkbox]').val();return I(M),S(M,N),!1},W=function(q){var M=q.data.taxonomy;switch(q.target.checked?(R(M,q.target),j(M,q.target)):(P(M,q.target),H(M,q.target)),l[M].length){case 0:b(M,'');break;case 1:L(M);}},j=function(q,M){var N;C(q,M.value).each(function(F,X){N=jQuery(X).closest('label'),N.find('.tsf-primary-term-selector').length||N.append(x(q))})},H=function(q,M){var N,F;C(q,M.value).each(function(X,V){N=jQuery(V).closest('label'),F=N.hasClass('tsf-is-primary-term'),N.removeClass('tsf-is-primary-term'),N.find('.tsf-primary-term-selector').remove(),F&&L(q)})},R=function(q,M){r[q]=r[q].add('[value="'+M.value+'"]'),l[q]=l[q].add(M)},P=function(q,M){r[q]=r[q].not('[value="'+M.value+'"]'),l[q]=l[q].not('[value="'+M.value+'"]')},D=function(q){u(q.data.taxonomy)},A=function(q){var M=T(q,1);n[q]=M.find('input[type=checkbox]'),r[q]=M.find('input[type=checkbox]:checked');var F,N={};l[q]=r[q],l[q].each(function(X,V){F=jQuery(V).val(),N[F]?l[q].splice(X,1):N[F]=!0})},B=function(q,M,N){N.hasOwnProperty('settings')&&N.settings.hasOwnProperty('what')&&(A(N.settings.what),O(N.settings.what),U(N.settings.what),u(N.settings.what))},O=function(q){var M='tsfShowPrimary'+q,N={taxonomy:q},F=T(q),X=jQuery('#'+q+'div'),V=jQuery('#'+q+'-tabs'),G=F.closest('.postbox');F.off('click.'+M),F.on('click.'+M,'input[type="checkbox"]',N,W),F.on('click.'+M,'.tsf-primary-term-selector',N,E),X.off('wpListAddEnd.'+M),X.on('wpListAddEnd.'+M,'#'+q+'checklist',B),V.off('click.'+M),V.on('click.'+M,'a',N,y),G.off('click.postboxes.'+M),G.on('click.postboxes.'+M,N,D)},U=function(q){T(q).find('input[type="checkbox"]:checked').each(function(M,N){j(q,N)}),t[q].primary?S(q,t[q].primary):L(q)};(function z(){for(var q in t)T(q).length&&(g(q),f(q),A(q),O(q),U(q))})()}},_initToolTips:function _initToolTips(){var t=0,s=!1,a=function(){s=!0,clearTimeout(t),t=setTimeout(function(){s=!1},250)},o=function(y,x){x=x||!1;var b='pointerdown.tsfTT touchstart.tsfTT click.tsfTT',T=jQuery(y);x?(T.off('mousemove mouseleave mouseout tsf-tooltip-update'),jQuery(document.body).off(b)):(T.on({mousemove:d,mouseleave:c,mouseout:c}),jQuery(document.body).off(b).on(b,g)),T.on('tsf-tooltip-update',r)},n=function(y){o(y,!0)},r=function(y){if(y.target.classList.contains('tsf-tooltip-item')){var x=y.target.querySelector('.tsf-tooltip-text');x instanceof Element&&(x.innerHTML=y.target.dataset.desc)}},l=function(y){var x=jQuery(y.target),b=y.target.dataset.desc;if(b&&0===x.find('div').length){y.target.title='';var T=jQuery('<div class="tsf-tooltip"><span class="tsf-tooltip-text-wrap"><span class="tsf-tooltip-text">'+b+'</span></span><div class="tsf-tooltip-arrow"></div></div>');x.append(T);var C=x.closest('.tsf-tooltip-boundary');C=C.length&&C||jQuery(document.body);var S=x.outerHeight()+9,I=T.offset().top-S,L=C.offset().top-(C.prop('scrolltop')||0);L>I?(T.addClass('tsf-tooltip-down'),T.css('top',S+'px')):T.css('bottom',S+'px');var E=x.closest('.tsf-tooltip-wrap'),W=T.find('.tsf-tooltip-text-wrap'),j=W.find('.tsf-tooltip-text'),H=E.width(),R=W.outerWidth(!0),P=j.outerWidth(!0),D=W.offset().left,A=D+P,B=C.offset().left-(C.prop('scrollLeft')||0),O=B+C.outerWidth(),U='left';if(D<B){var z=B-D+12,q=parseInt(W.css('flex-basis'),10);z<-q&&(z=-q),T.css(U,z+'px'),T.data('overflow',z),T.data('overflowDir',U)}else if(A>O){var M=O-A-H-12,N=parseInt(W.css('flex-basis'),10);M<-N&&(M=-N),T.css(U,M+'px'),T.data('overflow',M),T.data('overflowDir',U)}else if(42>H){var F=-15;T.css(U,F+'px'),T.data('overflow',F),T.data('overflowDir',U)}else if(H>R){var X=y.originalEvent&&y.originalEvent.pageX||y.pageX,V=E.offset().left,J=X-V-R/2,K=J+R;0>J?J=0:K>H&&(J=H-P),T.css(U,J+'px'),T.data('adjust',J),T.data('adjustDir',U)}}},d=function(y){var x=jQuery(y.target),b=x.find('.tsf-tooltip'),T=b.find('.tsf-tooltip-arrow'),C=b.data('overflow'),S=b.data('overflowDir');if(C=parseInt(C,10),C=isNaN(C)?0:-Math.round(C),C)T.css(S,C+'px');else{var I=y.originalEvent&&y.originalEvent.pageX||y.pageX,L=7,E=16,W=x.closest('.tsf-tooltip-wrap'),j=I-W.offset().left-E/2,R=b.find('.tsf-tooltip-text-wrap'),P=R.outerWidth(!0),D=b.data('adjust'),A=b.data('adjustDir'),B=P-E-L;if(D=parseInt(D,10),D=isNaN(D)?0:Math.round(D),D&&(D='left'===A?-D:D,j+=D,B-D>W.outerWidth(!0))){var O=R.find('.tsf-tooltip-text'),U=O.outerWidth(!0);B=U-E-L}j<=L?T.css('left',L+'px'):j>=B?T.css('left',B+'px'):T.css('left',j+'px')}},c=function(y){s||(jQuery(y.target).find('.tsf-tooltip').remove(),n(y.target))},g=function(y){a();var C,b='.tsf-tooltip',T=jQuery(y.target);if(T.hasClass('tsf-tooltip-item')&&(C=T.find(b)),!C){var S=T.children('.tsf-tooltip-item');S.length&&(C=S.find(b))}C&&C.length?jQuery(b).not(C).remove():jQuery(b).remove()},f=function(y){if(!s){var x=!1;switch(y.type){case'mouseenter':break;case'pointerdown':case'touchstart':x=!0;break;default:}if(y.target.classList.contains('tsf-tooltip-item'))x&&g(y),l(y),d(y),o(y.target);else{var b=y.target.querySelector('.tsf-tooltip-item:hover'),T=new jQuery.Event(y.type);T.pageX=y.originalEvent&&y.originalEvent.pageX||y.pageX,b?(tsfL10n.states.debug&&console.log('Tooltip event warning: delegation'),jQuery(b).trigger(T)):(tsfL10n.states.debug&&console.log('Tooltip event warning: bubbling'),jQuery(y.target).closest('.tsf-tooltip-wrap').find('.tsf-tooltip-item:hover').trigger(T))}y.stopPropagation()}},u=function(){var y=jQuery('.tsf-tooltip-wrap');y.off('mouseenter pointerdown touchstart'),y.on('mouseenter pointerdown touchstart','.tsf-tooltip-item',f)};u(),jQuery(window).on('tsf-reset-tooltips',u),function(){var y=jQuery('#wpcontent');tsf.addTooltipBoundary(y)}()},addTooltipBoundary:function addTooltipBoundary(t){jQuery(t).addClass('tsf-tooltip-boundary')},tabToggle:function tabToggle(t){var s=jQuery(t.target);if(s.is(':checked')){var a=s.prop('id'),o=s.prop('name');if('undefined'!=typeof o){var n='tsf-active-tab-content',r=jQuery('#'+a+'-content'),l=jQuery('.'+n);if(!r.is(l)&&'undefined'!=typeof r){var d=jQuery('.'+o+'-content');d.fadeOut(150,function(){jQuery(this).removeClass(n)}),setTimeout(function(){r.addClass(n).fadeIn(250)},150),setTimeout(function(){jQuery('#'+a).trigger('tsf-tab-toggled')},175)}}}},flexTabToggle:function flexTabToggle(t){var s=jQuery(t.target);if(s.is(':checked')){var a=s.prop('id'),o=s.prop('name');if('undefined'!=typeof o){var n='tsf-flex-tab-content-active',r=jQuery('#'+a+'-content'),l=jQuery('.'+n);if(!r.is(l)&&'undefined'!=typeof r){var d=jQuery('.'+o+'-content');d.fadeOut(150,function(){jQuery(this).removeClass(n)}),setTimeout(function(){r.addClass(n).fadeIn(250)},150),setTimeout(function(){jQuery('#'+a).trigger('tsf-flex-tab-toggled')},175)}}}},setTabsOnload:function setTabsOnload(){if(tsf.hasInput)if(tsf.states.isPostEdit&&jQuery('.tsf-flex-nav-tab-radio').trigger('change'),tsf.states.isSettingsPage){var t=jQuery('.tsf-nav-tab-wrapper .tsf-tab:nth-of-type(n+2) input:checked');t.length&&t.each(function(){var a=jQuery(this),o=a.prop('id'),n=a.prop('name');if('undefined'!=typeof n){var r='tsf-active-tab-content',l=jQuery('#'+o+'-content');if('undefined'!=typeof l){var d=jQuery('.'+n+'-content');d.removeClass(r),l.addClass(r),setTimeout(function(){jQuery('#'+o).trigger('tsf-tab-toggled')},20)}}})}else;},taglineToggleDesc:function taglineToggleDesc(t){var s=jQuery(t.target),a=jQuery('#tsf-on-blogname-js');s.is(':checked')?a.css('display','inline'):a.css('display','none')},additionsToggleDesc:function additionsToggleDesc(t){var s=jQuery(t.target),a=jQuery('#tsf-description-additions-js');s.is(':checked')?a.css('display','inline'):a.css('display','none')},taglineToggleOnload:function taglineToggleOnload(){if(tsf.hasInput){var t=jQuery('#tsf-title-tagline-toggle :input'),s=jQuery('.tsf-custom-blogname-js'),a=jQuery('#tsf-description-additions-toggle :input'),o=jQuery('#tsf-description-additions-js'),n=jQuery('#tsf-description-onblogname-toggle :input'),r=jQuery('#tsf-on-blogname-js'),l=jQuery('#tsf-title-additions-toggle :input'),d=jQuery('.tsf-title-additions-js');t.is(':checked')?s.css('display','inline'):s.css('display','none'),a.is(':checked')?o.css('display','inline'):o.css('display','none'),n.is(':checked')?r.css('display','inline'):r.css('display','none'),l.is(':checked')?d.css('display','none'):d.css('display','inline')}},attachUnsavedChangesListener:function attachUnsavedChangesListener(){if(tsf.hasInput){var t=function(o){tsf.settingsChanged||tsf.registerChange(),jQuery(s).not(a).off(o.type,t)},s='.tsf-metaboxes :input, #tsf-inpost-box .inside :input',a='.tsf-tab :input, .tsf-flex-nav-tab :input';jQuery(s).not(a).on('change',t),s='.tsf-metaboxes input[type=text], .tsf-metaboxes textarea, #tsf-inpost-box .inside input[type=text], #tsf-inpost-box .inside textarea',a='.tsf-nav-tab-wrapper input, .tsf-flex-nav-tab-wrapper input',jQuery(s).not(a).on('input',t),window.onbeforeunload=function(){if(tsf.settingsChanged)return tsf.i18n.saveAlert},jQuery('.tsf-metaboxes input[type="submit"], #publishing-action input[type="submit"], #save-action input[type="submit"], a.submitdelete').click(function(){window.onbeforeunload=null})}},registerChange:function registerChange(){tsf.settingsChanged=!0},confirmedReset:function confirmedReset(){return confirm(tsf.i18n.confirmReset)},onLoadUnregisterChange:function onLoadUnregisterChange(){tsf.settingsChanged=!1},dismissNotice:function dismissNotice(t){jQuery(t.target).parents('.tsf-notice').slideUp(200,function(){this.remove()})},setAjaxLoader:function setAjaxLoader(t){jQuery(t).toggleClass('tsf-loading')},unsetAjaxLoader:function unsetAjaxLoader(t,s){var a='tsf-success',o=2500;s||(a='tsf-error',o=5e3),jQuery(t).removeClass('tsf-loading').addClass(a).fadeOut(o)},resetAjaxLoader:function resetAjaxLoader(t){jQuery(t).stop().empty().prop('class','tsf-ajax').css('opacity','1').removeProp('style')},openImageEditor:function openImageEditor(t){if(jQuery(t.target).prop('disabled')||'undefined'==typeof wp.media)return t.preventDefault(),void t.stopPropagation();var s=jQuery(t.target),a=s.data('inputid'),o;if(o)return void o.open();t.preventDefault(),t.stopPropagation(),tsf.extendCropper();var n={suggestedWidth:s.data('width')||1200,suggestedHeight:s.data('height')||630,isFlex:'undefined'==typeof s.data('flex')?1:s.data('flex')};tsf.cropper.control={params:{flex_width:n.isFlex?4096:0,flex_height:n.isFlex?4096:0,width:n.suggestedWidth,height:n.suggestedHeight,isFlex:n.isFlex}},o=wp.media({button:{text:tsf.other[a].frame_button,close:!1},states:[new wp.media.controller.Library({title:tsf.other[a].frame_title,library:wp.media.query({type:'image'}),multiple:!1,date:!1,priority:20,suggestedWidth:n.suggestedWidth,suggestedHeight:n.suggestedHeight}),new tsf.cropper({imgSelectOptions:tsf.calculateImageSelectOptions})]});var r=function(){o.setState('cropper')};o.off('select',r),o.on('select',r);var l=function(g){var f=g.url,u=g.id,y=g.width,x=g.height;jQuery('#'+a+'-url').val(f),jQuery('#'+a+'-id').val(u)};o.off('cropped',l),o.on('cropped',l);var d=function(g){var f=g.get('url'),u=g.get('id'),y=g.get('width'),x=g.get('height');jQuery('#'+a+'-url').val(f),jQuery('#'+a+'-id').val(u)};o.off('skippedcrop',d),o.on('skippedcrop',d);var c=function(){jQuery('#'+a+'-select').text(tsf.other[a].change),jQuery('#'+a+'-url').prop('readonly',!0).css('opacity',0).animate({opacity:1},{queue:!0,duration:1000},'swing'),tsf.appendRemoveButton(s,a,!0),tsf.registerChange()};o.off('skippedcrop cropped',c),o.on('skippedcrop cropped',c),o.open()},appendRemoveButton:function appendRemoveButton(t,s,a){t&&s&&!jQuery('#'+s+'-remove').length&&(t.after('<a href="javascript:void(0)" id="'+s+'-remove" class="tsf-remove-social-image button button-small" data-inputid="'+s+'" title="'+tsf.other[s].remove_title+'">'+tsf.other[s].remove+'</a>'),a&&jQuery('#'+s+'-remove').css('opacity',0).animate({opacity:1},{queue:!0,duration:1000},'swing')),tsf.resetImageEditorActions()},removeEditorImage:function removeEditorImage(t){var s=jQuery(t.target).data('inputid');if(!jQuery('#'+s+'-select').prop('disabled')){jQuery('#'+s+'-select').addClass('disabled').prop('disabled',!0),jQuery('#'+s+'-remove').addClass('disabled').prop('disabled',!0).fadeOut(500,function(){jQuery(this).remove(),jQuery('#'+s+'-select').text(tsf.other[s].select).removeClass('disabled').removeProp('disabled')});var a=jQuery('#'+s+'-url');a.val(''),a.data('readonly')||a.removeProp('readonly'),a.css('opacity',0).animate({opacity:1},{queue:!0,duration:500},'swing'),jQuery('#'+s+'-id').val(''),tsf.registerChange()}},extendCropper:function extendCropper(){if('undefined'==typeof tsf.cropper.control){var t,a,s=wp.media.controller,o=wp.media.view;return a=o.Cropper.extend({className:'crop-content tsf-image',ready:function ready(){o.Cropper.prototype.ready.apply(this,arguments)},onImageLoad:function onImageLoad(){var r,n=this.controller.get('imgSelectOptions');'function'==typeof n&&(n=n(this.options.attachment,this.controller)),'undefined'==typeof n.aspectRatio&&(n=_.extend(n,{parent:this.$el,onInit:function onInit(){this.parent.children().on('mousedown touchstart',function(l){l.shiftKey?r.setOptions({aspectRatio:'1:1'}):r.setOptions({aspectRatio:!1})})}})),this.trigger('image-loaded'),r=this.controller.imgSelect=this.$image.imgAreaSelect(n)}}),t=s.Cropper.extend({createCropContent:function createCropContent(){this.cropperView=new a({controller:this,attachment:this.get('selection').first()}),this.cropperView.on('image-loaded',this.createCropToolbar,this),this.frame.content.set(this.cropperView)},doCrop:function doCrop(n){var r=n.get('cropDetails'),l=tsf.cropper.control;if(l.params.flex_width&&l.params.flex_height)if(r.width===r.height)r.width>l.params.flex_width&&(r.dst_width=r.dst_height=l.params.flex_width);else if(r.width>l.params.flex_width||r.height>l.params.flex_height)if(r.width>r.height){var d=r.width/l.params.flex_width;r.dst_width=l.params.flex_width,r.dst_height=Math.round(r.height/d)}else{var c=r.height/l.params.flex_height;r.dst_height=l.params.flex_height,r.dst_width=Math.round(r.width/c)}return'undefined'==typeof r.dst_width&&(r.dst_width=0,r.dst_height=0),wp.ajax.post('tsf-crop-image',{nonce:tsf.nonces.upload_files,id:n.get('id'),context:'tsf-image',cropDetails:r})}}),t.prototype.control={},void(tsf.cropper=t)}},calculateImageSelectOptions:function calculateImageSelectOptions(t,s){var y,x,b,T,a=tsf.cropper.control,o=!!parseInt(a.params.flex_width,10),n=!!parseInt(a.params.flex_height,10),r=parseInt(a.params.width,10),l=parseInt(a.params.height,10),d=t.get('width'),c=t.get('height'),g=r/l,f=r,u=l;return T=a.params.isFlex?!tsf.mustBeCropped(a.params.flex_width,a.params.flex_height,d,c):g==d/c,s.set('control',a.params),s.set('canSkipCrop',T),d/c>g?(l=c,r=l*g):(r=d,l=r/g),y=(d-r)/2,x=(c-l)/2,b={handles:!0,keys:!0,instance:!0,persistent:!0,imageWidth:d,imageHeight:c,minWidth:f>r?r:f,minHeight:u>l?l:u,x1:y,y1:x,x2:r+y,y2:l+x},a.params.isFlex?n||o?(n&&(b.minHeight=200,b.maxWidth=d),o&&(b.minWidth=200,b.maxHeight=c)):b.aspectRatio=r+':'+l:(b.handles='corners',b.aspectRatio=r+':'+l),b},mustBeCropped:function mustBeCropped(t,s,a,o){return a<=t&&o<=s?!1:!0},resetImageEditorActions:function resetImageEditorActions(){jQuery('.tsf-remove-social-image').off('click',tsf.removeEditorImage),jQuery('.tsf-remove-social-image').on('click',tsf.removeEditorImage)},setupImageEditorActions:function setupImageEditorActions(){jQuery('.tsf-set-social-image').off('click',tsf.openImageEditor),jQuery('.tsf-remove-social-image').off('click',tsf.removeEditorImage),jQuery('.tsf-set-social-image').on('click',tsf.openImageEditor),jQuery('.tsf-remove-social-image').on('click',tsf.removeEditorImage)},checkImageEditorInput:function checkImageEditorInput(){var t=jQuery('.tsf-set-social-image');if(t.length){var s='',a='';jQuery.each(t,function(o,n){s=jQuery(n).data('inputid'),a=jQuery('#'+s+'-id'),a.length&&0<a.val()&&(jQuery('#'+s+'-url').prop('readonly',!0),tsf.appendRemoveButton(jQuery(n),s,!1)),jQuery('#'+s+'-url').val()&&jQuery('#'+s+'-select').text(tsf.other[s].change)})}},setColorOnload:function setColorOnload(){var t=jQuery('.tsf-color-picker');t.length&&jQuery.each(t,function(s,a){var o=jQuery(a),n='',r=o.data('tsf-default-color');o.wpColorPicker({defaultColor:r,width:238,change:function change(){n=o.wpColorPicker('color'),''==n&&(n=r),o.val(n),tsf.registerChange()},clear:function clear(){o.parent().siblings('.wp-color-result').css('backgroundColor',r),tsf.registerChange()},palettes:!1})})},_doFlexResizeListener:function _doFlexResizeListener(){if(jQuery('.tsf-flex').length){tsf._setResizeListeners();var t=0,s={},a=0,o=jQuery('.tsf-flex-nav-tab-wrapper'),n=jQuery(window);n.on('tsf-flex-resize',function(){clearTimeout(t);var r=0;t=setTimeout(function(){if(o.length){var l=jQuery('.tsf-flex-nav-tab-inner'),d=o.width(),c=l.width(),g=jQuery('.tsf-flex-nav-name');s.tabWrapper||(s.tabWrapper={},s.tabWrapper.outer=0,s.tabWrapper.inner=0,s.tabWrapper.shown=1),!s.tabWrapper.shown&&s.tabWrapper.outer<d&&(g.fadeIn(250),setTimeout(function(){c=l.width()},r)),setTimeout(function(){c>d?(g.hide(),s.tabWrapper.shown=0):s.tabWrapper.outer<d&&(g.fadeIn(250),s.tabWrapper.shown=1)},2*r),setTimeout(function(){s.tabWrapper.outer=d,s.tabWrapper.inner=c},3*r)}},a),r=10,a=75}),n.trigger('tsf-flex-resize')}},_setResizeListeners:function _setResizeListeners(){jQuery(window).on('resize orientationchange',tsf._triggerResize),jQuery('#collapse-menu').click(tsf._triggerResize),jQuery('.columns-prefs :input[type=radio]').change(tsf._triggerResize),jQuery('.meta-box-sortables').on('sortupdate',tsf._triggerResize)},_triggerTooltipReset:function _triggerTooltipReset(){jQuery(window).trigger('tsf-reset-tooltips')},_triggerTooltipUpdate:function _triggerTooltipUpdate(t){jQuery(t).trigger('tsf-tooltip-update')},_triggerResize:function _triggerResize(){jQuery(window).trigger('tsf-flex-resize')},_triggerCounterUpdate:function _triggerCounterUpdate(){jQuery(window).trigger('tsf-counter-updated')},_triggerReady:function _triggerReady(){jQuery(document.body).trigger('tsf-ready')},_doReady:function _doReady(){tsf._initCounters(),tsf._initTitleInputs(),tsf._initUnboundTitleSettings(),tsf._initSocialTitleInputs(),tsf._initDescInputs(),tsf._initSocialDescInputs(),tsf._initPrimaryTerm(),tsf.setTabsOnload(),tsf.taglineToggleOnload(),tsf._initToolTips(),tsf.setupImageEditorActions(),tsf.checkImageEditorInput(),tsf.setColorOnload(),tsf.attachUnsavedChangesListener(),tsf.onLoadUnregisterChange(),tsf._doFlexResizeListener(),tsf._triggerReady()},setupVars:function setupVars(){tsf.counterType=parseInt(tsf.states.counterType),tsf.hasInput=tsf.states.hasInput},ready:function ready(t){tsf.setupVars(),t('div.updated, div.error, div.notice-warning').insertAfter('div.tsf-top-wrap'),t(document.body).ready(tsf._doReady),t('.tsf-js-confirm-reset').on('click',tsf.confirmedReset),t('.tsf-tabs-radio').on('change',tsf.tabToggle),t('.tsf-flex-nav-tab-radio').on('change',tsf.flexTabToggle),t('#tsf-description-onblogname-toggle :input').on('click',tsf.taglineToggleDesc),t('#tsf-description-additions-toggle :input').on('click',tsf.additionsToggleDesc),t('.tsf-dismiss').on('click',tsf.dismissNotice)}},jQuery(tsf.ready);
|
readme.txt
CHANGED
@@ -5,7 +5,7 @@ Tags: SEO, XML Sitemap, Google, Open Graph, Schema.org, Twitter
|
|
5 |
Requires at least: 4.4.0
|
6 |
Tested up to: 4.9.4
|
7 |
Requires PHP: 5.3.0
|
8 |
-
Stable tag: 3.0.
|
9 |
License: GPLv3
|
10 |
License URI: http://www.gnu.org/licenses/gpl-3.0.html
|
11 |
|
@@ -18,7 +18,17 @@ The SEO Framework plugin provides an automated and advanced SEO solution for you
|
|
18 |
|
19 |
This plugin provides an automated, accessible, unbranded and extremely fast SEO solution for any WordPress website.
|
20 |
|
21 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
22 |
|
23 |
> <strong>This plugin strongly helps you create better SEO value for your content.</strong><br>
|
24 |
> But at the end of the day, it all depends on how entertaining or well-constructed your content or product is.
|
@@ -26,8 +36,8 @@ For optional advanced SEO tools and output, check out our free companion plugin
|
|
26 |
> No SEO plugin does the magic thing to be found instantly. But doing it right helps a lot.<br>
|
27 |
> The SEO Framework helps you doing it right. Give it a try!
|
28 |
>
|
29 |
-
> The default settings
|
30 |
-
> Don't forget to set up the
|
31 |
|
32 |
= This plugin: =
|
33 |
|
@@ -81,7 +91,7 @@ Nobody has to know about the tools you've used to create your or someone else's
|
|
81 |
* Automated description output options.
|
82 |
* Schema.org structured data output options.
|
83 |
* Various robots meta output options.
|
84 |
-
* Many
|
85 |
* Facebook, Twitter, and Pinterest social integration options.
|
86 |
* Google, Bing, Pinterest and Yandex webmaster verification codes.
|
87 |
* Sitemap integration with personalization.
|
@@ -121,7 +131,7 @@ A caching plugin isn't even needed for this plugin as you won't notice a differe
|
|
121 |
* Detection of robots.txt and sitemap.xml files.
|
122 |
* Both up-to-date and outdated themes.
|
123 |
* Detection of various other popular SEO tools to prevent duplicated output.
|
124 |
-
* Translation plugins like WPML, Polylang and qTranslate X.
|
125 |
* WooCommerce, for free, in all its glory.
|
126 |
|
127 |
= An additional sitemap =
|
@@ -149,7 +159,7 @@ The Breadcrumb script generated by this plugin on Posts will also make sure Goog
|
|
149 |
|
150 |
* Check out the SEO settings page to fine-tune your settings.
|
151 |
* Do fill in the Schema "General" and "Presence" settings.
|
152 |
-
* Do fill in the
|
153 |
* Do fill in the Social Meta "General", "Facebook" and "Twitter" settings.
|
154 |
* Notice that red checkboxes are recommended to be left unchecked. And green checkboxes are recommended to be checked.
|
155 |
* These color-coded boxes are shown in non-Gecko browsers, i.e. everything but Firefox.
|
@@ -191,7 +201,7 @@ We'll try to get back to you within 72 hours. :)
|
|
191 |
Any input is greatly appreciated, and everything will be considered.
|
192 |
Please visit the [GitHub project page](https://github.com/sybrew/the-seo-framework) to submit issues or even pull requests.
|
193 |
|
194 |
-
= I want to modify how this plugin works =
|
195 |
|
196 |
The SEO Framework is very pluggable in many fields. Please refer to the [API documentation](https://theseoframework.com/docs/api/).
|
197 |
|
@@ -203,7 +213,7 @@ If a visitor can't find a page, then why would a search engine? Don't rely on yo
|
|
203 |
Check out our [Extension Manager](https://wordpress.org/plugins/the-seo-framework-extension-manager/).
|
204 |
It contains extensions, like Articles, that fill in the gaps with newer techniques.
|
205 |
|
206 |
-
= The sitemap contains unwanted links =
|
207 |
|
208 |
The SEO Framework takes all publicly queryable posts, pages, and CPT and puts them in the sitemap.
|
209 |
|
@@ -231,6 +241,18 @@ Transporting Categories, Tags and other terms' SEO data isn't supported.
|
|
231 |
|
232 |
== Changelog ==
|
233 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
234 |
= 3.0.4 - Illustrious =
|
235 |
|
236 |
**Release date:**
|
@@ -245,7 +267,7 @@ Transporting Categories, Tags and other terms' SEO data isn't supported.
|
|
245 |
|
246 |
**Summarized:**
|
247 |
|
248 |
-
* This is a maintenance release with over 10 bugs fixed. Most notoriously were pixel guideline calculation errors and
|
249 |
* Open Graph and Twitter custom title and description options have been added to every post, page, and CPT.
|
250 |
* The description character count and pixel length guidelines have been updated.
|
251 |
* All publicly queryable CPT posts and pages now support SEO settings and are included in the sitemap. No more messing with filters is needed.
|
@@ -253,7 +275,7 @@ Transporting Categories, Tags and other terms' SEO data isn't supported.
|
|
253 |
**About the new description guidelines:**
|
254 |
|
255 |
* Google increased their SERP's description length a few months ago, so we've updated the upper-limit guidelines.
|
256 |
-
* We recommend enforcing these new guidelines for new pages, cornerstone pages, and the
|
257 |
* Although the description lengths have been updated, the transient cache isn't invalidated.
|
258 |
* Over time the cache will refresh itself, this is done automatically by WordPress, or via your caching plugin's transients handler (if applicable).
|
259 |
|
@@ -342,7 +364,7 @@ Transporting Categories, Tags and other terms' SEO data isn't supported.
|
|
342 |
* It now uses WordPress' 4.6+ canonical URL generation (backward-compatibility is provided), instead of an in-house "guessing" version.
|
343 |
* **So, the Canonical URL should now always be compatible with any plugin, out of the box.** This is great news for translation plugin users!
|
344 |
* Note that canonical URLs are no longer outputted on private or unpublished posts.
|
345 |
-
* Note that if a query isn't registered correctly, the URL will also stay empty. Or, in unlikely cases, it will link to the
|
346 |
* Contact the respective plugin author on such issues. I'd love to help them correct this.
|
347 |
|
348 |
**Finally, author SEO:**
|
@@ -417,7 +439,7 @@ Transporting Categories, Tags and other terms' SEO data isn't supported.
|
|
417 |
A major update. Make a backup of your database before upgrading.
|
418 |
|
419 |
= 2.9.3 =
|
420 |
-
A highly recommended update that fixes "
|
421 |
|
422 |
= 2.8.0 =
|
423 |
In the 2.8.0 update WordPress 4.3 and PHP 5.2 support have been dropped for better code quality.
|
5 |
Requires at least: 4.4.0
|
6 |
Tested up to: 4.9.4
|
7 |
Requires PHP: 5.3.0
|
8 |
+
Stable tag: 3.0.5
|
9 |
License: GPLv3
|
10 |
License URI: http://www.gnu.org/licenses/gpl-3.0.html
|
11 |
|
18 |
|
19 |
This plugin provides an automated, accessible, unbranded and extremely fast SEO solution for any WordPress website.
|
20 |
|
21 |
+
= Extensions =
|
22 |
+
|
23 |
+
For more advanced SEO tools and output, check out our free companion plugin [Extension Manager](https://wordpress.org/plugins/the-seo-framework-extension-manager/).
|
24 |
+
Many extensions are included, among others are:
|
25 |
+
|
26 |
+
* **[Focus](https://theseoframework.com/extensions/focus/)** helps you write targeted content with **focus keywords**, their inflections, and their synonyms. A great addition for bloggers and businesses alike.
|
27 |
+
* **[Local](https://theseoframework.com/extensions/local/)** helps you set up local SEO business information. This could expand your business' "Knowledge Graph" card for local search listings.
|
28 |
+
|
29 |
+
Visit our [Extensions overview page](https://theseoframework.com/extensions/) for more information.
|
30 |
+
|
31 |
+
= Foreword =
|
32 |
|
33 |
> <strong>This plugin strongly helps you create better SEO value for your content.</strong><br>
|
34 |
> But at the end of the day, it all depends on how entertaining or well-constructed your content or product is.
|
36 |
> No SEO plugin does the magic thing to be found instantly. But doing it right helps a lot.<br>
|
37 |
> The SEO Framework helps you doing it right. Give it a try!
|
38 |
>
|
39 |
+
> The default settings, found within the SEO Settings page, are recommended. If you know what you're doing, go ahead and change them! Each option is also vastly documented.
|
40 |
+
> Don't forget to set up the Social Meta Settings and a homepage description; those can greatly increase conversion.
|
41 |
|
42 |
= This plugin: =
|
43 |
|
91 |
* Automated description output options.
|
92 |
* Schema.org structured data output options.
|
93 |
* Various robots meta output options.
|
94 |
+
* Many homepage specific options.
|
95 |
* Facebook, Twitter, and Pinterest social integration options.
|
96 |
* Google, Bing, Pinterest and Yandex webmaster verification codes.
|
97 |
* Sitemap integration with personalization.
|
131 |
* Detection of robots.txt and sitemap.xml files.
|
132 |
* Both up-to-date and outdated themes.
|
133 |
* Detection of various other popular SEO tools to prevent duplicated output.
|
134 |
+
* Translation plugins like WPML, Polylang, and qTranslate X.
|
135 |
* WooCommerce, for free, in all its glory.
|
136 |
|
137 |
= An additional sitemap =
|
159 |
|
160 |
* Check out the SEO settings page to fine-tune your settings.
|
161 |
* Do fill in the Schema "General" and "Presence" settings.
|
162 |
+
* Do fill in the Homepage "General" settings.
|
163 |
* Do fill in the Social Meta "General", "Facebook" and "Twitter" settings.
|
164 |
* Notice that red checkboxes are recommended to be left unchecked. And green checkboxes are recommended to be checked.
|
165 |
* These color-coded boxes are shown in non-Gecko browsers, i.e. everything but Firefox.
|
201 |
Any input is greatly appreciated, and everything will be considered.
|
202 |
Please visit the [GitHub project page](https://github.com/sybrew/the-seo-framework) to submit issues or even pull requests.
|
203 |
|
204 |
+
= I want to modify how this plugin works. =
|
205 |
|
206 |
The SEO Framework is very pluggable in many fields. Please refer to the [API documentation](https://theseoframework.com/docs/api/).
|
207 |
|
213 |
Check out our [Extension Manager](https://wordpress.org/plugins/the-seo-framework-extension-manager/).
|
214 |
It contains extensions, like Articles, that fill in the gaps with newer techniques.
|
215 |
|
216 |
+
= The sitemap contains unwanted links. =
|
217 |
|
218 |
The SEO Framework takes all publicly queryable posts, pages, and CPT and puts them in the sitemap.
|
219 |
|
241 |
|
242 |
== Changelog ==
|
243 |
|
244 |
+
= 3.0.5 - Rectified =
|
245 |
+
|
246 |
+
**Release date:**
|
247 |
+
|
248 |
+
* February 27th, 2017
|
249 |
+
|
250 |
+
**Summarized:**
|
251 |
+
|
252 |
+
* An issue with outdated browsers not parsing TSF's admin JavaScript has been resolved.
|
253 |
+
|
254 |
+
[View the detailed log](https://theseoframework.com/?p=2272#detailed).
|
255 |
+
|
256 |
= 3.0.4 - Illustrious =
|
257 |
|
258 |
**Release date:**
|
267 |
|
268 |
**Summarized:**
|
269 |
|
270 |
+
* This is a maintenance release with over 10 bugs fixed. Most notoriously were pixel guideline calculation errors and homepage title errors.
|
271 |
* Open Graph and Twitter custom title and description options have been added to every post, page, and CPT.
|
272 |
* The description character count and pixel length guidelines have been updated.
|
273 |
* All publicly queryable CPT posts and pages now support SEO settings and are included in the sitemap. No more messing with filters is needed.
|
275 |
**About the new description guidelines:**
|
276 |
|
277 |
* Google increased their SERP's description length a few months ago, so we've updated the upper-limit guidelines.
|
278 |
+
* We recommend enforcing these new guidelines for new pages, cornerstone pages, and the homepage.
|
279 |
* Although the description lengths have been updated, the transient cache isn't invalidated.
|
280 |
* Over time the cache will refresh itself, this is done automatically by WordPress, or via your caching plugin's transients handler (if applicable).
|
281 |
|
364 |
* It now uses WordPress' 4.6+ canonical URL generation (backward-compatibility is provided), instead of an in-house "guessing" version.
|
365 |
* **So, the Canonical URL should now always be compatible with any plugin, out of the box.** This is great news for translation plugin users!
|
366 |
* Note that canonical URLs are no longer outputted on private or unpublished posts.
|
367 |
+
* Note that if a query isn't registered correctly, the URL will also stay empty. Or, in unlikely cases, it will link to the homepage.
|
368 |
* Contact the respective plugin author on such issues. I'd love to help them correct this.
|
369 |
|
370 |
**Finally, author SEO:**
|
439 |
A major update. Make a backup of your database before upgrading.
|
440 |
|
441 |
= 2.9.3 =
|
442 |
+
A highly recommended update that fixes "Homepage as Blog" query issues.
|
443 |
|
444 |
= 2.8.0 =
|
445 |
In the 2.8.0 update WordPress 4.3 and PHP 5.2 support have been dropped for better code quality.
|