Updates to wp 4.0.1
No files matched your search
@@ -9,7 +9,7 @@
|
||||
<body>
|
||||
<h1 id="logo">
|
||||
<a href="https://wordpress.org/"><img alt="WordPress" src="wp-admin/images/wordpress-logo.png" /></a>
|
||||
<br /> Version 4.0
|
||||
<br /> Version 4.0.1
|
||||
</h1>
|
||||
<p style="text-align: center">Semantic Personal Publishing Platform</p>
|
||||
|
||||
|
||||
@@ -41,6 +41,14 @@ include( ABSPATH . 'wp-admin/admin-header.php' );
|
||||
</a>
|
||||
</h2>
|
||||
|
||||
<div class="changelog point-releases">
|
||||
<h3><?php echo _n( 'Maintenance and Security Release', 'Maintenance and Security Releases', 1 ); ?></h3>
|
||||
<p><?php printf( _n( '<strong>Version %1$s</strong> addressed some security issues and fixed %2$s bug.',
|
||||
'<strong>Version %1$s</strong> addressed some security issues and fixed %2$s bugs.', 23 ), '4.0.1', number_format_i18n( 23 ) ); ?>
|
||||
<?php printf( __( 'For more information, see <a href="%s">the release notes</a>.' ), 'http://codex.wordpress.org/Version_4.0.1' ); ?>
|
||||
</p>
|
||||
</div>
|
||||
|
||||
<div class="changelog">
|
||||
<div class="about-overview">
|
||||
<?php if ( ( $locale = get_locale() ) && 'en_' === substr( $locale, 0, 3 ) ) : ?>
|
||||
|
||||
@@ -273,7 +273,9 @@ class WP_Plugin_Install_List_Table extends WP_List_Table {
|
||||
return;
|
||||
}
|
||||
|
||||
if ( 'top' == $which ) { ?>
|
||||
if ( 'top' == $which ) {
|
||||
wp_referer_field();
|
||||
?>
|
||||
<div class="tablenav top">
|
||||
<div class="alignleft actions">
|
||||
<?php
|
||||
|
||||
@@ -401,6 +401,12 @@ function wp_read_image_metadata( $file ) {
|
||||
}
|
||||
}
|
||||
|
||||
foreach ( $meta as &$value ) {
|
||||
if ( is_string( $value ) ) {
|
||||
$value = wp_kses_post( $value );
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Filter the array of meta data read from an image's exif data.
|
||||
*
|
||||
|
||||
@@ -235,10 +235,15 @@ function install_plugins_favorites_form() {
|
||||
function display_plugins_table() {
|
||||
global $wp_list_table;
|
||||
|
||||
if ( current_filter() == 'install_plugins_favorites' && empty( $_GET['user'] ) && ! get_user_option( 'wporg_favorites' ) )
|
||||
return;
|
||||
if ( current_filter() == 'install_plugins_favorites' && empty( $_GET['user'] ) && ! get_user_option( 'wporg_favorites' ) ) {
|
||||
return;
|
||||
}
|
||||
|
||||
$wp_list_table->display();
|
||||
?>
|
||||
<form id="plugin-filter" action="" method="post">
|
||||
<?php $wp_list_table->display(); ?>
|
||||
</form>
|
||||
<?php
|
||||
}
|
||||
add_action( 'install_plugins_search', 'display_plugins_table' );
|
||||
add_action( 'install_plugins_popular', 'display_plugins_table' );
|
||||
|
||||
@@ -1205,12 +1205,18 @@ function get_sample_permalink_html( $id, $new_title = null, $new_slug = null ) {
|
||||
$return .= '<span id="change-permalinks"><a href="options-permalink.php" class="button button-small" target="_blank">' . __('Change Permalinks') . "</a></span>\n";
|
||||
}
|
||||
} else {
|
||||
if ( function_exists( 'mb_strlen' ) && mb_strlen( $post_name ) > 30 ) {
|
||||
$post_name_abridged = mb_substr( $post_name, 0, 14 ) . '…' . mb_substr( $post_name, -14 );
|
||||
} elseif ( strlen( $post_name ) > 30 ) {
|
||||
$post_name_abridged = substr( $post_name, 0, 14 ) . '…' . substr( $post_name, -14 );
|
||||
if ( function_exists( 'mb_strlen' ) ) {
|
||||
if ( mb_strlen( $post_name ) > 30 ) {
|
||||
$post_name_abridged = mb_substr( $post_name, 0, 14 ) . '…' . mb_substr( $post_name, -14 );
|
||||
} else {
|
||||
$post_name_abridged = $post_name;
|
||||
}
|
||||
} else {
|
||||
$post_name_abridged = $post_name;
|
||||
if ( strlen( $post_name ) > 30 ) {
|
||||
$post_name_abridged = substr( $post_name, 0, 14 ) . '…' . substr( $post_name, -14 );
|
||||
} else {
|
||||
$post_name_abridged = $post_name;
|
||||
}
|
||||
}
|
||||
|
||||
$post_name_html = '<span id="editable-post-name" title="' . $title . '">' . $post_name_abridged . '</span>';
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
|
||||
window.wp = window.wp || {};
|
||||
|
||||
jQuery( document ).ready( function($) {
|
||||
jQuery( document ).ready( function( $ ) {
|
||||
var $window = $( window ),
|
||||
$document = $( document ),
|
||||
$adminBar = $( '#wpadminbar' ),
|
||||
@@ -148,6 +148,11 @@ jQuery( document ).ready( function($) {
|
||||
|
||||
// We need to wait for TinyMCE to initialize.
|
||||
$document.on( 'tinymce-editor-init.editor-expand', function( event, editor ) {
|
||||
var hideFloatPanels = _.debounce( function() {
|
||||
! $( '.mce-floatpanel:hover' ).length && tinymce.ui.FloatPanel.hideAll();
|
||||
$( '.mce-tooltip' ).hide();
|
||||
}, 1000, true );
|
||||
|
||||
// Make sure it's the main editor.
|
||||
if ( editor.id !== 'content' ) {
|
||||
return;
|
||||
@@ -224,6 +229,8 @@ jQuery( document ).ready( function($) {
|
||||
|
||||
// Adjust when switching editor modes.
|
||||
function mceShow() {
|
||||
$window.on( 'scroll.mce-float-panels', hideFloatPanels );
|
||||
|
||||
setTimeout( function() {
|
||||
editor.execCommand( 'wpAutoResize' );
|
||||
adjust();
|
||||
@@ -231,6 +238,8 @@ jQuery( document ).ready( function($) {
|
||||
}
|
||||
|
||||
function mceHide() {
|
||||
$window.off( 'scroll.mce-float-panels' );
|
||||
|
||||
setTimeout( function() {
|
||||
var top = $contentWrap.offset().top;
|
||||
|
||||
@@ -251,6 +260,8 @@ jQuery( document ).ready( function($) {
|
||||
editor.on( 'hide', mceHide );
|
||||
// Adjust when the editor resizes.
|
||||
editor.on( 'setcontent wp-autoresize wp-toolbar-toggle', adjust );
|
||||
|
||||
$window.off( 'scroll.mce-float-panels' ).on( 'scroll.mce-float-panels', hideFloatPanels );
|
||||
};
|
||||
|
||||
mceUnbind = function() {
|
||||
@@ -258,6 +269,8 @@ jQuery( document ).ready( function($) {
|
||||
editor.off( 'show', mceShow );
|
||||
editor.off( 'hide', mceHide );
|
||||
editor.off( 'setcontent wp-autoresize wp-toolbar-toggle', adjust );
|
||||
|
||||
$window.off( 'scroll.mce-float-panels' );
|
||||
};
|
||||
|
||||
if ( $wrap.hasClass( 'wp-editor-expand' ) ) {
|
||||
@@ -590,6 +603,12 @@ jQuery( document ).ready( function($) {
|
||||
}
|
||||
|
||||
adjust();
|
||||
}).on( 'wp-window-resized.editor-expand', function() {
|
||||
if ( mceEditor && ! mceEditor.isHidden() ) {
|
||||
mceEditor.execCommand( 'wpAutoResize' );
|
||||
} else {
|
||||
textEditorResize();
|
||||
}
|
||||
});
|
||||
|
||||
$textEditor.on( 'focus.editor-expand input.editor-expand propertychange.editor-expand', textEditorResize );
|
||||
|
||||
@@ -1 +1 @@
|
||||
window.wp=window.wp||{},jQuery(document).ready(function(a){function b(){var a=m.width();R={windowHeight:m.height(),windowWidth:a,adminBarHeight:a>600?o.outerHeight():0,toolsHeight:s.outerHeight()||0,menuBarHeight:z.outerHeight()||0,visualTopHeight:t.outerHeight()||0,textTopHeight:v.outerHeight()||0,bottomHeight:y.outerHeight()||0,statusBarHeight:A.outerHeight()||0,sideSortablesHeight:B.height()||0},R.menuBarHeight<3&&(R.menuBarHeight=0)}function c(a){var b,c,d,e,f,g=jQuery.ui.keyCode,h=a.keyCode,i=document.createRange(),j=w[0].selectionStart,k=w[0].selectionEnd,l=x[0].firstChild,m=10;if(!j||!k||j===k){try{i.setStart(l,j),i.setEnd(l,k+1)}catch(n){}b=i.getBoundingClientRect(),b.height&&(c=b.top-m,d=c+b.height+m,e=R.adminBarHeight+R.toolsHeight+R.textTopHeight,f=R.windowHeight-R.bottomHeight,e>c&&(h===g.UP||h===g.LEFT||h===g.BACKSPACE)?window.scrollTo(window.pageXOffset,c+window.pageYOffset-e):d>f&&window.scrollTo(window.pageXOffset,d+window.pageYOffset-f))}}function d(){if(!(k&&!k.isHidden()||!k&&"tinymce"===Q)){var a,b=w.height();x.width(w.width()-22),x.text(w.val()+" "),a=x.height(),P>a&&(a=P),a!==b&&(w.height(a),e())}}function e(a){if(!E||!E.settings.visible){var c,e,f,g,h,i,j,l,o,q=m.scrollTop(),F="scroll"!==a,G=k&&!k.isHidden(),M=P,Q=D.offset().top,S=1,T=r.width();(F||!R.windowHeight)&&b(),G||"resize"!==a||d(),G?(c=t,e=u,j=R.visualTopHeight):(c=v,e=w,j=R.textTopHeight),i=c.parent().offset().top,l=e.offset().top,o=e.outerHeight(),h=G?P+j:P+20,h=o>h+5,h?((!H||F)&&q>=i-R.toolsHeight-R.adminBarHeight&&q<=i-R.toolsHeight-R.adminBarHeight+o-M?(H=!0,s.css({position:"fixed",top:R.adminBarHeight,width:T}),G&&z.length&&z.css({position:"fixed",top:R.adminBarHeight+R.toolsHeight,width:T-2*S-(G?0:c.outerWidth()-c.width())}),c.css({position:"fixed",top:R.adminBarHeight+R.toolsHeight+R.menuBarHeight,width:T-2*S-(G?0:c.outerWidth()-c.width())})):(H||F)&&(q<=i-R.toolsHeight-R.adminBarHeight?(H=!1,s.css({position:"absolute",top:0,width:T}),G&&z.length&&z.css({position:"absolute",top:0,width:T-2*S}),c.css({position:"absolute",top:R.menuBarHeight,width:T-2*S-(G?0:c.outerWidth()-c.width())})):q>=i-R.toolsHeight-R.adminBarHeight+o-M&&(H=!1,s.css({position:"absolute",top:o-M,width:T}),G&&z.length&&z.css({position:"absolute",top:o-M,width:T-2*S}),c.css({position:"absolute",top:o-M+R.menuBarHeight,width:T-2*S-(G?0:c.outerWidth()-c.width())}))),(!I||F)&&q+R.windowHeight<=l+o+R.bottomHeight+R.statusBarHeight+S?(I=!0,A.css({position:"fixed",bottom:R.bottomHeight,width:T-2*S}),y.css({position:"fixed",bottom:0,width:T})):(I||F)&&q+R.windowHeight>l+o+R.bottomHeight+R.statusBarHeight-S&&(I=!1,A.add(y).attr("style",""))):F&&(s.css({position:"absolute",top:0,width:T}),G&&z.length&&z.css({position:"absolute",top:0,width:T-2*S}),c.css({position:"absolute",top:R.menuBarHeight,width:T-2*S-(G?0:c.outerWidth()-c.width())}),A.add(y).attr("style","")),C.width()<300&&R.windowWidth>600&&n.height()>B.height()+Q+120&&R.windowHeight<o?(R.sideSortablesHeight+N+O>R.windowHeight||J||K?Q>=q+N?(B.attr("style",""),J=K=!1):q>L?J?(J=!1,f=B.offset().top-R.adminBarHeight,g=p.offset().top,g<f+R.sideSortablesHeight+O&&(f=g-R.sideSortablesHeight-12),B.css({position:"absolute",top:f,bottom:""})):!K&&R.sideSortablesHeight+B.offset().top+O<q+R.windowHeight&&(K=!0,B.css({position:"fixed",top:"auto",bottom:O})):L>q&&(K?(K=!1,f=B.offset().top-O,g=p.offset().top,g<f+R.sideSortablesHeight+O&&(f=g-R.sideSortablesHeight-12),B.css({position:"absolute",top:f,bottom:""})):!J&&B.offset().top>=q+N&&(J=!0,B.css({position:"fixed",top:N,bottom:""}))):(q>=Q-N?B.css({position:"fixed",top:N}):B.attr("style",""),J=K=!1),L=q):(B.attr("style",""),J=K=!1),F&&(r.css({paddingTop:R.toolsHeight}),G?u.css({paddingTop:R.visualTopHeight+R.menuBarHeight}):(w.css({marginTop:R.textTopHeight}),x.width(T-20-2*S)))}}function f(){d(),e()}function g(a){for(var b=1;6>b;b++)setTimeout(a,500*b)}function h(){clearTimeout(l),l=setTimeout(e,100)}function i(){window.pageYOffset&&window.pageYOffset>M&&window.scrollTo(window.pageXOffset,0),q.addClass("wp-editor-expand"),m.on("scroll.editor-expand resize.editor-expand",function(a){e(a.type),h()}),n.on("wp-collapse-menu.editor-expand postboxes-columnchange.editor-expand editor-classchange.editor-expand",e).on("postbox-toggled.editor-expand",function(){!J&&!K&&window.pageYOffset>N&&(K=!0,window.scrollBy(0,-1),e(),window.scrollBy(0,1)),e()}),w.on("focus.editor-expand input.editor-expand propertychange.editor-expand",d),w.on("keyup.editor-expand",c),F(),E&&E.pubsub.subscribe("hidden",f),k&&(k.settings.wp_autoresize_on=!0,k.execCommand("wpAutoResizeOn"),k.isHidden()||k.execCommand("wpAutoResize")),(!k||k.isHidden())&&d(),e()}function j(){var b=window.getUserSetting("ed_size");window.pageYOffset&&window.pageYOffset>M&&window.scrollTo(window.pageXOffset,0),q.removeClass("wp-editor-expand"),m.off(".editor-expand"),n.off(".editor-expand"),w.off(".editor-expand"),G(),E&&E.pubsub.unsubscribe("hidden",f),a.each([t,v,s,z,y,A,r,u,w,B],function(a,b){b&&b.attr("style","")Line truncated
|
||||
window.wp=window.wp||{},jQuery(document).ready(function(a){function b(){var a=m.width();R={windowHeight:m.height(),windowWidth:a,adminBarHeight:a>600?o.outerHeight():0,toolsHeight:s.outerHeight()||0,menuBarHeight:z.outerHeight()||0,visualTopHeight:t.outerHeight()||0,textTopHeight:v.outerHeight()||0,bottomHeight:y.outerHeight()||0,statusBarHeight:A.outerHeight()||0,sideSortablesHeight:B.height()||0},R.menuBarHeight<3&&(R.menuBarHeight=0)}function c(a){var b,c,d,e,f,g=jQuery.ui.keyCode,h=a.keyCode,i=document.createRange(),j=w[0].selectionStart,k=w[0].selectionEnd,l=x[0].firstChild,m=10;if(!j||!k||j===k){try{i.setStart(l,j),i.setEnd(l,k+1)}catch(n){}b=i.getBoundingClientRect(),b.height&&(c=b.top-m,d=c+b.height+m,e=R.adminBarHeight+R.toolsHeight+R.textTopHeight,f=R.windowHeight-R.bottomHeight,e>c&&(h===g.UP||h===g.LEFT||h===g.BACKSPACE)?window.scrollTo(window.pageXOffset,c+window.pageYOffset-e):d>f&&window.scrollTo(window.pageXOffset,d+window.pageYOffset-f))}}function d(){if(!(k&&!k.isHidden()||!k&&"tinymce"===Q)){var a,b=w.height();x.width(w.width()-22),x.text(w.val()+" "),a=x.height(),P>a&&(a=P),a!==b&&(w.height(a),e())}}function e(a){if(!E||!E.settings.visible){var c,e,f,g,h,i,j,l,o,q=m.scrollTop(),F="scroll"!==a,G=k&&!k.isHidden(),M=P,Q=D.offset().top,S=1,T=r.width();(F||!R.windowHeight)&&b(),G||"resize"!==a||d(),G?(c=t,e=u,j=R.visualTopHeight):(c=v,e=w,j=R.textTopHeight),i=c.parent().offset().top,l=e.offset().top,o=e.outerHeight(),h=G?P+j:P+20,h=o>h+5,h?((!H||F)&&q>=i-R.toolsHeight-R.adminBarHeight&&q<=i-R.toolsHeight-R.adminBarHeight+o-M?(H=!0,s.css({position:"fixed",top:R.adminBarHeight,width:T}),G&&z.length&&z.css({position:"fixed",top:R.adminBarHeight+R.toolsHeight,width:T-2*S-(G?0:c.outerWidth()-c.width())}),c.css({position:"fixed",top:R.adminBarHeight+R.toolsHeight+R.menuBarHeight,width:T-2*S-(G?0:c.outerWidth()-c.width())})):(H||F)&&(q<=i-R.toolsHeight-R.adminBarHeight?(H=!1,s.css({position:"absolute",top:0,width:T}),G&&z.length&&z.css({position:"absolute",top:0,width:T-2*S}),c.css({position:"absolute",top:R.menuBarHeight,width:T-2*S-(G?0:c.outerWidth()-c.width())})):q>=i-R.toolsHeight-R.adminBarHeight+o-M&&(H=!1,s.css({position:"absolute",top:o-M,width:T}),G&&z.length&&z.css({position:"absolute",top:o-M,width:T-2*S}),c.css({position:"absolute",top:o-M+R.menuBarHeight,width:T-2*S-(G?0:c.outerWidth()-c.width())}))),(!I||F)&&q+R.windowHeight<=l+o+R.bottomHeight+R.statusBarHeight+S?(I=!0,A.css({position:"fixed",bottom:R.bottomHeight,width:T-2*S}),y.css({position:"fixed",bottom:0,width:T})):(I||F)&&q+R.windowHeight>l+o+R.bottomHeight+R.statusBarHeight-S&&(I=!1,A.add(y).attr("style",""))):F&&(s.css({position:"absolute",top:0,width:T}),G&&z.length&&z.css({position:"absolute",top:0,width:T-2*S}),c.css({position:"absolute",top:R.menuBarHeight,width:T-2*S-(G?0:c.outerWidth()-c.width())}),A.add(y).attr("style","")),C.width()<300&&R.windowWidth>600&&n.height()>B.height()+Q+120&&R.windowHeight<o?(R.sideSortablesHeight+N+O>R.windowHeight||J||K?Q>=q+N?(B.attr("style",""),J=K=!1):q>L?J?(J=!1,f=B.offset().top-R.adminBarHeight,g=p.offset().top,g<f+R.sideSortablesHeight+O&&(f=g-R.sideSortablesHeight-12),B.css({position:"absolute",top:f,bottom:""})):!K&&R.sideSortablesHeight+B.offset().top+O<q+R.windowHeight&&(K=!0,B.css({position:"fixed",top:"auto",bottom:O})):L>q&&(K?(K=!1,f=B.offset().top-O,g=p.offset().top,g<f+R.sideSortablesHeight+O&&(f=g-R.sideSortablesHeight-12),B.css({position:"absolute",top:f,bottom:""})):!J&&B.offset().top>=q+N&&(J=!0,B.css({position:"fixed",top:N,bottom:""}))):(q>=Q-N?B.css({position:"fixed",top:N}):B.attr("style",""),J=K=!1),L=q):(B.attr("style",""),J=K=!1),F&&(r.css({paddingTop:R.toolsHeight}),G?u.css({paddingTop:R.visualTopHeight+R.menuBarHeight}):(w.css({marginTop:R.textTopHeight}),x.width(T-20-2*S)))}}function f(){d(),e()}function g(a){for(var b=1;6>b;b++)setTimeout(a,500*b)}function h(){clearTimeout(l),l=setTimeout(e,100)}function i(){window.pageYOffset&&window.pageYOffset>M&&window.scrollTo(window.pageXOffset,0),q.addClass("wp-editor-expand"),m.on("scroll.editor-expand resize.editor-expand",function(a){e(a.type),h()}),n.on("wp-collapse-menu.editor-expand postboxes-columnchange.editor-expand editor-classchange.editor-expand",e).on("postbox-toggled.editor-expand",function(){!J&&!K&&window.pageYOffset>N&&(K=!0,window.scrollBy(0,-1),e(),window.scrollBy(0,1)),e()}).on("wp-window-resized.editor-expand",function(){k&&!k.isHidden()?k.execCommand("wpAutoResize"):d()}),w.on("focus.editor-expand input.editor-expand propertychange.editor-expand",d),w.on("keyup.editor-expand",c),F(),E&&E.pubsub.subscribe("hidden",f),k&&(k.settings.wp_autoresize_on=!0,k.execCommand("wpAutoResizeOn"),k.isHidden()||k.execCommand("wpAutoResize")),(!k||k.isHidden())&&d(),e()}function j(){var b=window.getUserSetting("ed_size");window.pageYOffset&&window.pageYOffset>M&&window.scrollTo(window.pageXOffset,0),q.removeClass("wp-editor-expand"),m.off(".editor-expand"),n.off(".editor-expand"),w.off(".editor-expand"),G()Line truncated
|
||||
@@ -72,11 +72,15 @@ var findPosts;
|
||||
};
|
||||
|
||||
$( document ).ready( function() {
|
||||
var $mediaGridWrap = $( '#wp-media-grid' );
|
||||
|
||||
// Open up a manage media frame into the grid.
|
||||
wp.media && wp.media({
|
||||
frame: 'manage',
|
||||
container: $('#wpbody-content > .wrap')
|
||||
}).open();
|
||||
if ( $mediaGridWrap.length && window.wp && window.wp.media ) {
|
||||
window.wp.media({
|
||||
frame: 'manage',
|
||||
container: $mediaGridWrap
|
||||
}).open();
|
||||
}
|
||||
|
||||
$( '#find-posts-submit' ).click( function( event ) {
|
||||
if ( ! $( '#find-posts-response input[type="radio"]:checked' ).length )
|
||||
|
||||
@@ -1 +1 @@
|
||||
var findPosts;!function(a){findPosts={open:function(b,c){var d=a(".ui-find-overlay");return 0===d.length&&(a("body").append('<div class="ui-find-overlay"></div>'),findPosts.overlay()),d.show(),b&&c&&a("#affected").attr("name",b).val(c),a("#find-posts").show(),a("#find-posts-input").focus().keyup(function(a){27==a.which&&findPosts.close()}),findPosts.send(),!1},close:function(){a("#find-posts-response").html(""),a("#find-posts").hide(),a(".ui-find-overlay").hide()},overlay:function(){a(".ui-find-overlay").on("click",function(){findPosts.close()})},send:function(){var b={ps:a("#find-posts-input").val(),action:"find_posts",_ajax_nonce:a("#_ajax_nonce").val()},c=a(".find-box-search .spinner");c.show(),a.ajax(ajaxurl,{type:"POST",data:b,dataType:"json"}).always(function(){c.hide()}).done(function(b){b.success||a("#find-posts-response").text(attachMediaBoxL10n.error),a("#find-posts-response").html(b.data)}).fail(function(){a("#find-posts-response").text(attachMediaBoxL10n.error)})}},a(document).ready(function(){wp.media&&wp.media({frame:"manage",container:a("#wpbody-content > .wrap")}).open(),a("#find-posts-submit").click(function(b){a('#find-posts-response input[type="radio"]:checked').length||b.preventDefault()}),a("#find-posts .find-box-search :input").keypress(function(a){return 13==a.which?(findPosts.send(),!1):void 0}),a("#find-posts-search").click(findPosts.send),a("#find-posts-close").click(findPosts.close),a("#doaction, #doaction2").click(function(b){a('select[name^="action"]').each(function(){"attach"===a(this).val()&&(b.preventDefault(),findPosts.open())})}),a(".find-box-inside").on("click","tr",function(){a(this).find(".found-radio input").prop("checked",!0)})})}(jQuery);
|
||||
var findPosts;!function(a){findPosts={open:function(b,c){var d=a(".ui-find-overlay");return 0===d.length&&(a("body").append('<div class="ui-find-overlay"></div>'),findPosts.overlay()),d.show(),b&&c&&a("#affected").attr("name",b).val(c),a("#find-posts").show(),a("#find-posts-input").focus().keyup(function(a){27==a.which&&findPosts.close()}),findPosts.send(),!1},close:function(){a("#find-posts-response").html(""),a("#find-posts").hide(),a(".ui-find-overlay").hide()},overlay:function(){a(".ui-find-overlay").on("click",function(){findPosts.close()})},send:function(){var b={ps:a("#find-posts-input").val(),action:"find_posts",_ajax_nonce:a("#_ajax_nonce").val()},c=a(".find-box-search .spinner");c.show(),a.ajax(ajaxurl,{type:"POST",data:b,dataType:"json"}).always(function(){c.hide()}).done(function(b){b.success||a("#find-posts-response").text(attachMediaBoxL10n.error),a("#find-posts-response").html(b.data)}).fail(function(){a("#find-posts-response").text(attachMediaBoxL10n.error)})}},a(document).ready(function(){var b=a("#wp-media-grid");b.length&&window.wp&&window.wp.media&&window.wp.media({frame:"manage",container:b}).open(),a("#find-posts-submit").click(function(b){a('#find-posts-response input[type="radio"]:checked').length||b.preventDefault()}),a("#find-posts .find-box-search :input").keypress(function(a){return 13==a.which?(findPosts.send(),!1):void 0}),a("#find-posts-search").click(findPosts.send),a("#find-posts-close").click(findPosts.close),a("#doaction, #doaction2").click(function(b){a('select[name^="action"]').each(function(){"attach"===a(this).val()&&(b.preventDefault(),findPosts.open())})}),a(".find-box-inside").on("click","tr",function(){a(this).find(".found-radio input").prop("checked",!0)})})}(jQuery);
|
||||
@@ -24,8 +24,27 @@ if ( is_multisite() && ! is_network_admin() ) {
|
||||
|
||||
$wp_list_table = _get_list_table('WP_Plugin_Install_List_Table');
|
||||
$pagenum = $wp_list_table->get_pagenum();
|
||||
|
||||
if ( ! empty( $_REQUEST['_wp_http_referer'] ) ) {
|
||||
$location = remove_query_arg( '_wp_http_referer', wp_unslash( $_SERVER['REQUEST_URI'] ) );
|
||||
|
||||
if ( ! empty( $_REQUEST['paged'] ) ) {
|
||||
$location = add_query_arg( 'paged', (int) $_REQUEST['paged'], $location );
|
||||
}
|
||||
|
||||
wp_redirect( $location );
|
||||
exit;
|
||||
}
|
||||
|
||||
$wp_list_table->prepare_items();
|
||||
|
||||
$total_pages = $wp_list_table->get_pagination_arg( 'total_pages' );
|
||||
|
||||
if ( $pagenum > $total_pages && $total_pages > 0 ) {
|
||||
wp_redirect( add_query_arg( 'paged', $total_pages ) );
|
||||
exit;
|
||||
}
|
||||
|
||||
$title = __( 'Add Plugins' );
|
||||
$parent_file = 'plugins.php';
|
||||
|
||||
|
||||
@@ -63,7 +63,7 @@ function press_it() {
|
||||
// Error handling for media_sideload.
|
||||
if ( is_wp_error($upload) ) {
|
||||
wp_delete_post($post_ID);
|
||||
wp_die($upload);
|
||||
wp_die( esc_html( $upload->get_error_message() ) );
|
||||
} else {
|
||||
// Post formats.
|
||||
if ( isset( $_POST['post_format'] ) ) {
|
||||
|
||||
@@ -57,7 +57,7 @@ if ( 'grid' === $mode ) {
|
||||
|
||||
require_once( ABSPATH . 'wp-admin/admin-header.php' );
|
||||
?>
|
||||
<div class="wrap">
|
||||
<div class="wrap" id="wp-media-grid">
|
||||
<h2>
|
||||
<?php
|
||||
echo esc_html( $title );
|
||||
|
||||
@@ -10,6 +10,7 @@ msgstr ""
|
||||
"X-Generator: GlotPress/0.1\n"
|
||||
"Project-Id-Version: Network Admin\n"
|
||||
|
||||
#. translators: 1: a filename like .htaccess. 2: a file path.
|
||||
#: wp-admin/network.php:477 wp-admin/network.php:513
|
||||
msgid "Add the following to your %1$s file in %2$s, <strong>replacing</strong> other WordPress rules:"
|
||||
msgstr "Legg til følgende i din %1$s-fil i %2$s, <strong>som erstatning for</strong> andre WordPress-regler:"
|
||||
@@ -223,6 +224,7 @@ msgstr "<a href=\"http://codex.wordpress.org/Network_Admin_Themes_Screen\" targe
|
||||
msgid "Info"
|
||||
msgstr "Info"
|
||||
|
||||
#. translators: 1: theme name, 2: theme author
|
||||
#: wp-admin/network/themes.php:142
|
||||
msgid "Are you sure you wish to delete these themes?"
|
||||
msgstr "Er du sikker på at du vil slette disse temaene?"
|
||||
|
||||
@@ -10,7 +10,13 @@ msgstr ""
|
||||
"X-Generator: GlotPress/0.1\n"
|
||||
"Project-Id-Version: Development\n"
|
||||
|
||||
#: class.akismet-admin.php:680
|
||||
#: views/config.php:97
|
||||
msgid "Spam in the <a href=\"%s\">spam folder</a> older than 1 day is deleted automatically."
|
||||
msgid_plural "Spam in the <a href=\"%1$s\">spam folder</a> older than %2$d days is deleted automatically."
|
||||
msgstr[0] ""
|
||||
msgstr[1] ""
|
||||
|
||||
#: class.akismet-admin.php:700
|
||||
msgid "Please check your <a href=\"%s\">Akismet configuration</a> and contact your web host if problems persist."
|
||||
msgstr "Vennligst sjekk din <a href=\"%s\">Akismet-konfigurasjon</a> og kontakt din web-admin hvis problemet vedvarer."
|
||||
|
||||
@@ -46,23 +52,23 @@ msgstr "Ditt abonnement på %s er avbrutt"
|
||||
msgid "Reactivate Akismet"
|
||||
msgstr "Reaktiver Akismet"
|
||||
|
||||
#: views/config.php:136
|
||||
#: views/config.php:152
|
||||
msgid "Cancelled"
|
||||
msgstr "Avbrutt"
|
||||
|
||||
#: views/config.php:138
|
||||
#: views/config.php:154
|
||||
msgid "Suspended"
|
||||
msgstr "Suspendert"
|
||||
|
||||
#: views/config.php:140
|
||||
#: views/config.php:156
|
||||
msgid "Missing"
|
||||
msgstr "Savnes"
|
||||
|
||||
#: views/config.php:142
|
||||
#: views/config.php:158
|
||||
msgid "No Subscription Found"
|
||||
msgstr "Ikke noe abonnement funnet"
|
||||
|
||||
#: views/config.php:144
|
||||
#: views/config.php:160
|
||||
msgid "Active"
|
||||
msgstr "Aktiv"
|
||||
|
||||
@@ -74,11 +80,11 @@ msgstr "Det er et problem med din nøkkel."
|
||||
msgid "Since 2012, Akismet began using subscriptions for all accounts (even free ones). It looks like a subscription has not been assigned to your account, and we’d appreciate it if you’d <a href=\"%s\" target=\"_blank\">sign into your account</a> and choose one. Please <a href=\"%s\" target=\"_blank\">contact our support team</a> with any questions."
|
||||
msgstr "Siden 2012 har Akismet begynt å bruke abonnementer for alle kontoer (også gratiskontoer). Det ser ikke ut til at et abonnement har blitt knyttet til din konto, og vi setter pris på om du <a href=\"%s\" target=\"_blank\">logger inn i din konto</a> og velger en. Vennligst <a href=\"%s\" target=\"_blank\">kontakt vårt support-team</a> hvis du har noen spørsmål."
|
||||
|
||||
#: class.akismet-admin.php:195 views/config.php:84
|
||||
#: class.akismet-admin.php:196 views/config.php:84
|
||||
msgid "Strictness"
|
||||
msgstr "Strenghet"
|
||||
|
||||
#: class.akismet-admin.php:195
|
||||
#: class.akismet-admin.php:196
|
||||
msgid "Choose to either discard the worst spam automatically or to always put all spam in spam folder."
|
||||
msgstr "Velg om du skal slette den verste spammen automatisk eller alltid putte all spam i spam-mappen."
|
||||
|
||||
@@ -90,7 +96,7 @@ msgstr "Forkast de verste og mest utbredte useriøse innholdet i bakgrunnen slik
|
||||
msgid "Always put spam in the Spam folder for review."
|
||||
msgstr "Legg alltid useriøst innhold for gjennomgang i mappen Useriøse."
|
||||
|
||||
#: class.akismet-admin.php:194 views/config.php:75
|
||||
#: class.akismet-admin.php:195 views/config.php:75
|
||||
msgid "Comments"
|
||||
msgstr "Kommentarer"
|
||||
|
||||
@@ -126,6 +132,8 @@ msgstr "Akismet %s krever WordPress 3.0 eller nyere."
|
||||
msgid "Akismet Error Code: %s"
|
||||
msgstr "Akismet feilkode: %s"
|
||||
|
||||
#. translators: the placeholder is a clickable URL that leads to more
|
||||
#. information regarding an error code.
|
||||
#: views/notice.php:35
|
||||
msgid "For more information: %s"
|
||||
msgstr "For mer informasjon: %s"
|
||||
@@ -250,109 +258,109 @@ msgstr "Strengt: forkast det verste og mest utbredte useriøse innholdet."
|
||||
msgid "Safe: always put spam in the Spam folder for review."
|
||||
msgstr "Trygg: legg alltid useriøst innhold for gjennomgang i Useriøs-mappen."
|
||||
|
||||
#: class.akismet-admin.php:52
|
||||
#: class.akismet-admin.php:53
|
||||
msgid "Comment History"
|
||||
msgstr "Kommentarhistorikk"
|
||||
|
||||
#: class.akismet-admin.php:75 class.akismet-admin.php:77
|
||||
#: class.akismet-admin.php:737 views/config.php:3
|
||||
#: class.akismet-admin.php:76 class.akismet-admin.php:78
|
||||
#: class.akismet-admin.php:757 views/config.php:3
|
||||
msgid "Akismet"
|
||||
msgstr "Akismet"
|
||||
|
||||
#: class.akismet-admin.php:103
|
||||
#: class.akismet-admin.php:104
|
||||
msgid "Remove this URL"
|
||||
msgstr "Slett denne URL-en"
|
||||
|
||||
#: class.akismet-admin.php:104
|
||||
#: class.akismet-admin.php:105
|
||||
msgid "Removing..."
|
||||
msgstr "Sletter..."
|
||||
|
||||
#: class.akismet-admin.php:105
|
||||
#: class.akismet-admin.php:106
|
||||
msgid "URL removed"
|
||||
msgstr "URL slettet"
|
||||
|
||||
#: class.akismet-admin.php:106
|
||||
#: class.akismet-admin.php:107
|
||||
msgid "(undo)"
|
||||
msgstr "(angre)"
|
||||
|
||||
#: class.akismet-admin.php:107
|
||||
#: class.akismet-admin.php:108
|
||||
msgid "Re-adding..."
|
||||
msgstr "Legger til igjen..."
|
||||
|
||||
#: class.akismet-admin.php:128 class.akismet-admin.php:166
|
||||
#: class.akismet-admin.php:179
|
||||
#: class.akismet-admin.php:129 class.akismet-admin.php:167
|
||||
#: class.akismet-admin.php:180
|
||||
msgid "Overview"
|
||||
msgstr "Oversikt"
|
||||
|
||||
#: class.akismet-admin.php:130 class.akismet-admin.php:141
|
||||
#: class.akismet-admin.php:152
|
||||
#: class.akismet-admin.php:131 class.akismet-admin.php:142
|
||||
#: class.akismet-admin.php:153
|
||||
msgid "Akismet Setup"
|
||||
msgstr "Konfigurering av Akismet"
|
||||
|
||||
#: class.akismet-admin.php:131 class.akismet-admin.php:169
|
||||
#: class.akismet-admin.php:182
|
||||
#: class.akismet-admin.php:132 class.akismet-admin.php:170
|
||||
#: class.akismet-admin.php:183
|
||||
msgid "Akismet filters out your comment and trackback spam for you, so you can focus on more important things."
|
||||
msgstr "Akismet filtrerer dine kommentarer og tilbakesporinger for deg slik at du kan konsentrere deg om viktigere ting."
|
||||
|
||||
#: class.akismet-admin.php:132
|
||||
#: class.akismet-admin.php:133
|
||||
msgid "On this page, you are able to setup the Akismet plugin."
|
||||
msgstr "På denne siden kan du konfigurere Akismet-utvidelsen."
|
||||
|
||||
#: class.akismet-admin.php:139
|
||||
#: class.akismet-admin.php:140
|
||||
msgid "New to Akismet"
|
||||
msgstr "Fersk med Akismet"
|
||||
|
||||
#: class.akismet-admin.php:142
|
||||
#: class.akismet-admin.php:143
|
||||
msgid "You need to enter an API key to activate the Akismet service on your site."
|
||||
msgstr "Du trenger an API-nøkkel for å aktivere Akismet-tjenesten på ditt nettsted."
|
||||
|
||||
#: class.akismet-admin.php:143
|
||||
#: class.akismet-admin.php:144
|
||||
msgid "Signup for an account on %s to get an API Key."
|
||||
msgstr "Registrer deg for en konto på %s og få en API-nøkkel."
|
||||
|
||||
#: class.akismet-admin.php:150
|
||||
#: class.akismet-admin.php:151
|
||||
msgid "Enter an API Key"
|
||||
msgstr "Skriv inn en API-nøkkel"
|
||||
|
||||
#: class.akismet-admin.php:153
|
||||
#: class.akismet-admin.php:154
|
||||
msgid "If you already have an API key"
|
||||
msgstr "Du har allerede en API-nøkkel"
|
||||
|
||||
#: class.akismet-admin.php:155
|
||||
#: class.akismet-admin.php:156
|
||||
msgid "Copy and paste the API key into the text field."
|
||||
msgstr "Kopier og lim inn API-nøkkelen i tekstfeltet."
|
||||
|
||||
#: class.akismet-admin.php:156
|
||||
#: class.akismet-admin.php:157
|
||||
msgid "Click the Use this Key button."
|
||||
msgstr "Trykk på knappen Bruk denne nøkkelen."
|
||||
|
||||
#: class.akismet-admin.php:168 views/stats.php:2
|
||||
#: class.akismet-admin.php:169 views/stats.php:2
|
||||
msgid "Akismet Stats"
|
||||
msgstr "Akismet statistikk"
|
||||
|
||||
#: class.akismet-admin.php:170
|
||||
#: class.akismet-admin.php:171
|
||||
msgid "On this page, you are able to view stats on spam filtered on your site."
|
||||
msgstr "På denne siden kan du se statistikk for useriøst innhold filtrert på ditt nettsted."
|
||||
|
||||
#: class.akismet-admin.php:181 class.akismet-admin.php:192
|
||||
#: class.akismet-admin.php:204
|
||||
#: class.akismet-admin.php:182 class.akismet-admin.php:193
|
||||
#: class.akismet-admin.php:205
|
||||
msgid "Akismet Configuration"
|
||||
msgstr "Akismet innstillinger"
|
||||
|
||||
#: class.akismet-admin.php:183
|
||||
#: class.akismet-admin.php:184
|
||||
msgid "On this page, you are able to enter/remove an API key, view account information and view spam stats."
|
||||
msgstr "På denne siden kan du legge inn eller fjerne en API-nøkkel, vise kontoinformasjon og vise statistikk over useriøst innhold."
|
||||
|
||||
#: class.akismet-admin.php:68 class.akismet-admin.php:190
|
||||
#: class.akismet-admin.php:503 views/config.php:60 views/stats.php:2
|
||||
#: class.akismet-admin.php:69 class.akismet-admin.php:191
|
||||
#: class.akismet-admin.php:508 views/config.php:60 views/stats.php:2
|
||||
msgid "Settings"
|
||||
msgstr "Innstillinger"
|
||||
|
||||
#: class.akismet-admin.php:193 views/config.php:67
|
||||
#: class.akismet-admin.php:194 views/config.php:67
|
||||
msgid "API Key"
|
||||
msgstr "API-nøkkel"
|
||||
|
||||
#: class.akismet-admin.php:193
|
||||
#: class.akismet-admin.php:194
|
||||
msgid "Enter/remove an API key."
|
||||
msgstr "Legg til eller fjern en API-nøkkel."
|
||||
|
||||
@@ -360,156 +368,156 @@ msgstr "Legg til eller fjern en API-nøkkel."
|
||||
msgid "Show the number of approved comments beside each comment author"
|
||||
msgstr "Vis antall godkjente kommentarer ved siden av hver kommentarforfatter"
|
||||
|
||||
#: class.akismet-admin.php:194
|
||||
#: class.akismet-admin.php:195
|
||||
msgid "Show the number of approved comments beside each comment author in the comments list page."
|
||||
msgstr "Vis antallet godkjente kommentarer ved siden av hver kommentarforfatter i på siden med kommentarlisten."
|
||||
|
||||
#: class.akismet-admin.php:202 views/config.php:119
|
||||
#: class.akismet-admin.php:203 views/config.php:135
|
||||
msgid "Account"
|
||||
msgstr "Konto"
|
||||
|
||||
#: class.akismet-admin.php:205 views/config.php:124
|
||||
#: class.akismet-admin.php:206 views/config.php:140
|
||||
msgid "Subscription Type"
|
||||
msgstr "Type abonnement"
|
||||
|
||||
#: class.akismet-admin.php:205
|
||||
#: class.akismet-admin.php:206
|
||||
msgid "The Akismet subscription plan"
|
||||
msgstr "Akismet abonnementer"
|
||||
|
||||
#: class.akismet-admin.php:206 views/config.php:131
|
||||
#: class.akismet-admin.php:207 views/config.php:147
|
||||
msgid "Status"
|
||||
msgstr "Status"
|
||||
|
||||
#: class.akismet-admin.php:206
|
||||
#: class.akismet-admin.php:207
|
||||
msgid "The subscription status - active, cancelled or suspended"
|
||||
msgstr "Abonnementets status - aktivt, avbrutt eller avsluttet."
|
||||
|
||||
#: class.akismet-admin.php:214
|
||||
#: class.akismet-admin.php:215
|
||||
msgid "For more information:"
|
||||
msgstr "For mer informasjon:"
|
||||
|
||||
#: class.akismet-admin.php:215
|
||||
#: class.akismet-admin.php:216
|
||||
msgid "Akismet FAQ"
|
||||
msgstr "Akismet FAQ"
|
||||
|
||||
#: class.akismet-admin.php:216
|
||||
#: class.akismet-admin.php:217
|
||||
msgid "Akismet Support"
|
||||
msgstr "Akismet brukerstøtte"
|
||||
|
||||
#: class.akismet-admin.php:222
|
||||
#: class.akismet-admin.php:223
|
||||
msgid "Cheatin’ uh?"
|
||||
msgstr "Jukser du?"
|
||||
|
||||
#: class.akismet-admin.php:281
|
||||
#: class.akismet-admin.php:282
|
||||
msgctxt "comments"
|
||||
msgid "Spam"
|
||||
msgstr "Useriøse"
|
||||
|
||||
#: class.akismet-admin.php:283
|
||||
#: class.akismet-admin.php:284
|
||||
msgid "<a href=\"%1$s\">Akismet</a> has protected your site from <a href=\"%2$s\">%3$s spam comment</a>."
|
||||
msgid_plural "<a href=\"%1$s\">Akismet</a> has protected your site from <a href=\"%2$s\">%3$s spam comments</a>."
|
||||
msgstr[0] "<a href=\"%1$s\">Akismet</a> har beskyttet ditt nettsted fra <a href=\"%2$s\">%3$s useriøs kommentar</a>."
|
||||
msgstr[1] "<a href=\"%1$s\">Akismet</a> har beskyttet dit nettsted fra <a href=\"%2$s\">%3$s useriøse kommentarer</a>."
|
||||
|
||||
#: class.akismet-admin.php:302
|
||||
#: class.akismet-admin.php:303
|
||||
msgid "<a href=\"%1$s\">Akismet</a> has protected your site from %2$s spam comment already. "
|
||||
msgid_plural "<a href=\"%1$s\">Akismet</a> has protected your site from %2$s spam comments already. "
|
||||
msgstr[0] "<a href=\"%1$s\">Akismet</a> har beskyttet din side mot %2$s useriøs kommentar allerede."
|
||||
msgstr[1] "<a href=\"%1$s\">Akismet</a> har beskyttet din side mot %2$s useriøse kommentarer allerede."
|
||||
|
||||
#: class.akismet-admin.php:308
|
||||
#: class.akismet-admin.php:309
|
||||
msgid "<a href=\"%s\">Akismet</a> blocks spam from getting to your blog. "
|
||||
msgstr "<a href=\"%s\">Akismet</a> hindrer useriøst innhold fra å komme inn i ditt nettsted. "
|
||||
|
||||
#: class.akismet-admin.php:313
|
||||
#: class.akismet-admin.php:314
|
||||
msgid "There’s <a href=\"%2$s\">%1$s comment</a> in your spam queue right now."
|
||||
msgid_plural "There are <a href=\"%2$s\">%1$s comments</a> in your spam queue right now."
|
||||
msgstr[0] "Det er akkurat nå <a href=\"%2$s\">%1$s kommentar</a> din useriøs-kø."
|
||||
msgstr[1] "Det er akkurat nå <a href=\"%2$s\">%1$s kommentarer</a> i din useriøs-kø."
|
||||
|
||||
#: class.akismet-admin.php:319
|
||||
#: class.akismet-admin.php:320
|
||||
msgid "There’s nothing in your <a href='%s'>spam queue</a> at the moment."
|
||||
msgstr "Akkurat nå er det er intet i din <a href='%s'>useriøs-kø</a>."
|
||||
|
||||
#: class.akismet-admin.php:335
|
||||
#: class.akismet-admin.php:340
|
||||
msgid "Check for Spam"
|
||||
msgstr "Se etter useriøse"
|
||||
|
||||
#: class.akismet.php:424
|
||||
#: class.akismet.php:442
|
||||
msgid "%1$s changed the comment status to %2$s"
|
||||
msgstr "%1$s endret kommentarens status til %2$s"
|
||||
|
||||
#: class.akismet-admin.php:377
|
||||
#: class.akismet-admin.php:382
|
||||
msgid "Akismet re-checked and caught this comment as spam"
|
||||
msgstr "Akismet re-sjekket og fanget denne kommentaren som useriøs"
|
||||
|
||||
#: class.akismet-admin.php:383
|
||||
#: class.akismet-admin.php:388
|
||||
msgid "Akismet re-checked and cleared this comment"
|
||||
msgstr "Akismet re-sjekket og klarerte denne kommentaren"
|
||||
|
||||
#: class.akismet-admin.php:387
|
||||
#: class.akismet-admin.php:392
|
||||
msgid "Akismet was unable to re-check this comment (response: %s)"
|
||||
msgstr "Akismet klarte ikke å re-sjekke denne kommentaren (respons:%s)"
|
||||
|
||||
#: class.akismet-admin.php:441
|
||||
#: class.akismet-admin.php:446
|
||||
msgid "Awaiting spam check"
|
||||
msgstr "Avventer spam-sjekk"
|
||||
|
||||
#: class.akismet-admin.php:445
|
||||
#: class.akismet-admin.php:450
|
||||
msgid "Flagged as spam by Akismet"
|
||||
msgstr "Merket som useriøst av Akismet"
|
||||
|
||||
#: class.akismet-admin.php:447
|
||||
#: class.akismet-admin.php:452
|
||||
msgid "Cleared by Akismet"
|
||||
msgstr "Godkjent av Akismet"
|
||||
|
||||
#: class.akismet-admin.php:451
|
||||
#: class.akismet-admin.php:456
|
||||
msgid "Flagged as spam by %s"
|
||||
msgstr "Merket som useriøs av %s"
|
||||
|
||||
#: class.akismet-admin.php:453
|
||||
#: class.akismet-admin.php:458
|
||||
msgid "Un-spammed by %s"
|
||||
msgstr "Merket som ikke useriøs av %s"
|
||||
|
||||
#: class.akismet-admin.php:465 class.akismet-admin.php:473
|
||||
#: class.akismet-admin.php:470 class.akismet-admin.php:478
|
||||
msgid "View comment history"
|
||||
msgstr "Se kommentarhistorikk"
|
||||
|
||||
#: class.akismet-admin.php:465
|
||||
#: class.akismet-admin.php:470
|
||||
msgid "History"
|
||||
msgstr "Historikk"
|
||||
|
||||
#: class.akismet-admin.php:481
|
||||
#: class.akismet-admin.php:486
|
||||
msgid "%s approved"
|
||||
msgid_plural "%s approved"
|
||||
msgstr[0] "%s godkjent"
|
||||
msgstr[1] "%s godkjente"
|
||||
|
||||
#: class.akismet-admin.php:494
|
||||
#: class.akismet-admin.php:499
|
||||
msgid "%s ago"
|
||||
msgstr "%s siden"
|
||||
|
||||
#: class.akismet.php:469
|
||||
#: class.akismet.php:487
|
||||
msgid "%s reported this comment as spam"
|
||||
msgstr "%s rapporterte denne kommentaren som useriøs"
|
||||
|
||||
#: class.akismet.php:515
|
||||
#: class.akismet.php:533
|
||||
msgid "%s reported this comment as not spam"
|
||||
msgstr "%s rapporterte denne kommentaren som ikke useriøs"
|
||||
|
||||
#: class.akismet-admin.php:767
|
||||
#: class.akismet-admin.php:787
|
||||
msgid "Cleaning up spam takes time."
|
||||
msgstr "Opprenskning av useriøst innhold tar tid."
|
||||
|
||||
#: class.akismet-admin.php:770
|
||||
#: class.akismet-admin.php:790
|
||||
msgid "Since you joined us, Akismet has saved you %s days!"
|
||||
msgstr "Siden du ble med har Akismet spart deg for %s dager!"
|
||||
|
||||
#: class.akismet-admin.php:772
|
||||
#: class.akismet-admin.php:792
|
||||
msgid "Since you joined us, Akismet has saved you %d hours!"
|
||||
msgstr "Siden du ble med har Akismet spart deg for %d timer!"
|
||||
|
||||
#: class.akismet-admin.php:774
|
||||
#: class.akismet-admin.php:794
|
||||
msgid "Since you joined us, Akismet has saved you %d minutes!"
|
||||
msgstr "Siden du ble med har Aksimet spart deg for %d minutter!"
|
||||
|
||||
@@ -555,19 +563,19 @@ msgstr "Kommentaren ble fanget opp av wp_blacklist_check"
|
||||
msgid "Akismet was unable to check this comment (response: %s), will automatically retry again later."
|
||||
msgstr "Akismet var ikke i stand til å sjekke denne kommentaren (respons: %s), men vil automatisk prøve på nytt igjen senere."
|
||||
|
||||
#: class.akismet.php:555
|
||||
#: class.akismet.php:573
|
||||
msgid "Akismet caught this comment as spam during an automatic retry."
|
||||
msgstr "Akismet fanget denne kommentaren som useriøs i løpet av en automatisk re-sjekk."
|
||||
|
||||
#: class.akismet.php:557
|
||||
#: class.akismet.php:575
|
||||
msgid "Akismet cleared this comment during an automatic retry."
|
||||
msgstr "Akismet godkjente denne kommentaren ved en ny automatisk kontroll."
|
||||
|
||||
#: class.akismet.php:905
|
||||
#: class.akismet.php:923
|
||||
msgid "Akismet %s requires WordPress %s or higher."
|
||||
msgstr "Akismet %s krever WordPress %s eller nyere."
|
||||
|
||||
#: class.akismet.php:905 views/notice.php:27
|
||||
#: class.akismet.php:923 views/notice.php:27
|
||||
msgid "Please <a href=\"%1$s\">upgrade WordPress</a> to a current version, or <a href=\"%2$s\">downgrade to version 2.4 of the Akismet plugin</a>."
|
||||
msgstr "Vennligst <a href=\"%1$s\">oppgrader WordPress</a> til en nyere versjon eller <a href=\"%2$s\">nedgrader til versjon 2.4 av utvidelsen Akismet</a>.."
|
||||
|
||||
@@ -605,27 +613,23 @@ msgstr "Vis godkjente kommentarer"
|
||||
msgid "Note:"
|
||||
msgstr "Merk:"
|
||||
|
||||
#: views/config.php:91
|
||||
msgid "Spam in the <a href=\"%s\">spam folder</a> older than 15 days is deleted automatically."
|
||||
msgstr "Useriøst innhold eldre en 15 dager i <a href=\"%s\">useriøs-mappen</a> slettes automatisk."
|
||||
|
||||
#: views/config.php:100
|
||||
#: views/config.php:116
|
||||
msgid "Disconnect this account"
|
||||
msgstr "Koble fra denne kontoen"
|
||||
|
||||
#: views/config.php:106
|
||||
#: views/config.php:122
|
||||
msgid "Save Changes"
|
||||
msgstr "Lagre endringer"
|
||||
|
||||
#: views/config.php:150
|
||||
#: views/config.php:166
|
||||
msgid "Next Billing Date"
|
||||
msgstr "Neste fakturadato"
|
||||
|
||||
#: views/config.php:162
|
||||
#: views/config.php:178
|
||||
msgid "Upgrade"
|
||||
msgstr "Oppgrader"
|
||||
|
||||
#: views/config.php:162
|
||||
#: views/config.php:178
|
||||
msgid "Change"
|
||||
msgstr "Endre"
|
||||
|
||||
|
||||
@@ -38,6 +38,7 @@ msgstr "Flere gallerier"
|
||||
msgid "More asides"
|
||||
msgstr "Flere notiser"
|
||||
|
||||
#. translators: used with More archives link
|
||||
#: inc/widgets.php:206
|
||||
msgid "%s <span class=\"meta-nav\">→</span>"
|
||||
msgstr "%s <span class=\"meta-nav\">→</span>"
|
||||
@@ -52,6 +53,7 @@ msgstr "fremhevet"
|
||||
msgid "Use this widget to list your recent Aside, Quote, Video, Audio, Image, Gallery, and Link posts."
|
||||
msgstr "Bruk denne widgeten for å vise dine siste notis-, sitat-, video-, lyd-, bilde-, galleri- og lenke-innlegg."
|
||||
|
||||
#. Theme URI of the plugin/theme
|
||||
msgid "http://wordpress.org/themes/twentyfourteen"
|
||||
msgstr "http://wordpress.org/themes/twentyfourteen"
|
||||
|
||||
@@ -93,6 +95,7 @@ msgstr "Stikkord"
|
||||
msgid "Don’t display tag on front end."
|
||||
msgstr "Ikke vis dette stikkordet på fremsidene."
|
||||
|
||||
#. Description of the plugin/theme
|
||||
msgid "In 2014, our default theme lets you create a responsive magazine website with a sleek, modern design. Feature your favorite homepage content in either a grid or a slider. Use the three widget areas to customize your website, and change your content's layout with a full-width page template and a contributor page to show off your authors. Creating a magazine website with WordPress has never been easier."
|
||||
msgstr "I 2014 gjør vårt standardtema deg i stand til å lage et responsivt magasinnettsted med et moderne design. Fremhev ditt favorittinnhold i et rutenett eller en slider. Bruk de tre widgetområdene for å tilpasse nettstedet og endre layouten med fullbreddeformat og bidragsytersider for å fremheve dine ulike forfattere. Å lage et magasinnettsted med WordPress har aldri vært enklere."
|
||||
|
||||
@@ -215,6 +218,7 @@ msgstr "Antall innlegg som skal vises:"
|
||||
msgid "Post format to show:"
|
||||
msgstr "Innleggsformat som skal vises:"
|
||||
|
||||
#. Template Name of the plugin/theme
|
||||
msgid "Contributor Page"
|
||||
msgstr "Bidragsyters side"
|
||||
|
||||
@@ -301,6 +305,8 @@ msgstr "% kommentarer"
|
||||
msgid "Continue reading <span class=\"meta-nav\">→</span>"
|
||||
msgstr "Les videre <span class=\"meta-nav\">→</span>"
|
||||
|
||||
#. #-#-#-#-# twentyfourteen.pot (Twenty Fourteen 1.2) #-#-#-#-#
|
||||
#. Author URI of the plugin/theme
|
||||
#: footer.php:21
|
||||
msgid "http://wordpress.org/"
|
||||
msgstr "http://nb.wordpress.org/"
|
||||
@@ -414,12 +420,16 @@ msgstr "Sitater"
|
||||
msgid "Search Results for: %s"
|
||||
msgstr "Søkeresultater for: %s"
|
||||
|
||||
#. #-#-#-#-# twentyfourteen.pot (Twenty Fourteen 1.2) #-#-#-#-#
|
||||
#. Theme Name of the plugin/theme
|
||||
#: inc/customizer.php:99
|
||||
msgid "Twenty Fourteen"
|
||||
msgstr "Twenty Fourteen"
|
||||
|
||||
#. Author of the plugin/theme
|
||||
msgid "the WordPress team"
|
||||
msgstr "WordPress-gjengen"
|
||||
|
||||
#. Template Name of the plugin/theme
|
||||
msgid "Full Width Page"
|
||||
msgstr "Side i full bredde"
|
||||
@@ -14,6 +14,7 @@ msgstr ""
|
||||
msgid "Not Found"
|
||||
msgstr "Ikke funnet"
|
||||
|
||||
#. Description of the plugin/theme
|
||||
msgid "The 2013 theme for WordPress takes us back to the blog, featuring a full range of post formats, each displayed beautifully in their own unique way. Design details abound, starting with a vibrant color scheme and matching header images, beautiful typography and icons, and a flexible layout that looks great on any device, big or small."
|
||||
msgstr "2013-temaet for WordPress tar oss tilbake til bloggen, med alle mulige innleggsformater, og hvert eneste format vises på sin unike måte. Twenty Thirteen har drøssevis av designdetaljer, som fargeskjema og matchende toppbilder, flott typografi, ikoner og et fleksibelt oppsett som ser fantastisk ut på både data, nettbrett og mobil."
|
||||
|
||||
@@ -21,6 +22,7 @@ msgstr "2013-temaet for WordPress tar oss tilbake til bloggen, med alle mulige i
|
||||
msgid "Appears in the footer section of the site."
|
||||
msgstr "Vises i bunnområdet på netttedet."
|
||||
|
||||
#. Theme URI of the plugin/theme
|
||||
msgid "http://wordpress.org/themes/twentythirteen"
|
||||
msgstr "http://wordpress.org/themes/twentythirteen"
|
||||
|
||||
@@ -176,6 +178,8 @@ msgstr "Beklager, ingenting passet til dine søkekriterier. Vennligst prøv igje
|
||||
msgid "It seems we can’t find what you’re looking for. Perhaps searching can help."
|
||||
msgstr "Vi klarer ikke å finne det du leter etter. Prøv å søke."
|
||||
|
||||
#. #-#-#-#-# twentythirteen.pot (Twenty Thirteen 1.3) #-#-#-#-#
|
||||
#. Author URI of the plugin/theme
|
||||
#: footer.php:19
|
||||
msgid "http://wordpress.org/"
|
||||
msgstr "http://wordpress.org/"
|
||||
@@ -192,11 +196,17 @@ msgstr "Stolt drevet av %s"
|
||||
msgid "Navigation Menu"
|
||||
msgstr "Navigasjonsmeny"
|
||||
|
||||
#. Translators: If there are characters in your language that are not
|
||||
#. * supported by Source Sans Pro, translate this to 'off'. Do not translate
|
||||
#. * into your own language.
|
||||
#: functions.php:128
|
||||
msgctxt "Source Sans Pro font: on or off"
|
||||
msgid "on"
|
||||
msgstr "på"
|
||||
|
||||
#. Translators: If there are characters in your language that are not
|
||||
#. * supported by Bitter, translate this to 'off'. Do not translate into your
|
||||
#. * own language.
|
||||
#: functions.php:134
|
||||
msgctxt "Bitter font: on or off"
|
||||
msgid "on"
|
||||
@@ -236,6 +246,7 @@ msgstr "%title <span class=\"meta-nav\">→</span>"
|
||||
msgid "Sticky"
|
||||
msgstr "Fremhevet"
|
||||
|
||||
#. Translators: used between list items, there is a space after the comma.
|
||||
#: functions.php:328 functions.php:334
|
||||
msgid ", "
|
||||
msgstr ", "
|
||||
@@ -296,8 +307,10 @@ msgstr "Stikkordarkiv: %s"
|
||||
msgid "%s Archives"
|
||||
msgstr "Arkiv for %s"
|
||||
|
||||
#. Theme Name of the plugin/theme
|
||||
msgid "Twenty Thirteen"
|
||||
msgstr "Twenty Thirteen"
|
||||
|
||||
#. Author of the plugin/theme
|
||||
msgid "the WordPress team"
|
||||
msgstr "WordPress-gjengen"
|
||||
@@ -10,6 +10,7 @@ msgstr ""
|
||||
"X-Generator: GlotPress/0.1\n"
|
||||
"Project-Id-Version: Twenty Twelve\n"
|
||||
|
||||
#. Theme URI of the plugin/theme
|
||||
msgid "http://wordpress.org/themes/twentytwelve"
|
||||
msgstr "http://wordpress.org/themes/twentytwelve"
|
||||
|
||||
@@ -21,14 +22,22 @@ msgstr "Svar"
|
||||
msgid "<span class=\"meta-prep meta-prep-entry-date\">Published </span> <span class=\"entry-date\"><time class=\"entry-date\" datetime=\"%1$s\">%2$s</time></span> at <a href=\"%3$s\" title=\"Link to full-size image\">%4$s × %5$s</a> in <a href=\"%6$s\" title=\"Return to %7$s\" rel=\"gallery\">%8$s</a>."
|
||||
msgstr "<span class=\"meta-prep meta-prep-entry-date\">Publisert </span> <span class=\"entry-date\"><time class=\"entry-date\" datetime=\"%1$s\">%2$s</time></span>, <a href=\"%3$s\" title=\"Link to full-size image\">%4$s × %5$s</a> i <a href=\"%6$s\" title=\"Tilbake til %7$s\" rel=\"gallery\">%8$s</a>."
|
||||
|
||||
#. Description of the plugin/theme
|
||||
msgid "The 2012 theme for WordPress is a fully responsive theme that looks great on any device. Features include a front page template with its own widgets, an optional display font, styling for post formats on both index and single views, and an optional no-sidebar page template. Make it yours with a custom menu, header image, and background."
|
||||
msgstr "2012-temaet for WordPress er et helresponsivt tema som ser bra ut både på såvel mobil som datamaskin. Funksjoner inkluderer forsidemal med egne widgeter, en valgfri visningsfont, stiler for innleggsformater, både i arkivvisning og enkeltvisning, og en valgfri sidemal uten sidekolonne. Gjør temaet til ditt eget med en egendefinert meny, toppbilde og bakgrunn."
|
||||
|
||||
#. translators: If there are characters in your language that are not supported
|
||||
#. * by Open Sans, translate this to 'off'. Do not translate into your own
|
||||
#. language.
|
||||
#: functions.php:101
|
||||
msgctxt "Open Sans font: on or off"
|
||||
msgid "on"
|
||||
msgstr "on"
|
||||
|
||||
#. translators: To add an additional Open Sans character subset specific to
|
||||
#. your language,
|
||||
#. * translate this to 'greek', 'cyrillic' or 'vietnamese'. Do not translate
|
||||
#. into your own language.
|
||||
#: functions.php:107
|
||||
msgctxt "Open Sans font: add new subset (greek, cyrillic, vietnamese)"
|
||||
msgid "no-subset"
|
||||
@@ -50,6 +59,8 @@ msgstr "Vises når man bruker den valgfrie forsidemalen med en side satt som sta
|
||||
msgid "Second Front Page Widget Area"
|
||||
msgstr "Andre widget-område på forside"
|
||||
|
||||
#. Translators: 1 is category, 2 is tag, 3 is the date and 4 is the author's
|
||||
#. name.
|
||||
#: functions.php:390
|
||||
msgid "This entry was posted in %1$s and tagged %2$s on %3$s<span class=\"by-author\"> by %4$s</span>."
|
||||
msgstr "Dette innlegget ble skrevet i %1$s og merket %2$s, %3$s<span class=\"by-author\"> av %4$s</span>."
|
||||
@@ -72,9 +83,11 @@ msgctxt "Next post link"
|
||||
msgid "→"
|
||||
msgstr "→"
|
||||
|
||||
#. Template Name of the plugin/theme
|
||||
msgid "Front Page Template"
|
||||
msgstr "Forsidemal"
|
||||
|
||||
#. Template Name of the plugin/theme
|
||||
msgid "Full-width Page Template, No Sidebar"
|
||||
msgstr "Sidemal med full bredde, uten sidekolonne"
|
||||
|
||||
@@ -156,9 +169,11 @@ msgstr "Det var ingen treff på dine søkekriterier. Søk på nytt med noen andr
|
||||
msgid "Archives"
|
||||
msgstr "Arkiv"
|
||||
|
||||
#. Theme Name of the plugin/theme
|
||||
msgid "Twenty Twelve"
|
||||
msgstr "Twenty Twelve"
|
||||
|
||||
#. Author of the plugin/theme
|
||||
msgid "the WordPress team"
|
||||
msgstr "WordPress-gjengen"
|
||||
|
||||
@@ -166,6 +181,7 @@ msgstr "WordPress-gjengen"
|
||||
msgid "Your comment is awaiting moderation."
|
||||
msgstr "Din kommentar avventer moderasjon."
|
||||
|
||||
#. translators: 1: date, 2: time
|
||||
#: functions.php:334
|
||||
msgid "%1$s at %2$s"
|
||||
msgstr "%1$s, kl. %2$s"
|
||||
@@ -267,6 +283,8 @@ msgstr "Les videre <span class=\"meta-nav\">→</span>"
|
||||
msgid "Leave a reply"
|
||||
msgstr "Skriv en kommentar"
|
||||
|
||||
#. #-#-#-#-# twentytwelve.pot (Twenty Twelve 1.5) #-#-#-#-#
|
||||
#. Author URI of the plugin/theme
|
||||
#: footer.php:16
|
||||
msgid "http://wordpress.org/"
|
||||
msgstr "http://wordpress.org/"
|
||||
@@ -291,6 +309,7 @@ msgstr "Kommentarnavigasjon"
|
||||
msgid "← Older Comments"
|
||||
msgstr "← Eldre kommentarer"
|
||||
|
||||
#. Translators: used between list items, there is a space after the comma.
|
||||
#: functions.php:370 functions.php:373
|
||||
msgid ", "
|
||||
msgstr ", "
|
||||
|
||||
@@ -6,7 +6,7 @@
|
||||
Plugin Name: Akismet
|
||||
Plugin URI: http://akismet.com/
|
||||
Description: Used by millions, Akismet is quite possibly the best way in the world to <strong>protect your blog from comment and trackback spam</strong>. It keeps your site protected from spam even while you sleep. To get started: 1) Click the "Activate" link to the left of this description, 2) <a href="http://akismet.com/get/">Sign up for an Akismet API key</a>, and 3) Go to your Akismet configuration page, and save your API key.
|
||||
Version: 3.0.2
|
||||
Version: 3.0.3
|
||||
Author: Automattic
|
||||
Author URI: http://automattic.com/wordpress-plugins/
|
||||
License: GPLv2 or later
|
||||
@@ -35,7 +35,7 @@ if ( !function_exists( 'add_action' ) ) {
|
||||
exit;
|
||||
}
|
||||
|
||||
define( 'AKISMET_VERSION', '3.0.2' );
|
||||
define( 'AKISMET_VERSION', '3.0.3' );
|
||||
define( 'AKISMET__MINIMUM_WP_VERSION', '3.1' );
|
||||
define( 'AKISMET__PLUGIN_URL', plugin_dir_url( __FILE__ ) );
|
||||
define( 'AKISMET__PLUGIN_DIR', plugin_dir_path( __FILE__ ) );
|
||||
|
||||
@@ -327,6 +327,10 @@ class Akismet_Admin {
|
||||
if ( 'approved' == $comment_status )
|
||||
return;
|
||||
|
||||
if ( 'spam' == $comment_status ) {
|
||||
return;
|
||||
}
|
||||
|
||||
if ( function_exists('plugins_url') )
|
||||
$link = add_query_arg( array( 'action' => 'akismet_recheck_queue' ), admin_url( 'admin.php' ) );
|
||||
else
|
||||
|
||||
@@ -256,13 +256,31 @@ class Akismet {
|
||||
public static function delete_old_comments() {
|
||||
global $wpdb;
|
||||
|
||||
while( $comment_ids = $wpdb->get_col( $wpdb->prepare( "SELECT comment_id FROM {$wpdb->comments} WHERE DATE_SUB(NOW(), INTERVAL 15 DAY) > comment_date_gmt AND comment_approved = 'spam' LIMIT %d", defined( 'AKISMET_DELETE_LIMIT' ) ? AKISMET_DELETE_LIMIT : 10000 ) ) ) {
|
||||
/**
|
||||
* Determines how many comments will be deleted in each batch.
|
||||
*
|
||||
* @param int The default, as defined by AKISMET_DELETE_LIMIT.
|
||||
*/
|
||||
$delete_limit = apply_filters( 'akismet_delete_comment_limit', defined( 'AKISMET_DELETE_LIMIT' ) ? AKISMET_DELETE_LIMIT : 10000 );
|
||||
$delete_limit = max( 1, intval( $delete_limit ) );
|
||||
|
||||
/**
|
||||
* Determines how many days a comment will be left in the Spam queue before being deleted.
|
||||
*
|
||||
* @param int The default number of days.
|
||||
*/
|
||||
$delete_interval = apply_filters( 'akismet_delete_comment_interval', 15 );
|
||||
$delete_interval = max( 1, intval( $delete_interval ) );
|
||||
|
||||
while ( $comment_ids = $wpdb->get_col( $wpdb->prepare( "SELECT comment_id FROM {$wpdb->comments} WHERE DATE_SUB(NOW(), INTERVAL %d DAY) > comment_date_gmt AND comment_approved = 'spam' LIMIT %d", $delete_interval, $delete_limit ) ) ) {
|
||||
if ( empty( $comment_ids ) )
|
||||
return;
|
||||
|
||||
$wpdb->queries = array();
|
||||
|
||||
do_action( 'delete_comment', $comment_ids );
|
||||
foreach ( $comment_ids as $comment_id ) {
|
||||
do_action( 'delete_comment', $comment_id );
|
||||
}
|
||||
|
||||
$comma_comment_ids = implode( ', ', array_map('intval', $comment_ids) );
|
||||
|
||||
@@ -926,8 +944,16 @@ p {
|
||||
return _http_build_query( $args, '', '&' );
|
||||
}
|
||||
|
||||
/**
|
||||
* Log debugging info to the error log.
|
||||
*
|
||||
* Enabled when WP_DEBUG_LOG is enabled, but can be disabled via the akismet_debug_log filter.
|
||||
*
|
||||
* @param mixed $akismet_debug The data to log.
|
||||
*/
|
||||
public static function log( $akismet_debug ) {
|
||||
if ( defined( 'WP_DEBUG_LOG' ) && WP_DEBUG_LOG )
|
||||
error_log( print_r( compact( 'akismet_debug' ), 1 ) ); //send message to debug.log when in debug mode
|
||||
if ( apply_filters( 'akismet_debug_log', defined( 'WP_DEBUG_LOG' ) && WP_DEBUG_LOG ) ) {
|
||||
error_log( print_r( compact( 'akismet_debug' ), true ) );
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -3,7 +3,7 @@ Contributors: matt, ryan, andy, mdawaffe, tellyworth, josephscott, lessbloat, eo
|
||||
Tags: akismet, comments, spam
|
||||
Requires at least: 3.1
|
||||
Tested up to: 4.0
|
||||
Stable tag: 3.0.2
|
||||
Stable tag: 3.0.3
|
||||
License: GPLv2 or later
|
||||
|
||||
Akismet checks your comments against the Akismet Web service to see if they look like spam or not.
|
||||
@@ -30,11 +30,24 @@ Upload the Akismet plugin to your blog, Activate it, then enter your [Akismet.co
|
||||
|
||||
== Changelog ==
|
||||
|
||||
= 3.0.3 =
|
||||
*Release Date - 3rd November, 2014*
|
||||
|
||||
* Fix for sending the wrong data to delete_comment action that could have prevented old spam comments from being deleted.
|
||||
* Added a filter to disable logging of Akismet debugging information.
|
||||
* Added a filter for the maximum comment age when deleting old spam comments.
|
||||
* Added a filter for the number per batch when deleting old spam comments.
|
||||
* Removed the "Check for Spam" button from the Spam folder.
|
||||
|
||||
= 3.0.2 =
|
||||
*Release Date - 18th August, 2014*
|
||||
|
||||
* Performance improvements.
|
||||
* Fixed a bug that could truncate the comment data being sent to Akismet for checking.
|
||||
|
||||
= 3.0.1 =
|
||||
*Release Date - 9th July, 2014*
|
||||
|
||||
* Removed dependency on PHP's fsockopen function
|
||||
* Fix spam/ham reports to work when reported outside of the WP dashboard, e.g., from Notifications or the WP app
|
||||
* Remove jQuery dependency for comment form JavaScript
|
||||
@@ -42,6 +55,8 @@ Upload the Akismet plugin to your blog, Activate it, then enter your [Akismet.co
|
||||
* Suspended keys will now result in all comments being put in moderation, not spam.
|
||||
|
||||
= 3.0.0 =
|
||||
*Release Date - 15th April, 2014*
|
||||
|
||||
* Move Akismet to Settings menu
|
||||
* Drop Akismet Stats menu
|
||||
* Add stats snapshot to Akismet settings
|
||||
@@ -55,6 +70,8 @@ Upload the Akismet plugin to your blog, Activate it, then enter your [Akismet.co
|
||||
* Replace the old discard setting with a new "discard pervasive spam" feature.
|
||||
|
||||
= 2.6.0 =
|
||||
*Release Date - 18th March, 2014*
|
||||
|
||||
* Add ajax paging to the check for spam button to handle large volumes of comments
|
||||
* Optimize javascript and add localization support
|
||||
* Fix bug in link to spam comments from right now dashboard widget
|
||||
@@ -63,16 +80,22 @@ Upload the Akismet plugin to your blog, Activate it, then enter your [Akismet.co
|
||||
* Add pre-check for pingbacks, to stop spam before an outbound verification request is made
|
||||
|
||||
= 2.5.9 =
|
||||
*Release Date - 1st August, 2013*
|
||||
|
||||
* Update 'Already have a key' link to redirect page rather than depend on javascript
|
||||
* Fix some non-translatable strings to be translatable
|
||||
* Update Activation banner in plugins page to redirect user to Akismet config page
|
||||
|
||||
= 2.5.8 =
|
||||
*Release Date - 20th January, 2013*
|
||||
|
||||
* Simplify the activation process for new users
|
||||
* Remove the reporter_ip parameter
|
||||
* Minor preventative security improvements
|
||||
|
||||
= 2.5.7 =
|
||||
*Release Date - 13th December, 2012*
|
||||
|
||||
* FireFox Stats iframe preview bug
|
||||
* Fix mshots preview when using https
|
||||
* Add .htaccess to block direct access to files
|
||||
@@ -82,6 +105,8 @@ Upload the Akismet plugin to your blog, Activate it, then enter your [Akismet.co
|
||||
* Fix prepare() warnings in WP 3.5
|
||||
|
||||
= 2.5.6 =
|
||||
*Release Date - 26th April, 2012*
|
||||
|
||||
* Prevent retry scheduling problems on sites where wp_cron is misbehaving
|
||||
* Preload mshot previews
|
||||
* Modernize the widget code
|
||||
@@ -93,10 +118,14 @@ Upload the Akismet plugin to your blog, Activate it, then enter your [Akismet.co
|
||||
* Improve error messages when verifying an API key
|
||||
|
||||
= 2.5.5 =
|
||||
*Release Date - 11th January, 2012*
|
||||
|
||||
* Add nonce check for comment author URL remove action
|
||||
* Fix the settings link
|
||||
|
||||
= 2.5.4 =
|
||||
*Release Date - 5th January, 2012*
|
||||
|
||||
* Limit Akismet CSS and Javascript loading in wp-admin to just the pages that need it
|
||||
* Added author URL quick removal functionality
|
||||
* Added mShot preview on Author URL hover
|
||||
@@ -105,11 +134,14 @@ Upload the Akismet plugin to your blog, Activate it, then enter your [Akismet.co
|
||||
* Purge old Akismet comment meta data, default of 15 days
|
||||
|
||||
= 2.5.3 =
|
||||
*Release Date - 8th Febuary, 2011*
|
||||
|
||||
* Specify the license is GPL v2 or later
|
||||
* Fix a bug that could result in orphaned commentmeta entries
|
||||
* Include hotfix for WordPress 3.0.5 filter issue
|
||||
|
||||
= 2.5.2 =
|
||||
*Release Date - 14th January, 2011*
|
||||
|
||||
* Properly format the comment count for author counts
|
||||
* Look for super admins on multisite installs when looking up user roles
|
||||
@@ -119,6 +151,7 @@ Upload the Akismet plugin to your blog, Activate it, then enter your [Akismet.co
|
||||
* Set Akismet stats iframe height to fixed 2500px. Better to have one tall scroll bar than two side by side.
|
||||
|
||||
= 2.5.1 =
|
||||
*Release Date - 17th December, 2010*
|
||||
|
||||
* Fix a bug that caused the "Auto delete" option to fail to discard comments correctly
|
||||
* Remove the comment nonce form field from the 'Akismet Configuration' page in favor of using a filter, akismet_comment_nonce
|
||||
@@ -137,6 +170,7 @@ Upload the Akismet plugin to your blog, Activate it, then enter your [Akismet.co
|
||||
* Hid "flagged by..." notification while on dashboard
|
||||
|
||||
= 2.5.0 =
|
||||
*Release Date - 7th December, 2010*
|
||||
|
||||
* Track comment actions under 'Akismet Status' on the edit comment screen
|
||||
* Fix a few remaining deprecated function calls ( props Mike Glendinning )
|
||||
@@ -152,6 +186,7 @@ Upload the Akismet plugin to your blog, Activate it, then enter your [Akismet.co
|
||||
* New option, "Use a nonce on the comment form."
|
||||
|
||||
= 2.4.0 =
|
||||
*Release Date - 23rd August, 2010*
|
||||
|
||||
* Spell out that the license is GPLv2
|
||||
* Fix PHP warnings
|
||||
@@ -161,6 +196,7 @@ Upload the Akismet plugin to your blog, Activate it, then enter your [Akismet.co
|
||||
* General code clean up
|
||||
|
||||
= 2.3.0 =
|
||||
*Release Date - 5th June, 2010*
|
||||
|
||||
* Fix "Are you sure" nonce message on config screen in WPMU
|
||||
* Fix XHTML compliance issue in sidebar widget
|
||||
@@ -168,10 +204,12 @@ Upload the Akismet plugin to your blog, Activate it, then enter your [Akismet.co
|
||||
* Localize the widget title (core ticket #13879)
|
||||
|
||||
= 2.2.9 =
|
||||
*Release Date - 2nd June, 2010*
|
||||
|
||||
* Eliminate a potential conflict with some plugins that may cause spurious reports
|
||||
|
||||
= 2.2.8 =
|
||||
*Release Date - 27th May, 2010*
|
||||
|
||||
* Fix bug in initial comment check for ipv6 addresses
|
||||
* Report comments as ham when they are moved from spam to moderation
|
||||
@@ -181,12 +219,14 @@ Upload the Akismet plugin to your blog, Activate it, then enter your [Akismet.co
|
||||
* Better handling of comments by logged-in users
|
||||
|
||||
= 2.2.7 =
|
||||
*Release Date - 17th December, 2009*
|
||||
|
||||
* Add a new AKISMET_VERSION constant
|
||||
* Reduce the possibility of over-counting spam when another spam filter plugin is in use
|
||||
* Disable the connectivity check when the API key is hard-coded for WPMU
|
||||
|
||||
= 2.2.6 =
|
||||
*Release Date - 20th July, 2009*
|
||||
|
||||
* Fix a global warning introduced in 2.2.5
|
||||
* Add changelog and additional readme.txt tags
|
||||
@@ -194,10 +234,12 @@ Upload the Akismet plugin to your blog, Activate it, then enter your [Akismet.co
|
||||
* Support a new WPCOM_API_KEY constant for easier use with WordPress MU
|
||||
|
||||
= 2.2.5 =
|
||||
*Release Date - 13th July, 2009*
|
||||
|
||||
* Include a new Server Connectivity diagnostic check, to detect problems caused by firewalls
|
||||
|
||||
= 2.2.4 =
|
||||
*Release Date - 3rd June, 2009*
|
||||
|
||||
* Fixed a key problem affecting the stats feature in WordPress MU
|
||||
* Provide additional blog information in Akismet API calls
|
||||
@@ -40,12 +40,12 @@
|
||||
<?php elseif ( $type == 'missing-functions' ) :?>
|
||||
<div class="wrap alert critical">
|
||||
<h3 class="key-status failed"><?php esc_html_e('Network functions are disabled.', 'akismet'); ?></h3>
|
||||
<p class="description"><?php printf( __('Your web host or server administrator has disabled PHP’s <code>gethostbynamel</code> functions. <strong>Akismet cannot work correctly until this is fixed.</strong> Please contact your web host or firewall administrator and give them <a href="%s" target="_blank">this information about Akismet’s system requirements</a>.', 'akismet'), 'https://blog.akismet.com/akismet-hosting-faq/'); ?></p>
|
||||
<p class="description"><?php printf( __('Your web host or server administrator has disabled PHP’s <code>gethostbynamel</code> functions. <strong>Akismet cannot work correctly until this is fixed.</strong> Please contact your web host or firewall administrator and give them <a href="%s" target="_blank">this information about Akismet’s system requirements</a>.', 'akismet'), 'http://blog.akismet.com/akismet-hosting-faq/'); ?></p>
|
||||
</div>
|
||||
<?php elseif ( $type == 'servers-be-down' ) :?>
|
||||
<div class="wrap alert critical">
|
||||
<h3 class="key-status failed"><?php esc_html_e("We can’t connect to your site.", 'akismet'); ?></h3>
|
||||
<p class="description"><?php printf( __('Your firewall may be blocking us. Please contact your host and refer to <a href="%s" target="_blank">our guide about firewalls</a>.', 'akismet'), 'https://blog.akismet.com/akismet-hosting-faq/'); ?></p>
|
||||
<p class="description"><?php printf( __('Your firewall may be blocking us. Please contact your host and refer to <a href="%s" target="_blank">our guide about firewalls</a>.', 'akismet'), 'http://blog.akismet.com/akismet-hosting-faq/'); ?></p>
|
||||
</div>
|
||||
<?php elseif ( $type == 'active-dunning' ) :?>
|
||||
<div class="wrap alert critical">
|
||||
@@ -99,4 +99,4 @@
|
||||
<p class="description"><?php printf( __('To continue your service, <a href="%s" target="_blank">upgrade to an Enterprise subscription</a>, which covers an unlimited number of sites. Please <a href="%s" target="_blank">contact our support team</a> with any questions.', 'akismet'), 'https://akismet.com/account/upgrade/', 'https://akismet.com/contact/'); ?></p>
|
||||
<?php endif; ?>
|
||||
</div>
|
||||
<?php endif;?>
|
||||
<?php endif;?>
|
||||
@@ -1,18 +0,0 @@
|
||||
{
|
||||
"boss": true,
|
||||
"curly": true,
|
||||
"eqeqeq": true,
|
||||
"eqnull": true,
|
||||
"es3": true,
|
||||
"immed": true,
|
||||
"latedef": true,
|
||||
"newcap": true,
|
||||
"noarg": true,
|
||||
"quotmark": "single",
|
||||
"sub": true,
|
||||
"strict": true,
|
||||
"undef": true,
|
||||
"unused": true,
|
||||
|
||||
"node": true
|
||||
}
|
||||
@@ -1,112 +0,0 @@
|
||||
{
|
||||
"requireSpacesInConditionalExpression": true,
|
||||
"requireSpacesInFunctionExpression": {
|
||||
"beforeOpeningCurlyBrace": true
|
||||
},
|
||||
"disallowSpacesInFunctionExpression": {
|
||||
"beforeOpeningRoundBrace": true
|
||||
},
|
||||
"requireMultipleVarDecl": "onevar",
|
||||
"requireSpacesInsideObjectBrackets": "all",
|
||||
"disallowSpaceAfterObjectKeys": true,
|
||||
"requireSpaceAfterBinaryOperators": [
|
||||
"=", "+=", "-=", "*=", "/=", "%=", "<<=", ">>=", ">>>=",
|
||||
"&=", "|=", "^=", "+=",
|
||||
|
||||
"+", "-", "*", "/", "%", "<<", ">>", ">>>", "&",
|
||||
"|", "^", "&&", "||", "===", "==", ">=",
|
||||
"<=", "<", ">", "!=", "!=="
|
||||
],
|
||||
"requireSpaceBeforeBinaryOperators": [
|
||||
"=", "+=", "-=", "*=", "/=", "%=", "<<=", ">>=", ">>>=",
|
||||
"&=", "|=", "^=", "+=",
|
||||
|
||||
"+", "-", "*", "/", "%", "<<", ">>", ">>>", "&",
|
||||
"|", "^", "&&", "||", "===", "==", ">=",
|
||||
"<=", "<", ">", "!=", "!=="
|
||||
],
|
||||
"disallowKeywords": ["with"],
|
||||
"disallowMultipleLineBreaks": true,
|
||||
"validateLineBreaks": "LF",
|
||||
"disallowMixedSpacesAndTabs": "smart",
|
||||
"disallowTrailingWhitespace": true,
|
||||
|
||||
"requireCurlyBraces": [ "if", "else", "for", "while", "do", "try", "catch" ],
|
||||
"requireSpaceBeforeBlockStatements": true,
|
||||
"requireParenthesesAroundIIFE": true,
|
||||
"requireBlocksOnNewline": true,
|
||||
"requireRightStickedOperators": [],
|
||||
"requireOperatorBeforeLineBreak": [
|
||||
"?",
|
||||
"=",
|
||||
"+",
|
||||
"-",
|
||||
"/",
|
||||
"*",
|
||||
"==",
|
||||
"===",
|
||||
"!=",
|
||||
"!==",
|
||||
">",
|
||||
">=",
|
||||
"<",
|
||||
"<="
|
||||
],
|
||||
"disallowLeftStickedOperators": [
|
||||
"?",
|
||||
"=",
|
||||
"+",
|
||||
"-",
|
||||
"/",
|
||||
"*",
|
||||
"==",
|
||||
"===",
|
||||
"!=",
|
||||
"!==",
|
||||
">",
|
||||
">=",
|
||||
"<",
|
||||
"<="
|
||||
],
|
||||
"disallowRightStickedOperators": [
|
||||
"?",
|
||||
"=",
|
||||
"+",
|
||||
"/",
|
||||
"*",
|
||||
":",
|
||||
"==",
|
||||
"===",
|
||||
"!=",
|
||||
"!==",
|
||||
">",
|
||||
">=",
|
||||
"<",
|
||||
"<="
|
||||
],
|
||||
"requireLeftStickedOperators": [","],
|
||||
"disallowSpaceAfterPrefixUnaryOperators": ["++", "--", "+", "-", "~"],
|
||||
"requireSpaceAfterPrefixUnaryOperators": ["!"],
|
||||
"disallowSpaceBeforePostfixUnaryOperators": ["++", "--"],
|
||||
"requireCamelCaseOrUpperCaseIdentifiers": true,
|
||||
"disallowMultipleLineStrings": true,
|
||||
"validateQuoteMarks": "'",
|
||||
"validateIndentation": "\t",
|
||||
"requireLineFeedAtFileEnd": true,
|
||||
"requireDotNotation": true,
|
||||
|
||||
"disallowTrailingComma": true,
|
||||
"disallowPaddingNewlinesInBlocks": true,
|
||||
"disallowEmptyBlocks": true,
|
||||
"disallowQuotedKeysInObjects": "allButReserved",
|
||||
"disallowDanglingUnderscores": true,
|
||||
"requireCommaBeforeLineBreak": true,
|
||||
"disallowKeywordsOnNewLine": ["else"],
|
||||
"requireCapitalizedConstructors": true,
|
||||
"safeContextKeyword": [ "that" ],
|
||||
"validateJSDoc": {
|
||||
"checkParamNames": true,
|
||||
"checkRedundantParams": true,
|
||||
"requireParamTypes": true
|
||||
}
|
||||
}
|
||||
@@ -42,11 +42,11 @@ If there is no ticket for your issue, submit it first, following the above guide
|
||||
|
||||
## Making Changes
|
||||
|
||||
* Fork the repository on GitHub.
|
||||
* Fork the repository on GitHub (make sure to use the trunk branch, not master).
|
||||
* Make the changes to your forked repository.
|
||||
* Ensure you stick to the [WordPress Coding Standards](http://make.wordpress.org/core/handbook/coding-standards/) and have properly documented any new functions, actions and filters following the [documentation standards](http://make.wordpress.org/core/handbook/inline-documentation-standards/php-documentation-standards/).
|
||||
* When committing, reference your issue (if present) and include a note about the fix.
|
||||
* Push the changes to your fork and submit a pull request to the 'master' branch of the WordPress SEO repository.
|
||||
* Push the changes to your fork and submit a pull request to the 'trunk' branch of the WordPress SEO repository.
|
||||
|
||||
At this point you're waiting on us to merge your pull request. We'll review all pull requests, and make suggestions and changes if necessary.
|
||||
|
||||
|
||||
@@ -2,6 +2,8 @@ WordPress SEO by Yoast
|
||||
======================
|
||||
|
||||
[](https://travis-ci.org/Yoast/wordpress-seo)
|
||||
[](https://packagist.org/packages/yoast/wordpress-seo)
|
||||
[](https://packagist.org/packages/yoast/wordpress-seo)
|
||||
|
||||
Welcome to the WordPress SEO Github repository
|
||||
----------------------------------------------
|
||||
|
||||
@@ -130,9 +130,9 @@ add_action( 'wp_ajax_wpseo_replace_vars', 'wpseo_ajax_replace_vars' );
|
||||
function wpseo_save_title() {
|
||||
check_ajax_referer( 'wpseo-bulk-editor' );
|
||||
|
||||
$new_title = $_POST['new_title'];
|
||||
$new_title = $_POST['new_value'];
|
||||
$id = intval( $_POST['wpseo_post_id'] );
|
||||
$original_title = $_POST['existing_title'];
|
||||
$original_title = $_POST['existing_value'];
|
||||
|
||||
$results = wpseo_upsert_new_title( $id, $new_title, $original_title );
|
||||
|
||||
@@ -159,6 +159,10 @@ function wpseo_upsert_new_title( $post_id, $new_title, $original_title ) {
|
||||
*/
|
||||
function wpseo_upsert_meta( $post_id, $new_meta_value, $orig_meta_value, $meta_key, $return_key ) {
|
||||
|
||||
$post_id = intval( $post_id );
|
||||
$sanitized_new_meta_value = wp_strip_all_tags( $new_meta_value );
|
||||
$orig_meta_value = wp_strip_all_tags( $orig_meta_value );
|
||||
|
||||
$upsert_results = array(
|
||||
'status' => 'success',
|
||||
'post_id' => $post_id,
|
||||
@@ -201,7 +205,14 @@ function wpseo_upsert_meta( $post_id, $new_meta_value, $orig_meta_value, $meta_k
|
||||
|
||||
}
|
||||
|
||||
$res = update_post_meta( $post_id, $meta_key, $new_meta_value );
|
||||
if ( $sanitized_new_meta_value === $orig_meta_value && $sanitized_new_meta_value !== $new_meta_value ) {
|
||||
$upsert_results['status'] = 'failure';
|
||||
$upsert_results['results'] = __( 'You have used HTML in your value which is not allowed.', 'wordpress-seo' );
|
||||
|
||||
return $upsert_results;
|
||||
}
|
||||
|
||||
$res = update_post_meta( $post_id, $meta_key, $sanitized_new_meta_value );
|
||||
|
||||
$upsert_results['status'] = ( $res !== false ) ? 'success' : 'failure';
|
||||
$upsert_results['results'] = $res;
|
||||
@@ -215,8 +226,8 @@ function wpseo_upsert_meta( $post_id, $new_meta_value, $orig_meta_value, $meta_k
|
||||
function wpseo_save_all_titles() {
|
||||
check_ajax_referer( 'wpseo-bulk-editor' );
|
||||
|
||||
$new_titles = $_POST['titles'];
|
||||
$original_titles = $_POST['existing_titles'];
|
||||
$new_titles = $_POST['items'];
|
||||
$original_titles = $_POST['existing_items'];
|
||||
|
||||
$results = array();
|
||||
|
||||
@@ -236,11 +247,12 @@ add_action( 'wp_ajax_wpseo_save_all_titles', 'wpseo_save_all_titles' );
|
||||
* Save an individual meta description from the Bulk Editor.
|
||||
*/
|
||||
function wpseo_save_description() {
|
||||
|
||||
check_ajax_referer( 'wpseo-bulk-editor' );
|
||||
|
||||
$new_metadesc = $_POST['new_metadesc'];
|
||||
$new_metadesc = $_POST['new_value'];
|
||||
$id = intval( $_POST['wpseo_post_id'] );
|
||||
$original_metadesc = $_POST['existing_metadesc'];
|
||||
$original_metadesc = $_POST['existing_value'];
|
||||
|
||||
$results = wpseo_upsert_new_description( $id, $new_metadesc, $original_metadesc );
|
||||
|
||||
@@ -248,7 +260,7 @@ function wpseo_save_description() {
|
||||
die();
|
||||
}
|
||||
|
||||
add_action( 'wp_ajax_wpseo_save_desc', 'wpseo_save_description' );
|
||||
add_action( 'wp_ajax_wpseo_save_metadesc', 'wpseo_save_description' );
|
||||
|
||||
/**
|
||||
* Helper function to create or update a post's meta description.
|
||||
@@ -266,8 +278,8 @@ function wpseo_upsert_new_description( $post_id, $new_metadesc, $original_metade
|
||||
function wpseo_save_all_descriptions() {
|
||||
check_ajax_referer( 'wpseo-bulk-editor' );
|
||||
|
||||
$new_metadescs = $_POST['metadescs'];
|
||||
$original_metadescs = $_POST['existing_metadescs'];
|
||||
$new_metadescs = $_POST['items'];
|
||||
$original_metadescs = $_POST['existing_items'];
|
||||
|
||||
$results = array();
|
||||
|
||||
@@ -281,4 +293,4 @@ function wpseo_save_all_descriptions() {
|
||||
die();
|
||||
}
|
||||
|
||||
add_action( 'wp_ajax_wpseo_save_all_descs', 'wpseo_save_all_descriptions' );
|
||||
add_action( 'wp_ajax_wpseo_save_all_descriptions', 'wpseo_save_all_descriptions' );
|
||||
@@ -66,6 +66,8 @@ if ( ! class_exists( 'WPSEO_Admin' ) ) {
|
||||
add_filter( 'set-screen-option', array( $this, 'save_bulk_edit_options' ), 10, 3 );
|
||||
|
||||
add_filter( 'upgrader_post_install', array( $this, 'remove_transients_on_update' ), 10, 1 );
|
||||
|
||||
add_action( 'activated_plugin', array( 'WPSEO_Plugin_Conflict', 'hook_check_for_plugin_conflicts' ), 10, 1 );
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -86,11 +88,14 @@ if ( ! class_exists( 'WPSEO_Admin' ) ) {
|
||||
return;
|
||||
}
|
||||
|
||||
// Base 64 encoded SVG image
|
||||
$icon_svg = 'data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0idXRmLTgiPz4NCjwhRE9DVFlQRSBzdmcgUFVCTElDICItLy9XM0MvL0RURCBTVkcgMS4xLy9FTiIgImh0dHA6Ly93d3cudzMub3JnL0dyYXBoaWNzL1NWRy8xLjEvRFREL3N2ZzExLmR0ZCIgWw0KCTwhRU5USVRZIG5zX2Zsb3dzICJodHRwOi8vbnMuYWRvYmUuY29tL0Zsb3dzLzEuMC8iPg0KCTwhRU5USVRZIG5zX2V4dGVuZCAiaHR0cDovL25zLmFkb2JlLmNvbS9FeHRlbnNpYmlsaXR5LzEuMC8iPg0KCTwhRU5USVRZIG5zX2FpICJodHRwOi8vbnMuYWRvYmUuY29tL0Fkb2JlSWxsdXN0cmF0b3IvMTAuMC8iPg0KCTwhRU5USVRZIG5zX2dyYXBocyAiaHR0cDovL25zLmFkb2JlLmNvbS9HcmFwaHMvMS4wLyI+DQpdPg0KPHN2ZyB2ZXJzaW9uPSIxLjEiIGlkPSJMYWFnXzEiIHhtbG5zOng9IiZuc19leHRlbmQ7IiB4bWxuczppPSImbnNfYWk7IiB4bWxuczpncmFwaD0iJm5zX2dyYXBoczsiDQoJIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyIgeG1sbnM6eGxpbms9Imh0dHA6Ly93d3cudzMub3JnLzE5OTkveGxpbmsiIHhtbG5zOmE9Imh0dHA6Ly9ucy5hZG9iZS5jb20vQWRvYmVTVkdWaWV3ZXJFeHRlbnNpb25zLzMuMC8iDQoJIHg9IjBweCIgeT0iMHB4IiB2aWV3Qm94PSIwIDAgNDAgMzEuODkiIGVuYWJsZS1iYWNrZ3JvdW5kPSJuZXcgMCAwIDQwIDMxLjg5IiB4bWw6c3BhY2U9InByZXNlcnZlIj4NCjxnPg0KPHBhdGggZmlsbD0iI0ZGRkZGRiIgZD0iTTQwLDEyLjUyNEM0MCw1LjYwOCwzMS40NjksMCwyMCwwQzguNTMsMCwwLDUuNjA4LDAsMTIuNTI0YzAsNS41Niw1LjI0MywxMC4yNzIsMTMuNTU3LDExLjkwN3YtNC4wNjUNCgljMCwwLDAuMDQtMS0wLjI4LTEuOTJjLTAuMzItMC45MjEtMS43Ni0zLjAwMS0xLjc2LTUuMTIxYzAtMi4xMjEsMi41NjEtOS41NjMsNS4xMjItMTAuNDQ0Yy0wLjQsMS4yMDEtMC4zMiw3LjY4My0wLjMyLDcuNjgzDQoJczEuNCwyLjcyLDQuNjQxLDIuNzJjMy4yNDIsMCw0LjUxMS0xLjc2LDQuNzE1LTIuMmMwLjIwNi0wLjQ0LDAuODQ2LTguNzIzLDAuODQ2LTguNzIzczQuMDgyLDQuNDAyLDMuNjgyLDkuMzYzDQoJYy0wLjQwMSw0Ljk2Mi00LjQ4Miw3LjIwMy02LjEyMiw5LjEyM2MtMS4yODYsMS41MDUtMi4yMjQsMy4xMy0yLjYyOSw0LjE2OGMwLjgwMS0wLjAzNCwxLjU4Ny0wLjA5OCwyLjM2MS0wLjE4NGw5LjE1MSw3LjA1OQ0KCWwtNC44ODQtNy44M0MzNS41MzUsMjIuMTYxLDQwLDE3LjcxMyw0MCwxMi41MjR6Ii8+DQo8L2c+DQo8L3N2Zz4=';
|
||||
|
||||
// Add main page
|
||||
$admin_page = add_menu_page( __( 'Yoast WordPress SEO:', 'wordpress-seo' ) . ' ' . __( 'General Settings', 'wordpress-seo' ), __( 'SEO', 'wordpress-seo' ), 'manage_options', 'wpseo_dashboard', array(
|
||||
$this,
|
||||
'load_page',
|
||||
), plugins_url( 'images/yoast-icon.png', WPSEO_FILE ), '99.31337' );
|
||||
), $icon_svg, '99.31337' );
|
||||
|
||||
/**
|
||||
* Filter: 'wpseo_manage_options_capability' - Allow changing the capability users need to view the settings pages
|
||||
@@ -158,7 +163,7 @@ if ( ! class_exists( 'WPSEO_Admin' ) ) {
|
||||
array(
|
||||
'wpseo_dashboard',
|
||||
'',
|
||||
__( 'Import & Export', 'wordpress-seo' ),
|
||||
esc_html__( 'Import & Export', 'wordpress-seo' ),
|
||||
$manage_options_cap,
|
||||
'wpseo_import',
|
||||
array( $this, 'load_page' ),
|
||||
@@ -266,10 +271,12 @@ if ( ! class_exists( 'WPSEO_Admin' ) ) {
|
||||
*/
|
||||
function register_network_settings_page() {
|
||||
if ( WPSEO_Options::grant_access() ) {
|
||||
// Base 64 encoded SVG image
|
||||
$icon_svg = 'data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0idXRmLTgiPz4NCjwhRE9DVFlQRSBzdmcgUFVCTElDICItLy9XM0MvL0RURCBTVkcgMS4xLy9FTiIgImh0dHA6Ly93d3cudzMub3JnL0dyYXBoaWNzL1NWRy8xLjEvRFREL3N2ZzExLmR0ZCIgWw0KCTwhRU5USVRZIG5zX2Zsb3dzICJodHRwOi8vbnMuYWRvYmUuY29tL0Zsb3dzLzEuMC8iPg0KCTwhRU5USVRZIG5zX2V4dGVuZCAiaHR0cDovL25zLmFkb2JlLmNvbS9FeHRlbnNpYmlsaXR5LzEuMC8iPg0KCTwhRU5USVRZIG5zX2FpICJodHRwOi8vbnMuYWRvYmUuY29tL0Fkb2JlSWxsdXN0cmF0b3IvMTAuMC8iPg0KCTwhRU5USVRZIG5zX2dyYXBocyAiaHR0cDovL25zLmFkb2JlLmNvbS9HcmFwaHMvMS4wLyI+DQpdPg0KPHN2ZyB2ZXJzaW9uPSIxLjEiIGlkPSJMYWFnXzEiIHhtbG5zOng9IiZuc19leHRlbmQ7IiB4bWxuczppPSImbnNfYWk7IiB4bWxuczpncmFwaD0iJm5zX2dyYXBoczsiDQoJIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyIgeG1sbnM6eGxpbms9Imh0dHA6Ly93d3cudzMub3JnLzE5OTkveGxpbmsiIHhtbG5zOmE9Imh0dHA6Ly9ucy5hZG9iZS5jb20vQWRvYmVTVkdWaWV3ZXJFeHRlbnNpb25zLzMuMC8iDQoJIHg9IjBweCIgeT0iMHB4IiB2aWV3Qm94PSIwIDAgNDAgMzEuODkiIGVuYWJsZS1iYWNrZ3JvdW5kPSJuZXcgMCAwIDQwIDMxLjg5IiB4bWw6c3BhY2U9InByZXNlcnZlIj4NCjxnPg0KPHBhdGggZmlsbD0iI0ZGRkZGRiIgZD0iTTQwLDEyLjUyNEM0MCw1LjYwOCwzMS40NjksMCwyMCwwQzguNTMsMCwwLDUuNjA4LDAsMTIuNTI0YzAsNS41Niw1LjI0MywxMC4yNzIsMTMuNTU3LDExLjkwN3YtNC4wNjUNCgljMCwwLDAuMDQtMS0wLjI4LTEuOTJjLTAuMzItMC45MjEtMS43Ni0zLjAwMS0xLjc2LTUuMTIxYzAtMi4xMjEsMi41NjEtOS41NjMsNS4xMjItMTAuNDQ0Yy0wLjQsMS4yMDEtMC4zMiw3LjY4My0wLjMyLDcuNjgzDQoJczEuNCwyLjcyLDQuNjQxLDIuNzJjMy4yNDIsMCw0LjUxMS0xLjc2LDQuNzE1LTIuMmMwLjIwNi0wLjQ0LDAuODQ2LTguNzIzLDAuODQ2LTguNzIzczQuMDgyLDQuNDAyLDMuNjgyLDkuMzYzDQoJYy0wLjQwMSw0Ljk2Mi00LjQ4Miw3LjIwMy02LjEyMiw5LjEyM2MtMS4yODYsMS41MDUtMi4yMjQsMy4xMy0yLjYyOSw0LjE2OGMwLjgwMS0wLjAzNCwxLjU4Ny0wLjA5OCwyLjM2MS0wLjE4NGw5LjE1MSw3LjA1OQ0KCWwtNC44ODQtNy44M0MzNS41MzUsMjIuMTYxLDQwLDE3LjcxMyw0MCwxMi41MjR6Ii8+DQo8L2c+DQo8L3N2Zz4=';
|
||||
add_menu_page( __( 'Yoast WordPress SEO:', 'wordpress-seo' ) . ' ' . __( 'MultiSite Settings', 'wordpress-seo' ), __( 'SEO', 'wordpress-seo' ), 'delete_users', 'wpseo_dashboard', array(
|
||||
$this,
|
||||
'network_config_page',
|
||||
), plugins_url( 'images/yoast-icon.png', WPSEO_FILE ) );
|
||||
), $icon_svg );
|
||||
|
||||
if ( wpseo_allow_system_file_edit() === true ) {
|
||||
add_submenu_page( 'wpseo_dashboard', __( 'Yoast WordPress SEO:', 'wordpress-seo' ) . ' ' . __( 'Edit Files', 'wordpress-seo' ), __( 'Edit Files', 'wordpress-seo' ), 'delete_users', 'wpseo_files', array(
|
||||
@@ -569,6 +576,11 @@ if ( ! class_exists( 'WPSEO_Admin' ) ) {
|
||||
return $slug;
|
||||
}
|
||||
|
||||
// Don't change slug if the post is a draft, this conflicts with polylang
|
||||
if ( 'draft' == $_POST['post_status'] ) {
|
||||
return $slug;
|
||||
}
|
||||
|
||||
// Lowercase the slug and strip slashes
|
||||
$clean_slug = sanitize_title( stripslashes( $_POST['post_title'] ) );
|
||||
|
||||
@@ -590,7 +602,7 @@ if ( ! class_exists( 'WPSEO_Admin' ) ) {
|
||||
*/
|
||||
function stopwords() {
|
||||
/* translators: this should be an array of stopwords for your language, separated by comma's. */
|
||||
$stopwords = explode( ',', __( "a,about,above,after,again,against,all,am,an,and,any,are,aren't,as,at,be,because,been,before,being,below,between,both,but,by,can't,cannot,could,couldn't,did,didn't,do,does,doesn't,doing,don't,down,during,each,few,for,from,further,had,hadn't,has,hasn't,have,haven't,having,he,he'd,he'll,he's,her,here,here's,hers,herself,him,himself,his,how,how's,i,i'd,i'll,i'm,i've,if,in,into,is,isn't,it,it's,its,itself,let's,me,more,most,mustn't,my,myself,no,nor,not,of,off,on,once,only,or,other,ought,our,ours,ourselves,out,over,own,same,shan't,she,she'd,she'll,she's,should,shouldn't,so,some,such,than,that,that's,the,their,theirs,them,themselves,then,there,there's,these,they,they'd,they'll,they're,they've,this,those,through,to,too,under,until,up,very,was,wasn't,we,we'd,we'll,we're,we've,were,weren't,what,what's,when,when's,where,where's,which,while,who,who's,whom,why,why's,with,won't,would,wouldn't,you,you'd,you'll,you're,you've,your,yours,yourself,yourselves", 'wordpress-seo' ) );
|
||||
$stopwords = explode( ',', __( "a,about,above,after,again,against,all,am,an,and,any,are,as,at,be,because,been,before,being,below,between,both,but,by,could,did,do,does,doing,down,during,each,few,for,from,further,had,has,have,having,he,he'd,he'll,he's,her,here,here's,hers,herself,him,himself,his,how,how's,i,i'd,i'll,i'm,i've,if,in,into,is,it,it's,its,itself,let's,me,more,most,my,myself,nor,of,on,once,only,or,other,ought,our,ours,ourselves,out,over,own,same,she,she'd,she'll,she's,should,so,some,such,than,that,that's,the,their,theirs,them,themselves,then,there,there's,these,they,they'd,they'll,they're,they've,this,those,through,to,too,under,until,up,very,was,we,we'd,we'll,we're,we've,were,what,what's,when,when's,where,where's,which,while,who,who's,whom,why,why's,with,would,you,you'd,you'll,you're,you've,your,yours,yourself,yourselves", 'wordpress-seo' ) );
|
||||
|
||||
/**
|
||||
* Allows filtering of the stop words list
|
||||
|
||||
@@ -35,58 +35,47 @@ if ( ! class_exists( 'WPSEO_Bulk_Description_List_Table' ) ) {
|
||||
'ajax' => true,
|
||||
);
|
||||
|
||||
/**
|
||||
* The field in the database where meta field is saved.
|
||||
* @var string
|
||||
*/
|
||||
protected $target_db_field = 'metadesc';
|
||||
|
||||
/**
|
||||
* The columns shown on the table
|
||||
*
|
||||
* @return array
|
||||
*/
|
||||
function get_columns() {
|
||||
return $columns = array(
|
||||
'col_page_title' => __( 'WP Page Title', 'wordpress-seo' ),
|
||||
'col_post_type' => __( 'Post Type', 'wordpress-seo' ),
|
||||
'col_post_status' => __( 'Post Status', 'wordpress-seo' ),
|
||||
'col_post_date' => __( 'Publication date', 'wordpress-seo' ),
|
||||
'col_page_slug' => __( 'Page URL/Slug', 'wordpress-seo' ),
|
||||
public function get_columns() {
|
||||
$columns = array(
|
||||
'col_existing_yoast_seo_metadesc' => __( 'Existing Yoast Meta Description', 'wordpress-seo' ),
|
||||
'col_new_yoast_seo_metadesc' => __( 'New Yoast Meta Description', 'wordpress-seo' ),
|
||||
'col_row_action' => __( 'Action', 'wordpress-seo' ),
|
||||
);
|
||||
|
||||
return $this->merge_columns( $columns );
|
||||
}
|
||||
|
||||
/**
|
||||
* Method for setting the meta data, which belongs to the records that will be shown on the current page
|
||||
* Parse the metadescription
|
||||
*
|
||||
* This method will loop through the current items ($this->items) for getting the post_id. With this data
|
||||
* ($needed_ids) the method will query the meta-data table for getting the metadescription.
|
||||
* @param string $column_name
|
||||
* @param object $record
|
||||
* @param string $attributes
|
||||
*
|
||||
* @return string
|
||||
*/
|
||||
function get_meta_data() {
|
||||
protected function parse_page_specific_column( $column_name, $record, $attributes ) {
|
||||
switch ( $column_name ) {
|
||||
case 'col_new_yoast_seo_metadesc' :
|
||||
return sprintf( '<textarea id="%1$s" name="%1$s" class="wpseo-new-metadesc" data-id="%2$s"></textarea>', 'wpseo-new-metadesc-' . $record->ID, $record->ID );
|
||||
break;
|
||||
|
||||
global $wpdb;
|
||||
|
||||
$needed_ids = array();
|
||||
foreach ( $this->items AS $item ) {
|
||||
$needed_ids[] = $item->ID;
|
||||
case 'col_existing_yoast_seo_metadesc':
|
||||
echo $this->parse_meta_data_field( $record->ID, $attributes );
|
||||
break;
|
||||
}
|
||||
|
||||
$post_ids = "'" . implode( "', '", $needed_ids ) . "'";
|
||||
$meta_data = $wpdb->get_results(
|
||||
"
|
||||
SELECT *
|
||||
FROM {$wpdb->postmeta}
|
||||
WHERE post_id IN({$post_ids}) && meta_key = '" . WPSEO_Meta::$meta_prefix . "metadesc'
|
||||
"
|
||||
);
|
||||
|
||||
foreach ( $meta_data AS $row ) {
|
||||
$this->meta_data[$row->post_id][$row->meta_key] = $row->meta_value;
|
||||
}
|
||||
|
||||
// Little housekeeping
|
||||
unset( $needed_ids, $post_ids, $meta_data );
|
||||
|
||||
}
|
||||
|
||||
|
||||
} /* End of class */
|
||||
} /* End of class-exists wrapper */
|
||||
@@ -89,6 +89,8 @@ if ( ! class_exists( 'WPSEO_Bulk_List_Table' ) ) {
|
||||
*/
|
||||
protected $settings;
|
||||
|
||||
protected $pagination = array();
|
||||
|
||||
/**
|
||||
* Class constructor
|
||||
*/
|
||||
@@ -109,6 +111,14 @@ if ( ! class_exists( 'WPSEO_Bulk_List_Table' ) ) {
|
||||
|
||||
}
|
||||
|
||||
public function show_page() {
|
||||
$this->prepare_page_navigation();
|
||||
$this->prepare_items();
|
||||
|
||||
$this->views();
|
||||
$this->display();
|
||||
}
|
||||
|
||||
/**
|
||||
* Used in the constructor to build a reference list of post types the current user can edit.
|
||||
*/
|
||||
@@ -148,13 +158,13 @@ if ( ! class_exists( 'WPSEO_Bulk_List_Table' ) ) {
|
||||
?>
|
||||
<div class="tablenav <?php echo esc_attr( $which ); ?>">
|
||||
|
||||
<?php if ( 'top' === $which ) { ?>
|
||||
<?php if ('top' === $which) { ?>
|
||||
<form id="posts-filter" action="" method="get">
|
||||
<input type="hidden" name="page" value="wpseo_bulk-editor" />
|
||||
<input type="hidden" name="type" value="<?php echo $this->page_type; ?>" />
|
||||
<input type="hidden" name="orderby" value="<?php echo $_GET['orderby']; ?>" />
|
||||
<input type="hidden" name="order" value="<?php echo $_GET['order']; ?>" />
|
||||
<input type="hidden" name="post_type_filter" value="<?php echo $_GET['post_type_filter']; ?>" />
|
||||
<input type="hidden" name="type" value="<?php echo esc_attr( $this->page_type ); ?>" />
|
||||
<input type="hidden" name="orderby" value="<?php echo esc_attr( $_GET['orderby'] ); ?>" />
|
||||
<input type="hidden" name="order" value="<?php echo esc_attr( $_GET['order'] ); ?>" />
|
||||
<input type="hidden" name="post_type_filter" value="<?php echo esc_attr( $_GET['post_type_filter'] ); ?>" />
|
||||
<?php if ( ! empty( $post_status ) ) { ?>
|
||||
<input type="hidden" name="post_status" value="<?php echo esc_attr( $post_status ); ?>" />
|
||||
<?php } ?>
|
||||
@@ -166,7 +176,7 @@ if ( ! class_exists( 'WPSEO_Bulk_List_Table' ) ) {
|
||||
?>
|
||||
|
||||
<br class="clear" />
|
||||
<?php if ( 'top' === $which ) { ?>
|
||||
<?php if ('top' === $which) { ?>
|
||||
</form>
|
||||
<?php } ?>
|
||||
</div>
|
||||
@@ -384,10 +394,72 @@ if ( ! class_exists( 'WPSEO_Bulk_List_Table' ) ) {
|
||||
* Preparing the requested pagerows and setting the needed variables
|
||||
*/
|
||||
function prepare_items() {
|
||||
|
||||
$post_type_clause = $this->get_post_type_clause();
|
||||
$all_states = $this->get_all_states();
|
||||
$subquery = $this->get_base_subquery();
|
||||
|
||||
// Setting the column headers
|
||||
$this->set_column_headers();
|
||||
|
||||
// Count the total number of needed items and setting pagination given $total_items
|
||||
$total_items = $this->count_items( $subquery, $all_states, $post_type_clause );
|
||||
$this->set_pagination( $total_items );
|
||||
|
||||
// Getting items given $query
|
||||
$query = $this->parse_item_query( $subquery, $all_states, $post_type_clause );
|
||||
$this->get_items( $query );
|
||||
|
||||
// Get the metadata for the current items ($this->items)
|
||||
$this->get_meta_data();
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
* Getting the columns for first row
|
||||
*
|
||||
* @param array $columns
|
||||
*
|
||||
* @return array
|
||||
*/
|
||||
public function get_columns( ) {
|
||||
return $this->merge_columns( );
|
||||
}
|
||||
|
||||
/**
|
||||
* Setting the column headers
|
||||
*/
|
||||
protected function set_column_headers() {
|
||||
$columns = $this->get_columns();
|
||||
$hidden = array();
|
||||
$sortable = $this->get_sortable_columns();
|
||||
$this->_column_headers = array( $columns, $hidden, $sortable );
|
||||
}
|
||||
|
||||
/**
|
||||
* Counting total items
|
||||
* @return mixed
|
||||
*/
|
||||
protected function count_items( $subquery, $all_states, $post_type_clause ) {
|
||||
global $wpdb;
|
||||
$total_items = $wpdb->get_var(
|
||||
"
|
||||
SELECT COUNT(ID)
|
||||
FROM {$subquery}
|
||||
WHERE post_status IN ({$all_states}) $post_type_clause
|
||||
"
|
||||
);
|
||||
|
||||
return $total_items;
|
||||
}
|
||||
|
||||
/**
|
||||
* Getting the post_type_clause filter
|
||||
*
|
||||
* @return string
|
||||
*/
|
||||
protected function get_post_type_clause() {
|
||||
// Filter Block
|
||||
|
||||
$post_types = null;
|
||||
$post_type_clause = '';
|
||||
|
||||
@@ -396,6 +468,56 @@ if ( ! class_exists( 'WPSEO_Bulk_List_Table' ) ) {
|
||||
$post_type_clause = "AND post_type IN ('{$post_types}')";
|
||||
}
|
||||
|
||||
return $post_type_clause;
|
||||
}
|
||||
|
||||
/**
|
||||
* Setting the pagination
|
||||
*
|
||||
* Total items is the number of all visible items
|
||||
*
|
||||
* @param $total_items
|
||||
*/
|
||||
protected function set_pagination( $total_items ) {
|
||||
|
||||
// Calculate items per page
|
||||
$per_page = $this->get_items_per_page( 'wpseo_posts_per_page', 10 );
|
||||
|
||||
$paged = ! empty( $_GET['paged'] ) ? esc_sql( sanitize_text_field( $_GET['paged'] ) ) : '';
|
||||
|
||||
if ( empty( $paged ) || ! is_numeric( $paged ) || $paged <= 0 ) {
|
||||
$paged = 1;
|
||||
}
|
||||
|
||||
$this->set_pagination_args(
|
||||
array(
|
||||
'total_items' => $total_items,
|
||||
'total_pages' => ceil( $total_items / $per_page ),
|
||||
'per_page' => $per_page,
|
||||
)
|
||||
);
|
||||
|
||||
$this->pagination = array(
|
||||
'per_page' => $per_page,
|
||||
'offset' => ( $paged - 1 ) * $per_page,
|
||||
);
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
* Parse the query to get items from database
|
||||
*
|
||||
* Based on given parameters there will be parse a query which will get all the pages/posts and other post_types
|
||||
* from the database
|
||||
*
|
||||
* @param $subquery
|
||||
* @param $all_states
|
||||
* @param $post_type_clause
|
||||
*
|
||||
* @return string
|
||||
*/
|
||||
protected function parse_item_query( $subquery, $all_states, $post_type_clause ) {
|
||||
|
||||
// Order By block
|
||||
$orderby = ! empty( $_GET['orderby'] ) ? esc_sql( sanitize_text_field( $_GET['orderby'] ) ) : 'post_title';
|
||||
$order = 'ASC';
|
||||
@@ -404,6 +526,41 @@ if ( ! class_exists( 'WPSEO_Bulk_List_Table' ) ) {
|
||||
$order = esc_sql( strtoupper( sanitize_text_field( $_GET['order'] ) ) );
|
||||
}
|
||||
|
||||
// Get all needed results
|
||||
$query = "
|
||||
SELECT ID, post_title, post_type, post_status, post_modified, post_date
|
||||
FROM {$subquery}
|
||||
WHERE post_status IN ({$all_states}) $post_type_clause
|
||||
ORDER BY {$orderby} {$order}
|
||||
LIMIT %d,%d
|
||||
";
|
||||
|
||||
return $query;
|
||||
}
|
||||
|
||||
/**
|
||||
* Getting all the items
|
||||
*
|
||||
* @param string $query
|
||||
*/
|
||||
protected function get_items( $query ) {
|
||||
global $wpdb;
|
||||
|
||||
$this->items = $wpdb->get_results(
|
||||
$wpdb->prepare(
|
||||
$query,
|
||||
$this->pagination['offset'],
|
||||
$this->pagination['per_page']
|
||||
)
|
||||
);
|
||||
}
|
||||
|
||||
/**
|
||||
* Getting all the states
|
||||
*
|
||||
* @return string
|
||||
*/
|
||||
protected function get_all_states() {
|
||||
$states = get_post_stati( array( 'show_in_admin_all_list' => true ) );
|
||||
$states['trash'] = 'trash';
|
||||
|
||||
@@ -417,64 +574,10 @@ if ( ! class_exists( 'WPSEO_Bulk_List_Table' ) ) {
|
||||
$states = esc_sql( $states );
|
||||
$all_states = "'" . implode( "', '", $states ) . "'";
|
||||
|
||||
$subquery = $this->get_base_subquery();
|
||||
|
||||
// Count the total number of needed items
|
||||
$total_items = $wpdb->get_var(
|
||||
"
|
||||
SELECT COUNT(ID)
|
||||
FROM {$subquery}
|
||||
WHERE post_status IN ({$all_states}) $post_type_clause
|
||||
"
|
||||
);
|
||||
|
||||
// Get all needed results
|
||||
$query = "
|
||||
SELECT ID, post_title, post_type, post_status, post_modified, post_date
|
||||
FROM {$subquery}
|
||||
WHERE post_status IN ({$all_states}) $post_type_clause
|
||||
ORDER BY {$orderby} {$order}
|
||||
LIMIT %d,%d
|
||||
";
|
||||
|
||||
$per_page = $this->get_items_per_page( 'wpseo_posts_per_page', 10 );
|
||||
|
||||
$paged = ! empty( $_GET['paged'] ) ? esc_sql( sanitize_text_field( $_GET['paged'] ) ) : '';
|
||||
|
||||
if ( empty( $paged ) || ! is_numeric( $paged ) || $paged <= 0 ) {
|
||||
$paged = 1;
|
||||
}
|
||||
|
||||
$total_pages = ceil( $total_items / $per_page );
|
||||
|
||||
$offset = ( $paged - 1 ) * $per_page;
|
||||
|
||||
$this->set_pagination_args(
|
||||
array(
|
||||
'total_items' => $total_items,
|
||||
'total_pages' => $total_pages,
|
||||
'per_page' => $per_page,
|
||||
)
|
||||
);
|
||||
|
||||
$columns = $this->get_columns();
|
||||
$hidden = array();
|
||||
$sortable = $this->get_sortable_columns();
|
||||
$this->_column_headers = array( $columns, $hidden, $sortable );
|
||||
|
||||
$this->items = $wpdb->get_results(
|
||||
$wpdb->prepare(
|
||||
$query,
|
||||
$offset,
|
||||
$per_page
|
||||
)
|
||||
);
|
||||
|
||||
// Get the metadata for the current items ($this->items)
|
||||
$this->get_meta_data();
|
||||
|
||||
return $all_states;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Based on $this->items and the defined columns, the table rows will be displayed.
|
||||
*
|
||||
@@ -485,101 +588,24 @@ if ( ! class_exists( 'WPSEO_Bulk_List_Table' ) ) {
|
||||
|
||||
list( $columns, $hidden ) = $this->get_column_info();
|
||||
|
||||
|
||||
$date_format = get_option( 'date_format' );
|
||||
|
||||
if ( ( is_array( $records ) && $records !== array() ) && ( is_array( $columns ) && $columns !== array() ) ) {
|
||||
foreach ( $records as $rec ) {
|
||||
|
||||
// Fill meta data if exists in $this->meta_data
|
||||
$meta_data = ( ! empty( $this->meta_data[$rec->ID] ) ) ? $this->meta_data[$rec->ID] : array();
|
||||
foreach ( $records as $rec ) {
|
||||
|
||||
echo '<tr id="record_' . $rec->ID . '">';
|
||||
|
||||
foreach ( $columns as $column_name => $column_display_name ) {
|
||||
|
||||
$class = sprintf( 'class="%1$s column-%1$s"', $column_name );
|
||||
$style = '';
|
||||
$attributes = $this->column_attributes( $column_name, $hidden );
|
||||
|
||||
if ( in_array( $column_name, $hidden ) ) {
|
||||
$style = ' style="display:none;"';
|
||||
$column_value = $this->parse_column( $column_name, $rec );
|
||||
|
||||
if ( method_exists( $this, 'parse_page_specific_column' ) && empty( $column_value ) ) {
|
||||
$column_value = $this->parse_page_specific_column( $column_name, $rec, $attributes );
|
||||
}
|
||||
|
||||
$attributes = $class . $style;
|
||||
|
||||
switch ( $column_name ) {
|
||||
case 'col_page_title':
|
||||
echo sprintf( '<td %2$s><strong>%1$s</strong>', stripslashes( $rec->post_title ), $attributes );
|
||||
|
||||
$post_type_object = get_post_type_object( $rec->post_type );
|
||||
$can_edit_post = current_user_can( $post_type_object->cap->edit_post, $rec->ID );
|
||||
|
||||
$actions = array();
|
||||
|
||||
if ( $can_edit_post && 'trash' != $rec->post_status ) {
|
||||
$actions['edit'] = '<a href="' . esc_url( get_edit_post_link( $rec->ID, true ) ) . '" title="' . esc_attr( __( 'Edit this item', 'wordpress-seo' ) ) . '">' . __( 'Edit', 'wordpress-seo' ) . '</a>';
|
||||
}
|
||||
|
||||
if ( $post_type_object->public ) {
|
||||
if ( in_array( $rec->post_status, array( 'pending', 'draft', 'future' ) ) ) {
|
||||
if ( $can_edit_post ) {
|
||||
$actions['view'] = '<a href="' . esc_url( add_query_arg( 'preview', 'true', get_permalink( $rec->ID ) ) ) . '" title="' . esc_attr( sprintf( __( 'Preview “%s”', 'wordpress-seo' ), $rec->post_title ) ) . '">' . __( 'Preview', 'wordpress-seo' ) . '</a>';
|
||||
}
|
||||
} elseif ( 'trash' != $rec->post_status ) {
|
||||
$actions['view'] = '<a href="' . esc_url( get_permalink( $rec->ID ) ) . '" title="' . esc_attr( sprintf( __( 'View “%s”', 'wordpress-seo' ), $rec->post_title ) ) . '" rel="bookmark">' . __( 'View', 'wordpress-seo' ) . '</a>';
|
||||
}
|
||||
}
|
||||
|
||||
echo $this->row_actions( $actions );
|
||||
echo '</td>';
|
||||
break;
|
||||
|
||||
case 'col_page_slug':
|
||||
$permalink = get_permalink( $rec->ID );
|
||||
$display_slug = str_replace( get_bloginfo( 'url' ), '', $permalink );
|
||||
echo sprintf( '<td %2$s><a href="%3$s" target="_blank">%1$s</a></td>', stripslashes( $display_slug ), $attributes, esc_url( $permalink ) );
|
||||
break;
|
||||
|
||||
case 'col_post_type':
|
||||
$post_type = get_post_type_object( $rec->post_type );
|
||||
echo sprintf( '<td %2$s>%1$s</td>', $post_type->labels->singular_name, $attributes );
|
||||
break;
|
||||
|
||||
case 'col_post_status':
|
||||
$post_status = get_post_status_object( $rec->post_status );
|
||||
echo sprintf( '<td %2$s>%1$s</td>', $post_status->label, $attributes );
|
||||
break;
|
||||
|
||||
case 'col_post_date':
|
||||
$cell_value = date_i18n( $date_format, strtotime( $rec->post_date ) );
|
||||
echo sprintf( '<td %2$s>%1$s</td>', $cell_value, $attributes );
|
||||
break;
|
||||
|
||||
case 'col_existing_yoast_seo_title':
|
||||
$cell_value = ( ( ! empty( $meta_data[WPSEO_Meta::$meta_prefix . 'title'] ) ) ? $meta_data[WPSEO_Meta::$meta_prefix . 'title'] : '' );
|
||||
echo sprintf( '<td %2$s id="wpseo-existing-title-%3$s">%1$s</td>', $cell_value, $attributes, $rec->ID );
|
||||
break;
|
||||
|
||||
case 'col_new_yoast_seo_title':
|
||||
$input = sprintf( '<input type="text" id="%1$s" name="%1$s" class="wpseo-new-title" data-id="%2$s" />', 'wpseo-new-title-' . $rec->ID, $rec->ID );
|
||||
echo sprintf( '<td %2$s>%1$s</td>', $input, $attributes );
|
||||
break;
|
||||
|
||||
case 'col_new_yoast_seo_metadesc' :
|
||||
$input = sprintf( '<textarea id="%1$s" name="%1$s" class="wpseo-new-metadesc" data-id="%2$s"></textarea>', 'wpseo-new-metadesc-' . $rec->ID, $rec->ID );
|
||||
echo sprintf( '<td %2$s>%1$s</td>', $input, $attributes );
|
||||
break;
|
||||
|
||||
|
||||
case 'col_existing_yoast_seo_metadesc':
|
||||
$cell_value = ( ( ! empty( $meta_data[WPSEO_Meta::$meta_prefix . 'metadesc'] ) ) ? $meta_data[WPSEO_Meta::$meta_prefix . 'metadesc'] : '' );
|
||||
echo sprintf( '<td %2$s id="wpseo-existing-metadesc-%3$s">%1$s</td>', $cell_value, $attributes, $rec->ID );
|
||||
break;
|
||||
|
||||
case 'col_row_action':
|
||||
$actions = sprintf( '<a href="#" class="wpseo-save" data-id="%1$s">Save</a> | <a href="#" class="wpseo-save-all">Save All</a>', $rec->ID );
|
||||
echo sprintf( '<td %2$s>%1$s</td>', $actions, $attributes );
|
||||
break;
|
||||
if ( ! empty( $column_value ) ) {
|
||||
echo sprintf( '<td %2$s>%1$s</td>', $column_value, $attributes );
|
||||
}
|
||||
}
|
||||
|
||||
@@ -587,5 +613,233 @@ if ( ! class_exists( 'WPSEO_Bulk_List_Table' ) ) {
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Getting the attributes for each table cell
|
||||
*
|
||||
* @param string $column_name
|
||||
* @param string $hidden
|
||||
*
|
||||
* @return string
|
||||
*/
|
||||
protected function column_attributes( $column_name, $hidden ) {
|
||||
|
||||
$class = sprintf( 'class="%1$s column-%1$s"', $column_name );
|
||||
$style = '';
|
||||
|
||||
if ( in_array( $column_name, $hidden ) ) {
|
||||
$style = ' style="display:none;"';
|
||||
}
|
||||
|
||||
$attributes = $class . $style;
|
||||
|
||||
return $attributes;
|
||||
}
|
||||
|
||||
/**
|
||||
* Parsing the title
|
||||
* @param object $rec
|
||||
*
|
||||
* @return string
|
||||
*/
|
||||
protected function parse_page_title_column( $rec ) {
|
||||
|
||||
$return = sprintf( '<strong>%1$s</strong>', stripslashes( wp_strip_all_tags( $rec->post_title ) ) );
|
||||
|
||||
$post_type_object = get_post_type_object( $rec->post_type );
|
||||
$can_edit_post = current_user_can( $post_type_object->cap->edit_post, $rec->ID );
|
||||
|
||||
$actions = array();
|
||||
|
||||
if ( $can_edit_post && 'trash' != $rec->post_status ) {
|
||||
$actions['edit'] = '<a href="' . esc_url( get_edit_post_link( $rec->ID, true ) ) . '" title="' . esc_attr( __( 'Edit this item', 'wordpress-seo' ) ) . '">' . __( 'Edit', 'wordpress-seo' ) . '</a>';
|
||||
}
|
||||
|
||||
if ( $post_type_object->public ) {
|
||||
if ( in_array( $rec->post_status, array( 'pending', 'draft', 'future' ) ) ) {
|
||||
if ( $can_edit_post ) {
|
||||
$actions['view'] = '<a href="' . esc_url( add_query_arg( 'preview', 'true', get_permalink( $rec->ID ) ) ) . '" title="' . esc_attr( sprintf( __( 'Preview “%s”', 'wordpress-seo' ), $rec->post_title ) ) . '">' . __( 'Preview', 'wordpress-seo' ) . '</a>';
|
||||
}
|
||||
} elseif ( 'trash' != $rec->post_status ) {
|
||||
$actions['view'] = '<a href="' . esc_url( get_permalink( $rec->ID ) ) . '" title="' . esc_attr( sprintf( __( 'View “%s”', 'wordpress-seo' ), $rec->post_title ) ) . '" rel="bookmark">' . __( 'View', 'wordpress-seo' ) . '</a>';
|
||||
}
|
||||
}
|
||||
|
||||
$return .= $this->row_actions( $actions );
|
||||
|
||||
return $return;
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
* Parsing the column based on the $column_name
|
||||
*
|
||||
* @param string $column_name
|
||||
* @param stdobject $rec
|
||||
*
|
||||
* @return string
|
||||
*/
|
||||
protected function parse_column( $column_name, $rec ) {
|
||||
|
||||
static $date_format;
|
||||
|
||||
if ( $date_format == null ) {
|
||||
$date_format = get_option( 'date_format' );
|
||||
}
|
||||
|
||||
switch ( $column_name ) {
|
||||
case 'col_page_title':
|
||||
$column_value = $this->parse_page_title_column( $rec );
|
||||
|
||||
break;
|
||||
|
||||
case 'col_page_slug':
|
||||
$permalink = get_permalink( $rec->ID );
|
||||
$display_slug = str_replace( get_bloginfo( 'url' ), '', $permalink );
|
||||
$column_value = sprintf( '<a href="%2$s" target="_blank">%1$s</a>', stripslashes( $display_slug ), esc_url( $permalink ) );
|
||||
break;
|
||||
|
||||
case 'col_post_type':
|
||||
$post_type = get_post_type_object( $rec->post_type );
|
||||
$column_value = $post_type->labels->singular_name;
|
||||
break;
|
||||
|
||||
case 'col_post_status':
|
||||
$post_status = get_post_status_object( $rec->post_status );
|
||||
$column_value = $post_status->label;
|
||||
break;
|
||||
|
||||
case 'col_post_date':
|
||||
$column_value = date_i18n( $date_format, strtotime( $rec->post_date ) );
|
||||
break;
|
||||
|
||||
case 'col_row_action':
|
||||
$column_value = sprintf( '<a href="#" class="wpseo-save" data-id="%1$s">Save</a> | <a href="#" class="wpseo-save-all">Save All</a>', $rec->ID );
|
||||
break;
|
||||
}
|
||||
|
||||
if ( ! empty( $column_value ) ) {
|
||||
return $column_value;
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Parse the field where the existing meta-data value is displayed
|
||||
*
|
||||
* @param integer $record_id
|
||||
* @param string $attributes
|
||||
* @param bool|array $values
|
||||
*
|
||||
* @return string
|
||||
*/
|
||||
protected function parse_meta_data_field( $record_id, $attributes, $values = false ) {
|
||||
|
||||
// Fill meta data if exists in $this->meta_data
|
||||
$meta_data = ( ! empty( $this->meta_data[$record_id] ) ) ? $this->meta_data[$record_id] : array();
|
||||
$meta_key = WPSEO_Meta::$meta_prefix . $this->target_db_field;
|
||||
$meta_value = ( ! empty( $meta_data[$meta_key] ) ) ? $meta_data[$meta_key] : '';
|
||||
|
||||
if ( ! empty( $values ) ) {
|
||||
$meta_value = $values[$meta_value];
|
||||
}
|
||||
|
||||
return sprintf( '<td %2$s id="wpseo-existing-%4$s-%3$s">%1$s</td>', $meta_value, $attributes, $record_id, $this->target_db_field );
|
||||
}
|
||||
|
||||
/**
|
||||
* Method for setting the meta data, which belongs to the records that will be shown on the current page
|
||||
*
|
||||
* This method will loop through the current items ($this->items) for getting the post_id. With this data
|
||||
* ($needed_ids) the method will query the meta-data table for getting the title.
|
||||
*
|
||||
*/
|
||||
protected function get_meta_data() {
|
||||
|
||||
$post_ids = $this->get_post_ids();
|
||||
$meta_data = $this->get_meta_data_result( $post_ids );
|
||||
|
||||
$this->parse_meta_data( $meta_data );
|
||||
|
||||
// Little housekeeping
|
||||
unset( $post_ids, $meta_data );
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
* Getting all post_ids from to $this->items
|
||||
*
|
||||
* @return string
|
||||
*/
|
||||
protected function get_post_ids() {
|
||||
$needed_ids = array();
|
||||
foreach ( $this->items AS $item ) {
|
||||
$needed_ids[] = $item->ID;
|
||||
}
|
||||
|
||||
$post_ids = "'" . implode( "', '", $needed_ids ) . "'";
|
||||
|
||||
return $post_ids;
|
||||
}
|
||||
|
||||
/**
|
||||
* Getting the meta_data from database
|
||||
*
|
||||
* @param string $post_ids
|
||||
* @param string $target_field
|
||||
*
|
||||
* @return mixed
|
||||
*/
|
||||
protected function get_meta_data_result( $post_ids ) {
|
||||
global $wpdb;
|
||||
|
||||
$meta_data = $wpdb->get_results(
|
||||
"
|
||||
SELECT *
|
||||
FROM {$wpdb->postmeta}
|
||||
WHERE post_id IN({$post_ids}) && meta_key = '" . WPSEO_Meta::$meta_prefix . $this->target_db_field . "'
|
||||
"
|
||||
);
|
||||
|
||||
return $meta_data;
|
||||
}
|
||||
|
||||
/**
|
||||
* Setting $this->meta_data
|
||||
*
|
||||
* @param array $meta_data
|
||||
*/
|
||||
protected function parse_meta_data( $meta_data ) {
|
||||
|
||||
foreach ( $meta_data AS $row ) {
|
||||
$this->meta_data[$row->post_id][$row->meta_key] = $row->meta_value;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
* This method will merge general array with given parameter $columns
|
||||
*
|
||||
* @param array $columns
|
||||
*
|
||||
* return array
|
||||
*/
|
||||
protected function merge_columns( $columns = array() ) {
|
||||
$columns = array_merge(
|
||||
array(
|
||||
'col_page_title' => __( 'WP Page Title', 'wordpress-seo' ),
|
||||
'col_post_type' => __( 'Post Type', 'wordpress-seo' ),
|
||||
'col_post_status' => __( 'Post Status', 'wordpress-seo' ),
|
||||
'col_post_date' => __( 'Publication date', 'wordpress-seo' ),
|
||||
'col_page_slug' => __( 'Page URL/Slug', 'wordpress-seo' ),
|
||||
),
|
||||
$columns
|
||||
);
|
||||
|
||||
$columns['col_row_action'] = __( 'Action', 'wordpress-seo' );
|
||||
|
||||
return $columns;
|
||||
|
||||
}
|
||||
|
||||
} /* End of class */
|
||||
} /* End of class-exists wrapper */
|
||||
@@ -35,58 +35,54 @@ if ( ! class_exists( 'WPSEO_Bulk_Title_Editor_List_Table' ) ) {
|
||||
'ajax' => true,
|
||||
);
|
||||
|
||||
/**
|
||||
* The field in the database where meta field is saved.
|
||||
* @var string
|
||||
*/
|
||||
protected $target_db_field = 'title';
|
||||
|
||||
/**
|
||||
* The columns shown on the table
|
||||
*
|
||||
* @return array
|
||||
*/
|
||||
function get_columns() {
|
||||
return $columns = array(
|
||||
'col_page_title' => __( 'WP Page Title', 'wordpress-seo' ),
|
||||
'col_post_type' => __( 'Post Type', 'wordpress-seo' ),
|
||||
'col_post_status' => __( 'Post Status', 'wordpress-seo' ),
|
||||
'col_post_date' => __( 'Publication date', 'wordpress-seo' ),
|
||||
'col_page_slug' => __( 'Page URL/Slug', 'wordpress-seo' ),
|
||||
public function get_columns() {
|
||||
|
||||
$columns = array(
|
||||
'col_existing_yoast_seo_title' => __( 'Existing Yoast SEO Title', 'wordpress-seo' ),
|
||||
'col_new_yoast_seo_title' => __( 'New Yoast SEO Title', 'wordpress-seo' ),
|
||||
'col_row_action' => __( 'Action', 'wordpress-seo' ),
|
||||
);
|
||||
|
||||
return $this->merge_columns($columns);
|
||||
}
|
||||
|
||||
/**
|
||||
* Method for setting the meta data, which belongs to the records that will be shown on the current page
|
||||
* Parse the title columns
|
||||
*
|
||||
* This method will loop through the current items ($this->items) for getting the post_id. With this data
|
||||
* ($needed_ids) the method will query the meta-data table for getting the title.
|
||||
* @param string $column_name
|
||||
* @param object $record
|
||||
* @param string $attributes
|
||||
*
|
||||
* @return string
|
||||
*/
|
||||
function get_meta_data() {
|
||||
protected function parse_page_specific_column( $column_name, $record, $attributes ) {
|
||||
|
||||
global $wpdb;
|
||||
// Fill meta data if exists in $this->meta_data
|
||||
$meta_data = ( ! empty( $this->meta_data[$record->ID] ) ) ? $this->meta_data[$record->ID] : array();
|
||||
|
||||
$needed_ids = array();
|
||||
foreach ( $this->items AS $item ) {
|
||||
$needed_ids[] = $item->ID;
|
||||
switch ( $column_name ) {
|
||||
case 'col_existing_yoast_seo_title':
|
||||
echo $this->parse_meta_data_field( $record->ID, $attributes );
|
||||
break;
|
||||
|
||||
case 'col_new_yoast_seo_title':
|
||||
return sprintf( '<input type="text" id="%1$s" name="%1$s" class="wpseo-new-title" data-id="%2$s" />', 'wpseo-new-title-' . $record->ID, $record->ID );
|
||||
break;
|
||||
}
|
||||
|
||||
$post_ids = "'" . implode( "', '", $needed_ids ) . "'";
|
||||
$meta_data = $wpdb->get_results(
|
||||
"
|
||||
SELECT *
|
||||
FROM {$wpdb->postmeta}
|
||||
WHERE post_id IN({$post_ids}) && meta_key = '" . WPSEO_Meta::$meta_prefix . "title'
|
||||
"
|
||||
);
|
||||
|
||||
foreach ( $meta_data AS $row ) {
|
||||
$this->meta_data[$row->post_id][$row->meta_key] = $row->meta_value;
|
||||
}
|
||||
|
||||
|
||||
// Little housekeeping
|
||||
unset( $needed_ids, $post_ids, $meta_data );
|
||||
|
||||
unset( $meta_data );
|
||||
}
|
||||
|
||||
|
||||
} /* End of class */
|
||||
} /* End of class-exists wrapper */
|
||||
@@ -201,6 +201,8 @@ if ( ! class_exists( 'WPSEO_Admin_Pages' ) ) {
|
||||
</form>';
|
||||
}
|
||||
|
||||
do_action( 'wpseo_admin_footer' );
|
||||
|
||||
echo '
|
||||
</div><!-- end of div meta-box-sortables -->
|
||||
</div><!-- end of div metabox-holder -->
|
||||
|
||||
@@ -27,7 +27,7 @@ if ( ! class_exists( 'WPSEO_Metabox' ) ) {
|
||||
/**
|
||||
* Class constructor
|
||||
*/
|
||||
function __construct() {
|
||||
public function __construct() {
|
||||
add_action( 'add_meta_boxes', array( $this, 'add_meta_box' ) );
|
||||
add_action( 'admin_enqueue_scripts', array( $this, 'enqueue' ) );
|
||||
add_action( 'wp_insert_post', array( $this, 'save_postdata' ) );
|
||||
@@ -53,13 +53,13 @@ if ( ! class_exists( 'WPSEO_Metabox' ) ) {
|
||||
|
||||
self::$meta_fields['general']['title']['title'] = __( 'SEO Title', 'wordpress-seo' );
|
||||
self::$meta_fields['general']['title']['description'] = '<p id="yoast_wpseo_title-length-warning">' . '<span class="wrong">' . __( 'Warning:', 'wordpress-seo' ) . '</span> ' . __( 'Title display in Google is limited to a fixed width, yours is too long.', 'wordpress-seo' ) . '</p>';
|
||||
self::$meta_fields['general']['title']['help'] = __( 'The SEO Title defaults to what is generated based on this sites title template for this posttype.', 'wordpress-seo' );
|
||||
self::$meta_fields['general']['title']['help'] = __( 'The SEO title defaults to what is generated based on this sites title template for this posttype.', 'wordpress-seo' );
|
||||
|
||||
self::$meta_fields['general']['metadesc']['title'] = __( 'Meta Description', 'wordpress-seo' );
|
||||
self::$meta_fields['general']['metadesc']['title'] = __( 'Meta description', 'wordpress-seo' );
|
||||
self::$meta_fields['general']['metadesc']['description'] = sprintf( __( 'The <code>meta</code> description will be limited to %s chars%s, %s chars left.', 'wordpress-seo' ), self::$meta_length, self::$meta_length_reason, '<span id="yoast_wpseo_metadesc-length"></span>' ) . ' <div id="yoast_wpseo_metadesc_notice"></div>';
|
||||
self::$meta_fields['general']['metadesc']['help'] = sprintf( __( 'The meta description is often shown as the black text under the title in a search result. For this to work it has to contain the keyword that was searched for.<br/><br/>Read %sthis post%s for more info.', 'wordpress-seo' ), '<a href="https://yoast.com/snippet-preview/#utm_source=wordpress-seo-metabox&utm_medium=inline-help&utm_campaign=focus-keyword">', '</a>' );
|
||||
|
||||
self::$meta_fields['general']['metakeywords']['title'] = __( 'Meta Keywords', 'wordpress-seo' );
|
||||
self::$meta_fields['general']['metakeywords']['title'] = __( 'Meta keywords', 'wordpress-seo' );
|
||||
self::$meta_fields['general']['metakeywords']['description'] = __( 'If you type something above it will override your %smeta keywords template%s.', 'wordpress-seo' );
|
||||
|
||||
|
||||
@@ -85,7 +85,7 @@ if ( ! class_exists( 'WPSEO_Metabox' ) ) {
|
||||
self::$meta_fields['advanced']['meta-robots-adv']['options']['noarchive'] = __( 'No Archive', 'wordpress-seo' );
|
||||
self::$meta_fields['advanced']['meta-robots-adv']['options']['nosnippet'] = __( 'No Snippet', 'wordpress-seo' );
|
||||
|
||||
self::$meta_fields['advanced']['bctitle']['title'] = __( 'Breadcrumbs title', 'wordpress-seo' );
|
||||
self::$meta_fields['advanced']['bctitle']['title'] = __( 'Breadcrumbs Title', 'wordpress-seo' );
|
||||
self::$meta_fields['advanced']['bctitle']['description'] = __( 'Title to use for this page in breadcrumb paths', 'wordpress-seo' );
|
||||
|
||||
self::$meta_fields['advanced']['sitemap-include']['title'] = __( 'Include in Sitemap', 'wordpress-seo' );
|
||||
@@ -103,18 +103,6 @@ if ( ! class_exists( 'WPSEO_Metabox' ) ) {
|
||||
self::$meta_fields['advanced']['sitemap-prio']['options']['0.5'] .= __( 'Medium priority', 'wordpress-seo' );
|
||||
self::$meta_fields['advanced']['sitemap-prio']['options']['0.1'] .= __( 'Lowest priority', 'wordpress-seo' );
|
||||
|
||||
self::$meta_fields['advanced']['sitemap-html-include']['title'] = __( 'Include in HTML Sitemap', 'wordpress-seo' );
|
||||
self::$meta_fields['advanced']['sitemap-html-include']['description'] = __( 'Should this page be in the HTML Sitemap at all times, regardless of Robots Meta settings?', 'wordpress-seo' );
|
||||
self::$meta_fields['advanced']['sitemap-html-include']['options']['-'] = __( 'Auto detect', 'wordpress-seo' );
|
||||
self::$meta_fields['advanced']['sitemap-html-include']['options']['always'] = __( 'Always include', 'wordpress-seo' );
|
||||
self::$meta_fields['advanced']['sitemap-html-include']['options']['never'] = __( 'Never include', 'wordpress-seo' );
|
||||
|
||||
self::$meta_fields['advanced']['authorship']['title'] = __( 'Authorship', 'wordpress-seo' );
|
||||
self::$meta_fields['advanced']['authorship']['description'] = __( 'Show <code>rel="author"</code> on this page?', 'wordpress-seo' );
|
||||
self::$meta_fields['advanced']['authorship']['options']['-'] = __( 'Default for post type, currently: %s', 'wordpress-seo' );
|
||||
self::$meta_fields['advanced']['authorship']['options']['always'] = __( 'Always show', 'wordpress-seo' );
|
||||
self::$meta_fields['advanced']['authorship']['options']['never'] = __( 'Never show', 'wordpress-seo' );
|
||||
|
||||
self::$meta_fields['advanced']['canonical']['title'] = __( 'Canonical URL', 'wordpress-seo' );
|
||||
self::$meta_fields['advanced']['canonical']['description'] = sprintf( __( 'The canonical URL that this page should point to, leave empty to default to permalink. %sCross domain canonical%s supported too.', 'wordpress-seo' ), '<a target="_blank" href="http://googlewebmastercentral.blogspot.com/2009/12/handling-legitimate-cross-domain.html">', '</a>' );
|
||||
|
||||
@@ -198,6 +186,22 @@ if ( ! class_exists( 'WPSEO_Metabox' ) ) {
|
||||
return $this->statistics;
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns post in metabox context
|
||||
*
|
||||
* @returns WP_Post
|
||||
*/
|
||||
private function get_metabox_post() {
|
||||
if ( isset( $_GET['post'] ) ) {
|
||||
$post_id = (int) WPSEO_Option::validate_int( $_GET['post'] );
|
||||
$post = get_post( $post_id );
|
||||
} else {
|
||||
global $post;
|
||||
}
|
||||
|
||||
return $post;
|
||||
}
|
||||
|
||||
/**
|
||||
* Lowercase a sentence while preserving "weird" characters.
|
||||
*
|
||||
@@ -241,17 +245,13 @@ if ( ! class_exists( 'WPSEO_Metabox' ) ) {
|
||||
|
||||
echo '<div class="misc-pub-section misc-yoast misc-pub-section-last">';
|
||||
|
||||
if ( self::get_value( 'meta-robots-noindex' ) === '1' ) {
|
||||
$post = $this->get_metabox_post();
|
||||
|
||||
if ( self::get_value( 'meta-robots-noindex', $post->ID ) === '1' ) {
|
||||
$score_label = 'noindex';
|
||||
$title = __( 'Post is set to noindex.', 'wordpress-seo' );
|
||||
$score_title = $title;
|
||||
} else {
|
||||
if ( isset( $_GET['post'] ) ) {
|
||||
$post_id = (int) WPSEO_Option::validate_int( $_GET['post'] );
|
||||
$post = get_post( $post_id );
|
||||
} else {
|
||||
global $post;
|
||||
}
|
||||
|
||||
$score = '';
|
||||
$results = $this->calculate_results( $post );
|
||||
@@ -306,12 +306,7 @@ if ( ! class_exists( 'WPSEO_Metabox' ) ) {
|
||||
* @return array
|
||||
*/
|
||||
public function localize_script() {
|
||||
if ( isset( $_GET['post'] ) ) {
|
||||
$post_id = (int) WPSEO_Option::validate_int( $_GET['post'] );
|
||||
$post = get_post( $post_id );
|
||||
} else {
|
||||
global $post;
|
||||
}
|
||||
$post = $this->get_metabox_post();
|
||||
|
||||
if ( ( ! is_object( $post ) || ! isset( $post->post_type ) ) || $this->is_metabox_hidden( $post->post_type ) === true ) {
|
||||
return array();
|
||||
@@ -371,7 +366,7 @@ if ( ! class_exists( 'WPSEO_Metabox' ) ) {
|
||||
|
||||
return array_merge( $cached_replacement_vars, array(
|
||||
'field_prefix' => self::$form_prefix,
|
||||
'keyword_header' => __( 'Your focus keyword was found in:', 'wordpress-seo' ),
|
||||
'keyword_header' => '<strong>' . __( 'Focus keyword usage', 'wordpress-seo' ) . '</strong><br>' . __( 'Your focus keyword was found in:', 'wordpress-seo' ),
|
||||
'article_header_text' => __( 'Article Heading: ', 'wordpress-seo' ),
|
||||
'page_title_text' => __( 'Page title: ', 'wordpress-seo' ),
|
||||
'page_url_text' => __( 'Page URL: ', 'wordpress-seo' ),
|
||||
@@ -384,7 +379,7 @@ if ( ! class_exists( 'WPSEO_Metabox' ) ) {
|
||||
'wpseo_permalink_template' => $sample_permalink,
|
||||
'wpseo_keyword_suggest_nonce' => wp_create_nonce( 'wpseo-get-suggest' ),
|
||||
'wpseo_replace_vars_nonce' => wp_create_nonce( 'wpseo-replace-vars' ),
|
||||
'no_parent_text' => __( '(no parent)' ),
|
||||
'no_parent_text' => __( '(no parent)', 'wordpress-seo' ),
|
||||
) );
|
||||
}
|
||||
|
||||
@@ -410,13 +405,7 @@ if ( ! class_exists( 'WPSEO_Metabox' ) ) {
|
||||
* Output the meta box
|
||||
*/
|
||||
function meta_box() {
|
||||
if ( isset( $_GET['post'] ) ) {
|
||||
$post_id = (int) WPSEO_Option::validate_int( $_GET['post'] );
|
||||
$post = get_post( $post_id );
|
||||
} else {
|
||||
global $post;
|
||||
}
|
||||
|
||||
$post = $this->get_metabox_post();
|
||||
$options = WPSEO_Options::get_all();
|
||||
|
||||
?>
|
||||
@@ -471,7 +460,8 @@ if ( ! class_exists( 'WPSEO_Metabox' ) ) {
|
||||
function do_meta_box( $meta_field_def, $key = '' ) {
|
||||
$content = '';
|
||||
$esc_form_key = esc_attr( self::$form_prefix . $key );
|
||||
$meta_value = self::get_value( $key );
|
||||
$post = $this->get_metabox_post();
|
||||
$meta_value = self::get_value( $key, $post->ID );
|
||||
|
||||
$class = '';
|
||||
if ( isset( $meta_field_def['class'] ) && $meta_field_def['class'] !== '' ) {
|
||||
@@ -634,45 +624,13 @@ if ( ! class_exists( 'WPSEO_Metabox' ) ) {
|
||||
* @return string
|
||||
*/
|
||||
function snippet() {
|
||||
if ( isset( $_GET['post'] ) ) {
|
||||
$post_id = (int) WPSEO_Option::validate_int( $_GET['post'] );
|
||||
$post = get_post( $post_id );
|
||||
} else {
|
||||
global $post;
|
||||
}
|
||||
$post = $this->get_metabox_post();
|
||||
$title = self::get_value( 'title', $post->ID );
|
||||
$description = self::get_value( 'metadesc', $post->ID );
|
||||
|
||||
$options = WPSEO_Options::get_all();
|
||||
$snippet_preview = new WPSEO_Snippet_Preview( $post, $title, $description );
|
||||
|
||||
$date = '';
|
||||
if ( is_object( $post ) && isset( $options[ 'showdate-' . $post->post_type ] ) && $options[ 'showdate-' . $post->post_type ] === true ) {
|
||||
$date = $this->get_post_date( $post );
|
||||
}
|
||||
|
||||
$title = self::get_value( 'title' );
|
||||
$desc = self::get_value( 'metadesc' );
|
||||
|
||||
$slug = ( is_object( $post ) && isset( $post->post_name ) ) ? $post->post_name : '';
|
||||
if ( $slug !== '' ) {
|
||||
$slug = sanitize_title( $title );
|
||||
}
|
||||
|
||||
if ( is_string( $date ) && $date !== '' ) {
|
||||
$datestr = '<span class="date">' . $date . ' - </span>';
|
||||
} else {
|
||||
$datestr = '';
|
||||
}
|
||||
$content = '<div id="wpseosnippet">
|
||||
<a class="title" id="wpseosnippet_title" href="#">' . esc_html( $title ) . '</a>';
|
||||
|
||||
$content .= '<span class="url">' . str_replace( 'http://', '', get_bloginfo( 'url' ) ) . '/' . esc_html( $slug ) . '/</span>';
|
||||
|
||||
$content .= '<p class="desc">' . $datestr . '<span class="autogen"></span><span class="content">' . esc_html( $desc ) . '</span></p>';
|
||||
|
||||
$content .= '</div>';
|
||||
|
||||
$content = apply_filters( 'wpseo_snippet', $content, $post, compact( 'title', 'desc', 'date', 'slug' ) );
|
||||
|
||||
return $content;
|
||||
return $snippet_preview->get_content();
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -701,6 +659,8 @@ if ( ! class_exists( 'WPSEO_Metabox' ) ) {
|
||||
return false;
|
||||
}
|
||||
|
||||
do_action( 'wpseo_save_compare_data', $post );
|
||||
|
||||
$meta_boxes = apply_filters( 'wpseo_save_metaboxes', array() );
|
||||
$meta_boxes = array_merge( $meta_boxes, $this->get_meta_field_defs( 'general', $post->post_type ), $this->get_meta_field_defs( 'advanced' ) );
|
||||
|
||||
@@ -727,11 +687,12 @@ if ( ! class_exists( 'WPSEO_Metabox' ) ) {
|
||||
*/
|
||||
public function enqueue() {
|
||||
global $pagenow;
|
||||
if ( ! in_array( $pagenow, array(
|
||||
/* Filter 'wpseo_always_register_metaboxes_on_admin' documented in wpseo-main.php */
|
||||
if ( ( ! in_array( $pagenow, array(
|
||||
'post-new.php',
|
||||
'post.php',
|
||||
'edit.php',
|
||||
), true ) || $this->is_metabox_hidden() === true
|
||||
), true ) && apply_filters( 'wpseo_always_register_metaboxes_on_admin', false ) === false ) || $this->is_metabox_hidden() === true
|
||||
) {
|
||||
return;
|
||||
}
|
||||
@@ -751,17 +712,18 @@ if ( ! class_exists( 'WPSEO_Metabox' ) ) {
|
||||
}
|
||||
wp_enqueue_style( 'metabox-tabs', plugins_url( 'css/metabox-tabs' . WPSEO_CSSJS_SUFFIX . '.css', WPSEO_FILE ), array(), WPSEO_VERSION );
|
||||
wp_enqueue_style( "metabox-$color", plugins_url( 'css/metabox-' . esc_attr( $color ) . WPSEO_CSSJS_SUFFIX . '.css', WPSEO_FILE ), array(), WPSEO_VERSION );
|
||||
wp_enqueue_style( "jquery-qtip.js", plugins_url( 'css/jquery.qtip' . WPSEO_CSSJS_SUFFIX . '.css', WPSEO_FILE ), array(), '2.2.1' );
|
||||
|
||||
wp_enqueue_script( 'jquery-ui-autocomplete' );
|
||||
|
||||
wp_enqueue_script( 'jquery-qtip', plugins_url( 'js/jquery.qtip.min.js', WPSEO_FILE ), array( 'jquery' ), '1.0.0-RC3', true );
|
||||
wp_enqueue_script( 'jquery-qtip', plugins_url( 'js/jquery.qtip' . WPSEO_CSSJS_SUFFIX . '.js', WPSEO_FILE ), array( 'jquery' ), '2.2.1', true );
|
||||
wp_enqueue_script( 'wp-seo-metabox', plugins_url( 'js/wp-seo-metabox' . WPSEO_CSSJS_SUFFIX . '.js', WPSEO_FILE ), array(
|
||||
'jquery',
|
||||
'jquery-ui-core',
|
||||
'jquery-ui-autocomplete',
|
||||
), WPSEO_VERSION, true );
|
||||
|
||||
wp_enqueue_script( 'wpseo-admin-media', plugins_url( 'js/wp-seo-admin-media' . WPSEO_CSSJS_SUFFIX . '.js', WPSEO_FILE ), array( 'jquery', 'jquery-ui-core' ), WPSEO_VERSION, true );
|
||||
wp_enqueue_script( 'wpseo-admin-media', plugins_url( 'js/wp-seo-admin-media' . WPSEO_CSSJS_SUFFIX . '.js', WPSEO_FILE ), array( 'jquery', 'jquery-ui-core' ), WPSEO_VERSION, true );
|
||||
wp_localize_script( 'wpseo-admin-media', 'wpseoMediaL10n', $this->localize_media_script() );
|
||||
|
||||
// Text strings to pass to metabox for keyword analysis
|
||||
@@ -825,11 +787,11 @@ if ( ! class_exists( 'WPSEO_Metabox' ) ) {
|
||||
}
|
||||
|
||||
return array_merge( $columns, array(
|
||||
'wpseo-score' => __( 'SEO', 'wordpress-seo' ),
|
||||
'wpseo-title' => __( 'SEO Title', 'wordpress-seo' ),
|
||||
'wpseo-metadesc' => __( 'Meta Desc.', 'wordpress-seo' ),
|
||||
'wpseo-focuskw' => __( 'Focus KW', 'wordpress-seo' )
|
||||
) );
|
||||
'wpseo-score' => __( 'SEO', 'wordpress-seo' ),
|
||||
'wpseo-title' => __( 'SEO Title', 'wordpress-seo' ),
|
||||
'wpseo-metadesc' => __( 'Meta Desc.', 'wordpress-seo' ),
|
||||
'wpseo-focuskw' => __( 'Focus KW', 'wordpress-seo' )
|
||||
) );
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -908,6 +870,7 @@ if ( ! class_exists( 'WPSEO_Metabox' ) ) {
|
||||
*/
|
||||
function column_sort_orderby( $vars ) {
|
||||
if ( isset( $_GET['seo_filter'] ) ) {
|
||||
$na = false;
|
||||
$noindex = false;
|
||||
$high = false;
|
||||
switch ( $_GET['seo_filter'] ) {
|
||||
@@ -916,8 +879,8 @@ if ( ! class_exists( 'WPSEO_Metabox' ) ) {
|
||||
$noindex = true;
|
||||
break;
|
||||
case 'na':
|
||||
$low = 0;
|
||||
$high = 0;
|
||||
$low = false;
|
||||
$na = true;
|
||||
break;
|
||||
case 'bad':
|
||||
$low = 1;
|
||||
@@ -971,6 +934,21 @@ if ( ! class_exists( 'WPSEO_Metabox' ) ) {
|
||||
|
||||
add_filter( 'posts_where', array( $this, 'seo_score_posts_where' ) );
|
||||
|
||||
} elseif ( $na ) {
|
||||
$vars = array_merge(
|
||||
$vars,
|
||||
array(
|
||||
'meta_query' => array(
|
||||
'relation' => 'OR',
|
||||
array(
|
||||
'key' => self::$meta_prefix . 'linkdex',
|
||||
'value' => 'needs-a-value-anyway',
|
||||
'compare' => 'NOT EXISTS',
|
||||
)
|
||||
)
|
||||
)
|
||||
);
|
||||
|
||||
} elseif ( $noindex ) {
|
||||
$vars = array_merge(
|
||||
$vars,
|
||||
@@ -1062,8 +1040,8 @@ if ( ! class_exists( 'WPSEO_Metabox' ) ) {
|
||||
} else {
|
||||
$post = get_post( $post_id );
|
||||
$options = WPSEO_Options::get_all();
|
||||
if ( is_object( $post ) && ( isset( $options[ 'title-' . $post->post_type ] ) && $options[ 'title-' . $post->post_type ] !== '' ) ) {
|
||||
$title_template = $options[ 'title-' . $post->post_type ];
|
||||
if ( is_object( $post ) && ( isset( $options['title-' . $post->post_type] ) && $options['title-' . $post->post_type] !== '' ) ) {
|
||||
$title_template = $options['title-' . $post->post_type];
|
||||
$title_template = str_replace( ' %%page%% ', ' ', $title_template );
|
||||
|
||||
return wpseo_replace_vars( $title_template, $post );
|
||||
@@ -1084,11 +1062,11 @@ if ( ! class_exists( 'WPSEO_Metabox' ) ) {
|
||||
$ret = array();
|
||||
reset( $array );
|
||||
foreach ( $array as $ii => $va ) {
|
||||
$sorter[ $ii ] = $va[ $key ];
|
||||
$sorter[$ii] = $va[$key];
|
||||
}
|
||||
asort( $sorter );
|
||||
foreach ( $sorter as $ii => $va ) {
|
||||
$ret[ $ii ] = $array[ $ii ];
|
||||
$ret[$ii] = $array[$ii];
|
||||
}
|
||||
$array = $ret;
|
||||
}
|
||||
@@ -1180,7 +1158,7 @@ if ( ! class_exists( 'WPSEO_Metabox' ) ) {
|
||||
$sampleurl = $this->get_sample_permalink( $post );
|
||||
$job['pageUrl'] = preg_replace( '`%(?:post|page)name%`', $sampleurl[1], $sampleurl[0] );
|
||||
$job['pageSlug'] = urldecode( $post->post_name );
|
||||
$job['keyword'] = self::get_value( 'focuskw' );
|
||||
$job['keyword'] = self::get_value( 'focuskw', $post->ID );
|
||||
$job['keyword_folded'] = $this->strip_separators_and_fold( $job['keyword'] );
|
||||
$job['post_id'] = $post->ID;
|
||||
$job['post_type'] = $post->post_type;
|
||||
@@ -1214,7 +1192,7 @@ if ( ! class_exists( 'WPSEO_Metabox' ) ) {
|
||||
$this->score_keyword( $job['keyword'], $results );
|
||||
|
||||
// Title
|
||||
$title = self::get_value( 'title' );
|
||||
$title = self::get_value( 'title', $post->ID );
|
||||
if ( $title !== '' ) {
|
||||
$job['title'] = $title;
|
||||
} else {
|
||||
@@ -1230,11 +1208,11 @@ if ( ! class_exists( 'WPSEO_Metabox' ) ) {
|
||||
|
||||
// Meta description
|
||||
$description = '';
|
||||
$desc_meta = self::get_value( 'metadesc' );
|
||||
$desc_meta = self::get_value( 'metadesc', $post->ID );
|
||||
if ( $desc_meta !== '' ) {
|
||||
$description = $desc_meta;
|
||||
} elseif ( isset( $options[ 'metadesc-' . $post->post_type ] ) && $options[ 'metadesc-' . $post->post_type ] !== '' ) {
|
||||
$description = wpseo_replace_vars( $options[ 'metadesc-' . $post->post_type ], $post );
|
||||
} elseif ( isset( $options['metadesc-' . $post->post_type] ) && $options['metadesc-' . $post->post_type] !== '' ) {
|
||||
$description = wpseo_replace_vars( $options['metadesc-' . $post->post_type], $post );
|
||||
}
|
||||
unset( $desc_meta );
|
||||
|
||||
@@ -1336,12 +1314,12 @@ if ( ! class_exists( 'WPSEO_Metabox' ) ) {
|
||||
* @param string $rawScore The raw score, to be used by other filters.
|
||||
*/
|
||||
function save_score_result( &$results, $scoreValue, $scoreMessage, $scoreLabel, $rawScore = null ) {
|
||||
$score = array(
|
||||
$score = array(
|
||||
'val' => $scoreValue,
|
||||
'msg' => $scoreMessage,
|
||||
'raw' => $rawScore,
|
||||
);
|
||||
$results[ $scoreLabel ] = $score;
|
||||
$results[$scoreLabel] = $score;
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -1364,7 +1342,7 @@ if ( ! class_exists( 'WPSEO_Metabox' ) ) {
|
||||
$inputString = str_replace( $keywordCharactersAlwaysReplacedBySpace, ' ', $inputString );
|
||||
|
||||
// standardise whitespace
|
||||
$inputString = preg_replace( '`\s+`u', ' ', $inputString );
|
||||
$inputString = wpseo_standardize_whitespace( $inputString );
|
||||
|
||||
// deal with the separators that can be either removed or replaced by space
|
||||
if ( $removeOptionalCharacters ) {
|
||||
@@ -1377,7 +1355,7 @@ if ( ! class_exists( 'WPSEO_Metabox' ) ) {
|
||||
}
|
||||
|
||||
// standardise whitespace again
|
||||
$inputString = preg_replace( '`\s+`u', ' ', $inputString );
|
||||
$inputString = wpseo_standardize_whitespace( $inputString );
|
||||
|
||||
return trim( $inputString );
|
||||
}
|
||||
@@ -1485,6 +1463,8 @@ if ( ! class_exists( 'WPSEO_Metabox' ) ) {
|
||||
if ( $job['title'] == '' ) {
|
||||
$this->save_score_result( $results, 1, $scoreTitleMissing, 'title' );
|
||||
} else {
|
||||
$job['title'] = wp_strip_all_tags( $job['title'] );
|
||||
|
||||
$length = $this->statistics()->text_length( $job['title'] );
|
||||
if ( $length < $scoreTitleMinLength ) {
|
||||
$this->save_score_result( $results, 6, sprintf( $scoreTitleTooShort, $length ), 'title_length' );
|
||||
@@ -1611,12 +1591,12 @@ if ( ! class_exists( 'WPSEO_Metabox' ) ) {
|
||||
if ( $dom_object->attributes->getNamedItem( 'rel' ) ) {
|
||||
$link_rel = $dom_object->attributes->getNamedItem( 'rel' )->textContent;
|
||||
if ( stripos( $link_rel, 'nofollow' ) !== false ) {
|
||||
$count[ $type ]['nofollow'] ++;
|
||||
$count[$type]['nofollow'] ++;
|
||||
} else {
|
||||
$count[ $type ]['dofollow'] ++;
|
||||
$count[$type]['dofollow'] ++;
|
||||
}
|
||||
} else {
|
||||
$count[ $type ]['dofollow'] ++;
|
||||
$count[$type]['dofollow'] ++;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1866,7 +1846,7 @@ if ( ! class_exists( 'WPSEO_Metabox' ) ) {
|
||||
// Keyword Density check
|
||||
$keywordDensity = 0;
|
||||
if ( $wordCount > 100 ) {
|
||||
$keywordCount = preg_match_all( '`\b' . preg_quote( $job['keyword'], '`' ) . '\b`miu', utf8_encode( $body ), $res );
|
||||
$keywordCount = preg_match_all( '`\b' . preg_quote( $job['keyword'], '`' ) . '\b`miu', $body, $res );
|
||||
if ( ( $keywordCount > 0 && $keywordWordCount > 0 ) && $wordCount > $keywordCount ) {
|
||||
$keywordDensity = wpseo_calc( wpseo_calc( $keywordCount, '/', wpseo_calc( $wordCount, '-', ( wpseo_calc( wpseo_calc( $keywordWordCount, '-', 1 ), '*', $keywordCount ) ) ) ), '*', 100, true, 2 );
|
||||
}
|
||||
|
||||
@@ -23,6 +23,7 @@ if ( ! class_exists( 'WPSEO_Social_Admin' ) ) {
|
||||
add_action( 'wpseo_tab_header', array( $this, 'tab_header' ), 60 );
|
||||
add_action( 'wpseo_tab_content', array( $this, 'tab_content' ) );
|
||||
add_filter( 'wpseo_save_metaboxes', array( $this, 'save_meta_boxes' ), 10, 1 );
|
||||
add_action( 'wpseo_save_compare_data', array( $this, 'og_data_compare' ), 10, 1 );
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -32,23 +33,35 @@ if ( ! class_exists( 'WPSEO_Social_Admin' ) ) {
|
||||
* the main meta box definition array in the class WPSEO_Meta() as well!!!!
|
||||
*/
|
||||
public static function translate_meta_boxes() {
|
||||
self::$meta_fields['social']['opengraph-title']['title'] = __( 'Facebook Title', 'wordpress-seo' );
|
||||
self::$meta_fields['social']['opengraph-title']['description'] = __( 'If you don\'t want to use the post title for sharing the post on Facebook but instead want another title there, write it here.', 'wordpress-seo' );
|
||||
$title_text = __( 'If you don\'t want to use the post title for sharing the post on %s but instead want another title there, write it here.', 'wordpress-seo' );
|
||||
$description_text = __( 'If you don\'t want to use the meta description for sharing the post on %s but want another description there, write it here.', 'wordpress-seo' );
|
||||
$image_text = __( 'If you want to override the image used on %s for this post, upload / choose an image or add the URL here.', 'wordpress-seo' );
|
||||
|
||||
self::$meta_fields['social']['opengraph-description']['title'] = __( 'Facebook Description', 'wordpress-seo' );
|
||||
self::$meta_fields['social']['opengraph-description']['description'] = __( 'If you don\'t want to use the meta description for sharing the post on Facebook but want another description there, write it here.', 'wordpress-seo' );
|
||||
$options = WPSEO_Options::get_all();
|
||||
|
||||
self::$meta_fields['social']['opengraph-image']['title'] = __( 'Facebook Image', 'wordpress-seo' );
|
||||
self::$meta_fields['social']['opengraph-image']['description'] = __( 'If you want to override the Facebook image for this post, upload / choose an image or add the URL here.', 'wordpress-seo' );
|
||||
foreach (
|
||||
array(
|
||||
'opengraph' => __( 'Facebook', 'wordpress-seo' ),
|
||||
'twitter' => __( 'Twitter', 'wordpress-seo' ),
|
||||
'googleplus' => __( 'Google+', 'wordpress-seo' ),
|
||||
) as $network => $label
|
||||
) {
|
||||
if ( true === $options[ $network ] ) {
|
||||
if ( 'googleplus' == $network ) {
|
||||
$network = 'google-plus'; // Yuck, I know.
|
||||
}
|
||||
|
||||
self::$meta_fields['social']['google-plus-title']['title'] = __( 'Google+ Title', 'wordpress-seo' );
|
||||
self::$meta_fields['social']['google-plus-title']['description'] = __( 'If you don\'t want to use the post title for sharing the post on Google+ but instead want another title there, write it here.', 'wordpress-seo' );
|
||||
self::$meta_fields['social'][ $network . '-title' ]['title'] = sprintf( __( '%s Title', 'wordpress-seo' ), $label );
|
||||
self::$meta_fields['social'][ $network . '-title' ]['description'] = sprintf( $title_text, $label );
|
||||
|
||||
self::$meta_fields['social']['google-plus-description']['title'] = __( 'Google+ Description', 'wordpress-seo' );
|
||||
self::$meta_fields['social']['google-plus-description']['description'] = __( 'If you don\'t want to use the meta description for sharing the post on Google+ but want another description there, write it here.', 'wordpress-seo' );
|
||||
self::$meta_fields['social'][ $network . '-description' ]['title'] = sprintf( __( '%s Description', 'wordpress-seo' ), $label );
|
||||
self::$meta_fields['social'][ $network . '-description' ]['description'] = sprintf( $description_text, $label );
|
||||
|
||||
self::$meta_fields['social'][ $network . '-image' ]['title'] = sprintf( __( '%s Image', 'wordpress-seo' ), $label );
|
||||
self::$meta_fields['social'][ $network . '-image' ]['description'] = sprintf( $image_text, $label );
|
||||
}
|
||||
}
|
||||
|
||||
self::$meta_fields['social']['google-plus-image']['title'] = __( 'Google+ Image', 'wordpress-seo' );
|
||||
self::$meta_fields['social']['google-plus-image']['description'] = __( 'If you want to override the image for this post that Google+ will use, upload / choose an image or add the URL here. Note that it will otherwise default to the Facebook one above.', 'wordpress-seo' );
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -74,12 +87,51 @@ if ( ! class_exists( 'WPSEO_Social_Admin' ) ) {
|
||||
* Filter over the meta boxes to save, this function adds the Social meta boxes.
|
||||
*
|
||||
* @param array $field_defs Array of metaboxes to save.
|
||||
*
|
||||
* @return array
|
||||
*/
|
||||
public function save_meta_boxes( $field_defs ) {
|
||||
return array_merge( $field_defs, $this->get_meta_field_defs( 'social' ) );
|
||||
}
|
||||
|
||||
/**
|
||||
* This method will compare opengraph fields with the posted values.
|
||||
*
|
||||
* When fields are changed, the facebook cache will be purge.
|
||||
*
|
||||
* @param object $post
|
||||
*/
|
||||
public function og_data_compare( $post ) {
|
||||
|
||||
// Check if post data is available, if post_id is set and if original post_status is publish
|
||||
if ( ! empty( $_POST ) && ! empty( $post->ID ) && $post->post_status == 'publish' && $_POST['original_post_status'] === 'publish' ) {
|
||||
|
||||
$fields_to_compare = array(
|
||||
'opengraph-title',
|
||||
'opengraph-description',
|
||||
'opengraph-image'
|
||||
);
|
||||
|
||||
$reset_facebook_cache = false;
|
||||
|
||||
foreach ( $fields_to_compare AS $field_to_compare ) {
|
||||
$old_value = self::get_value( $field_to_compare, $post->ID );
|
||||
$new_value = self::get_post_value( self::$form_prefix . $field_to_compare );
|
||||
|
||||
if ( $old_value !== $new_value ) {
|
||||
$reset_facebook_cache = true;
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
if ( $reset_facebook_cache ) {
|
||||
wp_remote_get(
|
||||
'https://graph.facebook.com/?id=' . get_permalink( $post->ID ) . '&scrape=true&method=post'
|
||||
);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/********************** DEPRECATED METHODS **********************/
|
||||
|
||||
@@ -88,16 +140,18 @@ if ( ! class_exists( 'WPSEO_Social_Admin' ) ) {
|
||||
*
|
||||
* @deprecated 1.5.0
|
||||
* @deprecated use WPSEO_Meta::get_meta_field_defs()
|
||||
* @see WPSEO_Meta::get_meta_field_defs()
|
||||
* @see WPSEO_Meta::get_meta_field_defs()
|
||||
*
|
||||
* @param string $post_type
|
||||
* @return array Array containing the meta boxes
|
||||
* @param string $post_type
|
||||
*
|
||||
* @return array Array containing the meta boxes
|
||||
*/
|
||||
public function get_meta_boxes( $post_type = 'post' ) {
|
||||
_deprecated_function( __METHOD__, 'WPSEO 1.5.0', 'WPSEO_Meta::get_meta_field_defs()' );
|
||||
|
||||
return $this->get_meta_field_defs( 'social' );
|
||||
}
|
||||
|
||||
} /* End of class */
|
||||
|
||||
} /* End of class-exists wrapper */
|
||||
} /* End of class-exists wrapper */
|
||||
@@ -0,0 +1,129 @@
|
||||
<?php
|
||||
|
||||
/**
|
||||
* @package Admin
|
||||
*/
|
||||
|
||||
if ( ! defined( 'WPSEO_VERSION' ) ) {
|
||||
header( 'Status: 403 Forbidden' );
|
||||
header( 'HTTP/1.1 403 Forbidden' );
|
||||
exit();
|
||||
}
|
||||
|
||||
if ( ! class_exists( 'WPSEO_Plugin_Conflict' ) ) {
|
||||
|
||||
class WPSEO_Plugin_Conflict extends Yoast_Plugin_Conflict {
|
||||
|
||||
/**
|
||||
* The plugins must be grouped per section.
|
||||
*
|
||||
* It's possible to check for each section if there are conflicting plugin
|
||||
*
|
||||
* @var array
|
||||
*/
|
||||
protected $plugins = array(
|
||||
// The plugin which are writing OG metadata
|
||||
'open_graph' => array(
|
||||
'2-click-socialmedia-buttons/2-click-socialmedia-buttons.php',
|
||||
|
||||
// 2 Click Social Media Buttons
|
||||
'add-link-to-facebook/add-link-to-facebook.php', // Add Link to Facebook
|
||||
'add-meta-tags/add-meta-tags.php', // Add Meta Tags
|
||||
'easy-facebook-share-thumbnails/esft.php', // Easy Facebook Share Thumbnail
|
||||
'facebook/facebook.php', // Facebook (official plugin)
|
||||
'facebook-awd/AWD_facebook.php', // Facebook AWD All in one
|
||||
'facebook-featured-image-and-open-graph-meta-tags/fb-featured-image.php',
|
||||
// Facebook Featured Image & OG Meta Tags
|
||||
'facebook-meta-tags/facebook-metatags.php', // Facebook Meta Tags
|
||||
'wonderm00ns-simple-facebook-open-graph-tags/wonderm00n-open-graph.php',
|
||||
// Facebook Open Graph Meta Tags for WordPress
|
||||
'facebook-revised-open-graph-meta-tag/index.php', // Facebook Revised Open Graph Meta Tag
|
||||
'facebook-thumb-fixer/_facebook-thumb-fixer.php', // Facebook Thumb Fixer
|
||||
'facebook-and-digg-thumbnail-generator/facebook-and-digg-thumbnail-generator.php',
|
||||
// Fedmich's Facebook Open Graph Meta
|
||||
'header-footer/plugin.php', // Header and Footer
|
||||
'network-publisher/networkpub.php', // Network Publisher
|
||||
'nextgen-facebook/nextgen-facebook.php', // NextGEN Facebook OG
|
||||
'social-networks-auto-poster-facebook-twitter-g/NextScripts_SNAP.php',
|
||||
// NextScripts SNAP
|
||||
'opengraph/opengraph.php', // Open Graph
|
||||
'open-graph-protocol-framework/open-graph-protocol-framework.php',
|
||||
// Open Graph Protocol Framework
|
||||
'seo-facebook-comments/seofacebook.php', // SEO Facebook Comments
|
||||
'seo-ultimate/seo-ultimate.php', // SEO Ultimate
|
||||
'sexybookmarks/sexy-bookmarks.php', // Shareaholic
|
||||
'shareaholic/sexy-bookmarks.php', // Shareaholic
|
||||
'sharepress/sharepress.php', // SharePress
|
||||
'simple-facebook-connect/sfc.php', // Simple Facebook Connect
|
||||
'social-discussions/social-discussions.php', // Social Discussions
|
||||
'social-sharing-toolkit/social_sharing_toolkit.php', // Social Sharing Toolkit
|
||||
'socialize/socialize.php', // Socialize
|
||||
'only-tweet-like-share-and-google-1/tweet-like-plusone.php',
|
||||
// Tweet, Like, Google +1 and Share
|
||||
'wordbooker/wordbooker.php', // Wordbooker
|
||||
'wpsso/wpsso.php', // WordPress Social Sharing Optimization
|
||||
'wp-caregiver/wp-caregiver.php', // WP Caregiver
|
||||
'wp-facebook-like-send-open-graph-meta/wp-facebook-like-send-open-graph-meta.php',
|
||||
// WP Facebook Like Send & Open Graph Meta
|
||||
'wp-facebook-open-graph-protocol/wp-facebook-ogp.php', // WP Facebook Open Graph protocol
|
||||
'wp-ogp/wp-ogp.php', // WP-OGP
|
||||
'zoltonorg-social-plugin/zosp.php', // Zolton.org Social Plugin
|
||||
),
|
||||
|
||||
'xml_sitemaps' => array(
|
||||
'google-sitemap-plugin/google-sitemap-plugin.php', // Google Sitemap (BestWebSoft)
|
||||
'xml-sitemaps/xml-sitemaps.php', // XML Sitemaps (Denis de Bernardy and Mike Koepke)
|
||||
'bwp-google-xml-sitemaps/bwp-simple-gxs.php', // Better WordPress Google XML Sitemaps (Khang Minh)
|
||||
'google-sitemap-generator/sitemap.php', // Google XML Sitemaps (Arne Brachhold)
|
||||
'xml-sitemap-feed/xml-sitemap.php', // XML Sitemap & Google News feeds (RavanH)
|
||||
'google-monthly-xml-sitemap/monthly-xml-sitemap.php', // Google Monthly XML Sitemap (Andrea Pernici)
|
||||
'simple-google-sitemap-xml/simple-google-sitemap-xml.php', // Simple Google Sitemap XML (iTx Technologies)
|
||||
'another-simple-xml-sitemap/another-simple-xml-sitemap.php', // Another Simple XML Sitemap
|
||||
'xml-maps/google-sitemap.php', // Xml Sitemap (Jason Martens)
|
||||
'google-xml-sitemap-generator-by-anton-dachauer/adachauer-google-xml-sitemap.php', // Google XML Sitemap Generator by Anton Dachauer (Anton Dachauer)
|
||||
'wp-xml-sitemap/wp-xml-sitemap.php', // WP XML Sitemap (Team Vivacity)
|
||||
'sitemap-generator-for-webmasters/sitemap.php', // Sitemap Generator for Webmasters (iwebslogtech)
|
||||
'xml-sitemap-xml-sitemapcouk/xmls.php', // XML Sitemap - XML-Sitemap.co.uk (Simon Hancox)
|
||||
'sewn-in-xml-sitemap/sewn-xml-sitemap.php', // Sewn In XML Sitemap (jcow)
|
||||
'rps-sitemap-generator/rps-sitemap-generator.php', // RPS Sitemap Generator (redpixelstudios)
|
||||
)
|
||||
);
|
||||
|
||||
/**
|
||||
* Overrides instance to set with this class as class
|
||||
*
|
||||
* @return Yoast_Plugin_Conflict
|
||||
*/
|
||||
public static function get_instance( $classname = __CLASS__ ) {
|
||||
return parent::get_instance( $classname );
|
||||
}
|
||||
|
||||
/**
|
||||
* After activating any plugin, this method will be executed by a hook.
|
||||
*
|
||||
* If the activated plugin is conflicting with ours a notice will be shown.
|
||||
*
|
||||
* @param string|bool $plugin
|
||||
*
|
||||
*/
|
||||
public static function hook_check_for_plugin_conflicts( $plugin = false ) {
|
||||
// The instance of itself
|
||||
$instance = self::get_instance();
|
||||
|
||||
// Only add plugin as active plugin if $plugin isn't false
|
||||
if ( $plugin ) {
|
||||
// Because it's just activated
|
||||
$instance->add_active_plugin( $instance->find_plugin_category( $plugin ), $plugin );
|
||||
}
|
||||
|
||||
$plugin_sections = array(
|
||||
'open_graph' => 'open graph',
|
||||
'xml_sitemaps' => 'xml sitemaps'
|
||||
);
|
||||
|
||||
$instance->check_plugin_conflicts( $plugin_sections );
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
@@ -19,7 +19,7 @@ if ( ! class_exists( 'WPSEO_Pointers' ) ) {
|
||||
class WPSEO_Pointers {
|
||||
|
||||
/**
|
||||
* @var object Instance of this class
|
||||
* @var object Instance of this class
|
||||
*/
|
||||
public static $instance;
|
||||
|
||||
@@ -37,8 +37,7 @@ if ( ! class_exists( 'WPSEO_Pointers' ) ) {
|
||||
}
|
||||
if ( $options['tracking_popup_done'] === false && ! isset( $_GET['allow_tracking'] ) ) {
|
||||
add_action( 'admin_print_footer_scripts', array( $this, 'tracking_request' ) );
|
||||
}
|
||||
elseif ( $options['ignore_tour'] === false ) {
|
||||
} elseif ( $options['ignore_tour'] === false ) {
|
||||
add_action( 'admin_print_footer_scripts', array( $this, 'intro_tour' ) );
|
||||
}
|
||||
}
|
||||
@@ -53,6 +52,7 @@ if ( ! class_exists( 'WPSEO_Pointers' ) ) {
|
||||
if ( ! ( self::$instance instanceof self ) ) {
|
||||
self::$instance = new self();
|
||||
}
|
||||
|
||||
return self::$instance;
|
||||
}
|
||||
|
||||
@@ -64,18 +64,24 @@ if ( ! class_exists( 'WPSEO_Pointers' ) ) {
|
||||
$id = '#wpadminbar';
|
||||
$nonce = wp_create_nonce( 'wpseo_activate_tracking' );
|
||||
|
||||
$content = '<h3>' . __( 'Help improve WordPress SEO', 'wordpress-seo' ) . '</h3>';
|
||||
$content .= '<p>' . __( 'You\'ve just installed WordPress SEO by Yoast. Please helps us improve it by allowing us to gather anonymous usage stats so we know which configurations, plugins and themes to test with.', 'wordpress-seo' ) . '</p>';
|
||||
$opt_arr = array(
|
||||
$content = '<h3>' . __( 'Help improve WordPress SEO', 'wordpress-seo' ) . '</h3>';
|
||||
$content .= '<p>' . __( 'You’ve just installed WordPress SEO by Yoast. Please helps us improve it by allowing us to gather anonymous usage stats so we know which configurations, plugins and themes to test with.', 'wordpress-seo' ) . '</p>';
|
||||
$opt_arr = array(
|
||||
'content' => $content,
|
||||
'position' => array( 'edge' => 'top', 'align' => 'center' )
|
||||
);
|
||||
$button2 = __( 'Allow tracking', 'wordpress-seo' );
|
||||
$button_array = array(
|
||||
'button1' => array(
|
||||
'text' => __( 'Do not allow tracking', 'wordpress-seo' ),
|
||||
'function' => 'wpseo_store_answer("no","' . $nonce . '")',
|
||||
),
|
||||
'button2' => array(
|
||||
'text' => __( 'Allow tracking', 'wordpress-seo' ),
|
||||
'function' => 'wpseo_store_answer("yes","' . $nonce . '")',
|
||||
),
|
||||
);
|
||||
|
||||
$function2 = 'wpseo_store_answer("yes","' . $nonce . '")';
|
||||
$function1 = 'wpseo_store_answer("no","' . $nonce . '")';
|
||||
|
||||
$this->print_scripts( $id, $opt_arr, __( 'Do not allow tracking', 'wordpress-seo' ), $button2, $function2, $function1 );
|
||||
$this->print_scripts( $id, $opt_arr, $button_array );
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -84,91 +90,114 @@ if ( ! class_exists( 'WPSEO_Pointers' ) ) {
|
||||
function intro_tour() {
|
||||
global $pagenow, $current_user;
|
||||
|
||||
// @FIXME: Links to tabs only work with target="_blank" and thus open in a new window
|
||||
$adminpages = array(
|
||||
'wpseo_dashboard' => array(
|
||||
'content' => '<h3>' . __( 'Dashboard', 'wordpress-seo' ) . '</h3><p>' . __( 'This is the WordPress SEO Dashboard, here you can restart this tour or revert the WP SEO settings to default.', 'wordpress-seo' ) . '</p>'
|
||||
. '<p><strong>' . __( 'More WordPress SEO', 'wordpress-seo' ) . '</strong><br/>' . sprintf( __( 'There\'s more to learn about WordPress & SEO than just using this plugin. Read our article %1$sthe definitive guide to WordPress SEO%2$s.', 'wordpress-seo' ), '<a target="_blank" href="' . esc_url( 'https://yoast.com/articles/wordpress-seo/#utm_source=wpadmin&utm_medium=wpseo_tour&utm_term=link&utm_campaign=wpseoplugin' ) . '">', '</a>' ) . '</p>'
|
||||
. '<p><strong>' . __( 'Webmaster Tools', 'wordpress-seo' ) . '</strong><br/>' . __( 'Underneath the General Settings, you can add the verification codes for the different Webmaster Tools programs, I highly encourage you to check out both Google and Bing\'s Webmaster Tools.', 'wordpress-seo' ) . '</p>'
|
||||
. '<p><strong>' . __( 'About This Tour', 'wordpress-seo' ) . '</strong><br/>' . __( 'Clicking Next below takes you to the next page of the tour. If you want to stop this tour, click "Close".', 'wordpress-seo' ) . '</p>'
|
||||
. '<p><strong>' . __( 'Like this plugin?', 'wordpress-seo' ) . '</strong><br/>' . sprintf( __( 'If you like this plugin, please %srate it 5 stars on WordPress.org%s and consider making a donation by clicking the button on the right!', 'wordpress-seo' ), '<a target="_blank" href="https://wordpress.org/plugins/wordpress-seo/">', '</a>' ) . '</p>' .
|
||||
'<p><strong>' . __( 'Newsletter', 'wordpress-seo' ) . '</strong><br/>' .
|
||||
__( 'If you would like to keep up to date regarding the WordPress SEO plugin and other plugins by Yoast, subscribe to the newsletter:', 'wordpress-seo' ) . '</p>' .
|
||||
'<form action="http://yoast.us1.list-manage1.com/subscribe/post?u=ffa93edfe21752c921f860358&id=972f1c9122" method="post" id="newsletter-form" accept-charset="' . esc_attr( get_bloginfo( 'charset' ) ) . '">' .
|
||||
'<p>' .
|
||||
'<label for="newsletter-email">' . __( 'Email', 'wordpress-seo' ) . ':</label><input style="color:#666" name="EMAIL" value="' . esc_attr( $current_user->user_email ) . '" id="newsletter-email" placeholder="' . __( 'Email', 'wordpress-seo' ) . '"/><br/>' .
|
||||
'<input type="hidden" name="group" value="2"/>' .
|
||||
'<button type="submit" class="button-primary">' . __( 'Subscribe', 'wordpress-seo' ) . '</button>' .
|
||||
'</p></form>',
|
||||
'button2' => __( 'Next', 'wordpress-seo' ),
|
||||
'function' => 'window.location="' . admin_url( 'admin.php?page=wpseo_titles' ) . '";',
|
||||
'content' => '<h3>' . __( 'Dashboard', 'wordpress-seo' ) . '</h3><p>' . __( 'This is the WordPress SEO Dashboard, here you can restart this tour or revert the WP SEO settings to default.', 'wordpress-seo' ) . '</p>'
|
||||
. '<p><strong>' . __( 'More WordPress SEO', 'wordpress-seo' ) . '</strong><br/>' . sprintf( __( 'There’s more to learn about WordPress & SEO than just using this plugin. A great start is our article %1$sthe definitive guide to WordPress SEO%2$s.', 'wordpress-seo' ), '<a target="_blank" href="' . esc_url( 'https://yoast.com/articles/wordpress-seo/#utm_source=wpseo_dashboard&utm_medium=wpseo_tour&utm_campaign=tour' ) . '">', '</a>' ) . '</p>'
|
||||
. '<p><strong>' . __( 'Tracking', 'wordpress-seo' ) . '</strong><br/>' . __( 'To provide you with the best experience possible, we need your help. Please enable tracking to help us gather anonymous usage data.', 'wordpress-seo' ) . '</p>'
|
||||
. '<p><strong>' . __( 'Webmaster Tools', 'wordpress-seo' ) . '</strong><br/>' . __( 'You can also add the verification codes for the different Webmaster Tools programs here, we highly encourage you to check out both Google and Bing’s Webmaster Tools.', 'wordpress-seo' ) . '</p>'
|
||||
. '<p><strong>' . __( 'WordPress SEO Tour', 'wordpress-seo' ) . '</strong><br/>' . __( 'This tour will show you around in the plugin, to give you a general overview of the plugin.', 'wordpress-seo' ) . '</p>'
|
||||
. '<p><strong>' . __( 'Newsletter', 'wordpress-seo' ) . '</strong><br/>' .
|
||||
__( 'If you would like to us to keep you up-to-date regarding WordPress SEO and other plugins by Yoast, subscribe to our newsletter:', 'wordpress-seo' ) . '</p>' .
|
||||
'<form action="http://yoast.us1.list-manage1.com/subscribe/post?u=ffa93edfe21752c921f860358&id=972f1c9122" method="post" id="newsletter-form" accept-charset="' . esc_attr( get_bloginfo( 'charset' ) ) . '">' .
|
||||
'<p>' .
|
||||
'<label for="newsletter-email">' . __( 'Email', 'wordpress-seo' ) . ':</label> <input style="margin: 5px; color:#666" name="EMAIL" value="' . esc_attr( $current_user->user_email ) . '" id="newsletter-email" placeholder="' . __( 'Email', 'wordpress-seo' ) . '"/><br/>' .
|
||||
'<input type="hidden" name="group" value="2"/>' .
|
||||
'<button type="submit" class="button-primary">' . __( 'Subscribe', 'wordpress-seo' ) . '</button>' .
|
||||
'</p></form>',
|
||||
'next' => __( 'Next', 'wordpress-seo' ),
|
||||
'next_function' => 'window.location="' . admin_url( 'admin.php?page=wpseo_titles' ) . '";',
|
||||
'position' => array( 'edge' => 'top', 'align' => 'center' ),
|
||||
),
|
||||
'wpseo_titles' => array(
|
||||
'content' => '<h3>' . __( 'Title & Description settings', 'wordpress-seo' ) . '</h3>'
|
||||
. '<p>' . __( 'This is where you set the templates for your titles and descriptions of all the different types of pages on your blog, be it your homepage, posts & pages (under post types), category or tag archives (under taxonomy archives), or even custom post type archives and custom posts: all of that is done from here.', 'wordpress-seo' ) . '</p>'
|
||||
. '<p><strong>' . __( 'Templates', 'wordpress-seo' ) . '</strong><br/>'
|
||||
. __( 'The templates are built using variables, the help tab for all the different variables available to you to use in these.', 'wordpress-seo' ) . '</p>'
|
||||
. '<p><strong>' . __( 'Sitewide settings', 'wordpress-seo' ) . '</strong><br/>'
|
||||
. __( 'You can also set some settings for the entire site here to add specific meta tags or to remove some unneeded cruft.', 'wordpress-seo' ) . '</p>',
|
||||
'button2' => __( 'Next', 'wordpress-seo' ),
|
||||
'function' => 'window.location="' . admin_url( 'admin.php?page=wpseo_social' ) . '";',
|
||||
'content' => '<h3>' . __( 'Title & Metas settings', 'wordpress-seo' ) . '</h3>' . '<p>' . __( 'This is where you set the titles and meta-information for all your post types, taxonomies, archives, special pages and for your homepage. The page is divided into different tabs. Make sure you check ’em all out!', 'wordpress-seo' ) . '</p>'
|
||||
. '<p><strong>' . __( 'Sitewide settings', 'wordpress-seo' ) . '</strong><br/>' . __( 'The first tab will show you site-wide settings. You can also set some settings for the entire site here to add specific meta tags or to remove some unneeded cruft.', 'wordpress-seo' ) . '</p>'
|
||||
. '<p><strong>' . __( 'Templates and settings', 'wordpress-seo' ) . '</strong><br/>' . sprintf( __( 'Now click on the ‘%1$sPost Types%2$s’-tab, as this will be our example.', 'wordpress-seo' ), '<a target="_blank" href="' . esc_url( admin_url( 'admin.php?page=wpseo_titles#top#post_types' ) ) . '">', '</a>' ) . '<br />' . __( 'The templates are built using variables. You can find all these variables in the help tab (in the top-right corner of the page). The settings allow you to set specific behavior for the post types.', 'wordpress-seo' ) . '</p>',
|
||||
'next' => __( 'Next', 'wordpress-seo' ),
|
||||
'next_function' => 'window.location="' . admin_url( 'admin.php?page=wpseo_social' ) . '";',
|
||||
'prev' => __( 'Previous', 'wordpress-seo' ),
|
||||
'prev_function' => 'window.location="' . admin_url( 'admin.php?page=wpseo_dashboard' ) . '";',
|
||||
),
|
||||
'wpseo_social' => array(
|
||||
'content' => '<h3>' . __( 'Social settings', 'wordpress-seo' ) . '</h3>'
|
||||
. '<p><strong>' . __( 'Facebook Open Graph', 'wordpress-seo' ) . '</strong><br/>'
|
||||
. __( 'On this page you can enable the Open Graph functionality from this plugin, as well as assign a Facebook user or Application to be the admin of your site, so you can view the Facebook insights.', 'wordpress-seo' ) . '</p>'
|
||||
. '<p>' . sprintf( __( 'Read more about %1$sFacebook Open Graph%2$s.', 'wordpress-seo' ), '<a target="_blank" href="'. esc_url( 'https://yoast.com/facebook-open-graph-protocol/#utm_source=wpadmin&utm_medium=wpseo_tour&utm_term=link&utm_campaign=wpseoplugin' ) . '">', '</a>' ) . '</p>'
|
||||
. '<p><strong>' . __( 'Twitter Cards', 'wordpress-seo' ) . '</strong><br/>'
|
||||
. sprintf( __( 'This functionality is currently in beta, but it allows for %1$sTwitter Cards%2$s.', 'wordpress-seo' ), '<a target="_blank" href="' . esc_url( 'https://yoast.com/twitter-cards/#utm_source=wpadmin&utm_medium=wpseo_tour&utm_term=link&utm_campaign=wpseoplugin' ) . '">', '</a>' ) . '</p>',
|
||||
'button2' => __( 'Next', 'wordpress-seo' ),
|
||||
'function' => 'window.location="' . admin_url( 'admin.php?page=wpseo_xml' ) . '";',
|
||||
'content' => '<h3>' . __( 'Social settings', 'wordpress-seo' ) . '</h3>'
|
||||
. '<p><strong>' . __( 'Facebook', 'wordpress-seo' ) . '</strong><br/>' . sprintf( __( 'On this tab you can enable the %1$sFacebook Open Graph%2$s functionality from this plugin, as well as assign a Facebook user or Application to be the admin of your site, so you can view the Facebook insights.', 'wordpress-seo' ), '<a target="_blank" href="' . esc_url( 'https://yoast.com/facebook-open-graph-protocol/#utm_source=wpseo_social&utm_medium=wpseo_tour&utm_campaign=tour' ) . '">', '</a>' ) . '</p><p>' . __( 'The frontpage settings allow you to set meta-data for your homepage, whereas the default settings allow you to set a fallback for all posts/pages without images. ', 'wordpress-seo' ) . '</p>'
|
||||
. '<p><strong>' . __( 'Twitter', 'wordpress-seo' ) . '</strong><br/>' . sprintf( __( 'With %1$sTwitter Cards%2$s, you can attach rich photos, videos and media experience to tweets that drive traffic to your website. Simply check the box, sign up for the service, and users who Tweet links to your content will have a “Card” added to the tweet that’s visible to all of their followers.', 'wordpress-seo' ), '<a target="_blank" href="' . esc_url( 'https://yoast.com/twitter-cards/#utm_source=wpseo_social&utm_medium=wpseo_tour&utm_campaign=tour' ) . '">', '</a>' ) . '</p>'
|
||||
. '<p><strong>' . __( 'Google+', 'wordpress-seo' ) . '</strong><br/>' . sprintf( __( 'This tab allows you to add specific post meta data for Google+. And if you have a Google+ page for your business, add that URL here and link it on your %1$sGoogle+%2$s page’s about page.', 'wordpress-seo' ), '<a target="_blank" href="' . esc_url( 'https://plus.google.com/' ) . '">', '</a>' ) . '</p>',
|
||||
'next' => __( 'Next', 'wordpress-seo' ),
|
||||
'next_function' => 'window.location="' . admin_url( 'admin.php?page=wpseo_xml' ) . '";',
|
||||
'prev' => __( 'Previous', 'wordpress-seo' ),
|
||||
'prev_function' => 'window.location="' . admin_url( 'admin.php?page=wpseo_titles' ) . '";',
|
||||
),
|
||||
'wpseo_xml' => array(
|
||||
'content' => '<h3>' . __( 'XML Sitemaps', 'wordpress-seo' ) . '</h3><p>' . __( 'This plugin adds an XML sitemap to your site. It\'s automatically updated when you publish a new post, page or custom post and Google and Bing will be automatically notified.', 'wordpress-seo' ) . '</p><p>' . __( 'Be sure to check whether post types or taxonomies are showing that search engines shouldn\'t be indexing, if so, check the box before them to hide them from the XML sitemaps.', 'wordpress-seo' ) . '</p>',
|
||||
'button2' => __( 'Next', 'wordpress-seo' ),
|
||||
'function' => 'window.location="' . admin_url( 'admin.php?page=wpseo_permalinks' ) . '";',
|
||||
'content' => '<h3>' . __( 'XML Sitemaps', 'wordpress-seo' ) . '</h3>'
|
||||
. '<p><strong>' . __( 'What are XML sitemaps?', 'wordpress-seo' ) . '</strong><br/>' . __( 'A Sitemap is an XML file that lists the URLs for a site. It allows webmasters to include additional information about each URL: when it was last updated, how often it changes, and how important it is in relation to other URLs in the site. This allows search engines to crawl the site more intelligently.', 'wordpress-seo' ) . '</p>'
|
||||
. '<p><strong>' . __( 'What does the plugin do with XML Sitemaps?', 'wordpress-seo' ) . '</strong><br/>' . __( 'This plugin adds XML sitemaps to your site. The sitemaps are automatically updated when you publish a new post, page or custom post and Google and Bing will be automatically notified. You can also have the plugin automatically notify Yahoo! and Ask.com.', 'wordpress-seo' ) . '</p><p>' . __( 'If you want to exclude certain post types and/or taxonomies, you can also set that on this page.', 'wordpress-seo' ) . '</p><p>' . __( 'Is your webserver low on memory? Decrease the entries per sitemap (default: 1000) to reduce load.', 'wordpress-seo' ) . '</p>',
|
||||
'next' => __( 'Next', 'wordpress-seo' ),
|
||||
'next_function' => 'window.location="' . admin_url( 'admin.php?page=wpseo_permalinks' ) . '";',
|
||||
'prev' => __( 'Previous', 'wordpress-seo' ),
|
||||
'prev_function' => 'window.location="' . admin_url( 'admin.php?page=wpseo_social' ) . '";',
|
||||
),
|
||||
'wpseo_permalinks' => array(
|
||||
'content' => '<h3>' . __( 'Permalink Settings', 'wordpress-seo' ) . '</h3><p>' . __( 'All of the options here are for advanced users only, if you don\'t know whether you should check any, don\'t touch them.', 'wordpress-seo' ) . '</p>',
|
||||
'button2' => __( 'Next', 'wordpress-seo' ),
|
||||
'function' => 'window.location="' . admin_url( 'admin.php?page=wpseo_internal-links' ) . '";',
|
||||
'content' => '<h3>' . __( 'Permalink Settings', 'wordpress-seo' ) . '</h3><p>' . __( 'All of the options here are for advanced users only, if you don’t know whether you should check any, don’t touch them.', 'wordpress-seo' ) . '</p>',
|
||||
'next' => __( 'Next', 'wordpress-seo' ),
|
||||
'next_function' => 'window.location="' . admin_url( 'admin.php?page=wpseo_internal-links' ) . '";',
|
||||
'prev' => __( 'Previous', 'wordpress-seo' ),
|
||||
'prev_function' => 'window.location="' . admin_url( 'admin.php?page=wpseo_xml' ) . '";',
|
||||
),
|
||||
'wpseo_internal-links' => array(
|
||||
'content' => '<h3>' . __( 'Breadcrumbs Settings', 'wordpress-seo' ) . '</h3><p>' . sprintf( __( 'If your theme supports my breadcrumbs, as all Genesis and WooThemes themes as well as a couple of other ones do, you can change the settings for those here. If you want to modify your theme to support them, %sfollow these instructions%s.', 'wordpress-seo' ), '<a target="_blank" href="' . esc_url( 'https://yoast.com/wordpress/plugins/breadcrumbs/#utm_source=wpadmin&utm_medium=wpseo_tour&utm_term=link&utm_campaign=wpseoplugin' ) . '">', '</a>' ) . '</p>',
|
||||
'button2' => __( 'Next', 'wordpress-seo' ),
|
||||
'function' => 'window.location="' . admin_url( 'admin.php?page=wpseo_rss' ) . '";',
|
||||
'content' => '<h3>' . __( 'Breadcrumbs Settings', 'wordpress-seo' ) . '</h3><p>' . sprintf( __( 'If your theme supports my breadcrumbs, as all Genesis and WooThemes themes as well as a couple of other ones do, you can change the settings for those here. If you want to modify your theme to support them, %sfollow these instructions%s.', 'wordpress-seo' ), '<a target="_blank" href="' . esc_url( 'https://yoast.com/wordpress/plugins/breadcrumbs/#utm_source=wpseo_permalinks&utm_medium=wpseo_tour&utm_campaign=tour' ) . '">', '</a>' ) . '</p>',
|
||||
'next' => __( 'Next', 'wordpress-seo' ),
|
||||
'next_function' => 'window.location="' . admin_url( 'admin.php?page=wpseo_rss' ) . '";',
|
||||
'prev' => __( 'Previous', 'wordpress-seo' ),
|
||||
'prev_function' => 'window.location="' . admin_url( 'admin.php?page=wpseo_permalinks' ) . '";',
|
||||
),
|
||||
'wpseo_rss' => array(
|
||||
'content' => '<h3>' . __( 'RSS Settings', 'wordpress-seo' ) . '</h3><p>' . __( 'This incredibly powerful function allows you to add content to the beginning and end of your posts in your RSS feed. This helps you gain links from people who steal your content!', 'wordpress-seo' ) . '</p>',
|
||||
'button2' => __( 'Next', 'wordpress-seo' ),
|
||||
'function' => 'window.location="' . admin_url( 'admin.php?page=wpseo_import' ) . '";',
|
||||
'content' => '<h3>' . __( 'RSS Settings', 'wordpress-seo' ) . '</h3><p>' . __( 'This incredibly powerful function allows you to add content to the beginning and end of your posts in your RSS feed. This helps you gain links from people who steal your content!', 'wordpress-seo' ) . '</p>',
|
||||
'next' => __( 'Next', 'wordpress-seo' ),
|
||||
'next_function' => 'window.location="' . admin_url( 'admin.php?page=wpseo_import' ) . '";',
|
||||
'prev' => __( 'Previous', 'wordpress-seo' ),
|
||||
'prev_function' => 'window.location="' . admin_url( 'admin.php?page=wpseo_internal-links' ) . '";',
|
||||
),
|
||||
'wpseo_import' => array(
|
||||
'content' => '<h3>' . __( 'Import & Export', 'wordpress-seo' ) . '</h3><p>' . __( 'Just switched over from another SEO plugin? Use the options here to switch your data over. If you were using some of my older plugins like Robots Meta & RSS Footer, you can import the settings here too.', 'wordpress-seo' ) . '</p><p>' . __( 'If you have multiple blogs and you\'re happy with how you\'ve configured this blog, you can export the settings and import them on another blog so you don\'t have to go through this process twice!', 'wordpress-seo' ) . '</p>',
|
||||
'button2' => __( 'Next', 'wordpress-seo' ),
|
||||
'function' => 'window.location="' . network_admin_url( 'admin.php?page=wpseo_files' ) . '";', // will auto-use admin_url if not on multi-site
|
||||
'content' => '<h3>' . esc_html__( 'Import & Export', 'wordpress-seo' ) . '</h3>'
|
||||
. '<p><strong>' . __( 'Import from other (SEO) plugins', 'wordpress-seo' ) . '</strong><br/>' . __( 'We can imagine that you switch from another SEO plugin to WordPress SEO. If you just did, you can use these options to transfer your SEO-data. If you were using one of my older plugins like Robots Meta & RSS Footer, you can import the settings here too.', 'wordpress-seo' ) . '</p>'
|
||||
. '<p><strong>' . __( 'Other imports', 'wordpress-seo' ) . '</strong><br/>' . sprintf( __( 'If you’re using one of our premium plugins, such as %1$sLocal SEO%2$s, you can also find specific import-options for that plugin here.', 'wordpress-seo' ), '<a target="_blank" href="' . esc_url( 'https://yoast.com/wordpress/plugins/local-seo/#utm_source=wpseo_import&utm_medium=wpseo_tour&utm_campaign=tour' ) . '">', '</a>' ) . '</p>'
|
||||
. '<p><strong>' . __( 'Export', 'wordpress-seo' ) . '</strong><br/>' . __( 'If you have multiple blogs and you’re happy with how you’ve configured this blog, you can export the settings and import them on another blog so you don’t have to go through this process twice!', 'wordpress-seo' ) . '</p>',
|
||||
'next' => __( 'Next', 'wordpress-seo' ),
|
||||
'next_function' => 'window.location="' . network_admin_url( 'admin.php?page=wpseo_bulk-editor' ) . '";', // will auto-use admin_url if not on multi-site
|
||||
'prev' => __( 'Previous', 'wordpress-seo' ),
|
||||
'prev_function' => 'window.location="' . admin_url( 'admin.php?page=wpseo_rss' ) . '";',
|
||||
),
|
||||
'wpseo_bulk-editor' => array(
|
||||
'content' => '<h3>' . __( 'Bulk Editor', 'wordpress-seo' ) . '</h3><p>' . __( 'This page lets you view and edit the titles and meta descriptions of all posts and pages on your site. This allows you to edit the title or meta description of all your pages in one place, rather than having to edit each individual page.', 'wordpress-seo' ) . '</p>',
|
||||
'next' => __( 'Next', 'wordpress-seo' ),
|
||||
'next_function' => 'window.location="' . admin_url( 'admin.php?page=wpseo_files' ) . '";',
|
||||
'prev' => __( 'Previous', 'wordpress-seo' ),
|
||||
'prev_function' => 'window.location="' . admin_url( 'admin.php?page=wpseo_import' ) . '";',
|
||||
),
|
||||
'wpseo_files' => array(
|
||||
'content' => '<h3>' . __( 'File Editor', 'wordpress-seo' ) . '</h3><p>' . __( 'Here you can edit the .htaccess and robots.txt files, two of the most powerful files in your WordPress install. Only touch these files if you know what you\'re doing!', 'wordpress-seo' ) . '</p>',
|
||||
'button2' => __( 'Next', 'wordpress-seo' ),
|
||||
'function' => 'window.location="' . admin_url( 'admin.php?page=wpseo_bulk-title-editor' ) . '";',
|
||||
'content' => '<h3>' . __( 'File Editor', 'wordpress-seo' ) . '</h3><p>' . __( 'Here you can edit the .htaccess and robots.txt files, two of the most powerful files in your WordPress install, if your WordPress installation has write-access to the files. But please, only touch these files if you know what you’re doing!', 'wordpress-seo' ) . '</p>',
|
||||
'next' => __( 'Next', 'wordpress-seo' ),
|
||||
'next_function' => 'window.location="' . admin_url( 'admin.php?page=wpseo_licenses' ) . '";',
|
||||
'prev' => __( 'Previous', 'wordpress-seo' ),
|
||||
'prev_function' => 'window.location="' . admin_url( 'admin.php?page=wpseo_bulk-editor' ) . '";',
|
||||
),
|
||||
'wpseo_bulk-title-editor' => array(
|
||||
'content' => '<h3>' . __( 'Bulk Title Editor', 'wordpress-seo' ) . '</h3><p>' . __( 'This is where you can view and edit the SEO titles of every post and page on your site. If you have a lot of pages that need SEO titles, use this page to save yourself the hassle of editing every page one at a time!', 'wordpress-seo' ) . '</p>',
|
||||
'button2' => __( 'Next', 'wordpress-seo' ),
|
||||
'function' => 'window.location="' . admin_url( 'admin.php?page=wpseo_bulk-description-editor' ) . '";',
|
||||
),
|
||||
'wpseo_bulk-description-editor' => array(
|
||||
'content' => '<h3>' . __( 'Bulk Description Editor', 'wordpress-seo' ) . '</h3><p>' . __( 'This page lets you view and edit the meta descriptions of all posts and pages on your site. Just like the Bulk Title Editor, this allows you to edit the meta description of all your pages in one place, rather than having to edit each individual page.', 'wordpress-seo' ) . '</p>'
|
||||
. '<p>' . sprintf( __( 'The tour ends here, thank you for using my plugin and good luck with your SEO!<br/><br/>Best,<br/>Joost de Valk - %1$sYoast.com%2$s', 'wordpress-seo' ), '<a target="_blank" href="' . esc_url( 'https://yoast.com/#utm_source=wpadmin&utm_medium=wpseo_tour&utm_term=link&utm_campaign=wpseoplugin' ) . '">', '</a>' ) . '</p>'
|
||||
'wpseo_licenses' => array(
|
||||
'content' => '<h3>' . __( 'Extensions and Licenses', 'wordpress-seo' ) . '</h3>'
|
||||
. '<p><strong>' . __( 'Extensions', 'wordpress-seo' ) . '</strong><br/>' . sprintf( __( 'The powerful functions of WordPress SEO can be extended with %1$sYoast premium plugins%2$s. These premium plugins require the installation of WordPress SEO or WordPress SEO Premium and add specific functionality. You can read all about the Yoast Premium Plugins on %1$shttp://yoast.com/wordpress/plugins/%2$s.', 'wordpress-seo' ), '<a target="_blank" href="' . esc_url( 'https://yoast.com/wordpress/plugins/#utm_source=wpseo_licenses&utm_medium=wpseo_tour&utm_campaign=tour' ) . '">', '</a>' ) . '</p>'
|
||||
. '<p><strong>' . __( 'Licenses', 'wordpress-seo' ) . '</strong><br/>' . __( 'Once you’ve purchased WordPress SEO Premium or any other premium Yoast plugin, you’ll have to enter a license key. You can do so on the Licenses-tab. Once you’ve activated your premium plugin, you can use all its powerful features.', 'wordpress-seo' ) . '</p>'
|
||||
. '<p><strong>' . __( 'Like this plugin?', 'wordpress-seo' ) . '</strong><br/>' . sprintf( __( 'So, we’ve come to the end of the tour. If you like the plugin, please %srate it 5 stars on WordPress.org%s!', 'wordpress-seo' ), '<a target="_blank" href="https://wordpress.org/plugins/wordpress-seo/">', '</a>' ) . '</p>'
|
||||
. '<p>' . sprintf( __( 'Thank you for using my plugin and good luck with your SEO!<br/><br/>Best,<br/>Team Yoast - %1$sYoast.com%2$s', 'wordpress-seo' ), '<a target="_blank" href="' . esc_url( 'https://yoast.com/#utm_source=wpseo_licenses&utm_medium=wpseo_tour&utm_campaign=tour' ) . '">', '</a>' ) . '</p>',
|
||||
'prev' => __( 'Previous', 'wordpress-seo' ),
|
||||
'prev_function' => 'window.location="' . admin_url( 'admin.php?page=wpseo_files' ) . '";',
|
||||
),
|
||||
);
|
||||
|
||||
// Remove the last step and add tour end to import page if file editing is disallowed or if the site is a multisite and the current user isn't a superadmin
|
||||
if ( wpseo_allow_system_file_edit() === false ) {
|
||||
// Skip tour about wpseo_files page if file editing is disallowed or if the site is a multisite and the current user isn't a superadmin
|
||||
if ( false === wpseo_allow_system_file_edit() ) {
|
||||
unset( $adminpages['wpseo_files'] );
|
||||
$adminpages['wpseo_import']['function'] = '';
|
||||
unset( $adminpages['wpseo_import']['button2'] );
|
||||
$adminpages['wpseo_import']['content'] .= '<p>' . sprintf( __( 'The tour ends here,thank you for using my plugin and good luck with your SEO!<br/><br/>Best,<br/>Joost de Valk - %1$sYoast.com%2$s', 'wordpress-seo' ), '<a href="https://yoast.com/">', '</a>' ) . '</p>';
|
||||
$adminpages['wpseo_bulk-editor']['function'] = 'window.location="' . admin_url( 'admin.php?page=wpseo_licenses' ) . '";';
|
||||
}
|
||||
|
||||
$page = '';
|
||||
@@ -176,57 +205,83 @@ if ( ! class_exists( 'WPSEO_Pointers' ) ) {
|
||||
$page = $_GET['page'];
|
||||
}
|
||||
|
||||
$function = '';
|
||||
$button2 = '';
|
||||
$opt_arr = array();
|
||||
$id = '#wpseo-title';
|
||||
$button_array = array(
|
||||
'button1' => array(
|
||||
'text' => __( 'Close', 'wordpress-seo' ),
|
||||
'function' => '',
|
||||
)
|
||||
);
|
||||
$opt_arr = array();
|
||||
$id = '#wpseo-title';
|
||||
if ( 'admin.php' != $pagenow || ! array_key_exists( $page, $adminpages ) ) {
|
||||
$id = 'li.toplevel_page_wpseo_dashboard';
|
||||
$content = '<h3>' . __( 'Congratulations!', 'wordpress-seo' ) . '</h3>';
|
||||
$content .= '<p>' . __( 'You\'ve just installed WordPress SEO by Yoast! Click "Start Tour" to view a quick introduction of this plugins core functionality.', 'wordpress-seo' ) . '</p>';
|
||||
$opt_arr = array(
|
||||
$id = 'li.toplevel_page_wpseo_dashboard';
|
||||
$content = '<h3>' . __( 'Congratulations!', 'wordpress-seo' ) . '</h3>';
|
||||
$content .= '<p>' . __( 'You’ve just installed WordPress SEO by Yoast! Click “Start Tour” to view a quick introduction of this plugin’s core functionality.', 'wordpress-seo' ) . '</p>';
|
||||
$opt_arr = array(
|
||||
'content' => $content,
|
||||
'position' => array( 'edge' => 'top', 'align' => 'center' )
|
||||
'position' => array( 'edge' => 'bottom', 'align' => 'center' )
|
||||
);
|
||||
$button2 = __( 'Start Tour', 'wordpress-seo' );
|
||||
$function = 'document.location="' . admin_url( 'admin.php?page=wpseo_dashboard' ) . '";';
|
||||
}
|
||||
else {
|
||||
$button_array['button2']['text'] = __( 'Start Tour', 'wordpress-seo' );
|
||||
$button_array['button2']['function'] = 'document.location="' . admin_url( 'admin.php?page=wpseo_dashboard' ) . '";';
|
||||
} else {
|
||||
if ( '' != $page && in_array( $page, array_keys( $adminpages ) ) ) {
|
||||
$align = ( is_rtl() ) ? 'right' : 'left';
|
||||
$align = ( is_rtl() ) ? 'left' : 'right';
|
||||
$opt_arr = array(
|
||||
'content' => $adminpages[ $page ]['content'],
|
||||
'position' => array( 'edge' => 'top', 'align' => $align ),
|
||||
'pointerWidth' => 400,
|
||||
'content' => $adminpages[$page]['content'],
|
||||
'position' => ( isset ( $adminpages[$page]['position'] ) ) ? ( $adminpages[$page]['position'] ) : array( 'edge' => 'top', 'align' => $align ),
|
||||
'pointerWidth' => 450,
|
||||
);
|
||||
if ( isset( $adminpages[ $page ]['button2'] ) ) {
|
||||
$button2 = $adminpages[ $page ]['button2'];
|
||||
if ( isset( $adminpages[$page]['next'] ) && isset( $adminpages[$page]['next_function'] ) ) {
|
||||
$button_array['button2'] = array(
|
||||
'text' => $adminpages[$page]['next'],
|
||||
'function' => $adminpages[$page]['next_function'],
|
||||
);
|
||||
}
|
||||
if ( isset( $adminpages[ $page ]['function'] ) ) {
|
||||
$function = $adminpages[ $page ]['function'];
|
||||
if ( isset( $adminpages[$page]['prev'] ) && isset( $adminpages[$page]['prev_function'] ) ) {
|
||||
$button_array['button3'] = array(
|
||||
'text' => $adminpages[$page]['prev'],
|
||||
'function' => $adminpages[$page]['prev_function'],
|
||||
);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
$this->print_scripts( $id, $opt_arr, __( 'Close', 'wordpress-seo' ), $button2, $function );
|
||||
$this->print_scripts( $id, $opt_arr, $button_array );
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Prints the pointer script
|
||||
*
|
||||
* @param string $selector The CSS selector the pointer is attached to.
|
||||
* @param array $options The options for the pointer.
|
||||
* @param string $button1 Text for button 1
|
||||
* @param string|bool $button2 Text for button 2 (or false to not show it, defaults to false)
|
||||
* @param string $button2_function The JavaScript function to attach to button 2
|
||||
* @param string $button1_function The JavaScript function to attach to button 1
|
||||
* @param string $selector The CSS selector the pointer is attached to.
|
||||
* @param array $options The options for the pointer.
|
||||
* @param array $button_array The options for the buttons.
|
||||
*/
|
||||
function print_scripts( $selector, $options, $button1, $button2 = false, $button2_function = '', $button1_function = '' ) {
|
||||
function print_scripts( $selector, $options, $button_array ) {
|
||||
$button_array_defaults = array(
|
||||
'button1' => array(
|
||||
'text' => false,
|
||||
'function' => '',
|
||||
),
|
||||
'button2' => array(
|
||||
'text' => false,
|
||||
'function' => '',
|
||||
),
|
||||
'button3' => array(
|
||||
'text' => false,
|
||||
'function' => '',
|
||||
),
|
||||
);
|
||||
$button_array = wp_parse_args( $button_array, $button_array_defaults );
|
||||
?>
|
||||
<script type="text/javascript">
|
||||
//<![CDATA[
|
||||
(function ($) {
|
||||
// Don't show the tour on screens with an effective width smaller than 1024px or an effective height smaller than 768px.
|
||||
if (jQuery(window).width() < 1024 || jQuery(window).availWidth < 1024 ) {
|
||||
return;
|
||||
}
|
||||
|
||||
var wpseo_pointer_options = <?php echo json_encode( $options ); ?>, setup;
|
||||
|
||||
function wpseo_store_answer(input, nonce) {
|
||||
@@ -242,7 +297,7 @@ if ( ! class_exists( 'WPSEO_Pointers' ) ) {
|
||||
|
||||
wpseo_pointer_options = $.extend(wpseo_pointer_options, {
|
||||
buttons: function (event, t) {
|
||||
var button = jQuery('<a id="pointer-close" style="margin-left:5px;" class="button-secondary">' + '<?php echo $button1; ?>' + '</a>');
|
||||
var button = jQuery('<a id="pointer-close" style="margin:0 5px;" class="button-secondary">' + '<?php echo $button_array['button1']['text']; ?>' + '</a>');
|
||||
button.bind('click.pointer', function () {
|
||||
t.element.pointer('close');
|
||||
});
|
||||
@@ -254,18 +309,29 @@ if ( ! class_exists( 'WPSEO_Pointers' ) ) {
|
||||
|
||||
setup = function () {
|
||||
$('<?php echo $selector; ?>').pointer(wpseo_pointer_options).pointer('open');
|
||||
<?php if ( $button2 ) { ?>
|
||||
jQuery('#pointer-close').after('<a id="pointer-primary" class="button-primary">' + '<?php echo $button2; ?>' + '</a>');
|
||||
<?php if ( $button_array['button2']['text'] ) { ?>
|
||||
jQuery('#pointer-close').after('<a id="pointer-primary" class="button-primary">' + '<?php echo $button_array['button2']['text']; ?>' + '</a>');
|
||||
jQuery('#pointer-primary').click(function () {
|
||||
<?php echo $button2_function; ?>
|
||||
<?php echo $button_array['button2']['function']; ?>
|
||||
});
|
||||
<?php if ( $button_array['button3']['text'] ) { ?>
|
||||
jQuery('#pointer-primary').after('<a id="pointer-ternary" style="float: left;" class="button-secondary">' + '<?php echo $button_array['button3']['text']; ?>' + '</a>');
|
||||
jQuery('#pointer-ternary').click(function () {
|
||||
<?php echo $button_array['button3']['function']; ?>
|
||||
});
|
||||
<?php } ?>
|
||||
jQuery('#pointer-close').click(function () {
|
||||
<?php if ( $button1_function == '' ) { ?>
|
||||
<?php if ( $button_array['button1']['function'] == '' ) { ?>
|
||||
wpseo_setIgnore("tour", "wp-pointer-0", "<?php echo esc_js( wp_create_nonce( 'wpseo-ignore' ) ); ?>");
|
||||
<?php } else { ?>
|
||||
<?php echo $button1_function; ?>
|
||||
<?php echo $button_array['button1']['function']; ?>
|
||||
<?php } ?>
|
||||
});
|
||||
<?php } else if ( $button_array['button3']['text'] ) { ?>
|
||||
jQuery('#pointer-close').after('<a id="pointer-ternary" style="float: left;" class="button-secondary">' + '<?php echo $button_array['button3']['text']; ?>' + '</a>');
|
||||
jQuery('#pointer-ternary').click(function () {
|
||||
<?php echo $button_array['button3']['function']; ?>
|
||||
});
|
||||
<?php } ?>
|
||||
};
|
||||
|
||||
@@ -280,7 +346,6 @@ if ( ! class_exists( 'WPSEO_Pointers' ) ) {
|
||||
}
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* Load a tiny bit of CSS in the head
|
||||
*
|
||||
@@ -288,9 +353,10 @@ if ( ! class_exists( 'WPSEO_Pointers' ) ) {
|
||||
*/
|
||||
function admin_head() {
|
||||
_deprecated_function( __METHOD__, 'WPSEO 1.5.0' );
|
||||
|
||||
return;
|
||||
}
|
||||
|
||||
} /* End of class */
|
||||
|
||||
} /* End of class-exists wrapper */
|
||||
} /* End of class-exists wrapper */
|
||||
@@ -0,0 +1,156 @@
|
||||
<?php
|
||||
if ( ! class_exists( 'WPSEO_Snippet_Preview' ) ) {
|
||||
/**
|
||||
* class WPSEO_Snippet_Preview
|
||||
*
|
||||
* Generates a Google Search snippet preview.
|
||||
*
|
||||
* Takes a $post, $title and $description
|
||||
*
|
||||
*/
|
||||
class WPSEO_Snippet_Preview {
|
||||
/**
|
||||
* @var string The dynamically generated html for the snippet preview.
|
||||
*/
|
||||
protected $content;
|
||||
|
||||
/**
|
||||
* @var array The WPSEO options.
|
||||
*/
|
||||
protected $options;
|
||||
|
||||
/**
|
||||
* @var object The post for which we want to generate the snippet preview.
|
||||
*/
|
||||
protected $post;
|
||||
|
||||
/**
|
||||
* @var string The title that is shown in the snippet.
|
||||
*/
|
||||
protected $title;
|
||||
|
||||
/**
|
||||
* @var string The description that is shown in the snippet.
|
||||
*/
|
||||
protected $description;
|
||||
|
||||
/**
|
||||
* @var string The date that is shown at the beginning of the description in the snippet.
|
||||
*/
|
||||
protected $date = '';
|
||||
|
||||
/**
|
||||
* @var string The url that is shown in the snippet.
|
||||
*/
|
||||
protected $url;
|
||||
|
||||
/**
|
||||
* @var string The slug of the url that is shown in the snippet.
|
||||
*/
|
||||
protected $slug = '';
|
||||
|
||||
/**
|
||||
* Generates the html for the snippet preview containing dynamically generated text components.
|
||||
* Those components are included as properties which are set in the constructor.
|
||||
*
|
||||
* @param object $post
|
||||
* @param string $title
|
||||
* @param string $description
|
||||
*/
|
||||
public function __construct( $post, $title, $description ) {
|
||||
$this->options = WPSEO_Options::get_all();
|
||||
$this->post = $post;
|
||||
$this->title = esc_html( $title );
|
||||
$this->description = esc_html( $description );
|
||||
|
||||
$this->set_date();
|
||||
$this->set_url();
|
||||
$this->set_content();
|
||||
}
|
||||
|
||||
/**
|
||||
* Getter for $this->content
|
||||
* @return string html for snippet preview
|
||||
*/
|
||||
public function get_content() {
|
||||
return $this->content;
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets date if available
|
||||
*/
|
||||
protected function set_date() {
|
||||
if ( is_object( $this->post ) && isset( $this->options['showdate-' . $this->post->post_type] ) && $this->options['showdate-' . $this->post->post_type] === true ) {
|
||||
$date = $this->get_post_date();
|
||||
$this->date = '<span class="date">' . $date . ' - </span>';
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Retrieves a post date when post is published, or return current date when it's not.
|
||||
*
|
||||
* @param object $post Post to retrieve the date for.
|
||||
*
|
||||
* @return string
|
||||
*/
|
||||
protected function get_post_date() {
|
||||
if ( isset( $this->post->post_date ) && $this->post->post_status == 'publish' ) {
|
||||
$date = date_i18n( 'j M Y', strtotime( $this->post->post_date ) );
|
||||
} else {
|
||||
$date = date_i18n( 'j M Y' );
|
||||
}
|
||||
|
||||
return (string) $date;
|
||||
}
|
||||
|
||||
/**
|
||||
* Generates the url that is displayed in the snippet preview.
|
||||
*/
|
||||
protected function set_url() {
|
||||
$this->url = str_replace( array( 'http://', 'https://' ), '', get_bloginfo( 'url' ) ) . '/';
|
||||
$this->set_slug();
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets the slug and adds it to the url if the post has been published and the post name exists.
|
||||
*
|
||||
* If the post is set to be the homepage the slug is also not included.
|
||||
*/
|
||||
protected function set_slug() {
|
||||
$frontpage_post_id = (int) ( get_option( 'page_on_front' ) );
|
||||
|
||||
if ( is_object( $this->post ) && isset( $this->post->post_name ) && $this->post->post_name !== '' && $this->post->ID !== $frontpage_post_id ) {
|
||||
$this->slug = sanitize_title( $this->title );
|
||||
$this->url .= esc_html( $this->slug );
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Generates the html for the snippet preview and assign it to $this->content.
|
||||
*/
|
||||
protected function set_content() {
|
||||
$content = <<<HTML
|
||||
<div id="wpseosnippet">
|
||||
<a class="title" id="wpseosnippet_title" href="#">$this->title</a>
|
||||
<span class="url">$this->url</span>
|
||||
<p class="desc">$this->date<span class="autogen"></span><span class="content">$this->description</span></p>
|
||||
</div>
|
||||
HTML;
|
||||
$this->set_content_through_filter( $content );
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets the html for the snippet preview through a filter
|
||||
*/
|
||||
protected function set_content_through_filter( $content ) {
|
||||
$properties = get_object_vars( $this );
|
||||
|
||||
/**
|
||||
* Filter: 'wpseo_snippet' - Allow changing the html for the snippet preview.
|
||||
*
|
||||
* Passing in the post twice because of backwards compatibility.
|
||||
*/
|
||||
$this->content = apply_filters( 'wpseo_snippet', $content, $this->post, $properties );
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -178,13 +178,13 @@ if ( ! class_exists( 'WPSEO_Taxonomy' ) ) {
|
||||
$this->form_row( 'wpseo_desc', __( 'SEO Description', 'wordpress-seo' ), esc_html__( 'The SEO description is used for the meta description on the archive page for this term.', 'wordpress-seo' ), $tax_meta );
|
||||
|
||||
if ( $options['usemetakeywords'] === true ) {
|
||||
$this->form_row( 'wpseo_metakey', __( 'Meta Keywords', 'wordpress-seo' ), esc_html__( 'Meta keywords used on the archive page for this term.', 'wordpress-seo' ), $tax_meta );
|
||||
$this->form_row( 'wpseo_metakey', __( 'Meta keywords', 'wordpress-seo' ), esc_html__( 'Meta keywords used on the archive page for this term.', 'wordpress-seo' ), $tax_meta );
|
||||
}
|
||||
|
||||
$this->form_row( 'wpseo_canonical', __( 'Canonical', 'wordpress-seo' ), esc_html__( 'The canonical link is shown on the archive page for this term.', 'wordpress-seo' ), $tax_meta );
|
||||
|
||||
if ( $options['breadcrumbs-enable'] === true ) {
|
||||
$this->form_row( 'wpseo_bctitle', __( 'Breadcrumbs Title', 'wordpress-seo' ), sprintf( esc_html__( 'The Breadcrumbs title is used in the breadcrumbs where this %s appears.', 'wordpress-seo' ), $term->taxonomy ), $tax_meta );
|
||||
$this->form_row( 'wpseo_bctitle', __( 'Breadcrumbs title', 'wordpress-seo' ), sprintf( esc_html__( 'The Breadcrumbs title is used in the breadcrumbs where this %s appears.', 'wordpress-seo' ), $term->taxonomy ), $tax_meta );
|
||||
}
|
||||
|
||||
$current = 'index';
|
||||
|
||||
@@ -0,0 +1,251 @@
|
||||
<?php
|
||||
|
||||
/**
|
||||
* @package Admin
|
||||
*/
|
||||
|
||||
if ( ! defined( 'WPSEO_VERSION' ) ) {
|
||||
header( 'Status: 403 Forbidden' );
|
||||
header( 'HTTP/1.1 403 Forbidden' );
|
||||
exit();
|
||||
}
|
||||
|
||||
if ( ! class_exists( 'Yoast_Plugin_Conflict' ) ) {
|
||||
|
||||
class Yoast_Plugin_Conflict {
|
||||
|
||||
/**
|
||||
* The plugins must be grouped per section.
|
||||
*
|
||||
* It's possible to check for each section if there are conflicting plugin
|
||||
*
|
||||
* @var array
|
||||
*/
|
||||
protected $plugins = array();
|
||||
|
||||
/**
|
||||
* All the current active plugins will be stored in this private var
|
||||
*
|
||||
* @var array
|
||||
*/
|
||||
protected $all_active_plugins = array();
|
||||
|
||||
/**
|
||||
* After searching for active plugins that are in $this->plugins the active plugins will be stored in this
|
||||
* property
|
||||
*
|
||||
* @var array
|
||||
*/
|
||||
protected $active_plugins = array();
|
||||
|
||||
/**
|
||||
* Property for holding instance of itself
|
||||
*
|
||||
* @var Yoast_Plugin_Conflict
|
||||
*/
|
||||
protected static $instance;
|
||||
|
||||
/**
|
||||
* For the use of singleton pattern. Create instance of itself and return his instance
|
||||
*
|
||||
* @param bool|string $classname Give the classname to initialize. If classname is false (empty) it will use it's own __CLASS__
|
||||
*
|
||||
* @return Yoast_Plugin_Conflict
|
||||
*/
|
||||
public static function get_instance( $class_name = false ) {
|
||||
|
||||
if ( is_null( self::$instance ) ) {
|
||||
if ( empty( $class_name ) ) {
|
||||
$class_name = __CLASS__;
|
||||
}
|
||||
|
||||
self::$instance = new $class_name();
|
||||
}
|
||||
|
||||
return self::$instance;
|
||||
}
|
||||
|
||||
/**
|
||||
* Setting instance, all active plugins and search for active plugins
|
||||
*
|
||||
* Protected constructor to prevent creating a new instance of the
|
||||
* *Singleton* via the `new` operator from outside of this class.
|
||||
*
|
||||
*/
|
||||
protected function __construct() {
|
||||
// Set active plugins
|
||||
$this->all_active_plugins = get_option( 'active_plugins' );
|
||||
|
||||
// Search for active plugins
|
||||
$this->search_active_plugins();
|
||||
}
|
||||
|
||||
/**
|
||||
* Check if there are conflicting plugins for given $plugin_section
|
||||
*
|
||||
* @param string $plugin_section
|
||||
*
|
||||
* @return bool
|
||||
*/
|
||||
public function check_for_conflicts( $plugin_section ) {
|
||||
|
||||
static $sections_checked;
|
||||
|
||||
if ( $sections_checked == null ) {
|
||||
$sections_checked = array();
|
||||
}
|
||||
|
||||
if ( ! in_array($plugin_section, $sections_checked ) ) {
|
||||
$sections_checked[] = $plugin_section;
|
||||
$has_conflicts = ( ! empty( $this->active_plugins[$plugin_section] ) );
|
||||
|
||||
return $has_conflicts;
|
||||
}
|
||||
else {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Getting all the conflicting plugins and return them as a string.
|
||||
*
|
||||
* This method will loop through all conflicting plugins to get the details of each plugin. The plugin name
|
||||
* will be taken from the details to parse a comma separated string, which can be use for by example a notice
|
||||
*
|
||||
* @param string $plugin_section
|
||||
*
|
||||
* @return string
|
||||
*/
|
||||
public function get_conflicting_plugins_as_string( $plugin_section ) {
|
||||
if ( ! function_exists( 'get_plugin_data' ) ) {
|
||||
require_once( ABSPATH . '/wp-admin/includes/plugin.php' );
|
||||
}
|
||||
|
||||
// Getting the active plugins by given section
|
||||
$plugins = $this->active_plugins[$plugin_section];
|
||||
|
||||
$plugin_names = array();
|
||||
foreach ( $plugins AS $plugin ) {
|
||||
$plugin_details = get_plugin_data( ABSPATH . '/wp-content/plugins/' . $plugin );
|
||||
|
||||
if ( $plugin_details['Name'] != '' ) {
|
||||
$plugin_names[] = $plugin_details['Name'];
|
||||
}
|
||||
}
|
||||
|
||||
if ( ! empty( $plugin_names ) ) {
|
||||
return implode( ', ', $plugin_names );
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Checks for given $plugin_sections for conflicts
|
||||
*
|
||||
* @param array $plugin_sections
|
||||
*/
|
||||
public function check_plugin_conflicts( $plugin_sections ) {
|
||||
foreach ( $plugin_sections AS $plugin_section => $readable_plugin_section ) {
|
||||
// Check for conflicting plugins and show error if there are conflicts
|
||||
if ( $this->check_for_conflicts( $plugin_section ) ) {
|
||||
$this->set_error( $plugin_section, $readable_plugin_section );
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Setting an error on the screen
|
||||
*
|
||||
* @param string $plugin_section
|
||||
* @param string $readable_plugin_section This is the value for the translation
|
||||
*/
|
||||
protected function set_error( $plugin_section, $readable_plugin_section ) {
|
||||
|
||||
$plugins_as_string = $this->get_conflicting_plugins_as_string( $plugin_section );
|
||||
$error_message = sprintf( __( 'The following plugins might cause (%1s) issues with Yoast WordPress SEO: %2s', 'wordpress-seo' ), $readable_plugin_section, $plugins_as_string );
|
||||
|
||||
// Add the message to the notifications center
|
||||
Yoast_Notification_Center::get()->add_notification( new Yoast_Notification( $error_message, 'error' ) );
|
||||
}
|
||||
|
||||
/**
|
||||
* Loop through the $this->plugins to check if one of the plugins is active.
|
||||
*
|
||||
* This method will store the active plugins in $this->active_plugins.
|
||||
*/
|
||||
protected function search_active_plugins() {
|
||||
foreach ( $this->plugins AS $plugin_section => $plugins ) {
|
||||
$this->check_plugins_active( $plugins, $plugin_section );
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Loop through plugins and check if each plugin is active
|
||||
*
|
||||
* @param array $plugins
|
||||
* @param string $plugin_section
|
||||
*/
|
||||
protected function check_plugins_active( $plugins, $plugin_section ) {
|
||||
foreach ( $plugins AS $plugin ) {
|
||||
if ( $this->check_plugin_is_active( $plugin ) ) {
|
||||
$this->add_active_plugin( $plugin_section, $plugin );
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Check if given plugin exists in array with all_active_plugins
|
||||
*
|
||||
* @param string $plugin
|
||||
*
|
||||
* @return bool
|
||||
*/
|
||||
protected function check_plugin_is_active( $plugin ) {
|
||||
|
||||
$is_plugin_active = in_array( $plugin, $this->all_active_plugins );
|
||||
|
||||
return $is_plugin_active;
|
||||
}
|
||||
|
||||
/**
|
||||
* Add plugin to the list of active plugins.
|
||||
*
|
||||
* This method will check first if key $plugin_section exists, if not it will create an empty array
|
||||
* If $plugin itself doesn't exist it will be added.
|
||||
*
|
||||
* @param string $plugin_section
|
||||
* @param string $plugin
|
||||
*/
|
||||
protected function add_active_plugin( $plugin_section, $plugin ) {
|
||||
|
||||
if ( ! array_key_exists( $plugin_section, $this->active_plugins ) ) {
|
||||
$this->active_plugins[$plugin_section] = array();
|
||||
}
|
||||
|
||||
if ( ! in_array( $plugin, $this->active_plugins[$plugin_section] ) ) {
|
||||
$this->active_plugins[$plugin_section][] = $plugin;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
* Search in $this->plugins for the given $plugin
|
||||
*
|
||||
* If there is a result it will return the plugin category
|
||||
*
|
||||
* @param string $plugin
|
||||
*
|
||||
* @return int|string
|
||||
*/
|
||||
protected function find_plugin_category( $plugin ) {
|
||||
|
||||
foreach ( $this->plugins AS $plugin_section => $plugins ) {
|
||||
if ( in_array( $plugin, $plugins ) ) {
|
||||
return $plugin_section;
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
@@ -0,0 +1,675 @@
|
||||
GNU GENERAL PUBLIC LICENSE
|
||||
Version 3, 29 June 2007
|
||||
|
||||
Copyright (C) 2007 Free Software Foundation, Inc. <http://fsf.org/>
|
||||
Everyone is permitted to copy and distribute verbatim copies
|
||||
of this license document, but changing it is not allowed.
|
||||
|
||||
Preamble
|
||||
|
||||
The GNU General Public License is a free, copyleft license for
|
||||
software and other kinds of works.
|
||||
|
||||
The licenses for most software and other practical works are designed
|
||||
to take away your freedom to share and change the works. By contrast,
|
||||
the GNU General Public License is intended to guarantee your freedom to
|
||||
share and change all versions of a program--to make sure it remains free
|
||||
software for all its users. We, the Free Software Foundation, use the
|
||||
GNU General Public License for most of our software; it applies also to
|
||||
any other work released this way by its authors. You can apply it to
|
||||
your programs, too.
|
||||
|
||||
When we speak of free software, we are referring to freedom, not
|
||||
price. Our General Public Licenses are designed to make sure that you
|
||||
have the freedom to distribute copies of free software (and charge for
|
||||
them if you wish), that you receive source code or can get it if you
|
||||
want it, that you can change the software or use pieces of it in new
|
||||
free programs, and that you know you can do these things.
|
||||
|
||||
To protect your rights, we need to prevent others from denying you
|
||||
these rights or asking you to surrender the rights. Therefore, you have
|
||||
certain responsibilities if you distribute copies of the software, or if
|
||||
you modify it: responsibilities to respect the freedom of others.
|
||||
|
||||
For example, if you distribute copies of such a program, whether
|
||||
gratis or for a fee, you must pass on to the recipients the same
|
||||
freedoms that you received. You must make sure that they, too, receive
|
||||
or can get the source code. And you must show them these terms so they
|
||||
know their rights.
|
||||
|
||||
Developers that use the GNU GPL protect your rights with two steps:
|
||||
(1) assert copyright on the software, and (2) offer you this License
|
||||
giving you legal permission to copy, distribute and/or modify it.
|
||||
|
||||
For the developers' and authors' protection, the GPL clearly explains
|
||||
that there is no warranty for this free software. For both users' and
|
||||
authors' sake, the GPL requires that modified versions be marked as
|
||||
changed, so that their problems will not be attributed erroneously to
|
||||
authors of previous versions.
|
||||
|
||||
Some devices are designed to deny users access to install or run
|
||||
modified versions of the software inside them, although the manufacturer
|
||||
can do so. This is fundamentally incompatible with the aim of
|
||||
protecting users' freedom to change the software. The systematic
|
||||
pattern of such abuse occurs in the area of products for individuals to
|
||||
use, which is precisely where it is most unacceptable. Therefore, we
|
||||
have designed this version of the GPL to prohibit the practice for those
|
||||
products. If such problems arise substantially in other domains, we
|
||||
stand ready to extend this provision to those domains in future versions
|
||||
of the GPL, as needed to protect the freedom of users.
|
||||
|
||||
Finally, every program is threatened constantly by software patents.
|
||||
States should not allow patents to restrict development and use of
|
||||
software on general-purpose computers, but in those that do, we wish to
|
||||
avoid the special danger that patents applied to a free program could
|
||||
make it effectively proprietary. To prevent this, the GPL assures that
|
||||
patents cannot be used to render the program non-free.
|
||||
|
||||
The precise terms and conditions for copying, distribution and
|
||||
modification follow.
|
||||
|
||||
TERMS AND CONDITIONS
|
||||
|
||||
0. Definitions.
|
||||
|
||||
"This License" refers to version 3 of the GNU General Public License.
|
||||
|
||||
"Copyright" also means copyright-like laws that apply to other kinds of
|
||||
works, such as semiconductor masks.
|
||||
|
||||
"The Program" refers to any copyrightable work licensed under this
|
||||
License. Each licensee is addressed as "you". "Licensees" and
|
||||
"recipients" may be individuals or organizations.
|
||||
|
||||
To "modify" a work means to copy from or adapt all or part of the work
|
||||
in a fashion requiring copyright permission, other than the making of an
|
||||
exact copy. The resulting work is called a "modified version" of the
|
||||
earlier work or a work "based on" the earlier work.
|
||||
|
||||
A "covered work" means either the unmodified Program or a work based
|
||||
on the Program.
|
||||
|
||||
To "propagate" a work means to do anything with it that, without
|
||||
permission, would make you directly or secondarily liable for
|
||||
infringement under applicable copyright law, except executing it on a
|
||||
computer or modifying a private copy. Propagation includes copying,
|
||||
distribution (with or without modification), making available to the
|
||||
public, and in some countries other activities as well.
|
||||
|
||||
To "convey" a work means any kind of propagation that enables other
|
||||
parties to make or receive copies. Mere interaction with a user through
|
||||
a computer network, with no transfer of a copy, is not conveying.
|
||||
|
||||
An interactive user interface displays "Appropriate Legal Notices"
|
||||
to the extent that it includes a convenient and prominently visible
|
||||
feature that (1) displays an appropriate copyright notice, and (2)
|
||||
tells the user that there is no warranty for the work (except to the
|
||||
extent that warranties are provided), that licensees may convey the
|
||||
work under this License, and how to view a copy of this License. If
|
||||
the interface presents a list of user commands or options, such as a
|
||||
menu, a prominent item in the list meets this criterion.
|
||||
|
||||
1. Source Code.
|
||||
|
||||
The "source code" for a work means the preferred form of the work
|
||||
for making modifications to it. "Object code" means any non-source
|
||||
form of a work.
|
||||
|
||||
A "Standard Interface" means an interface that either is an official
|
||||
standard defined by a recognized standards body, or, in the case of
|
||||
interfaces specified for a particular programming language, one that
|
||||
is widely used among developers working in that language.
|
||||
|
||||
The "System Libraries" of an executable work include anything, other
|
||||
than the work as a whole, that (a) is included in the normal form of
|
||||
packaging a Major Component, but which is not part of that Major
|
||||
Component, and (b) serves only to enable use of the work with that
|
||||
Major Component, or to implement a Standard Interface for which an
|
||||
implementation is available to the public in source code form. A
|
||||
"Major Component", in this context, means a major essential component
|
||||
(kernel, window system, and so on) of the specific operating system
|
||||
(if any) on which the executable work runs, or a compiler used to
|
||||
produce the work, or an object code interpreter used to run it.
|
||||
|
||||
The "Corresponding Source" for a work in object code form means all
|
||||
the source code needed to generate, install, and (for an executable
|
||||
work) run the object code and to modify the work, including scripts to
|
||||
control those activities. However, it does not include the work's
|
||||
System Libraries, or general-purpose tools or generally available free
|
||||
programs which are used unmodified in performing those activities but
|
||||
which are not part of the work. For example, Corresponding Source
|
||||
includes interface definition files associated with source files for
|
||||
the work, and the source code for shared libraries and dynamically
|
||||
linked subprograms that the work is specifically designed to require,
|
||||
such as by intimate data communication or control flow between those
|
||||
subprograms and other parts of the work.
|
||||
|
||||
The Corresponding Source need not include anything that users
|
||||
can regenerate automatically from other parts of the Corresponding
|
||||
Source.
|
||||
|
||||
The Corresponding Source for a work in source code form is that
|
||||
same work.
|
||||
|
||||
2. Basic Permissions.
|
||||
|
||||
All rights granted under this License are granted for the term of
|
||||
copyright on the Program, and are irrevocable provided the stated
|
||||
conditions are met. This License explicitly affirms your unlimited
|
||||
permission to run the unmodified Program. The output from running a
|
||||
covered work is covered by this License only if the output, given its
|
||||
content, constitutes a covered work. This License acknowledges your
|
||||
rights of fair use or other equivalent, as provided by copyright law.
|
||||
|
||||
You may make, run and propagate covered works that you do not
|
||||
convey, without conditions so long as your license otherwise remains
|
||||
in force. You may convey covered works to others for the sole purpose
|
||||
of having them make modifications exclusively for you, or provide you
|
||||
with facilities for running those works, provided that you comply with
|
||||
the terms of this License in conveying all material for which you do
|
||||
not control copyright. Those thus making or running the covered works
|
||||
for you must do so exclusively on your behalf, under your direction
|
||||
and control, on terms that prohibit them from making any copies of
|
||||
your copyrighted material outside their relationship with you.
|
||||
|
||||
Conveying under any other circumstances is permitted solely under
|
||||
the conditions stated below. Sublicensing is not allowed; section 10
|
||||
makes it unnecessary.
|
||||
|
||||
3. Protecting Users' Legal Rights From Anti-Circumvention Law.
|
||||
|
||||
No covered work shall be deemed part of an effective technological
|
||||
measure under any applicable law fulfilling obligations under article
|
||||
11 of the WIPO copyright treaty adopted on 20 December 1996, or
|
||||
similar laws prohibiting or restricting circumvention of such
|
||||
measures.
|
||||
|
||||
When you convey a covered work, you waive any legal power to forbid
|
||||
circumvention of technological measures to the extent such circumvention
|
||||
is effected by exercising rights under this License with respect to
|
||||
the covered work, and you disclaim any intention to limit operation or
|
||||
modification of the work as a means of enforcing, against the work's
|
||||
users, your or third parties' legal rights to forbid circumvention of
|
||||
technological measures.
|
||||
|
||||
4. Conveying Verbatim Copies.
|
||||
|
||||
You may convey verbatim copies of the Program's source code as you
|
||||
receive it, in any medium, provided that you conspicuously and
|
||||
appropriately publish on each copy an appropriate copyright notice;
|
||||
keep intact all notices stating that this License and any
|
||||
non-permissive terms added in accord with section 7 apply to the code;
|
||||
keep intact all notices of the absence of any warranty; and give all
|
||||
recipients a copy of this License along with the Program.
|
||||
|
||||
You may charge any price or no price for each copy that you convey,
|
||||
and you may offer support or warranty protection for a fee.
|
||||
|
||||
5. Conveying Modified Source Versions.
|
||||
|
||||
You may convey a work based on the Program, or the modifications to
|
||||
produce it from the Program, in the form of source code under the
|
||||
terms of section 4, provided that you also meet all of these conditions:
|
||||
|
||||
a) The work must carry prominent notices stating that you modified
|
||||
it, and giving a relevant date.
|
||||
|
||||
b) The work must carry prominent notices stating that it is
|
||||
released under this License and any conditions added under section
|
||||
7. This requirement modifies the requirement in section 4 to
|
||||
"keep intact all notices".
|
||||
|
||||
c) You must license the entire work, as a whole, under this
|
||||
License to anyone who comes into possession of a copy. This
|
||||
License will therefore apply, along with any applicable section 7
|
||||
additional terms, to the whole of the work, and all its parts,
|
||||
regardless of how they are packaged. This License gives no
|
||||
permission to license the work in any other way, but it does not
|
||||
invalidate such permission if you have separately received it.
|
||||
|
||||
d) If the work has interactive user interfaces, each must display
|
||||
Appropriate Legal Notices; however, if the Program has interactive
|
||||
interfaces that do not display Appropriate Legal Notices, your
|
||||
work need not make them do so.
|
||||
|
||||
A compilation of a covered work with other separate and independent
|
||||
works, which are not by their nature extensions of the covered work,
|
||||
and which are not combined with it such as to form a larger program,
|
||||
in or on a volume of a storage or distribution medium, is called an
|
||||
"aggregate" if the compilation and its resulting copyright are not
|
||||
used to limit the access or legal rights of the compilation's users
|
||||
beyond what the individual works permit. Inclusion of a covered work
|
||||
in an aggregate does not cause this License to apply to the other
|
||||
parts of the aggregate.
|
||||
|
||||
6. Conveying Non-Source Forms.
|
||||
|
||||
You may convey a covered work in object code form under the terms
|
||||
of sections 4 and 5, provided that you also convey the
|
||||
machine-readable Corresponding Source under the terms of this License,
|
||||
in one of these ways:
|
||||
|
||||
a) Convey the object code in, or embodied in, a physical product
|
||||
(including a physical distribution medium), accompanied by the
|
||||
Corresponding Source fixed on a durable physical medium
|
||||
customarily used for software interchange.
|
||||
|
||||
b) Convey the object code in, or embodied in, a physical product
|
||||
(including a physical distribution medium), accompanied by a
|
||||
written offer, valid for at least three years and valid for as
|
||||
long as you offer spare parts or customer support for that product
|
||||
model, to give anyone who possesses the object code either (1) a
|
||||
copy of the Corresponding Source for all the software in the
|
||||
product that is covered by this License, on a durable physical
|
||||
medium customarily used for software interchange, for a price no
|
||||
more than your reasonable cost of physically performing this
|
||||
conveying of source, or (2) access to copy the
|
||||
Corresponding Source from a network server at no charge.
|
||||
|
||||
c) Convey individual copies of the object code with a copy of the
|
||||
written offer to provide the Corresponding Source. This
|
||||
alternative is allowed only occasionally and noncommercially, and
|
||||
only if you received the object code with such an offer, in accord
|
||||
with subsection 6b.
|
||||
|
||||
d) Convey the object code by offering access from a designated
|
||||
place (gratis or for a charge), and offer equivalent access to the
|
||||
Corresponding Source in the same way through the same place at no
|
||||
further charge. You need not require recipients to copy the
|
||||
Corresponding Source along with the object code. If the place to
|
||||
copy the object code is a network server, the Corresponding Source
|
||||
may be on a different server (operated by you or a third party)
|
||||
that supports equivalent copying facilities, provided you maintain
|
||||
clear directions next to the object code saying where to find the
|
||||
Corresponding Source. Regardless of what server hosts the
|
||||
Corresponding Source, you remain obligated to ensure that it is
|
||||
available for as long as needed to satisfy these requirements.
|
||||
|
||||
e) Convey the object code using peer-to-peer transmission, provided
|
||||
you inform other peers where the object code and Corresponding
|
||||
Source of the work are being offered to the general public at no
|
||||
charge under subsection 6d.
|
||||
|
||||
A separable portion of the object code, whose source code is excluded
|
||||
from the Corresponding Source as a System Library, need not be
|
||||
included in conveying the object code work.
|
||||
|
||||
A "User Product" is either (1) a "consumer product", which means any
|
||||
tangible personal property which is normally used for personal, family,
|
||||
or household purposes, or (2) anything designed or sold for incorporation
|
||||
into a dwelling. In determining whether a product is a consumer product,
|
||||
doubtful cases shall be resolved in favor of coverage. For a particular
|
||||
product received by a particular user, "normally used" refers to a
|
||||
typical or common use of that class of product, regardless of the status
|
||||
of the particular user or of the way in which the particular user
|
||||
actually uses, or expects or is expected to use, the product. A product
|
||||
is a consumer product regardless of whether the product has substantial
|
||||
commercial, industrial or non-consumer uses, unless such uses represent
|
||||
the only significant mode of use of the product.
|
||||
|
||||
"Installation Information" for a User Product means any methods,
|
||||
procedures, authorization keys, or other information required to install
|
||||
and execute modified versions of a covered work in that User Product from
|
||||
a modified version of its Corresponding Source. The information must
|
||||
suffice to ensure that the continued functioning of the modified object
|
||||
code is in no case prevented or interfered with solely because
|
||||
modification has been made.
|
||||
|
||||
If you convey an object code work under this section in, or with, or
|
||||
specifically for use in, a User Product, and the conveying occurs as
|
||||
part of a transaction in which the right of possession and use of the
|
||||
User Product is transferred to the recipient in perpetuity or for a
|
||||
fixed term (regardless of how the transaction is characterized), the
|
||||
Corresponding Source conveyed under this section must be accompanied
|
||||
by the Installation Information. But this requirement does not apply
|
||||
if neither you nor any third party retains the ability to install
|
||||
modified object code on the User Product (for example, the work has
|
||||
been installed in ROM).
|
||||
|
||||
The requirement to provide Installation Information does not include a
|
||||
requirement to continue to provide support service, warranty, or updates
|
||||
for a work that has been modified or installed by the recipient, or for
|
||||
the User Product in which it has been modified or installed. Access to a
|
||||
network may be denied when the modification itself materially and
|
||||
adversely affects the operation of the network or violates the rules and
|
||||
protocols for communication across the network.
|
||||
|
||||
Corresponding Source conveyed, and Installation Information provided,
|
||||
in accord with this section must be in a format that is publicly
|
||||
documented (and with an implementation available to the public in
|
||||
source code form), and must require no special password or key for
|
||||
unpacking, reading or copying.
|
||||
|
||||
7. Additional Terms.
|
||||
|
||||
"Additional permissions" are terms that supplement the terms of this
|
||||
License by making exceptions from one or more of its conditions.
|
||||
Additional permissions that are applicable to the entire Program shall
|
||||
be treated as though they were included in this License, to the extent
|
||||
that they are valid under applicable law. If additional permissions
|
||||
apply only to part of the Program, that part may be used separately
|
||||
under those permissions, but the entire Program remains governed by
|
||||
this License without regard to the additional permissions.
|
||||
|
||||
When you convey a copy of a covered work, you may at your option
|
||||
remove any additional permissions from that copy, or from any part of
|
||||
it. (Additional permissions may be written to require their own
|
||||
removal in certain cases when you modify the work.) You may place
|
||||
additional permissions on material, added by you to a covered work,
|
||||
for which you have or can give appropriate copyright permission.
|
||||
|
||||
Notwithstanding any other provision of this License, for material you
|
||||
add to a covered work, you may (if authorized by the copyright holders of
|
||||
that material) supplement the terms of this License with terms:
|
||||
|
||||
a) Disclaiming warranty or limiting liability differently from the
|
||||
terms of sections 15 and 16 of this License; or
|
||||
|
||||
b) Requiring preservation of specified reasonable legal notices or
|
||||
author attributions in that material or in the Appropriate Legal
|
||||
Notices displayed by works containing it; or
|
||||
|
||||
c) Prohibiting misrepresentation of the origin of that material, or
|
||||
requiring that modified versions of such material be marked in
|
||||
reasonable ways as different from the original version; or
|
||||
|
||||
d) Limiting the use for publicity purposes of names of licensors or
|
||||
authors of the material; or
|
||||
|
||||
e) Declining to grant rights under trademark law for use of some
|
||||
trade names, trademarks, or service marks; or
|
||||
|
||||
f) Requiring indemnification of licensors and authors of that
|
||||
material by anyone who conveys the material (or modified versions of
|
||||
it) with contractual assumptions of liability to the recipient, for
|
||||
any liability that these contractual assumptions directly impose on
|
||||
those licensors and authors.
|
||||
|
||||
All other non-permissive additional terms are considered "further
|
||||
restrictions" within the meaning of section 10. If the Program as you
|
||||
received it, or any part of it, contains a notice stating that it is
|
||||
governed by this License along with a term that is a further
|
||||
restriction, you may remove that term. If a license document contains
|
||||
a further restriction but permits relicensing or conveying under this
|
||||
License, you may add to a covered work material governed by the terms
|
||||
of that license document, provided that the further restriction does
|
||||
not survive such relicensing or conveying.
|
||||
|
||||
If you add terms to a covered work in accord with this section, you
|
||||
must place, in the relevant source files, a statement of the
|
||||
additional terms that apply to those files, or a notice indicating
|
||||
where to find the applicable terms.
|
||||
|
||||
Additional terms, permissive or non-permissive, may be stated in the
|
||||
form of a separately written license, or stated as exceptions;
|
||||
the above requirements apply either way.
|
||||
|
||||
8. Termination.
|
||||
|
||||
You may not propagate or modify a covered work except as expressly
|
||||
provided under this License. Any attempt otherwise to propagate or
|
||||
modify it is void, and will automatically terminate your rights under
|
||||
this License (including any patent licenses granted under the third
|
||||
paragraph of section 11).
|
||||
|
||||
However, if you cease all violation of this License, then your
|
||||
license from a particular copyright holder is reinstated (a)
|
||||
provisionally, unless and until the copyright holder explicitly and
|
||||
finally terminates your license, and (b) permanently, if the copyright
|
||||
holder fails to notify you of the violation by some reasonable means
|
||||
prior to 60 days after the cessation.
|
||||
|
||||
Moreover, your license from a particular copyright holder is
|
||||
reinstated permanently if the copyright holder notifies you of the
|
||||
violation by some reasonable means, this is the first time you have
|
||||
received notice of violation of this License (for any work) from that
|
||||
copyright holder, and you cure the violation prior to 30 days after
|
||||
your receipt of the notice.
|
||||
|
||||
Termination of your rights under this section does not terminate the
|
||||
licenses of parties who have received copies or rights from you under
|
||||
this License. If your rights have been terminated and not permanently
|
||||
reinstated, you do not qualify to receive new licenses for the same
|
||||
material under section 10.
|
||||
|
||||
9. Acceptance Not Required for Having Copies.
|
||||
|
||||
You are not required to accept this License in order to receive or
|
||||
run a copy of the Program. Ancillary propagation of a covered work
|
||||
occurring solely as a consequence of using peer-to-peer transmission
|
||||
to receive a copy likewise does not require acceptance. However,
|
||||
nothing other than this License grants you permission to propagate or
|
||||
modify any covered work. These actions infringe copyright if you do
|
||||
not accept this License. Therefore, by modifying or propagating a
|
||||
covered work, you indicate your acceptance of this License to do so.
|
||||
|
||||
10. Automatic Licensing of Downstream Recipients.
|
||||
|
||||
Each time you convey a covered work, the recipient automatically
|
||||
receives a license from the original licensors, to run, modify and
|
||||
propagate that work, subject to this License. You are not responsible
|
||||
for enforcing compliance by third parties with this License.
|
||||
|
||||
An "entity transaction" is a transaction transferring control of an
|
||||
organization, or substantially all assets of one, or subdividing an
|
||||
organization, or merging organizations. If propagation of a covered
|
||||
work results from an entity transaction, each party to that
|
||||
transaction who receives a copy of the work also receives whatever
|
||||
licenses to the work the party's predecessor in interest had or could
|
||||
give under the previous paragraph, plus a right to possession of the
|
||||
Corresponding Source of the work from the predecessor in interest, if
|
||||
the predecessor has it or can get it with reasonable efforts.
|
||||
|
||||
You may not impose any further restrictions on the exercise of the
|
||||
rights granted or affirmed under this License. For example, you may
|
||||
not impose a license fee, royalty, or other charge for exercise of
|
||||
rights granted under this License, and you may not initiate litigation
|
||||
(including a cross-claim or counterclaim in a lawsuit) alleging that
|
||||
any patent claim is infringed by making, using, selling, offering for
|
||||
sale, or importing the Program or any portion of it.
|
||||
|
||||
11. Patents.
|
||||
|
||||
A "contributor" is a copyright holder who authorizes use under this
|
||||
License of the Program or a work on which the Program is based. The
|
||||
work thus licensed is called the contributor's "contributor version".
|
||||
|
||||
A contributor's "essential patent claims" are all patent claims
|
||||
owned or controlled by the contributor, whether already acquired or
|
||||
hereafter acquired, that would be infringed by some manner, permitted
|
||||
by this License, of making, using, or selling its contributor version,
|
||||
but do not include claims that would be infringed only as a
|
||||
consequence of further modification of the contributor version. For
|
||||
purposes of this definition, "control" includes the right to grant
|
||||
patent sublicenses in a manner consistent with the requirements of
|
||||
this License.
|
||||
|
||||
Each contributor grants you a non-exclusive, worldwide, royalty-free
|
||||
patent license under the contributor's essential patent claims, to
|
||||
make, use, sell, offer for sale, import and otherwise run, modify and
|
||||
propagate the contents of its contributor version.
|
||||
|
||||
In the following three paragraphs, a "patent license" is any express
|
||||
agreement or commitment, however denominated, not to enforce a patent
|
||||
(such as an express permission to practice a patent or covenant not to
|
||||
sue for patent infringement). To "grant" such a patent license to a
|
||||
party means to make such an agreement or commitment not to enforce a
|
||||
patent against the party.
|
||||
|
||||
If you convey a covered work, knowingly relying on a patent license,
|
||||
and the Corresponding Source of the work is not available for anyone
|
||||
to copy, free of charge and under the terms of this License, through a
|
||||
publicly available network server or other readily accessible means,
|
||||
then you must either (1) cause the Corresponding Source to be so
|
||||
available, or (2) arrange to deprive yourself of the benefit of the
|
||||
patent license for this particular work, or (3) arrange, in a manner
|
||||
consistent with the requirements of this License, to extend the patent
|
||||
license to downstream recipients. "Knowingly relying" means you have
|
||||
actual knowledge that, but for the patent license, your conveying the
|
||||
covered work in a country, or your recipient's use of the covered work
|
||||
in a country, would infringe one or more identifiable patents in that
|
||||
country that you have reason to believe are valid.
|
||||
|
||||
If, pursuant to or in connection with a single transaction or
|
||||
arrangement, you convey, or propagate by procuring conveyance of, a
|
||||
covered work, and grant a patent license to some of the parties
|
||||
receiving the covered work authorizing them to use, propagate, modify
|
||||
or convey a specific copy of the covered work, then the patent license
|
||||
you grant is automatically extended to all recipients of the covered
|
||||
work and works based on it.
|
||||
|
||||
A patent license is "discriminatory" if it does not include within
|
||||
the scope of its coverage, prohibits the exercise of, or is
|
||||
conditioned on the non-exercise of one or more of the rights that are
|
||||
specifically granted under this License. You may not convey a covered
|
||||
work if you are a party to an arrangement with a third party that is
|
||||
in the business of distributing software, under which you make payment
|
||||
to the third party based on the extent of your activity of conveying
|
||||
the work, and under which the third party grants, to any of the
|
||||
parties who would receive the covered work from you, a discriminatory
|
||||
patent license (a) in connection with copies of the covered work
|
||||
conveyed by you (or copies made from those copies), or (b) primarily
|
||||
for and in connection with specific products or compilations that
|
||||
contain the covered work, unless you entered into that arrangement,
|
||||
or that patent license was granted, prior to 28 March 2007.
|
||||
|
||||
Nothing in this License shall be construed as excluding or limiting
|
||||
any implied license or other defenses to infringement that may
|
||||
otherwise be available to you under applicable patent law.
|
||||
|
||||
12. No Surrender of Others' Freedom.
|
||||
|
||||
If conditions are imposed on you (whether by court order, agreement or
|
||||
otherwise) that contradict the conditions of this License, they do not
|
||||
excuse you from the conditions of this License. If you cannot convey a
|
||||
covered work so as to satisfy simultaneously your obligations under this
|
||||
License and any other pertinent obligations, then as a consequence you may
|
||||
not convey it at all. For example, if you agree to terms that obligate you
|
||||
to collect a royalty for further conveying from those to whom you convey
|
||||
the Program, the only way you could satisfy both those terms and this
|
||||
License would be to refrain entirely from conveying the Program.
|
||||
|
||||
13. Use with the GNU Affero General Public License.
|
||||
|
||||
Notwithstanding any other provision of this License, you have
|
||||
permission to link or combine any covered work with a work licensed
|
||||
under version 3 of the GNU Affero General Public License into a single
|
||||
combined work, and to convey the resulting work. The terms of this
|
||||
License will continue to apply to the part which is the covered work,
|
||||
but the special requirements of the GNU Affero General Public License,
|
||||
section 13, concerning interaction through a network will apply to the
|
||||
combination as such.
|
||||
|
||||
14. Revised Versions of this License.
|
||||
|
||||
The Free Software Foundation may publish revised and/or new versions of
|
||||
the GNU General Public License from time to time. Such new versions will
|
||||
be similar in spirit to the present version, but may differ in detail to
|
||||
address new problems or concerns.
|
||||
|
||||
Each version is given a distinguishing version number. If the
|
||||
Program specifies that a certain numbered version of the GNU General
|
||||
Public License "or any later version" applies to it, you have the
|
||||
option of following the terms and conditions either of that numbered
|
||||
version or of any later version published by the Free Software
|
||||
Foundation. If the Program does not specify a version number of the
|
||||
GNU General Public License, you may choose any version ever published
|
||||
by the Free Software Foundation.
|
||||
|
||||
If the Program specifies that a proxy can decide which future
|
||||
versions of the GNU General Public License can be used, that proxy's
|
||||
public statement of acceptance of a version permanently authorizes you
|
||||
to choose that version for the Program.
|
||||
|
||||
Later license versions may give you additional or different
|
||||
permissions. However, no additional obligations are imposed on any
|
||||
author or copyright holder as a result of your choosing to follow a
|
||||
later version.
|
||||
|
||||
15. Disclaimer of Warranty.
|
||||
|
||||
THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY
|
||||
APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT
|
||||
HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY
|
||||
OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO,
|
||||
THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
|
||||
PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM
|
||||
IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF
|
||||
ALL NECESSARY SERVICING, REPAIR OR CORRECTION.
|
||||
|
||||
16. Limitation of Liability.
|
||||
|
||||
IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING
|
||||
WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MODIFIES AND/OR CONVEYS
|
||||
THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY
|
||||
GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE
|
||||
USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF
|
||||
DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD
|
||||
PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS),
|
||||
EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF
|
||||
SUCH DAMAGES.
|
||||
|
||||
17. Interpretation of Sections 15 and 16.
|
||||
|
||||
If the disclaimer of warranty and limitation of liability provided
|
||||
above cannot be given local legal effect according to their terms,
|
||||
reviewing courts shall apply local law that most closely approximates
|
||||
an absolute waiver of all civil liability in connection with the
|
||||
Program, unless a warranty or assumption of liability accompanies a
|
||||
copy of the Program in return for a fee.
|
||||
|
||||
END OF TERMS AND CONDITIONS
|
||||
|
||||
How to Apply These Terms to Your New Programs
|
||||
|
||||
If you develop a new program, and you want it to be of the greatest
|
||||
possible use to the public, the best way to achieve this is to make it
|
||||
free software which everyone can redistribute and change under these terms.
|
||||
|
||||
To do so, attach the following notices to the program. It is safest
|
||||
to attach them to the start of each source file to most effectively
|
||||
state the exclusion of warranty; and each file should have at least
|
||||
the "copyright" line and a pointer to where the full notice is found.
|
||||
|
||||
{one line to give the program's name and a brief idea of what it does.}
|
||||
Copyright (C) {year} {name of author}
|
||||
|
||||
This program is free software: you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
the Free Software Foundation, either version 3 of the License, or
|
||||
(at your option) any later version.
|
||||
|
||||
This program is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
Also add information on how to contact you by electronic and paper mail.
|
||||
|
||||
If the program does terminal interaction, make it output a short
|
||||
notice like this when it starts in an interactive mode:
|
||||
|
||||
{project} Copyright (C) {year} {fullname}
|
||||
This program comes with ABSOLUTELY NO WARRANTY; for details type `show w'.
|
||||
This is free software, and you are welcome to redistribute it
|
||||
under certain conditions; type `show c' for details.
|
||||
|
||||
The hypothetical commands `show w' and `show c' should show the appropriate
|
||||
parts of the General Public License. Of course, your program's commands
|
||||
might be different; for a GUI interface, you would use an "about box".
|
||||
|
||||
You should also get your employer (if you work as a programmer) or school,
|
||||
if any, to sign a "copyright disclaimer" for the program, if necessary.
|
||||
For more information on this, and how to apply and follow the GNU GPL, see
|
||||
<http://www.gnu.org/licenses/>.
|
||||
|
||||
The GNU General Public License does not permit incorporating your program
|
||||
into proprietary programs. If your program is a subroutine library, you
|
||||
may consider it more useful to permit linking proprietary applications with
|
||||
the library. If this is what you want to do, use the GNU Lesser General
|
||||
Public License instead of this License. But first, please read
|
||||
<http://www.gnu.org/philosophy/why-not-lgpl.html>.
|
||||
|
||||
@@ -0,0 +1,28 @@
|
||||
[](https://codeclimate.com/github/Yoast/i18n-module)
|
||||
|
||||
# Yoast i18n module
|
||||
Promote your own translation site for people who are using your plugin in another language than `en_US`.
|
||||
|
||||
## Example of the rendered promo box
|
||||
|
||||

|
||||
|
||||
The image, the name of your plugin and the name of your translation project are all configurable (see example below). The name of the language is retrieved from your GlotPress install, as is the percentage translated. The box doesn't display when a language has been translated for 90% or more.
|
||||
|
||||
## How to use this module
|
||||
Just include the library as a submodule, make sure the class is loaded and instantiate it like this:
|
||||
|
||||
```php
|
||||
$wpseo_i18n = new yoast_i18n(
|
||||
array(
|
||||
'textdomain' => 'wordpress-seo',
|
||||
'project_slug' => 'wordpress-seo',
|
||||
'plugin_name' => 'WordPress SEO by Yoast',
|
||||
'hook' => 'wpseo_admin_footer',
|
||||
'glotpress_url' => 'http://translate.yoast.com',
|
||||
'glotpress_name' => 'Yoast Translate',
|
||||
'glotpress_logo' => 'https://cdn.yoast.com/wp-content/uploads/i18n-images/Yoast_Translate.svg',
|
||||
'register_url ' => 'http://translate.yoast.com/projects#utm_source=plugin&utm_medium=promo-box&utm_campaign=i18n-promo',
|
||||
)
|
||||
);
|
||||
```
|
||||
@@ -0,0 +1,278 @@
|
||||
<?php
|
||||
|
||||
/**
|
||||
* This class defines a promo box and checks your translation site's API for stats about it, then shows them to the user.
|
||||
*/
|
||||
class yoast_i18n {
|
||||
|
||||
/**
|
||||
* Your translation site's logo
|
||||
*
|
||||
* @var string
|
||||
*/
|
||||
private $glotpress_logo;
|
||||
|
||||
/**
|
||||
* Your translation site's name
|
||||
*
|
||||
* @var string
|
||||
*/
|
||||
private $glotpress_name;
|
||||
|
||||
/**
|
||||
* Your translation site's URL
|
||||
*
|
||||
* @var string
|
||||
*/
|
||||
private $glotpress_url;
|
||||
|
||||
/**
|
||||
* Hook where you want to show the promo box
|
||||
*
|
||||
* @var string
|
||||
*/
|
||||
private $hook;
|
||||
|
||||
/**
|
||||
* Will contain the site's locale
|
||||
*
|
||||
* @access private
|
||||
* @var string
|
||||
*/
|
||||
private $locale;
|
||||
|
||||
/**
|
||||
* Will contain the locale's name, obtained from yoru translation site
|
||||
*
|
||||
* @access private
|
||||
* @var string
|
||||
*/
|
||||
private $locale_name;
|
||||
|
||||
/**
|
||||
* Will contain the percentage translated for the plugin translation project in the locale
|
||||
*
|
||||
* @access private
|
||||
* @var int
|
||||
*/
|
||||
private $percent_translated;
|
||||
|
||||
/**
|
||||
* Name of your plugin
|
||||
*
|
||||
* @var string
|
||||
*/
|
||||
private $plugin_name;
|
||||
|
||||
/**
|
||||
* Project slug for the project on your translation site
|
||||
*
|
||||
* @var string
|
||||
*/
|
||||
private $project_slug;
|
||||
|
||||
/**
|
||||
* URL to point to for registration links
|
||||
*
|
||||
* @var string
|
||||
*/
|
||||
private $register_url;
|
||||
|
||||
/**
|
||||
* Your plugins textdomain
|
||||
*
|
||||
* @var string
|
||||
*/
|
||||
private $textdomain;
|
||||
|
||||
/**
|
||||
* Indicates whether there's a translation available at all.
|
||||
*
|
||||
* @access private
|
||||
* @var bool
|
||||
*/
|
||||
private $translation_exists;
|
||||
|
||||
/**
|
||||
* Indicates whether the translation's loaded.
|
||||
*
|
||||
* @access private
|
||||
* @var bool
|
||||
*/
|
||||
private $translation_loaded;
|
||||
|
||||
/**
|
||||
* Class constructor
|
||||
*
|
||||
* @param array $args Contains the settings for the class.
|
||||
*/
|
||||
public function __construct( $args ) {
|
||||
if ( ! is_admin() ) {
|
||||
return;
|
||||
}
|
||||
|
||||
$this->locale = get_locale();
|
||||
if ( 'en_US' === $this->locale ) {
|
||||
return;
|
||||
}
|
||||
|
||||
$this->init( $args );
|
||||
|
||||
if ( ! $this->hide_promo() ) {
|
||||
add_action( $this->hook, array( $this, 'promo' ) );
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* This is where you decide where to display the messages and where you set the plugin specific variables.
|
||||
*
|
||||
* @access private
|
||||
*
|
||||
* @param array $args
|
||||
*/
|
||||
private function init( $args ) {
|
||||
foreach ( $args as $key => $arg ) {
|
||||
$this->$key = $arg;
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Check whether the promo should be hidden or not
|
||||
*
|
||||
* @access private
|
||||
*
|
||||
* @return bool
|
||||
*/
|
||||
private function hide_promo() {
|
||||
$hide_promo = get_transient( 'yoast_i18n_' . $this->project_slug . '_promo_hide' );
|
||||
if ( ! $hide_promo ) {
|
||||
if ( filter_input( INPUT_GET, 'remove_i18n_promo', FILTER_NULL_ON_FAILURE ) ) {
|
||||
// No expiration time, so this would normally not expire, but it wouldn't be copied to other sites etc.
|
||||
set_transient( 'yoast_i18n_' . $this->project_slug . '_promo_hide', true );
|
||||
$hide_promo = true;
|
||||
}
|
||||
}
|
||||
|
||||
return $hide_promo;
|
||||
}
|
||||
|
||||
/**
|
||||
* Generates a promo message
|
||||
*
|
||||
* @access private
|
||||
*
|
||||
* @return bool|string $message
|
||||
*/
|
||||
private function promo_message() {
|
||||
$message = false;
|
||||
|
||||
if ( $this->translation_loaded && $this->percent_translated < 90 ) {
|
||||
$message = __( 'As you can see, there is a translation of this plugin in %1$s. This translation is currently %3$d%% complete. We need your help to make it complete and to fix any errors. Please register at %4$s to help complete the translation to %1$s!', $this->textdomain );
|
||||
} else if ( ! $this->translation_loaded && $this->translation_exists ) {
|
||||
$message = __( 'You\'re using WordPress in %1$s. While %2$s has been translated to %1$s for %3$d%%, it\'s not been shipped with the plugin yet. You can help! Register at %4$s to help complete the translation to %1$s!', $this->textdomain );
|
||||
} else if ( ! $this->translation_loaded && ! $this->translation_exists ) {
|
||||
$message = __( 'You\'re using WordPress in a language we don\'t support yet. We\'d love for %2$s to be translated in that language too, but unfortunately, it isn\'t right now. You can change that! Register at %4$s to help translate it!', $this->textdomain );
|
||||
}
|
||||
|
||||
$registration_link = sprintf( '<a href="%1$s">%2$s</a>', esc_url( $this->register_url ), esc_html( $this->glotpress_name ) );
|
||||
$message = sprintf( $message, esc_html( $this->locale_name ), esc_html( $this->plugin_name ), $this->percent_translated, $registration_link );
|
||||
|
||||
return $message;
|
||||
}
|
||||
|
||||
/**
|
||||
* Outputs a promo box
|
||||
*/
|
||||
public function promo() {
|
||||
$this->translation_details();
|
||||
|
||||
$message = $this->promo_message();
|
||||
|
||||
if ( $message ) {
|
||||
echo '<div id="i18n_promo_box" style="border:1px solid #ccc;background-color:#fff;padding:10px;max-width:650px;">';
|
||||
echo '<a href="' . add_query_arg( array( 'remove_i18n_promo' => '1' ) ) . '" style="color:#333;text-decoration:none;font-weight:bold;font-size:16px;border:1px solid #ccc;padding:1px 4px;" class="alignright">X</a>';
|
||||
echo '<h2>' . sprintf( __( 'Translation of %s', $this->textdomain ), $this->plugin_name ) . '</h2>';
|
||||
if ( isset( $this->glotpress_logo ) && '' != $this->glotpress_logo ) {
|
||||
echo '<a href="' . $this->register_url . '"><img class="alignright" style="margin:15px 5px 5px 5px;width:200px;" src="' . $this->glotpress_logo . '" alt="' . $this->glotpress_name . '"/></a>';
|
||||
}
|
||||
echo '<p>' . $message . '</p>';
|
||||
echo '<p><a href="' . $this->register_url . '">' . __( 'Register now »', $this->textdomain ) . '</a></p>';
|
||||
echo '</div>';
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Try to find the transient for the translation set or retrieve them.
|
||||
*
|
||||
* @access private
|
||||
*
|
||||
* @return object|null
|
||||
*/
|
||||
private function find_or_initialize_translation_details() {
|
||||
$set = get_transient( 'yoast_i18n_' . $this->project_slug );
|
||||
|
||||
if ( ! $set ) {
|
||||
$set = $this->retrieve_translation_details();
|
||||
set_transient( 'yoast_i18n_' . $this->project_slug, $set, DAY_IN_SECONDS );
|
||||
}
|
||||
|
||||
return $set;
|
||||
}
|
||||
|
||||
/**
|
||||
* Try to get translation details from cache, otherwise retrieve them, then parse them.
|
||||
*
|
||||
* @access private
|
||||
*/
|
||||
private function translation_details() {
|
||||
$set = $this->find_or_initialize_translation_details();
|
||||
|
||||
$this->translation_exists = ! is_null( $set );
|
||||
$this->translation_loaded = is_textdomain_loaded( $this->textdomain );
|
||||
|
||||
$this->parse_translation_set( $set );
|
||||
}
|
||||
|
||||
/**
|
||||
* Retrieve the translation details from Yoast Translate
|
||||
*
|
||||
* @access private
|
||||
*
|
||||
* @return object|null
|
||||
*/
|
||||
private function retrieve_translation_details() {
|
||||
$api_url = trailingslashit( $this->glotpress_url ) . 'api/projects/' . $this->project_slug;
|
||||
|
||||
$resp = wp_remote_get( $api_url );
|
||||
$body = wp_remote_retrieve_body( $resp );
|
||||
unset( $resp );
|
||||
|
||||
if ( $body ) {
|
||||
$body = json_decode( $body );
|
||||
foreach ( $body->translation_sets as $set ) {
|
||||
if ( $this->locale == $set->wp_locale ) {
|
||||
return $set;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
return null;
|
||||
}
|
||||
|
||||
/**
|
||||
* Set the needed private variables based on the results from Yoast Translate
|
||||
*
|
||||
* @param object $set The translation set
|
||||
*
|
||||
* @access private
|
||||
*/
|
||||
private function parse_translation_set( $set ) {
|
||||
if ( $this->translation_exists ) {
|
||||
$this->locale_name = $set->name;
|
||||
$this->percent_translated = $set->percent_translated;
|
||||
} else {
|
||||
$this->locale_name = '';
|
||||
$this->percent_translated = '';
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -175,11 +175,13 @@ if( ! class_exists( 'Yoast_License_Manager', false ) ) {
|
||||
// show success notice if license is valid
|
||||
if($result->license === 'valid') {
|
||||
|
||||
$message = sprintf( __( "Your %s license has been activated. ", $this->product->get_text_domain() ), $this->product->get_item_name() );
|
||||
|
||||
// show a custom notice if users have an unlimited license
|
||||
if( $result->license_limit == 0 ) {
|
||||
$message = sprintf( __( "Your %s license has been activated. You have an unlimited license. ", $this->product->get_text_domain() ), $this->product->get_item_name() );
|
||||
$message .= __( "You have an unlimited license. ", $this->product->get_text_domain() );
|
||||
} else {
|
||||
$message = sprintf( __( "Your %s license has been activated. You have used %d/%d activations. ", $this->product->get_text_domain() ), $this->product->get_item_name(), $result->site_count, $result->license_limit );
|
||||
$message .= sprintf( __( "You have used %d/%d activations. ", $this->product->get_text_domain() ), $result->site_count, $result->license_limit );
|
||||
}
|
||||
|
||||
// add upgrade notice if user has less than 3 activations left
|
||||
|
||||
@@ -0,0 +1,53 @@
|
||||
<?php
|
||||
|
||||
if( class_exists( 'Yoast_License_Manager' ) && ! class_exists( "Yoast_Theme_License_Manager", false ) ) {
|
||||
|
||||
class Yoast_Theme_License_Manager extends Yoast_License_Manager {
|
||||
|
||||
/**
|
||||
* Setup auto updater for themes
|
||||
*/
|
||||
public function setup_auto_updater() {
|
||||
if ( $this->license_is_valid() ) {
|
||||
// setup auto updater
|
||||
require_once dirname( __FILE__ ) . '/class-update-manager.php';
|
||||
require_once dirname( __FILE__ ) . '/class-theme-update-manager.php'; // @TODO: Autoload?
|
||||
new Yoast_Theme_Update_Manager( $this->product, $this );
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Setup hooks
|
||||
*/
|
||||
public function specific_hooks() {
|
||||
// remotely deactivate license upon switching away from this theme
|
||||
add_action( 'switch_theme', array( $this, 'deactivate_license' ) );
|
||||
|
||||
// Add the license menu
|
||||
add_action( 'admin_menu', array( $this, 'add_license_menu' ) );
|
||||
}
|
||||
|
||||
/**
|
||||
* Add license page and add it to Themes menu
|
||||
*/
|
||||
public function add_license_menu() {
|
||||
$theme_page = add_theme_page( sprintf( __( '%s License', $this->product->get_text_domain() ), $this->product->get_item_name() ), __( 'Theme License', $this->product->get_text_domain() ), 'manage_options', 'theme-license', array( $this, 'show_license_page' ) );
|
||||
}
|
||||
|
||||
/**
|
||||
* Shows license page
|
||||
*/
|
||||
public function show_license_page() {
|
||||
?>
|
||||
<div class="wrap">
|
||||
<?php settings_errors(); ?>
|
||||
|
||||
<?php $this->show_license_form( false ); ?>
|
||||
</div>
|
||||
<?php
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
@@ -0,0 +1,149 @@
|
||||
<?php
|
||||
|
||||
if( class_exists( 'Yoast_Update_Manager' ) && ! class_exists( "Yoast_Theme_Update_Manager", false ) ) {
|
||||
|
||||
class Yoast_Theme_Update_Manager extends Yoast_Update_Manager {
|
||||
|
||||
/**
|
||||
* Constructor
|
||||
*
|
||||
* @param string $api_url
|
||||
* @param string $item_name
|
||||
* @param string $license_key
|
||||
* @param string $slug
|
||||
* @param string $theme_version
|
||||
* @param string $author (optional)
|
||||
*/
|
||||
public function __construct( Yoast_Product $product, $license_key ) {
|
||||
|
||||
parent::__construct( $product, $license_key );
|
||||
|
||||
// setup hooks
|
||||
$this->setup_hooks();
|
||||
}
|
||||
|
||||
/**
|
||||
* Get the current theme version
|
||||
*
|
||||
* @return string The version number
|
||||
*/
|
||||
private function get_theme_version() {
|
||||
|
||||
// if version was not set, get it from the Theme stylesheet
|
||||
if( $this->product->get_version() === '' ) {
|
||||
$theme = wp_get_theme( $this->product->get_slug() );
|
||||
return $theme->get( 'Version' );
|
||||
}
|
||||
|
||||
return $this->product->get_version();
|
||||
}
|
||||
|
||||
/**
|
||||
* Setup hooks
|
||||
*/
|
||||
private function setup_hooks() {
|
||||
add_filter( 'site_transient_update_themes', array( $this, 'set_theme_update_transient' ) );
|
||||
add_action( 'load-themes.php', array( $this, 'load_themes_screen' ) );
|
||||
}
|
||||
|
||||
/**
|
||||
* Set "updates available" transient
|
||||
*/
|
||||
public function set_theme_update_transient( $value ) {
|
||||
|
||||
$update_data = $this->get_update_data();
|
||||
|
||||
if( $update_data === false ) {
|
||||
return $value;
|
||||
}
|
||||
|
||||
// add update data to "updates available" array. convert object to array.
|
||||
$value->response[ $this->product->get_slug() ] = (array) $update_data;
|
||||
|
||||
return $value;
|
||||
}
|
||||
|
||||
/**
|
||||
* Add hooks and scripts to the Appearance > Themes screen
|
||||
*/
|
||||
public function load_themes_screen() {
|
||||
|
||||
$update_data = $this->get_update_data();
|
||||
|
||||
// only do if an update is available
|
||||
if( $update_data === false ) {
|
||||
return;
|
||||
}
|
||||
|
||||
add_thickbox();
|
||||
add_action( 'admin_notices', array( $this, 'show_update_details' ) );
|
||||
}
|
||||
|
||||
/**
|
||||
* Show update link.
|
||||
* Opens Thickbox with Changelog.
|
||||
*/
|
||||
public function show_update_details() {
|
||||
|
||||
$update_data = $this->get_update_data();
|
||||
|
||||
// only show if an update is available
|
||||
if( $update_data === false ) {
|
||||
return;
|
||||
}
|
||||
|
||||
$update_url = wp_nonce_url( 'update.php?action=upgrade-theme&theme=' . urlencode( $this->product->get_slug() ), 'upgrade-theme_' . $this->product->get_slug() );
|
||||
$update_onclick = ' onclick="if ( confirm(\'' . esc_js( __( "Updating this theme will lose any customizations you have made. 'Cancel' to stop, 'OK' to update." ) ) . '\') ) {return true;}return false;"';
|
||||
?>
|
||||
<div id="update-nag">
|
||||
<?php
|
||||
printf(
|
||||
__( '<strong>%s version %s</strong> is available. <a href="%s" class="thickbox" title="%s">Check out what\'s new</a> or <a href="%s" %s>update now</a>.' ),
|
||||
$this->product->get_item_name(),
|
||||
$update_data->new_version,
|
||||
'#TB_inline?width=640&inlineId=' . $this->product->get_slug() . '_changelog',
|
||||
$this->get_item_name(),
|
||||
$update_url,
|
||||
$update_onclick
|
||||
);
|
||||
?>
|
||||
</div>
|
||||
<div id="<?php echo $this->product->get_slug(); ?>_changelog" style="display: none;">
|
||||
<?php echo wpautop( $update_data->sections['changelog'] ); ?>
|
||||
</div>
|
||||
<?php
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Get update data
|
||||
*
|
||||
* This gets the update data from a transient (12 hours), if set.
|
||||
* If not, it will make a remote request and get the update data.
|
||||
*
|
||||
* @return object $update_data Object containing the update data
|
||||
*/
|
||||
public function get_update_data() {
|
||||
|
||||
$api_response = $this->get_remote_data();
|
||||
|
||||
if( false === $api_response ) {
|
||||
return false;
|
||||
}
|
||||
|
||||
$update_data = $api_response;
|
||||
|
||||
// check if a new version is available.
|
||||
if ( version_compare( $this->get_theme_version(), $update_data->new_version, '>=' ) ) {
|
||||
return false;
|
||||
}
|
||||
|
||||
|
||||
// an update is available
|
||||
return $update_data;
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
@@ -0,0 +1,2 @@
|
||||
<?php
|
||||
//Nothing to see here
|
||||
@@ -0,0 +1,74 @@
|
||||
<?php
|
||||
|
||||
/*
|
||||
Plugin Name: Sample Plugin
|
||||
Version: 1.0
|
||||
Plugin URI: https://yoast.com/
|
||||
Description: A sample plugin to test the License Manager
|
||||
Author: Yoast, DvanKooten
|
||||
Author URI: http://yoast.com/
|
||||
Text Domain: sample-plugin
|
||||
*/
|
||||
|
||||
/**
|
||||
* Class Sample_Plugin
|
||||
*
|
||||
*/
|
||||
class Sample_Plugin {
|
||||
|
||||
public function __construct() {
|
||||
|
||||
// we only need license stuff inside the admin area
|
||||
if ( is_admin() ) {
|
||||
|
||||
// add menu item
|
||||
add_action( 'admin_menu', array( $this, 'add_license_menu' ) );
|
||||
|
||||
// load license class
|
||||
$this->load_license_manager();
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
* Loads the License_Plugin_Manager class
|
||||
*
|
||||
* The class will take care of the rest: notices, license (de)activations, updates, etc..
|
||||
*/
|
||||
public function load_license_manager() {
|
||||
|
||||
// Instantiate license class
|
||||
$license_manager = new Yoast_Plugin_License_Manager( new Sample_Product() );
|
||||
|
||||
// Setup the required hooks
|
||||
$license_manager->setup_hooks();
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
* Add license page and add it to Themes menu
|
||||
*/
|
||||
public function add_license_menu() {
|
||||
$theme_page = add_options_page( sprintf( __( '%s License', $this->text_domain ), $this->item_name ), sprintf( __( '%s License', $this->text_domain ), $this->item_name ), 'manage_options', $this->text_domain . '-license', array( $this, 'show_license_page' ) );
|
||||
}
|
||||
|
||||
/**
|
||||
* Shows license page
|
||||
*/
|
||||
public function show_license_page() {
|
||||
|
||||
// Instantiate license class
|
||||
$license_manager = new Yoast_Plugin_License_Manager( new Sample_Product() );
|
||||
|
||||
?>
|
||||
<div class="wrap">
|
||||
<?php //settings_errors(); ?>
|
||||
|
||||
<?php $license_manager->show_license_form( false ); ?>
|
||||
</div>
|
||||
<?php
|
||||
}
|
||||
}
|
||||
|
||||
new Sample_Plugin();
|
||||
@@ -0,0 +1,23 @@
|
||||
<?php
|
||||
|
||||
/**
|
||||
* Class Sample_Product
|
||||
*
|
||||
* Our sample product class
|
||||
*/
|
||||
class Sample_Product extends Yoast_Product {
|
||||
|
||||
public function __construct() {
|
||||
parent::__construct(
|
||||
'https://yoast.com',
|
||||
'Sample Product',
|
||||
'sample-product',
|
||||
'1.0',
|
||||
'https://yoast.com/wordpress/plugins/sample-product/',
|
||||
'admin.php?page=sample-product',
|
||||
'sample-product',
|
||||
'Yoast'
|
||||
);
|
||||
}
|
||||
|
||||
}
|
||||
@@ -0,0 +1,11 @@
|
||||
<?php
|
||||
|
||||
if( is_admin() ) {
|
||||
|
||||
// Instantiate license class
|
||||
$license_manager = new Yoast_Theme_License_Manager( new Sample_Product() );
|
||||
|
||||
// Setup the required hooks
|
||||
$license_manager->setup_hooks();
|
||||
|
||||
}
|
||||
@@ -39,23 +39,10 @@ if ( ! empty( $_REQUEST['_wp_http_referer'] ) ) {
|
||||
|
||||
<div class="tabwrapper">
|
||||
<div id="title" class="wpseotab">
|
||||
<?php
|
||||
$wpseo_bulk_titles_table->prepare_page_navigation();
|
||||
$wpseo_bulk_titles_table->prepare_items();
|
||||
?>
|
||||
|
||||
<?php $wpseo_bulk_titles_table->views(); ?>
|
||||
<?php $wpseo_bulk_titles_table->display(); ?>
|
||||
|
||||
<?php $wpseo_bulk_titles_table->show_page(); ?>
|
||||
</div>
|
||||
<div id="description" class="wpseotab">
|
||||
<?php
|
||||
$wpseo_bulk_description_table->prepare_page_navigation();
|
||||
$wpseo_bulk_description_table->prepare_items();
|
||||
?>
|
||||
|
||||
<?php $wpseo_bulk_description_table->views(); ?>
|
||||
<?php $wpseo_bulk_description_table->display(); ?>
|
||||
<?php $wpseo_bulk_description_table->show_page(); ?>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
@@ -15,7 +15,7 @@ if ( ! defined( 'WPSEO_VERSION' ) ) {
|
||||
*
|
||||
* @todo [Yoast] The import for the RSS Footer plugin checks for data already entered via WP SEO,
|
||||
* the other import routines should do that too.
|
||||
*/
|
||||
*/
|
||||
|
||||
global $wpseo_admin_pages;
|
||||
|
||||
@@ -116,7 +116,7 @@ if ( isset( $_POST['import'] ) || isset( $_GET['import'] ) ) {
|
||||
$taxonomies = get_taxonomies( array( 'public' => true ), 'names' );
|
||||
if ( is_array( $taxonomies ) && $taxonomies !== array() ) {
|
||||
foreach ( $taxonomies as $tax ) {
|
||||
$options[ 'title-tax-'.$tax ] = $template;
|
||||
$options['title-tax-' . $tax] = $template;
|
||||
}
|
||||
}
|
||||
unset( $taxonomies, $tax, $template );
|
||||
@@ -156,7 +156,7 @@ if ( isset( $_POST['import'] ) || isset( $_GET['import'] ) ) {
|
||||
}
|
||||
|
||||
/* @todo [JRF => whomever] verify how WooSEO sets these metas ( 'noindex', 'follow' )
|
||||
and if the values saved are concurrent with the ones we use (i.e. 0/1/2) */
|
||||
* and if the values saved are concurrent with the ones we use (i.e. 0/1/2) */
|
||||
WPSEO_Meta::replace_meta( 'seo_follow', WPSEO_Meta::$meta_prefix . 'meta-robots-nofollow', $replace );
|
||||
WPSEO_Meta::replace_meta( 'seo_noindex', WPSEO_Meta::$meta_prefix . 'meta-robots-noindex', $replace );
|
||||
|
||||
@@ -170,13 +170,13 @@ if ( isset( $_POST['import'] ) || isset( $_GET['import'] ) ) {
|
||||
WPSEO_Meta::replace_meta( '_headspace_keywords', WPSEO_Meta::$meta_prefix . 'metakeywords', $replace );
|
||||
WPSEO_Meta::replace_meta( '_headspace_page_title', WPSEO_Meta::$meta_prefix . 'title', $replace );
|
||||
/* @todo [JRF => whomever] verify how headspace sets these metas ( 'noindex', 'nofollow', 'noarchive', 'noodp', 'noydir' )
|
||||
and if the values saved are concurrent with the ones we use (i.e. 0/1/2) */
|
||||
* and if the values saved are concurrent with the ones we use (i.e. 0/1/2) */
|
||||
WPSEO_Meta::replace_meta( '_headspace_noindex', WPSEO_Meta::$meta_prefix . 'meta-robots-noindex', $replace );
|
||||
WPSEO_Meta::replace_meta( '_headspace_nofollow', WPSEO_Meta::$meta_prefix . 'meta-robots-nofollow', $replace );
|
||||
|
||||
/* @todo - [JRF => whomever] check if this can be done more efficiently by querying only the meta table
|
||||
possibly directly changing it using concat on the existing values
|
||||
*/
|
||||
* possibly directly changing it using concat on the existing values
|
||||
*/
|
||||
$posts = $wpdb->get_results( "SELECT ID FROM $wpdb->posts" );
|
||||
if ( is_array( $posts ) && $posts !== array() ) {
|
||||
foreach ( $posts as $post ) {
|
||||
@@ -211,7 +211,52 @@ if ( isset( $_POST['import'] ) || isset( $_GET['import'] ) ) {
|
||||
WPSEO_Meta::replace_meta( '_aioseop_description', WPSEO_Meta::$meta_prefix . 'metadesc', $replace );
|
||||
WPSEO_Meta::replace_meta( '_aioseop_keywords', WPSEO_Meta::$meta_prefix . 'metakeywords', $replace );
|
||||
WPSEO_Meta::replace_meta( '_aioseop_title', WPSEO_Meta::$meta_prefix . 'title', $replace );
|
||||
$msg .= __( sprintf( 'All in One SEO data successfully imported. Would you like to %sdisable the All in One SEO plugin%s.', '<a href="' . esc_url( admin_url( 'admin.php?page=wpseo_import&deactivate_aioseo=1' ) ) . '">', '</a>' ), 'wordpress-seo' );
|
||||
$options_aiosep = get_option( 'aioseop_options' );
|
||||
|
||||
if ( isset( $options_aiosep['aiosp_google_analytics_id'] ) ) {
|
||||
/**
|
||||
* The Google Analytics settings are used
|
||||
*/
|
||||
$ga_universal = 0;
|
||||
$ga_trackoutbound = 0;
|
||||
$ga_anomip = 0;
|
||||
|
||||
if ( $options_aiosep['aiosp_ga_use_universal_analytics'] == 'on' ) {
|
||||
$ga_universal = 1;
|
||||
}
|
||||
if ( $options_aiosep['aiosp_ga_track_outbound_links'] == 'on' ) {
|
||||
$ga_trackoutbound = 1;
|
||||
}
|
||||
if( $options_aiosep['aiosp_ga_anonymize_ip'] == 'on' ){
|
||||
|
||||
}
|
||||
|
||||
$ga_settings = array(
|
||||
'manual_ua_code' => (int) 1,
|
||||
'manual_ua_code_field' => $options_aiosep['aiosp_google_analytics_id'],
|
||||
'enable_universal' => (int) $ga_universal,
|
||||
'track_outbound' => (int) $ga_trackoutbound,
|
||||
'ignore_users' => (array) $options_aiosep['aiosp_ga_exclude_users'],
|
||||
'anonymize_ips' => (int) $ga_anomip,
|
||||
);
|
||||
|
||||
if( get_option('yst_ga') == false ){
|
||||
$options['ga_general'] = $ga_settings;
|
||||
update_option( 'yst_ga', $options );
|
||||
}
|
||||
|
||||
$plugin_install_nonce = wp_create_nonce('install-plugin_google-analytics-for-wordpress'); // Use the old name because that's the WordPress.org repo
|
||||
|
||||
$msg .= __( sprintf(
|
||||
'All in One SEO data successfully imported. Would you like to %sdisable the All in One SEO plugin%s. You\'ve had Google Analytics enabled in All in One SEO, would you like to install our %sGoogle Analytics plugin%s?',
|
||||
'<a href="' . esc_url( admin_url( 'admin.php?page=wpseo_import&deactivate_aioseo=1' ) ) . '">',
|
||||
'</a>',
|
||||
'<a href="' . esc_url( admin_url( 'update.php?action=install-plugin&plugin=google-analytics-for-wordpress&_wpnonce=' . $plugin_install_nonce ) ) . '">',
|
||||
'</a>'
|
||||
), 'wordpress-seo' );
|
||||
} else {
|
||||
$msg .= __( sprintf( 'All in One SEO data successfully imported. Would you like to %sdisable the All in One SEO plugin%s.', '<a href="' . esc_url( admin_url( 'admin.php?page=wpseo_import&deactivate_aioseo=1' ) ) . '">', '</a>' ), 'wordpress-seo' );
|
||||
}
|
||||
}
|
||||
|
||||
if ( isset( $_POST['wpseo']['importaioseoold'] ) ) {
|
||||
@@ -257,8 +302,7 @@ if ( isset( $_POST['import'] ) || isset( $_GET['import'] ) ) {
|
||||
if ( $optnew['rssafter'] === '' || $optnew['rssafter'] === WPSEO_Options::get_default( 'wpseo_rss', 'rssafter' ) ) {
|
||||
$optnew['rssafter'] = $optold['footerstring'];
|
||||
}
|
||||
}
|
||||
else {
|
||||
} else {
|
||||
/* @internal Uncomment the second part if a default would be given to the rssbefore value */
|
||||
if ( $optnew['rssbefore'] === '' /*|| $optnew['rssbefore'] === WPSEO_Options::get_default( 'wpseo_rss', 'rssbefore' )*/ ) {
|
||||
$optnew['rssbefore'] = $optold['footerstring'];
|
||||
@@ -276,17 +320,15 @@ if ( isset( $_POST['import'] ) || isset( $_GET['import'] ) ) {
|
||||
if ( is_array( $optold ) && $optold !== array() ) {
|
||||
foreach ( $optold as $opt => $val ) {
|
||||
if ( is_bool( $val ) && $val == true ) {
|
||||
$optnew[ 'breadcrumbs-' . $opt ] = true;
|
||||
}
|
||||
else {
|
||||
$optnew[ 'breadcrumbs-' . $opt ] = $val;
|
||||
$optnew['breadcrumbs-' . $opt] = true;
|
||||
} else {
|
||||
$optnew['breadcrumbs-' . $opt] = $val;
|
||||
}
|
||||
}
|
||||
unset( $opt, $val );
|
||||
update_option( 'wpseo_internallinks', $optnew );
|
||||
$msg .= __( 'Yoast Breadcrumbs options imported successfully.', 'wordpress-seo' );
|
||||
}
|
||||
else {
|
||||
} else {
|
||||
$msg .= __( 'Yoast Breadcrumbs options could not be found', 'wordpress-seo' );
|
||||
}
|
||||
unset( $optold, $optnew );
|
||||
@@ -316,7 +358,7 @@ if ( $msg != '' ) {
|
||||
echo '<div id="message" class="message updated" style="width:94%;"><p>' . $msg . '</p></div>';
|
||||
}
|
||||
|
||||
$content = '<p>' . __( 'No doubt you\'ve used an SEO plugin before if this site isn\'t new. Let\'s make it easy on you, you can import the data below. If you want, you can import first, check if it was imported correctly, and then import & delete. No duplicate data will be imported.', 'wordpress-seo' ) . '</p>';
|
||||
$content = '<p>' . __( 'No doubt you\'ve used an SEO plugin before if this site isn\'t new. Let\'s make it easy on you, you can import the data below. If you want, you can import first, check if it was imported correctly, and then import & delete. No duplicate data will be imported.', 'wordpress-seo' ) . '</p>';
|
||||
$content .= '<p>' . sprintf( __( 'If you\'ve used another SEO plugin, try the %sSEO Data Transporter%s plugin to move your data into this plugin, it rocks!', 'wordpress-seo' ), '<a href="https://wordpress.org/plugins/seo-data-transporter/">', '</a>' ) . '</p>';
|
||||
// @todo [JRF => whomever] add action for form tag
|
||||
$content .= '<form action="" method="post" accept-charset="' . esc_attr( get_bloginfo( 'charset' ) ) . '">';
|
||||
@@ -355,7 +397,7 @@ $wpseo_admin_pages->postbox( 'import', __( 'Import', 'wordpress-seo' ), $content
|
||||
do_action( 'wpseo_import', $this );
|
||||
|
||||
// @todo [JRF => whomever] add action for form tag
|
||||
$content = '<h4>' . __( 'Export', 'wordpress-seo' ) . '</h4>';
|
||||
$content = '<h4>' . __( 'Export', 'wordpress-seo' ) . '</h4>';
|
||||
$content .= '<form action="" method="post" accept-charset="' . esc_attr( get_bloginfo( 'charset' ) ) . '">';
|
||||
$content .= wp_nonce_field( 'wpseo-export', '_wpnonce', true, false );
|
||||
$content .= '<p>' . __( 'Export your WordPress SEO settings here, to import them again later or to import them on another site.', 'wordpress-seo' ) . '</p>';
|
||||
@@ -375,8 +417,7 @@ if ( isset( $_POST['wpseo_export'] ) ) {
|
||||
document.location = \'' . $url . '\';
|
||||
</script>';
|
||||
add_action( 'admin_footer-' . $GLOBALS['hook_suffix'], 'wpseo_deliver_export_zip' );
|
||||
}
|
||||
else {
|
||||
} else {
|
||||
$content .= 'Error: ' . $url;
|
||||
}
|
||||
}
|
||||
@@ -391,8 +432,7 @@ if ( ! isset( $_FILES['settings_import_file'] ) || empty( $_FILES['settings_impo
|
||||
$content .= '<input type="hidden" name="action" value="wp_handle_upload"/>';
|
||||
$content .= '<input type="submit" class="button" value="' . __( 'Import settings', 'wordpress-seo' ) . '"/>';
|
||||
$content .= '</form><br/>';
|
||||
}
|
||||
elseif ( isset( $_FILES['settings_import_file'] ) ) {
|
||||
} elseif ( isset( $_FILES['settings_import_file'] ) ) {
|
||||
check_admin_referer( 'wpseo-import-file' );
|
||||
$file = wp_handle_upload( $_FILES['settings_import_file'] );
|
||||
|
||||
@@ -428,36 +468,30 @@ elseif ( isset( $_FILES['settings_import_file'] ) ) {
|
||||
$option_instance = WPSEO_Options::get_option_instance( $name );
|
||||
if ( is_object( $option_instance ) && method_exists( $option_instance, 'import' ) ) {
|
||||
$optgroup = $option_instance->import( $optgroup, $old_wpseo_version, $options );
|
||||
}
|
||||
elseif ( WP_DEBUG === true || ( defined( 'WPSEO_DEBUG' ) && WPSEO_DEBUG === true ) ) {
|
||||
} elseif ( WP_DEBUG === true || ( defined( 'WPSEO_DEBUG' ) && WPSEO_DEBUG === true ) ) {
|
||||
$content .= '<p><strong>' . sprintf( __( 'Setting "%s" is no longer used and has been discarded.', 'wordpress-seo' ), $name ) . '</strong></p>';
|
||||
|
||||
}
|
||||
}
|
||||
$content .= '<p><strong>' . __( 'Settings successfully imported.', 'wordpress-seo' ) . '</strong></p>';
|
||||
}
|
||||
else {
|
||||
} else {
|
||||
$content .= '<p><strong>' . __( 'Settings could not be imported:', 'wordpress-seo' ) . ' ' . __( 'No settings found in file.', 'wordpress-seo' ) . '</strong></p>';
|
||||
}
|
||||
unset( $options, $name, $optgroup );
|
||||
}
|
||||
else {
|
||||
} else {
|
||||
$content .= '<p><strong>' . __( 'Settings could not be imported:', 'wordpress-seo' ) . ' ' . __( 'Unzipping failed - file settings.ini not found.', 'wordpress-seo' ) . '</strong></p>';
|
||||
}
|
||||
@unlink( $filename );
|
||||
@unlink( $p_path );
|
||||
}
|
||||
else {
|
||||
} else {
|
||||
$content .= '<p><strong>' . __( 'Settings could not be imported:', 'wordpress-seo' ) . ' ' . sprintf( __( 'Unzipping failed with error "%s".', 'wordpress-seo' ), $unzipped->get_error_message() ) . '</strong></p>';
|
||||
}
|
||||
unset( $zip, $unzipped );
|
||||
@unlink( $file['file'] );
|
||||
}
|
||||
else {
|
||||
} else {
|
||||
if ( is_wp_error( $file ) ) {
|
||||
$content .= '<p><strong>' . __( 'Settings could not be imported:', 'wordpress-seo' ) . ' ' . $file->get_error_message() . '</strong></p>';
|
||||
}
|
||||
else {
|
||||
} else {
|
||||
$content .= '<p><strong>' . __( 'Settings could not be imported:', 'wordpress-seo' ) . ' ' . __( 'Upload failed.', 'wordpress-seo' ) . '</strong></p>';
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
<?php
|
||||
/**
|
||||
* @package Admin
|
||||
* @todo Add default content (when no premium plugins are activated)
|
||||
* @todo Add default content (when no premium plugins are activated)
|
||||
*/
|
||||
|
||||
if ( ! defined( 'WPSEO_VERSION' ) ) {
|
||||
@@ -18,63 +18,86 @@ global $wpseo_admin_pages;
|
||||
<h2 id="wpseo-title"><?php echo esc_html( get_admin_page_title() ); ?></h2>
|
||||
|
||||
<h2 class="nav-tab-wrapper" id="wpseo-tabs">
|
||||
<a class="nav-tab" id="extensions-tab" href="#top#extensions"><?php _e( 'Extensions', 'wordpress-seo' );?></a>
|
||||
<a class="nav-tab" id="licenses-tab" href="#top#licenses"><?php _e( 'Licenses', 'wordpress-seo' );?></a>
|
||||
<a class="nav-tab" id="extensions-tab" href="#top#extensions"><?php _e( 'Extensions', 'wordpress-seo' ); ?></a>
|
||||
<a class="nav-tab" id="licenses-tab" href="#top#licenses"><?php _e( 'Licenses', 'wordpress-seo' ); ?></a>
|
||||
</h2>
|
||||
|
||||
<div class="tabwrapper">
|
||||
<div id="extensions" class="wpseotab">
|
||||
<?php
|
||||
$extensions = array();
|
||||
$extensions = array(
|
||||
'seo-premium' => (object) array(
|
||||
'url' => 'https://yoast.com/wordpress/plugins/seo-premium/',
|
||||
'title' => __( 'WordPress SEO Premium', 'wordpress-seo' ),
|
||||
'desc' => __( 'The premium version of WordPress SEO with more features & support.', 'wordpress-seo' ),
|
||||
'installed' => false,
|
||||
),
|
||||
'video-seo' => (object) array(
|
||||
'url' => 'https://yoast.com/wordpress/plugins/video-seo/',
|
||||
'title' => __( 'Video SEO', 'wordpress-seo' ),
|
||||
'desc' => __( 'Optimize your videos to show them off in search results and get more clicks!', 'wordpress-seo' ),
|
||||
'installed' => false,
|
||||
),
|
||||
'news-seo' => (object) array(
|
||||
'url' => 'https://yoast.com/wordpress/plugins/news-seo/',
|
||||
'title' => __( 'News SEO', 'wordpress-seo' ),
|
||||
'desc' => __( 'Are you in Google News? Increase your traffic from Google News by optimizing for it!', 'wordpress-seo' ),
|
||||
'installed' => false,
|
||||
),
|
||||
'local-seo' => (object) array(
|
||||
'url' => 'https://yoast.com/wordpress/plugins/local-seo/',
|
||||
'title' => __( 'Local SEO', 'wordpress-seo' ),
|
||||
'desc' => __( 'Rank better locally and in Google Maps, without breaking a sweat!', 'wordpress-seo' ),
|
||||
'installed' => false,
|
||||
),
|
||||
'woocommerce-seo' => (object) array(
|
||||
'url' => 'https://yoast.com/wordpress/plugins/yoast-woocommerce-seo/',
|
||||
'title' => __( 'Yoast WooCommerce SEO', 'wordpress-seo' ),
|
||||
'desc' => __( 'Seamlessly integrate WooCommerce with WordPress SEO and get extra features!', 'wordpress-seo' ),
|
||||
'installed' => false,
|
||||
)
|
||||
);
|
||||
|
||||
if ( ! class_exists( 'WPSEO_Premium' ) ) {
|
||||
$extensions['seo-premium'] = (object) array(
|
||||
'url' => 'https://yoast.com/wordpress/plugins/seo-premium/',
|
||||
'title' => __( 'WordPress SEO Premium', 'wordpress-seo' ),
|
||||
'desc' => __( 'The premium version of WordPress SEO with more features & support.', 'wordpress-seo' ),
|
||||
);
|
||||
if ( class_exists( 'WPSEO_Premium' ) ) {
|
||||
$extensions['seo-premium']->installed = true;
|
||||
}
|
||||
if ( ! class_exists( 'wpseo_Video_Sitemap' ) ) {
|
||||
$extensions['video-seo'] = (object) array(
|
||||
'url' => 'https://yoast.com/wordpress/plugins/video-seo/',
|
||||
'title' => __( 'Video SEO', 'wordpress-seo' ),
|
||||
'desc' => __( 'Optimize your videos to show them off in search results and get more clicks!', 'wordpress-seo' ),
|
||||
);
|
||||
if ( class_exists( 'wpseo_Video_Sitemap' ) ) {
|
||||
$extensions['video-seo']->installed = true;
|
||||
}
|
||||
if ( ! class_exists( 'WPSEO_News' ) ) {
|
||||
$extensions['news-seo'] = (object) array(
|
||||
'url' => 'https://yoast.com/wordpress/plugins/news-seo/',
|
||||
'title' => __( 'News SEO', 'wordpress-seo' ),
|
||||
'desc' => __( 'Are you in Google News? Increase your traffic from Google News by optimizing for it!', 'wordpress-seo' ),
|
||||
);
|
||||
if ( class_exists( 'WPSEO_News' ) ) {
|
||||
$extensions['news-seo']->installed = true;
|
||||
}
|
||||
if ( ! defined( 'WPSEO_LOCAL_VERSION' ) ) {
|
||||
$extensions['local-seo'] = (object) array(
|
||||
'url' => 'https://yoast.com/wordpress/plugins/local-seo/',
|
||||
'title' => __( 'Local SEO', 'wordpress-seo' ),
|
||||
'desc' => __( 'Rank better locally and in Google Maps, without breaking a sweat!', 'wordpress-seo' ),
|
||||
);
|
||||
if ( defined( 'WPSEO_LOCAL_VERSION' ) ) {
|
||||
$extensions['local-seo']->installed = true;
|
||||
}
|
||||
if ( class_exists( 'Woocommerce' ) && ! class_exists( 'Yoast_WooCommerce_SEO' ) ) {
|
||||
$extensions['woocommerce-seo'] = (object) array(
|
||||
'url' => 'https://yoast.com/wordpress/plugins/yoast-woocommerce-seo/',
|
||||
'title' => __( 'Yoast WooCommerce SEO', 'wordpress-seo' ),
|
||||
'desc' => __( 'Seamlessly integrate WooCommerce with WordPress SEO and get extra features!', 'wordpress-seo' )
|
||||
);
|
||||
if ( ! class_exists( 'Woocommerce' ) ) {
|
||||
unset( $extensions['woocommerce-seo'] );
|
||||
} else {
|
||||
if ( class_exists( 'Yoast_WooCommerce_SEO' ) ) {
|
||||
$extensions['woocommerce-seo']->installed = true;
|
||||
}
|
||||
}
|
||||
|
||||
foreach ( $extensions as $id => $extension ) {
|
||||
$utm = '#utm_source=wordpress-seo-config&utm_medium=banner&utm_campaign=extension-page-banners';
|
||||
?>
|
||||
<div class="extension <?php echo esc_attr( $id ); ?>">
|
||||
<a target="_blank" href="<?php echo esc_url( $extension->url . $utm ); ?>">
|
||||
<h3><?php echo esc_html( $extension->title ); ?></h3>
|
||||
</a>
|
||||
<p><?php echo esc_html( $extension->desc ); ?></p>
|
||||
<p><a target="_blank" href="<?php echo esc_url( $extension->url . $utm ); ?>" class="button-primary">
|
||||
<?php esc_html_e( 'Get this extension', 'wordpress-seo' ); ?>
|
||||
</a></p>
|
||||
</div>
|
||||
?>
|
||||
<div class="extension <?php echo esc_attr( $id ); ?>">
|
||||
<a target="_blank" href="<?php echo esc_url( $extension->url . $utm ); ?>">
|
||||
<h3><?php echo esc_html( $extension->title ); ?></h3>
|
||||
</a>
|
||||
|
||||
<p><?php echo esc_html( $extension->desc ); ?></p>
|
||||
|
||||
<p>
|
||||
<?php if ( $extension->installed ) { ?>
|
||||
<button class="button-primary installed">Installed</button>
|
||||
<?php } else { ?>
|
||||
<a target="_blank" href="<?php echo esc_url( $extension->url . $utm ); ?>" class="button-primary">
|
||||
<?php esc_html_e( 'Get this extension', 'wordpress-seo' ); ?>
|
||||
</a>
|
||||
<?php } ?>
|
||||
</p>
|
||||
</div>
|
||||
<?php
|
||||
}
|
||||
?>
|
||||
@@ -82,11 +105,11 @@ global $wpseo_admin_pages;
|
||||
<div id="licenses" class="wpseotab">
|
||||
<?php
|
||||
|
||||
/**
|
||||
* Display license page
|
||||
*/
|
||||
settings_errors();
|
||||
do_action( 'wpseo_licenses_forms' );
|
||||
/**
|
||||
* Display license page
|
||||
*/
|
||||
settings_errors();
|
||||
do_action( 'wpseo_licenses_forms' );
|
||||
?>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -100,7 +100,6 @@ $wpseo_admin_pages->admin_header( true, WPSEO_Options::get_group_name( 'wpseo_ti
|
||||
echo $wpseo_admin_pages->textinput( 'metakey-' . $name, __( 'Meta keywords template', 'wordpress-seo' ) );
|
||||
}
|
||||
echo $wpseo_admin_pages->checkbox( 'noindex-' . $name, '<code>noindex, follow</code>', __( 'Meta Robots', 'wordpress-seo' ) );
|
||||
echo $wpseo_admin_pages->checkbox( 'noauthorship-' . $name, __( 'Don\'t show <code>rel="author"</code>', 'wordpress-seo' ), __( 'Authorship', 'wordpress-seo' ) );
|
||||
echo $wpseo_admin_pages->checkbox( 'showdate-' . $name, __( 'Show date in snippet preview?', 'wordpress-seo' ), __( 'Date in Snippet Preview', 'wordpress-seo' ) );
|
||||
echo $wpseo_admin_pages->checkbox( 'hideeditbox-' . $name, __( 'Hide', 'wordpress-seo' ), __( 'WordPress SEO Meta Box', 'wordpress-seo' ) );
|
||||
|
||||
@@ -141,7 +140,7 @@ $wpseo_admin_pages->admin_header( true, WPSEO_Options::get_group_name( 'wpseo_ti
|
||||
echo $wpseo_admin_pages->textinput( 'metakey-ptarchive-' . $name, __( 'Meta keywords', 'wordpress-seo' ) );
|
||||
}
|
||||
if ( $options['breadcrumbs-enable'] === true ) {
|
||||
echo $wpseo_admin_pages->textinput( 'bctitle-ptarchive-' . $name, __( 'Breadcrumbs Title', 'wordpress-seo' ) );
|
||||
echo $wpseo_admin_pages->textinput( 'bctitle-ptarchive-' . $name, __( 'Breadcrumbs title', 'wordpress-seo' ) );
|
||||
}
|
||||
echo $wpseo_admin_pages->checkbox( 'noindex-ptarchive-' . $name, '<code>noindex, follow</code>', __( 'Meta Robots', 'wordpress-seo' ) );
|
||||
}
|
||||
@@ -207,4 +206,4 @@ $wpseo_admin_pages->admin_header( true, WPSEO_Options::get_group_name( 'wpseo_ti
|
||||
echo '<h2>' . __( 'Variables', 'wordpress-seo' ) . '</h2>';
|
||||
echo '</div>';
|
||||
echo '</div>';
|
||||
$wpseo_admin_pages->admin_footer();
|
||||
$wpseo_admin_pages->admin_footer();
|
||||
@@ -108,10 +108,10 @@ if ( $use_dropdown === true ) {
|
||||
$content .= '<p>' . __( 'Choose the site whose settings you want to use as default for all sites that are added to your network. If you choose \'None\', the normal plugin defaults will be used.', 'wordpress-seo' ) . '</p>';
|
||||
}
|
||||
else {
|
||||
$content .= $wpseo_admin_pages->textinput( 'defaultblog', __( 'New sites in the network get the SEO settings from this site', 'wordpress-seo' ), 'wpseo_ms' );
|
||||
$content .= $wpseo_admin_pages->textinput( 'defaultblog', __( 'New sites in the network inherit their SEO settings from this site', 'wordpress-seo' ), 'wpseo_ms' );
|
||||
$content .= '<p>' . sprintf( __( 'Enter the %sSite ID%s for the site whose settings you want to use as default for all sites that are added to your network. Leave empty for none (i.e. the normal plugin defaults will be used).', 'wordpress-seo' ), '<a href="' . esc_url( network_admin_url( 'sites.php' ) ) . '">', '</a>' ) . '</p>';
|
||||
}
|
||||
$content .= '<p><strong>' . __( 'Take note :', 'wordpress-seo' ) . '</strong> ' . __( 'Privacy sensitive (FB admins and such), theme specific (title rewrite) and a few very site specific settings will not be imported to new blogs.', 'wordpress-seo' ) . '</p>';
|
||||
$content .= '<p><strong>' . __( 'Take note:', 'wordpress-seo' ) . '</strong> ' . __( 'Privacy sensitive (FB admins and such), theme specific (title rewrite) and a few very site specific settings will not be imported to new blogs.', 'wordpress-seo' ) . '</p>';
|
||||
|
||||
|
||||
$content .= '<input type="submit" name="wpseo_submit" class="button-primary" value="' . __( 'Save MultiSite Settings', 'wordpress-seo' ) . '"/>';
|
||||
|
||||
@@ -25,7 +25,7 @@ $rows[] = array(
|
||||
);
|
||||
$rows[] = array(
|
||||
'id' => 'rssafter',
|
||||
'label' => __( 'Content to put after each post', 'wordpress-seo' ),
|
||||
'label' => __( 'Content to put after each post in the feed', 'wordpress-seo' ),
|
||||
'desc' => __( '(HTML allowed)', 'wordpress-seo' ),
|
||||
'content' => '<textarea cols="50" rows="5" id="rssafter" name="wpseo_rss[rssafter]">' . esc_textarea( $options['rssafter'] ) . '</textarea>',
|
||||
);
|
||||
@@ -41,4 +41,4 @@ $rows[] = array(
|
||||
);
|
||||
$wpseo_admin_pages->postbox( 'rssfootercontent', __( 'Content of your RSS Feed', 'wordpress-seo' ), $content . $wpseo_admin_pages->form_table( $rows ) );
|
||||
|
||||
$wpseo_admin_pages->admin_footer();
|
||||
$wpseo_admin_pages->admin_footer();
|
||||
@@ -220,7 +220,7 @@ $wpseo_admin_pages->admin_header( true, WPSEO_Options::get_group_name( 'wpseo_so
|
||||
<div id="google" class="wpseotab">
|
||||
<?php
|
||||
echo '<p>';
|
||||
echo $wpseo_admin_pages->checkbox( 'googleplus', __( 'Add Google+ specific post meta data (excluding author metadata)', 'wordpress-seo' ) );
|
||||
echo $wpseo_admin_pages->checkbox( 'googleplus', __( 'Add Google+ specific post meta data', 'wordpress-seo' ) );
|
||||
echo '</p>';
|
||||
|
||||
echo $wpseo_admin_pages->textinput( 'plus-publisher', __( 'Google Publisher Page', 'wordpress-seo' ) );
|
||||
|
||||
@@ -24,8 +24,6 @@ $wpseo_admin_pages->admin_header( true, WPSEO_Options::get_group_name( 'wpseo_xm
|
||||
|
||||
$options = get_option( 'wpseo_xml' );
|
||||
|
||||
$base = $GLOBALS['wp_rewrite']->using_index_permalinks() ? 'index.php/' : '';
|
||||
|
||||
$content = $wpseo_admin_pages->checkbox( 'enablexmlsitemap', __( 'Check this box to enable XML sitemap functionality.', 'wordpress-seo' ), false );
|
||||
$content .= '<div id="sitemapinfo">';
|
||||
if ( wpseo_is_nginx() ) {
|
||||
@@ -37,7 +35,7 @@ rewrite ^/([^/]+?)-sitemap([0-9]+)?\.xml$ /index.php?sitemap=$1&sitemap_n=$2 las
|
||||
}
|
||||
|
||||
if ( $options['enablexmlsitemap'] === true ) {
|
||||
$content .= '<p>' . sprintf( esc_html__( 'You can find your XML Sitemap here: %sXML Sitemap%s', 'wordpress-seo' ), '<a target="_blank" class="button-secondary" href="' . esc_url( home_url( $base . 'sitemap_index.xml' ) ) . '">', '</a>' ) . '<br/><br/>' . __( 'You do <strong>not</strong> need to generate the XML sitemap, nor will it take up time to generate after publishing a post.', 'wordpress-seo' ) . '</p>';
|
||||
$content .= '<p>' . sprintf( esc_html__( 'You can find your XML Sitemap here: %sXML Sitemap%s', 'wordpress-seo' ), '<a target="_blank" class="button-secondary" href="' . esc_url( wpseo_xml_sitemaps_base_url( 'sitemap_index.xml' ) ) . '">', '</a>' ) . '<br/><br/>' . __( 'You do <strong>not</strong> need to generate the XML sitemap, nor will it take up time to generate after publishing a post.', 'wordpress-seo' ) . '</p>';
|
||||
} else {
|
||||
$content .= '<p>' . __( 'Save your settings to activate XML Sitemaps.', 'wordpress-seo' ) . '</p>';
|
||||
}
|
||||
@@ -52,7 +50,7 @@ $content .= $wpseo_admin_pages->checkbox( 'disable_author_noposts', __( 'Disable
|
||||
|
||||
$roles = wpseo_get_roles();
|
||||
if ( is_array( $roles ) && $roles !== array() ) {
|
||||
$content .= '<p><strong>' . __( 'Exclude userroles', 'wordpress-seo' ) . '</strong><br/>';
|
||||
$content .= '<p><strong>' . __( 'Exclude user roles', 'wordpress-seo' ) . '</strong><br/>';
|
||||
$content .= __( 'Please check the appropriate box below if there\'s a user role that you do <strong>NOT</strong> want to include in your sitemap:', 'wordpress-seo' ) . '</p>';
|
||||
foreach ( $roles as $role_key => $role_name ) {
|
||||
$content .= $wpseo_admin_pages->checkbox( 'user_role-' . $role_key . '-not_in_sitemap', $role_name );
|
||||
@@ -101,4 +99,4 @@ $wpseo_admin_pages->postbox( 'xmlsitemaps', __( 'XML Sitemap', 'wordpress-seo' )
|
||||
|
||||
do_action( 'wpseo_xmlsitemaps_config' );
|
||||
|
||||
$wpseo_admin_pages->admin_footer();
|
||||
$wpseo_admin_pages->admin_footer();
|
||||
@@ -1,28 +0,0 @@
|
||||
<?xml version="1.0"?>
|
||||
<ruleset name="WordPress SEO">
|
||||
<description>WordPress SEO rules for PHP_CodeSniffer</description>
|
||||
|
||||
<exclude-pattern>tests/*</exclude-pattern>
|
||||
<exclude-pattern>admin/license-manager/*</exclude-pattern>
|
||||
|
||||
<rule ref="WordPress-VIP">
|
||||
<exclude name="Generic.Files.LineEndings.InvalidEOLChar" />
|
||||
<exclude name="Squiz.WhiteSpace.SuperfluousWhitespace.EmptyLines" />
|
||||
|
||||
<!-- WP VIP rules which are very restrictive and not all that applicable as WPSEO is not on VIP -->
|
||||
<exclude name="WordPress.VIP.DirectDatabaseQuery" />
|
||||
<exclude name="WordPress.VIP.FileSystemWritesDisallow"/>
|
||||
<exclude name="WordPress.VIP.RestrictedFunctions.user_meta" />
|
||||
<exclude name="WordPress.VIP.RestrictedVariables.user_meta"/>
|
||||
<exclude name="WordPress.VIP.RestrictedFunctions.switch_to_blog"/>
|
||||
|
||||
<!-- We should probably want to turn the below rules on, but these give issues with the current code base. -->
|
||||
<exclude name="WordPress.WhiteSpace.ScopeIndent.Incorrect" />
|
||||
<exclude name="WordPress.XSS.EscapeOutput" /><!-- This sniff also has known & reported bugs -->
|
||||
<exclude name="WordPress.VIP.PostsPerPage.posts_per_page"/>
|
||||
|
||||
<!-- Turned off because of known & reported bugs in the Sniffs, should be turned on once the bugs are fixed. -->
|
||||
<exclude name="WordPress.VIP.ValidatedSanitizedInput"/>
|
||||
</rule>
|
||||
<rule ref="WordPress.PHP.DiscouragedFunctions"/>
|
||||
</ruleset>
|
||||
@@ -1,32 +1,37 @@
|
||||
.wpseo-score-icon {
|
||||
float: left;
|
||||
margin: 10px 10px 0 4px !important;
|
||||
display: inline-block !important;
|
||||
float: left;
|
||||
width: 12px !important;
|
||||
height: 12px !important;
|
||||
-webkit-border-radius: 50% !important;
|
||||
margin: 10px 10px 0 4px !important;
|
||||
border-radius: 50% !important;
|
||||
background-color: #999;
|
||||
}
|
||||
|
||||
.wpseo-score-icon.good {
|
||||
background-color: #7ad03a;
|
||||
}
|
||||
|
||||
.wpseo-score-icon.ok {
|
||||
background-color: #ffba00;
|
||||
}
|
||||
|
||||
.wpseo-score-icon.poor {
|
||||
background-color: #ee7c1b;
|
||||
}
|
||||
|
||||
.wpseo-score-icon.bad {
|
||||
background-color: #dd3d36;
|
||||
}
|
||||
|
||||
.wpseo-score-icon.na {
|
||||
background-color: #999;
|
||||
}
|
||||
|
||||
.wpseo-score-icon.noindex {
|
||||
background-color: #1e8cbe;
|
||||
}
|
||||
|
||||
#wp-admin-bar-wpseo-menu:hover .wpseo-score-icon {
|
||||
background-color: #2ea2cc;
|
||||
}
|
||||
}
|
||||
@@ -1 +1 @@
|
||||
.wpseo-score-icon{float:left;margin:10px 10px 0 4px!important;display:inline-block!important;width:12px!important;height:12px!important;-webkit-border-radius:50%!important;border-radius:50%!important;background-color:#999}.wpseo-score-icon.good{background-color:#7ad03a}.wpseo-score-icon.ok{background-color:#ffba00}.wpseo-score-icon.poor{background-color:#ee7c1b}.wpseo-score-icon.bad{background-color:#dd3d36}.wpseo-score-icon.na{background-color:#999}.wpseo-score-icon.noindex{background-color:#1e8cbe}#wp-admin-bar-wpseo-menu:hover .wpseo-score-icon{background-color:#2ea2cc}
|
||||
.wpseo-score-icon{display:inline-block!important;float:left;width:12px!important;height:12px!important;margin:10px 10px 0 4px!important;border-radius:50%!important;background-color:#999}.wpseo-score-icon.good{background-color:#7ad03a}.wpseo-score-icon.ok{background-color:#ffba00}.wpseo-score-icon.poor{background-color:#ee7c1b}.wpseo-score-icon.bad{background-color:#dd3d36}.wpseo-score-icon.na{background-color:#999}.wpseo-score-icon.noindex{background-color:#1e8cbe}#wp-admin-bar-wpseo-menu:hover .wpseo-score-icon{background-color:#2ea2cc}
|
||||
@@ -2,36 +2,42 @@
|
||||
display: inline-block;
|
||||
width: 12px;
|
||||
height: 12px;
|
||||
-webkit-border-radius: 50%;
|
||||
margin-left: 6px;
|
||||
border-radius: 50%;
|
||||
background: #888;
|
||||
line-height: 16px;
|
||||
margin-left: 6px;
|
||||
}
|
||||
|
||||
.wpseo-score-icon.good {
|
||||
background-color: #7ad03a;
|
||||
}
|
||||
|
||||
.wpseo-score-icon.ok {
|
||||
background-color: #ffba00;
|
||||
}
|
||||
|
||||
.wpseo-score-icon.poor {
|
||||
background-color: #ee7c1b;
|
||||
}
|
||||
|
||||
.wpseo-score-icon.bad {
|
||||
background-color: #dd3d36;
|
||||
}
|
||||
|
||||
.wpseo-score-icon.na {
|
||||
background-color: #888;
|
||||
}
|
||||
|
||||
.wpseo-score-icon.noindex {
|
||||
background-color: #1e8cbe;
|
||||
}
|
||||
|
||||
th#wpseo-score {
|
||||
width: 60px;
|
||||
width: 61px;
|
||||
}
|
||||
|
||||
@media screen and ( max-width: 782px ) {
|
||||
.column-wpseo-title, .column-wpseo-score, .column-wpseo-metadesc, .column-wpseo-focuskw {
|
||||
display: none;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1 +1 @@
|
||||
.wpseo-score-icon{display:inline-block;width:12px;height:12px;-webkit-border-radius:50%;border-radius:50%;background:#888;line-height:16px;margin-left:6px}.wpseo-score-icon.good{background-color:#7ad03a}.wpseo-score-icon.ok{background-color:#ffba00}.wpseo-score-icon.poor{background-color:#ee7c1b}.wpseo-score-icon.bad{background-color:#dd3d36}.wpseo-score-icon.na{background-color:#888}.wpseo-score-icon.noindex{background-color:#1e8cbe}th#wpseo-score{width:60px}@media screen and (max-width:782px){.column-wpseo-focuskw,.column-wpseo-metadesc,.column-wpseo-score,.column-wpseo-title{display:none}}
|
||||
.wpseo-score-icon{display:inline-block;width:12px;height:12px;margin-left:6px;border-radius:50%;background:#888;line-height:16px}.wpseo-score-icon.good{background-color:#7ad03a}.wpseo-score-icon.ok{background-color:#ffba00}.wpseo-score-icon.poor{background-color:#ee7c1b}.wpseo-score-icon.bad{background-color:#dd3d36}.wpseo-score-icon.na{background-color:#888}.wpseo-score-icon.noindex{background-color:#1e8cbe}th#wpseo-score{width:60px}@media screen and (max-width:782px){.column-wpseo-focuskw,.column-wpseo-metadesc,.column-wpseo-score,.column-wpseo-title{display:none}}
|
||||
@@ -0,0 +1,617 @@
|
||||
/*
|
||||
* qTip2 - Pretty powerful tooltips - v2.2.1
|
||||
* http://qtip2.com
|
||||
*
|
||||
* Copyright (c) 2014
|
||||
* Released under the MIT licenses
|
||||
* http://jquery.org/license
|
||||
*
|
||||
* Date: Sat Sep 6 2014 11:12 GMT+0100+0100
|
||||
* Plugins: tips modal viewport svg imagemap ie6
|
||||
* Styles: core basic css3
|
||||
*/
|
||||
.qtip{
|
||||
position: absolute;
|
||||
left: -28000px;
|
||||
top: -28000px;
|
||||
display: none;
|
||||
|
||||
max-width: 280px;
|
||||
min-width: 50px;
|
||||
|
||||
font-size: 10.5px;
|
||||
line-height: 12px;
|
||||
|
||||
direction: ltr;
|
||||
|
||||
box-shadow: none;
|
||||
padding: 0;
|
||||
}
|
||||
|
||||
.qtip-content{
|
||||
position: relative;
|
||||
padding: 5px 9px;
|
||||
overflow: hidden;
|
||||
|
||||
text-align: left;
|
||||
word-wrap: break-word;
|
||||
}
|
||||
|
||||
.qtip-titlebar{
|
||||
position: relative;
|
||||
padding: 5px 35px 5px 10px;
|
||||
overflow: hidden;
|
||||
|
||||
border-width: 0 0 1px;
|
||||
font-weight: bold;
|
||||
}
|
||||
|
||||
.qtip-titlebar + .qtip-content{ border-top-width: 0 !important; }
|
||||
|
||||
/* Default close button class */
|
||||
.qtip-close{
|
||||
position: absolute;
|
||||
right: -9px; top: -9px;
|
||||
z-index: 11; /* Overlap .qtip-tip */
|
||||
|
||||
cursor: pointer;
|
||||
outline: medium none;
|
||||
|
||||
border: 1px solid transparent;
|
||||
}
|
||||
|
||||
.qtip-titlebar .qtip-close{
|
||||
right: 4px; top: 50%;
|
||||
margin-top: -9px;
|
||||
}
|
||||
|
||||
* html .qtip-titlebar .qtip-close{ top: 16px; } /* IE fix */
|
||||
|
||||
.qtip-titlebar .ui-icon,
|
||||
.qtip-icon .ui-icon{
|
||||
display: block;
|
||||
text-indent: -1000em;
|
||||
direction: ltr;
|
||||
}
|
||||
|
||||
.qtip-icon, .qtip-icon .ui-icon{
|
||||
-moz-border-radius: 3px;
|
||||
-webkit-border-radius: 3px;
|
||||
border-radius: 3px;
|
||||
text-decoration: none;
|
||||
}
|
||||
|
||||
.qtip-icon .ui-icon{
|
||||
width: 18px;
|
||||
height: 14px;
|
||||
|
||||
line-height: 14px;
|
||||
text-align: center;
|
||||
text-indent: 0;
|
||||
font: normal bold 10px/13px Tahoma,sans-serif;
|
||||
|
||||
color: inherit;
|
||||
background: transparent none no-repeat -100em -100em;
|
||||
}
|
||||
|
||||
/* Applied to 'focused' tooltips e.g. most recently displayed/interacted with */
|
||||
.qtip-focus{}
|
||||
|
||||
/* Applied on hover of tooltips i.e. added/removed on mouseenter/mouseleave respectively */
|
||||
.qtip-hover{}
|
||||
|
||||
/* Default tooltip style */
|
||||
.qtip-default{
|
||||
border: 1px solid #F1D031;
|
||||
|
||||
background-color: #FFFFA3;
|
||||
color: #555;
|
||||
}
|
||||
|
||||
.qtip-default .qtip-titlebar{
|
||||
background-color: #FFEF93;
|
||||
}
|
||||
|
||||
.qtip-default .qtip-icon{
|
||||
border-color: #CCC;
|
||||
background: #F1F1F1;
|
||||
color: #777;
|
||||
}
|
||||
|
||||
.qtip-default .qtip-titlebar .qtip-close{
|
||||
border-color: #AAA;
|
||||
color: #111;
|
||||
}
|
||||
|
||||
|
||||
/*! Light tooltip style */
|
||||
.qtip-light{
|
||||
background-color: white;
|
||||
border-color: #E2E2E2;
|
||||
color: #454545;
|
||||
}
|
||||
|
||||
.qtip-light .qtip-titlebar{
|
||||
background-color: #f1f1f1;
|
||||
}
|
||||
|
||||
|
||||
/*! Dark tooltip style */
|
||||
.qtip-dark{
|
||||
background-color: #505050;
|
||||
border-color: #303030;
|
||||
color: #f3f3f3;
|
||||
}
|
||||
|
||||
.qtip-dark .qtip-titlebar{
|
||||
background-color: #404040;
|
||||
}
|
||||
|
||||
.qtip-dark .qtip-icon{
|
||||
border-color: #444;
|
||||
}
|
||||
|
||||
.qtip-dark .qtip-titlebar .ui-state-hover{
|
||||
border-color: #303030;
|
||||
}
|
||||
|
||||
|
||||
/*! Cream tooltip style */
|
||||
.qtip-cream{
|
||||
background-color: #FBF7AA;
|
||||
border-color: #F9E98E;
|
||||
color: #A27D35;
|
||||
}
|
||||
|
||||
.qtip-cream .qtip-titlebar{
|
||||
background-color: #F0DE7D;
|
||||
}
|
||||
|
||||
.qtip-cream .qtip-close .qtip-icon{
|
||||
background-position: -82px 0;
|
||||
}
|
||||
|
||||
|
||||
/*! Red tooltip style */
|
||||
.qtip-red{
|
||||
background-color: #F78B83;
|
||||
border-color: #D95252;
|
||||
color: #912323;
|
||||
}
|
||||
|
||||
.qtip-red .qtip-titlebar{
|
||||
background-color: #F06D65;
|
||||
}
|
||||
|
||||
.qtip-red .qtip-close .qtip-icon{
|
||||
background-position: -102px 0;
|
||||
}
|
||||
|
||||
.qtip-red .qtip-icon{
|
||||
border-color: #D95252;
|
||||
}
|
||||
|
||||
.qtip-red .qtip-titlebar .ui-state-hover{
|
||||
border-color: #D95252;
|
||||
}
|
||||
|
||||
|
||||
/*! Green tooltip style */
|
||||
.qtip-green{
|
||||
background-color: #CAED9E;
|
||||
border-color: #90D93F;
|
||||
color: #3F6219;
|
||||
}
|
||||
|
||||
.qtip-green .qtip-titlebar{
|
||||
background-color: #B0DE78;
|
||||
}
|
||||
|
||||
.qtip-green .qtip-close .qtip-icon{
|
||||
background-position: -42px 0;
|
||||
}
|
||||
|
||||
|
||||
/*! Blue tooltip style */
|
||||
.qtip-blue{
|
||||
background-color: #E5F6FE;
|
||||
border-color: #ADD9ED;
|
||||
color: #5E99BD;
|
||||
}
|
||||
|
||||
.qtip-blue .qtip-titlebar{
|
||||
background-color: #D0E9F5;
|
||||
}
|
||||
|
||||
.qtip-blue .qtip-close .qtip-icon{
|
||||
background-position: -2px 0;
|
||||
}
|
||||
|
||||
|
||||
.qtip-shadow{
|
||||
-webkit-box-shadow: 1px 1px 3px 1px rgba(0, 0, 0, 0.15);
|
||||
-moz-box-shadow: 1px 1px 3px 1px rgba(0, 0, 0, 0.15);
|
||||
box-shadow: 1px 1px 3px 1px rgba(0, 0, 0, 0.15);
|
||||
}
|
||||
|
||||
/* Add rounded corners to your tooltips in: FF3+, Chrome 2+, Opera 10.6+, IE9+, Safari 2+ */
|
||||
.qtip-rounded,
|
||||
.qtip-tipsy,
|
||||
.qtip-bootstrap{
|
||||
-moz-border-radius: 5px;
|
||||
-webkit-border-radius: 5px;
|
||||
border-radius: 5px;
|
||||
}
|
||||
|
||||
.qtip-rounded .qtip-titlebar{
|
||||
-moz-border-radius: 4px 4px 0 0;
|
||||
-webkit-border-radius: 4px 4px 0 0;
|
||||
border-radius: 4px 4px 0 0;
|
||||
}
|
||||
|
||||
/* Youtube tooltip style */
|
||||
.qtip-youtube{
|
||||
-moz-border-radius: 2px;
|
||||
-webkit-border-radius: 2px;
|
||||
border-radius: 2px;
|
||||
|
||||
-webkit-box-shadow: 0 0 3px #333;
|
||||
-moz-box-shadow: 0 0 3px #333;
|
||||
box-shadow: 0 0 3px #333;
|
||||
|
||||
color: white;
|
||||
border: 0 solid transparent;
|
||||
|
||||
background: #4A4A4A;
|
||||
background-image: -webkit-gradient(linear,left top,left bottom,color-stop(0,#4A4A4A),color-stop(100%,black));
|
||||
background-image: -webkit-linear-gradient(top,#4A4A4A 0,black 100%);
|
||||
background-image: -moz-linear-gradient(top,#4A4A4A 0,black 100%);
|
||||
background-image: -ms-linear-gradient(top,#4A4A4A 0,black 100%);
|
||||
background-image: -o-linear-gradient(top,#4A4A4A 0,black 100%);
|
||||
}
|
||||
|
||||
.qtip-youtube .qtip-titlebar{
|
||||
background-color: #4A4A4A;
|
||||
background-color: rgba(0,0,0,0);
|
||||
}
|
||||
|
||||
.qtip-youtube .qtip-content{
|
||||
padding: .75em;
|
||||
font: 12px arial,sans-serif;
|
||||
|
||||
filter: progid:DXImageTransform.Microsoft.Gradient(GradientType=0,StartColorStr=#4a4a4a,EndColorStr=#000000);
|
||||
-ms-filter: "progid:DXImageTransform.Microsoft.Gradient(GradientType=0,StartColorStr=#4a4a4a,EndColorStr=#000000);";
|
||||
}
|
||||
|
||||
.qtip-youtube .qtip-icon{
|
||||
border-color: #222;
|
||||
}
|
||||
|
||||
.qtip-youtube .qtip-titlebar .ui-state-hover{
|
||||
border-color: #303030;
|
||||
}
|
||||
|
||||
|
||||
/* jQuery TOOLS Tooltip style */
|
||||
.qtip-jtools{
|
||||
background: #232323;
|
||||
background: rgba(0, 0, 0, 0.7);
|
||||
background-image: -webkit-gradient(linear, left top, left bottom, from(#717171), to(#232323));
|
||||
background-image: -moz-linear-gradient(top, #717171, #232323);
|
||||
background-image: -webkit-linear-gradient(top, #717171, #232323);
|
||||
background-image: -ms-linear-gradient(top, #717171, #232323);
|
||||
background-image: -o-linear-gradient(top, #717171, #232323);
|
||||
|
||||
border: 2px solid #ddd;
|
||||
border: 2px solid rgba(241,241,241,1);
|
||||
|
||||
-moz-border-radius: 2px;
|
||||
-webkit-border-radius: 2px;
|
||||
border-radius: 2px;
|
||||
|
||||
-webkit-box-shadow: 0 0 12px #333;
|
||||
-moz-box-shadow: 0 0 12px #333;
|
||||
box-shadow: 0 0 12px #333;
|
||||
}
|
||||
|
||||
/* IE Specific */
|
||||
.qtip-jtools .qtip-titlebar{
|
||||
background-color: transparent;
|
||||
filter:progid:DXImageTransform.Microsoft.gradient(startColorstr=#717171,endColorstr=#4A4A4A);
|
||||
-ms-filter: "progid:DXImageTransform.Microsoft.gradient(startColorstr=#717171,endColorstr=#4A4A4A)";
|
||||
}
|
||||
.qtip-jtools .qtip-content{
|
||||
filter:progid:DXImageTransform.Microsoft.gradient(startColorstr=#4A4A4A,endColorstr=#232323);
|
||||
-ms-filter: "progid:DXImageTransform.Microsoft.gradient(startColorstr=#4A4A4A,endColorstr=#232323)";
|
||||
}
|
||||
|
||||
.qtip-jtools .qtip-titlebar,
|
||||
.qtip-jtools .qtip-content{
|
||||
background: transparent;
|
||||
color: white;
|
||||
border: 0 dashed transparent;
|
||||
}
|
||||
|
||||
.qtip-jtools .qtip-icon{
|
||||
border-color: #555;
|
||||
}
|
||||
|
||||
.qtip-jtools .qtip-titlebar .ui-state-hover{
|
||||
border-color: #333;
|
||||
}
|
||||
|
||||
|
||||
/* Cluetip style */
|
||||
.qtip-cluetip{
|
||||
-webkit-box-shadow: 4px 4px 5px rgba(0, 0, 0, 0.4);
|
||||
-moz-box-shadow: 4px 4px 5px rgba(0, 0, 0, 0.4);
|
||||
box-shadow: 4px 4px 5px rgba(0, 0, 0, 0.4);
|
||||
|
||||
background-color: #D9D9C2;
|
||||
color: #111;
|
||||
border: 0 dashed transparent;
|
||||
}
|
||||
|
||||
.qtip-cluetip .qtip-titlebar{
|
||||
background-color: #87876A;
|
||||
color: white;
|
||||
border: 0 dashed transparent;
|
||||
}
|
||||
|
||||
.qtip-cluetip .qtip-icon{
|
||||
border-color: #808064;
|
||||
}
|
||||
|
||||
.qtip-cluetip .qtip-titlebar .ui-state-hover{
|
||||
border-color: #696952;
|
||||
color: #696952;
|
||||
}
|
||||
|
||||
|
||||
/* Tipsy style */
|
||||
.qtip-tipsy{
|
||||
background: black;
|
||||
background: rgba(0, 0, 0, .87);
|
||||
|
||||
color: white;
|
||||
border: 0 solid transparent;
|
||||
|
||||
font-size: 11px;
|
||||
font-family: 'Lucida Grande', sans-serif;
|
||||
font-weight: bold;
|
||||
line-height: 16px;
|
||||
text-shadow: 0 1px black;
|
||||
}
|
||||
|
||||
.qtip-tipsy .qtip-titlebar{
|
||||
padding: 6px 35px 0 10px;
|
||||
background-color: transparent;
|
||||
}
|
||||
|
||||
.qtip-tipsy .qtip-content{
|
||||
padding: 6px 10px;
|
||||
}
|
||||
|
||||
.qtip-tipsy .qtip-icon{
|
||||
border-color: #222;
|
||||
text-shadow: none;
|
||||
}
|
||||
|
||||
.qtip-tipsy .qtip-titlebar .ui-state-hover{
|
||||
border-color: #303030;
|
||||
}
|
||||
|
||||
|
||||
/* Tipped style */
|
||||
.qtip-tipped{
|
||||
border: 3px solid #959FA9;
|
||||
|
||||
-moz-border-radius: 3px;
|
||||
-webkit-border-radius: 3px;
|
||||
border-radius: 3px;
|
||||
|
||||
background-color: #F9F9F9;
|
||||
color: #454545;
|
||||
|
||||
font-weight: normal;
|
||||
font-family: serif;
|
||||
}
|
||||
|
||||
.qtip-tipped .qtip-titlebar{
|
||||
border-bottom-width: 0;
|
||||
|
||||
color: white;
|
||||
background: #3A79B8;
|
||||
background-image: -webkit-gradient(linear, left top, left bottom, from(#3A79B8), to(#2E629D));
|
||||
background-image: -webkit-linear-gradient(top, #3A79B8, #2E629D);
|
||||
background-image: -moz-linear-gradient(top, #3A79B8, #2E629D);
|
||||
background-image: -ms-linear-gradient(top, #3A79B8, #2E629D);
|
||||
background-image: -o-linear-gradient(top, #3A79B8, #2E629D);
|
||||
filter:progid:DXImageTransform.Microsoft.gradient(startColorstr=#3A79B8,endColorstr=#2E629D);
|
||||
-ms-filter: "progid:DXImageTransform.Microsoft.gradient(startColorstr=#3A79B8,endColorstr=#2E629D)";
|
||||
}
|
||||
|
||||
.qtip-tipped .qtip-icon{
|
||||
border: 2px solid #285589;
|
||||
background: #285589;
|
||||
}
|
||||
|
||||
.qtip-tipped .qtip-icon .ui-icon{
|
||||
background-color: #FBFBFB;
|
||||
color: #555;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Twitter Bootstrap style.
|
||||
*
|
||||
* Tested with IE 8, IE 9, Chrome 18, Firefox 9, Opera 11.
|
||||
* Does not work with IE 7.
|
||||
*/
|
||||
.qtip-bootstrap{
|
||||
/** Taken from Bootstrap body */
|
||||
font-size: 14px;
|
||||
line-height: 20px;
|
||||
color: #333333;
|
||||
|
||||
/** Taken from Bootstrap .popover */
|
||||
padding: 1px;
|
||||
background-color: #ffffff;
|
||||
border: 1px solid #ccc;
|
||||
border: 1px solid rgba(0, 0, 0, 0.2);
|
||||
-webkit-border-radius: 6px;
|
||||
-moz-border-radius: 6px;
|
||||
border-radius: 6px;
|
||||
-webkit-box-shadow: 0 5px 10px rgba(0, 0, 0, 0.2);
|
||||
-moz-box-shadow: 0 5px 10px rgba(0, 0, 0, 0.2);
|
||||
box-shadow: 0 5px 10px rgba(0, 0, 0, 0.2);
|
||||
-webkit-background-clip: padding-box;
|
||||
-moz-background-clip: padding;
|
||||
background-clip: padding-box;
|
||||
}
|
||||
|
||||
.qtip-bootstrap .qtip-titlebar{
|
||||
/** Taken from Bootstrap .popover-title */
|
||||
padding: 8px 14px;
|
||||
margin: 0;
|
||||
font-size: 14px;
|
||||
font-weight: normal;
|
||||
line-height: 18px;
|
||||
background-color: #f7f7f7;
|
||||
border-bottom: 1px solid #ebebeb;
|
||||
-webkit-border-radius: 5px 5px 0 0;
|
||||
-moz-border-radius: 5px 5px 0 0;
|
||||
border-radius: 5px 5px 0 0;
|
||||
}
|
||||
|
||||
.qtip-bootstrap .qtip-titlebar .qtip-close{
|
||||
/**
|
||||
* Overrides qTip2:
|
||||
* .qtip-titlebar .qtip-close{
|
||||
* [...]
|
||||
* right: 4px;
|
||||
* top: 50%;
|
||||
* [...]
|
||||
* border-style: solid;
|
||||
* }
|
||||
*/
|
||||
right: 11px;
|
||||
top: 45%;
|
||||
border-style: none;
|
||||
}
|
||||
|
||||
.qtip-bootstrap .qtip-content{
|
||||
/** Taken from Bootstrap .popover-content */
|
||||
padding: 9px 14px;
|
||||
}
|
||||
|
||||
.qtip-bootstrap .qtip-icon{
|
||||
/**
|
||||
* Overrides qTip2:
|
||||
* .qtip-default .qtip-icon {
|
||||
* border-color: #CCC;
|
||||
* background: #F1F1F1;
|
||||
* color: #777;
|
||||
* }
|
||||
*/
|
||||
background: transparent;
|
||||
}
|
||||
|
||||
.qtip-bootstrap .qtip-icon .ui-icon{
|
||||
/**
|
||||
* Overrides qTip2:
|
||||
* .qtip-icon .ui-icon{
|
||||
* width: 18px;
|
||||
* height: 14px;
|
||||
* }
|
||||
*/
|
||||
width: auto;
|
||||
height: auto;
|
||||
|
||||
/* Taken from Bootstrap .close */
|
||||
float: right;
|
||||
font-size: 20px;
|
||||
font-weight: bold;
|
||||
line-height: 18px;
|
||||
color: #000000;
|
||||
text-shadow: 0 1px 0 #ffffff;
|
||||
opacity: 0.2;
|
||||
filter: alpha(opacity=20);
|
||||
}
|
||||
|
||||
.qtip-bootstrap .qtip-icon .ui-icon:hover{
|
||||
/* Taken from Bootstrap .close:hover */
|
||||
color: #000000;
|
||||
text-decoration: none;
|
||||
cursor: pointer;
|
||||
opacity: 0.4;
|
||||
filter: alpha(opacity=40);
|
||||
}
|
||||
|
||||
|
||||
/* IE9 fix - removes all filters */
|
||||
.qtip:not(.ie9haxors) div.qtip-content,
|
||||
.qtip:not(.ie9haxors) div.qtip-titlebar{
|
||||
filter: none;
|
||||
-ms-filter: none;
|
||||
}
|
||||
|
||||
|
||||
.qtip .qtip-tip{
|
||||
margin: 0 auto;
|
||||
overflow: hidden;
|
||||
z-index: 10;
|
||||
|
||||
}
|
||||
|
||||
/* Opera bug #357 - Incorrect tip position
|
||||
https://github.com/Craga89/qTip2/issues/367 */
|
||||
x:-o-prefocus, .qtip .qtip-tip{
|
||||
visibility: hidden;
|
||||
}
|
||||
|
||||
.qtip .qtip-tip,
|
||||
.qtip .qtip-tip .qtip-vml,
|
||||
.qtip .qtip-tip canvas{
|
||||
position: absolute;
|
||||
|
||||
color: #123456;
|
||||
background: transparent;
|
||||
border: 0 dashed transparent;
|
||||
}
|
||||
|
||||
.qtip .qtip-tip canvas{ top: 0; left: 0; }
|
||||
|
||||
.qtip .qtip-tip .qtip-vml{
|
||||
behavior: url(#default#VML);
|
||||
display: inline-block;
|
||||
visibility: visible;
|
||||
}
|
||||
|
||||
|
||||
#qtip-overlay{
|
||||
position: fixed;
|
||||
left: 0; top: 0;
|
||||
width: 100%; height: 100%;
|
||||
}
|
||||
|
||||
/* Applied to modals with show.modal.blur set to true */
|
||||
#qtip-overlay.blurs{ cursor: pointer; }
|
||||
|
||||
/* Change opacity of overlay here */
|
||||
#qtip-overlay div{
|
||||
position: absolute;
|
||||
left: 0; top: 0;
|
||||
width: 100%; height: 100%;
|
||||
|
||||
background-color: black;
|
||||
|
||||
opacity: 0.7;
|
||||
filter:alpha(opacity=70);
|
||||
-ms-filter:"progid:DXImageTransform.Microsoft.Alpha(Opacity=70)";
|
||||
}
|
||||
|
||||
|
||||
.qtipmodal-ie6fix{
|
||||
position: absolute !important;
|
||||
}
|
||||
@@ -0,0 +1,3 @@
|
||||
/* qTip2 v2.2.1 | Plugins: tips modal viewport svg imagemap ie6 | Styles: core basic css3 | qtip2.com | Licensed MIT | Sat Sep 06 2014 23:12:07 */
|
||||
|
||||
.qtip{position:absolute;left:-28000px;top:-28000px;display:none;max-width:280px;min-width:50px;font-size:10.5px;line-height:12px;direction:ltr;box-shadow:none;padding:0}.qtip-content{position:relative;padding:5px 9px;overflow:hidden;text-align:left;word-wrap:break-word}.qtip-titlebar{position:relative;padding:5px 35px 5px 10px;overflow:hidden;border-width:0 0 1px;font-weight:700}.qtip-titlebar+.qtip-content{border-top-width:0!important}.qtip-close{position:absolute;right:-9px;top:-9px;z-index:11;cursor:pointer;outline:0;border:1px solid transparent}.qtip-titlebar .qtip-close{right:4px;top:50%;margin-top:-9px}* html .qtip-titlebar .qtip-close{top:16px}.qtip-icon .ui-icon,.qtip-titlebar .ui-icon{display:block;text-indent:-1000em;direction:ltr}.qtip-icon,.qtip-icon .ui-icon{-moz-border-radius:3px;-webkit-border-radius:3px;border-radius:3px;text-decoration:none}.qtip-icon .ui-icon{width:18px;height:14px;line-height:14px;text-align:center;text-indent:0;font:400 bold 10px/13px Tahoma,sans-serif;color:inherit;background:-100em -100em no-repeat}.qtip-default{border:1px solid #F1D031;background-color:#FFFFA3;color:#555}.qtip-default .qtip-titlebar{background-color:#FFEF93}.qtip-default .qtip-icon{border-color:#CCC;background:#F1F1F1;color:#777}.qtip-default .qtip-titlebar .qtip-close{border-color:#AAA;color:#111}.qtip-light{background-color:#fff;border-color:#E2E2E2;color:#454545}.qtip-light .qtip-titlebar{background-color:#f1f1f1}.qtip-dark{background-color:#505050;border-color:#303030;color:#f3f3f3}.qtip-dark .qtip-titlebar{background-color:#404040}.qtip-dark .qtip-icon{border-color:#444}.qtip-dark .qtip-titlebar .ui-state-hover{border-color:#303030}.qtip-cream{background-color:#FBF7AA;border-color:#F9E98E;color:#A27D35}.qtip-cream .qtip-titlebar{background-color:#F0DE7D}.qtip-cream .qtip-close .qtip-icon{background-position:-82px 0}.qtip-red{background-color:#F78B83;border-color:#D95252;color:#912323}.qtip-red .qtip-titlebar{background-color:#F06D65}.qtip-red .qtip-close .qtip-icon{background-position:-102px 0}.qtip-red .qtip-icon,.qtip-red .qtip-titlebar .ui-state-hover{border-color:#D95252}.qtip-green{background-color:#CAED9E;border-color:#90D93F;color:#3F6219}.qtip-green .qtip-titlebar{background-color:#B0DE78}.qtip-green .qtip-close .qtip-icon{background-position:-42px 0}.qtip-blue{background-color:#E5F6FE;border-color:#ADD9ED;color:#5E99BD}.qtip-blue .qtip-titlebar{background-color:#D0E9F5}.qtip-blue .qtip-close .qtip-icon{background-position:-2px 0}.qtip-shadow{-webkit-box-shadow:1px 1px 3px 1px rgba(0,0,0,.15);-moz-box-shadow:1px 1px 3px 1px rgba(0,0,0,.15);box-shadow:1px 1px 3px 1px rgba(0,0,0,.15)}.qtip-bootstrap,.qtip-rounded,.qtip-tipsy{-moz-border-radius:5px;-webkit-border-radius:5px;border-radius:5px}.qtip-rounded .qtip-titlebar{-moz-border-radius:4px 4px 0 0;-webkit-border-radius:4px 4px 0 0;border-radius:4px 4px 0 0}.qtip-youtube{-moz-border-radius:2px;-webkit-border-radius:2px;border-radius:2px;-webkit-box-shadow:0 0 3px #333;-moz-box-shadow:0 0 3px #333;box-shadow:0 0 3px #333;color:#fff;border:0 solid transparent;background:#4A4A4A;background-image:-webkit-gradient(linear,left top,left bottom,color-stop(0,#4A4A4A),color-stop(100%,#000));background-image:-webkit-linear-gradient(top,#4A4A4A 0,#000 100%);background-image:-moz-linear-gradient(top,#4A4A4A 0,#000 100%);background-image:-ms-linear-gradient(top,#4A4A4A 0,#000 100%);background-image:-o-linear-gradient(top,#4A4A4A 0,#000 100%)}.qtip-youtube .qtip-titlebar{background-color:transparent}.qtip-youtube .qtip-content{padding:.75em;font:12px arial,sans-serif;filter:progid:DXImageTransform.Microsoft.Gradient(GradientType=0, StartColorStr=#4a4a4a, EndColorStr=#000000);-ms-filter:"progid:DXImageTransform.Microsoft.Gradient(GradientType=0,StartColorStr=#4a4a4a,EndColorStr=#000000);"}.qtip-youtube .qtip-icon{border-color:#222}.qtip-youtube .qtip-titlebar .ui-state-hover{border-color:#303030}.qtip-jtools{background:#232323;background:rgba(0,0,0,.7);background-image:-webkit-gradient(linear,left top,left bottom,from(#717171),to(#232323));background-image:-moz-linear-gradient(top,#717171,#232323);background-image:-webkit-linear-gradient(top,#717171,#232323);background-image:-ms-linear-gradient(top,#717171,#232323);background-image:-o-linear-gradient(top,#717171,#232323);border:2px solid #ddd;border:2px solid rgba(241,241,241,1);-moz-border-radius:2px;-webkit-border-radius:2px;border-radius:2px;-webkit-box-shadow:0 0 12px #333;-moz-box-shadow:0 0 12px #333;box-shadow:0 0 12px #333}.qtip-jtools .qtip-titlebar{filter:progid:DXImageTransform.Microsoft.gradient(startColorstr=#717171, endColorstr=#4A4A4A);-ms-filter:"progid:DXImageTransform.Microsoft.gradient(startColorstr=#717171,endColorstr=#4A4A4A)"}.qtip-jtools .qtip-content{filter:progid:DXImageTransform.Microsoft.gradient(startColorstr=#4A4A4A, endColorstr=#232323);-ms-filter:"progid:DXImageTransform.Microsoft.gradient(startColorstr=#4A4A4A,endColorstr=#232323)"}.qtip-jtools .qtip-content,.qtip-jtools .Line truncated
|
||||
@@ -3,11 +3,11 @@
|
||||
*/
|
||||
|
||||
ul.wpseo-metabox-tabs li.active {
|
||||
background-color: #EFF8FF;
|
||||
background-color: #eff8ff;
|
||||
}
|
||||
|
||||
ul.wpseo-metabox-tabs li.active, div.wpseo-tab-content {
|
||||
border-color: #D1E5EE;
|
||||
border-color: #d1e5ee;
|
||||
}
|
||||
|
||||
.wpseo-metabox-tabs .active a {
|
||||
@@ -15,7 +15,7 @@ ul.wpseo-metabox-tabs li.active, div.wpseo-tab-content {
|
||||
}
|
||||
|
||||
#wpseotab .ui-widget-content .ui-state-hover {
|
||||
border: 1px solid #D1E5EE;
|
||||
background: #EFF8FF;
|
||||
border: 1px solid #d1e5ee;
|
||||
color: #333;
|
||||
}
|
||||
background: #eff8ff;
|
||||
}
|
||||
@@ -1 +1 @@
|
||||
ul.wpseo-metabox-tabs li.active{background-color:#eff8ff}ul.wpseo-metabox-tabs li.active,div.wpseo-tab-content{border-color:#d1e5ee}.wpseo-metabox-tabs .active a{color:#333}#wpseotab .ui-widget-content .ui-state-hover{border:1px solid #d1e5ee;background:#eff8ff;color:#333}
|
||||
ul.wpseo-metabox-tabs li.active{background-color:#eff8ff}div.wpseo-tab-content,ul.wpseo-metabox-tabs li.active{border-color:#d1e5ee}.wpseo-metabox-tabs .active a{color:#333}#wpseotab .ui-widget-content .ui-state-hover{border:1px solid #d1e5ee;color:#333;background:#eff8ff}
|
||||
@@ -3,12 +3,12 @@
|
||||
*/
|
||||
|
||||
ul.wpseo-metabox-tabs li.active {
|
||||
background-color: #F1F1F1;
|
||||
background-color: #f1f1f1;
|
||||
}
|
||||
|
||||
ul.wpseo-metabox-tabs li.active, div.wpseo-tab-content {
|
||||
border-color: #DFDFDF;
|
||||
background-color: #FFF;
|
||||
border-color: #dfdfdf;
|
||||
background-color: #fff;
|
||||
}
|
||||
|
||||
.wpseo-metabox-tabs .active a {
|
||||
@@ -16,7 +16,7 @@ ul.wpseo-metabox-tabs li.active, div.wpseo-tab-content {
|
||||
}
|
||||
|
||||
#wpseotab .ui-widget-content .ui-state-hover {
|
||||
border: 1px solid #DFDFDF;
|
||||
background: #F1F1F1;
|
||||
border: 1px solid #dfdfdf;
|
||||
color: #333;
|
||||
}
|
||||
background: #f1f1f1;
|
||||
}
|
||||
@@ -1 +1 @@
|
||||
div.wpseo-tab-content,ul.wpseo-metabox-tabs li.active{border-color:#DFDFDF;background-color:#FFF}.wpseo-metabox-tabs .active a{color:#333}#wpseotab .ui-widget-content .ui-state-hover{border:1px solid #DFDFDF;background:#F1F1F1;color:#333}
|
||||
div.wpseo-tab-content,ul.wpseo-metabox-tabs li.active{border-color:#dfdfdf;background-color:#fff}.wpseo-metabox-tabs .active a{color:#333}#wpseotab .ui-widget-content .ui-state-hover{border:1px solid #dfdfdf;color:#333;background:#f1f1f1}
|
||||
@@ -17,8 +17,8 @@ ul.wpseo-metabox-tabs {
|
||||
}
|
||||
|
||||
ul.wpseo-metabox-tabs li.active {
|
||||
border-style: solid solid none;
|
||||
border-width: 1px 1px 0;
|
||||
border-style: solid solid none;
|
||||
background-color: #fdfdfd;
|
||||
}
|
||||
|
||||
@@ -57,8 +57,8 @@ ul.wpseo-metabox-tabs li {
|
||||
}
|
||||
|
||||
.inside .wpseotab .form-table th {
|
||||
font-size: 13px;
|
||||
width: 140px !important;
|
||||
font-size: 13px;
|
||||
}
|
||||
|
||||
.good, .warn, .wrong {
|
||||
@@ -78,22 +78,22 @@ ul.wpseo-metabox-tabs li {
|
||||
}
|
||||
|
||||
#current_seo_title span {
|
||||
background-color: lightyellow;
|
||||
padding: 2px 5px;
|
||||
background-color: lightyellow;
|
||||
}
|
||||
|
||||
#wpseosnippet {
|
||||
width: auto;
|
||||
max-width: 520px;
|
||||
margin: 0 0 10px;
|
||||
padding: 0 5px;
|
||||
font-family: Arial, Helvetica, sans-serif;
|
||||
font-style: normal;
|
||||
width: auto;
|
||||
max-width: 520px;
|
||||
}
|
||||
|
||||
#wpseosnippet td {
|
||||
padding: 0;
|
||||
margin: 0;
|
||||
padding: 0;
|
||||
}
|
||||
|
||||
#wpseosnippet cite.url {
|
||||
@@ -106,20 +106,20 @@ ul.wpseo-metabox-tabs li {
|
||||
}
|
||||
|
||||
#wpseosnippet .title {
|
||||
display: block;
|
||||
overflow: hidden;
|
||||
width: 512px;
|
||||
color: #1e0fbe;
|
||||
font-size: 18px !important;
|
||||
line-height: 1.2;
|
||||
text-overflow: ellipsis;
|
||||
overflow: hidden;
|
||||
white-space: nowrap;
|
||||
display: block;
|
||||
width: 512px;
|
||||
text-overflow: ellipsis;
|
||||
}
|
||||
|
||||
#wpseosnippet .desc {
|
||||
font-size: small;
|
||||
line-height: 1.4;
|
||||
word-wrap: break-word;
|
||||
font-size: small;
|
||||
}
|
||||
|
||||
#wpseosnippet .desc .autogen {
|
||||
@@ -132,9 +132,9 @@ ul.wpseo-metabox-tabs li {
|
||||
|
||||
#wpseosnippet .desc p {
|
||||
color: #545454;
|
||||
font-size: small;
|
||||
line-height: 1.4;
|
||||
word-wrap: break-word;
|
||||
font-size: small;
|
||||
}
|
||||
|
||||
#wpseosnippet .url {
|
||||
@@ -148,7 +148,7 @@ ul.wpseo-metabox-tabs li {
|
||||
}
|
||||
|
||||
#wpseosnippet .util {
|
||||
color: #4272DB;
|
||||
color: #4272db;
|
||||
}
|
||||
|
||||
#wpseosnippet p {
|
||||
@@ -168,8 +168,8 @@ ul.wpseo-metabox-tabs li {
|
||||
}
|
||||
|
||||
#focuskwresults li {
|
||||
list-style-type: disc;
|
||||
margin: 0 0 0 20px;
|
||||
list-style-type: disc;
|
||||
}
|
||||
|
||||
.wpseo_hidden {
|
||||
@@ -179,9 +179,9 @@ ul.wpseo-metabox-tabs li {
|
||||
/* Linkdex analysis block */
|
||||
|
||||
table.wpseoanalysis th {
|
||||
text-align: left;
|
||||
font-size: 14px;
|
||||
padding: 15px 0 5px 0;
|
||||
font-size: 14px;
|
||||
text-align: left;
|
||||
}
|
||||
|
||||
table.wpseoanalysis th.first {
|
||||
@@ -189,9 +189,9 @@ table.wpseoanalysis th.first {
|
||||
}
|
||||
|
||||
table.wpseoanalysis td {
|
||||
margin: 5px 0;
|
||||
font-size: 13px;
|
||||
line-height: 16px;
|
||||
margin: 5px 0;
|
||||
}
|
||||
|
||||
table.wpseoanalysis td.score {
|
||||
@@ -201,10 +201,10 @@ table.wpseoanalysis td.score {
|
||||
}
|
||||
|
||||
.wpseo_msg {
|
||||
border: 1px solid #E6DB55;
|
||||
background-color: lightYellow;
|
||||
margin: 5px 0 10px 0;
|
||||
padding: 0 5px;
|
||||
border: 1px solid #e6db55;
|
||||
background-color: lightYellow;
|
||||
}
|
||||
|
||||
/*
|
||||
@@ -220,9 +220,9 @@ table.wpseoanalysis td.score {
|
||||
/* Component containers
|
||||
----------------------------------*/
|
||||
#wpseotab .ui-widget-content {
|
||||
border: 1px solid #dddddd;
|
||||
background: #f1f1f1;
|
||||
border: 1px solid #ddd;
|
||||
color: #333;
|
||||
background: #f1f1f1;
|
||||
}
|
||||
|
||||
#wpseotab .ui-widget-content a {
|
||||
@@ -251,11 +251,11 @@ table.wpseoanalysis td.score {
|
||||
* http://docs.jquery.com/UI/Menu#theming
|
||||
*/
|
||||
.ui-menu {
|
||||
list-style: none;
|
||||
padding: 2px;
|
||||
margin: 0;
|
||||
display: block;
|
||||
float: left;
|
||||
margin: 0;
|
||||
padding: 2px;
|
||||
list-style: none;
|
||||
}
|
||||
|
||||
.ui-menu .ui-menu {
|
||||
@@ -263,34 +263,33 @@ table.wpseoanalysis td.score {
|
||||
}
|
||||
|
||||
.ui-menu .ui-menu-item {
|
||||
margin: 0;
|
||||
padding: 0;
|
||||
zoom: 1;
|
||||
float: left;
|
||||
clear: left;
|
||||
zoom: 1;
|
||||
width: 100%;
|
||||
margin: 0;
|
||||
padding: 0;
|
||||
}
|
||||
|
||||
.ui-menu .ui-menu-item a {
|
||||
text-decoration: none;
|
||||
display: block;
|
||||
padding: .2em .4em;
|
||||
line-height: 1.5;
|
||||
zoom: 1;
|
||||
padding: 0.2em 0.4em;
|
||||
line-height: 1.5;
|
||||
text-decoration: none;
|
||||
}
|
||||
|
||||
.ui-menu .ui-menu-item a.ui-state-hover,
|
||||
.ui-menu .ui-menu-item a.ui-state-active {
|
||||
color: #000;
|
||||
margin: -1px;
|
||||
color: #000;
|
||||
}
|
||||
|
||||
.wpseo-score-icon {
|
||||
display: inline-block;
|
||||
margin: 3px 10px 0 3px;
|
||||
width: 12px;
|
||||
height: 12px;
|
||||
-webkit-border-radius: 50%;
|
||||
margin: 3px 10px 0 3px;
|
||||
border-radius: 50%;
|
||||
background: #888;
|
||||
vertical-align: top;
|
||||
@@ -326,4 +325,9 @@ table.wpseoanalysis td.score {
|
||||
|
||||
img.yoast_help {
|
||||
cursor: pointer;
|
||||
}
|
||||
}
|
||||
|
||||
.yoast-qtip {
|
||||
font-size: 14px !important;
|
||||
line-height: 18px !important;
|
||||
}
|
||||
@@ -1 +1 @@
|
||||
ul.wpseo-metabox-tabs{display:none;margin-top:12px;margin-bottom:3px}.wpseo-metabox-tabs-div ul{list-style:none}.wpseo-metabox-tabs li{display:inline}ul.wpseo-metabox-tabs li.active{border-style:solid solid none;border-width:1px 1px 0;background-color:#fdfdfd}ul.wpseo-metabox-tabs li{padding:5px}.wpseo-metabox-tabs a{text-decoration:none}.wpseo-metabox-tabs-div div.wpseo-tabs-panel{overflow:auto;padding:.5em .9em;border:1px solid}.wpseo-heading{padding-left:10px}.wpseotab{display:none}.wpseotab.active{display:block;overflow:auto;padding:.5em .9em;border:1px solid #ddd;background-color:#fdfdfd}#wpseo_meta .postbox .inside .wpseotab{font-size:13px !important}.inside .wpseotab .form-table th{font-size:13px;width:140px !important}.good,.warn,.wrong{font-weight:bold}.good{color:green}.warn{color:maroon}.wrong{color:red}#current_seo_title span{background-color:lightyellow;padding:2px 5px}#wpseosnippet{margin:0 0 10px;padding:0 5px;font-family:Arial,Helvetica,sans-serif;font-style:normal;width:auto;max-width:520px}#wpseosnippet td{padding:0;margin:0}#wpseosnippet cite.url{font-weight:normal;font-style:normal}#wpseosnippet a{text-decoration:none}#wpseosnippet .title{color:#1e0fbe;font-size:18px !important;line-height:1.2;text-overflow:ellipsis;overflow:hidden;white-space:nowrap;display:block;width:512px}#wpseosnippet .desc{line-height:1.4;word-wrap:break-word;font-size:small}#wpseosnippet .desc .autogen{color:#777}#wpseosnippet .date{color:gray}#wpseosnippet .desc p{color:#545454;line-height:1.4;word-wrap:break-word;font-size:small}#wpseosnippet .url{color:#006621;font-size:13px;line-height:16px}#wpseosnippet .meta{color:#767676}#wpseosnippet .util{color:#4272db}#wpseosnippet p{margin:0 !important}#wpseosnippet a:hover{text-decoration:underline}#focuskwresults ul{margin:0}#focuskwresults p,#focuskwresults li{font-size:13px}#focuskwresults li{list-style-type:disc;margin:0 0 0 20px}.wpseo_hidden{display:none}table.wpseoanalysis th{text-align:left;font-size:14px;padding:15px 0 5px 0}table.wpseoanalysis th.first{padding-top:0}table.wpseoanalysis td{font-size:13px;line-height:16px;margin:5px 0}table.wpseoanalysis td.score{width:20px;height:18px;padding-left:10px}.wpseo_msg{border:1px solid #e6db55;background-color:lightYellow;margin:5px 0 10px 0;padding:0 5px}#wpseotab .ui-widget-content{border:1px solid #ddd;background:#f1f1f1;color:#333}#wpseotab .ui-widget-content a{color:#333}#wpseotab .ui-autocomplete{position:absolute;cursor:default}* html #wpseotab .ui-autocomplete{width:1px}.ui-menu{list-style:none;padding:2px;margin:0;display:block;float:left}.ui-menu .ui-menu{margin-top:-3px}.ui-menu .ui-menu-item{margin:0;padding:0;zoom:1;float:left;clear:left;width:100%}.ui-menu .ui-menu-item a{text-decoration:none;display:block;padding:.2em .4em;line-height:1.5;zoom:1}.ui-menu .ui-menu-item a.ui-state-hover,.ui-menu .ui-menu-item a.ui-state-active{color:#000;margin:-1px}.wpseo-score-icon{display:inline-block;margin:3px 10px 0 3px;width:12px;height:12px;-webkit-border-radius:50%;border-radius:50%;background:#888;vertical-align:top}.wpseo-score-icon.good{background-color:#7ad03a}.wpseo-score-icon.ok{background-color:#ffba00}.wpseo-score-icon.poor{background-color:#ee7c1b}.wpseo-score-icon.bad{background-color:#dd3d36}.wpseo-score-icon.na{background-color:#888}.wpseo-score-icon.noindex{background-color:#1e8cbe}.wpseo-score-title{font-weight:600}img.yoast_help{cursor:pointer}
|
||||
ul.wpseo-metabox-tabs{display:none;margin-top:12px;margin-bottom:3px}.wpseo-metabox-tabs-div ul{list-style:none}.wpseo-metabox-tabs li{display:inline}ul.wpseo-metabox-tabs li.active{border-width:1px 1px 0;border-style:solid solid none;background-color:#fdfdfd}ul.wpseo-metabox-tabs li{padding:5px}.wpseo-metabox-tabs a{text-decoration:none}.wpseo-metabox-tabs-div div.wpseo-tabs-panel{overflow:auto;padding:.5em .9em;border:1px solid}.wpseo-heading{padding-left:10px}.wpseotab{display:none}.wpseotab.active{display:block;overflow:auto;padding:.5em .9em;border:1px solid #ddd;background-color:#fdfdfd}#wpseo_meta .postbox .inside .wpseotab{font-size:13px!important}.inside .wpseotab .form-table th{width:140px!important;font-size:13px}.good,.warn,.wrong{font-weight:700}.good{color:green}.warn{color:maroon}.wrong{color:red}#current_seo_title span{padding:2px 5px;background-color:#ffffe0}#wpseosnippet{width:auto;max-width:520px;margin:0 0 10px;padding:0 5px;font-family:Arial,Helvetica,sans-serif;font-style:normal}#wpseosnippet td{margin:0;padding:0}#wpseosnippet cite.url{font-weight:400;font-style:normal}#wpseosnippet a{text-decoration:none}#wpseosnippet .title{display:block;overflow:hidden;width:512px;color:#1e0fbe;font-size:18px!important;line-height:1.2;white-space:nowrap;text-overflow:ellipsis}#wpseosnippet .desc{font-size:small;line-height:1.4;word-wrap:break-word}#wpseosnippet .desc .autogen{color:#777}#wpseosnippet .date{color:gray}#wpseosnippet .desc p{color:#545454;font-size:small;line-height:1.4;word-wrap:break-word}#wpseosnippet .url{color:#006621;font-size:13px;line-height:16px}#wpseosnippet .meta{color:#767676}#wpseosnippet .util{color:#4272db}#wpseosnippet p{margin:0!important}#wpseosnippet a:hover{text-decoration:underline}#focuskwresults ul{margin:0}#focuskwresults li,#focuskwresults p{font-size:13px}#focuskwresults li{margin:0 0 0 20px;list-style-type:disc}.wpseo_hidden{display:none}table.wpseoanalysis th{padding:15px 0 5px;font-size:14px;text-align:left}table.wpseoanalysis th.first{padding-top:0}table.wpseoanalysis td{margin:5px 0;font-size:13px;line-height:16px}table.wpseoanalysis td.score{width:20px;height:18px;padding-left:10px}.wpseo_msg{margin:5px 0 10px;padding:0 5px;border:1px solid #e6db55;background-color:#ffffe0}#wpseotab .ui-widget-content{border:1px solid #ddd;color:#333;background:#f1f1f1}#wpseotab .ui-widget-content a{color:#333}#wpseotab .ui-autocomplete{position:absolute;cursor:default}* html #wpseotab .ui-autocomplete{width:1px}.ui-menu{display:block;float:left;margin:0;padding:2px;list-style:none}.ui-menu .ui-menu{margin-top:-3px}.ui-menu .ui-menu-item{float:left;clear:left;zoom:1;width:100%;margin:0;padding:0}.ui-menu .ui-menu-item a{display:block;zoom:1;padding:.2em .4em;line-height:1.5;text-decoration:none}.ui-menu .ui-menu-item a.ui-state-active,.ui-menu .ui-menu-item a.ui-state-hover{margin:-1px;color:#000}.wpseo-score-icon{display:inline-block;width:12px;height:12px;margin:3px 10px 0 3px;border-radius:50%;background:#888;vertical-align:top}.wpseo-score-icon.good{background-color:#7ad03a}.wpseo-score-icon.ok{background-color:#ffba00}.wpseo-score-icon.poor{background-color:#ee7c1b}.wpseo-score-icon.bad{background-color:#dd3d36}.wpseo-score-icon.na{background-color:#888}.wpseo-score-icon.noindex{background-color:#1e8cbe}.wpseo-score-title{font-weight:600}img.yoast_help{cursor:pointer}.yoast-qtip{font-size:14px!important;line-height:18px!important}
|
||||
@@ -2,4 +2,4 @@
|
||||
.wpseo-taxonomy-form th,
|
||||
.wpseo-taxonomy-form td {
|
||||
vertical-align: top;
|
||||
}
|
||||
}
|
||||
@@ -1 +1 @@
|
||||
.wpseo-taxonomy-form tr,.wpseo-taxonomy-form th,.wpseo-taxonomy-form td{vertical-align:top}
|
||||
.wpseo-taxonomy-form td,.wpseo-taxonomy-form th,.wpseo-taxonomy-form tr{vertical-align:top}
|
||||
@@ -16,7 +16,7 @@ div.yoastbox ul {
|
||||
}
|
||||
|
||||
.postbox {
|
||||
margin: 10px 0 0 10px;
|
||||
margin: 10px 0 0 10px;
|
||||
}
|
||||
|
||||
label {
|
||||
@@ -51,8 +51,8 @@ pre {
|
||||
}
|
||||
|
||||
.wpseo-heading {
|
||||
padding-left: 0;
|
||||
padding-right: 10px;
|
||||
padding-left: 0;
|
||||
}
|
||||
|
||||
.wpseo_yahoo_kw {
|
||||
@@ -64,6 +64,6 @@ table.wpseoanalysis th {
|
||||
}
|
||||
|
||||
table.wpseoanalysis td.score {
|
||||
padding-left: 0;
|
||||
padding-right: 10px;
|
||||
padding-left: 0;
|
||||
}
|
||||
@@ -1 +1 @@
|
||||
p.desc{padding:0 22px 8px 0}p.desc.label{padding:2px 180px 10px 0}div.yoastbox ul{margin-right:20px;margin-left:auto}.postbox{margin:10px 0 0 10px}label{float:right;margin-right:6px;margin-left:auto}input.checkbox,input.textinput,select.select,textarea.textinput{float:right;margin:12px 0 0 3px}label.radio{margin-left:auto}table.yoast_help td,table.yoast_help th{text-align:right}.button.fixit{float:left}pre{direction:ltr}#pointer-primary{margin:0 0 0 5px}.wpseo-heading{padding-left:0;padding-right:10px}.wpseo_yahoo_kw{margin:3px 0 3px 8px}table.wpseoanalysis th{text-align:right}table.wpseoanalysis td.score{padding-left:0;padding-right:10px}
|
||||
p.desc{padding:0 22px 8px 0}p.desc.label{padding:2px 180px 10px 0}div.yoastbox ul{margin-right:20px;margin-left:auto}.postbox{margin:10px 0 0 10px}label{float:right;margin-right:6px;margin-left:auto}input.checkbox,input.textinput,select.select,textarea.textinput{float:right;margin:12px 0 0 3px}label.radio{margin-left:auto}table.yoast_help td,table.yoast_help th{text-align:right}.button.fixit{float:left}pre{direction:ltr}#pointer-primary{margin:0 0 0 5px}.wpseo-heading{padding-right:10px;padding-left:0}.wpseo_yahoo_kw{margin:3px 0 3px 8px}table.wpseoanalysis th{text-align:right}table.wpseoanalysis td.score{padding-right:10px;padding-left:0}
|
||||
@@ -4,19 +4,19 @@ h4 {
|
||||
}
|
||||
|
||||
p.desc {
|
||||
padding: 0 0 8px 25px;
|
||||
margin: 6px 0 10px 0;
|
||||
padding: 0 0 8px 25px;
|
||||
border-bottom: 1px solid #ddd;
|
||||
}
|
||||
|
||||
p.desc.label {
|
||||
padding: 2px 0 10px 180px;
|
||||
margin-bottom: 20px;
|
||||
padding: 2px 0 10px 180px;
|
||||
}
|
||||
|
||||
tr.yst_row {
|
||||
padding: 5px 0 0 0;
|
||||
margin: 5px 0 0 0;
|
||||
padding: 5px 0 0 0;
|
||||
}
|
||||
|
||||
tr.yst_row.even {
|
||||
@@ -69,8 +69,8 @@ textarea.import {
|
||||
|
||||
label.textinput, label.select, label.checkbox {
|
||||
width: 180px;
|
||||
background-color: transparent;
|
||||
margin: 10px 0 5px 0;
|
||||
background-color: transparent;
|
||||
}
|
||||
|
||||
label.radio {
|
||||
@@ -81,11 +81,12 @@ label.radio {
|
||||
display: table;
|
||||
width: 100%;
|
||||
}
|
||||
|
||||
.wpseo_content_cell {
|
||||
display: table-cell;
|
||||
height: 500px;
|
||||
padding: 0;
|
||||
margin: 0;
|
||||
padding: 0;
|
||||
vertical-align: top;
|
||||
}
|
||||
|
||||
@@ -94,11 +95,11 @@ label.radio {
|
||||
}
|
||||
|
||||
.wpseo_content_wrapper div.wpseo-warning {
|
||||
border: 2px solid red;
|
||||
padding-left: 10px;
|
||||
padding-right: 10px;
|
||||
background-color: #DEDEDE;
|
||||
margin: 2em 0 0 0;
|
||||
padding-right: 10px;
|
||||
padding-left: 10px;
|
||||
border: 2px solid red;
|
||||
background-color: #dedede;
|
||||
}
|
||||
|
||||
.wpseo_content_wrapper div.wpseo-warning h4 {
|
||||
@@ -116,8 +117,8 @@ label.radio {
|
||||
|
||||
@media (max-width: 1020px) {
|
||||
#wpseo_content_top {
|
||||
padding-left: 0;
|
||||
margin-left: 0;
|
||||
padding-left: 0;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -132,24 +133,20 @@ label.radio {
|
||||
}
|
||||
|
||||
div.yoastbox ul li {
|
||||
list-style: square;
|
||||
line-height: 16px;
|
||||
font-size: 11px;
|
||||
line-height: 16px;
|
||||
list-style: square;
|
||||
}
|
||||
|
||||
div.yoastbox a, div.yoastbox a.rsswidget {
|
||||
div.yoastbox a {
|
||||
font-family: sans-serif;
|
||||
font-size: 12px;
|
||||
}
|
||||
|
||||
div.yoastbox a:hover, div.yoastbox a.rsswidget:hover {
|
||||
div.yoastbox a:hover {
|
||||
text-decoration: underline;
|
||||
}
|
||||
|
||||
div.yoastbox ul li.yoast {
|
||||
list-style-image: url(../images/yoast-16x16.png);
|
||||
}
|
||||
|
||||
.text {
|
||||
width: 250px;
|
||||
}
|
||||
@@ -169,13 +166,13 @@ table.yoast_help, table.yoast_help th, table.yoast_help td {
|
||||
}
|
||||
|
||||
table.yoast_help th, table.yoast_help td {
|
||||
vertical-align: text-top;
|
||||
text-align: left;
|
||||
padding: 5px 10px;
|
||||
text-align: left;
|
||||
vertical-align: text-top;
|
||||
}
|
||||
|
||||
table.yoast_help tr:nth-child(2n) {
|
||||
background-color: #FBFBFE;
|
||||
background-color: #fbfbfe;
|
||||
}
|
||||
|
||||
table.yoast_help tr:hover {
|
||||
@@ -183,15 +180,15 @@ table.yoast_help tr:hover {
|
||||
}
|
||||
|
||||
.correct {
|
||||
background-color: green;
|
||||
color: white;
|
||||
padding: 5px;
|
||||
color: white;
|
||||
background-color: green;
|
||||
}
|
||||
|
||||
.wrong {
|
||||
background-color: red;
|
||||
color: white;
|
||||
padding: 5px;
|
||||
color: white;
|
||||
background-color: red;
|
||||
}
|
||||
|
||||
.wrong code {
|
||||
@@ -200,14 +197,14 @@ table.yoast_help tr:hover {
|
||||
}
|
||||
|
||||
.button.fixit {
|
||||
margin: 0 5px;
|
||||
float: right;
|
||||
margin: 0 5px;
|
||||
}
|
||||
|
||||
.button.checkit {
|
||||
padding: 5px 8px;
|
||||
margin: 0 5px;
|
||||
float: right;
|
||||
margin: 0 5px;
|
||||
padding: 5px 8px;
|
||||
}
|
||||
|
||||
.fb-buttons .button-primary,
|
||||
@@ -220,7 +217,7 @@ table.yoast_help tr:hover {
|
||||
}
|
||||
|
||||
.button#submit {
|
||||
color: #FFF !important;
|
||||
color: #fff !important;
|
||||
}
|
||||
|
||||
.postbox#donate {
|
||||
@@ -230,6 +227,7 @@ table.yoast_help tr:hover {
|
||||
.wpseotab {
|
||||
display: none;
|
||||
/*max-width: 600px !important;*/
|
||||
;
|
||||
}
|
||||
|
||||
.wpseotab.active {
|
||||
@@ -237,10 +235,10 @@ table.yoast_help tr:hover {
|
||||
}
|
||||
|
||||
#sidebar .yoastbox {
|
||||
border: 1px solid #CCC;
|
||||
border-radius: 5px 25px;
|
||||
margin: 0 0 10px 0;
|
||||
padding: 10px 15px;
|
||||
border: 1px solid #ccc;
|
||||
border-radius: 5px 25px;
|
||||
}
|
||||
|
||||
#sidebar .yoastbox h2 {
|
||||
@@ -266,17 +264,13 @@ h2 code {
|
||||
|
||||
#wpseo-conf {
|
||||
/*max-width: 600px;*/
|
||||
;
|
||||
}
|
||||
|
||||
#pointer-primary {
|
||||
margin: 0 5px 0 0;
|
||||
}
|
||||
|
||||
/* Add our icon to the Admin pages */
|
||||
#icon-wpseo_dashboard.icon32 {
|
||||
background: url(../images/wordpress-SEO-32x32.png) 0 0;
|
||||
}
|
||||
|
||||
#wpseo-debug-info {
|
||||
clear: both;
|
||||
}
|
||||
@@ -292,20 +286,20 @@ h2 code {
|
||||
#wpseo-debug-info .wpseo-debug {
|
||||
display: inline-block;
|
||||
padding-left: 20px;
|
||||
color: #CC0000;
|
||||
color: #c00;
|
||||
}
|
||||
|
||||
input.wpseo-new-title, textarea.wpseo-new-metadesc {
|
||||
max-width: 100%;
|
||||
width: 100%;
|
||||
max-width: 100%;
|
||||
}
|
||||
|
||||
.wpseotab .extension {
|
||||
float: left;
|
||||
box-sizing: border-box;
|
||||
width: 300px;
|
||||
height: 230px;
|
||||
margin: 10px 20px 10px 0;
|
||||
float: left;
|
||||
border: 1px solid #ccc;
|
||||
}
|
||||
|
||||
@@ -328,6 +322,12 @@ input.wpseo-new-title, textarea.wpseo-new-metadesc {
|
||||
text-decoration: none;
|
||||
}
|
||||
|
||||
.wpseotab .extension button.installed {
|
||||
border-color: #00a000;
|
||||
background-color: #00a000;
|
||||
cursor: default;
|
||||
}
|
||||
|
||||
.wpseotab .seo-premium h3 {
|
||||
background-image: url(../images/Premium_130x100.png);
|
||||
}
|
||||
@@ -336,10 +336,6 @@ input.wpseo-new-title, textarea.wpseo-new-metadesc {
|
||||
background-image: url(../images/Video_130x100.png);
|
||||
}
|
||||
|
||||
.wpseotab .video-manuals h3 {
|
||||
background-image: url(../images/Manual_130x100.png);
|
||||
}
|
||||
|
||||
.wpseotab .local-seo h3 {
|
||||
background-image: url(../images/Local_130x100.png);
|
||||
}
|
||||
@@ -359,26 +355,25 @@ div#separator {
|
||||
}
|
||||
|
||||
div#separator input.radio {
|
||||
opacity: 0;
|
||||
display: none;
|
||||
float: left;
|
||||
width: 0 !important;
|
||||
min-width: 0 !important;
|
||||
display: none;
|
||||
opacity: 0;
|
||||
}
|
||||
|
||||
div#separator input.radio + label {
|
||||
float: left;
|
||||
width: 30px !important;
|
||||
margin: 3px 3px 0 0;
|
||||
padding: 5px 8px;
|
||||
width: 30px !important;
|
||||
line-height: 25px;
|
||||
text-align: center;
|
||||
cursor: pointer;
|
||||
border: 1px solid #ccc;
|
||||
|
||||
/* Don't change: these mimic Google's font and font size for titles */
|
||||
font-family: Arial,Helvetica,sans-serif !important;
|
||||
font-size: 18px !important;
|
||||
line-height: 25px;
|
||||
text-align: center;
|
||||
cursor: pointer;
|
||||
}
|
||||
|
||||
div#separator input.radio:checked + label {
|
||||
|
||||
@@ -1 +1 @@
|
||||
h4{clear:both;margin:2em 0 0 0}p.desc{padding:0 0 8px 25px;margin:6px 0 10px 0;border-bottom:1px solid #ddd}p.desc.label{padding:2px 0 10px 180px;margin-bottom:20px}tr.yst_row{padding:5px 0 0 0;margin:5px 0 0 0}tr.yst_row.even{background-color:#f6f6f6}div.yoastbox ul{margin-left:20px}.postbox{margin:10px 10px 0 0}label{float:left;margin-left:6px}label.radio{float:none}input.textinput,textarea,select{width:400px}input.textinput,textarea.textinput,select.select,input.checkbox{float:left;margin:12px 3px 0 0;padding:5px}select.select{padding:3px}input.checkbox.double{margin-top:2px}.textinput.metadesc{height:50px}textarea.import{width:500px;height:100px}label.textinput,label.select,label.checkbox{width:180px;background-color:transparent;margin:10px 0 5px 0}label.radio{margin-right:20px}.wpseo_content_wrapper{display:table;width:100%}.wpseo_content_cell{display:table-cell;height:500px;padding:0;margin:0;vertical-align:top}#wpseo_content_top{min-width:800px}.wpseo_content_wrapper div.wpseo-warning{border:2px solid red;padding-left:10px;padding-right:10px;background-color:#dedede;margin:2em 0 0 0}.wpseo_content_wrapper div.wpseo-warning h4{margin:1em 0 0 0}.wpseo_content_wrapper div.wpseo-warning p.error-message{font-weight:normal}#sidebar-container{width:261px;padding:0 0 0 20px}@media(max-width:1020px){#wpseo_content_top{padding-left:0;margin-left:0}}.wpseo-admin-page .form-table tr,.wpseo-admin-page .form-table th,.wpseo-admin-page .form-table td{vertical-align:top}.postbox form{line-height:150%}div.yoastbox ul li{list-style:square;line-height:16px;font-size:11px}div.yoastbox a,div.yoastbox a.rsswidget{font-family:sans-serif;font-size:12px}div.yoastbox a:hover,div.yoastbox a.rsswidget:hover{text-decoration:underline}div.yoastbox ul li.yoast{list-style-image:url(../images/yoast-16x16.png)}.text{width:250px}div.yoastbox .button:hover,div.yoastbox .button-primary:hover{text-decoration:none}table.yoast_help,table.yoast_help th,table.yoast_help td{border:1px solid #ddd;border-collapse:collapse;font-size:12px}table.yoast_help th,table.yoast_help td{vertical-align:text-top;text-align:left;padding:5px 10px}table.yoast_help tr:nth-child(2n){background-color:#fbfbfe}table.yoast_help tr:hover{background-color:#ddd}.correct{background-color:green;color:white;padding:5px}.wrong{background-color:red;color:white;padding:5px}.wrong code{padding:3px 8px;color:#000}.button.fixit{margin:0 5px;float:right}.button.checkit{padding:5px 8px;margin:0 5px;float:right}.fb-buttons .button-primary,.fb-buttons .button{margin-right:8px}.button{color:#000 !important}.button#submit{color:#FFF !important}.postbox#donate{border:2px green}.wpseotab{display:none}.wpseotab.active{display:block}#sidebar .yoastbox{border:1px solid #CCC;border-radius:5px 25px;margin:0 0 10px 0;padding:10px 15px}#sidebar .yoastbox h2{font-size:16px}#sidebar .promo{color:#000}#donate.yoastbox,#sitereview.yoastbox{border-color:green;background-color:#cfc}h2{margin-bottom:20px}h2 code{font-size:23px}#pointer-primary{margin:0 5px 0 0}#icon-wpseo_dashboard.icon32{background:url(../images/wordpress-SEO-32x32.png) 0 0}#wpseo-debug-info{clear:both}#wpseo-debug-info .hndle{cursor:auto}#wpseo-debug-info h3 span:last-child{padding-left:16px}#wpseo-debug-info .wpseo-debug{display:inline-block;padding-left:20px;color:#c00}input.wpseo-new-title,textarea.wpseo-new-metadesc{max-width:100%;width:100%}.wpseotab .extension{box-sizing:border-box;width:300px;height:230px;margin:10px 20px 10px 0;float:left;border:1px solid #ccc}.wpseotab .extension p{margin:0;padding:10px}.wpseotab .extension h3{box-sizing:border-box;height:110px;margin:0;padding:20px 10px 0 120px;border-bottom:1px solid #ccc;background:#fff no-repeat left 10px;background-size:130px 100px}.wpseotab .extension a{text-decoration:none}.wpseotab .seo-premium h3{background-image:url(../images/Premium_130x100.png)}.wpseotab .video-seo h3{background-image:url(../images/Video_130x100.png)}.wpseotab .video-manuals h3{background-image:url(../images/Manual_130x100.png)}.wpseotab .local-seo h3{background-image:url(../images/Local_130x100.png)}.wpseotab .woocommerce-seo h3{background-image:url(../images/Woo_130x100.png)}.wpseotab .news-seo h3{background-image:url(../images/News_SEO.png);background-size:115px 100px}div#separator{clear:right;margin:0 0 0 25px}div#separator input.radio{opacity:0;float:left;width:0 !important;min-width:0 !important;display:none}div#separator input.radio+label{float:left;margin:3px 3px 0 0;padding:5px 8px;width:30px !important;line-height:25px;text-align:center;cursor:pointer;border:1px solid #ccc;font-family:Arial,Helvetica,sans-serif !important;font-size:18px !important}div#separator input.radio:checked+label{border:1px solid green;background-color:#fff;box-shadow:1px 1px 1px green}
|
||||
h4{clear:both;margin:2em 0 0}p.desc{margin:6px 0 10px;padding:0 0 8px 25px;border-bottom:1px solid #ddd}p.desc.label{margin-bottom:20px;padding:2px 0 10px 180px}tr.yst_row{margin:5px 0 0;padding:5px 0 0}tr.yst_row.even{background-color:#f6f6f6}div.yoastbox ul{margin-left:20px}.postbox{margin:10px 10px 0 0}label{float:left;margin-left:6px}label.radio{float:none}input.textinput,select,textarea{width:400px}input.checkbox,input.textinput,select.select,textarea.textinput{float:left;margin:12px 3px 0 0;padding:5px}select.select{padding:3px}input.checkbox.double{margin-top:2px}.textinput.metadesc{height:50px}textarea.import{width:500px;height:100px}label.checkbox,label.select,label.textinput{width:180px;margin:10px 0 5px;background-color:transparent}label.radio{margin-right:20px}.wpseo_content_wrapper{display:table;width:100%}.wpseo_content_cell{display:table-cell;height:500px;margin:0;padding:0;vertical-align:top}#wpseo_content_top{min-width:800px}.wpseo_content_wrapper div.wpseo-warning{margin:2em 0 0;padding-right:10px;padding-left:10px;border:2px solid red;background-color:#dedede}.wpseo_content_wrapper div.wpseo-warning h4{margin:1em 0 0}.wpseo_content_wrapper div.wpseo-warning p.error-message{font-weight:400}#sidebar-container{width:261px;padding:0 0 0 20px}@media (max-width:1020px){#wpseo_content_top{margin-left:0;padding-left:0}}.wpseo-admin-page .form-table td,.wpseo-admin-page .form-table th,.wpseo-admin-page .form-table tr{vertical-align:top}.postbox form{line-height:150%}div.yoastbox ul li{font-size:11px;line-height:16px;list-style:square}div.yoastbox a{font-family:sans-serif;font-size:12px}div.yoastbox a:hover{text-decoration:underline}.text{width:250px}div.yoastbox .button-primary:hover,div.yoastbox .button:hover{text-decoration:none}table.yoast_help,table.yoast_help td,table.yoast_help th{border:1px solid #ddd;border-collapse:collapse;font-size:12px}table.yoast_help td,table.yoast_help th{padding:5px 10px;text-align:left;vertical-align:text-top}table.yoast_help tr:nth-child(2n){background-color:#fbfbfe}table.yoast_help tr:hover{background-color:#ddd}.correct{padding:5px;color:#fff;background-color:green}.wrong{padding:5px;color:#fff;background-color:red}.wrong code{padding:3px 8px;color:#000}.button.fixit{float:right;margin:0 5px}.button.checkit{float:right;margin:0 5px;padding:5px 8px}.fb-buttons .button,.fb-buttons .button-primary{margin-right:8px}.button{color:#000!important}.button#submit{color:#fff!important}.postbox#donate{border:2px green}.wpseotab{display:none}.wpseotab.active{display:block}#sidebar .yoastbox{margin:0 0 10px;padding:10px 15px;border:1px solid #ccc;border-radius:5px 25px}#sidebar .yoastbox h2{font-size:16px}#sidebar .promo{color:#000}#donate.yoastbox,#sitereview.yoastbox{border-color:green;background-color:#cfc}h2{margin-bottom:20px}h2 code{font-size:23px}#pointer-primary{margin:0 5px 0 0}#wpseo-debug-info{clear:both}#wpseo-debug-info .hndle{cursor:auto}#wpseo-debug-info h3 span:last-child{padding-left:16px}#wpseo-debug-info .wpseo-debug{display:inline-block;padding-left:20px;color:#c00}input.wpseo-new-title,textarea.wpseo-new-metadesc{width:100%;max-width:100%}.wpseotab .extension{float:left;box-sizing:border-box;width:300px;height:230px;margin:10px 20px 10px 0;border:1px solid #ccc}.wpseotab .extension p{margin:0;padding:10px}.wpseotab .extension h3{box-sizing:border-box;height:110px;margin:0;padding:20px 10px 0 120px;border-bottom:1px solid #ccc;background:#fff no-repeat left 10px;background-size:130px 100px}.wpseotab .extension a{text-decoration:none}.wpseotab .extension button.installed{border-color:#00a000;background-color:#00a000;cursor:default}.wpseotab .seo-premium h3{background-image:url(../images/Premium_130x100.png)}.wpseotab .video-seo h3{background-image:url(../images/Video_130x100.png)}.wpseotab .local-seo h3{background-image:url(../images/Local_130x100.png)}.wpseotab .woocommerce-seo h3{background-image:url(../images/Woo_130x100.png)}.wpseotab .news-seo h3{background-image:url(../images/News_SEO.png);background-size:115px 100px}div#separator{clear:right;margin:0 0 0 25px}div#separator input.radio{display:none;float:left;width:0!important;min-width:0!important;opacity:0}div#separator input.radio+label{float:left;width:30px!important;margin:3px 3px 0 0;padding:5px 8px;border:1px solid #ccc;font-family:Arial,Helvetica,sans-serif!important;font-size:18px!important;line-height:25px;text-align:center;cursor:pointer}div#separator input.radio:checked+label{border:1px solid green;background-color:#fff;box-shadow:1px 1px 1px green}
|
||||
@@ -48,9 +48,9 @@ if ( ! class_exists( 'WPSEO_Frontend' ) ) {
|
||||
add_action( 'wpseo_head', array( $this, 'metakeywords' ), 11 );
|
||||
add_action( 'wpseo_head', array( $this, 'canonical' ), 20 );
|
||||
add_action( 'wpseo_head', array( $this, 'adjacent_rel_links' ), 21 );
|
||||
add_action( 'wpseo_head', array( $this, 'author' ), 22 );
|
||||
add_action( 'wpseo_head', array( $this, 'publisher' ), 23 );
|
||||
add_action( 'wpseo_head', array( $this, 'publisher' ), 22 );
|
||||
add_action( 'wpseo_head', array( $this, 'webmaster_tools_authentication' ), 90 );
|
||||
add_action( 'wpseo_head', array( $this, 'internal_search_json_ld' ), 90 );
|
||||
|
||||
// Remove actions that we will handle through our wpseo_head call, and probably change the output of
|
||||
remove_action( 'wp_head', 'rel_canonical' );
|
||||
@@ -105,6 +105,7 @@ if ( ! class_exists( 'WPSEO_Frontend' ) ) {
|
||||
}
|
||||
if ( $this->options['cleanreplytocom'] === true ) {
|
||||
add_filter( 'comment_reply_link', array( $this, 'remove_reply_to_com' ) );
|
||||
add_action( 'template_redirect', array( $this, 'replytocom_redirect' ), 1 );
|
||||
}
|
||||
add_filter( 'the_content_feed', array( $this, 'embed_rssfooter' ) );
|
||||
add_filter( 'the_excerpt_rss', array( $this, 'embed_rssfooter_excerpt' ) );
|
||||
@@ -117,10 +118,6 @@ if ( ! class_exists( 'WPSEO_Frontend' ) ) {
|
||||
if ( $this->options['title_test'] > 0 ) {
|
||||
add_filter( 'wpseo_title', array( $this, 'title_test_helper' ) );
|
||||
}
|
||||
if ( isset( $_GET['replytocom'] ) ) {
|
||||
remove_action( 'wp_head', 'wp_no_robots' );
|
||||
add_action( 'template_redirect', array( $this, 'replytocom_redirect' ), 1 );
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -549,6 +546,44 @@ if ( ! class_exists( 'WPSEO_Frontend' ) ) {
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Outputs JSON+LD code to allow recognition of the internal search engine
|
||||
*
|
||||
* @since 1.5.7
|
||||
*
|
||||
* @link https://developers.google.com/webmasters/richsnippets/sitelinkssearch
|
||||
*/
|
||||
public function internal_search_json_ld() {
|
||||
if ( ! is_front_page() ) {
|
||||
return;
|
||||
}
|
||||
|
||||
/**
|
||||
* Filter: 'disable_wpseo_json_ld_search' - Allow disabling of the json+ld output
|
||||
*
|
||||
* @api bool $display_search Whether or not to display json+ld search on the frontend
|
||||
*/
|
||||
if ( apply_filters( 'disable_wpseo_json_ld_search', false ) === true ) {
|
||||
return;
|
||||
}
|
||||
|
||||
$home_url = trailingslashit( home_url() );
|
||||
|
||||
/**
|
||||
* Filter: 'wpseo_json_ld_search_url' - Allows filtering of the search URL for WP SEO
|
||||
*
|
||||
* @api string $search_url The search URL for this site with a `{search_term}` variable.
|
||||
*/
|
||||
$search_url = apply_filters( 'wpseo_json_ld_search_url', $home_url . '?s={search_term}' );
|
||||
|
||||
/**
|
||||
* Filter: 'wpseo_json_ld_search_output' - Allows filtering of the entire output of the function
|
||||
*
|
||||
* @api string $output The output of the function.
|
||||
*/
|
||||
echo apply_filters( 'wpseo_json_ld_search_output', '<script type="application/ld+json">{ "@context": "http://schema.org", "@type": "WebSite", "url": "' . $home_url . '", "potentialAction": { "@type": "SearchAction", "target": "' . $search_url .'", "query-input": "required name=search_term" } }</script>' . "\n" );
|
||||
}
|
||||
|
||||
/**
|
||||
* Main wrapper function attached to wp_head. This combines all the output on the frontend of the WP SEO plugin.
|
||||
*/
|
||||
@@ -819,8 +854,7 @@ if ( ! class_exists( 'WPSEO_Frontend' ) ) {
|
||||
$canonical = add_query_arg( 'paged', get_query_var( 'paged' ), $canonical );
|
||||
} else {
|
||||
if ( is_front_page() ) {
|
||||
$base = $wp_rewrite->using_index_permalinks() ? 'index.php/' : '/';
|
||||
$canonical = home_url( $base );
|
||||
$canonical = wpseo_xml_sitemaps_base_url( '' );
|
||||
}
|
||||
$canonical = user_trailingslashit( trailingslashit( $canonical ) . trailingslashit( $wp_rewrite->pagination_base ) . get_query_var( 'paged' ) );
|
||||
}
|
||||
@@ -840,7 +874,7 @@ if ( ! class_exists( 'WPSEO_Frontend' ) ) {
|
||||
if ( is_string( $canonical ) && $canonical !== '' ) {
|
||||
// Force canonical links to be absolute, relative is NOT an option.
|
||||
if ( wpseo_is_url_relative( $canonical ) === true ) {
|
||||
$canonical = home_url( $canonical );
|
||||
$canonical = $this->base_url( $canonical );
|
||||
}
|
||||
|
||||
if ( $echo !== false ) {
|
||||
@@ -853,6 +887,27 @@ if ( ! class_exists( 'WPSEO_Frontend' ) ) {
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Parse the home URL setting to find the base URL for relative URLs.
|
||||
*
|
||||
* @param string $path
|
||||
*
|
||||
* @return string
|
||||
*/
|
||||
private function base_url( $path = null ) {
|
||||
$url = get_option( 'home' );
|
||||
|
||||
$parts = parse_url( $url );
|
||||
|
||||
$base_url = trailingslashit( $parts['scheme'] . '://' . $parts['host'] );
|
||||
|
||||
if ( ! is_null( $path ) ) {
|
||||
$base_url .= ltrim( $path, '/' );
|
||||
}
|
||||
|
||||
return $base_url;
|
||||
}
|
||||
|
||||
/**
|
||||
* Adds 'prev' and 'next' links to archives.
|
||||
*
|
||||
@@ -888,8 +943,7 @@ if ( ! class_exists( 'WPSEO_Frontend' ) ) {
|
||||
|
||||
// Make sure to use index.php when needed, done after paged == 2 check so the prev links to homepage will not have index.php erroneously.
|
||||
if ( is_front_page() ) {
|
||||
$base = $GLOBALS['wp_rewrite']->using_index_permalinks() ? 'index.php/' : '/';
|
||||
$url = home_url( $base );
|
||||
$url = wpseo_xml_sitemaps_base_url( '' );
|
||||
}
|
||||
|
||||
if ( $paged > 2 ) {
|
||||
@@ -978,49 +1032,7 @@ if ( ! class_exists( 'WPSEO_Frontend' ) ) {
|
||||
|
||||
if ( $this->options['plus-publisher'] !== '' ) {
|
||||
echo '<link rel="publisher" href="' . esc_url( $this->options['plus-publisher'] ) . '"/>' . "\n";
|
||||
return true;
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
/**
|
||||
* Outputs the rel=author
|
||||
* @return boolean Boolean indiciting whether the autor link was printed
|
||||
*/
|
||||
public function author() {
|
||||
global $post;
|
||||
|
||||
$gplus = false;
|
||||
|
||||
if ( is_singular() ) {
|
||||
if ( is_object( $post ) ) {
|
||||
$have_author = WPSEO_Meta::get_value( 'authorship' );
|
||||
|
||||
switch ( $have_author ) {
|
||||
case 'always':
|
||||
$gplus = get_the_author_meta( 'googleplus', $post->post_author );
|
||||
break;
|
||||
|
||||
case '-':
|
||||
// Defer to post_type default
|
||||
if ( ! isset( $this->options[ 'noauthorship-' . $post->post_type ] ) || $this->options[ 'noauthorship-' . $post->post_type ] === false ) {
|
||||
$gplus = get_the_author_meta( 'googleplus', $post->post_author );
|
||||
}
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Allow changing the rel=author link being put out by WPSEO
|
||||
*
|
||||
* @api string $gplus The rel=author link for the current URL.
|
||||
*/
|
||||
$gplus = apply_filters( 'wpseo_author_link', $gplus );
|
||||
|
||||
if ( is_string( $gplus ) && $gplus !== '' ) {
|
||||
echo '<link rel="author" href="' . esc_url( $gplus ) . '"/>' . "\n";
|
||||
return true;
|
||||
}
|
||||
|
||||
@@ -1324,10 +1336,6 @@ if ( ! class_exists( 'WPSEO_Frontend' ) ) {
|
||||
*/
|
||||
function replytocom_redirect() {
|
||||
|
||||
if ( $this->options['cleanreplytocom'] !== true ) {
|
||||
return false;
|
||||
}
|
||||
|
||||
if ( isset( $_GET['replytocom'] ) && is_singular() ) {
|
||||
global $post;
|
||||
$url = get_permalink( $post->ID );
|
||||
@@ -1501,7 +1509,7 @@ if ( ! class_exists( 'WPSEO_Frontend' ) ) {
|
||||
|
||||
$author_link = '';
|
||||
if ( is_object( $post ) ) {
|
||||
$author_link = '<a ' . $no_follow_attr . 'rel="author" href="' . esc_url( get_author_posts_url( $post->post_author ) ) . '">' . get_the_author() . '</a>';
|
||||
$author_link = '<a ' . $no_follow_attr . 'href="' . esc_url( get_author_posts_url( $post->post_author ) ) . '">' . get_the_author() . '</a>';
|
||||
}
|
||||
|
||||
$post_link = '<a ' . $no_follow_attr . 'href="' . esc_url( get_permalink() ) . '">' . get_the_title() . '</a>';
|
||||
|
||||
@@ -11,7 +11,6 @@ if ( ! defined( 'WPSEO_VERSION' ) ) {
|
||||
exit();
|
||||
}
|
||||
|
||||
|
||||
if ( ! class_exists( 'WPSEO_OpenGraph' ) ) {
|
||||
/**
|
||||
* Adds the OpenGraph output
|
||||
@@ -458,6 +457,8 @@ if ( ! class_exists( 'WPSEO_OpenGraph' ) ) {
|
||||
*/
|
||||
$thumb = wp_get_attachment_image_src( get_post_thumbnail_id( $post->ID ), apply_filters( 'wpseo_opengraph_image_size', 'original' ) );
|
||||
$this->image_output( $thumb[0] );
|
||||
|
||||
return;
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -481,8 +482,6 @@ if ( ! class_exists( 'WPSEO_OpenGraph' ) ) {
|
||||
if ( count( $this->shown_images ) == 0 && $this->options['og_default_image'] !== '' ) {
|
||||
$this->image_output( $this->options['og_default_image'] );
|
||||
}
|
||||
|
||||
// @TODO add G+ image stuff
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -517,7 +516,13 @@ if ( ! class_exists( 'WPSEO_OpenGraph' ) ) {
|
||||
}
|
||||
|
||||
if ( is_category() || is_tag() || is_tax() ) {
|
||||
$ogdesc = trim( strip_tags( term_description() ) );
|
||||
|
||||
$ogdesc = $this->metadesc( false );
|
||||
|
||||
if ( '' == $ogdesc ) {
|
||||
$ogdesc = trim( strip_tags( term_description() ) );
|
||||
}
|
||||
|
||||
if ( '' == $ogdesc ) {
|
||||
global $wp_query;
|
||||
$term = $wp_query->get_queried_object();
|
||||
|
||||
@@ -88,6 +88,8 @@ if ( ! class_exists( 'WPSEO_Twitter' ) ) {
|
||||
wp_reset_query();
|
||||
|
||||
$this->type();
|
||||
$this->twitter_description();
|
||||
$this->twitter_title();
|
||||
$this->site_twitter();
|
||||
$this->site_domain();
|
||||
$this->author_twitter();
|
||||
@@ -101,8 +103,6 @@ if ( ! class_exists( 'WPSEO_Twitter' ) ) {
|
||||
if ( 'summary' === $this->options['twitter_card_type'] ) {
|
||||
$this->image();
|
||||
}
|
||||
$this->twitter_description();
|
||||
$this->twitter_title();
|
||||
$this->twitter_url();
|
||||
}
|
||||
|
||||
@@ -194,12 +194,17 @@ if ( ! class_exists( 'WPSEO_Twitter' ) ) {
|
||||
* Only used when OpenGraph is inactive.
|
||||
*/
|
||||
public function twitter_title() {
|
||||
$title = WPSEO_Meta::get_value( 'twitter-title' );
|
||||
if ( ! is_string( $title ) || '' === $title ) {
|
||||
$title = $this->title( '' );
|
||||
}
|
||||
|
||||
/**
|
||||
* Filter: 'wpseo_twitter_title' - Allow changing the Twitter title as output in the Twitter card by WP SEO
|
||||
*
|
||||
* @api string $twitter The title string
|
||||
*/
|
||||
$title = apply_filters( 'wpseo_twitter_title', $this->title( '' ) );
|
||||
$title = apply_filters( 'wpseo_twitter_title', $title );
|
||||
if ( is_string( $title ) && $title !== '' ) {
|
||||
$this->output_metatag( 'title', $title );
|
||||
}
|
||||
@@ -211,11 +216,18 @@ if ( ! class_exists( 'WPSEO_Twitter' ) ) {
|
||||
* Only used when OpenGraph is inactive.
|
||||
*/
|
||||
public function twitter_description() {
|
||||
$meta_desc = trim( $this->metadesc( false ) );
|
||||
$meta_desc = WPSEO_Meta::get_value( 'twitter-description' );
|
||||
if ( ! is_string( $meta_desc ) || '' === $meta_desc ) {
|
||||
$meta_desc = false;
|
||||
}
|
||||
|
||||
if ( ! $meta_desc ) {
|
||||
$meta_desc = trim( $this->metadesc( false ) );
|
||||
if ( ! is_string( $meta_desc ) || '' === $meta_desc ) {
|
||||
$meta_desc = false;
|
||||
}
|
||||
}
|
||||
|
||||
if ( ! $meta_desc ) {
|
||||
$meta_desc = strip_tags( get_the_excerpt() );
|
||||
}
|
||||
@@ -299,7 +311,14 @@ if ( ! class_exists( 'WPSEO_Twitter' ) ) {
|
||||
$this->image_output( $twitter_img );
|
||||
return;
|
||||
}
|
||||
elseif ( function_exists( 'has_post_thumbnail' ) && has_post_thumbnail( $post->ID ) ) {
|
||||
|
||||
$open_graph_image = WPSEO_Meta::get_value( 'opengraph-image' );
|
||||
if ( $open_graph_image !== '' ) {
|
||||
$this->image_output( $open_graph_image );
|
||||
return;
|
||||
}
|
||||
|
||||
if ( function_exists( 'has_post_thumbnail' ) && has_post_thumbnail( $post->ID ) ) {
|
||||
/**
|
||||
* Filter: 'wpseo_twitter_image_size' - Allow changing the Twitter Card image size
|
||||
*
|
||||
@@ -310,7 +329,11 @@ if ( ! class_exists( 'WPSEO_Twitter' ) ) {
|
||||
if ( $featured_img ) {
|
||||
$this->image_output( $featured_img[0] );
|
||||
}
|
||||
} elseif ( preg_match_all( '`<img [^>]+>`', $post->post_content, $matches ) ) {
|
||||
|
||||
return;
|
||||
}
|
||||
|
||||
if ( preg_match_all( '`<img [^>]+>`', $post->post_content, $matches ) ) {
|
||||
foreach ( $matches[0] as $img ) {
|
||||
if ( preg_match( '`src=(["\'])(.*?)\1`', $img, $match ) ) {
|
||||
$this->image_output( $match[2] );
|
||||
|
||||
|
Before Width: | Height: | Size: 11 KiB |
|
Before Width: | Height: | Size: 52 KiB |
|
Before Width: | Height: | Size: 45 KiB |
|
Before Width: | Height: | Size: 41 KiB |
|
Before Width: | Height: | Size: 1.2 KiB After Width: | Height: | Size: 299 B |
|
Before Width: | Height: | Size: 3.1 KiB After Width: | Height: | Size: 3.1 KiB |
|
Before Width: | Height: | Size: 1.6 KiB |
|
Before Width: | Height: | Size: 605 B |
|
Before Width: | Height: | Size: 453 B |
|
Before Width: | Height: | Size: 493 B |
|
Before Width: | Height: | Size: 12 KiB |
@@ -1,87 +0,0 @@
|
||||
<?php
|
||||
/**
|
||||
* @package ?
|
||||
*/
|
||||
|
||||
if ( ! defined( 'WPSEO_VERSION' ) ) {
|
||||
header( 'Status: 403 Forbidden' );
|
||||
header( 'HTTP/1.1 403 Forbidden' );
|
||||
exit();
|
||||
}
|
||||
|
||||
|
||||
if ( ! class_exists( 'Sitemap_Walker' ) ) {
|
||||
/**
|
||||
* This is a custom walker that is used to create tree lists for
|
||||
* custom post types and taxonomy
|
||||
*/
|
||||
class Sitemap_Walker extends Walker_Category {
|
||||
/**
|
||||
* Record of posts added to tree
|
||||
*/
|
||||
private $processed_post_ids = array();
|
||||
|
||||
/**
|
||||
* Code that appends posts when a child node is reached
|
||||
*/
|
||||
function end_el( &$output, $object, $depth = 0, $args = array() ) {
|
||||
$tax_name = $args['taxonomy'];
|
||||
|
||||
// use cat_id for category and slug for all other taxonomy
|
||||
$term_id = ($tax_name == 'category') ? $object->cat_ID : $object->slug;
|
||||
|
||||
$query_args = array(
|
||||
'post_type' => $args['post_type'],
|
||||
'post_status' => 'publish',
|
||||
'posts_per_page' => -1,
|
||||
|
||||
"{$tax_name}" => $term_id,
|
||||
|
||||
'meta_query' => array(
|
||||
'relation' => 'OR',
|
||||
// include if this key doesn't exists
|
||||
array(
|
||||
'key' => WPSEO_Meta::$meta_prefix . 'meta-robots-noindex',
|
||||
'value' => '', // This is ignored, but is necessary...
|
||||
'compare' => 'NOT EXISTS',
|
||||
),
|
||||
// OR if key does exists include if it is not 1
|
||||
array(
|
||||
'key' => WPSEO_Meta::$meta_prefix . 'meta-robots-noindex',
|
||||
'value' => '1',
|
||||
'compare' => '!=',
|
||||
),
|
||||
// OR this key overrides it
|
||||
array(
|
||||
'key' => WPSEO_Meta::$meta_prefix . 'sitemap-html-include',
|
||||
'value' => 'always',
|
||||
'compare' => '=',
|
||||
),
|
||||
),
|
||||
);
|
||||
|
||||
$posts = get_posts( $query_args );
|
||||
|
||||
if ( is_array( $posts ) && $posts !== array() ) {
|
||||
$output .= '<ul>';
|
||||
foreach ( $posts as $post ) {
|
||||
$category = get_the_terms( $post->ID, $tax_name );
|
||||
|
||||
if ( $category ) {
|
||||
// reset array to get the first element
|
||||
$category = reset( $category );
|
||||
|
||||
// Only display a post link once, even if it's in multiple taxonomies
|
||||
if ( $category->term_id == $object->term_id && ! in_array( $post->ID, $this->processed_post_ids ) ) {
|
||||
$this->processed_post_ids[] = $post->ID;
|
||||
$output .= '<li><a href="' . esc_url( get_permalink( $post->ID ) ) . '">' . get_the_title( $post->ID ) . '</a></li>';
|
||||
}
|
||||
}
|
||||
}
|
||||
$output .= '</ul>';
|
||||
}
|
||||
parent::end_el( $output, $object, $depth, $args );
|
||||
}
|
||||
|
||||
} /* End of class */
|
||||
} /* End of class-exists wrapper */
|
||||
@@ -305,6 +305,7 @@ if ( ! class_exists( 'WPSEO_Sitemaps' ) ) {
|
||||
$caching = apply_filters( 'wpseo_enable_xml_sitemap_transient_caching', true );
|
||||
|
||||
if ( $caching ) {
|
||||
do_action('wpseo_sitemap_stylesheet_cache_' . $type, $this );
|
||||
$this->sitemap = get_transient( 'wpseo_sitemap_cache_' . $type . '_' . $this->n );
|
||||
}
|
||||
|
||||
@@ -365,18 +366,16 @@ if ( ! class_exists( 'WPSEO_Sitemaps' ) ) {
|
||||
global $wpdb;
|
||||
|
||||
$this->sitemap = '<sitemapindex xmlns="http://www.sitemaps.org/schemas/sitemap/0.9">' . "\n";
|
||||
$base = $GLOBALS['wp_rewrite']->using_index_permalinks() ? 'index.php/' : '';
|
||||
|
||||
// reference post type specific sitemaps
|
||||
$post_types = get_post_types( array( 'public' => true ) );
|
||||
if ( is_array( $post_types ) && $post_types !== array() ) {
|
||||
|
||||
foreach ( $post_types as $post_type ) {
|
||||
if ( isset( $this->options[ 'post_types-' . $post_type . '-not_in_sitemap' ] ) && $this->options[ 'post_types-' . $post_type . '-not_in_sitemap' ] === true ) {
|
||||
unset( $post_types[ $post_type ] );
|
||||
if ( isset( $this->options['post_types-' . $post_type . '-not_in_sitemap'] ) && $this->options['post_types-' . $post_type . '-not_in_sitemap'] === true ) {
|
||||
unset( $post_types[$post_type] );
|
||||
} else {
|
||||
if ( apply_filters( 'wpseo_sitemap_exclude_post_type', false, $post_type ) ) {
|
||||
unset( $post_types[ $post_type ] );
|
||||
unset( $post_types[$post_type] );
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -387,15 +386,15 @@ if ( ! class_exists( 'WPSEO_Sitemaps' ) ) {
|
||||
|
||||
$post_type_counts = array();
|
||||
foreach ( $result as $obj ) {
|
||||
$post_type_counts[ $obj->post_type ] = $obj->count;
|
||||
$post_type_counts[$obj->post_type] = $obj->count;
|
||||
}
|
||||
unset( $result );
|
||||
|
||||
foreach ( $post_types as $post_type ) {
|
||||
|
||||
$count = false;
|
||||
if ( isset( $post_type_counts[ $post_type ] ) ) {
|
||||
$count = $post_type_counts[ $post_type ];
|
||||
if ( isset( $post_type_counts[$post_type] ) ) {
|
||||
$count = $post_type_counts[$post_type];
|
||||
} else {
|
||||
continue;
|
||||
}
|
||||
@@ -410,12 +409,12 @@ if ( ! class_exists( 'WPSEO_Sitemaps' ) ) {
|
||||
if ( ! isset( $all_dates ) ) {
|
||||
$all_dates = $wpdb->get_col( $wpdb->prepare( "SELECT post_modified_gmt FROM (SELECT @rownum:=@rownum+1 rownum, $wpdb->posts.post_modified_gmt FROM (SELECT @rownum:=0) r, $wpdb->posts WHERE post_status IN ('publish','inherit') AND post_type = %s ORDER BY post_modified_gmt ASC) x WHERE rownum %%%d=0", $post_type, $this->max_entries ) );
|
||||
}
|
||||
$datetime = new DateTime( $all_dates[ $i ], new DateTimeZone( $this->get_timezone_string() ) );
|
||||
$datetime = new DateTime( $all_dates[$i], new DateTimeZone( $this->get_timezone_string() ) );
|
||||
$date = $datetime->format( 'c' );
|
||||
}
|
||||
|
||||
$this->sitemap .= '<sitemap>' . "\n";
|
||||
$this->sitemap .= '<loc>' . home_url( $base . $post_type . '-sitemap' . $count . '.xml' ) . '</loc>' . "\n";
|
||||
$this->sitemap .= '<loc>' . wpseo_xml_sitemaps_base_url( $post_type . '-sitemap' . $count . '.xml' ) . '</loc>' . "\n";
|
||||
$this->sitemap .= '<lastmod>' . htmlspecialchars( $date ) . '</lastmod>' . "\n";
|
||||
$this->sitemap .= '</sitemap>' . "\n";
|
||||
}
|
||||
@@ -431,17 +430,17 @@ if ( ! class_exists( 'WPSEO_Sitemaps' ) ) {
|
||||
if ( is_array( $taxonomies ) && $taxonomies !== array() ) {
|
||||
foreach ( $taxonomy_names as $tax ) {
|
||||
if ( in_array( $tax, array( 'link_category', 'nav_menu', 'post_format' ) ) ) {
|
||||
unset( $taxonomy_names[ $tax ], $taxonomies[ $tax ] );
|
||||
unset( $taxonomy_names[$tax], $taxonomies[$tax] );
|
||||
continue;
|
||||
}
|
||||
|
||||
if ( apply_filters( 'wpseo_sitemap_exclude_taxonomy', false, $tax ) ) {
|
||||
unset( $taxonomy_names[ $tax ], $taxonomies[ $tax ] );
|
||||
unset( $taxonomy_names[$tax], $taxonomies[$tax] );
|
||||
continue;
|
||||
}
|
||||
|
||||
if ( isset( $this->options[ 'taxonomies-' . $tax . '-not_in_sitemap' ] ) && $this->options[ 'taxonomies-' . $tax . '-not_in_sitemap' ] === true ) {
|
||||
unset( $taxonomy_names[ $tax ], $taxonomies[ $tax ] );
|
||||
if ( isset( $this->options['taxonomies-' . $tax . '-not_in_sitemap'] ) && $this->options['taxonomies-' . $tax . '-not_in_sitemap'] === true ) {
|
||||
unset( $taxonomy_names[$tax], $taxonomies[$tax] );
|
||||
continue;
|
||||
}
|
||||
}
|
||||
@@ -452,14 +451,14 @@ if ( ! class_exists( 'WPSEO_Sitemaps' ) ) {
|
||||
$all_taxonomy_terms = $wpdb->get_results( $query );
|
||||
$all_taxonomies = array();
|
||||
foreach ( $all_taxonomy_terms as $obj ) {
|
||||
$all_taxonomies[ $obj->taxonomy ][] = $obj->term_id;
|
||||
$all_taxonomies[$obj->taxonomy][] = $obj->term_id;
|
||||
}
|
||||
unset( $all_taxonomy_terms );
|
||||
|
||||
foreach ( $taxonomies as $tax_name => $tax ) {
|
||||
|
||||
$steps = $this->max_entries;
|
||||
$count = ( isset ( $all_taxonomies[ $tax_name ] ) ) ? count( $all_taxonomies[ $tax_name ] ) : 1;
|
||||
$count = ( isset ( $all_taxonomies[$tax_name] ) ) ? count( $all_taxonomies[$tax_name] ) : 1;
|
||||
$n = ( $count > $this->max_entries ) ? (int) ceil( $count / $this->max_entries ) : 1;
|
||||
|
||||
for ( $i = 0; $i < $n; $i ++ ) {
|
||||
@@ -472,7 +471,7 @@ if ( ! class_exists( 'WPSEO_Sitemaps' ) ) {
|
||||
if ( ( empty( $count ) || $count == $n ) ) {
|
||||
$date = $this->get_last_modified( $tax->object_type );
|
||||
} else {
|
||||
$terms = array_splice( $all_taxonomies[ $tax_name ], 0, $steps );
|
||||
$terms = array_splice( $all_taxonomies[$tax_name], 0, $steps );
|
||||
if ( ! $terms ) {
|
||||
continue;
|
||||
}
|
||||
@@ -501,7 +500,7 @@ if ( ! class_exists( 'WPSEO_Sitemaps' ) ) {
|
||||
}
|
||||
|
||||
$this->sitemap .= '<sitemap>' . "\n";
|
||||
$this->sitemap .= '<loc>' . home_url( $base . $tax_name . '-sitemap' . $count . '.xml' ) . '</loc>' . "\n";
|
||||
$this->sitemap .= '<loc>' . wpseo_xml_sitemaps_base_url( $tax_name . '-sitemap' . $count . '.xml' ) . '</loc>' . "\n";
|
||||
$this->sitemap .= '<lastmod>' . htmlspecialchars( $date ) . '</lastmod>' . "\n";
|
||||
$this->sitemap .= '</sitemap>' . "\n";
|
||||
}
|
||||
@@ -522,41 +521,37 @@ if ( ! class_exists( 'WPSEO_Sitemaps' ) ) {
|
||||
|
||||
// must use custom raw query because WP User Query does not support ordering by usermeta
|
||||
// Retrieve the newest updated profile timestamp overall
|
||||
|
||||
$date_query = "
|
||||
SELECT mt1.meta_value FROM $wpdb->users
|
||||
INNER JOIN $wpdb->usermeta ON ($wpdb->users.ID = $wpdb->usermeta.user_id)
|
||||
INNER JOIN $wpdb->usermeta AS mt1 ON ($wpdb->users.ID = mt1.user_id) WHERE 1=1
|
||||
AND ( ($wpdb->usermeta.meta_key = %s AND CAST($wpdb->usermeta.meta_value AS CHAR) != '0')
|
||||
AND mt1.meta_key = '_yoast_wpseo_profile_updated' ) ORDER BY mt1.meta_value
|
||||
";
|
||||
|
||||
if ( empty( $count ) || $count == $n ) {
|
||||
$date = $wpdb->get_var(
|
||||
$wpdb->prepare(
|
||||
"
|
||||
SELECT mt1.meta_value FROM $wpdb->users
|
||||
INNER JOIN $wpdb->usermeta ON ($wpdb->users.ID = $wpdb->usermeta.user_id)
|
||||
INNER JOIN $wpdb->usermeta AS mt1 ON ($wpdb->users.ID = mt1.user_id) WHERE 1=1
|
||||
AND ( ($wpdb->usermeta.meta_key = %s AND CAST($wpdb->usermeta.meta_value AS CHAR) != '0')
|
||||
AND mt1.meta_key = '_yoast_wpseo_profile_updated' ) ORDER BY mt1.meta_value DESC LIMIT 1
|
||||
",
|
||||
$date_query . ' ASC LIMIT 1',
|
||||
$wpdb->get_blog_prefix() . 'user_level'
|
||||
)
|
||||
);
|
||||
$date = new DateTime( date( 'y-m-d H:i:s', $date ), new DateTimeZone( $this->get_timezone_string() ) );
|
||||
|
||||
// Retrieve the newest updated profile timestamp by an offset
|
||||
} else {
|
||||
$date = $wpdb->get_var(
|
||||
$wpdb->prepare(
|
||||
"
|
||||
SELECT mt1.meta_value FROM $wpdb->users
|
||||
INNER JOIN $wpdb->usermeta ON ($wpdb->users.ID = $wpdb->usermeta.user_id)
|
||||
INNER JOIN $wpdb->usermeta AS mt1 ON ($wpdb->users.ID = mt1.user_id) WHERE 1=1
|
||||
AND ( ($wpdb->usermeta.meta_key = %s AND CAST($wpdb->usermeta.meta_value AS CHAR) != '0')
|
||||
AND mt1.meta_key = '_yoast_wpseo_profile_updated' ) ORDER BY mt1.meta_value ASC LIMIT 1 OFFSET %d
|
||||
",
|
||||
$date_query . ' DESC LIMIT 1 OFFSET %d',
|
||||
$wpdb->get_blog_prefix() . 'user_level',
|
||||
$this->max_entries * ( $i + 1 ) - 1
|
||||
)
|
||||
);
|
||||
$date = new DateTime( date( 'y-m-d H:i:s', $date ), new DateTimeZone( $this->get_timezone_string() ) );
|
||||
}
|
||||
$date = new DateTime( date( 'y-m-d H:i:s', $date ), new DateTimeZone( $this->get_timezone_string() ) );
|
||||
|
||||
$this->sitemap .= '<sitemap>' . "\n";
|
||||
$this->sitemap .= '<loc>' . home_url( $base . 'author-sitemap' . $count . '.xml' ) . '</loc>' . "\n";
|
||||
$this->sitemap .= '<loc>' . wpseo_xml_sitemaps_base_url( 'author-sitemap' . $count . '.xml' ) . '</loc>' . "\n";
|
||||
$this->sitemap .= '<lastmod>' . htmlspecialchars( $date->format( 'c' ) ) . '</lastmod>' . "\n";
|
||||
$this->sitemap .= '</sitemap>' . "\n";
|
||||
}
|
||||
@@ -610,7 +605,7 @@ if ( ! class_exists( 'WPSEO_Sitemaps' ) ) {
|
||||
global $wpdb;
|
||||
|
||||
if (
|
||||
( isset( $this->options[ 'post_types-' . $post_type . '-not_in_sitemap' ] ) && $this->options[ 'post_types-' . $post_type . '-not_in_sitemap' ] === true )
|
||||
( isset( $this->options['post_types-' . $post_type . '-not_in_sitemap'] ) && $this->options['post_types-' . $post_type . '-not_in_sitemap'] === true )
|
||||
|| in_array( $post_type, array( 'revision', 'nav_menu_item' ) )
|
||||
|| apply_filters( 'wpseo_sitemap_exclude_post_type', false, $post_type )
|
||||
) {
|
||||
@@ -731,20 +726,12 @@ if ( ! class_exists( 'WPSEO_Sitemaps' ) ) {
|
||||
if ( count( $post_ids ) > 0 ) {
|
||||
update_meta_cache( 'post', $post_ids );
|
||||
|
||||
$child_query = "SELECT ID, post_title, post_parent FROM $wpdb->posts WHERE post_status = 'inherit' AND post_type = 'attachment' AND post_parent IN (" . implode( $post_ids, ',' ) . ')';
|
||||
$wpdb->query( $child_query );
|
||||
$attachments = $wpdb->get_results( $child_query );
|
||||
$attachment_ids = wp_list_pluck( $attachments, 'ID' );
|
||||
$imploded_post_ids = implode( $post_ids, ',' );
|
||||
|
||||
$thumbnail_query = "SELECT meta_value FROM $wpdb->postmeta WHERE meta_key = '_thumbnail_id' AND post_id IN (" . implode( $post_ids, ',' ) . ')';
|
||||
$wpdb->query( $thumbnail_query );
|
||||
$thumbnails = $wpdb->get_results( $thumbnail_query );
|
||||
$thumbnail_ids = wp_list_pluck( $thumbnails, 'meta_value' );
|
||||
$attachments = $this->get_attachments( $imploded_post_ids );
|
||||
$thumbnails = $this->get_thumbnails( $imploded_post_ids );
|
||||
|
||||
$attachment_ids = array_merge( $thumbnail_ids, $attachment_ids );
|
||||
|
||||
_prime_post_caches( $attachment_ids );
|
||||
update_meta_cache( 'post', $attachment_ids );
|
||||
$this->do_attachment_ids_caching( $attachments, $thumbnails );
|
||||
}
|
||||
|
||||
$offset = $offset + $steps;
|
||||
@@ -767,7 +754,16 @@ if ( ! class_exists( 'WPSEO_Sitemaps' ) ) {
|
||||
|
||||
$url = array();
|
||||
|
||||
$url['mod'] = ( isset( $p->post_modified_gmt ) && $p->post_modified_gmt != '0000-00-00 00:00:00' && $p->post_modified_gmt > $p->post_date_gmt ) ? $p->post_modified_gmt : ( ( '0000-00-00 00:00:00' != $p->post_date_gmt ) ? $p->post_date_gmt : $p->post_date );
|
||||
if ( isset( $p->post_modified_gmt ) && $p->post_modified_gmt != '0000-00-00 00:00:00' && $p->post_modified_gmt > $p->post_date_gmt ) {
|
||||
$url['mod'] = $p->post_modified_gmt;
|
||||
} else {
|
||||
if ( '0000-00-00 00:00:00' != $p->post_date_gmt ) {
|
||||
$url['mod'] = $p->post_date_gmt;
|
||||
} else {
|
||||
$url['mod'] = $p->post_date;
|
||||
}
|
||||
}
|
||||
|
||||
$url['loc'] = get_permalink( $p );
|
||||
|
||||
/**
|
||||
@@ -803,30 +799,7 @@ if ( ! class_exists( 'WPSEO_Sitemaps' ) ) {
|
||||
}
|
||||
}
|
||||
|
||||
$pri = WPSEO_Meta::get_value( 'sitemap-prio', $p->ID );
|
||||
if ( is_numeric( $pri ) ) {
|
||||
$url['pri'] = (float) $pri;
|
||||
} else {
|
||||
if ( $p->post_parent == 0 && $p->post_type == 'page' ) {
|
||||
$url['pri'] = 0.8;
|
||||
} else {
|
||||
$url['pri'] = 0.6;
|
||||
}
|
||||
}
|
||||
|
||||
if ( isset( $front_id ) && $p->ID == $front_id ) {
|
||||
$url['pri'] = 1.0;
|
||||
}
|
||||
|
||||
/**
|
||||
* Filter: 'wpseo_xml_post_type_archive_priority' - Allow changing the priority of the URL WordPress SEO uses in the XML sitemap.
|
||||
*
|
||||
* @api float $priority The priority for this URL, ranging from 0 to 1
|
||||
*
|
||||
* @param string $post_type The post type this archive is for
|
||||
* @param object $p The post object
|
||||
*/
|
||||
$url['pri'] = apply_filters( 'wpseo_xml_sitemap_post_priority', $url['pri'], $p->post_type, $p );
|
||||
$url['pri'] = $this->calculate_priority( $p );
|
||||
|
||||
$url['images'] = array();
|
||||
|
||||
@@ -844,8 +817,7 @@ if ( ! class_exists( 'WPSEO_Sitemaps' ) ) {
|
||||
// The URL is relative, we'll have to make it absolute
|
||||
$src = $this->home_url . $src;
|
||||
}
|
||||
}
|
||||
elseif ( strpos( $src, 'http' ) !== 0 ) {
|
||||
} elseif ( strpos( $src, 'http' ) !== 0 ) {
|
||||
// Protocol relative url, we add the scheme as the standard requires a protocol
|
||||
$src = $scheme . ':' . $src;
|
||||
|
||||
@@ -859,7 +831,7 @@ if ( ! class_exists( 'WPSEO_Sitemaps' ) ) {
|
||||
continue;
|
||||
}
|
||||
|
||||
if ( isset( $url['images'][ $src ] ) ) {
|
||||
if ( isset( $url['images'][$src] ) ) {
|
||||
continue;
|
||||
}
|
||||
|
||||
@@ -884,29 +856,7 @@ if ( ! class_exists( 'WPSEO_Sitemaps' ) ) {
|
||||
|
||||
if ( strpos( $p->post_content, '[gallery' ) !== false ) {
|
||||
if ( is_array( $attachments ) && $attachments !== array() ) {
|
||||
|
||||
foreach ( $attachments as $attachment ) {
|
||||
if ( $attachment->post_parent !== $p->ID ) {
|
||||
continue;
|
||||
}
|
||||
|
||||
$src = $this->image_url( $attachment->ID );
|
||||
$image = array(
|
||||
'src' => apply_filters( 'wpseo_xml_sitemap_img_src', $src, $p )
|
||||
);
|
||||
|
||||
$alt = get_post_meta( $attachment->ID, '_wp_attachment_image_alt', true );
|
||||
if ( $alt !== '' ) {
|
||||
$image['alt'] = $alt;
|
||||
}
|
||||
unset( $alt );
|
||||
|
||||
$image['title'] = $attachment->post_title;
|
||||
|
||||
$image = apply_filters( 'wpseo_xml_sitemap_img', $image, $p );
|
||||
|
||||
$url['images'][] = $image;
|
||||
}
|
||||
$url['images'] = $this->parse_attachments( $attachments, $p );
|
||||
}
|
||||
unset( $attachment, $src, $image, $alt );
|
||||
}
|
||||
@@ -955,7 +905,7 @@ if ( ! class_exists( 'WPSEO_Sitemaps' ) ) {
|
||||
*/
|
||||
function build_tax_map( $taxonomy ) {
|
||||
if (
|
||||
( isset( $this->options[ 'taxonomies-' . $taxonomy->name . '-not_in_sitemap' ] ) && $this->options[ 'taxonomies-' . $taxonomy->name . '-not_in_sitemap' ] === true )
|
||||
( isset( $this->options['taxonomies-' . $taxonomy->name . '-not_in_sitemap'] ) && $this->options['taxonomies-' . $taxonomy->name . '-not_in_sitemap'] === true )
|
||||
|| in_array( $taxonomy, array( 'link_category', 'nav_menu', 'post_format' ) )
|
||||
|| apply_filters( 'wpseo_sitemap_exclude_taxonomy', false, $taxonomy->name )
|
||||
) {
|
||||
@@ -1266,8 +1216,7 @@ if ( ! class_exists( 'WPSEO_Sitemaps' ) ) {
|
||||
* Make a request for the sitemap index so as to cache it before the arrival of the search engines.
|
||||
*/
|
||||
function hit_sitemap_index() {
|
||||
$base = $GLOBALS['wp_rewrite']->using_index_permalinks() ? 'index.php/' : '';
|
||||
$url = home_url( $base . 'sitemap_index.xml' );
|
||||
$url = wpseo_xml_sitemaps_base_url( 'sitemap_index.xml' );
|
||||
wp_remote_get( $url );
|
||||
}
|
||||
|
||||
@@ -1311,18 +1260,18 @@ if ( ! class_exists( 'WPSEO_Sitemaps' ) ) {
|
||||
$query = "SELECT post_type, MAX(post_modified_gmt) AS date FROM $wpdb->posts WHERE post_status IN ('publish','inherit') AND post_type IN ('" . implode( "','", get_post_types( array( 'public' => true ) ) ) . "') GROUP BY post_type ORDER BY post_modified_gmt DESC";
|
||||
$results = $wpdb->get_results( $query );
|
||||
foreach ( $results as $obj ) {
|
||||
$this->post_type_dates[ $obj->post_type ] = $obj->date;
|
||||
$this->post_type_dates[$obj->post_type] = $obj->date;
|
||||
}
|
||||
unset( $results );
|
||||
}
|
||||
|
||||
if ( count( $post_types ) === 1 && isset( $this->post_type_dates[ $post_types[0] ] ) ) {
|
||||
$result = $this->post_type_dates[ $post_types[0] ];
|
||||
if ( count( $post_types ) === 1 && isset( $this->post_type_dates[$post_types[0]] ) ) {
|
||||
$result = $this->post_type_dates[$post_types[0]];
|
||||
} else {
|
||||
$result = null;
|
||||
foreach ( $post_types as $post_type ) {
|
||||
if ( isset( $this->post_type_dates[ $post_type ] ) && strtotime( $this->post_type_dates[ $post_type ] ) > $result ) {
|
||||
$result = $this->post_type_dates[ $post_type ];
|
||||
if ( isset( $this->post_type_dates[$post_type] ) && strtotime( $this->post_type_dates[$post_type] ) > $result ) {
|
||||
$result = $this->post_type_dates[$post_type];
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1430,6 +1379,134 @@ if ( ! class_exists( 'WPSEO_Sitemaps' ) ) {
|
||||
return $url;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Getting the attachments from database
|
||||
*
|
||||
* @param $post_ids
|
||||
*
|
||||
* @return mixed
|
||||
*/
|
||||
private function get_attachments( $post_ids ) {
|
||||
global $wpdb;
|
||||
$child_query = "SELECT ID, post_title, post_parent FROM $wpdb->posts WHERE post_status = 'inherit' AND post_type = 'attachment' AND post_parent IN (" . $post_ids . ')';
|
||||
$wpdb->query( $child_query );
|
||||
$attachments = $wpdb->get_results( $child_query );
|
||||
|
||||
return $attachments;
|
||||
}
|
||||
|
||||
/**
|
||||
* Getting thumbnails
|
||||
*
|
||||
* @param array $post_ids
|
||||
*
|
||||
* @return mixed
|
||||
*/
|
||||
private function get_thumbnails( $post_ids ) {
|
||||
global $wpdb;
|
||||
|
||||
$thumbnail_query = "SELECT meta_value FROM $wpdb->postmeta WHERE meta_key = '_thumbnail_id' AND post_id IN (" . $post_ids . ')';
|
||||
$wpdb->query( $thumbnail_query );
|
||||
$thumbnails = $wpdb->get_results( $thumbnail_query );
|
||||
|
||||
return $thumbnails;
|
||||
}
|
||||
|
||||
/**
|
||||
* Parsing attachment_ids and do the caching
|
||||
*
|
||||
* Function will pluck ID from attachments and meta_value from thumbnails and marge them into one array. This
|
||||
* array will be used to do the caching
|
||||
*
|
||||
* @param array $attachments
|
||||
* @param array $thumbnails
|
||||
*/
|
||||
private function do_attachment_ids_caching( $attachments, $thumbnails ) {
|
||||
$attachment_ids = wp_list_pluck( $attachments, 'ID' );
|
||||
$thumbnail_ids = wp_list_pluck( $thumbnails, 'meta_value' );
|
||||
|
||||
$attachment_ids = array_unique( array_merge( $thumbnail_ids, $attachment_ids ) );
|
||||
|
||||
_prime_post_caches( $attachment_ids );
|
||||
update_meta_cache( 'post', $attachment_ids );
|
||||
}
|
||||
|
||||
/**
|
||||
* Parses the given attachments
|
||||
*
|
||||
* @param array $attachments
|
||||
* @param stdobject $post
|
||||
*
|
||||
* @return array
|
||||
*/
|
||||
private function parse_attachments( $attachments, $post ) {
|
||||
|
||||
$return = array();
|
||||
|
||||
foreach ( $attachments as $attachment ) {
|
||||
if ( $attachment->post_parent !== $post->ID ) {
|
||||
continue;
|
||||
}
|
||||
|
||||
$src = $this->image_url( $attachment->ID );
|
||||
$image = array(
|
||||
'src' => apply_filters( 'wpseo_xml_sitemap_img_src', $src, $post )
|
||||
);
|
||||
|
||||
$alt = get_post_meta( $attachment->ID, '_wp_attachment_image_alt', true );
|
||||
if ( $alt !== '' ) {
|
||||
$image['alt'] = $alt;
|
||||
}
|
||||
unset( $alt );
|
||||
|
||||
$image['title'] = $attachment->post_title;
|
||||
|
||||
$image = apply_filters( 'wpseo_xml_sitemap_img', $image, $post );
|
||||
|
||||
$return[] = $image;
|
||||
}
|
||||
|
||||
return $return;
|
||||
}
|
||||
|
||||
/**
|
||||
* Calculate the priority of the post
|
||||
*
|
||||
* @param stdobject $post
|
||||
*
|
||||
* @return float|mixed
|
||||
*/
|
||||
private function calculate_priority( $post ) {
|
||||
$front_id = get_option( 'page_on_front' );
|
||||
$pri = WPSEO_Meta::get_value( 'sitemap-prio', $post->ID );
|
||||
if ( is_numeric( $pri ) ) {
|
||||
$return = (float) $pri;
|
||||
} else {
|
||||
if ( $post->post_parent == 0 && $post->post_type == 'page' ) {
|
||||
$return = 0.8;
|
||||
} else {
|
||||
$return = 0.6;
|
||||
}
|
||||
}
|
||||
|
||||
if ( isset( $front_id ) && $post->ID == $front_id ) {
|
||||
$return = 1.0;
|
||||
}
|
||||
|
||||
/**
|
||||
* Filter: 'wpseo_xml_post_type_archive_priority' - Allow changing the priority of the URL WordPress SEO uses in the XML sitemap.
|
||||
*
|
||||
* @api float $priority The priority for this URL, ranging from 0 to 1
|
||||
*
|
||||
* @param string $post_type The post type this archive is for
|
||||
* @param object $p The post object
|
||||
*/
|
||||
$return = apply_filters( 'wpseo_xml_sitemap_post_priority', $return, $post->post_type, $post );
|
||||
|
||||
return $return;
|
||||
}
|
||||
|
||||
} /* End of class */
|
||||
|
||||
} /* End of class-exists wrapper */
|
||||
@@ -34,7 +34,7 @@ if ( ! class_exists( 'WPSEO_Meta' ) ) {
|
||||
* for get_post_meta(), get_post_custom() and the likes. That would have been the preferred solution.
|
||||
*
|
||||
* @internal all WP native get_meta() results get cached internally, so no need to cache locally.
|
||||
* @internal use $key when the key is the WPSEO internal name (without prefix), $meta_key when it
|
||||
* @internal use $key when the key is the WPSEO internal name (without prefix), $meta_key when it
|
||||
* includes the prefix
|
||||
*/
|
||||
class WPSEO_Meta {
|
||||
@@ -219,28 +219,6 @@ if ( ! class_exists( 'WPSEO_Meta' ) ) {
|
||||
'0.1' => '0.1 - ', // translation added later
|
||||
),
|
||||
),
|
||||
'sitemap-html-include' => array(
|
||||
'type' => 'select',
|
||||
'title' => '', // translation added later
|
||||
'default_value' => '-',
|
||||
'description' => '', // translation added later
|
||||
'options' => array(
|
||||
'-' => '', // translation added later
|
||||
'always' => '', // translation added later
|
||||
'never' => '', // translation added later
|
||||
),
|
||||
),
|
||||
'authorship' => array(
|
||||
'type' => 'select',
|
||||
'title' => '', // translation added later
|
||||
'default_value' => '-',
|
||||
'description' => '', // translation added later
|
||||
'options' => array(
|
||||
'-' => '', // translation added later
|
||||
'always' => '', // translation added later
|
||||
'never' => '', // translation added later
|
||||
),
|
||||
),
|
||||
'canonical' => array(
|
||||
'type' => 'text',
|
||||
'title' => '', // translation added later
|
||||
@@ -254,45 +232,7 @@ if ( ! class_exists( 'WPSEO_Meta' ) ) {
|
||||
'description' => '', // translation added later
|
||||
),
|
||||
),
|
||||
'social' => array(
|
||||
'opengraph-title' => array(
|
||||
'type' => 'text',
|
||||
'title' => '', // translation added later
|
||||
'default_value' => '',
|
||||
'description' => '', // translation added later
|
||||
),
|
||||
'opengraph-description' => array(
|
||||
'type' => 'textarea',
|
||||
'title' => '', // translation added later
|
||||
'default_value' => '',
|
||||
'description' => '', // translation added later
|
||||
),
|
||||
'opengraph-image' => array(
|
||||
'type' => 'upload',
|
||||
'title' => '', // translation added later
|
||||
'default_value' => '',
|
||||
'description' => '', // translation added later
|
||||
),
|
||||
'google-plus-title' => array(
|
||||
'type' => 'text',
|
||||
'title' => '', // translation added later
|
||||
'default_value' => '',
|
||||
'description' => '', // translation added later
|
||||
),
|
||||
'google-plus-description' => array(
|
||||
'type' => 'textarea',
|
||||
'title' => '', // translation added later
|
||||
'default_value' => '',
|
||||
'description' => '', // translation added later
|
||||
),
|
||||
'google-plus-image' => array(
|
||||
'type' => 'upload',
|
||||
'title' => '', // translation added later
|
||||
'default_value' => '',
|
||||
'description' => '', // translation added later
|
||||
),
|
||||
|
||||
),
|
||||
'social' => array(),
|
||||
|
||||
/* Fields we should validate & save, but not show on any form */
|
||||
'non_form' => array(
|
||||
@@ -329,6 +269,33 @@ if ( ! class_exists( 'WPSEO_Meta' ) ) {
|
||||
* @return void
|
||||
*/
|
||||
public static function init() {
|
||||
|
||||
$options = WPSEO_Options::get_all();
|
||||
|
||||
foreach (
|
||||
array(
|
||||
'opengraph' => 'opengraph',
|
||||
'twitter' => 'twitter',
|
||||
'googleplus' => 'google-plus',
|
||||
) as $option => $network ) {
|
||||
if ( true === $options[$option] ) {
|
||||
foreach (
|
||||
array(
|
||||
'title' => 'text',
|
||||
'description' => 'textarea',
|
||||
'image' => 'upload',
|
||||
) as $box => $type
|
||||
) {
|
||||
self::$meta_fields['social'][$network.'-'.$box] = array(
|
||||
'type' => $type,
|
||||
'title' => '', // translation added later
|
||||
'default_value' => '',
|
||||
'description' => '', // translation added later
|
||||
);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Allow add-on plugins to register their meta fields for management by this class
|
||||
* add_filter() calls must be made before plugins_loaded prio 14
|
||||
@@ -469,9 +436,6 @@ if ( ! class_exists( 'WPSEO_Meta' ) ) {
|
||||
);
|
||||
}
|
||||
|
||||
/* Adjust the authorship 'default for post type' text string based on the post type */
|
||||
$field_defs['authorship']['options']['-'] = sprintf( $field_defs['authorship']['options']['-'], ( ( isset( $options[ 'noauthorship-' . $post_type ] ) && $options[ 'noauthorship-' . $post_type ] === true ) ? __( 'don\'t show', 'wordpress-seo' ) : __( 'show', 'wordpress-seo' ) ) );
|
||||
|
||||
break;
|
||||
}
|
||||
|
||||
@@ -1033,6 +997,20 @@ if ( ! class_exists( 'WPSEO_Meta' ) ) {
|
||||
}
|
||||
return $merged;
|
||||
}
|
||||
|
||||
/**
|
||||
* Get a value from $_POST for a given key
|
||||
* Returns the $_POST value if exists, returns an empty string if key does not exist
|
||||
*
|
||||
* @static
|
||||
*
|
||||
* @param string $key key of the value to get from $_POST
|
||||
* @return string returns $_POST value, which will be a string the majority of the time
|
||||
* Will return empty string if key does not exists in $_POST
|
||||
*/
|
||||
public static function get_post_value( $key ) {
|
||||
return ( array_key_exists( $key, $_POST ) ) ? $_POST[ $key ] : '';
|
||||
}
|
||||
|
||||
|
||||
} /* End of class */
|
||||
|
||||
@@ -574,8 +574,15 @@ if ( ! class_exists( 'WPSEO_Option' ) ) {
|
||||
protected function retain_variable_keys( $dirty, $clean ) {
|
||||
if ( ( is_array( $this->variable_array_key_patterns ) && $this->variable_array_key_patterns !== array() ) && ( is_array( $dirty ) && $dirty !== array() ) ) {
|
||||
foreach ( $dirty as $key => $value ) {
|
||||
|
||||
// do nothing if already in filtered options
|
||||
if ( isset( $clean[ $key ] ) ) {
|
||||
continue;
|
||||
}
|
||||
|
||||
foreach ( $this->variable_array_key_patterns as $pattern ) {
|
||||
if ( strpos( $key, $pattern ) === 0 && ! isset( $clean[ $key ] ) ) {
|
||||
|
||||
if ( strpos( $key, $pattern ) === 0 ) {
|
||||
$clean[ $key ] = $value;
|
||||
break;
|
||||
}
|
||||
@@ -1413,7 +1420,6 @@ if ( ! class_exists( 'WPSEO_Option_Titles' ) ) {
|
||||
* - 'metadesc-' . $pt->name => ''; // text field
|
||||
* - 'metakey-' . $pt->name => ''; // text field
|
||||
* - 'noindex-' . $pt->name => false;
|
||||
* - 'noauthorship-' . $pt->name => false;
|
||||
* - 'showdate-' . $pt->name => false;
|
||||
* - 'hideeditbox-' . $pt->name => false;
|
||||
*
|
||||
@@ -1439,7 +1445,6 @@ if ( ! class_exists( 'WPSEO_Option_Titles' ) ) {
|
||||
'metadesc-',
|
||||
'metakey-',
|
||||
'noindex-',
|
||||
'noauthorship-',
|
||||
'showdate-',
|
||||
'hideeditbox-',
|
||||
'bctitle-ptarchive-',
|
||||
@@ -1539,7 +1544,7 @@ if ( ! class_exists( 'WPSEO_Option_Titles' ) ) {
|
||||
public function translate_defaults() {
|
||||
$this->defaults['title-author-wpseo'] = sprintf( __( '%s, Author at %s', 'wordpress-seo' ), '%%name%%', '%%sitename%%' ) . ' %%page%% ';
|
||||
$this->defaults['title-search-wpseo'] = sprintf( __( 'You searched for %s', 'wordpress-seo' ), '%%searchphrase%%' ) . ' %%page%% %%sep%% %%sitename%%';
|
||||
$this->defaults['title-404-wpseo'] = __( 'Page Not Found', 'wordpress-seo' ) . ' %%sep%% %%sitename%%';
|
||||
$this->defaults['title-404-wpseo'] = __( 'Page not found', 'wordpress-seo' ) . ' %%sep%% %%sitename%%';
|
||||
}
|
||||
|
||||
|
||||
@@ -1564,12 +1569,6 @@ if ( ! class_exists( 'WPSEO_Option_Titles' ) ) {
|
||||
$this->defaults[ 'metadesc-' . $pt ] = ''; // text area
|
||||
$this->defaults[ 'metakey-' . $pt ] = ''; // text field
|
||||
$this->defaults[ 'noindex-' . $pt ] = false;
|
||||
if ( 'post' == $pt ) {
|
||||
$this->defaults[ 'noauthorship-' . $pt ] = false;
|
||||
} else {
|
||||
$this->defaults[ 'noauthorship-' . $pt ] = true;
|
||||
}
|
||||
|
||||
$this->defaults[ 'showdate-' . $pt ] = false;
|
||||
$this->defaults[ 'hideeditbox-' . $pt ] = false;
|
||||
}
|
||||
@@ -1704,7 +1703,6 @@ if ( ! class_exists( 'WPSEO_Option_Titles' ) ) {
|
||||
'noindex-ptarchive-' . $pt->name
|
||||
'noindex-tax-' . $tax->name */
|
||||
case 'noindex-':
|
||||
case 'noauthorship-': /* 'noauthorship-' . $pt->name */
|
||||
case 'showdate-': /* 'showdate-'. $pt->name */
|
||||
/* Covers:
|
||||
'hideeditbox-'. $pt->name
|
||||
@@ -1883,7 +1881,6 @@ if ( ! class_exists( 'WPSEO_Option_Titles' ) ) {
|
||||
|
||||
/* boolean fields */
|
||||
case 'noindex-':
|
||||
case 'noauthorship-':
|
||||
case 'showdate-':
|
||||
case 'hideeditbox-':
|
||||
default:
|
||||
@@ -1925,8 +1922,14 @@ if ( ! class_exists( 'WPSEO_Option_Titles' ) ) {
|
||||
$patterns = apply_filters( 'wpseo_option_titles_variable_array_key_patterns', $patterns );
|
||||
|
||||
foreach ( $dirty as $key => $value ) {
|
||||
|
||||
// do nothing if already in filtered option array
|
||||
if ( isset( $clean[ $key ] ) ) {
|
||||
continue;
|
||||
}
|
||||
|
||||
foreach ( $patterns as $pattern ) {
|
||||
if ( strpos( $key, $pattern ) === 0 && ! isset( $clean[ $key ] ) ) {
|
||||
if ( strpos( $key, $pattern ) === 0 ) {
|
||||
$clean[ $key ] = $value;
|
||||
break;
|
||||
}
|
||||
|
||||