Archived
Updates
This commit is contained in:
1 parent
7428b67da5
commit
30cef28309
314 files changed
+40976
-34649
No files matched your search
+1
-1
@@ -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.2.1
|
||||
<br /> Version 4.2.4
|
||||
</h1>
|
||||
<p style="text-align: center">Semantic Personal Publishing Platform</p>
|
||||
|
||||
|
||||
+13
-1
@@ -41,7 +41,19 @@ include( ABSPATH . 'wp-admin/admin-header.php' );
|
||||
</h2>
|
||||
|
||||
<div class="changelog point-releases">
|
||||
<h3><?php echo _n( 'Security Release', 'Security Releases', 1 ); ?></h3>
|
||||
<h3><?php echo _n( 'Maintenance and Security Release', 'Maintenance and Security Releases', 4 ); ?></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.', 4 ), '4.2.4', number_format_i18n( 4 ) ); ?>
|
||||
<?php printf( __( 'For more information, see <a href="%s">the release notes</a>.' ), 'http://codex.wordpress.org/Version_4.2.4' ); ?>
|
||||
</p>
|
||||
<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.', 20 ), '4.2.3', number_format_i18n( 20 ) ); ?>
|
||||
<?php printf( __( 'For more information, see <a href="%s">the release notes</a>.' ), 'http://codex.wordpress.org/Version_4.2.3' ); ?>
|
||||
</p>
|
||||
<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.', 13 ), '4.2.2', number_format_i18n( 13 ) ); ?>
|
||||
<?php printf( __( 'For more information, see <a href="%s">the release notes</a>.' ), 'http://codex.wordpress.org/Version_4.2.2' ); ?>
|
||||
</p>
|
||||
<p><?php printf( _n( '<strong>Version %1$s</strong> addressed a security issue.',
|
||||
'<strong>Version %1$s</strong> addressed some security issues.', 1 ), '4.2.1' ); ?>
|
||||
<?php printf( __( 'For more information, see <a href="%s">the release notes</a>.' ), 'http://codex.wordpress.org/Version_4.2.1' ); ?>
|
||||
|
||||
@@ -545,6 +545,7 @@ span.wp-media-buttons-icon:before {
|
||||
.notification-dialog {
|
||||
position: fixed;
|
||||
top: 30%;
|
||||
max-height: 70%;
|
||||
right: 50%;
|
||||
width: 450px;
|
||||
margin-right: -225px;
|
||||
@@ -553,6 +554,7 @@ span.wp-media-buttons-icon:before {
|
||||
box-shadow: 0 3px 6px rgba( 0, 0, 0, 0.3 );
|
||||
line-height: 1.5;
|
||||
z-index: 1000005;
|
||||
overflow-y: auto;
|
||||
}
|
||||
|
||||
.notification-dialog-background {
|
||||
|
||||
@@ -545,6 +545,7 @@ span.wp-media-buttons-icon:before {
|
||||
.notification-dialog {
|
||||
position: fixed;
|
||||
top: 30%;
|
||||
max-height: 70%;
|
||||
left: 50%;
|
||||
width: 450px;
|
||||
margin-left: -225px;
|
||||
@@ -553,6 +554,7 @@ span.wp-media-buttons-icon:before {
|
||||
box-shadow: 0 3px 6px rgba( 0, 0, 0, 0.3 );
|
||||
line-height: 1.5;
|
||||
z-index: 1000005;
|
||||
overflow-y: auto;
|
||||
}
|
||||
|
||||
.notification-dialog-background {
|
||||
|
||||
@@ -862,6 +862,7 @@ table.form-table td .updated p {
|
||||
|
||||
.request-filesystem-credentials-dialog .notification-dialog {
|
||||
top: 15%;
|
||||
max-height: 85%;
|
||||
}
|
||||
|
||||
.request-filesystem-credentials-dialog-content {
|
||||
@@ -1157,11 +1158,11 @@ table.form-table td .updated p {
|
||||
.request-filesystem-credentials-dialog .notification-dialog{
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
max-height: 100%;
|
||||
position: fixed;
|
||||
top: 0;
|
||||
margin: 0;
|
||||
right: 0;
|
||||
overflow-y: auto;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -862,6 +862,7 @@ table.form-table td .updated p {
|
||||
|
||||
.request-filesystem-credentials-dialog .notification-dialog {
|
||||
top: 15%;
|
||||
max-height: 85%;
|
||||
}
|
||||
|
||||
.request-filesystem-credentials-dialog-content {
|
||||
@@ -1157,11 +1158,11 @@ table.form-table td .updated p {
|
||||
.request-filesystem-credentials-dialog .notification-dialog{
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
max-height: 100%;
|
||||
position: fixed;
|
||||
top: 0;
|
||||
margin: 0;
|
||||
left: 0;
|
||||
overflow-y: auto;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Vendored
+1
-1
@@ -1 +1 @@
|
||||
input,textarea{-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box}input[type=checkbox],input[type=color],input[type=date],input[type=datetime-local],input[type=datetime],input[type=email],input[type=month],input[type=number],input[type=password],input[type=radio],input[type=search],input[type=tel],input[type=text],input[type=time],input[type=url],input[type=week],select,textarea{border:1px solid #ddd;-webkit-box-shadow:inset 0 1px 2px rgba(0,0,0,.07);box-shadow:inset 0 1px 2px rgba(0,0,0,.07);background-color:#fff;color:#32373c;outline:0;-webkit-transition:.05s border-color ease-in-out;transition:.05s border-color ease-in-out}input[type=checkbox]:focus,input[type=color]:focus,input[type=date]:focus,input[type=datetime-local]:focus,input[type=datetime]:focus,input[type=email]:focus,input[type=month]:focus,input[type=number]:focus,input[type=password]:focus,input[type=radio]:focus,input[type=search]:focus,input[type=tel]:focus,input[type=text]:focus,input[type=time]:focus,input[type=url]:focus,input[type=week]:focus,select:focus,textarea:focus{border-color:#5b9dd9;-webkit-box-shadow:0 0 2px rgba(30,140,190,.8);box-shadow:0 0 2px rgba(30,140,190,.8)}input[type=email],input[type=url]{direction:ltr}input[type=checkbox],input[type=radio]{border:1px solid #b4b9be;background:#fff;color:#555;clear:none;cursor:pointer;display:inline-block;line-height:0;height:16px;margin:-4px 0 0 4px;outline:0;padding:0!important;text-align:center;vertical-align:middle;width:16px;min-width:16px;-webkit-appearance:none;-webkit-box-shadow:inset 0 1px 2px rgba(0,0,0,.1);box-shadow:inset 0 1px 2px rgba(0,0,0,.1);-webkit-transition:.05s border-color ease-in-out;transition:.05s border-color ease-in-out}input[type=radio]:checked+label:before{color:#82878c}.wp-core-ui input[type=reset]:active,.wp-core-ui input[type=reset]:hover{color:#00a0d2}.wp-admin p input[type=checkbox],.wp-admin p input[type=radio],td>input[type=checkbox]{margin-top:0}.wp-admin p label input[type=checkbox]{margin-top:-4px}.wp-admin p label input[type=radio]{margin-top:-2px}input[type=radio]{-webkit-border-radius:50%;border-radius:50%;margin-left:4px;line-height:10px}input[type=checkbox]:checked:before,input[type=radio]:checked:before{float:right;display:inline-block;vertical-align:middle;width:16px;font:400 21px/1 dashicons;speak:none;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale}input[type=checkbox]:checked:before{content:'\f147';margin:-3px -4px 0 0;color:#1e8cbe}input[type=radio]:checked:before{content:'\2022';text-indent:-9999px;-webkit-border-radius:50px;border-radius:50px;font-size:24px;width:6px;height:6px;margin:4px;line-height:16px;background-color:#1e8cbe}@-moz-document url-prefix(){.form-table input.tog,input[type=checkbox],input[type=radio]{margin-bottom:-1px}}input[type=search]{-webkit-appearance:textfield}input[type=search]::-webkit-search-decoration{display:none}.ie8 input[type=password]{font-family:sans-serif}button,input,select,textarea{font-family:inherit;font-size:inherit;font-weight:inherit}input,select,textarea{font-size:14px;-webkit-border-radius:0;border-radius:0}textarea{overflow:auto;padding:2px 6px;line-height:1.4}.wp-admin input[type=file]{padding:3px 0}label{cursor:pointer}input,select{margin:1px;padding:3px 5px}input.code{padding-top:6px}textarea.code{line-height:1.4;padding:4px 6px 1px}input.readonly,input[readonly],textarea.readonly,textarea[readonly]{background-color:#eee}.wp-core-ui :-moz-placeholder,:-moz-placeholder{color:#a9a9a9}.form-invalid{background-color:#ffebe8!important}.form-invalid input,.form-invalid select{border-color:#c00!important}.form-input-tip{color:#666}input.disabled,input:disabled,select.disabled,select:disabled,textarea.disabled,textarea:disabled{background:rgba(255,255,255,.5);border-color:rgba(222,222,222,.75);-webkit-box-shadow:inset 0 1px 2px rgba(0,0,0,.04);box-shadow:inset 0 1px 2px rgba(0,0,0,.04);color:rgba(51,51,51,.5)}input[type=file].disabled,input[type=file]:disabled,input[type=range].disabled,input[type=range]:disabled{background:0 0;-webkit-box-shadow:none;box-shadow:none}input[type=checkbox].disabled,input[type=checkbox].disabled:checked:before,input[type=checkbox]:disabled,input[type=checkbox]:disabled:checked:before,input[type=radio].disabled,input[type=radio].disabled:checked:before,input[type=radio]:disabled,input[type=radio]:disabled:checked:before{opacity:.7}.wp-admin select{padding:2px;line-height:28px;height:28px;vertical-align:middle}.wp-admin .button-cancel{padding:0 5px;line-height:2}.meta-box-sortables select{max-width:100%}.wp-admin select[multiple]{height:auto}.submit{padding:1.5em 0;margin:5px 0;-webkit-border-bottom-right-radius:3px;border-bottom-right-radius:3px;-webkit-border-bottom-left-radius:3px;border-bottom-left-radius:3px;border:none}form p.submit a.cancel:hover{text-decoration:none}p.submit{text-align:right;max-width:100%;margin-top:20px;padding-top:10px}.textright p.submit{border:none;text-align:left}table.form-table+inputLine truncated
|
||||
input,textarea{-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box}input[type=checkbox],input[type=color],input[type=date],input[type=datetime-local],input[type=datetime],input[type=email],input[type=month],input[type=number],input[type=password],input[type=radio],input[type=search],input[type=tel],input[type=text],input[type=time],input[type=url],input[type=week],select,textarea{border:1px solid #ddd;-webkit-box-shadow:inset 0 1px 2px rgba(0,0,0,.07);box-shadow:inset 0 1px 2px rgba(0,0,0,.07);background-color:#fff;color:#32373c;outline:0;-webkit-transition:.05s border-color ease-in-out;transition:.05s border-color ease-in-out}input[type=checkbox]:focus,input[type=color]:focus,input[type=date]:focus,input[type=datetime-local]:focus,input[type=datetime]:focus,input[type=email]:focus,input[type=month]:focus,input[type=number]:focus,input[type=password]:focus,input[type=radio]:focus,input[type=search]:focus,input[type=tel]:focus,input[type=text]:focus,input[type=time]:focus,input[type=url]:focus,input[type=week]:focus,select:focus,textarea:focus{border-color:#5b9dd9;-webkit-box-shadow:0 0 2px rgba(30,140,190,.8);box-shadow:0 0 2px rgba(30,140,190,.8)}input[type=email],input[type=url]{direction:ltr}input[type=checkbox],input[type=radio]{border:1px solid #b4b9be;background:#fff;color:#555;clear:none;cursor:pointer;display:inline-block;line-height:0;height:16px;margin:-4px 0 0 4px;outline:0;padding:0!important;text-align:center;vertical-align:middle;width:16px;min-width:16px;-webkit-appearance:none;-webkit-box-shadow:inset 0 1px 2px rgba(0,0,0,.1);box-shadow:inset 0 1px 2px rgba(0,0,0,.1);-webkit-transition:.05s border-color ease-in-out;transition:.05s border-color ease-in-out}input[type=radio]:checked+label:before{color:#82878c}.wp-core-ui input[type=reset]:active,.wp-core-ui input[type=reset]:hover{color:#00a0d2}.wp-admin p input[type=checkbox],.wp-admin p input[type=radio],td>input[type=checkbox]{margin-top:0}.wp-admin p label input[type=checkbox]{margin-top:-4px}.wp-admin p label input[type=radio]{margin-top:-2px}input[type=radio]{-webkit-border-radius:50%;border-radius:50%;margin-left:4px;line-height:10px}input[type=checkbox]:checked:before,input[type=radio]:checked:before{float:right;display:inline-block;vertical-align:middle;width:16px;font:400 21px/1 dashicons;speak:none;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale}input[type=checkbox]:checked:before{content:'\f147';margin:-3px -4px 0 0;color:#1e8cbe}input[type=radio]:checked:before{content:'\2022';text-indent:-9999px;-webkit-border-radius:50px;border-radius:50px;font-size:24px;width:6px;height:6px;margin:4px;line-height:16px;background-color:#1e8cbe}@-moz-document url-prefix(){.form-table input.tog,input[type=checkbox],input[type=radio]{margin-bottom:-1px}}input[type=search]{-webkit-appearance:textfield}input[type=search]::-webkit-search-decoration{display:none}.ie8 input[type=password]{font-family:sans-serif}button,input,select,textarea{font-family:inherit;font-size:inherit;font-weight:inherit}input,select,textarea{font-size:14px;-webkit-border-radius:0;border-radius:0}textarea{overflow:auto;padding:2px 6px;line-height:1.4}.wp-admin input[type=file]{padding:3px 0}label{cursor:pointer}input,select{margin:1px;padding:3px 5px}input.code{padding-top:6px}textarea.code{line-height:1.4;padding:4px 6px 1px}input.readonly,input[readonly],textarea.readonly,textarea[readonly]{background-color:#eee}.wp-core-ui :-moz-placeholder,:-moz-placeholder{color:#a9a9a9}.form-invalid{background-color:#ffebe8!important}.form-invalid input,.form-invalid select{border-color:#c00!important}.form-input-tip{color:#666}input.disabled,input:disabled,select.disabled,select:disabled,textarea.disabled,textarea:disabled{background:rgba(255,255,255,.5);border-color:rgba(222,222,222,.75);-webkit-box-shadow:inset 0 1px 2px rgba(0,0,0,.04);box-shadow:inset 0 1px 2px rgba(0,0,0,.04);color:rgba(51,51,51,.5)}input[type=file].disabled,input[type=file]:disabled,input[type=range].disabled,input[type=range]:disabled{background:0 0;-webkit-box-shadow:none;box-shadow:none}input[type=checkbox].disabled,input[type=checkbox].disabled:checked:before,input[type=checkbox]:disabled,input[type=checkbox]:disabled:checked:before,input[type=radio].disabled,input[type=radio].disabled:checked:before,input[type=radio]:disabled,input[type=radio]:disabled:checked:before{opacity:.7}.wp-admin select{padding:2px;line-height:28px;height:28px;vertical-align:middle}.wp-admin .button-cancel{padding:0 5px;line-height:2}.meta-box-sortables select{max-width:100%}.wp-admin select[multiple]{height:auto}.submit{padding:1.5em 0;margin:5px 0;-webkit-border-bottom-right-radius:3px;border-bottom-right-radius:3px;-webkit-border-bottom-left-radius:3px;border-bottom-left-radius:3px;border:none}form p.submit a.cancel:hover{text-decoration:none}p.submit{text-align:right;max-width:100%;margin-top:20px;padding-top:10px}.textright p.submit{border:none;text-align:left}table.form-table+inputLine truncated
|
||||
Vendored
+1
-1
@@ -1 +1 @@
|
||||
input,textarea{-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box}input[type=checkbox],input[type=color],input[type=date],input[type=datetime-local],input[type=datetime],input[type=email],input[type=month],input[type=number],input[type=password],input[type=radio],input[type=search],input[type=tel],input[type=text],input[type=time],input[type=url],input[type=week],select,textarea{border:1px solid #ddd;-webkit-box-shadow:inset 0 1px 2px rgba(0,0,0,.07);box-shadow:inset 0 1px 2px rgba(0,0,0,.07);background-color:#fff;color:#32373c;outline:0;-webkit-transition:.05s border-color ease-in-out;transition:.05s border-color ease-in-out}input[type=checkbox]:focus,input[type=color]:focus,input[type=date]:focus,input[type=datetime-local]:focus,input[type=datetime]:focus,input[type=email]:focus,input[type=month]:focus,input[type=number]:focus,input[type=password]:focus,input[type=radio]:focus,input[type=search]:focus,input[type=tel]:focus,input[type=text]:focus,input[type=time]:focus,input[type=url]:focus,input[type=week]:focus,select:focus,textarea:focus{border-color:#5b9dd9;-webkit-box-shadow:0 0 2px rgba(30,140,190,.8);box-shadow:0 0 2px rgba(30,140,190,.8)}input[type=email],input[type=url]{direction:ltr}input[type=checkbox],input[type=radio]{border:1px solid #b4b9be;background:#fff;color:#555;clear:none;cursor:pointer;display:inline-block;line-height:0;height:16px;margin:-4px 4px 0 0;outline:0;padding:0!important;text-align:center;vertical-align:middle;width:16px;min-width:16px;-webkit-appearance:none;-webkit-box-shadow:inset 0 1px 2px rgba(0,0,0,.1);box-shadow:inset 0 1px 2px rgba(0,0,0,.1);-webkit-transition:.05s border-color ease-in-out;transition:.05s border-color ease-in-out}input[type=radio]:checked+label:before{color:#82878c}.wp-core-ui input[type=reset]:active,.wp-core-ui input[type=reset]:hover{color:#00a0d2}.wp-admin p input[type=checkbox],.wp-admin p input[type=radio],td>input[type=checkbox]{margin-top:0}.wp-admin p label input[type=checkbox]{margin-top:-4px}.wp-admin p label input[type=radio]{margin-top:-2px}input[type=radio]{-webkit-border-radius:50%;border-radius:50%;margin-right:4px;line-height:10px}input[type=checkbox]:checked:before,input[type=radio]:checked:before{float:left;display:inline-block;vertical-align:middle;width:16px;font:400 21px/1 dashicons;speak:none;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale}input[type=checkbox]:checked:before{content:'\f147';margin:-3px 0 0 -4px;color:#1e8cbe}input[type=radio]:checked:before{content:'\2022';text-indent:-9999px;-webkit-border-radius:50px;border-radius:50px;font-size:24px;width:6px;height:6px;margin:4px;line-height:16px;background-color:#1e8cbe}@-moz-document url-prefix(){.form-table input.tog,input[type=checkbox],input[type=radio]{margin-bottom:-1px}}input[type=search]{-webkit-appearance:textfield}input[type=search]::-webkit-search-decoration{display:none}.ie8 input[type=password]{font-family:sans-serif}button,input,select,textarea{font-family:inherit;font-size:inherit;font-weight:inherit}input,select,textarea{font-size:14px;-webkit-border-radius:0;border-radius:0}textarea{overflow:auto;padding:2px 6px;line-height:1.4}.wp-admin input[type=file]{padding:3px 0}label{cursor:pointer}input,select{margin:1px;padding:3px 5px}input.code{padding-top:6px}textarea.code{line-height:1.4;padding:4px 6px 1px}input.readonly,input[readonly],textarea.readonly,textarea[readonly]{background-color:#eee}.wp-core-ui :-moz-placeholder,:-moz-placeholder{color:#a9a9a9}.form-invalid{background-color:#ffebe8!important}.form-invalid input,.form-invalid select{border-color:#c00!important}.form-input-tip{color:#666}input.disabled,input:disabled,select.disabled,select:disabled,textarea.disabled,textarea:disabled{background:rgba(255,255,255,.5);border-color:rgba(222,222,222,.75);-webkit-box-shadow:inset 0 1px 2px rgba(0,0,0,.04);box-shadow:inset 0 1px 2px rgba(0,0,0,.04);color:rgba(51,51,51,.5)}input[type=file].disabled,input[type=file]:disabled,input[type=range].disabled,input[type=range]:disabled{background:0 0;-webkit-box-shadow:none;box-shadow:none}input[type=checkbox].disabled,input[type=checkbox].disabled:checked:before,input[type=checkbox]:disabled,input[type=checkbox]:disabled:checked:before,input[type=radio].disabled,input[type=radio].disabled:checked:before,input[type=radio]:disabled,input[type=radio]:disabled:checked:before{opacity:.7}.wp-admin select{padding:2px;line-height:28px;height:28px;vertical-align:middle}.wp-admin .button-cancel{padding:0 5px;line-height:2}.meta-box-sortables select{max-width:100%}.wp-admin select[multiple]{height:auto}.submit{padding:1.5em 0;margin:5px 0;-webkit-border-bottom-left-radius:3px;border-bottom-left-radius:3px;-webkit-border-bottom-right-radius:3px;border-bottom-right-radius:3px;border:none}form p.submit a.cancel:hover{text-decoration:none}p.submit{text-align:left;max-width:100%;margin-top:20px;padding-top:10px}.textright p.submit{border:none;text-align:right}table.form-table+inputLine truncated
|
||||
input,textarea{-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box}input[type=checkbox],input[type=color],input[type=date],input[type=datetime-local],input[type=datetime],input[type=email],input[type=month],input[type=number],input[type=password],input[type=radio],input[type=search],input[type=tel],input[type=text],input[type=time],input[type=url],input[type=week],select,textarea{border:1px solid #ddd;-webkit-box-shadow:inset 0 1px 2px rgba(0,0,0,.07);box-shadow:inset 0 1px 2px rgba(0,0,0,.07);background-color:#fff;color:#32373c;outline:0;-webkit-transition:.05s border-color ease-in-out;transition:.05s border-color ease-in-out}input[type=checkbox]:focus,input[type=color]:focus,input[type=date]:focus,input[type=datetime-local]:focus,input[type=datetime]:focus,input[type=email]:focus,input[type=month]:focus,input[type=number]:focus,input[type=password]:focus,input[type=radio]:focus,input[type=search]:focus,input[type=tel]:focus,input[type=text]:focus,input[type=time]:focus,input[type=url]:focus,input[type=week]:focus,select:focus,textarea:focus{border-color:#5b9dd9;-webkit-box-shadow:0 0 2px rgba(30,140,190,.8);box-shadow:0 0 2px rgba(30,140,190,.8)}input[type=email],input[type=url]{direction:ltr}input[type=checkbox],input[type=radio]{border:1px solid #b4b9be;background:#fff;color:#555;clear:none;cursor:pointer;display:inline-block;line-height:0;height:16px;margin:-4px 4px 0 0;outline:0;padding:0!important;text-align:center;vertical-align:middle;width:16px;min-width:16px;-webkit-appearance:none;-webkit-box-shadow:inset 0 1px 2px rgba(0,0,0,.1);box-shadow:inset 0 1px 2px rgba(0,0,0,.1);-webkit-transition:.05s border-color ease-in-out;transition:.05s border-color ease-in-out}input[type=radio]:checked+label:before{color:#82878c}.wp-core-ui input[type=reset]:active,.wp-core-ui input[type=reset]:hover{color:#00a0d2}.wp-admin p input[type=checkbox],.wp-admin p input[type=radio],td>input[type=checkbox]{margin-top:0}.wp-admin p label input[type=checkbox]{margin-top:-4px}.wp-admin p label input[type=radio]{margin-top:-2px}input[type=radio]{-webkit-border-radius:50%;border-radius:50%;margin-right:4px;line-height:10px}input[type=checkbox]:checked:before,input[type=radio]:checked:before{float:left;display:inline-block;vertical-align:middle;width:16px;font:400 21px/1 dashicons;speak:none;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale}input[type=checkbox]:checked:before{content:'\f147';margin:-3px 0 0 -4px;color:#1e8cbe}input[type=radio]:checked:before{content:'\2022';text-indent:-9999px;-webkit-border-radius:50px;border-radius:50px;font-size:24px;width:6px;height:6px;margin:4px;line-height:16px;background-color:#1e8cbe}@-moz-document url-prefix(){.form-table input.tog,input[type=checkbox],input[type=radio]{margin-bottom:-1px}}input[type=search]{-webkit-appearance:textfield}input[type=search]::-webkit-search-decoration{display:none}.ie8 input[type=password]{font-family:sans-serif}button,input,select,textarea{font-family:inherit;font-size:inherit;font-weight:inherit}input,select,textarea{font-size:14px;-webkit-border-radius:0;border-radius:0}textarea{overflow:auto;padding:2px 6px;line-height:1.4}.wp-admin input[type=file]{padding:3px 0}label{cursor:pointer}input,select{margin:1px;padding:3px 5px}input.code{padding-top:6px}textarea.code{line-height:1.4;padding:4px 6px 1px}input.readonly,input[readonly],textarea.readonly,textarea[readonly]{background-color:#eee}.wp-core-ui :-moz-placeholder,:-moz-placeholder{color:#a9a9a9}.form-invalid{background-color:#ffebe8!important}.form-invalid input,.form-invalid select{border-color:#c00!important}.form-input-tip{color:#666}input.disabled,input:disabled,select.disabled,select:disabled,textarea.disabled,textarea:disabled{background:rgba(255,255,255,.5);border-color:rgba(222,222,222,.75);-webkit-box-shadow:inset 0 1px 2px rgba(0,0,0,.04);box-shadow:inset 0 1px 2px rgba(0,0,0,.04);color:rgba(51,51,51,.5)}input[type=file].disabled,input[type=file]:disabled,input[type=range].disabled,input[type=range]:disabled{background:0 0;-webkit-box-shadow:none;box-shadow:none}input[type=checkbox].disabled,input[type=checkbox].disabled:checked:before,input[type=checkbox]:disabled,input[type=checkbox]:disabled:checked:before,input[type=radio].disabled,input[type=radio].disabled:checked:before,input[type=radio]:disabled,input[type=radio]:disabled:checked:before{opacity:.7}.wp-admin select{padding:2px;line-height:28px;height:28px;vertical-align:middle}.wp-admin .button-cancel{padding:0 5px;line-height:2}.meta-box-sortables select{max-width:100%}.wp-admin select[multiple]{height:auto}.submit{padding:1.5em 0;margin:5px 0;-webkit-border-bottom-left-radius:3px;border-bottom-left-radius:3px;-webkit-border-bottom-right-radius:3px;border-bottom-right-radius:3px;border:none}form p.submit a.cancel:hover{text-decoration:none}p.submit{text-align:left;max-width:100%;margin-top:20px;padding-top:10px}.textright p.submit{border:none;text-align:right}table.form-table+inputLine truncated
|
||||
@@ -846,6 +846,7 @@ input[type="search"].categories-search,
|
||||
border-bottom: 1px solid #e5e5e5;
|
||||
font-size: 14px;
|
||||
-webkit-appearance: none;
|
||||
-moz-appearance: none;
|
||||
appearance: none;
|
||||
}
|
||||
|
||||
|
||||
Vendored
+1
-1
@@ -1 +1 @@
|
||||
html{font-family:sans-serif;-ms-text-size-adjust:100%;-webkit-text-size-adjust:100%}body{margin:0}*,:after,:before{-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box}@media only screen and (-webkit-min-device-pixel-ratio:1.5),only screen and (min-resolution:144dpi){*,:after,:before{-webkit-font-smoothing:antialiased}}article,aside,details,figcaption,figure,footer,header,hgroup,main,nav,section,summary{display:block}audio,canvas,progress,video{display:inline-block;vertical-align:baseline}audio:not([controls]){display:none;height:0}[hidden],template{display:none}a{background:0 0}a:active,a:hover{outline:0}abbr[title]{border-bottom:1px dotted}dfn{font-style:italic}h1{font-size:2em;margin:.67em 0}mark{background:#ff0;color:#000}small{font-size:80%}sub,sup{font-size:75%;line-height:0;position:relative;vertical-align:baseline}sup{top:-.5em}sub{bottom:-.25em}img{border:0}svg:not(:root){overflow:hidden}figure{margin:1em 40px}hr{-webkit-box-sizing:content-box;-moz-box-sizing:content-box;box-sizing:content-box;height:0}pre{overflow:auto}code,kbd,pre,samp{font-family:monospace,monospace;font-size:1em}button,input,optgroup,select,textarea{color:inherit;font:inherit;margin:0}button{overflow:visible}button,select{text-transform:none}button,html input[type=button],input[type=reset],input[type=submit]{-webkit-appearance:button;cursor:pointer}button[disabled],html input[disabled]{cursor:default}input[type=checkbox],input[type=radio]{-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box;padding:0}input[type=number]::-webkit-inner-spin-button,input[type=number]::-webkit-outer-spin-button{height:auto}input[type=search]{-webkit-appearance:textfield;-webkit-box-sizing:content-box;-moz-box-sizing:content-box;box-sizing:content-box}input[type=search]::-webkit-search-cancel-button,input[type=search]::-webkit-search-decoration{-webkit-appearance:none}fieldset{border:0;margin:0;padding:0}legend{border:0;padding:0}optgroup{font-weight:700}table{border-collapse:collapse;border-spacing:0}td,th{padding:0}.clearfix:after,.clearfix:before{content:"";display:table}.clearfix:after{clear:both}.hide-if-js{display:none}.screen-reader-text{position:absolute;margin:-1px;padding:0;height:1px;width:1px;overflow:hidden;clip:rect(0 0 0 0);border:0}body,button,input,select,textarea{color:#404040;font-family:"Open Sans",Helvetica,Arial,sans-serif;font-size:20px;font-weight:400;line-height:1.6}h1,h2,h3,h4,h5,h6{clear:both}p{margin-bottom:1.5em}b,strong{font-weight:700}.button-subtle,.scan-submit{display:inline-block;margin:0;padding:0 10px 1px;border-width:1px;border-style:solid;-webkit-border-radius:3px;border-radius:3px;font-size:13px;line-height:2;text-decoration:none;white-space:nowrap;cursor:pointer;-webkit-appearance:none}.button-subtle{background:0 0;border:0;color:#0073aa}.button-subtle:visited{color:#0073aa}.button-subtle:active,.button-subtle:focus,.button-subtle:hover,.edit-post-link:active,.edit-post-link:focus,.edit-post-link:hover{color:#00a0d2}.button-subtle:active,.button-subtle:focus,.edit-post-link:active,.edit-post-link:focus{outline:0;text-decoration:underline}.preview-button{margin-left:5px}.button-reset{margin:0;padding:0;border:0;background:0 0;cursor:pointer;-webkit-appearance:none}.button-reset:focus{outline:0}.button-link{margin:0;padding:0;border:0;background:0 0;color:#0073aa;cursor:pointer;-webkit-appearance:none}.button-link:active,.button-link:focus,.button-link:hover{color:#00a0d2;text-decoration:underline}button,input,select,textarea{font-size:100%;margin:0;vertical-align:baseline}[type=checkbox],[type=radio]{padding:0}[type=search]{-webkit-appearance:textfield;-webkit-box-sizing:content-box;-moz-box-sizing:content-box;box-sizing:content-box}[type=search]::-webkit-search-decoration{-webkit-appearance:none}button::-moz-focus-inner,input::-moz-focus-inner{border:0;padding:0}[type=email],[type=password],[type=search],[type=text],[type=url],textarea{padding:.4em .75em;color:#32373c;border:1px solid #ccc}[type=email]:focus,[type=password]:focus,[type=search]:focus,[type=text]:focus,[type=url]:focus,textarea:focus{color:#32373c;outline:0}textarea{overflow:auto;padding-right:3px;vertical-align:top}a,a:visited{color:#0073aa}a:active,a:focus,a:hover{color:#00a0d2}ol,ul{margin:0 3em 1.5em 0}ul{list-style:disc}ol{list-style:decimal}li>ol,li>ul{margin-bottom:0;margin-right:1.5em}dt{font-weight:700}dd{margin:0 1.5em 1.5em}#post-formats-select br{display:none}.post-format{width:1px;height:1px;position:absolute;top:-9999px}.lt-ie9 .post-format{margin:17px 13px 0 12px;position:static;top:auto;float:right;width:16px;height:16px}.post-format-icon{position:relative;display:block;padding:13px 13px 14px 2px;cursor:pointer}.post-format-icon:after,.post-format-icon:before{content:"";display:inline-block;width:20px;height:20px;margin-left:10px;font-size:20px;line-height:1;font-family:dashicons;text-decoration:inherit;color:#9ea7af;font-weight:400;font-style:normal;vertical-align:top;text-aliLine truncated
|
||||
html{font-family:sans-serif;-ms-text-size-adjust:100%;-webkit-text-size-adjust:100%}body{margin:0}*,:after,:before{-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box}@media only screen and (-webkit-min-device-pixel-ratio:1.5),only screen and (min-resolution:144dpi){*,:after,:before{-webkit-font-smoothing:antialiased}}article,aside,details,figcaption,figure,footer,header,hgroup,main,nav,section,summary{display:block}audio,canvas,progress,video{display:inline-block;vertical-align:baseline}audio:not([controls]){display:none;height:0}[hidden],template{display:none}a{background:0 0}a:active,a:hover{outline:0}abbr[title]{border-bottom:1px dotted}dfn{font-style:italic}h1{font-size:2em;margin:.67em 0}mark{background:#ff0;color:#000}small{font-size:80%}sub,sup{font-size:75%;line-height:0;position:relative;vertical-align:baseline}sup{top:-.5em}sub{bottom:-.25em}img{border:0}svg:not(:root){overflow:hidden}figure{margin:1em 40px}hr{-webkit-box-sizing:content-box;-moz-box-sizing:content-box;box-sizing:content-box;height:0}pre{overflow:auto}code,kbd,pre,samp{font-family:monospace,monospace;font-size:1em}button,input,optgroup,select,textarea{color:inherit;font:inherit;margin:0}button{overflow:visible}button,select{text-transform:none}button,html input[type=button],input[type=reset],input[type=submit]{-webkit-appearance:button;cursor:pointer}button[disabled],html input[disabled]{cursor:default}input[type=checkbox],input[type=radio]{-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box;padding:0}input[type=number]::-webkit-inner-spin-button,input[type=number]::-webkit-outer-spin-button{height:auto}input[type=search]{-webkit-appearance:textfield;-webkit-box-sizing:content-box;-moz-box-sizing:content-box;box-sizing:content-box}input[type=search]::-webkit-search-cancel-button,input[type=search]::-webkit-search-decoration{-webkit-appearance:none}fieldset{border:0;margin:0;padding:0}legend{border:0;padding:0}optgroup{font-weight:700}table{border-collapse:collapse;border-spacing:0}td,th{padding:0}.clearfix:after,.clearfix:before{content:"";display:table}.clearfix:after{clear:both}.hide-if-js{display:none}.screen-reader-text{position:absolute;margin:-1px;padding:0;height:1px;width:1px;overflow:hidden;clip:rect(0 0 0 0);border:0}body,button,input,select,textarea{color:#404040;font-family:"Open Sans",Helvetica,Arial,sans-serif;font-size:20px;font-weight:400;line-height:1.6}h1,h2,h3,h4,h5,h6{clear:both}p{margin-bottom:1.5em}b,strong{font-weight:700}.button-subtle,.scan-submit{display:inline-block;margin:0;padding:0 10px 1px;border-width:1px;border-style:solid;-webkit-border-radius:3px;border-radius:3px;font-size:13px;line-height:2;text-decoration:none;white-space:nowrap;cursor:pointer;-webkit-appearance:none}.button-subtle{background:0 0;border:0;color:#0073aa}.button-subtle:visited{color:#0073aa}.button-subtle:active,.button-subtle:focus,.button-subtle:hover,.edit-post-link:active,.edit-post-link:focus,.edit-post-link:hover{color:#00a0d2}.button-subtle:active,.button-subtle:focus,.edit-post-link:active,.edit-post-link:focus{outline:0;text-decoration:underline}.preview-button{margin-left:5px}.button-reset{margin:0;padding:0;border:0;background:0 0;cursor:pointer;-webkit-appearance:none}.button-reset:focus{outline:0}.button-link{margin:0;padding:0;border:0;background:0 0;color:#0073aa;cursor:pointer;-webkit-appearance:none}.button-link:active,.button-link:focus,.button-link:hover{color:#00a0d2;text-decoration:underline}button,input,select,textarea{font-size:100%;margin:0;vertical-align:baseline}[type=checkbox],[type=radio]{padding:0}[type=search]{-webkit-appearance:textfield;-webkit-box-sizing:content-box;-moz-box-sizing:content-box;box-sizing:content-box}[type=search]::-webkit-search-decoration{-webkit-appearance:none}button::-moz-focus-inner,input::-moz-focus-inner{border:0;padding:0}[type=email],[type=password],[type=search],[type=text],[type=url],textarea{padding:.4em .75em;color:#32373c;border:1px solid #ccc}[type=email]:focus,[type=password]:focus,[type=search]:focus,[type=text]:focus,[type=url]:focus,textarea:focus{color:#32373c;outline:0}textarea{overflow:auto;padding-right:3px;vertical-align:top}a,a:visited{color:#0073aa}a:active,a:focus,a:hover{color:#00a0d2}ol,ul{margin:0 3em 1.5em 0}ul{list-style:disc}ol{list-style:decimal}li>ol,li>ul{margin-bottom:0;margin-right:1.5em}dt{font-weight:700}dd{margin:0 1.5em 1.5em}#post-formats-select br{display:none}.post-format{width:1px;height:1px;position:absolute;top:-9999px}.lt-ie9 .post-format{margin:17px 13px 0 12px;position:static;top:auto;float:right;width:16px;height:16px}.post-format-icon{position:relative;display:block;padding:13px 13px 14px 2px;cursor:pointer}.post-format-icon:after,.post-format-icon:before{content:"";display:inline-block;width:20px;height:20px;margin-left:10px;font-size:20px;line-height:1;font-family:dashicons;text-decoration:inherit;color:#9ea7af;font-weight:400;font-style:normal;vertical-align:top;text-aliLine truncated
|
||||
@@ -846,6 +846,7 @@ input[type="search"].categories-search,
|
||||
border-bottom: 1px solid #e5e5e5;
|
||||
font-size: 14px;
|
||||
-webkit-appearance: none;
|
||||
-moz-appearance: none;
|
||||
appearance: none;
|
||||
}
|
||||
|
||||
|
||||
Vendored
+1
-1
@@ -1 +1 @@
|
||||
html{font-family:sans-serif;-ms-text-size-adjust:100%;-webkit-text-size-adjust:100%}body{margin:0}*,:after,:before{-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box}@media only screen and (-webkit-min-device-pixel-ratio:1.5),only screen and (min-resolution:144dpi){*,:after,:before{-webkit-font-smoothing:antialiased}}article,aside,details,figcaption,figure,footer,header,hgroup,main,nav,section,summary{display:block}audio,canvas,progress,video{display:inline-block;vertical-align:baseline}audio:not([controls]){display:none;height:0}[hidden],template{display:none}a{background:0 0}a:active,a:hover{outline:0}abbr[title]{border-bottom:1px dotted}dfn{font-style:italic}h1{font-size:2em;margin:.67em 0}mark{background:#ff0;color:#000}small{font-size:80%}sub,sup{font-size:75%;line-height:0;position:relative;vertical-align:baseline}sup{top:-.5em}sub{bottom:-.25em}img{border:0}svg:not(:root){overflow:hidden}figure{margin:1em 40px}hr{-webkit-box-sizing:content-box;-moz-box-sizing:content-box;box-sizing:content-box;height:0}pre{overflow:auto}code,kbd,pre,samp{font-family:monospace,monospace;font-size:1em}button,input,optgroup,select,textarea{color:inherit;font:inherit;margin:0}button{overflow:visible}button,select{text-transform:none}button,html input[type=button],input[type=reset],input[type=submit]{-webkit-appearance:button;cursor:pointer}button[disabled],html input[disabled]{cursor:default}input[type=checkbox],input[type=radio]{-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box;padding:0}input[type=number]::-webkit-inner-spin-button,input[type=number]::-webkit-outer-spin-button{height:auto}input[type=search]{-webkit-appearance:textfield;-webkit-box-sizing:content-box;-moz-box-sizing:content-box;box-sizing:content-box}input[type=search]::-webkit-search-cancel-button,input[type=search]::-webkit-search-decoration{-webkit-appearance:none}fieldset{border:0;margin:0;padding:0}legend{border:0;padding:0}optgroup{font-weight:700}table{border-collapse:collapse;border-spacing:0}td,th{padding:0}.clearfix:after,.clearfix:before{content:"";display:table}.clearfix:after{clear:both}.hide-if-js{display:none}.screen-reader-text{position:absolute;margin:-1px;padding:0;height:1px;width:1px;overflow:hidden;clip:rect(0 0 0 0);border:0}body,button,input,select,textarea{color:#404040;font-family:"Open Sans",Helvetica,Arial,sans-serif;font-size:20px;font-weight:400;line-height:1.6}h1,h2,h3,h4,h5,h6{clear:both}p{margin-bottom:1.5em}b,strong{font-weight:700}.button-subtle,.scan-submit{display:inline-block;margin:0;padding:0 10px 1px;border-width:1px;border-style:solid;-webkit-border-radius:3px;border-radius:3px;font-size:13px;line-height:2;text-decoration:none;white-space:nowrap;cursor:pointer;-webkit-appearance:none}.button-subtle{background:0 0;border:0;color:#0073aa}.button-subtle:visited{color:#0073aa}.button-subtle:active,.button-subtle:focus,.button-subtle:hover,.edit-post-link:active,.edit-post-link:focus,.edit-post-link:hover{color:#00a0d2}.button-subtle:active,.button-subtle:focus,.edit-post-link:active,.edit-post-link:focus{outline:0;text-decoration:underline}.preview-button{margin-right:5px}.button-reset{margin:0;padding:0;border:0;background:0 0;cursor:pointer;-webkit-appearance:none}.button-reset:focus{outline:0}.button-link{margin:0;padding:0;border:0;background:0 0;color:#0073aa;cursor:pointer;-webkit-appearance:none}.button-link:active,.button-link:focus,.button-link:hover{color:#00a0d2;text-decoration:underline}button,input,select,textarea{font-size:100%;margin:0;vertical-align:baseline}[type=checkbox],[type=radio]{padding:0}[type=search]{-webkit-appearance:textfield;-webkit-box-sizing:content-box;-moz-box-sizing:content-box;box-sizing:content-box}[type=search]::-webkit-search-decoration{-webkit-appearance:none}button::-moz-focus-inner,input::-moz-focus-inner{border:0;padding:0}[type=email],[type=password],[type=search],[type=text],[type=url],textarea{padding:.4em .75em;color:#32373c;border:1px solid #ccc}[type=email]:focus,[type=password]:focus,[type=search]:focus,[type=text]:focus,[type=url]:focus,textarea:focus{color:#32373c;outline:0}textarea{overflow:auto;padding-left:3px;vertical-align:top}a,a:visited{color:#0073aa}a:active,a:focus,a:hover{color:#00a0d2}ol,ul{margin:0 0 1.5em 3em}ul{list-style:disc}ol{list-style:decimal}li>ol,li>ul{margin-bottom:0;margin-left:1.5em}dt{font-weight:700}dd{margin:0 1.5em 1.5em}#post-formats-select br{display:none}.post-format{width:1px;height:1px;position:absolute;top:-9999px}.lt-ie9 .post-format{margin:17px 12px 0 13px;position:static;top:auto;float:left;width:16px;height:16px}.post-format-icon{position:relative;display:block;padding:13px 2px 14px 13px;cursor:pointer}.post-format-icon:after,.post-format-icon:before{content:"";display:inline-block;width:20px;height:20px;margin-right:10px;font-size:20px;line-height:1;font-family:dashicons;text-decoration:inherit;color:#9ea7af;font-weight:400;font-style:normal;vertical-align:top;text-aligLine truncated
|
||||
html{font-family:sans-serif;-ms-text-size-adjust:100%;-webkit-text-size-adjust:100%}body{margin:0}*,:after,:before{-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box}@media only screen and (-webkit-min-device-pixel-ratio:1.5),only screen and (min-resolution:144dpi){*,:after,:before{-webkit-font-smoothing:antialiased}}article,aside,details,figcaption,figure,footer,header,hgroup,main,nav,section,summary{display:block}audio,canvas,progress,video{display:inline-block;vertical-align:baseline}audio:not([controls]){display:none;height:0}[hidden],template{display:none}a{background:0 0}a:active,a:hover{outline:0}abbr[title]{border-bottom:1px dotted}dfn{font-style:italic}h1{font-size:2em;margin:.67em 0}mark{background:#ff0;color:#000}small{font-size:80%}sub,sup{font-size:75%;line-height:0;position:relative;vertical-align:baseline}sup{top:-.5em}sub{bottom:-.25em}img{border:0}svg:not(:root){overflow:hidden}figure{margin:1em 40px}hr{-webkit-box-sizing:content-box;-moz-box-sizing:content-box;box-sizing:content-box;height:0}pre{overflow:auto}code,kbd,pre,samp{font-family:monospace,monospace;font-size:1em}button,input,optgroup,select,textarea{color:inherit;font:inherit;margin:0}button{overflow:visible}button,select{text-transform:none}button,html input[type=button],input[type=reset],input[type=submit]{-webkit-appearance:button;cursor:pointer}button[disabled],html input[disabled]{cursor:default}input[type=checkbox],input[type=radio]{-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box;padding:0}input[type=number]::-webkit-inner-spin-button,input[type=number]::-webkit-outer-spin-button{height:auto}input[type=search]{-webkit-appearance:textfield;-webkit-box-sizing:content-box;-moz-box-sizing:content-box;box-sizing:content-box}input[type=search]::-webkit-search-cancel-button,input[type=search]::-webkit-search-decoration{-webkit-appearance:none}fieldset{border:0;margin:0;padding:0}legend{border:0;padding:0}optgroup{font-weight:700}table{border-collapse:collapse;border-spacing:0}td,th{padding:0}.clearfix:after,.clearfix:before{content:"";display:table}.clearfix:after{clear:both}.hide-if-js{display:none}.screen-reader-text{position:absolute;margin:-1px;padding:0;height:1px;width:1px;overflow:hidden;clip:rect(0 0 0 0);border:0}body,button,input,select,textarea{color:#404040;font-family:"Open Sans",Helvetica,Arial,sans-serif;font-size:20px;font-weight:400;line-height:1.6}h1,h2,h3,h4,h5,h6{clear:both}p{margin-bottom:1.5em}b,strong{font-weight:700}.button-subtle,.scan-submit{display:inline-block;margin:0;padding:0 10px 1px;border-width:1px;border-style:solid;-webkit-border-radius:3px;border-radius:3px;font-size:13px;line-height:2;text-decoration:none;white-space:nowrap;cursor:pointer;-webkit-appearance:none}.button-subtle{background:0 0;border:0;color:#0073aa}.button-subtle:visited{color:#0073aa}.button-subtle:active,.button-subtle:focus,.button-subtle:hover,.edit-post-link:active,.edit-post-link:focus,.edit-post-link:hover{color:#00a0d2}.button-subtle:active,.button-subtle:focus,.edit-post-link:active,.edit-post-link:focus{outline:0;text-decoration:underline}.preview-button{margin-right:5px}.button-reset{margin:0;padding:0;border:0;background:0 0;cursor:pointer;-webkit-appearance:none}.button-reset:focus{outline:0}.button-link{margin:0;padding:0;border:0;background:0 0;color:#0073aa;cursor:pointer;-webkit-appearance:none}.button-link:active,.button-link:focus,.button-link:hover{color:#00a0d2;text-decoration:underline}button,input,select,textarea{font-size:100%;margin:0;vertical-align:baseline}[type=checkbox],[type=radio]{padding:0}[type=search]{-webkit-appearance:textfield;-webkit-box-sizing:content-box;-moz-box-sizing:content-box;box-sizing:content-box}[type=search]::-webkit-search-decoration{-webkit-appearance:none}button::-moz-focus-inner,input::-moz-focus-inner{border:0;padding:0}[type=email],[type=password],[type=search],[type=text],[type=url],textarea{padding:.4em .75em;color:#32373c;border:1px solid #ccc}[type=email]:focus,[type=password]:focus,[type=search]:focus,[type=text]:focus,[type=url]:focus,textarea:focus{color:#32373c;outline:0}textarea{overflow:auto;padding-left:3px;vertical-align:top}a,a:visited{color:#0073aa}a:active,a:focus,a:hover{color:#00a0d2}ol,ul{margin:0 0 1.5em 3em}ul{list-style:disc}ol{list-style:decimal}li>ol,li>ul{margin-bottom:0;margin-left:1.5em}dt{font-weight:700}dd{margin:0 1.5em 1.5em}#post-formats-select br{display:none}.post-format{width:1px;height:1px;position:absolute;top:-9999px}.lt-ie9 .post-format{margin:17px 12px 0 13px;position:static;top:auto;float:left;width:16px;height:16px}.post-format-icon{position:relative;display:block;padding:13px 2px 14px 13px;cursor:pointer}.post-format-icon:after,.post-format-icon:before{content:"";display:inline-block;width:20px;height:20px;margin-right:10px;font-size:20px;line-height:1;font-family:dashicons;text-decoration:inherit;color:#9ea7af;font-weight:400;font-style:normal;vertical-align:top;text-aligLine truncated
|
||||
@@ -350,6 +350,10 @@ div#widgets-right .closed .widgets-sortables {
|
||||
display: none;
|
||||
}
|
||||
|
||||
.js .widgets-holder-wrap.closed .widget.ui-sortable-helper {
|
||||
display: block;
|
||||
}
|
||||
|
||||
/* Hide Widget Settings by Default */
|
||||
.widget-inside,
|
||||
.widget-description {
|
||||
@@ -506,6 +510,10 @@ div#widgets-right .widget-top:hover,
|
||||
cursor: pointer;
|
||||
}
|
||||
|
||||
#available-widgets .widget.ui-draggable-dragging .widget-top {
|
||||
cursor: move;
|
||||
}
|
||||
|
||||
/* =Media Queries
|
||||
-------------------------------------------------------------- */
|
||||
|
||||
|
||||
@@ -350,6 +350,10 @@ div#widgets-right .closed .widgets-sortables {
|
||||
display: none;
|
||||
}
|
||||
|
||||
.js .widgets-holder-wrap.closed .widget.ui-sortable-helper {
|
||||
display: block;
|
||||
}
|
||||
|
||||
/* Hide Widget Settings by Default */
|
||||
.widget-inside,
|
||||
.widget-description {
|
||||
@@ -506,6 +510,10 @@ div#widgets-right .widget-top:hover,
|
||||
cursor: pointer;
|
||||
}
|
||||
|
||||
#available-widgets .widget.ui-draggable-dragging .widget-top {
|
||||
cursor: move;
|
||||
}
|
||||
|
||||
/* =Media Queries
|
||||
-------------------------------------------------------------- */
|
||||
|
||||
|
||||
Vendored
+1
-1
@@ -5,4 +5,4 @@
|
||||
* Copyright jQuery Foundation and other contributors
|
||||
* Released under the MIT license.
|
||||
* http://jquery.org/license
|
||||
*/.ui-draggable-handle,.ui-sortable-handle{-ms-touch-action:none;touch-action:none}.accordion-section{border-bottom:1px solid #dfdfdf;margin:0}.accordion-section.open .accordion-section-content,.no-js .accordion-section .accordion-section-content{display:block}.accordion-section.open:hover{border-bottom-color:#dfdfdf}.accordion-section-content{display:none;padding:10px 20px 15px;overflow:hidden;background:#fff}.accordion-section-title{margin:0;padding:12px 15px 15px;position:relative;border-right:1px solid #dfdfdf;border-left:1px solid #dfdfdf;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}.js .accordion-section-title{cursor:pointer}.js .accordion-section-title:after{position:absolute;top:12px;left:10px;z-index:1}.accordion-section-title:focus{outline:0}.accordion-section-title:focus:after,.accordion-section-title:hover:after{border-color:#a0a5aa transparent}.cannot-expand .accordion-section-title{cursor:auto}.cannot-expand .accordion-section-title:after{display:none}.control-section .accordion-section-title{border-right:none;border-left:none;padding:10px 14px 11px 10px;line-height:21px;background:#fff}.control-section .accordion-section-title:after{top:11px}.js .control-section .accordion-section-title:focus,.js .control-section .accordion-section-title:hover,.js .control-section.open .accordion-section-title,.js .control-section:hover .accordion-section-title{color:#23282d;background:#f5f5f5}.control-section.open .accordion-section-title{border-bottom:1px solid #dfdfdf}@media only screen and (min-width:769px){#col-left{width:35%}#col-right{width:65%}}@media only screen and (max-width:860px){#col-left{width:35%}#col-right{width:65%}}@media only screen and (min-width:980px){#col-left{width:35%}#col-right{width:65%}}@media only screen and (max-width:768px){#col-left,#col-right{width:100%}}@media print,(-webkit-min-device-pixel-ratio:1.25),(min-resolution:120dpi){div.star-holder,div.star-holder .star-rating{background:url(../images/stars-2x.png?ver=20121108) bottom left/21px 37px repeat-x;-webkit-background-size:21px 37px}.spinner{background-image:url(../images/spinner-2x.gif)}#bulk-titles div a,#bulk-titles div a:hover,#screen-meta-links a.show-settings,.curtime #timestamp,.meta-box-sortables .postbox:hover .handlediv,.sidebar-name-arrow,.sidebar-name:hover .sidebar-name-arrow,.tagchecklist span a,.tagchecklist span a:hover,.widget-top a.widget-action,.widget-top a.widget-action:hover{background:none!important}}@-ms-viewport{width:device-width}@media screen and (max-width:782px){html.wp-toolbar{padding-top:46px}body{min-width:240px;overflow-x:hidden}body *{-webkit-tap-highlight-color:transparent!important}#wpcontent{position:relative;margin-right:0;padding-right:10px}#wpbody-content{padding-bottom:100px}.wrap{margin-left:12px;margin-right:0}.col-wrap{padding:0}#collapse-menu,#screen-meta,#screen-meta-links,.post-format-select{display:none!important}.wrap .add-new-h2,.wrap .add-new-h2:active{padding:10px 15px;font-size:14px}.wp-color-result{height:auto;padding-right:45px}.wp-color-result:after{font-size:14px;height:auto;padding:6px 14px}.media-upload-form div.error,.notice,.wrap div.error,.wrap div.updated{margin:20px 0 10px;padding:5px 10px;font-size:14px;line-height:175%}.wp-core-ui .notice.is-dismissible{padding-left:46px}.notice-dismiss{padding:13px}.wrap .icon32+h2{margin-top:-2px}.wp-responsive-open #wpbody{left:-190px}code{word-wrap:break-word}.postbox{font-size:14px}.metabox-holder h3{padding:12px}.postbox .handlediv{margin-top:3px}.subsubsub{font-size:16px;text-align:center;margin-bottom:15px}#templateside{float:none;width:auto}#templateside li{margin:0}#templateside li a{display:block;padding:5px}#templateside .highlight{padding:5px;margin-right:-5px;margin-top:-5px}#template div{float:none;margin:0;width:auto}#template textarea{width:100%}.fileedit-sub .alignright{margin-top:15px}#comments-form .checkforspam,#wpfooter{display:none}}@media screen and (max-width:600px){#wpwrap.wp-responsive-open{overflow-x:hidden}html.wp-toolbar{padding-top:0}#wpbody{padding-top:46px}div#post-body.metabox-holder.columns-1{overflow-x:hidden}}input,textarea{-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box}input[type=checkbox],input[type=color],input[type=date],input[type=datetime-local],input[type=datetime],input[type=email],input[type=month],input[type=number],input[type=password],input[type=radio],input[type=search],input[type=tel],input[type=text],input[type=time],input[type=url],input[type=week],select,textarea{border:1px solid #ddd;-webkit-box-shadow:inset 0 1px 2px rgba(0,0,0,.07);box-shadow:inset 0 1px 2px rgba(0,0,0,.07);background-color:#fff;color:#32373c;outline:0;-webkit-transition:.05s border-color ease-in-out;transition:.05s border-color ease-in-out}input[type=checkbox]:focus,input[type=color]:focus,input[type=date]:focus,input[type=datetime-local]:focus,input[type=datetime]:focus,input[type=email]:focus,input[type=month]:focus,input[typLine truncated
|
||||
*/.ui-draggable-handle,.ui-sortable-handle{-ms-touch-action:none;touch-action:none}.accordion-section{border-bottom:1px solid #dfdfdf;margin:0}.accordion-section.open .accordion-section-content,.no-js .accordion-section .accordion-section-content{display:block}.accordion-section.open:hover{border-bottom-color:#dfdfdf}.accordion-section-content{display:none;padding:10px 20px 15px;overflow:hidden;background:#fff}.accordion-section-title{margin:0;padding:12px 15px 15px;position:relative;border-right:1px solid #dfdfdf;border-left:1px solid #dfdfdf;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}.js .accordion-section-title{cursor:pointer}.js .accordion-section-title:after{position:absolute;top:12px;left:10px;z-index:1}.accordion-section-title:focus{outline:0}.accordion-section-title:focus:after,.accordion-section-title:hover:after{border-color:#a0a5aa transparent}.cannot-expand .accordion-section-title{cursor:auto}.cannot-expand .accordion-section-title:after{display:none}.control-section .accordion-section-title{border-right:none;border-left:none;padding:10px 14px 11px 10px;line-height:21px;background:#fff}.control-section .accordion-section-title:after{top:11px}.js .control-section .accordion-section-title:focus,.js .control-section .accordion-section-title:hover,.js .control-section.open .accordion-section-title,.js .control-section:hover .accordion-section-title{color:#23282d;background:#f5f5f5}.control-section.open .accordion-section-title{border-bottom:1px solid #dfdfdf}@media only screen and (min-width:769px){#col-left{width:35%}#col-right{width:65%}}@media only screen and (max-width:860px){#col-left{width:35%}#col-right{width:65%}}@media only screen and (min-width:980px){#col-left{width:35%}#col-right{width:65%}}@media only screen and (max-width:768px){#col-left,#col-right{width:100%}}@media print,(-webkit-min-device-pixel-ratio:1.25),(min-resolution:120dpi){div.star-holder,div.star-holder .star-rating{background:url(../images/stars-2x.png?ver=20121108) bottom left/21px 37px repeat-x;-webkit-background-size:21px 37px}.spinner{background-image:url(../images/spinner-2x.gif)}#bulk-titles div a,#bulk-titles div a:hover,#screen-meta-links a.show-settings,.curtime #timestamp,.meta-box-sortables .postbox:hover .handlediv,.sidebar-name-arrow,.sidebar-name:hover .sidebar-name-arrow,.tagchecklist span a,.tagchecklist span a:hover,.widget-top a.widget-action,.widget-top a.widget-action:hover{background:none!important}}@-ms-viewport{width:device-width}@media screen and (max-width:782px){html.wp-toolbar{padding-top:46px}body{min-width:240px;overflow-x:hidden}body *{-webkit-tap-highlight-color:transparent!important}#wpcontent{position:relative;margin-right:0;padding-right:10px}#wpbody-content{padding-bottom:100px}.wrap{margin-left:12px;margin-right:0}.col-wrap{padding:0}#collapse-menu,#screen-meta,#screen-meta-links,.post-format-select{display:none!important}.wrap .add-new-h2,.wrap .add-new-h2:active{padding:10px 15px;font-size:14px}.wp-color-result{height:auto;padding-right:45px}.wp-color-result:after{font-size:14px;height:auto;padding:6px 14px}.media-upload-form div.error,.notice,.wrap div.error,.wrap div.updated{margin:20px 0 10px;padding:5px 10px;font-size:14px;line-height:175%}.wp-core-ui .notice.is-dismissible{padding-left:46px}.notice-dismiss{padding:13px}.wrap .icon32+h2{margin-top:-2px}.wp-responsive-open #wpbody{left:-190px}code{word-wrap:break-word}.postbox{font-size:14px}.metabox-holder h3{padding:12px}.postbox .handlediv{margin-top:3px}.subsubsub{font-size:16px;text-align:center;margin-bottom:15px}#templateside{float:none;width:auto}#templateside li{margin:0}#templateside li a{display:block;padding:5px}#templateside .highlight{padding:5px;margin-right:-5px;margin-top:-5px}#template div{float:none;margin:0;width:auto}#template textarea{width:100%}.fileedit-sub .alignright{margin-top:15px}#comments-form .checkforspam,#wpfooter{display:none}}@media screen and (max-width:600px){#wpwrap.wp-responsive-open{overflow-x:hidden}html.wp-toolbar{padding-top:0}#wpbody{padding-top:46px}div#post-body.metabox-holder.columns-1{overflow-x:hidden}}input,textarea{-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box}input[type=checkbox],input[type=color],input[type=date],input[type=datetime-local],input[type=datetime],input[type=email],input[type=month],input[type=number],input[type=password],input[type=radio],input[type=search],input[type=tel],input[type=text],input[type=time],input[type=url],input[type=week],select,textarea{border:1px solid #ddd;-webkit-box-shadow:inset 0 1px 2px rgba(0,0,0,.07);box-shadow:inset 0 1px 2px rgba(0,0,0,.07);background-color:#fff;color:#32373c;outline:0;-webkit-transition:.05s border-color ease-in-out;transition:.05s border-color ease-in-out}input[type=checkbox]:focus,input[type=color]:focus,input[type=date]:focus,input[type=datetime-local]:focus,input[type=datetime]:focus,input[type=email]:focus,input[type=month]:focus,input[typLine truncated
|
||||
Vendored
+1
-1
@@ -5,4 +5,4 @@
|
||||
* Copyright jQuery Foundation and other contributors
|
||||
* Released under the MIT license.
|
||||
* http://jquery.org/license
|
||||
*/.ui-draggable-handle,.ui-sortable-handle{-ms-touch-action:none;touch-action:none}.accordion-section{border-bottom:1px solid #dfdfdf;margin:0}.accordion-section.open .accordion-section-content,.no-js .accordion-section .accordion-section-content{display:block}.accordion-section.open:hover{border-bottom-color:#dfdfdf}.accordion-section-content{display:none;padding:10px 20px 15px;overflow:hidden;background:#fff}.accordion-section-title{margin:0;padding:12px 15px 15px;position:relative;border-left:1px solid #dfdfdf;border-right:1px solid #dfdfdf;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}.js .accordion-section-title{cursor:pointer}.js .accordion-section-title:after{position:absolute;top:12px;right:10px;z-index:1}.accordion-section-title:focus{outline:0}.accordion-section-title:focus:after,.accordion-section-title:hover:after{border-color:#a0a5aa transparent}.cannot-expand .accordion-section-title{cursor:auto}.cannot-expand .accordion-section-title:after{display:none}.control-section .accordion-section-title{border-left:none;border-right:none;padding:10px 10px 11px 14px;line-height:21px;background:#fff}.control-section .accordion-section-title:after{top:11px}.js .control-section .accordion-section-title:focus,.js .control-section .accordion-section-title:hover,.js .control-section.open .accordion-section-title,.js .control-section:hover .accordion-section-title{color:#23282d;background:#f5f5f5}.control-section.open .accordion-section-title{border-bottom:1px solid #dfdfdf}@media only screen and (min-width:769px){#col-left{width:35%}#col-right{width:65%}}@media only screen and (max-width:860px){#col-left{width:35%}#col-right{width:65%}}@media only screen and (min-width:980px){#col-left{width:35%}#col-right{width:65%}}@media only screen and (max-width:768px){#col-left,#col-right{width:100%}}@media print,(-webkit-min-device-pixel-ratio:1.25),(min-resolution:120dpi){div.star-holder,div.star-holder .star-rating{background:url(../images/stars-2x.png?ver=20121108) bottom left/21px 37px repeat-x;-webkit-background-size:21px 37px}.spinner{background-image:url(../images/spinner-2x.gif)}#bulk-titles div a,#bulk-titles div a:hover,#screen-meta-links a.show-settings,.curtime #timestamp,.meta-box-sortables .postbox:hover .handlediv,.sidebar-name-arrow,.sidebar-name:hover .sidebar-name-arrow,.tagchecklist span a,.tagchecklist span a:hover,.widget-top a.widget-action,.widget-top a.widget-action:hover{background:none!important}}@-ms-viewport{width:device-width}@media screen and (max-width:782px){html.wp-toolbar{padding-top:46px}body{min-width:240px;overflow-x:hidden}body *{-webkit-tap-highlight-color:transparent!important}#wpcontent{position:relative;margin-left:0;padding-left:10px}#wpbody-content{padding-bottom:100px}.wrap{margin-right:12px;margin-left:0}.col-wrap{padding:0}#collapse-menu,#screen-meta,#screen-meta-links,.post-format-select{display:none!important}.wrap .add-new-h2,.wrap .add-new-h2:active{padding:10px 15px;font-size:14px}.wp-color-result{height:auto;padding-left:45px}.wp-color-result:after{font-size:14px;height:auto;padding:6px 14px}.media-upload-form div.error,.notice,.wrap div.error,.wrap div.updated{margin:20px 0 10px;padding:5px 10px;font-size:14px;line-height:175%}.wp-core-ui .notice.is-dismissible{padding-right:46px}.notice-dismiss{padding:13px}.wrap .icon32+h2{margin-top:-2px}.wp-responsive-open #wpbody{right:-190px}code{word-wrap:break-word}.postbox{font-size:14px}.metabox-holder h3{padding:12px}.postbox .handlediv{margin-top:3px}.subsubsub{font-size:16px;text-align:center;margin-bottom:15px}#templateside{float:none;width:auto}#templateside li{margin:0}#templateside li a{display:block;padding:5px}#templateside .highlight{padding:5px;margin-left:-5px;margin-top:-5px}#template div{float:none;margin:0;width:auto}#template textarea{width:100%}.fileedit-sub .alignright{margin-top:15px}#comments-form .checkforspam,#wpfooter{display:none}}@media screen and (max-width:600px){#wpwrap.wp-responsive-open{overflow-x:hidden}html.wp-toolbar{padding-top:0}#wpbody{padding-top:46px}div#post-body.metabox-holder.columns-1{overflow-x:hidden}}input,textarea{-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box}input[type=checkbox],input[type=color],input[type=date],input[type=datetime-local],input[type=datetime],input[type=email],input[type=month],input[type=number],input[type=password],input[type=radio],input[type=search],input[type=tel],input[type=text],input[type=time],input[type=url],input[type=week],select,textarea{border:1px solid #ddd;-webkit-box-shadow:inset 0 1px 2px rgba(0,0,0,.07);box-shadow:inset 0 1px 2px rgba(0,0,0,.07);background-color:#fff;color:#32373c;outline:0;-webkit-transition:.05s border-color ease-in-out;transition:.05s border-color ease-in-out}input[type=checkbox]:focus,input[type=color]:focus,input[type=date]:focus,input[type=datetime-local]:focus,input[type=datetime]:focus,input[type=email]:focus,input[type=month]:focus,input[typeLine truncated
|
||||
*/.ui-draggable-handle,.ui-sortable-handle{-ms-touch-action:none;touch-action:none}.accordion-section{border-bottom:1px solid #dfdfdf;margin:0}.accordion-section.open .accordion-section-content,.no-js .accordion-section .accordion-section-content{display:block}.accordion-section.open:hover{border-bottom-color:#dfdfdf}.accordion-section-content{display:none;padding:10px 20px 15px;overflow:hidden;background:#fff}.accordion-section-title{margin:0;padding:12px 15px 15px;position:relative;border-left:1px solid #dfdfdf;border-right:1px solid #dfdfdf;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}.js .accordion-section-title{cursor:pointer}.js .accordion-section-title:after{position:absolute;top:12px;right:10px;z-index:1}.accordion-section-title:focus{outline:0}.accordion-section-title:focus:after,.accordion-section-title:hover:after{border-color:#a0a5aa transparent}.cannot-expand .accordion-section-title{cursor:auto}.cannot-expand .accordion-section-title:after{display:none}.control-section .accordion-section-title{border-left:none;border-right:none;padding:10px 10px 11px 14px;line-height:21px;background:#fff}.control-section .accordion-section-title:after{top:11px}.js .control-section .accordion-section-title:focus,.js .control-section .accordion-section-title:hover,.js .control-section.open .accordion-section-title,.js .control-section:hover .accordion-section-title{color:#23282d;background:#f5f5f5}.control-section.open .accordion-section-title{border-bottom:1px solid #dfdfdf}@media only screen and (min-width:769px){#col-left{width:35%}#col-right{width:65%}}@media only screen and (max-width:860px){#col-left{width:35%}#col-right{width:65%}}@media only screen and (min-width:980px){#col-left{width:35%}#col-right{width:65%}}@media only screen and (max-width:768px){#col-left,#col-right{width:100%}}@media print,(-webkit-min-device-pixel-ratio:1.25),(min-resolution:120dpi){div.star-holder,div.star-holder .star-rating{background:url(../images/stars-2x.png?ver=20121108) bottom left/21px 37px repeat-x;-webkit-background-size:21px 37px}.spinner{background-image:url(../images/spinner-2x.gif)}#bulk-titles div a,#bulk-titles div a:hover,#screen-meta-links a.show-settings,.curtime #timestamp,.meta-box-sortables .postbox:hover .handlediv,.sidebar-name-arrow,.sidebar-name:hover .sidebar-name-arrow,.tagchecklist span a,.tagchecklist span a:hover,.widget-top a.widget-action,.widget-top a.widget-action:hover{background:none!important}}@-ms-viewport{width:device-width}@media screen and (max-width:782px){html.wp-toolbar{padding-top:46px}body{min-width:240px;overflow-x:hidden}body *{-webkit-tap-highlight-color:transparent!important}#wpcontent{position:relative;margin-left:0;padding-left:10px}#wpbody-content{padding-bottom:100px}.wrap{margin-right:12px;margin-left:0}.col-wrap{padding:0}#collapse-menu,#screen-meta,#screen-meta-links,.post-format-select{display:none!important}.wrap .add-new-h2,.wrap .add-new-h2:active{padding:10px 15px;font-size:14px}.wp-color-result{height:auto;padding-left:45px}.wp-color-result:after{font-size:14px;height:auto;padding:6px 14px}.media-upload-form div.error,.notice,.wrap div.error,.wrap div.updated{margin:20px 0 10px;padding:5px 10px;font-size:14px;line-height:175%}.wp-core-ui .notice.is-dismissible{padding-right:46px}.notice-dismiss{padding:13px}.wrap .icon32+h2{margin-top:-2px}.wp-responsive-open #wpbody{right:-190px}code{word-wrap:break-word}.postbox{font-size:14px}.metabox-holder h3{padding:12px}.postbox .handlediv{margin-top:3px}.subsubsub{font-size:16px;text-align:center;margin-bottom:15px}#templateside{float:none;width:auto}#templateside li{margin:0}#templateside li a{display:block;padding:5px}#templateside .highlight{padding:5px;margin-left:-5px;margin-top:-5px}#template div{float:none;margin:0;width:auto}#template textarea{width:100%}.fileedit-sub .alignright{margin-top:15px}#comments-form .checkforspam,#wpfooter{display:none}}@media screen and (max-width:600px){#wpwrap.wp-responsive-open{overflow-x:hidden}html.wp-toolbar{padding-top:0}#wpbody{padding-top:46px}div#post-body.metabox-holder.columns-1{overflow-x:hidden}}input,textarea{-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box}input[type=checkbox],input[type=color],input[type=date],input[type=datetime-local],input[type=datetime],input[type=email],input[type=month],input[type=number],input[type=password],input[type=radio],input[type=search],input[type=tel],input[type=text],input[type=time],input[type=url],input[type=week],select,textarea{border:1px solid #ddd;-webkit-box-shadow:inset 0 1px 2px rgba(0,0,0,.07);box-shadow:inset 0 1px 2px rgba(0,0,0,.07);background-color:#fff;color:#32373c;outline:0;-webkit-transition:.05s border-color ease-in-out;transition:.05s border-color ease-in-out}input[type=checkbox]:focus,input[type=color]:focus,input[type=date]:focus,input[type=datetime-local]:focus,input[type=datetime]:focus,input[type=email]:focus,input[type=month]:focus,input[typeLine truncated
|
||||
@@ -2883,6 +2883,8 @@ function wp_ajax_destroy_sessions() {
|
||||
* @see Plugin_Upgrader
|
||||
*/
|
||||
function wp_ajax_update_plugin() {
|
||||
global $wp_filesystem;
|
||||
|
||||
$plugin = urldecode( $_POST['plugin'] );
|
||||
|
||||
$status = array(
|
||||
@@ -2892,6 +2894,7 @@ function wp_ajax_update_plugin() {
|
||||
'oldVersion' => '',
|
||||
'newVersion' => '',
|
||||
);
|
||||
|
||||
$plugin_data = get_plugin_data( WP_PLUGIN_DIR . '/' . $plugin );
|
||||
if ( $plugin_data['Version'] ) {
|
||||
$status['oldVersion'] = sprintf( __( 'Version %s' ), $plugin_data['Version'] );
|
||||
@@ -2906,15 +2909,17 @@ function wp_ajax_update_plugin() {
|
||||
|
||||
include_once( ABSPATH . 'wp-admin/includes/class-wp-upgrader.php' );
|
||||
|
||||
$current = get_site_transient( 'update_plugins' );
|
||||
if ( empty( $current ) ) {
|
||||
wp_update_plugins();
|
||||
}
|
||||
wp_update_plugins();
|
||||
|
||||
$upgrader = new Plugin_Upgrader( new Automatic_Upgrader_Skin() );
|
||||
$skin = new Automatic_Upgrader_Skin();
|
||||
$upgrader = new Plugin_Upgrader( $skin );
|
||||
$result = $upgrader->bulk_upgrade( array( $plugin ) );
|
||||
|
||||
if ( is_array( $result ) ) {
|
||||
if ( is_array( $result ) && empty( $result[$plugin] ) && is_wp_error( $skin->result ) ) {
|
||||
$result = $skin->result;
|
||||
}
|
||||
|
||||
if ( is_array( $result ) && !empty( $result[ $plugin ] ) ) {
|
||||
$plugin_update_data = current( $result );
|
||||
|
||||
/*
|
||||
@@ -2929,7 +2934,8 @@ function wp_ajax_update_plugin() {
|
||||
wp_send_json_error( $status );
|
||||
}
|
||||
|
||||
$plugin_data = get_plugin_data( WP_PLUGIN_DIR . '/' . $plugin );
|
||||
$plugin_data = get_plugins( '/' . $result[ $plugin ]['destination_name'] );
|
||||
$plugin_data = reset( $plugin_data );
|
||||
|
||||
if ( $plugin_data['Version'] ) {
|
||||
$status['newVersion'] = sprintf( __( 'Version %s' ), $plugin_data['Version'] );
|
||||
@@ -2939,10 +2945,18 @@ function wp_ajax_update_plugin() {
|
||||
} else if ( is_wp_error( $result ) ) {
|
||||
$status['error'] = $result->get_error_message();
|
||||
wp_send_json_error( $status );
|
||||
} else if ( is_bool( $result ) && ! $result ) {
|
||||
|
||||
} else if ( is_bool( $result ) && ! $result ) {
|
||||
$status['errorCode'] = 'unable_to_connect_to_filesystem';
|
||||
$status['error'] = __( 'Unable to connect to the filesystem. Please confirm your credentials.' );
|
||||
|
||||
// Pass through the error from WP_Filesystem if one was raised
|
||||
if ( is_wp_error( $wp_filesystem->errors ) && $wp_filesystem->errors->get_error_code() ) {
|
||||
$status['error'] = $wp_filesystem->errors->get_error_message();
|
||||
}
|
||||
|
||||
wp_send_json_error( $status );
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -972,11 +972,14 @@ class Plugin_Upgrader extends WP_Upgrader {
|
||||
|
||||
// Check the folder contains at least 1 valid plugin.
|
||||
$plugins_found = false;
|
||||
foreach ( glob( $working_directory . '*.php' ) as $file ) {
|
||||
$info = get_plugin_data($file, false, false);
|
||||
if ( !empty( $info['Name'] ) ) {
|
||||
$plugins_found = true;
|
||||
break;
|
||||
$files = glob( $working_directory . '*.php' );
|
||||
if ( $files ) {
|
||||
foreach ( $files as $file ) {
|
||||
$info = get_plugin_data( $file, false, false );
|
||||
if ( ! empty( $info['Name'] ) ) {
|
||||
$plugins_found = true;
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -418,6 +418,10 @@ function wp_network_dashboard_right_now() {
|
||||
function wp_dashboard_quick_press( $error_msg = false ) {
|
||||
global $post_ID;
|
||||
|
||||
if ( ! current_user_can( 'edit_posts' ) ) {
|
||||
return;
|
||||
}
|
||||
|
||||
/* Check if a new auto-draft (= no new post_ID) is needed or if the old can be used */
|
||||
$last_post_id = (int) get_user_option( 'dashboard_quick_press_last_post_id' ); // Get the last post_ID
|
||||
if ( $last_post_id ) {
|
||||
|
||||
@@ -146,7 +146,7 @@ function wp_tempnam( $filename = '', $dir = '' ) {
|
||||
$dir = get_temp_dir();
|
||||
}
|
||||
|
||||
if ( empty( $filename ) || '.' == $filename ) {
|
||||
if ( empty( $filename ) || '.' == $filename || '/' == $filename ) {
|
||||
$filename = time();
|
||||
}
|
||||
|
||||
|
||||
@@ -1542,7 +1542,7 @@ function _admin_notice_post_locked() {
|
||||
// Allow plugins to prevent some users overriding the post lock
|
||||
if ( $override ) {
|
||||
?>
|
||||
<a class="button button-primary wp-tab-last" href="<?php echo esc_url( add_query_arg( 'get-post-lock', '1', get_edit_post_link( $post->ID, 'url' ) ) ); ?>"><?php _e('Take over'); ?></a>
|
||||
<a class="button button-primary wp-tab-last" href="<?php echo esc_url( add_query_arg( 'get-post-lock', '1', wp_nonce_url( get_edit_post_link( $post->ID, 'url' ), 'lock-post_' . $post->ID ) ) ); ?>"><?php _e('Take over'); ?></a>
|
||||
<?php
|
||||
}
|
||||
|
||||
|
||||
@@ -1050,6 +1050,9 @@ function update_core($from, $to) {
|
||||
$wp_filesystem->delete($old_file, true);
|
||||
}
|
||||
|
||||
// Remove any Genericons example.html's from the filesystem
|
||||
_upgrade_422_remove_genericons();
|
||||
|
||||
// Upgrade DB with separate request
|
||||
/** This filter is documented in wp-admin/includes/update-core.php */
|
||||
apply_filters( 'update_feedback', __( 'Upgrading database…' ) );
|
||||
@@ -1188,3 +1191,70 @@ window.location = 'about.php?updated';
|
||||
exit();
|
||||
}
|
||||
add_action( '_core_updated_successfully', '_redirect_to_about_wordpress' );
|
||||
|
||||
/**
|
||||
* Cleans up Genericons example files.
|
||||
*
|
||||
* @since 4.2.2
|
||||
*/
|
||||
function _upgrade_422_remove_genericons() {
|
||||
global $wp_theme_directories, $wp_filesystem;
|
||||
|
||||
// A list of the affected files using the filesystem absolute paths.
|
||||
$affected_files = array();
|
||||
|
||||
// Themes
|
||||
foreach ( $wp_theme_directories as $directory ) {
|
||||
$affected_theme_files = _upgrade_422_find_genericons_files_in_folder( $directory );
|
||||
$affected_files = array_merge( $affected_files, $affected_theme_files );
|
||||
}
|
||||
|
||||
// Plugins
|
||||
$affected_plugin_files = _upgrade_422_find_genericons_files_in_folder( WP_PLUGIN_DIR );
|
||||
$affected_files = array_merge( $affected_files, $affected_plugin_files );
|
||||
|
||||
foreach ( $affected_files as $file ) {
|
||||
$gen_dir = $wp_filesystem->find_folder( trailingslashit( dirname( $file ) ) );
|
||||
if ( empty( $gen_dir ) ) {
|
||||
continue;
|
||||
}
|
||||
|
||||
// The path when the file is accessed via WP_Filesystem may differ in the case of FTP
|
||||
$remote_file = $gen_dir . basename( $file );
|
||||
|
||||
if ( ! $wp_filesystem->exists( $remote_file ) ) {
|
||||
continue;
|
||||
}
|
||||
|
||||
if ( ! $wp_filesystem->delete( $remote_file, false, 'f' ) ) {
|
||||
$wp_filesystem->put_contents( $remote_file, '' );
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Recursively find Genericons example files in a given folder.
|
||||
*
|
||||
* @ignore
|
||||
* @since 4.2.2
|
||||
*
|
||||
* @param string $directory Directory path. Expects trailingslashed.
|
||||
* @return array
|
||||
*/
|
||||
function _upgrade_422_find_genericons_files_in_folder( $directory ) {
|
||||
$directory = trailingslashit( $directory );
|
||||
$files = array();
|
||||
|
||||
if ( file_exists( "{$directory}example.html" ) && false !== strpos( file_get_contents( "{$directory}example.html" ), '<title>Genericons</title>' ) ) {
|
||||
$files[] = "{$directory}example.html";
|
||||
}
|
||||
|
||||
$dirs = glob( $directory . '*', GLOB_ONLYDIR );
|
||||
if ( $dirs ) {
|
||||
foreach ( $dirs as $dir ) {
|
||||
$files = array_merge( $files, _upgrade_422_find_genericons_files_in_folder( $dir ) );
|
||||
}
|
||||
}
|
||||
|
||||
return $files;
|
||||
}
|
||||
+108
-32
@@ -524,11 +524,11 @@ function upgrade_all() {
|
||||
if ( $wp_current_db_version < 29630 )
|
||||
upgrade_400();
|
||||
|
||||
if ( $wp_current_db_version < 31351 )
|
||||
upgrade_420();
|
||||
if ( $wp_current_db_version < 31534 )
|
||||
upgrade_422();
|
||||
|
||||
if ( $wp_current_db_version < 31533 )
|
||||
upgrade_421();
|
||||
if ( $wp_current_db_version < 31536 )
|
||||
upgrade_423();
|
||||
|
||||
maybe_disable_link_manager();
|
||||
|
||||
@@ -1423,19 +1423,6 @@ function upgrade_400() {
|
||||
* @since 4.2.0
|
||||
*/
|
||||
function upgrade_420() {
|
||||
global $wp_current_db_version, $wpdb;
|
||||
|
||||
if ( $wp_current_db_version < 31351 && $wpdb->charset === 'utf8mb4' ) {
|
||||
if ( is_multisite() ) {
|
||||
$tables = $wpdb->tables( 'blog' );
|
||||
} else {
|
||||
$tables = $wpdb->tables( 'all' );
|
||||
}
|
||||
|
||||
foreach ( $tables as $table ) {
|
||||
maybe_convert_table_to_utf8mb4( $table );
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -1444,19 +1431,48 @@ function upgrade_420() {
|
||||
* @since 4.2.1
|
||||
*/
|
||||
function upgrade_421() {
|
||||
}
|
||||
|
||||
/**
|
||||
* Execute changes made in WordPress 4.2.2.
|
||||
*
|
||||
* @since 4.2.2
|
||||
*/
|
||||
function upgrade_422() {
|
||||
global $wp_current_db_version, $wpdb;
|
||||
|
||||
if ( $wp_current_db_version < 31533 ) {
|
||||
if ( $wp_current_db_version < 31534 ) {
|
||||
$content_length = $wpdb->get_col_length( $wpdb->comments, 'comment_content' );
|
||||
if ( ! $content_length ) {
|
||||
$content_length = 65535;
|
||||
|
||||
if ( is_wp_error( $content_length ) ) {
|
||||
return;
|
||||
}
|
||||
|
||||
if ( false === $content_length ) {
|
||||
$content_length = array(
|
||||
'type' => 'byte',
|
||||
'length' => 65535,
|
||||
);
|
||||
} elseif ( ! is_array( $content_length ) ) {
|
||||
$length = (int) $content_length > 0 ? (int) $content_length : 65535;
|
||||
$content_length = array(
|
||||
'type' => 'byte',
|
||||
'length' => $length
|
||||
);
|
||||
}
|
||||
|
||||
if ( 'byte' !== $content_length['type'] || 0 === $content_length['length'] ) {
|
||||
// Sites with malformed DB schemas are on their own.
|
||||
return;
|
||||
}
|
||||
|
||||
$allowed_length = intval( $content_length['length'] ) - 10;
|
||||
|
||||
$comments = $wpdb->get_results(
|
||||
"SELECT comment_ID FROM $wpdb->comments
|
||||
WHERE comment_date_gmt > '2015-04-26'
|
||||
AND CHAR_LENGTH( comment_content ) >= $content_length
|
||||
AND ( comment_content LIKE '%<%' OR comment_content LIKE '%>%' )"
|
||||
"SELECT `comment_ID` FROM `{$wpdb->comments}`
|
||||
WHERE `comment_date_gmt` > '2015-04-26'
|
||||
AND LENGTH( `comment_content` ) >= {$allowed_length}
|
||||
AND ( `comment_content` LIKE '%<%' OR `comment_content` LIKE '%>%' )"
|
||||
);
|
||||
|
||||
foreach ( $comments as $comment ) {
|
||||
@@ -1465,6 +1481,31 @@ function upgrade_421() {
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Execute changes made in WordPress 4.2.0.
|
||||
*
|
||||
* @since 4.2.3
|
||||
*/
|
||||
function upgrade_423() {
|
||||
global $wp_current_db_version, $wpdb;
|
||||
|
||||
if ( $wp_current_db_version < 31536 && $wpdb->charset === 'utf8mb4' ) {
|
||||
if ( is_multisite() ) {
|
||||
$tables = $wpdb->tables( 'blog' );
|
||||
} else {
|
||||
$tables = $wpdb->tables( 'all' );
|
||||
if ( defined( 'DO_NOT_UPGRADE_GLOBAL_TABLES' ) ) {
|
||||
$global_tables = $wpdb->tables( 'global' );
|
||||
$tables = array_diff_assoc( $tables, $global_tables );
|
||||
}
|
||||
}
|
||||
|
||||
foreach ( $tables as $table ) {
|
||||
maybe_convert_table_to_utf8mb4( $table );
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Executes network-level upgrade routines.
|
||||
*
|
||||
@@ -1564,11 +1605,11 @@ function upgrade_network() {
|
||||
|
||||
// 4.2
|
||||
if ( $wp_current_db_version < 31351 && $wpdb->charset === 'utf8mb4' ) {
|
||||
if ( ! ( defined( 'DO_NOT_UPGRADE_GLOBAL_TABLES' ) && DO_NOT_UPGRADE_GLOBAL_TABLES ) ) {
|
||||
if ( ! defined( 'DO_NOT_UPGRADE_GLOBAL_TABLES' ) ) {
|
||||
$wpdb->query( "ALTER TABLE $wpdb->usermeta DROP INDEX meta_key, ADD INDEX meta_key(meta_key(191))" );
|
||||
$wpdb->query( "ALTER TABLE $wpdb->site DROP INDEX domain, ADD INDEX domain(domain(140),path(51))" );
|
||||
$wpdb->query( "ALTER TABLE $wpdb->sitemeta DROP INDEX meta_key, ADD INDEX meta_key(meta_key(191))" );
|
||||
$wpdb->query( "ALTER TABLE $wpdb->signups DROP INDEX domain, ADD INDEX domain(domain(140),path(51))" );
|
||||
$wpdb->query( "ALTER TABLE $wpdb->signups DROP INDEX domain_path, ADD INDEX domain_path(domain(140),path(51))" );
|
||||
|
||||
$tables = $wpdb->tables( 'global' );
|
||||
|
||||
@@ -1577,6 +1618,35 @@ function upgrade_network() {
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// 4.2.2
|
||||
if ( $wp_current_db_version < 31535 && 'utf8mb4' === $wpdb->charset ) {
|
||||
if ( ! defined( 'DO_NOT_UPGRADE_GLOBAL_TABLES' ) ) {
|
||||
$upgrade = false;
|
||||
$indexes = $wpdb->get_results( "SHOW INDEXES FROM $wpdb->signups" );
|
||||
foreach( $indexes as $index ) {
|
||||
if ( 'domain_path' == $index->Key_name && 'domain' == $index->Column_name && 140 != $index->Sub_part ) {
|
||||
$upgrade = true;
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
if ( $upgrade ) {
|
||||
$wpdb->query( "ALTER TABLE $wpdb->signups DROP INDEX domain_path, ADD INDEX domain_path(domain(140),path(51))" );
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// 4.2.3
|
||||
if ( $wp_current_db_version < 31536 && $wpdb->charset === 'utf8mb4' ) {
|
||||
if ( ! defined( 'DO_NOT_UPGRADE_GLOBAL_TABLES' ) ) {
|
||||
$tables = $wpdb->tables( 'global' );
|
||||
|
||||
foreach ( $tables as $table ) {
|
||||
maybe_convert_table_to_utf8mb4( $table );
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
//
|
||||
@@ -1709,6 +1779,17 @@ function maybe_convert_table_to_utf8mb4( $table ) {
|
||||
}
|
||||
}
|
||||
|
||||
$table_details = $wpdb->get_row( "SHOW TABLE STATUS LIKE '$table'" );
|
||||
if ( ! $table_details ) {
|
||||
return false;
|
||||
}
|
||||
|
||||
list( $table_charset ) = explode( '_', $table_details->Collation );
|
||||
$table_charset = strtolower( $table_charset );
|
||||
if ( 'utf8mb4' === $table_charset ) {
|
||||
return true;
|
||||
}
|
||||
|
||||
return $wpdb->query( "ALTER TABLE $table CONVERT TO CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci" );
|
||||
}
|
||||
|
||||
@@ -2396,14 +2477,9 @@ function pre_schema_upgrade() {
|
||||
}
|
||||
}
|
||||
|
||||
if ( $wp_current_db_version < 30133 ) {
|
||||
// dbDelta() can recreate but can't drop the index.
|
||||
$wpdb->query( "ALTER TABLE $wpdb->terms DROP INDEX slug" );
|
||||
}
|
||||
|
||||
// Upgrade versions prior to 4.2.
|
||||
if ( $wp_current_db_version < 31351 ) {
|
||||
if ( ! is_multisite() ) {
|
||||
if ( ! is_multisite() && ! defined( 'DO_NOT_UPGRADE_GLOBAL_TABLES' ) ) {
|
||||
$wpdb->query( "ALTER TABLE $wpdb->usermeta DROP INDEX meta_key, ADD INDEX meta_key(meta_key(191))" );
|
||||
}
|
||||
$wpdb->query( "ALTER TABLE $wpdb->terms DROP INDEX slug, ADD INDEX slug(slug(191))" );
|
||||
|
||||
@@ -860,7 +860,7 @@ $(document).ready( function() {
|
||||
window.wpResponsive.init();
|
||||
setPinMenu();
|
||||
|
||||
$document.on( 'wp-window-resized.pin-menu postboxes-columnchange.pin-menu postbox-toggled.pin-menu wp-collapse-menu.pin-menu wp-scroll-start.pin-menu', setPinMenu );
|
||||
$document.on( 'wp-pin-menu wp-window-resized.pin-menu postboxes-columnchange.pin-menu postbox-toggled.pin-menu wp-collapse-menu.pin-menu wp-scroll-start.pin-menu', setPinMenu );
|
||||
});
|
||||
|
||||
// Fire a custom jQuery event at the end of window resize
|
||||
|
||||
Vendored
+1
-1
@@ -1 +1 @@
|
||||
var showNotice,adminMenu,columns,validateForm,screenMeta;!function(a,b){adminMenu={init:function(){},fold:function(){},restoreMenuState:function(){},toggle:function(){},favorites:function(){}},columns={init:function(){var b=this;a(".hide-column-tog","#adv-settings").click(function(){var c=a(this),d=c.val();c.prop("checked")?b.checked(d):b.unchecked(d),columns.saveManageColumnsState()})},saveManageColumnsState:function(){var b=this.hidden();a.post(ajaxurl,{action:"hidden-columns",hidden:b,screenoptionnonce:a("#screenoptionnonce").val(),page:pagenow})},checked:function(b){a(".column-"+b).show(),this.colSpanChange(1)},unchecked:function(b){a(".column-"+b).hide(),this.colSpanChange(-1)},hidden:function(){return a(".manage-column").filter(":hidden").map(function(){return this.id}).get().join(",")},useCheckboxesForHidden:function(){this.hidden=function(){return a(".hide-column-tog").not(":checked").map(function(){var a=this.id;return a.substring(a,a.length-5)}).get().join(",")}},colSpanChange:function(b){var c,d=a("table").find(".colspanchange");d.length&&(c=parseInt(d.attr("colspan"),10)+b,d.attr("colspan",c.toString()))}},a(document).ready(function(){columns.init()}),validateForm=function(b){return!a(b).find(".form-required").filter(function(){return""===a("input:visible",this).val()}).addClass("form-invalid").find("input:visible").change(function(){a(this).closest(".form-invalid").removeClass("form-invalid")}).size()},showNotice={warn:function(){var a=commonL10n.warnDelete||"";return confirm(a)?!0:!1},note:function(a){alert(a)}},screenMeta={element:null,toggles:null,page:null,init:function(){this.element=a("#screen-meta"),this.toggles=a(".screen-meta-toggle a"),this.page=a("#wpcontent"),this.toggles.click(this.toggleEvent)},toggleEvent:function(b){var c=a(this.href.replace(/.+#/,"#"));b.preventDefault(),c.length&&(c.is(":visible")?screenMeta.close(c,a(this)):screenMeta.open(c,a(this)))},open:function(b,c){a(".screen-meta-toggle").not(c.parent()).css("visibility","hidden"),b.parent().show(),b.slideDown("fast",function(){b.focus(),c.addClass("screen-meta-active").attr("aria-expanded",!0)}),a(document).trigger("screen:options:open")},close:function(b,c){b.slideUp("fast",function(){c.removeClass("screen-meta-active").attr("aria-expanded",!1),a(".screen-meta-toggle").css("visibility",""),b.parent().hide()}),a(document).trigger("screen:options:close")}},a(".contextual-help-tabs").delegate("a","click",function(b){var c,d=a(this);return b.preventDefault(),d.is(".active a")?!1:(a(".contextual-help-tabs .active").removeClass("active"),d.parent("li").addClass("active"),c=a(d.attr("href")),a(".help-tab-content").not(c).removeClass("active").hide(),void c.addClass("active").show())}),a(document).ready(function(){function c(a){var b,c,d,e,f,g,h,i=a.find(".wp-submenu");f=a.offset().top,g=x.scrollTop(),h=f-g-30,b=f+i.height()+1,c=A.height(),d=60+b-c,e=x.height()+g-50,b-d>e&&(d=b-e),d>h&&(d=h),d>1?i.css("margin-top","-"+d+"px"):i.css("margin-top","")}function d(a){var b=x.scrollTop(),c=!a||"scroll"!==a.type;if(!(t||v||B.data("wp-responsive"))){if(N.menu+N.adminbar<N.window||N.menu+N.adminbar+20>N.wpwrap)return void f();if(M=!0,N.menu+N.adminbar>N.window){if(0>b)return void(J||(J=!0,K=!1,z.css({position:"fixed",top:"",bottom:""})));if(b+N.window>w.height()-1)return void(K||(K=!0,J=!1,z.css({position:"fixed",top:"",bottom:0})));b>I?J?(J=!1,L=z.offset().top-N.adminbar-(b-I),L+N.menu+N.adminbar<b+N.window&&(L=b+N.window-N.menu-N.adminbar),z.css({position:"absolute",top:L,bottom:""})):!K&&z.offset().top+N.menu<b+N.window&&(K=!0,z.css({position:"fixed",top:"",bottom:0})):I>b?K?(K=!1,L=z.offset().top-N.adminbar+(I-b),L+N.menu>b+N.window&&(L=b),z.css({position:"absolute",top:L,bottom:""})):!J&&z.offset().top>=b+N.adminbar&&(J=!0,z.css({position:"fixed",top:"",bottom:""})):c&&(J=K=!1,L=b+N.window-N.menu-N.adminbar-1,L>0?z.css({position:"absolute",top:L,bottom:""}):f())}I=b}}function e(){N={window:x.height(),wpwrap:A.height(),adminbar:H.height(),menu:z.height()}}function f(){!t&&M&&(J=K=M=!1,z.css({position:"",top:"",bottom:""}))}function g(){e(),B.data("wp-responsive")?(y.removeClass("sticky-menu"),f()):N.menu+N.adminbar>N.window?(d(),y.removeClass("sticky-menu")):(y.addClass("sticky-menu"),f())}var h,i,j,k,l,m,n,o,p,q=!1,r=a("input.current-page"),s=r.val(),t=/iPhone|iPad|iPod/.test(navigator.userAgent),u=-1!==navigator.userAgent.indexOf("Android"),v=a(document.documentElement).hasClass("ie8"),w=a(document),x=a(b),y=a(document.body),z=a("#adminmenuwrap"),A=a("#wpwrap"),B=a("#adminmenu"),C=a("#wp-responsive-overlay"),D=a("#wp-toolbar"),E=D.find('a[aria-haspopup="true"]'),F=a(".meta-box-sortables"),G=!1,H=a("#wpadminbar"),I=0,J=!1,K=!1,L=0,M=!1,N={window:x.height(),wpwrap:A.height(),adminbar:H.height(),menu:z.height()};B.on("click.wp-submenu-head",".wp-submenu-head",function(b){a(b.target).parent().siblings("a").get(0).click()}),a("#collapse-menu").on("click.collapse-menu",function(){var c,d,e=a(document.body);a("#adminmenu div.wp-submeLine truncated
|
||||
var showNotice,adminMenu,columns,validateForm,screenMeta;!function(a,b){adminMenu={init:function(){},fold:function(){},restoreMenuState:function(){},toggle:function(){},favorites:function(){}},columns={init:function(){var b=this;a(".hide-column-tog","#adv-settings").click(function(){var c=a(this),d=c.val();c.prop("checked")?b.checked(d):b.unchecked(d),columns.saveManageColumnsState()})},saveManageColumnsState:function(){var b=this.hidden();a.post(ajaxurl,{action:"hidden-columns",hidden:b,screenoptionnonce:a("#screenoptionnonce").val(),page:pagenow})},checked:function(b){a(".column-"+b).show(),this.colSpanChange(1)},unchecked:function(b){a(".column-"+b).hide(),this.colSpanChange(-1)},hidden:function(){return a(".manage-column").filter(":hidden").map(function(){return this.id}).get().join(",")},useCheckboxesForHidden:function(){this.hidden=function(){return a(".hide-column-tog").not(":checked").map(function(){var a=this.id;return a.substring(a,a.length-5)}).get().join(",")}},colSpanChange:function(b){var c,d=a("table").find(".colspanchange");d.length&&(c=parseInt(d.attr("colspan"),10)+b,d.attr("colspan",c.toString()))}},a(document).ready(function(){columns.init()}),validateForm=function(b){return!a(b).find(".form-required").filter(function(){return""===a("input:visible",this).val()}).addClass("form-invalid").find("input:visible").change(function(){a(this).closest(".form-invalid").removeClass("form-invalid")}).size()},showNotice={warn:function(){var a=commonL10n.warnDelete||"";return confirm(a)?!0:!1},note:function(a){alert(a)}},screenMeta={element:null,toggles:null,page:null,init:function(){this.element=a("#screen-meta"),this.toggles=a(".screen-meta-toggle a"),this.page=a("#wpcontent"),this.toggles.click(this.toggleEvent)},toggleEvent:function(b){var c=a(this.href.replace(/.+#/,"#"));b.preventDefault(),c.length&&(c.is(":visible")?screenMeta.close(c,a(this)):screenMeta.open(c,a(this)))},open:function(b,c){a(".screen-meta-toggle").not(c.parent()).css("visibility","hidden"),b.parent().show(),b.slideDown("fast",function(){b.focus(),c.addClass("screen-meta-active").attr("aria-expanded",!0)}),a(document).trigger("screen:options:open")},close:function(b,c){b.slideUp("fast",function(){c.removeClass("screen-meta-active").attr("aria-expanded",!1),a(".screen-meta-toggle").css("visibility",""),b.parent().hide()}),a(document).trigger("screen:options:close")}},a(".contextual-help-tabs").delegate("a","click",function(b){var c,d=a(this);return b.preventDefault(),d.is(".active a")?!1:(a(".contextual-help-tabs .active").removeClass("active"),d.parent("li").addClass("active"),c=a(d.attr("href")),a(".help-tab-content").not(c).removeClass("active").hide(),void c.addClass("active").show())}),a(document).ready(function(){function c(a){var b,c,d,e,f,g,h,i=a.find(".wp-submenu");f=a.offset().top,g=x.scrollTop(),h=f-g-30,b=f+i.height()+1,c=A.height(),d=60+b-c,e=x.height()+g-50,b-d>e&&(d=b-e),d>h&&(d=h),d>1?i.css("margin-top","-"+d+"px"):i.css("margin-top","")}function d(a){var b=x.scrollTop(),c=!a||"scroll"!==a.type;if(!(t||v||B.data("wp-responsive"))){if(N.menu+N.adminbar<N.window||N.menu+N.adminbar+20>N.wpwrap)return void f();if(M=!0,N.menu+N.adminbar>N.window){if(0>b)return void(J||(J=!0,K=!1,z.css({position:"fixed",top:"",bottom:""})));if(b+N.window>w.height()-1)return void(K||(K=!0,J=!1,z.css({position:"fixed",top:"",bottom:0})));b>I?J?(J=!1,L=z.offset().top-N.adminbar-(b-I),L+N.menu+N.adminbar<b+N.window&&(L=b+N.window-N.menu-N.adminbar),z.css({position:"absolute",top:L,bottom:""})):!K&&z.offset().top+N.menu<b+N.window&&(K=!0,z.css({position:"fixed",top:"",bottom:0})):I>b?K?(K=!1,L=z.offset().top-N.adminbar+(I-b),L+N.menu>b+N.window&&(L=b),z.css({position:"absolute",top:L,bottom:""})):!J&&z.offset().top>=b+N.adminbar&&(J=!0,z.css({position:"fixed",top:"",bottom:""})):c&&(J=K=!1,L=b+N.window-N.menu-N.adminbar-1,L>0?z.css({position:"absolute",top:L,bottom:""}):f())}I=b}}function e(){N={window:x.height(),wpwrap:A.height(),adminbar:H.height(),menu:z.height()}}function f(){!t&&M&&(J=K=M=!1,z.css({position:"",top:"",bottom:""}))}function g(){e(),B.data("wp-responsive")?(y.removeClass("sticky-menu"),f()):N.menu+N.adminbar>N.window?(d(),y.removeClass("sticky-menu")):(y.addClass("sticky-menu"),f())}var h,i,j,k,l,m,n,o,p,q=!1,r=a("input.current-page"),s=r.val(),t=/iPhone|iPad|iPod/.test(navigator.userAgent),u=-1!==navigator.userAgent.indexOf("Android"),v=a(document.documentElement).hasClass("ie8"),w=a(document),x=a(b),y=a(document.body),z=a("#adminmenuwrap"),A=a("#wpwrap"),B=a("#adminmenu"),C=a("#wp-responsive-overlay"),D=a("#wp-toolbar"),E=D.find('a[aria-haspopup="true"]'),F=a(".meta-box-sortables"),G=!1,H=a("#wpadminbar"),I=0,J=!1,K=!1,L=0,M=!1,N={window:x.height(),wpwrap:A.height(),adminbar:H.height(),menu:z.height()};B.on("click.wp-submenu-head",".wp-submenu-head",function(b){a(b.target).parent().siblings("a").get(0).click()}),a("#collapse-menu").on("click.collapse-menu",function(){var c,d,e=a(document.body);a("#adminmenu div.wp-submeLine truncated
|
||||
@@ -124,7 +124,7 @@ jQuery(document).ready( function($) {
|
||||
};
|
||||
quickPressLoad();
|
||||
|
||||
$( '.meta-box-sortables' ).sortable( 'option', 'containment', 'document' );
|
||||
$( '.meta-box-sortables' ).sortable( 'option', 'containment', '#wpwrap' );
|
||||
|
||||
function autoResizeTextarea() {
|
||||
if ( document.documentMode && document.documentMode < 9 ) {
|
||||
|
||||
Vendored
+1
-1
@@ -1 +1 @@
|
||||
var ajaxWidgets,ajaxPopulateWidgets,quickPressLoad;jQuery(document).ready(function(a){function b(){if(!(document.documentMode&&document.documentMode<9)){a("body").append('<div class="quick-draft-textarea-clone" style="display: none;"></div>');var b=a(".quick-draft-textarea-clone"),c=a("#content"),d=c.height(),e=a(window).height()-100;b.css({"font-family":c.css("font-family"),"font-size":c.css("font-size"),"line-height":c.css("line-height"),"padding-bottom":c.css("paddingBottom"),"padding-left":c.css("paddingLeft"),"padding-right":c.css("paddingRight"),"padding-top":c.css("paddingTop"),"white-space":"pre-wrap","word-wrap":"break-word",display:"none"}),c.on("focus input propertychange",function(){var f=a(this),g=f.val()+" ",h=b.css("width",f.css("width")).text(g).outerHeight()+2;c.css("overflow-y","auto"),h===d||h>=e&&d>=e||(d=h>e?e:h,c.css("overflow","hidden"),f.css("height",d+"px"))})}}var c,d=a("#welcome-panel"),e=a("#wp_welcome_panel-hide");c=function(b){a.post(ajaxurl,{action:"update-welcome-panel",visible:b,welcomepanelnonce:a("#welcomepanelnonce").val()})},d.hasClass("hidden")&&e.prop("checked")&&d.removeClass("hidden"),a(".welcome-panel-close, .welcome-panel-dismiss a",d).click(function(b){b.preventDefault(),d.addClass("hidden"),c(0),a("#wp_welcome_panel-hide").prop("checked",!1)}),e.click(function(){d.toggleClass("hidden",!this.checked),c(this.checked?1:0)}),ajaxWidgets=["dashboard_primary"],ajaxPopulateWidgets=function(b){function c(b,c){var d,e=a("#"+c+" div.inside:visible").find(".widget-loading");e.length&&(d=e.parent(),setTimeout(function(){d.load(ajaxurl+"?action=dashboard-widgets&widget="+c+"&pagenow="+pagenow,"",function(){d.hide().slideDown("normal",function(){a(this).css("display","")})})},500*b))}b?(b=b.toString(),-1!==a.inArray(b,ajaxWidgets)&&c(0,b)):a.each(ajaxWidgets,c)},ajaxPopulateWidgets(),postboxes.add_postbox_toggles(pagenow,{pbshow:ajaxPopulateWidgets}),quickPressLoad=function(){var c,d=a("#quickpost-action");a('#quick-press .submit input[type="submit"], #quick-press .submit input[type="reset"]').prop("disabled",!1),c=a("#quick-press").submit(function(){function b(){var b=a(".drafts ul li").first();b.css("background","#fffbe5"),setTimeout(function(){b.css("background","none")},1e3)}return a("#dashboard_quick_press #publishing-action .spinner").show(),a('#quick-press .submit input[type="submit"], #quick-press .submit input[type="reset"]').prop("disabled",!0),a.post(c.attr("action"),c.serializeArray(),function(c){a("#dashboard_quick_press .inside").html(c),a("#quick-press").removeClass("initial-form"),quickPressLoad(),b(),a("#title").focus()}),!1}),a("#publish").click(function(){d.val("post-quickpress-publish")}),a("#title, #tags-input, #content").each(function(){var b=a(this),c=a("#"+this.id+"-prompt-text");""===this.value&&c.removeClass("screen-reader-text"),c.click(function(){a(this).addClass("screen-reader-text"),b.focus()}),b.blur(function(){""===this.value&&c.removeClass("screen-reader-text")}),b.focus(function(){c.addClass("screen-reader-text")})}),a("#quick-press").on("click focusin",function(){wpActiveEditor="content"}),b()},quickPressLoad(),a(".meta-box-sortables").sortable("option","containment","document")});
|
||||
var ajaxWidgets,ajaxPopulateWidgets,quickPressLoad;jQuery(document).ready(function(a){function b(){if(!(document.documentMode&&document.documentMode<9)){a("body").append('<div class="quick-draft-textarea-clone" style="display: none;"></div>');var b=a(".quick-draft-textarea-clone"),c=a("#content"),d=c.height(),e=a(window).height()-100;b.css({"font-family":c.css("font-family"),"font-size":c.css("font-size"),"line-height":c.css("line-height"),"padding-bottom":c.css("paddingBottom"),"padding-left":c.css("paddingLeft"),"padding-right":c.css("paddingRight"),"padding-top":c.css("paddingTop"),"white-space":"pre-wrap","word-wrap":"break-word",display:"none"}),c.on("focus input propertychange",function(){var f=a(this),g=f.val()+" ",h=b.css("width",f.css("width")).text(g).outerHeight()+2;c.css("overflow-y","auto"),h===d||h>=e&&d>=e||(d=h>e?e:h,c.css("overflow","hidden"),f.css("height",d+"px"))})}}var c,d=a("#welcome-panel"),e=a("#wp_welcome_panel-hide");c=function(b){a.post(ajaxurl,{action:"update-welcome-panel",visible:b,welcomepanelnonce:a("#welcomepanelnonce").val()})},d.hasClass("hidden")&&e.prop("checked")&&d.removeClass("hidden"),a(".welcome-panel-close, .welcome-panel-dismiss a",d).click(function(b){b.preventDefault(),d.addClass("hidden"),c(0),a("#wp_welcome_panel-hide").prop("checked",!1)}),e.click(function(){d.toggleClass("hidden",!this.checked),c(this.checked?1:0)}),ajaxWidgets=["dashboard_primary"],ajaxPopulateWidgets=function(b){function c(b,c){var d,e=a("#"+c+" div.inside:visible").find(".widget-loading");e.length&&(d=e.parent(),setTimeout(function(){d.load(ajaxurl+"?action=dashboard-widgets&widget="+c+"&pagenow="+pagenow,"",function(){d.hide().slideDown("normal",function(){a(this).css("display","")})})},500*b))}b?(b=b.toString(),-1!==a.inArray(b,ajaxWidgets)&&c(0,b)):a.each(ajaxWidgets,c)},ajaxPopulateWidgets(),postboxes.add_postbox_toggles(pagenow,{pbshow:ajaxPopulateWidgets}),quickPressLoad=function(){var c,d=a("#quickpost-action");a('#quick-press .submit input[type="submit"], #quick-press .submit input[type="reset"]').prop("disabled",!1),c=a("#quick-press").submit(function(){function b(){var b=a(".drafts ul li").first();b.css("background","#fffbe5"),setTimeout(function(){b.css("background","none")},1e3)}return a("#dashboard_quick_press #publishing-action .spinner").show(),a('#quick-press .submit input[type="submit"], #quick-press .submit input[type="reset"]').prop("disabled",!0),a.post(c.attr("action"),c.serializeArray(),function(c){a("#dashboard_quick_press .inside").html(c),a("#quick-press").removeClass("initial-form"),quickPressLoad(),b(),a("#title").focus()}),!1}),a("#publish").click(function(){d.val("post-quickpress-publish")}),a("#title, #tags-input, #content").each(function(){var b=a(this),c=a("#"+this.id+"-prompt-text");""===this.value&&c.removeClass("screen-reader-text"),c.click(function(){a(this).addClass("screen-reader-text"),b.focus()}),b.blur(function(){""===this.value&&c.removeClass("screen-reader-text")}),b.focus(function(){c.addClass("screen-reader-text")})}),a("#quick-press").on("click focusin",function(){wpActiveEditor="content"}),b()},quickPressLoad(),a(".meta-box-sortables").sortable("option","containment","#wpwrap")});
|
||||
@@ -15,7 +15,7 @@
|
||||
$visualEditor = $(),
|
||||
$textTop = $( '#ed_toolbar' ),
|
||||
$textEditor = $( '#content' ),
|
||||
$textEditorClone = $( '<div id="content-textarea-clone"></div>' ),
|
||||
$textEditorClone = $( '<div id="content-textarea-clone" class="wp-exclude-emoji"></div>' ),
|
||||
$bottom = $( '#post-status-info' ),
|
||||
$menuBar = $(),
|
||||
$statusBar = $(),
|
||||
|
||||
Vendored
+1
-1
@@ -1 +1 @@
|
||||
!function(a,b){"use strict";var c=b(a),d=b(document),e=b("#wpadminbar"),f=b("#wpfooter");b(function(){function g(){var a=c.width();T={windowHeight:c.height(),windowWidth:a,adminBarHeight:a>600?e.outerHeight():0,toolsHeight:t.outerHeight()||0,menuBarHeight:A.outerHeight()||0,visualTopHeight:u.outerHeight()||0,textTopHeight:w.outerHeight()||0,bottomHeight:z.outerHeight()||0,statusBarHeight:B.outerHeight()||0,sideSortablesHeight:C.height()||0},T.menuBarHeight<3&&(T.menuBarHeight=0)}function h(b){var c,d,e,f,g,h=jQuery.ui.keyCode,i=b.keyCode,j=document.createRange(),k=x[0].selectionStart,l=x[0].selectionEnd,m=y[0].firstChild,n=10;if(!k||!l||k===l){try{j.setStart(m,k),j.setEnd(m,l+1)}catch(o){}c=j.getBoundingClientRect(),c.height&&(d=c.top-n,e=d+c.height+n,f=T.adminBarHeight+T.toolsHeight+T.textTopHeight,g=T.windowHeight-T.bottomHeight,f>d&&(i===h.UP||i===h.LEFT||i===h.BACKSPACE)?a.scrollTo(a.pageXOffset,d+a.pageYOffset-f):e>g&&a.scrollTo(a.pageXOffset,e+a.pageYOffset-g))}}function i(){if(!(p&&!p.isHidden()||!p&&"tinymce"===R)){var a,b=x.height();y.width(x.width()-22),y.text(x.val()+" "),a=y.height(),Q>a&&(a=Q),a!==b&&(x.height(a),j())}}function j(b){if(!F||!F.settings.visible){var e,h,j,k,l,m,n,o,q,r=c.scrollTop(),G=b&&b.type,H="scroll"!==G,N=p&&!p.isHidden(),R=Q,U=E.offset().top,V=1,W=s.width();(H||!T.windowHeight)&&g(),N||"resize"!==G||i(),N?(e=u,h=v,n=T.visualTopHeight):(e=w,h=x,n=T.textTopHeight),(N||e.length)&&(m=e.parent().offset().top,o=h.offset().top,q=h.outerHeight(),l=N?Q+n:Q+20,l=q>l+5,l?((!I||H)&&r>=m-T.toolsHeight-T.adminBarHeight&&r<=m-T.toolsHeight-T.adminBarHeight+q-R?(I=!0,t.css({position:"fixed",top:T.adminBarHeight,width:W}),N&&A.length&&A.css({position:"fixed",top:T.adminBarHeight+T.toolsHeight,width:W-2*V-(N?0:e.outerWidth()-e.width())}),e.css({position:"fixed",top:T.adminBarHeight+T.toolsHeight+T.menuBarHeight,width:W-2*V-(N?0:e.outerWidth()-e.width())})):(I||H)&&(r<=m-T.toolsHeight-T.adminBarHeight?(I=!1,t.css({position:"absolute",top:0,width:W}),N&&A.length&&A.css({position:"absolute",top:0,width:W-2*V}),e.css({position:"absolute",top:T.menuBarHeight,width:W-2*V-(N?0:e.outerWidth()-e.width())})):r>=m-T.toolsHeight-T.adminBarHeight+q-R&&(I=!1,t.css({position:"absolute",top:q-R,width:W}),N&&A.length&&A.css({position:"absolute",top:q-R,width:W-2*V}),e.css({position:"absolute",top:q-R+T.menuBarHeight,width:W-2*V-(N?0:e.outerWidth()-e.width())}))),(!J||H&&S)&&r+T.windowHeight<=o+q+T.bottomHeight+T.statusBarHeight+V?b&&b.deltaHeight>0&&b.deltaHeight<100?a.scrollBy(0,b.deltaHeight):S&&(J=!0,B.css({position:"fixed",bottom:T.bottomHeight,visibility:"",width:W-2*V}),z.css({position:"fixed",bottom:0,width:W})):(!S&&J||(J||H)&&r+T.windowHeight>o+q+T.bottomHeight+T.statusBarHeight-V)&&(J=!1,B.attr("style",S?"":"visibility: hidden;"),z.attr("style",""))):H&&(t.css({position:"absolute",top:0,width:W}),N&&A.length&&A.css({position:"absolute",top:0,width:W-2*V}),e.css({position:"absolute",top:T.menuBarHeight,width:W-2*V-(N?0:e.outerWidth()-e.width())}),B.attr("style",S?"":"visibility: hidden;"),z.attr("style","")),D.width()<300&&T.windowWidth>600&&d.height()>C.height()+U+120&&T.windowHeight<q?(T.sideSortablesHeight+O+P>T.windowHeight||K||L?U>=r+O?(C.attr("style",""),K=L=!1):r>M?K?(K=!1,j=C.offset().top-T.adminBarHeight,k=f.offset().top,k<j+T.sideSortablesHeight+P&&(j=k-T.sideSortablesHeight-12),C.css({position:"absolute",top:j,bottom:""})):!L&&T.sideSortablesHeight+C.offset().top+P<r+T.windowHeight&&(L=!0,C.css({position:"fixed",top:"auto",bottom:P})):M>r&&(L?(L=!1,j=C.offset().top-P,k=f.offset().top,k<j+T.sideSortablesHeight+P&&(j=k-T.sideSortablesHeight-12),C.css({position:"absolute",top:j,bottom:""})):!K&&C.offset().top>=r+O&&(K=!0,C.css({position:"fixed",top:O,bottom:""}))):(r>=U-O?C.css({position:"fixed",top:O}):C.attr("style",""),K=L=!1),M=r):(C.attr("style",""),K=L=!1),H&&(s.css({paddingTop:T.toolsHeight}),N?v.css({paddingTop:T.visualTopHeight+T.menuBarHeight}):(x.css({marginTop:T.textTopHeight}),y.width(W-20-2*V))))}}function k(){i(),j()}function l(a){for(var b=1;6>b;b++)setTimeout(a,500*b)}function m(){clearTimeout(q),q=setTimeout(j,100)}function n(){a.pageYOffset&&a.pageYOffset>N&&a.scrollTo(a.pageXOffset,0),r.addClass("wp-editor-expand"),c.on("scroll.editor-expand resize.editor-expand",function(a){j(a.type),m()}),d.on("wp-collapse-menu.editor-expand postboxes-columnchange.editor-expand editor-classchange.editor-expand",j).on("postbox-toggled.editor-expand",function(){!K&&!L&&a.pageYOffset>O&&(L=!0,a.scrollBy(0,-1),j(),a.scrollBy(0,1)),j()}).on("wp-window-resized.editor-expand",function(){p&&!p.isHidden()?p.execCommand("wpAutoResize"):i()}),x.on("focus.editor-expand input.editor-expand propertychange.editor-expand",i),x.on("keyup.editor-expand",h),G(),F&&F.pubsub.subscribe("hidden",k),p&&(p.settings.wp_autoresize_on=!0,p.execCommand("wpAutoResizeOn"),p.isHidden()||p.execCommand("wpAutoResize")),(!p||p.isHidden())&&i(),j(),d.trigger("editor-expand-on")}function o(){var e=parseInt(a.getUserLine truncated
|
||||
!function(a,b){"use strict";var c=b(a),d=b(document),e=b("#wpadminbar"),f=b("#wpfooter");b(function(){function g(){var a=c.width();T={windowHeight:c.height(),windowWidth:a,adminBarHeight:a>600?e.outerHeight():0,toolsHeight:t.outerHeight()||0,menuBarHeight:A.outerHeight()||0,visualTopHeight:u.outerHeight()||0,textTopHeight:w.outerHeight()||0,bottomHeight:z.outerHeight()||0,statusBarHeight:B.outerHeight()||0,sideSortablesHeight:C.height()||0},T.menuBarHeight<3&&(T.menuBarHeight=0)}function h(b){var c,d,e,f,g,h=jQuery.ui.keyCode,i=b.keyCode,j=document.createRange(),k=x[0].selectionStart,l=x[0].selectionEnd,m=y[0].firstChild,n=10;if(!k||!l||k===l){try{j.setStart(m,k),j.setEnd(m,l+1)}catch(o){}c=j.getBoundingClientRect(),c.height&&(d=c.top-n,e=d+c.height+n,f=T.adminBarHeight+T.toolsHeight+T.textTopHeight,g=T.windowHeight-T.bottomHeight,f>d&&(i===h.UP||i===h.LEFT||i===h.BACKSPACE)?a.scrollTo(a.pageXOffset,d+a.pageYOffset-f):e>g&&a.scrollTo(a.pageXOffset,e+a.pageYOffset-g))}}function i(){if(!(p&&!p.isHidden()||!p&&"tinymce"===R)){var a,b=x.height();y.width(x.width()-22),y.text(x.val()+" "),a=y.height(),Q>a&&(a=Q),a!==b&&(x.height(a),j())}}function j(b){if(!F||!F.settings.visible){var e,h,j,k,l,m,n,o,q,r=c.scrollTop(),G=b&&b.type,H="scroll"!==G,N=p&&!p.isHidden(),R=Q,U=E.offset().top,V=1,W=s.width();(H||!T.windowHeight)&&g(),N||"resize"!==G||i(),N?(e=u,h=v,n=T.visualTopHeight):(e=w,h=x,n=T.textTopHeight),(N||e.length)&&(m=e.parent().offset().top,o=h.offset().top,q=h.outerHeight(),l=N?Q+n:Q+20,l=q>l+5,l?((!I||H)&&r>=m-T.toolsHeight-T.adminBarHeight&&r<=m-T.toolsHeight-T.adminBarHeight+q-R?(I=!0,t.css({position:"fixed",top:T.adminBarHeight,width:W}),N&&A.length&&A.css({position:"fixed",top:T.adminBarHeight+T.toolsHeight,width:W-2*V-(N?0:e.outerWidth()-e.width())}),e.css({position:"fixed",top:T.adminBarHeight+T.toolsHeight+T.menuBarHeight,width:W-2*V-(N?0:e.outerWidth()-e.width())})):(I||H)&&(r<=m-T.toolsHeight-T.adminBarHeight?(I=!1,t.css({position:"absolute",top:0,width:W}),N&&A.length&&A.css({position:"absolute",top:0,width:W-2*V}),e.css({position:"absolute",top:T.menuBarHeight,width:W-2*V-(N?0:e.outerWidth()-e.width())})):r>=m-T.toolsHeight-T.adminBarHeight+q-R&&(I=!1,t.css({position:"absolute",top:q-R,width:W}),N&&A.length&&A.css({position:"absolute",top:q-R,width:W-2*V}),e.css({position:"absolute",top:q-R+T.menuBarHeight,width:W-2*V-(N?0:e.outerWidth()-e.width())}))),(!J||H&&S)&&r+T.windowHeight<=o+q+T.bottomHeight+T.statusBarHeight+V?b&&b.deltaHeight>0&&b.deltaHeight<100?a.scrollBy(0,b.deltaHeight):S&&(J=!0,B.css({position:"fixed",bottom:T.bottomHeight,visibility:"",width:W-2*V}),z.css({position:"fixed",bottom:0,width:W})):(!S&&J||(J||H)&&r+T.windowHeight>o+q+T.bottomHeight+T.statusBarHeight-V)&&(J=!1,B.attr("style",S?"":"visibility: hidden;"),z.attr("style",""))):H&&(t.css({position:"absolute",top:0,width:W}),N&&A.length&&A.css({position:"absolute",top:0,width:W-2*V}),e.css({position:"absolute",top:T.menuBarHeight,width:W-2*V-(N?0:e.outerWidth()-e.width())}),B.attr("style",S?"":"visibility: hidden;"),z.attr("style","")),D.width()<300&&T.windowWidth>600&&d.height()>C.height()+U+120&&T.windowHeight<q?(T.sideSortablesHeight+O+P>T.windowHeight||K||L?U>=r+O?(C.attr("style",""),K=L=!1):r>M?K?(K=!1,j=C.offset().top-T.adminBarHeight,k=f.offset().top,k<j+T.sideSortablesHeight+P&&(j=k-T.sideSortablesHeight-12),C.css({position:"absolute",top:j,bottom:""})):!L&&T.sideSortablesHeight+C.offset().top+P<r+T.windowHeight&&(L=!0,C.css({position:"fixed",top:"auto",bottom:P})):M>r&&(L?(L=!1,j=C.offset().top-P,k=f.offset().top,k<j+T.sideSortablesHeight+P&&(j=k-T.sideSortablesHeight-12),C.css({position:"absolute",top:j,bottom:""})):!K&&C.offset().top>=r+O&&(K=!0,C.css({position:"fixed",top:O,bottom:""}))):(r>=U-O?C.css({position:"fixed",top:O}):C.attr("style",""),K=L=!1),M=r):(C.attr("style",""),K=L=!1),H&&(s.css({paddingTop:T.toolsHeight}),N?v.css({paddingTop:T.visualTopHeight+T.menuBarHeight}):(x.css({marginTop:T.textTopHeight}),y.width(W-20-2*V))))}}function k(){i(),j()}function l(a){for(var b=1;6>b;b++)setTimeout(a,500*b)}function m(){clearTimeout(q),q=setTimeout(j,100)}function n(){a.pageYOffset&&a.pageYOffset>N&&a.scrollTo(a.pageXOffset,0),r.addClass("wp-editor-expand"),c.on("scroll.editor-expand resize.editor-expand",function(a){j(a.type),m()}),d.on("wp-collapse-menu.editor-expand postboxes-columnchange.editor-expand editor-classchange.editor-expand",j).on("postbox-toggled.editor-expand",function(){!K&&!L&&a.pageYOffset>O&&(L=!0,a.scrollBy(0,-1),j(),a.scrollBy(0,1)),j()}).on("wp-window-resized.editor-expand",function(){p&&!p.isHidden()?p.execCommand("wpAutoResize"):i()}),x.on("focus.editor-expand input.editor-expand propertychange.editor-expand",i),x.on("keyup.editor-expand",h),G(),F&&F.pubsub.subscribe("hidden",k),p&&(p.settings.wp_autoresize_on=!0,p.execCommand("wpAutoResizeOn"),p.isHidden()||p.execCommand("wpAutoResize")),(!p||p.isHidden())&&i(),j(),d.trigger("editor-expand-on")}function o(){var e=parseInt(a.getUserLine truncated
|
||||
@@ -492,7 +492,7 @@ var wpNavMenu;
|
||||
title = menus.subMenuFocus.replace( '%1$s', itemName ).replace( '%2$d', itemPosition ).replace( '%3$s', parentItemName );
|
||||
}
|
||||
|
||||
$this.prop('title', title).html( title );
|
||||
$this.prop('title', title).text( title );
|
||||
|
||||
// Mark this item's accessibility as refreshed
|
||||
$this.data( 'needs_accessibility_refresh', false );
|
||||
|
||||
Vendored
+1
-1
@@ -1 +1 @@
|
||||
var wpNavMenu;!function(a){var b;b=wpNavMenu={options:{menuItemDepthPerLevel:30,globalMaxDepth:11},menuList:void 0,targetList:void 0,menusChanged:!1,isRTL:!("undefined"==typeof isRtl||!isRtl),negateIfRTL:"undefined"!=typeof isRtl&&isRtl?-1:1,init:function(){b.menuList=a("#menu-to-edit"),b.targetList=b.menuList,this.jQueryExtensions(),this.attachMenuEditListeners(),this.setupInputWithDefaultTitle(),this.attachQuickSearchListeners(),this.attachThemeLocationsListeners(),this.attachTabsPanelListeners(),this.attachUnsavedChangesListener(),b.menuList.length&&this.initSortables(),menus.oneThemeLocationNoMenus&&a("#posttype-page").addSelectedToMenu(b.addMenuItemToBottom),this.initManageLocations(),this.initAccessibility(),this.initToggles(),this.initPreviewing()},jQueryExtensions:function(){a.fn.extend({menuItemDepth:function(){var a=this.eq(0).css(b.isRTL?"margin-right":"margin-left");return b.pxToDepth(a&&-1!=a.indexOf("px")?a.slice(0,-2):0)},updateDepthClass:function(b,c){return this.each(function(){var d=a(this);c=c||d.menuItemDepth(),a(this).removeClass("menu-item-depth-"+c).addClass("menu-item-depth-"+b)})},shiftDepthClass:function(b){return this.each(function(){var c=a(this),d=c.menuItemDepth();a(this).removeClass("menu-item-depth-"+d).addClass("menu-item-depth-"+(d+b))})},childMenuItems:function(){var b=a();return this.each(function(){for(var c=a(this),d=c.menuItemDepth(),e=c.next();e.length&&e.menuItemDepth()>d;)b=b.add(e),e=e.next()}),b},shiftHorizontally:function(b){return this.each(function(){var c=a(this),d=c.menuItemDepth(),e=d+b;c.moveHorizontally(e,d)})},moveHorizontally:function(b,c){return this.each(function(){var d=a(this),e=d.childMenuItems(),f=b-c,g=d.find(".is-submenu");d.updateDepthClass(b,c).updateParentMenuItemDBId(),e&&e.each(function(){var b=a(this),c=b.menuItemDepth(),d=c+f;b.updateDepthClass(d,c).updateParentMenuItemDBId()}),0===b?g.hide():g.show()})},updateParentMenuItemDBId:function(){return this.each(function(){var b=a(this),c=b.find(".menu-item-data-parent-id"),d=parseInt(b.menuItemDepth(),10),e=d-1,f=b.prevAll(".menu-item-depth-"+e).first();c.val(0===d?0:f.find(".menu-item-data-db-id").val())})},hideAdvancedMenuItemFields:function(){return this.each(function(){var b=a(this);a(".hide-column-tog").not(":checked").each(function(){b.find(".field-"+a(this).val()).addClass("hidden-field")})})},addSelectedToMenu:function(c){return 0===a("#menu-to-edit").length?!1:this.each(function(){var d=a(this),e={},f=d.find(menus.oneThemeLocationNoMenus&&0===d.find(".tabs-panel-active .categorychecklist li input:checked").length?'#page-all li input[type="checkbox"]':".tabs-panel-active .categorychecklist li input:checked"),g=/menu-item\[([^\]]*)/;return c=c||b.addMenuItemToBottom,f.length?(d.find(".spinner").addClass("is-active"),a(f).each(function(){var d=a(this),f=g.exec(d.attr("name")),h="undefined"==typeof f[1]?0:parseInt(f[1],10);this.className&&-1!=this.className.indexOf("add-to-top")&&(c=b.addMenuItemToTop),e[h]=d.closest("li").getItemData("add-menu-item",h)}),void b.addItemToMenu(e,c,function(){f.removeAttr("checked"),d.find(".spinner").removeClass("is-active")})):!1})},getItemData:function(a,b){a=a||"menu-item";var c,d={},e=["menu-item-db-id","menu-item-object-id","menu-item-object","menu-item-parent-id","menu-item-position","menu-item-type","menu-item-title","menu-item-url","menu-item-description","menu-item-attr-title","menu-item-target","menu-item-classes","menu-item-xfn"];return b||"menu-item"!=a||(b=this.find(".menu-item-data-db-id").val()),b?(this.find("input").each(function(){var f;for(c=e.length;c--;)"menu-item"==a?f=e[c]+"["+b+"]":"add-menu-item"==a&&(f="menu-item["+b+"]["+e[c]+"]"),this.name&&f==this.name&&(d[e[c]]=this.value)}),d):d},setItemData:function(b,c,d){return c=c||"menu-item",d||"menu-item"!=c||(d=a(".menu-item-data-db-id",this).val()),d?(this.find("input").each(function(){var e,f=a(this);a.each(b,function(a,b){"menu-item"==c?e=a+"["+d+"]":"add-menu-item"==c&&(e="menu-item["+d+"]["+a+"]"),e==f.attr("name")&&f.val(b)})}),this):this}})},countMenuItems:function(b){return a(".menu-item-depth-"+b).length},moveMenuItem:function(c,d){var e,f,g,h=a("#menu-to-edit li"),i=h.length,j=c.parents("li.menu-item"),k=j.childMenuItems(),l=j.getItemData(),m=parseInt(j.menuItemDepth(),10),n=parseInt(j.index(),10),o=j.next(),p=o.childMenuItems(),q=parseInt(o.menuItemDepth(),10)+1,r=j.prev(),s=parseInt(r.menuItemDepth(),10),t=r.getItemData()["menu-item-db-id"];switch(d){case"up":if(f=n-1,0===n)break;0===f&&0!==m&&j.moveHorizontally(0,m),0!==s&&j.moveHorizontally(s,m),k?(e=j.add(k),e.detach().insertBefore(h.eq(f)).updateParentMenuItemDBId()):j.detach().insertBefore(h.eq(f)).updateParentMenuItemDBId();break;case"down":if(k){if(e=j.add(k),o=h.eq(e.length+n),p=0!==o.childMenuItems().length,p&&(g=parseInt(o.menuItemDepth(),10)+1,j.moveHorizontally(g,m)),i===n+e.length)break;e.detach().insertAfter(h.eq(n+e.length)).updateParentMenuItemDBId()}else{if(0!==p.length&&j.moveHorizontally(q,m),i===n+1)breaLine truncated
|
||||
var wpNavMenu;!function(a){var b;b=wpNavMenu={options:{menuItemDepthPerLevel:30,globalMaxDepth:11},menuList:void 0,targetList:void 0,menusChanged:!1,isRTL:!("undefined"==typeof isRtl||!isRtl),negateIfRTL:"undefined"!=typeof isRtl&&isRtl?-1:1,init:function(){b.menuList=a("#menu-to-edit"),b.targetList=b.menuList,this.jQueryExtensions(),this.attachMenuEditListeners(),this.setupInputWithDefaultTitle(),this.attachQuickSearchListeners(),this.attachThemeLocationsListeners(),this.attachTabsPanelListeners(),this.attachUnsavedChangesListener(),b.menuList.length&&this.initSortables(),menus.oneThemeLocationNoMenus&&a("#posttype-page").addSelectedToMenu(b.addMenuItemToBottom),this.initManageLocations(),this.initAccessibility(),this.initToggles(),this.initPreviewing()},jQueryExtensions:function(){a.fn.extend({menuItemDepth:function(){var a=this.eq(0).css(b.isRTL?"margin-right":"margin-left");return b.pxToDepth(a&&-1!=a.indexOf("px")?a.slice(0,-2):0)},updateDepthClass:function(b,c){return this.each(function(){var d=a(this);c=c||d.menuItemDepth(),a(this).removeClass("menu-item-depth-"+c).addClass("menu-item-depth-"+b)})},shiftDepthClass:function(b){return this.each(function(){var c=a(this),d=c.menuItemDepth();a(this).removeClass("menu-item-depth-"+d).addClass("menu-item-depth-"+(d+b))})},childMenuItems:function(){var b=a();return this.each(function(){for(var c=a(this),d=c.menuItemDepth(),e=c.next();e.length&&e.menuItemDepth()>d;)b=b.add(e),e=e.next()}),b},shiftHorizontally:function(b){return this.each(function(){var c=a(this),d=c.menuItemDepth(),e=d+b;c.moveHorizontally(e,d)})},moveHorizontally:function(b,c){return this.each(function(){var d=a(this),e=d.childMenuItems(),f=b-c,g=d.find(".is-submenu");d.updateDepthClass(b,c).updateParentMenuItemDBId(),e&&e.each(function(){var b=a(this),c=b.menuItemDepth(),d=c+f;b.updateDepthClass(d,c).updateParentMenuItemDBId()}),0===b?g.hide():g.show()})},updateParentMenuItemDBId:function(){return this.each(function(){var b=a(this),c=b.find(".menu-item-data-parent-id"),d=parseInt(b.menuItemDepth(),10),e=d-1,f=b.prevAll(".menu-item-depth-"+e).first();c.val(0===d?0:f.find(".menu-item-data-db-id").val())})},hideAdvancedMenuItemFields:function(){return this.each(function(){var b=a(this);a(".hide-column-tog").not(":checked").each(function(){b.find(".field-"+a(this).val()).addClass("hidden-field")})})},addSelectedToMenu:function(c){return 0===a("#menu-to-edit").length?!1:this.each(function(){var d=a(this),e={},f=d.find(menus.oneThemeLocationNoMenus&&0===d.find(".tabs-panel-active .categorychecklist li input:checked").length?'#page-all li input[type="checkbox"]':".tabs-panel-active .categorychecklist li input:checked"),g=/menu-item\[([^\]]*)/;return c=c||b.addMenuItemToBottom,f.length?(d.find(".spinner").addClass("is-active"),a(f).each(function(){var d=a(this),f=g.exec(d.attr("name")),h="undefined"==typeof f[1]?0:parseInt(f[1],10);this.className&&-1!=this.className.indexOf("add-to-top")&&(c=b.addMenuItemToTop),e[h]=d.closest("li").getItemData("add-menu-item",h)}),void b.addItemToMenu(e,c,function(){f.removeAttr("checked"),d.find(".spinner").removeClass("is-active")})):!1})},getItemData:function(a,b){a=a||"menu-item";var c,d={},e=["menu-item-db-id","menu-item-object-id","menu-item-object","menu-item-parent-id","menu-item-position","menu-item-type","menu-item-title","menu-item-url","menu-item-description","menu-item-attr-title","menu-item-target","menu-item-classes","menu-item-xfn"];return b||"menu-item"!=a||(b=this.find(".menu-item-data-db-id").val()),b?(this.find("input").each(function(){var f;for(c=e.length;c--;)"menu-item"==a?f=e[c]+"["+b+"]":"add-menu-item"==a&&(f="menu-item["+b+"]["+e[c]+"]"),this.name&&f==this.name&&(d[e[c]]=this.value)}),d):d},setItemData:function(b,c,d){return c=c||"menu-item",d||"menu-item"!=c||(d=a(".menu-item-data-db-id",this).val()),d?(this.find("input").each(function(){var e,f=a(this);a.each(b,function(a,b){"menu-item"==c?e=a+"["+d+"]":"add-menu-item"==c&&(e="menu-item["+d+"]["+a+"]"),e==f.attr("name")&&f.val(b)})}),this):this}})},countMenuItems:function(b){return a(".menu-item-depth-"+b).length},moveMenuItem:function(c,d){var e,f,g,h=a("#menu-to-edit li"),i=h.length,j=c.parents("li.menu-item"),k=j.childMenuItems(),l=j.getItemData(),m=parseInt(j.menuItemDepth(),10),n=parseInt(j.index(),10),o=j.next(),p=o.childMenuItems(),q=parseInt(o.menuItemDepth(),10)+1,r=j.prev(),s=parseInt(r.menuItemDepth(),10),t=r.getItemData()["menu-item-db-id"];switch(d){case"up":if(f=n-1,0===n)break;0===f&&0!==m&&j.moveHorizontally(0,m),0!==s&&j.moveHorizontally(s,m),k?(e=j.add(k),e.detach().insertBefore(h.eq(f)).updateParentMenuItemDBId()):j.detach().insertBefore(h.eq(f)).updateParentMenuItemDBId();break;case"down":if(k){if(e=j.add(k),o=h.eq(e.length+n),p=0!==o.childMenuItems().length,p&&(g=parseInt(o.menuItemDepth(),10)+1,j.moveHorizontally(g,m)),i===n+e.length)break;e.detach().insertAfter(h.eq(n+e.length)).updateParentMenuItemDBId()}else{if(0!==p.length&&j.moveHorizontally(q,m),i===n+1)breaLine truncated
|
||||
+15
-3
@@ -250,7 +250,7 @@ window.wp = window.wp || {};
|
||||
wp.updates.updateError = function( response ) {
|
||||
var $message, name;
|
||||
wp.updates.updateDoneSuccessfully = false;
|
||||
if ( response.errorCode && response.errorCode == 'unable_to_connect_to_filesystem' ) {
|
||||
if ( response.errorCode && response.errorCode == 'unable_to_connect_to_filesystem' && wp.updates.shouldRequestFilesystemCredentials ) {
|
||||
wp.updates.credentialError( response, 'update-plugin' );
|
||||
return;
|
||||
}
|
||||
@@ -263,10 +263,18 @@ window.wp = window.wp || {};
|
||||
$message.attr( 'aria-label', wp.updates.l10n.updateFailedLabel.replace( '%s', name ) );
|
||||
}
|
||||
$message.removeClass( 'updating-message' );
|
||||
$message.text( wp.updates.l10n.updateFailed );
|
||||
$message.html( wp.updates.l10n.updateFailed + ': ' + response.error );
|
||||
wp.a11y.speak( wp.updates.l10n.updateFailed );
|
||||
|
||||
/*
|
||||
* The lock can be released since this failure was
|
||||
* after the credentials form.
|
||||
*/
|
||||
wp.updates.updateLock = false;
|
||||
|
||||
$(document).trigger( 'wp-plugin-update-error', response );
|
||||
|
||||
wp.updates.queueChecker();
|
||||
};
|
||||
|
||||
/**
|
||||
@@ -467,6 +475,11 @@ window.wp = window.wp || {};
|
||||
wp.updates.requestForCredentialsModalCancel();
|
||||
});
|
||||
|
||||
// Hide SSH fields when not selected
|
||||
$( '#request-filesystem-credentials-dialog input[name="connection_type"]' ).on( 'change', function() {
|
||||
$( this ).parents( 'form' ).find( '#private_key, #public_key' ).parents( 'label' ).toggle( ( 'ssh' == $( this ).val() ) );
|
||||
}).change();
|
||||
|
||||
// Click handler for plugin updates in List Table view.
|
||||
$( '.plugin-update-tr' ).on( 'click', '.update-link', function( e ) {
|
||||
e.preventDefault();
|
||||
@@ -490,7 +503,6 @@ window.wp = window.wp || {};
|
||||
wp.updates.updatePlugin( $button.data( 'plugin' ), $button.data( 'slug' ) );
|
||||
} );
|
||||
|
||||
//
|
||||
$( '#plugin_update_from_iframe' ).on( 'click' , function( e ) {
|
||||
var target, data;
|
||||
|
||||
|
||||
Vendored
+1
-1
@@ -1 +1 @@
|
||||
window.wp=window.wp||{},function(a,b,c){b.updates={},b.updates.ajaxNonce=window._wpUpdatesSettings.ajax_nonce,b.updates.l10n=window._wpUpdatesSettings.l10n,b.updates.shouldRequestFilesystemCredentials=null,b.updates.filesystemCredentials={ftp:{host:null,username:null,password:null,connectionType:null},ssh:{publicKey:null,privateKey:null}},b.updates.updateLock=!1,b.updates.updateDoneSuccessfully=!1,b.updates.updateQueue=[],b.updates.$elToReturnFocusToFromCredentialsModal=null,b.updates.decrementCount=function(b){var c,d,e=a("#wp-admin-bar-updates .ab-label"),f=a('a[href="update-core.php"] .update-plugins'),g=a("#menu-plugins");if(c=e.text(),c=parseInt(c,10)-1,!(0>c||isNaN(c))&&(a("#wp-admin-bar-updates .ab-item").removeAttr("title"),e.text(c),f.each(function(a,b){b.className=b.className.replace(/count-\d+/,"count-"+c)}),f.removeAttr("title"),f.find(".update-count").text(c),"plugin"===b)){if(d=g.find(".plugin-count").eq(0).text(),d=parseInt(d,10)-1,0>d||isNaN(d))return;g.find(".plugin-count").text(d),g.find(".update-plugins").each(function(a,b){b.className=b.className.replace(/count-\d+/,"count-"+d)}),d>0?a(".subsubsub .upgrade .count").text("("+d+")"):a(".subsubsub .upgrade").remove()}},b.updates.updatePlugin=function(d,e){var f,g;if("plugins"===c||"plugins-network"===c?f=a('[data-slug="'+e+'"]').next().find(".update-message"):"plugin-install"===c&&(f=a(".plugin-card-"+e).find(".update-now"),g=f.data("name"),f.attr("aria-label",b.updates.l10n.updatingLabel.replace("%s",g))),f.addClass("updating-message"),f.html()!==b.updates.l10n.updating&&f.data("originaltext",f.html()),f.text(b.updates.l10n.updating),b.a11y.speak(b.updates.l10n.updatingMsg),b.updates.updateLock)return void b.updates.updateQueue.push({type:"update-plugin",data:{plugin:d,slug:e}});b.updates.updateLock=!0;var h={_ajax_nonce:b.updates.ajaxNonce,plugin:d,slug:e,username:b.updates.filesystemCredentials.ftp.username,password:b.updates.filesystemCredentials.ftp.password,hostname:b.updates.filesystemCredentials.ftp.hostname,connection_type:b.updates.filesystemCredentials.ftp.connectionType,public_key:b.updates.filesystemCredentials.ssh.publicKey,private_key:b.updates.filesystemCredentials.ssh.privateKey};b.ajax.post("update-plugin",h).done(b.updates.updateSuccess).fail(b.updates.updateError)},b.updates.updateSuccess=function(d){var e,f,g,h;"plugins"===c||"plugins-network"===c?(g=a('[data-slug="'+d.slug+'"]').first(),e=g.next().find(".update-message"),g.addClass("updated").removeClass("update"),h=g.find(".plugin-version-author-uri").html().replace(d.oldVersion,d.newVersion),g.find(".plugin-version-author-uri").html(h),g.next().addClass("updated")):"plugin-install"===c&&(e=a(".plugin-card-"+d.slug).find(".update-now"),e.addClass("button-disabled"),f=e.data("name"),e.attr("aria-label",b.updates.l10n.updatedLabel.replace("%s",f))),e.removeClass("updating-message").addClass("updated-message"),e.text(b.updates.l10n.updated),b.a11y.speak(b.updates.l10n.updatedMsg),b.updates.decrementCount("plugin"),b.updates.updateDoneSuccessfully=!0,b.updates.updateLock=!1,a(document).trigger("wp-plugin-update-success",d),b.updates.queueChecker()},b.updates.updateError=function(d){var e,f;return b.updates.updateDoneSuccessfully=!1,d.errorCode&&"unable_to_connect_to_filesystem"==d.errorCode?void b.updates.credentialError(d,"update-plugin"):("plugins"===c||"plugins-network"===c?e=a('[data-slug="'+d.slug+'"]').next().find(".update-message"):"plugin-install"===c&&(e=a(".plugin-card-"+d.slug).find(".update-now"),f=e.data("name"),e.attr("aria-label",b.updates.l10n.updateFailedLabel.replace("%s",f))),e.removeClass("updating-message"),e.text(b.updates.l10n.updateFailed),b.a11y.speak(b.updates.l10n.updateFailed),void a(document).trigger("wp-plugin-update-error",d))},b.updates.showErrorInCredentialsForm=function(b){var c=a(".notification-dialog");c.find(".error").remove(),c.find("h3").after('<div class="error">'+b+"</div>")},b.updates.credentialError=function(a,c){b.updates.updateQueue.push({type:c,data:{plugin:a.plugin,slug:a.slug}}),b.updates.showErrorInCredentialsForm(a.error),b.updates.requestFilesystemCredentials()},b.updates.queueChecker=function(){if(!(b.updates.updateLock||b.updates.updateQueue.length<=0)){var a=b.updates.updateQueue.shift();b.updates.updatePlugin(a.data.plugin,a.data.slug)}},b.updates.requestFilesystemCredentials=function(d){b.updates.updateDoneSuccessfully===!1&&("plugin-install"===c&&d&&(b.updates.$elToReturnFocusToFromCredentialsModal=a(d.target)),b.updates.updateLock=!0,b.updates.requestForCredentialsModalOpen())},b.updates.keydown=function(c){27===c.keyCode?b.updates.requestForCredentialsModalCancel():9===c.keyCode&&("upgrade"!==c.target.id||c.shiftKey?"hostname"===c.target.id&&c.shiftKey&&(a("#upgrade").focus(),c.preventDefault()):(a("#hostname").focus(),c.preventDefault()))},b.updates.requestForCredentialsModalOpen=function(){var c=a("#request-filesystem-credentials-dialog");a("body").addClass("modal-open"),c.show(),c.find("input:enabled:first").fLine truncated
|
||||
window.wp=window.wp||{},function(a,b,c){b.updates={},b.updates.ajaxNonce=window._wpUpdatesSettings.ajax_nonce,b.updates.l10n=window._wpUpdatesSettings.l10n,b.updates.shouldRequestFilesystemCredentials=null,b.updates.filesystemCredentials={ftp:{host:null,username:null,password:null,connectionType:null},ssh:{publicKey:null,privateKey:null}},b.updates.updateLock=!1,b.updates.updateDoneSuccessfully=!1,b.updates.updateQueue=[],b.updates.$elToReturnFocusToFromCredentialsModal=null,b.updates.decrementCount=function(b){var c,d,e=a("#wp-admin-bar-updates .ab-label"),f=a('a[href="update-core.php"] .update-plugins'),g=a("#menu-plugins");if(c=e.text(),c=parseInt(c,10)-1,!(0>c||isNaN(c))&&(a("#wp-admin-bar-updates .ab-item").removeAttr("title"),e.text(c),f.each(function(a,b){b.className=b.className.replace(/count-\d+/,"count-"+c)}),f.removeAttr("title"),f.find(".update-count").text(c),"plugin"===b)){if(d=g.find(".plugin-count").eq(0).text(),d=parseInt(d,10)-1,0>d||isNaN(d))return;g.find(".plugin-count").text(d),g.find(".update-plugins").each(function(a,b){b.className=b.className.replace(/count-\d+/,"count-"+d)}),d>0?a(".subsubsub .upgrade .count").text("("+d+")"):a(".subsubsub .upgrade").remove()}},b.updates.updatePlugin=function(d,e){var f,g;if("plugins"===c||"plugins-network"===c?f=a('[data-slug="'+e+'"]').next().find(".update-message"):"plugin-install"===c&&(f=a(".plugin-card-"+e).find(".update-now"),g=f.data("name"),f.attr("aria-label",b.updates.l10n.updatingLabel.replace("%s",g))),f.addClass("updating-message"),f.html()!==b.updates.l10n.updating&&f.data("originaltext",f.html()),f.text(b.updates.l10n.updating),b.a11y.speak(b.updates.l10n.updatingMsg),b.updates.updateLock)return void b.updates.updateQueue.push({type:"update-plugin",data:{plugin:d,slug:e}});b.updates.updateLock=!0;var h={_ajax_nonce:b.updates.ajaxNonce,plugin:d,slug:e,username:b.updates.filesystemCredentials.ftp.username,password:b.updates.filesystemCredentials.ftp.password,hostname:b.updates.filesystemCredentials.ftp.hostname,connection_type:b.updates.filesystemCredentials.ftp.connectionType,public_key:b.updates.filesystemCredentials.ssh.publicKey,private_key:b.updates.filesystemCredentials.ssh.privateKey};b.ajax.post("update-plugin",h).done(b.updates.updateSuccess).fail(b.updates.updateError)},b.updates.updateSuccess=function(d){var e,f,g,h;"plugins"===c||"plugins-network"===c?(g=a('[data-slug="'+d.slug+'"]').first(),e=g.next().find(".update-message"),g.addClass("updated").removeClass("update"),h=g.find(".plugin-version-author-uri").html().replace(d.oldVersion,d.newVersion),g.find(".plugin-version-author-uri").html(h),g.next().addClass("updated")):"plugin-install"===c&&(e=a(".plugin-card-"+d.slug).find(".update-now"),e.addClass("button-disabled"),f=e.data("name"),e.attr("aria-label",b.updates.l10n.updatedLabel.replace("%s",f))),e.removeClass("updating-message").addClass("updated-message"),e.text(b.updates.l10n.updated),b.a11y.speak(b.updates.l10n.updatedMsg),b.updates.decrementCount("plugin"),b.updates.updateDoneSuccessfully=!0,b.updates.updateLock=!1,a(document).trigger("wp-plugin-update-success",d),b.updates.queueChecker()},b.updates.updateError=function(d){var e,f;return b.updates.updateDoneSuccessfully=!1,d.errorCode&&"unable_to_connect_to_filesystem"==d.errorCode&&b.updates.shouldRequestFilesystemCredentials?void b.updates.credentialError(d,"update-plugin"):("plugins"===c||"plugins-network"===c?e=a('[data-slug="'+d.slug+'"]').next().find(".update-message"):"plugin-install"===c&&(e=a(".plugin-card-"+d.slug).find(".update-now"),f=e.data("name"),e.attr("aria-label",b.updates.l10n.updateFailedLabel.replace("%s",f))),e.removeClass("updating-message"),e.html(b.updates.l10n.updateFailed+": "+d.error),b.a11y.speak(b.updates.l10n.updateFailed),b.updates.updateLock=!1,a(document).trigger("wp-plugin-update-error",d),void b.updates.queueChecker())},b.updates.showErrorInCredentialsForm=function(b){var c=a(".notification-dialog");c.find(".error").remove(),c.find("h3").after('<div class="error">'+b+"</div>")},b.updates.credentialError=function(a,c){b.updates.updateQueue.push({type:c,data:{plugin:a.plugin,slug:a.slug}}),b.updates.showErrorInCredentialsForm(a.error),b.updates.requestFilesystemCredentials()},b.updates.queueChecker=function(){if(!(b.updates.updateLock||b.updates.updateQueue.length<=0)){var a=b.updates.updateQueue.shift();b.updates.updatePlugin(a.data.plugin,a.data.slug)}},b.updates.requestFilesystemCredentials=function(d){b.updates.updateDoneSuccessfully===!1&&("plugin-install"===c&&d&&(b.updates.$elToReturnFocusToFromCredentialsModal=a(d.target)),b.updates.updateLock=!0,b.updates.requestForCredentialsModalOpen())},b.updates.keydown=function(c){27===c.keyCode?b.updates.requestForCredentialsModalCancel():9===c.keyCode&&("upgrade"!==c.target.id||c.shiftKey?"hostname"===c.target.id&&c.shiftKey&&(a("#upgrade").focus(),c.preventDefault()):(a("#hostname").focus(),c.preventDefault()))},b.updates.requestForCredentialsModalOpen=function(){var c=a("#requeLine truncated
|
||||
+10
-6
@@ -1,6 +1,7 @@
|
||||
/*global ajaxurl, isRtl */
|
||||
var wpWidgets;
|
||||
(function($) {
|
||||
var $document = $( document );
|
||||
|
||||
wpWidgets = {
|
||||
|
||||
@@ -22,10 +23,13 @@ wpWidgets = {
|
||||
} else {
|
||||
$wrap.addClass('closed');
|
||||
}
|
||||
|
||||
$document.triggerHandler( 'wp-pin-menu' );
|
||||
});
|
||||
|
||||
$('#widgets-left .sidebar-name').click( function() {
|
||||
$(this).closest('.widgets-holder-wrap').toggleClass('closed');
|
||||
$document.triggerHandler( 'wp-pin-menu' );
|
||||
});
|
||||
|
||||
$(document.body).bind('click.widgets-toggle', function(e) {
|
||||
@@ -89,7 +93,7 @@ wpWidgets = {
|
||||
distance: 2,
|
||||
helper: 'clone',
|
||||
zIndex: 100,
|
||||
containment: 'document',
|
||||
containment: '#wpwrap',
|
||||
start: function( event, ui ) {
|
||||
var chooser = $(this).find('.widgets-chooser');
|
||||
|
||||
@@ -119,7 +123,7 @@ wpWidgets = {
|
||||
handle: '> .widget-top > .widget-title',
|
||||
cursor: 'move',
|
||||
distance: 2,
|
||||
containment: 'document',
|
||||
containment: '#wpwrap',
|
||||
start: function( event, ui ) {
|
||||
var height, $this = $(this),
|
||||
$wrap = $this.parent(),
|
||||
@@ -174,7 +178,7 @@ wpWidgets = {
|
||||
|
||||
wpWidgets.save( $widget, 0, 0, 1 );
|
||||
$widget.find('input.add_new').val('');
|
||||
$( document ).trigger( 'widget-added', [ $widget ] );
|
||||
$document.trigger( 'widget-added', [ $widget ] );
|
||||
}
|
||||
|
||||
$sidebar = $widget.parent();
|
||||
@@ -381,7 +385,7 @@ wpWidgets = {
|
||||
if ( r && r.length > 2 ) {
|
||||
$( 'div.widget-content', widget ).html( r );
|
||||
wpWidgets.appendTitle( widget );
|
||||
$( document ).trigger( 'widget-updated', [ widget ] );
|
||||
$document.trigger( 'widget-updated', [ widget ] );
|
||||
}
|
||||
}
|
||||
if ( order ) {
|
||||
@@ -446,7 +450,7 @@ wpWidgets = {
|
||||
// No longer "new" widget
|
||||
widget.find( 'input.add_new' ).val('');
|
||||
|
||||
$( document ).trigger( 'widget-added', [ widget ] );
|
||||
$document.trigger( 'widget-added', [ widget ] );
|
||||
|
||||
/*
|
||||
* Check if any part of the sidebar is visible in the viewport. If it is, don't scroll.
|
||||
@@ -489,6 +493,6 @@ wpWidgets = {
|
||||
}
|
||||
};
|
||||
|
||||
$(document).ready( function(){ wpWidgets.init(); } );
|
||||
$document.ready( function(){ wpWidgets.init(); } );
|
||||
|
||||
})(jQuery);
|
||||
Vendored
+1
-1
@@ -1 +1 @@
|
||||
var wpWidgets;!function(a){wpWidgets={init:function(){var b,c,d=this,e=a(".widgets-chooser"),f=e.find(".widgets-chooser-sidebars"),g=a("div.widgets-sortables"),h=!("undefined"==typeof isRtl||!isRtl);a("#widgets-right .sidebar-name").click(function(){var b=a(this),c=b.closest(".widgets-holder-wrap");c.hasClass("closed")?(c.removeClass("closed"),b.parent().sortable("refresh")):c.addClass("closed")}),a("#widgets-left .sidebar-name").click(function(){a(this).closest(".widgets-holder-wrap").toggleClass("closed")}),a(document.body).bind("click.widgets-toggle",function(b){var c,d,e,f,g,i=a(b.target),j={"z-index":100};i.parents(".widget-top").length&&!i.parents("#available-widgets").length?(c=i.closest("div.widget"),d=c.children(".widget-inside"),e=parseInt(c.find("input.widget-width").val(),10),f=c.parent().width(),d.is(":hidden")?(e>250&&e+30>f&&c.closest("div.widgets-sortables").length&&(g=c.closest("div.widget-liquid-right").length?h?"margin-right":"margin-left":h?"margin-left":"margin-right",j[g]=f-(e+30)+"px",c.css(j)),c.addClass("open"),d.slideDown("fast")):d.slideUp("fast",function(){c.attr("style",""),c.removeClass("open")}),b.preventDefault()):i.hasClass("widget-control-save")?(wpWidgets.save(i.closest("div.widget"),0,1,0),b.preventDefault()):i.hasClass("widget-control-remove")?(wpWidgets.save(i.closest("div.widget"),1,1,0),b.preventDefault()):i.hasClass("widget-control-close")&&(c=i.closest("div.widget"),c.removeClass("open"),wpWidgets.close(c),b.preventDefault())}),g.children(".widget").each(function(){var b=a(this);wpWidgets.appendTitle(this),b.find("p.widget-error").length&&b.find("a.widget-action").trigger("click")}),a("#widget-list").children(".widget").draggable({connectToSortable:"div.widgets-sortables",handle:"> .widget-top > .widget-title",distance:2,helper:"clone",zIndex:100,containment:"document",start:function(b,e){var f=a(this).find(".widgets-chooser");e.helper.find("div.widget-description").hide(),c=this.id,f.length&&(a("#wpbody-content").append(f.hide()),e.helper.find(".widgets-chooser").remove(),d.clearWidgetSelection())},stop:function(){b&&a(b).hide(),b=""}}),g.sortable({placeholder:"widget-placeholder",items:"> .widget",handle:"> .widget-top > .widget-title",cursor:"move",distance:2,containment:"document",start:function(b,c){var d,e=a(this),f=e.parent(),g=c.item.children(".widget-inside");"block"===g.css("display")&&(g.hide(),a(this).sortable("refreshPositions")),f.hasClass("closed")||(d=c.item.hasClass("ui-draggable")?e.height():1+e.height(),e.css("min-height",d+"px"))},stop:function(d,e){var f,g,h,i,j,k,l=e.item,m=c;return l.hasClass("deleting")?(wpWidgets.save(l,1,0,1),void l.remove()):(f=l.find("input.add_new").val(),g=l.find("input.multi_number").val(),l.attr("style","").removeClass("ui-draggable"),c="",f&&("multi"===f?(l.html(l.html().replace(/<[^<>]+>/g,function(a){return a.replace(/__i__|%i%/g,g)})),l.attr("id",m.replace("__i__",g)),g++,a("div#"+m).find("input.multi_number").val(g)):"single"===f&&(l.attr("id","new-"+m),b="div#"+m),wpWidgets.save(l,0,0,1),l.find("input.add_new").val(""),a(document).trigger("widget-added",[l])),h=l.parent(),h.parent().hasClass("closed")&&(h.parent().removeClass("closed"),i=h.children(".widget"),i.length>1&&(j=i.get(0),k=l.get(0),j.id&&k.id&&j.id!==k.id&&a(j).before(l))),void(f?l.find("a.widget-action").trigger("click"):wpWidgets.saveOrder(h.attr("id"))))},activate:function(){a(this).parent().addClass("widget-hover")},deactivate:function(){a(this).css("min-height","").parent().removeClass("widget-hover")},receive:function(b,c){var d=a(c.sender);return this.id.indexOf("orphaned_widgets")>-1?void d.sortable("cancel"):void(d.attr("id").indexOf("orphaned_widgets")>-1&&!d.children(".widget").length&&d.parents(".orphan-sidebar").slideUp(400,function(){a(this).remove()}))}}).sortable("option","connectWith","div.widgets-sortables"),a("#available-widgets").droppable({tolerance:"pointer",accept:function(b){return"widget-list"!==a(b).parent().attr("id")},drop:function(b,c){c.draggable.addClass("deleting"),a("#removing-widget").hide().children("span").empty()},over:function(b,c){c.draggable.addClass("deleting"),a("div.widget-placeholder").hide(),c.draggable.hasClass("ui-sortable-helper")&&a("#removing-widget").show().children("span").html(c.draggable.find("div.widget-title").children("h4").html())},out:function(b,c){c.draggable.removeClass("deleting"),a("div.widget-placeholder").show(),a("#removing-widget").hide().children("span").empty()}}),a("#widgets-right .widgets-holder-wrap").each(function(b,c){var d=a(c),e=d.find(".sidebar-name h3").text(),g=d.find(".widgets-sortables").attr("id"),h=a('<li tabindex="0">').text(a.trim(e));0===b&&h.addClass("widgets-chooser-selected"),f.append(h),h.data("sidebarId",g)}),a("#available-widgets .widget .widget-title").on("click.widgets-chooser",function(){var b=a(this).closest(".widget");b.hasClass("widget-in-question")||a("#widgets-left").hasClass("chooser")?d.closeChooser():(d.clearWidgetSelection(),a("#widgets-left").addLine truncated
|
||||
var wpWidgets;!function(a){var b=a(document);wpWidgets={init:function(){var c,d,e=this,f=a(".widgets-chooser"),g=f.find(".widgets-chooser-sidebars"),h=a("div.widgets-sortables"),i=!("undefined"==typeof isRtl||!isRtl);a("#widgets-right .sidebar-name").click(function(){var c=a(this),d=c.closest(".widgets-holder-wrap");d.hasClass("closed")?(d.removeClass("closed"),c.parent().sortable("refresh")):d.addClass("closed"),b.triggerHandler("wp-pin-menu")}),a("#widgets-left .sidebar-name").click(function(){a(this).closest(".widgets-holder-wrap").toggleClass("closed"),b.triggerHandler("wp-pin-menu")}),a(document.body).bind("click.widgets-toggle",function(b){var c,d,e,f,g,h=a(b.target),j={"z-index":100};h.parents(".widget-top").length&&!h.parents("#available-widgets").length?(c=h.closest("div.widget"),d=c.children(".widget-inside"),e=parseInt(c.find("input.widget-width").val(),10),f=c.parent().width(),d.is(":hidden")?(e>250&&e+30>f&&c.closest("div.widgets-sortables").length&&(g=c.closest("div.widget-liquid-right").length?i?"margin-right":"margin-left":i?"margin-left":"margin-right",j[g]=f-(e+30)+"px",c.css(j)),c.addClass("open"),d.slideDown("fast")):d.slideUp("fast",function(){c.attr("style",""),c.removeClass("open")}),b.preventDefault()):h.hasClass("widget-control-save")?(wpWidgets.save(h.closest("div.widget"),0,1,0),b.preventDefault()):h.hasClass("widget-control-remove")?(wpWidgets.save(h.closest("div.widget"),1,1,0),b.preventDefault()):h.hasClass("widget-control-close")&&(c=h.closest("div.widget"),c.removeClass("open"),wpWidgets.close(c),b.preventDefault())}),h.children(".widget").each(function(){var b=a(this);wpWidgets.appendTitle(this),b.find("p.widget-error").length&&b.find("a.widget-action").trigger("click")}),a("#widget-list").children(".widget").draggable({connectToSortable:"div.widgets-sortables",handle:"> .widget-top > .widget-title",distance:2,helper:"clone",zIndex:100,containment:"#wpwrap",start:function(b,c){var f=a(this).find(".widgets-chooser");c.helper.find("div.widget-description").hide(),d=this.id,f.length&&(a("#wpbody-content").append(f.hide()),c.helper.find(".widgets-chooser").remove(),e.clearWidgetSelection())},stop:function(){c&&a(c).hide(),c=""}}),h.sortable({placeholder:"widget-placeholder",items:"> .widget",handle:"> .widget-top > .widget-title",cursor:"move",distance:2,containment:"#wpwrap",start:function(b,c){var d,e=a(this),f=e.parent(),g=c.item.children(".widget-inside");"block"===g.css("display")&&(g.hide(),a(this).sortable("refreshPositions")),f.hasClass("closed")||(d=c.item.hasClass("ui-draggable")?e.height():1+e.height(),e.css("min-height",d+"px"))},stop:function(e,f){var g,h,i,j,k,l,m=f.item,n=d;return m.hasClass("deleting")?(wpWidgets.save(m,1,0,1),void m.remove()):(g=m.find("input.add_new").val(),h=m.find("input.multi_number").val(),m.attr("style","").removeClass("ui-draggable"),d="",g&&("multi"===g?(m.html(m.html().replace(/<[^<>]+>/g,function(a){return a.replace(/__i__|%i%/g,h)})),m.attr("id",n.replace("__i__",h)),h++,a("div#"+n).find("input.multi_number").val(h)):"single"===g&&(m.attr("id","new-"+n),c="div#"+n),wpWidgets.save(m,0,0,1),m.find("input.add_new").val(""),b.trigger("widget-added",[m])),i=m.parent(),i.parent().hasClass("closed")&&(i.parent().removeClass("closed"),j=i.children(".widget"),j.length>1&&(k=j.get(0),l=m.get(0),k.id&&l.id&&k.id!==l.id&&a(k).before(m))),void(g?m.find("a.widget-action").trigger("click"):wpWidgets.saveOrder(i.attr("id"))))},activate:function(){a(this).parent().addClass("widget-hover")},deactivate:function(){a(this).css("min-height","").parent().removeClass("widget-hover")},receive:function(b,c){var d=a(c.sender);return this.id.indexOf("orphaned_widgets")>-1?void d.sortable("cancel"):void(d.attr("id").indexOf("orphaned_widgets")>-1&&!d.children(".widget").length&&d.parents(".orphan-sidebar").slideUp(400,function(){a(this).remove()}))}}).sortable("option","connectWith","div.widgets-sortables"),a("#available-widgets").droppable({tolerance:"pointer",accept:function(b){return"widget-list"!==a(b).parent().attr("id")},drop:function(b,c){c.draggable.addClass("deleting"),a("#removing-widget").hide().children("span").empty()},over:function(b,c){c.draggable.addClass("deleting"),a("div.widget-placeholder").hide(),c.draggable.hasClass("ui-sortable-helper")&&a("#removing-widget").show().children("span").html(c.draggable.find("div.widget-title").children("h4").html())},out:function(b,c){c.draggable.removeClass("deleting"),a("div.widget-placeholder").show(),a("#removing-widget").hide().children("span").empty()}}),a("#widgets-right .widgets-holder-wrap").each(function(b,c){var d=a(c),e=d.find(".sidebar-name h3").text(),f=d.find(".widgets-sortables").attr("id"),h=a('<li tabindex="0">').text(a.trim(e));0===b&&h.addClass("widgets-chooser-selected"),g.append(h),h.data("sidebarId",f)}),a("#available-widgets .widget .widget-title").on("click.widgets-chooser",function(){var b=a(this).closest(".widget");b.hasClass("widget-in-question")||a("#widgets-left").hasClass("choosLine truncated
|
||||
+4
-2
@@ -115,8 +115,9 @@ case 'post-quickdraft-save':
|
||||
if ( ! wp_verify_nonce( $nonce, 'add-post' ) )
|
||||
$error_msg = __( 'Unable to submit this form, please refresh and try again.' );
|
||||
|
||||
if ( ! current_user_can( 'edit_posts' ) )
|
||||
$error_msg = __( 'Oops, you don’t have access to add new drafts.' );
|
||||
if ( ! current_user_can( 'edit_posts' ) ) {
|
||||
exit;
|
||||
}
|
||||
|
||||
if ( $error_msg )
|
||||
return wp_dashboard_quick_press( $error_msg );
|
||||
@@ -159,6 +160,7 @@ case 'edit':
|
||||
wp_die( __( 'You can’t edit this item because it is in the Trash. Please restore it and try again.' ) );
|
||||
|
||||
if ( ! empty( $_GET['get-post-lock'] ) ) {
|
||||
check_admin_referer( 'lock-post_' . $post_id );
|
||||
wp_set_post_lock( $post_id );
|
||||
wp_redirect( get_edit_post_link( $post_id, 'url' ) );
|
||||
exit();
|
||||
|
||||
Binary file not shown.
+10239
-10241
File diff suppressed because it is too large.
Load diff
Binary file not shown.
+1002
-1002
File diff suppressed because it is too large.
Load diff
Binary file not shown.
File diff suppressed because it is too large.
Load diff
Binary file not shown.
+6719
-6719
File diff suppressed because it is too large.
Load diff
Binary file not shown.
@@ -1,20 +1,88 @@
|
||||
# Translation of Development in Norwegian (Bokmål)
|
||||
# This file is distributed under the same license as the Development package.
|
||||
# Translation of Development (trunk) in Norwegian (Bokmål)
|
||||
# This file is distributed under the same license as the Development (trunk) package.
|
||||
msgid ""
|
||||
msgstr ""
|
||||
"PO-Revision-Date: 2015-04-12 19:11:03+0000\n"
|
||||
"PO-Revision-Date: 2015-08-03 21:34:23+0000\n"
|
||||
"MIME-Version: 1.0\n"
|
||||
"Content-Type: text/plain; charset=UTF-8\n"
|
||||
"Content-Transfer-Encoding: 8bit\n"
|
||||
"Plural-Forms: nplurals=2; plural=n != 1;\n"
|
||||
"X-Generator: GlotPress/1.0-alpha-1000\n"
|
||||
"Project-Id-Version: Development\n"
|
||||
"X-Generator: GlotPress/1.0-alpha-1100\n"
|
||||
"Project-Id-Version: Development (trunk)\n"
|
||||
|
||||
#: views/notice.php:90
|
||||
#: views/notice.php:94
|
||||
msgid "Your API key is no longer valid. Please enter a new key or contact support@akismet.com."
|
||||
msgstr "API-nøkkelen din er ikke lenger gyldig. Vennligst oppgi en ny nøkkel, eller kontakt support@akismet.com."
|
||||
|
||||
#: views/notice.php:81 views/notice.php:108 views/notice.php:115
|
||||
msgid "Please <a href=\"%s\" target=\"_blank\">contact our support team</a> with any questions."
|
||||
msgstr "Vennligst <a href=\"%s\" target=\"_blank\">kontakt vårt support-team</a> hvis du har noen spørsmål."
|
||||
|
||||
#: views/notice.php:106
|
||||
msgid "Your Pro subscription allows the use of Akismet on only one site. Please <a href=\"%s\" target=\"_blank\">purchase additional Pro subscriptions</a> or upgrade to an Enterprise subscription that allows the use of Akismet on unlimited sites."
|
||||
msgstr "Ditt Pro-abonnement lar deg kun bruke Akismet på ett nettsted. Vennligst <a href=\"%s\" target=\"_blank\">kjøp flere Pro-abonnementer</a> eller oppgrader til et Enterprise-abonnement som lar deg bruke Akismet på et ubegrenset antall nettsteder."
|
||||
|
||||
#: views/notice.php:113
|
||||
msgid "To continue your service, <a href=\"%s\" target=\"_blank\">upgrade to an Enterprise subscription</a>, which covers an unlimited number of sites."
|
||||
msgstr "For å fortsette med tjenesten, <a href=\"%s\" target=\"_blank\">oppgrader til et enterprise-abonnement</a>, som er gyldig for et ubegrenset antall nettsteder."
|
||||
|
||||
#: views/notice.php:79
|
||||
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."
|
||||
msgstr "Siden 2012, har Akismet brukt abonnementer for alle kontoer (også gratis-kontoer). Det ser ut til at et abonnement ikke har blitt tildelt din konto, og vi setter pris på om du vil <a href=\"%s\" target=\"_blank\">logge inn i din konto</a> og velge et."
|
||||
|
||||
#: class.akismet-admin.php:515
|
||||
msgid "Akismet caught this comment as spam."
|
||||
msgstr "Akismet tror at denne kommentaren er useriøs."
|
||||
|
||||
#: class.akismet-admin.php:512
|
||||
msgid "Akismet re-checked and caught this comment as spam."
|
||||
msgstr "Akismet testet denne kommentaren på nytt og mener at den er useriøs."
|
||||
|
||||
#: class.akismet-admin.php:521
|
||||
msgid "Akismet cleared this comment."
|
||||
msgstr "Akismet godkjente denne kommentaren."
|
||||
|
||||
#: class.akismet-admin.php:536
|
||||
msgid "%s reported this comment as not spam."
|
||||
msgstr "%s rapporterte at denne kommentaren er seriøs."
|
||||
|
||||
#: class.akismet-admin.php:550
|
||||
msgid "Akismet was unable to check this comment (response: %s) but will automatically retry later."
|
||||
msgstr "Akismet kunne ikke sjekke denne kommentaren (respons: %s), men vil prøve igjen senere."
|
||||
|
||||
#: class.akismet-admin.php:518
|
||||
msgid "Akismet re-checked and cleared this comment."
|
||||
msgstr "Akismet sjekket denne kommentaren på nytt og godkjente den."
|
||||
|
||||
#: class.akismet-admin.php:528
|
||||
msgid "%s reported this comment as spam."
|
||||
msgstr "%s rapporterte denne kommentaren som useriøs."
|
||||
|
||||
#: class.akismet-admin.php:531
|
||||
msgid "This comment was reported as spam."
|
||||
msgstr "Denne kommentaren ble rappportert som useriøs"
|
||||
|
||||
#: class.akismet-admin.php:539
|
||||
msgid "This comment was reported as not spam."
|
||||
msgstr "Denne kommentaren ble rapportert som seriøs."
|
||||
|
||||
#: class.akismet-admin.php:524
|
||||
msgid "Comment was caught by wp_blacklist_check."
|
||||
msgstr "Kommentaren ble stoppet av wp_blacklist_check."
|
||||
|
||||
#: class.akismet-admin.php:569
|
||||
msgid "%1$s changed the comment status to %2$s."
|
||||
msgstr "%1$s endret status på kommentaren til %2$s."
|
||||
|
||||
#: class.akismet-admin.php:555
|
||||
msgid "Akismet was unable to recheck this comment (response: %s)."
|
||||
msgstr "Akismet kunne ikke sjekke denne kommentaren på nytt (respons: %s)."
|
||||
|
||||
#: views/notice.php:98
|
||||
msgid "The key you entered could not be verified."
|
||||
msgstr "Nøkkelen du skrev inn kunne ikke verifiseres."
|
||||
|
||||
#: views/notice.php:91
|
||||
#: views/notice.php:99
|
||||
msgid "The connection to akismet.com cannot be established. Please refer to <a href=\"%s\" target=\"_blank\">our guide about firewalls</a> and check your server configuration."
|
||||
msgstr "Koblingen til akismet.com kunne ikke etableres. Vennligst se <a href=\"%s\" target=\"_blank\">vår guide til brannmurer</a> og sjekk din serverkonfigurasjon."
|
||||
|
||||
@@ -46,10 +114,6 @@ msgstr "Deaktivert."
|
||||
msgid "SSL Status"
|
||||
msgstr "SSL-status"
|
||||
|
||||
#: views/notice.php:97
|
||||
msgid "Your Pro subscription allows the use of Akismet on only one site. Please <a href=\"http://docs.akismet.com/billing/add-more-sites/\">purchase additional Pro subscriptions</a> or upgrade to an Enterprise subscription that allows the use of Akismet on unlimited sites.<br /><br />If you have any questions, please get in touch with our support team."
|
||||
msgstr "Ditt «Pro»-abonnement lar deg kun bruke Akismet på ett nettsted. Vennligst <a href=\"http://docs.akismet.com/billing/add-more-sites/\">kjøp flere Pro-abonnementer</a> eller oppgrader til en Enterprise-konto som lar deg bruke Akismet på et ubegrenset antall nettsteder.<br /><br />Hvis du har noen spørsmål, vennligst ta kontakt med vårt support-team."
|
||||
|
||||
#: views/config.php:127
|
||||
msgid "Spam in the <a href=\"%1$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."
|
||||
@@ -64,7 +128,7 @@ msgstr "Benyttet av millioner, er Akismet muligens den beste måten i verden å
|
||||
msgid "http://akismet.com/"
|
||||
msgstr "http://akismet.com/"
|
||||
|
||||
#: class.akismet-admin.php:692
|
||||
#: class.akismet-admin.php:785
|
||||
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."
|
||||
|
||||
@@ -124,10 +188,6 @@ msgstr "Aktiv"
|
||||
msgid "There is a problem with your key."
|
||||
msgstr "Det er et problem med din nøkkel."
|
||||
|
||||
#: views/notice.php:78
|
||||
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:196 views/config.php:114
|
||||
msgid "Strictness"
|
||||
msgstr "Strenghet"
|
||||
@@ -152,19 +212,15 @@ msgstr "Kommentarer"
|
||||
msgid "Your subscription is missing."
|
||||
msgstr "Ditt abonnement mangler."
|
||||
|
||||
#: views/notice.php:99
|
||||
msgid "You're using Akismet on far too many sites for your Pro subscription."
|
||||
#: views/notice.php:111
|
||||
msgid "You’re using Akismet on far too many sites for your Pro subscription."
|
||||
msgstr "Du bruker Akismet på altfor mange nettsteder for ditt Pro-abonnement."
|
||||
|
||||
#: views/notice.php:96
|
||||
msgid "You're using your Akismet key on more sites than your Pro subscription allows."
|
||||
#: views/notice.php:104
|
||||
msgid "You’re using your Akismet key on more sites than your Pro subscription allows."
|
||||
msgstr "Du bruker din Akismet-nøkkel på flere nettsteder enn ditt Pro-abonnement tillater."
|
||||
|
||||
#: views/notice.php:100
|
||||
msgid "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."
|
||||
msgstr "For å fortsette din tjeneste, <a href=\"%s\" target=\"_blank\">oppgrader til et Enterprise-abonnement</a> som dekker ubegrenset antall nettsteder. Vennligst <a href=\"%s\" target=\"_blank\">kontakt vårt brukerstøtte-team</a> med ethvert spørsmål."
|
||||
|
||||
#: views/notice.php:82
|
||||
#: views/notice.php:86
|
||||
msgid "Your Akismet account has been successfully set up and activated. Happy blogging!"
|
||||
msgstr "Din Akismet-konto har blitt opprettet og aktivert. God blogging!"
|
||||
|
||||
@@ -172,7 +228,7 @@ msgstr "Din Akismet-konto har blitt opprettet og aktivert. God blogging!"
|
||||
msgid "Akismet %s requires WordPress 3.0 or higher."
|
||||
msgstr "Akismet %s krever WordPress 3.0 eller nyere."
|
||||
|
||||
#: views/notice.php:86
|
||||
#: views/notice.php:90
|
||||
msgid "The key you entered is invalid. Please double-check it."
|
||||
msgstr "Nøkkelen du skrev inn er ikke gyldig. Vennligst kontroller den."
|
||||
|
||||
@@ -310,10 +366,6 @@ msgstr "Ditt abonnement på %s er suspendert"
|
||||
msgid "Activate your Akismet account"
|
||||
msgstr "Aktiver din Akismet-konto"
|
||||
|
||||
#: views/notice.php:14
|
||||
msgid "<strong>Almost done</strong> - activate your account and say goodbye to comment spam"
|
||||
msgstr "<strong>Nesten ferdig</strong> - Akriver din konto og si farvel til useriøse kommentarer"
|
||||
|
||||
#: views/config.php:109
|
||||
msgid "Show approved comments"
|
||||
msgstr "Vis godkjente kommentarer"
|
||||
@@ -322,7 +374,7 @@ msgstr "Vis godkjente kommentarer"
|
||||
msgid "Save Changes"
|
||||
msgstr "Lagre endringer"
|
||||
|
||||
#: class.akismet-admin.php:438
|
||||
#: class.akismet-admin.php:443
|
||||
msgid "Awaiting spam check"
|
||||
msgstr "Avventer spam-sjekk"
|
||||
|
||||
@@ -341,7 +393,7 @@ msgstr[0] "<strong class=\"count\">%1$s useriøs kommentar</strong> stoppet av <
|
||||
msgstr[1] "<strong class=\"count\">%1$s useriøse kommentarer</strong> stoppet av <strong>Akismet</strong>"
|
||||
|
||||
#: class.akismet-admin.php:69 class.akismet-admin.php:191
|
||||
#: class.akismet-admin.php:500 views/config.php:60 views/stats.php:2
|
||||
#: class.akismet-admin.php:589 views/config.php:60 views/stats.php:2
|
||||
msgid "Settings"
|
||||
msgstr "Innstillinger"
|
||||
|
||||
@@ -355,11 +407,11 @@ msgid_plural "<a href=\"%1$s\">Akismet</a> has protected your site from %2$s spa
|
||||
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:442
|
||||
#: class.akismet-admin.php:447
|
||||
msgid "Flagged as spam by Akismet"
|
||||
msgstr "Merket som useriøst av Akismet"
|
||||
|
||||
#: class.akismet-admin.php:462
|
||||
#: class.akismet-admin.php:467
|
||||
msgid "History"
|
||||
msgstr "Historikk"
|
||||
|
||||
@@ -368,7 +420,7 @@ msgctxt "comments"
|
||||
msgid "Spam"
|
||||
msgstr "Useriøse"
|
||||
|
||||
#: class.akismet-admin.php:444
|
||||
#: class.akismet-admin.php:449
|
||||
msgid "Cleared by Akismet"
|
||||
msgstr "Godkjent av Akismet"
|
||||
|
||||
@@ -376,79 +428,43 @@ msgstr "Godkjent av Akismet"
|
||||
msgid "Comment History"
|
||||
msgstr "Kommentarhistorikk"
|
||||
|
||||
#: class.akismet-admin.php:478
|
||||
#: class.akismet-admin.php:483
|
||||
msgid "%s approved"
|
||||
msgid_plural "%s approved"
|
||||
msgstr[0] "%s godkjent"
|
||||
msgstr[1] "%s godkjente"
|
||||
|
||||
#: class.akismet.php:537
|
||||
msgid "%s reported this comment as not spam"
|
||||
msgstr "%s rapporterte denne kommentaren som ikke useriøs"
|
||||
|
||||
#: class.akismet.php:231
|
||||
msgid "Akismet caught this comment as spam"
|
||||
msgstr "Akismet fanget denne kommentaren som useriøs"
|
||||
|
||||
#: class.akismet.php:491
|
||||
msgid "%s reported this comment as spam"
|
||||
msgstr "%s rapporterte denne kommentaren som useriøs"
|
||||
|
||||
#: class.akismet.php:578
|
||||
#: class.akismet-admin.php:543
|
||||
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:233 class.akismet.php:242
|
||||
#: class.akismet-admin.php:563
|
||||
msgid "Comment status was changed to %s"
|
||||
msgstr "Status for kommentaren ble endret til %s"
|
||||
|
||||
#: class.akismet.php:580
|
||||
#: class.akismet-admin.php:546
|
||||
msgid "Akismet cleared this comment during an automatic retry."
|
||||
msgstr "Akismet godkjente denne kommentaren ved en ny automatisk kontroll."
|
||||
|
||||
#: class.akismet.php:237
|
||||
msgid "Akismet cleared this comment"
|
||||
msgstr "Akismet godkjente denne kommentaren"
|
||||
|
||||
#: class.akismet.php:240
|
||||
msgid "Comment was caught by wp_blacklist_check"
|
||||
msgstr "Kommentaren ble fanget opp av wp_blacklist_check"
|
||||
|
||||
#: class.akismet.php:247
|
||||
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-admin.php:462 class.akismet-admin.php:470
|
||||
#: class.akismet-admin.php:467 class.akismet-admin.php:475
|
||||
msgid "View comment history"
|
||||
msgstr "Se kommentarhistorikk"
|
||||
|
||||
#. #-#-#-#-# akismet.pot (Akismet 3.1.2a1) #-#-#-#-#
|
||||
#. #-#-#-#-# tmp-akismet.pot (Akismet 3.1.4a1) #-#-#-#-#
|
||||
#. Plugin Name of the plugin/theme
|
||||
#: class.akismet-admin.php:76 class.akismet-admin.php:78
|
||||
#: class.akismet-admin.php:749 views/config.php:3
|
||||
#: class.akismet-admin.php:842 views/config.php:3
|
||||
msgid "Akismet"
|
||||
msgstr "Akismet"
|
||||
|
||||
#: class.akismet-admin.php:384
|
||||
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:448
|
||||
#: class.akismet-admin.php:453
|
||||
msgid "Flagged as spam by %s"
|
||||
msgstr "Merket som useriøs av %s"
|
||||
|
||||
#: class.akismet-admin.php:374
|
||||
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:450
|
||||
#: class.akismet-admin.php:455
|
||||
msgid "Un-spammed by %s"
|
||||
msgstr "Merket som ikke useriøs av %s"
|
||||
|
||||
#: class.akismet-admin.php:380
|
||||
msgid "Akismet re-checked and cleared this comment"
|
||||
msgstr "Akismet re-sjekket og klarerte denne kommentaren"
|
||||
|
||||
#: class.akismet-widget.php:69
|
||||
msgid "Spam Blocked"
|
||||
msgstr "Useriøse kommentarer blokkert"
|
||||
@@ -474,7 +490,7 @@ msgstr "Akismet statistikk"
|
||||
msgid "Check for Spam"
|
||||
msgstr "Se etter useriøse"
|
||||
|
||||
#: class.akismet-admin.php:491
|
||||
#: class.akismet-admin.php:577
|
||||
msgid "%s ago"
|
||||
msgstr "%s siden"
|
||||
|
||||
@@ -506,6 +522,10 @@ msgstr "Merk:"
|
||||
msgid "Accuracy"
|
||||
msgstr "Treffsikkerhet"
|
||||
|
||||
#: views/notice.php:14
|
||||
msgid "<strong>Almost done</strong> - activate your account and say goodbye to comment spam"
|
||||
msgstr "<strong>Nesten ferdig</strong> – aktiver din konto og si farvel til useriøse kommentarer"
|
||||
|
||||
#: class.akismet-admin.php:206 views/config.php:170
|
||||
msgid "Subscription Type"
|
||||
msgstr "Type abonnement"
|
||||
@@ -533,11 +553,11 @@ msgstr "Oversikt"
|
||||
msgid "All time"
|
||||
msgstr "Til alle tider"
|
||||
|
||||
#: class.akismet.php:991
|
||||
#: class.akismet.php:1029
|
||||
msgid "Akismet %s requires WordPress %s or higher."
|
||||
msgstr "Akismet %s krever WordPress %s eller nyere."
|
||||
|
||||
#: class.akismet-admin.php:786
|
||||
#: class.akismet-admin.php:887
|
||||
msgid "Since you joined us, Akismet has saved you %d minutes!"
|
||||
msgstr "Siden du ble med har Aksimet spart deg for %d minutter!"
|
||||
|
||||
@@ -561,7 +581,7 @@ msgstr "Akismet brukerstøtte"
|
||||
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:782
|
||||
#: class.akismet-admin.php:883
|
||||
msgid "Since you joined us, Akismet has saved you %s days!"
|
||||
msgstr "Siden du ble med har Akismet spart deg for %s dager!"
|
||||
|
||||
@@ -606,7 +626,7 @@ msgstr "På denne siden kan du se statistikk for useriøst innhold filtrert på
|
||||
msgid "Akismet Setup"
|
||||
msgstr "Konfigurering av Akismet"
|
||||
|
||||
#: class.akismet-admin.php:784
|
||||
#: class.akismet-admin.php:885
|
||||
msgid "Since you joined us, Akismet has saved you %d hours!"
|
||||
msgstr "Siden du ble med har Akismet spart deg for %d timer!"
|
||||
|
||||
@@ -622,10 +642,6 @@ msgstr "Endre"
|
||||
msgid "The subscription status - active, cancelled or suspended"
|
||||
msgstr "Abonnementets status - aktivt, avbrutt eller avsluttet."
|
||||
|
||||
#: class.akismet.php:446
|
||||
msgid "%1$s changed the comment status to %2$s"
|
||||
msgstr "%1$s endret kommentarens status til %2$s"
|
||||
|
||||
#: 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>."
|
||||
@@ -654,7 +670,7 @@ msgstr[1] "%s udetekterte useriøse, %s falske positive"
|
||||
msgid "Akismet FAQ"
|
||||
msgstr "Akismet FAQ"
|
||||
|
||||
#: class.akismet-admin.php:779
|
||||
#: class.akismet-admin.php:880
|
||||
msgid "Cleaning up spam takes time."
|
||||
msgstr "Opprenskning av useriøst innhold tar tid."
|
||||
|
||||
@@ -683,7 +699,7 @@ msgstr "API-nøkkel"
|
||||
msgid "The Akismet subscription plan"
|
||||
msgstr "Akismet abonnementer"
|
||||
|
||||
#: class.akismet.php:991 views/notice.php:27
|
||||
#: class.akismet.php:1029 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>.."
|
||||
|
||||
|
||||
Binary file not shown.
@@ -2,79 +2,66 @@
|
||||
# This file is distributed under the same license as the Twenty Fifteen package.
|
||||
msgid ""
|
||||
msgstr ""
|
||||
"PO-Revision-Date: 2015-03-27 07:43:33+0000\n"
|
||||
"PO-Revision-Date: 2015-07-27 22:21:26+0000\n"
|
||||
"MIME-Version: 1.0\n"
|
||||
"Content-Type: text/plain; charset=UTF-8\n"
|
||||
"Content-Transfer-Encoding: 8bit\n"
|
||||
"Plural-Forms: nplurals=2; plural=n != 1;\n"
|
||||
"X-Generator: GlotPress/1.0-alpha-1000\n"
|
||||
"X-Generator: GlotPress/1.0-alpha-1100\n"
|
||||
"Project-Id-Version: Twenty Fifteen\n"
|
||||
|
||||
#. Author of the plugin/theme
|
||||
msgid "the WordPress team"
|
||||
msgstr "WordPress-gjengen"
|
||||
|
||||
#. Theme URI of the plugin/theme
|
||||
msgid "https://wordpress.org/themes/twentyfifteen/"
|
||||
msgstr "https://wordpress.org/themes/twentyfifteen/"
|
||||
|
||||
#. Description of the plugin/theme
|
||||
msgid "Our 2015 default theme is clean, blog-focused, and designed for clarity. Twenty Fifteen's simple, straightforward typography is readable on a wide variety of screen sizes, and suitable for multiple languages. We designed it using a mobile-first approach, meaning your content takes center-stage, regardless of whether your visitors arrive by smartphone, tablet, laptop, or desktop computer."
|
||||
msgstr "Vårt standardtema for 2015 er stilrent, bloggfokusert og designet for tydelighet. Twenty Fifteens enkle, ukompliserte typografi er lesbar på en lang rekke skjermstørrelser og tilpasset flere språk. Vi designet det med en mobil-først-tilnærming, som betyr at innholdet ditt får hovedfokus, uansett om dine besøkende kommer via smarttelefon, nettbrett, bærbar eller stasjonær datamaskin."
|
||||
|
||||
#. Theme Name of the plugin/theme
|
||||
msgid "Twenty Fifteen"
|
||||
msgstr "Twenty Fifteen"
|
||||
|
||||
#: single.php:37
|
||||
msgid "Previous post:"
|
||||
msgstr "Forrige innlegg:"
|
||||
|
||||
#: single.php:34
|
||||
msgid "Next post:"
|
||||
msgstr "Neste innlegg:"
|
||||
|
||||
#: inc/customizer.php:47 inc/customizer.php:63 inc/customizer.php:68
|
||||
msgid "Applied to the header on small screens and the sidebar on wide screens."
|
||||
msgstr "Benyttes i sidetoppen på små skjermer og i sidekolonnen på brede skjermer."
|
||||
|
||||
#: single.php:36
|
||||
msgid "Previous"
|
||||
msgstr "Forrige"
|
||||
|
||||
#: single.php:34
|
||||
msgid "Next post:"
|
||||
msgstr "Neste innlegg:"
|
||||
|
||||
#: single.php:33
|
||||
msgid "Next"
|
||||
msgstr "Neste"
|
||||
|
||||
#: image.php:84
|
||||
msgctxt "Parent post link"
|
||||
msgid "<span class=\"meta-nav\">Published in</span><span class=\"post-title\">%title</span>"
|
||||
msgstr "<span class=\"meta-nav\">Hører til</span><span class=\"post-title\">%title</span>"
|
||||
|
||||
#: inc/template-tags.php:91 inc/template-tags.php:99
|
||||
msgctxt "Used between list items, there is a space after the comma."
|
||||
msgid ", "
|
||||
msgstr ", "
|
||||
|
||||
#: image.php:24
|
||||
msgid "Previous Image"
|
||||
msgstr "Forrige bilde"
|
||||
|
||||
#: image.php:24
|
||||
msgid "Next Image"
|
||||
msgstr "Neste bilde"
|
||||
|
||||
#: inc/template-tags.php:23
|
||||
msgid "Comment navigation"
|
||||
msgstr "Kommentarnavigasjon"
|
||||
#: search.php:18
|
||||
msgid "Search Results for: %s"
|
||||
msgstr "Søkeresultater for: %s"
|
||||
|
||||
#: inc/template-tags.php:122
|
||||
msgid "Leave a comment"
|
||||
msgstr "Legg igjen en kommentar"
|
||||
msgid "% Comments"
|
||||
msgstr "% kommentarer"
|
||||
|
||||
#: inc/template-tags.php:122
|
||||
msgid "1 Comment"
|
||||
msgstr "1 kommentar"
|
||||
|
||||
#: inc/template-tags.php:122
|
||||
msgid "% Comments"
|
||||
msgstr "% kommentarer"
|
||||
msgid "Leave a comment"
|
||||
msgstr "Legg igjen en kommentar"
|
||||
|
||||
#: search.php:18
|
||||
msgid "Search Results for: %s"
|
||||
msgstr "Søkeresultater for: %s"
|
||||
|
||||
#. Author of the plugin/theme
|
||||
msgid "the WordPress team"
|
||||
msgstr "WordPress-gjengen"
|
||||
#: inc/template-tags.php:113
|
||||
msgctxt "Used before full size attachment link."
|
||||
msgid "Full size"
|
||||
msgstr "Full størrelse"
|
||||
|
||||
#: inc/template-tags.php:102
|
||||
msgctxt "Used before tag names."
|
||||
@@ -86,21 +73,41 @@ msgctxt "Used before category names."
|
||||
msgid "Categories"
|
||||
msgstr "Kategorier"
|
||||
|
||||
#. Theme Name of the plugin/theme
|
||||
msgid "Twenty Fifteen"
|
||||
msgstr "Twenty Fifteen"
|
||||
#: inc/template-tags.php:91 inc/template-tags.php:99
|
||||
msgctxt "Used between list items, there is a space after the comma."
|
||||
msgid ", "
|
||||
msgstr ", "
|
||||
|
||||
#: inc/template-tags.php:26
|
||||
msgid "Older Comments"
|
||||
msgstr "Eldre kommentarer"
|
||||
#: inc/template-tags.php:85
|
||||
msgctxt "Used before post author name."
|
||||
msgid "Author"
|
||||
msgstr "Forfatter"
|
||||
|
||||
#: inc/template-tags.php:55
|
||||
msgctxt "Used before post format."
|
||||
msgid "Format"
|
||||
msgstr "Format"
|
||||
|
||||
#: inc/template-tags.php:76
|
||||
msgctxt "Used before publish date."
|
||||
msgid "Posted on"
|
||||
msgstr "Publisert"
|
||||
|
||||
#: inc/template-tags.php:49
|
||||
msgid "Featured"
|
||||
msgstr "Fremhevet"
|
||||
|
||||
#: inc/template-tags.php:30
|
||||
msgid "Newer Comments"
|
||||
msgstr "Nyere kommentarer"
|
||||
|
||||
#: inc/template-tags.php:49
|
||||
msgid "Featured"
|
||||
msgstr "Fremhevet"
|
||||
#: inc/template-tags.php:26
|
||||
msgid "Older Comments"
|
||||
msgstr "Eldre kommentarer"
|
||||
|
||||
#: inc/template-tags.php:23
|
||||
msgid "Comment navigation"
|
||||
msgstr "Kommentarnavigasjon"
|
||||
|
||||
#: inc/customizer.php:147
|
||||
msgid "Blue"
|
||||
@@ -114,133 +121,66 @@ msgstr "Lilla"
|
||||
msgid "Pink"
|
||||
msgstr "Rosa"
|
||||
|
||||
#: inc/back-compat.php:37 inc/back-compat.php:47 inc/back-compat.php:60
|
||||
msgid "Twenty Fifteen requires at least WordPress version 4.1. You are running version %s. Please upgrade and try again."
|
||||
msgstr "Twenty Fifteen krever minst WordPress versjon 4.1. Du kjører versjon %s. Vennligst oppgrader og forsøk igjen."
|
||||
|
||||
#: header.php:43
|
||||
msgid "Menu and widgets"
|
||||
msgstr "Meny og widgeter"
|
||||
|
||||
#: inc/template-tags.php:113
|
||||
msgctxt "Used before full size attachment link."
|
||||
msgid "Full size"
|
||||
msgstr "Full størrelse"
|
||||
#: inc/customizer.php:114
|
||||
msgid "Yellow"
|
||||
msgstr "Gul"
|
||||
|
||||
#: inc/customizer.php:103
|
||||
msgid "Dark"
|
||||
msgstr "Mørk"
|
||||
|
||||
#: inc/customizer.php:114
|
||||
msgid "Yellow"
|
||||
msgstr "Gul"
|
||||
|
||||
#: inc/customizer.php:92
|
||||
msgid "Default"
|
||||
msgstr "Standard"
|
||||
|
||||
#: inc/template-tags.php:76
|
||||
msgctxt "Used before publish date."
|
||||
msgid "Posted on"
|
||||
msgstr "Publisert"
|
||||
|
||||
#: inc/customizer.php:31
|
||||
msgid "Base Color Scheme"
|
||||
msgstr "Grunnpalett"
|
||||
|
||||
#: inc/template-tags.php:55
|
||||
msgctxt "Used before post format."
|
||||
msgid "Format"
|
||||
msgstr "Format"
|
||||
|
||||
#: inc/template-tags.php:85
|
||||
msgctxt "Used before post author name."
|
||||
msgid "Author"
|
||||
msgstr "Forfatter"
|
||||
|
||||
#: inc/customizer.php:46
|
||||
msgid "Header and Sidebar Text Color"
|
||||
msgstr "Tekstfarge i sidetopp og sidekolonne"
|
||||
|
||||
#: inc/customizer.php:62
|
||||
msgid "Header and Sidebar Background Color"
|
||||
msgstr "Bakgrunnsfarge i sidetopp og sidekolonne"
|
||||
|
||||
#. Description of the plugin/theme
|
||||
msgid "Our 2015 default theme is clean, blog-focused, and designed for clarity. Twenty Fifteen's simple, straightforward typography is readable on a wide variety of screen sizes, and suitable for multiple languages. We designed it using a mobile-first approach, meaning your content takes center-stage, regardless of whether your visitors arrive by smartphone, tablet, laptop, or desktop computer."
|
||||
msgstr "Vårt standardtema for 2015 er stilrent, bloggfokusert og designet for tydelighet. Twenty Fifteens enkle, ukompliserte typografi er lesbar på en lang rekke skjermstørrelser og tilpasset flere språk. Vi designet det med en mobil-først-tilnærming, som betyr at innholdet ditt får hovedfokus, uansett om dine besøkende kommer via smarttelefon, nettbrett, bærbar eller stasjonær datamaskin."
|
||||
#: inc/customizer.php:47 inc/customizer.php:63 inc/customizer.php:68
|
||||
msgid "Applied to the header on small screens and the sidebar on wide screens."
|
||||
msgstr "Benyttes i sidetoppen på små skjermer og i sidekolonnen på brede skjermer."
|
||||
|
||||
#: content-none.php:22
|
||||
msgid "Ready to publish your first post? <a href=\"%1$s\">Get started here</a>."
|
||||
msgstr "Klar for å skrive ditt første innlegg? <a href=\"%1$s\">Kom i gang her</a>."
|
||||
#: inc/customizer.php:31
|
||||
msgid "Base Color Scheme"
|
||||
msgstr "Grunnpalett"
|
||||
|
||||
#: comments.php:53
|
||||
msgid "Comments are closed."
|
||||
msgstr "Det er stengt for kommentarer."
|
||||
#: inc/customizer.php:46
|
||||
msgid "Header and Sidebar Text Color"
|
||||
msgstr "Tekstfarge i sidetopp og sidekolonne"
|
||||
|
||||
#: content-link.php:36 content-page.php:25 content.php:38 image.php:59
|
||||
msgid "Pages:"
|
||||
msgstr "Sider:"
|
||||
#: inc/back-compat.php:37 inc/back-compat.php:47 inc/back-compat.php:60
|
||||
msgid "Twenty Fifteen requires at least WordPress version 4.1. You are running version %s. Please upgrade and try again."
|
||||
msgstr "Twenty Fifteen krever minst WordPress versjon 4.1. Du kjører versjon %s. Vennligst oppgrader og forsøk igjen."
|
||||
|
||||
#: content-link.php:56 content-page.php:35 content-search.php:28
|
||||
#: content-search.php:33 content.php:57 image.php:71
|
||||
msgid "Edit"
|
||||
msgstr "Rediger"
|
||||
#: image.php:84
|
||||
msgctxt "Parent post link"
|
||||
msgid "<span class=\"meta-nav\">Published in</span><span class=\"post-title\">%title</span>"
|
||||
msgstr "<span class=\"meta-nav\">Hører til</span><span class=\"post-title\">%title</span>"
|
||||
|
||||
#: footer.php:25
|
||||
msgid "Proudly powered by %s"
|
||||
msgstr "Stolt drevet av %s"
|
||||
#: image.php:24
|
||||
msgid "Next Image"
|
||||
msgstr "Neste bilde"
|
||||
|
||||
#: functions.php:85
|
||||
msgid "Primary Menu"
|
||||
msgstr "Primærmeny"
|
||||
#: header.php:43
|
||||
msgid "Menu and widgets"
|
||||
msgstr "Meny og widgeter"
|
||||
|
||||
#: image.php:24
|
||||
msgid "Previous Image"
|
||||
msgstr "Forrige bilde"
|
||||
|
||||
#: header.php:26
|
||||
msgid "Skip to content"
|
||||
msgstr "Gå til innhold"
|
||||
|
||||
#: content-none.php:15
|
||||
msgid "Nothing Found"
|
||||
msgstr "Ingenting funnet"
|
||||
|
||||
#: content-none.php:26
|
||||
msgid "Sorry, but nothing matched your search terms. Please try again with some different keywords."
|
||||
msgstr "Beklager, men det ble ikke funnet noe som passet det du søkte etter. Vennligst prøv med noen andre søkeord."
|
||||
|
||||
#: content-none.php:31
|
||||
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."
|
||||
|
||||
#: functions.php:133
|
||||
msgid "Widget Area"
|
||||
msgstr "Widgetområde"
|
||||
|
||||
#. #-#-#-#-# twentyfifteen.pot (Twenty Fifteen 1.1) #-#-#-#-#
|
||||
#. Author URI of the plugin/theme
|
||||
#: footer.php:25
|
||||
msgid "https://wordpress.org/"
|
||||
msgstr "https://wordpress.org/"
|
||||
|
||||
#. translators: %s: Name of current post
|
||||
#: content-link.php:31 content.php:33 inc/template-tags.php:237
|
||||
msgid "Continue reading %s"
|
||||
msgstr "Fortsett å lese %s"
|
||||
|
||||
#: functions.php:255
|
||||
msgid "expand child menu"
|
||||
msgstr "Utvid undermeny"
|
||||
|
||||
#: functions.php:256
|
||||
msgid "collapse child menu"
|
||||
msgstr "Slå sammen undermeny"
|
||||
|
||||
#. Translators: If there are characters in your language that are not supported
|
||||
#. by Inconsolata, translate this to 'off'. Do not translate into your own
|
||||
#. language.
|
||||
#: functions.php:177
|
||||
msgctxt "Inconsolata font: on or off"
|
||||
msgid "on"
|
||||
msgstr "on"
|
||||
#: functions.php:255
|
||||
msgid "expand child menu"
|
||||
msgstr "Utvid undermeny"
|
||||
|
||||
#. Translators: To add an additional character subset specific to your
|
||||
#. language, translate this to 'greek', 'cyrillic', 'devanagari' or
|
||||
@@ -251,10 +191,10 @@ msgid "no-subset"
|
||||
msgstr "no-subset"
|
||||
|
||||
#. Translators: If there are characters in your language that are not supported
|
||||
#. by Noto Sans, translate this to 'off'. Do not translate into your own
|
||||
#. by Inconsolata, translate this to 'off'. Do not translate into your own
|
||||
#. language.
|
||||
#: functions.php:161
|
||||
msgctxt "Noto Sans font: on or off"
|
||||
#: functions.php:177
|
||||
msgctxt "Inconsolata font: on or off"
|
||||
msgid "on"
|
||||
msgstr "on"
|
||||
|
||||
@@ -266,6 +206,74 @@ msgctxt "Noto Serif font: on or off"
|
||||
msgid "on"
|
||||
msgstr "on"
|
||||
|
||||
#. Translators: If there are characters in your language that are not supported
|
||||
#. by Noto Sans, translate this to 'off'. Do not translate into your own
|
||||
#. language.
|
||||
#: functions.php:161
|
||||
msgctxt "Noto Sans font: on or off"
|
||||
msgid "on"
|
||||
msgstr "on"
|
||||
|
||||
#: functions.php:135
|
||||
msgid "Add widgets here to appear in your sidebar."
|
||||
msgstr "Widgeter som legges til her vises i din sidekolonne."
|
||||
|
||||
#: functions.php:133
|
||||
msgid "Widget Area"
|
||||
msgstr "Widgetområde"
|
||||
|
||||
#: functions.php:86
|
||||
msgid "Social Links Menu"
|
||||
msgstr "Sosiale medier-meny"
|
||||
|
||||
#: functions.php:85
|
||||
msgid "Primary Menu"
|
||||
msgstr "Primærmeny"
|
||||
|
||||
#: footer.php:25
|
||||
msgid "Proudly powered by %s"
|
||||
msgstr "Drevet av %s"
|
||||
|
||||
#. #-#-#-#-# twentyfifteen.pot (Twenty Fifteen 1.2) #-#-#-#-#
|
||||
#. Author URI of the plugin/theme
|
||||
#: footer.php:25
|
||||
msgid "https://wordpress.org/"
|
||||
msgstr "https://wordpress.org/"
|
||||
|
||||
#: content-none.php:31
|
||||
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."
|
||||
|
||||
#: content-none.php:26
|
||||
msgid "Sorry, but nothing matched your search terms. Please try again with some different keywords."
|
||||
msgstr "Beklager, men det ble ikke funnet noe som passet det du søkte etter. Vennligst prøv med noen andre søkeord."
|
||||
|
||||
#: content-none.php:22
|
||||
msgid "Ready to publish your first post? <a href=\"%1$s\">Get started here</a>."
|
||||
msgstr "Klar for å skrive ditt første innlegg? <a href=\"%1$s\">Kom i gang her</a>."
|
||||
|
||||
#: content-none.php:15
|
||||
msgid "Nothing Found"
|
||||
msgstr "Ingenting funnet"
|
||||
|
||||
#: content-link.php:56 content-page.php:35 content-search.php:28
|
||||
#: content-search.php:33 content.php:57 image.php:71
|
||||
msgid "Edit"
|
||||
msgstr "Rediger"
|
||||
|
||||
#: content-link.php:36 content-page.php:25 content.php:38 image.php:59
|
||||
msgid "Pages:"
|
||||
msgstr "Sider:"
|
||||
|
||||
#. translators: %s: Name of current post
|
||||
#: content-link.php:31 content.php:33 inc/template-tags.php:237
|
||||
msgid "Continue reading %s"
|
||||
msgstr "Fortsett å lese %s"
|
||||
|
||||
#: comments.php:53
|
||||
msgid "Comments are closed."
|
||||
msgstr "Det er stengt for kommentarer."
|
||||
|
||||
#: comments.php:28
|
||||
msgctxt "comments title"
|
||||
msgid "One thought on “%2$s”"
|
||||
@@ -273,26 +281,14 @@ msgid_plural "%1$s thoughts on “%2$s”"
|
||||
msgstr[0] "Én kommentar til «%2$s»"
|
||||
msgstr[1] "%1$s kommentarer til «%2$s»"
|
||||
|
||||
#: functions.php:86
|
||||
msgid "Social Links Menu"
|
||||
msgstr "Sosiale medier-meny"
|
||||
|
||||
#: functions.php:135
|
||||
msgid "Add widgets here to appear in your sidebar."
|
||||
msgstr "Widgeter som legges til her vises i din sidekolonne."
|
||||
#: author-bio.php:34
|
||||
msgid "View all posts by %s"
|
||||
msgstr "Vis alle innlegg av %s"
|
||||
|
||||
#: author-bio.php:12
|
||||
msgid "Published by"
|
||||
msgstr "Skrevet av"
|
||||
|
||||
#: 404.php:21
|
||||
msgid "It looks like nothing was found at this location. Maybe try a search?"
|
||||
msgstr "Det ser ikke ut til at noe ble funnet på denne adressen. Kanskje du kan prøve et søk?"
|
||||
|
||||
#: author-bio.php:34
|
||||
msgid "View all posts by %s"
|
||||
msgstr "Vis alle innlegg av %s"
|
||||
|
||||
#: archive.php:51 content-link.php:40 content-page.php:29 content.php:42
|
||||
#: image.php:63 index.php:48 search.php:40
|
||||
msgid "Page"
|
||||
@@ -306,6 +302,10 @@ msgstr "Neste side"
|
||||
msgid "Previous page"
|
||||
msgstr "Forrige side"
|
||||
|
||||
#: 404.php:21
|
||||
msgid "It looks like nothing was found at this location. Maybe try a search?"
|
||||
msgstr "Det ser ikke ut til at noe ble funnet på denne adressen. Kanskje du kan prøve et søk?"
|
||||
|
||||
#: 404.php:17
|
||||
msgid "Oops! That page can’t be found."
|
||||
msgstr "Oida! Den siden finnes ikke."
|
||||
Binary file not shown.
@@ -2,70 +2,207 @@
|
||||
# This file is distributed under the same license as the Twenty Fourteen package.
|
||||
msgid ""
|
||||
msgstr ""
|
||||
"PO-Revision-Date: 2015-03-27 07:43:50+0000\n"
|
||||
"PO-Revision-Date: 2015-07-27 22:21:24+0000\n"
|
||||
"MIME-Version: 1.0\n"
|
||||
"Content-Type: text/plain; charset=UTF-8\n"
|
||||
"Content-Transfer-Encoding: 8bit\n"
|
||||
"Plural-Forms: nplurals=2; plural=n != 1;\n"
|
||||
"X-Generator: GlotPress/1.0-alpha-1000\n"
|
||||
"X-Generator: GlotPress/1.0-alpha-1100\n"
|
||||
"Project-Id-Version: Twenty Fourteen\n"
|
||||
|
||||
#. Author URI of the plugin/theme
|
||||
msgid "https://wordpress.org/"
|
||||
msgstr "https://wordpress.org/"
|
||||
|
||||
#. Template Name of the plugin/theme
|
||||
msgid "Full Width Page"
|
||||
msgstr "Side i full bredde"
|
||||
|
||||
#. Template Name of the plugin/theme
|
||||
msgid "Contributor Page"
|
||||
msgstr "Bidragsyters side"
|
||||
|
||||
#. Author of the plugin/theme
|
||||
msgid "the WordPress team"
|
||||
msgstr "WordPress-gjengen"
|
||||
|
||||
#. 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."
|
||||
|
||||
#. Theme URI of the plugin/theme
|
||||
msgid "https://wordpress.org/themes/twentyfourteen/"
|
||||
msgstr "https://wordpress.org/themes/twentyfourteen/"
|
||||
|
||||
#. translators: %s: Name of current post
|
||||
#: content-aside.php:48 content-audio.php:48 content-gallery.php:48
|
||||
#: content-image.php:48 content-link.php:48 content-quote.php:48
|
||||
#: content-video.php:48 content.php:56 inc/template-tags.php:222
|
||||
msgid "Continue reading %s <span class=\"meta-nav\">→</span>"
|
||||
msgstr "Fortsett å lese %s <span class=\"meta-nav\">→</span>"
|
||||
#: tag.php:22
|
||||
msgid "Tag Archives: %s"
|
||||
msgstr "Stikkordarkiv: %s"
|
||||
|
||||
#: inc/customizer.php:31 inc/customizer.php:32
|
||||
msgid "May only be visible on wide screens."
|
||||
msgstr "Er kanskje kun synlig på brede skjermer."
|
||||
#: search.php:18
|
||||
msgid "Search Results for: %s"
|
||||
msgstr "Søkeresultater for: %s"
|
||||
|
||||
#: inc/widgets.php:59
|
||||
msgid "More videos"
|
||||
msgstr "Flere videoer"
|
||||
#: inc/widgets.php:261
|
||||
msgid "Post format to show:"
|
||||
msgstr "Innleggsformat som skal vises:"
|
||||
|
||||
#: inc/widgets.php:63
|
||||
msgid "More audio"
|
||||
msgstr "Mer lyd"
|
||||
#: inc/widgets.php:258
|
||||
msgid "Number of posts to show:"
|
||||
msgstr "Antall innlegg som skal vises:"
|
||||
|
||||
#: inc/widgets.php:67
|
||||
msgid "More quotes"
|
||||
msgstr "Flere sitater"
|
||||
|
||||
#: inc/widgets.php:71
|
||||
msgid "More links"
|
||||
msgstr "Flere lenker"
|
||||
|
||||
#: inc/widgets.php:75
|
||||
msgid "More galleries"
|
||||
msgstr "Flere gallerier"
|
||||
|
||||
#: inc/widgets.php:80
|
||||
msgid "More asides"
|
||||
msgstr "Flere notiser"
|
||||
|
||||
#: inc/customizer.php:108
|
||||
msgid "The home page features your choice of up to 6 posts prominently displayed in a grid or slider, controlled by a <a href=\"%1$s\">tag</a>; you can change the tag and layout in <a href=\"%2$s\">Appearance → Customize</a>. If no posts match the tag, <a href=\"%3$s\">sticky posts</a> will be displayed instead."
|
||||
msgstr "Forsiden viser fremhevet innhold – opp til seks innlegg som vises i et rutenett eller i en slider, kontrollert av et <a href=\"%1$s\">stikkord</a>. Du kan endre stikkordet og layouten i <a href=\"%2$s\">Utseende → Tilpass</a>. Hvis ingen innlegg har dette stikkordet, vises <a href=\"%3$s\">klebrige innlegg</a> isteden."
|
||||
#: inc/widgets.php:255
|
||||
msgid "Title:"
|
||||
msgstr "Tittel:"
|
||||
|
||||
#. translators: used with More archives link
|
||||
#: inc/widgets.php:206
|
||||
msgid "%s <span class=\"meta-nav\">→</span>"
|
||||
msgstr "%s <span class=\"meta-nav\">→</span>"
|
||||
|
||||
#: inc/widgets.php:162
|
||||
msgid "This gallery contains <a href=\"%1$s\" rel=\"bookmark\">%2$s photo</a>."
|
||||
msgid_plural "This gallery contains <a href=\"%1$s\" rel=\"bookmark\">%2$s photos</a>."
|
||||
msgstr[0] "Dette galleriet inneholder <a href=\"%1$s\" rel=\"bookmark\">%2$s bilde</a>."
|
||||
msgstr[1] "Dette galleriet inneholder <a href=\"%1$s\" rel=\"bookmark\">%2$s bilder</a>."
|
||||
|
||||
#: inc/widgets.php:127 inc/widgets.php:172
|
||||
msgid "Continue reading <span class=\"meta-nav\">→</span>"
|
||||
msgstr "Les videre <span class=\"meta-nav\">→</span>"
|
||||
|
||||
#: inc/widgets.php:80
|
||||
msgid "More asides"
|
||||
msgstr "Flere notiser"
|
||||
|
||||
#: inc/widgets.php:79 taxonomy-post_format.php:30
|
||||
msgid "Asides"
|
||||
msgstr "Notiser"
|
||||
|
||||
#: inc/widgets.php:75
|
||||
msgid "More galleries"
|
||||
msgstr "Flere gallerier"
|
||||
|
||||
#: inc/widgets.php:74 taxonomy-post_format.php:48
|
||||
msgid "Galleries"
|
||||
msgstr "Gallerier"
|
||||
|
||||
#: inc/widgets.php:71
|
||||
msgid "More links"
|
||||
msgstr "Flere lenker"
|
||||
|
||||
#: inc/widgets.php:70 taxonomy-post_format.php:45
|
||||
msgid "Links"
|
||||
msgstr "Lenker"
|
||||
|
||||
#: inc/widgets.php:67
|
||||
msgid "More quotes"
|
||||
msgstr "Flere sitater"
|
||||
|
||||
#: inc/widgets.php:66 taxonomy-post_format.php:42
|
||||
msgid "Quotes"
|
||||
msgstr "Sitater"
|
||||
|
||||
#: inc/widgets.php:63
|
||||
msgid "More audio"
|
||||
msgstr "Mer lyd"
|
||||
|
||||
#: inc/widgets.php:62 taxonomy-post_format.php:39
|
||||
msgid "Audio"
|
||||
msgstr "Lyd"
|
||||
|
||||
#: inc/widgets.php:59
|
||||
msgid "More videos"
|
||||
msgstr "Flere videoer"
|
||||
|
||||
#: inc/widgets.php:58 taxonomy-post_format.php:36
|
||||
msgid "Videos"
|
||||
msgstr "Videoer"
|
||||
|
||||
#: inc/widgets.php:55
|
||||
msgid "More images"
|
||||
msgstr "Flere bilder"
|
||||
|
||||
#: inc/widgets.php:54 taxonomy-post_format.php:33
|
||||
msgid "Images"
|
||||
msgstr "Bilder"
|
||||
|
||||
#: inc/widgets.php:36
|
||||
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."
|
||||
|
||||
#: inc/widgets.php:34
|
||||
msgid "Twenty Fourteen Ephemera"
|
||||
msgstr "Twenty Fourteen Ephemera"
|
||||
|
||||
#: inc/template-tags.php:109
|
||||
msgid "Sticky"
|
||||
msgstr "Klebrig"
|
||||
|
||||
#: inc/template-tags.php:92
|
||||
msgid "<span class=\"meta-nav\">Next Post</span>%title"
|
||||
msgstr "<span class=\"meta-nav\">Neste innlegg</span>%title"
|
||||
|
||||
#: inc/template-tags.php:91
|
||||
msgid "<span class=\"meta-nav\">Previous Post</span>%title"
|
||||
msgstr "<span class=\"meta-nav\">Forrige innlegg</span>%title"
|
||||
|
||||
#: inc/template-tags.php:89
|
||||
msgid "<span class=\"meta-nav\">Published In</span>%title"
|
||||
msgstr "<span class=\"meta-nav\">Publisert i</span>%title"
|
||||
|
||||
#: inc/template-tags.php:85
|
||||
msgid "Post navigation"
|
||||
msgstr "Innleggsnavigasjon"
|
||||
|
||||
#: inc/template-tags.php:58
|
||||
msgid "Posts navigation"
|
||||
msgstr "Innleggsnavigasjon"
|
||||
|
||||
#: inc/template-tags.php:51
|
||||
msgid "Next →"
|
||||
msgstr "Neste →"
|
||||
|
||||
#: inc/template-tags.php:50
|
||||
msgid "← Previous"
|
||||
msgstr "← Forrige"
|
||||
|
||||
#: inc/featured-content.php:431
|
||||
msgid "Don’t display tag on front end."
|
||||
msgstr "Ikke vis dette stikkordet på fremsidene."
|
||||
|
||||
#: inc/featured-content.php:426
|
||||
msgid "Tag Name"
|
||||
msgstr "Stikkord"
|
||||
|
||||
#: inc/customizer.php:110
|
||||
msgid "For an in-depth tutorial, and more tips and tricks, visit the <a href=\"%s\">Twenty Fourteen documentation</a>."
|
||||
msgstr "For en inngående starthjelp, tips og triks, besøk <a href=\"%s\">Dokumentasjon for Twenty Fourteen</a>."
|
||||
|
||||
#: inc/customizer.php:109
|
||||
msgid "Enhance your site design by using <a href=\"%s\">Featured Images</a> for posts you’d like to stand out (also known as post thumbnails). This allows you to associate an image with your post without inserting it. Twenty Fourteen uses featured images for posts and pages—above the title—and in the Featured Content area on the home page."
|
||||
msgstr "Forbedre utseendet ved å bruke <a href=\"%s\">fremhevede bilder</a> for innlegg som du vil at man skal legge merke til. Dette lar deg knytte et bilde til et innlegg uten å sette det inn i teksten. Twenty Fourteen bruker fremhevede bilder for innlegg og sider – over tittelen – og i fremhevet innhold-delen av forsiden."
|
||||
|
||||
#: inc/customizer.php:108
|
||||
msgid "The home page features your choice of up to 6 posts prominently displayed in a grid or slider, controlled by a <a href=\"%1$s\">tag</a>; you can change the tag and layout in <a href=\"%2$s\">Appearance → Customize</a>. If no posts match the tag, <a href=\"%3$s\">sticky posts</a> will be displayed instead."
|
||||
msgstr "Forsiden viser fremhevet innhold – opp til seks innlegg som vises i et rutenett eller i en slider, kontrollert av et <a href=\"%1$s\">stikkord</a>. Du kan endre stikkordet og layouten i <a href=\"%2$s\">Utseende → Tilpass</a>. Hvis ingen innlegg har dette stikkordet, vises <a href=\"%3$s\">klebrige innlegg</a> isteden."
|
||||
|
||||
#. #-#-#-#-# twentyfourteen.pot (Twenty Fourteen 1.4) #-#-#-#-#
|
||||
#. Theme Name of the plugin/theme
|
||||
#: inc/customizer.php:105
|
||||
msgid "Twenty Fourteen"
|
||||
msgstr "Twenty Fourteen"
|
||||
|
||||
#: inc/customizer.php:61
|
||||
msgid "Slider"
|
||||
msgstr "Slider"
|
||||
|
||||
#: inc/customizer.php:60
|
||||
msgid "Grid"
|
||||
msgstr "Rutenett"
|
||||
|
||||
#: inc/customizer.php:56
|
||||
msgid "Layout"
|
||||
msgstr "Utseende"
|
||||
|
||||
#: inc/customizer.php:42 inc/customizer.php:108 inc/featured-content.php:405
|
||||
#: inc/featured-content.php:414 inc/featured-content.php:474
|
||||
msgctxt "featured content default tag slug"
|
||||
@@ -76,133 +213,53 @@ msgstr "fremhevet"
|
||||
msgid "Use a <a href=\"%1$s\">tag</a> to feature your posts. If no posts match the tag, <a href=\"%2$s\">sticky posts</a> will be displayed instead."
|
||||
msgstr "Bruk et <a href=\"%1$s\">stikkord</a> for å fremheve dine innlegg. Hvis ingen innlegg har dette stikkordet, vil <a href=\"%2$s\">klebrige innlegg</a> vises isteden."
|
||||
|
||||
#: 404.php:17
|
||||
msgid "Not Found"
|
||||
msgstr "Ikke funnet"
|
||||
|
||||
#: inc/customizer.php:27
|
||||
msgid "Display Site Title & Tagline"
|
||||
msgstr "Vis nettstedets tittel og slagord"
|
||||
|
||||
#: inc/customizer.php:110
|
||||
msgid "For an in-depth tutorial, and more tips and tricks, visit the <a href=\"%s\">Twenty Fourteen documentation</a>."
|
||||
msgstr "For en inngående starthjelp, tips og triks, besøk <a href=\"%s\">Dokumentasjon for Twenty Fourteen</a>."
|
||||
|
||||
#: archive.php:34
|
||||
msgctxt "monthly archives date format"
|
||||
msgid "F Y"
|
||||
msgstr "F Y"
|
||||
|
||||
#: archive.php:37
|
||||
msgctxt "yearly archives date format"
|
||||
msgid "Y"
|
||||
msgstr "Y"
|
||||
|
||||
#: inc/customizer.php:24
|
||||
msgid "Site Title Color"
|
||||
msgstr "Nettstedets farge"
|
||||
|
||||
#. 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."
|
||||
|
||||
#: inc/featured-content.php:426
|
||||
msgid "Tag Name"
|
||||
msgstr "Stikkord"
|
||||
|
||||
#: inc/featured-content.php:431
|
||||
msgid "Don’t display tag on front end."
|
||||
msgstr "Ikke vis dette stikkordet på fremsidene."
|
||||
|
||||
#: functions.php:258
|
||||
msgid "Previous"
|
||||
msgstr "Forrige"
|
||||
|
||||
#: functions.php:259
|
||||
msgid "Next"
|
||||
msgstr "Neste"
|
||||
|
||||
#: functions.php:182
|
||||
msgid "Additional sidebar that appears on the right."
|
||||
msgstr "Ekstra sidekolonne som vises på høyre side."
|
||||
|
||||
#: functions.php:191
|
||||
msgid "Appears in the footer section of the site."
|
||||
msgstr "Vises i bunnen på nettstedet."
|
||||
|
||||
#: image.php:65
|
||||
msgid "Previous Image"
|
||||
msgstr "Forrige bilde"
|
||||
|
||||
#: image.php:66
|
||||
msgid "Next Image"
|
||||
msgstr "Neste bilde"
|
||||
|
||||
#: inc/back-compat.php:37 inc/back-compat.php:47 inc/back-compat.php:60
|
||||
msgid "Twenty Fourteen requires at least WordPress version 3.6. You are running version %s. Please upgrade and try again."
|
||||
msgstr "Twenty Foruteen krever minimum WordPress versjon 3.6. Du bruker nå versjon %s. Vennligst oppgrader og prøv igjen."
|
||||
#: inc/customizer.php:40 inc/featured-content.php:403
|
||||
msgid "Featured Content"
|
||||
msgstr "Fremhevet innhold"
|
||||
|
||||
#: inc/customizer.php:34 inc/customizer.php:35
|
||||
msgid "Background may only be visible on wide screens."
|
||||
msgstr "Bakgrunnen er kanskje bare synlig på store skjermer."
|
||||
|
||||
#: inc/customizer.php:40 inc/featured-content.php:403
|
||||
msgid "Featured Content"
|
||||
msgstr "Fremhevet innhold"
|
||||
#: inc/customizer.php:31 inc/customizer.php:32
|
||||
msgid "May only be visible on wide screens."
|
||||
msgstr "Er kanskje kun synlig på brede skjermer."
|
||||
|
||||
#: inc/customizer.php:56
|
||||
msgid "Layout"
|
||||
msgstr "Utseende"
|
||||
#: inc/customizer.php:27
|
||||
msgid "Display Site Title & Tagline"
|
||||
msgstr "Vis nettstedets tittel og slagord"
|
||||
|
||||
#: inc/customizer.php:60
|
||||
msgid "Grid"
|
||||
msgstr "Rutenett"
|
||||
#: inc/customizer.php:24
|
||||
msgid "Site Title Color"
|
||||
msgstr "Nettstedets farge"
|
||||
|
||||
#: inc/template-tags.php:89
|
||||
msgid "<span class=\"meta-nav\">Published In</span>%title"
|
||||
msgstr "<span class=\"meta-nav\">Publisert i</span>%title"
|
||||
#: inc/back-compat.php:37 inc/back-compat.php:47 inc/back-compat.php:60
|
||||
msgid "Twenty Fourteen requires at least WordPress version 3.6. You are running version %s. Please upgrade and try again."
|
||||
msgstr "Twenty Foruteen krever minimum WordPress versjon 3.6. Du bruker nå versjon %s. Vennligst oppgrader og prøv igjen."
|
||||
|
||||
#: inc/template-tags.php:91
|
||||
msgid "<span class=\"meta-nav\">Previous Post</span>%title"
|
||||
msgstr "<span class=\"meta-nav\">Forrige innlegg</span>%title"
|
||||
#: image.php:66
|
||||
msgid "Next Image"
|
||||
msgstr "Neste bilde"
|
||||
|
||||
#: inc/template-tags.php:92
|
||||
msgid "<span class=\"meta-nav\">Next Post</span>%title"
|
||||
msgstr "<span class=\"meta-nav\">Neste innlegg</span>%title"
|
||||
#: image.php:65
|
||||
msgid "Previous Image"
|
||||
msgstr "Forrige bilde"
|
||||
|
||||
#: inc/widgets.php:34
|
||||
msgid "Twenty Fourteen Ephemera"
|
||||
msgstr "Twenty Fourteen Ephemera"
|
||||
#: header.php:53
|
||||
msgid "Skip to content"
|
||||
msgstr "Gå til innhold"
|
||||
|
||||
#: inc/widgets.php:62 taxonomy-post_format.php:39
|
||||
msgid "Audio"
|
||||
msgstr "Lyd"
|
||||
#: header.php:52
|
||||
msgid "Primary Menu"
|
||||
msgstr "Primærmeny"
|
||||
|
||||
#: inc/widgets.php:162
|
||||
msgid "This gallery contains <a href=\"%1$s\" rel=\"bookmark\">%2$s photo</a>."
|
||||
msgid_plural "This gallery contains <a href=\"%1$s\" rel=\"bookmark\">%2$s photos</a>."
|
||||
msgstr[0] "Dette galleriet inneholder <a href=\"%1$s\" rel=\"bookmark\">%2$s bilde</a>."
|
||||
msgstr[1] "Dette galleriet inneholder <a href=\"%1$s\" rel=\"bookmark\">%2$s bilder</a>."
|
||||
#: header.php:48
|
||||
msgid "Search"
|
||||
msgstr "Søk"
|
||||
|
||||
#: inc/widgets.php:255
|
||||
msgid "Title:"
|
||||
msgstr "Tittel:"
|
||||
|
||||
#. Template Name of the plugin/theme
|
||||
msgid "Contributor Page"
|
||||
msgstr "Bidragsyters side"
|
||||
|
||||
#: 404.php:21
|
||||
msgid "It looks like nothing was found at this location. Maybe try a search?"
|
||||
msgstr "Det ser ikke ut til at noe ble funnet på denne adressen. Kanskje du kan prøve et søk?"
|
||||
|
||||
#: author.php:31
|
||||
msgid "All posts by %s"
|
||||
msgstr "Alle innlegg av %s"
|
||||
|
||||
#: functions.php:189
|
||||
msgid "Footer Widget Area"
|
||||
msgstr "Widget-område i sidebunnen"
|
||||
#: functions.php:495
|
||||
msgid "Page %s"
|
||||
msgstr "Side %s"
|
||||
|
||||
#: functions.php:376
|
||||
msgid "%d Article"
|
||||
@@ -210,25 +267,114 @@ msgid_plural "%d Articles"
|
||||
msgstr[0] "%d artikkel"
|
||||
msgstr[1] "%d artikler"
|
||||
|
||||
#: inc/widgets.php:258
|
||||
msgid "Number of posts to show:"
|
||||
msgstr "Antall innlegg som skal vises:"
|
||||
#: functions.php:259
|
||||
msgid "Next"
|
||||
msgstr "Neste"
|
||||
|
||||
#: inc/customizer.php:61
|
||||
msgid "Slider"
|
||||
msgstr "Slider"
|
||||
#: functions.php:258
|
||||
msgid "Previous"
|
||||
msgstr "Forrige"
|
||||
|
||||
#: inc/customizer.php:109
|
||||
msgid "Enhance your site design by using <a href=\"%s\">Featured Images</a> for posts you’d like to stand out (also known as post thumbnails). This allows you to associate an image with your post without inserting it. Twenty Fourteen uses featured images for posts and pages—above the title—and in the Featured Content area on the home page."
|
||||
msgstr "Forbedre utseendet ved å bruke <a href=\"%s\">fremhevede bilder</a> for innlegg som du vil at man skal legge merke til. Dette lar deg knytte et bilde til et innlegg uten å sette det inn i teksten. Twenty Fourteen bruker fremhevede bilder for innlegg og sider – over tittelen – og i fremhevet innhold-delen av forsiden."
|
||||
#. Translators: If there are characters in your language that are not supported
|
||||
#. by Lato, translate this to 'off'. Do not translate into your own language.
|
||||
#: functions.php:213
|
||||
msgctxt "Lato font: on or off"
|
||||
msgid "on"
|
||||
msgstr "on"
|
||||
|
||||
#: inc/template-tags.php:58
|
||||
msgid "Posts navigation"
|
||||
msgstr "Innleggsnavigasjon"
|
||||
#: functions.php:191
|
||||
msgid "Appears in the footer section of the site."
|
||||
msgstr "Vises i bunnen på nettstedet."
|
||||
|
||||
#: inc/widgets.php:261
|
||||
msgid "Post format to show:"
|
||||
msgstr "Innleggsformat som skal vises:"
|
||||
#: functions.php:189
|
||||
msgid "Footer Widget Area"
|
||||
msgstr "Widget-område i sidebunnen"
|
||||
|
||||
#: functions.php:182
|
||||
msgid "Additional sidebar that appears on the right."
|
||||
msgstr "Ekstra sidekolonne som vises på høyre side."
|
||||
|
||||
#: functions.php:180
|
||||
msgid "Content Sidebar"
|
||||
msgstr "Innhold sidekolonne"
|
||||
|
||||
#: functions.php:173
|
||||
msgid "Main sidebar that appears on the left."
|
||||
msgstr "Hovedsidekolonne til venstre."
|
||||
|
||||
#: functions.php:171
|
||||
msgid "Primary Sidebar"
|
||||
msgstr "Første sidekolonne"
|
||||
|
||||
#: functions.php:84
|
||||
msgid "Secondary menu in left sidebar"
|
||||
msgstr "Sekundærmeny i venstre sidekolonne"
|
||||
|
||||
#: functions.php:83
|
||||
msgid "Top primary menu"
|
||||
msgstr "Øverste primærmeny"
|
||||
|
||||
#: footer.php:21
|
||||
msgid "Proudly powered by %s"
|
||||
msgstr "Stolt drevet av %s"
|
||||
|
||||
#: footer.php:21
|
||||
msgid "http://wordpress.org/"
|
||||
msgstr "http://nb.wordpress.org/"
|
||||
|
||||
#: content-none.php:27
|
||||
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."
|
||||
|
||||
#: content-none.php:22
|
||||
msgid "Sorry, but nothing matched your search terms. Please try again with some different keywords."
|
||||
msgstr "Beklager, men det ble ikke funnet noe som passet det du søkte etter. Vennligst prøv med noen andre søkeord."
|
||||
|
||||
#: content-none.php:18
|
||||
msgid "Ready to publish your first post? <a href=\"%1$s\">Get started here</a>."
|
||||
msgstr "Klar for å publisere ditt første innlegg? <a href=\"%1$s\">Kom i gang her</a>."
|
||||
|
||||
#: content-none.php:12
|
||||
msgid "Nothing Found"
|
||||
msgstr "Ingenting funnet"
|
||||
|
||||
#: content-aside.php:53 content-audio.php:53 content-gallery.php:53
|
||||
#: content-image.php:53 content-link.php:53 content-page.php:22
|
||||
#: content-quote.php:53 content-video.php:53 content.php:61 image.php:54
|
||||
msgid "Pages:"
|
||||
msgstr "Sider:"
|
||||
|
||||
#. translators: %s: Name of current post
|
||||
#: content-aside.php:48 content-audio.php:48 content-gallery.php:48
|
||||
#: content-image.php:48 content-link.php:48 content-quote.php:48
|
||||
#: content-video.php:48 content.php:56 inc/template-tags.php:222
|
||||
msgid "Continue reading %s <span class=\"meta-nav\">→</span>"
|
||||
msgstr "Fortsett å lese %s <span class=\"meta-nav\">→</span>"
|
||||
|
||||
#: content-aside.php:40 content-audio.php:40 content-gallery.php:40
|
||||
#: content-image.php:40 content-link.php:40 content-page.php:28
|
||||
#: content-quote.php:40 content-video.php:40 content.php:42 image.php:34
|
||||
#: page-templates/contributors.php:35
|
||||
msgid "Edit"
|
||||
msgstr "Rediger"
|
||||
|
||||
#: content-aside.php:37 content-audio.php:37 content-gallery.php:37
|
||||
#: content-image.php:37 content-link.php:37 content-quote.php:37
|
||||
#: content-video.php:37 content.php:38 inc/widgets.php:194
|
||||
msgid "% Comments"
|
||||
msgstr "% kommentarer"
|
||||
|
||||
#: content-aside.php:37 content-audio.php:37 content-gallery.php:37
|
||||
#: content-image.php:37 content-link.php:37 content-quote.php:37
|
||||
#: content-video.php:37 content.php:38 inc/widgets.php:194
|
||||
msgid "1 Comment"
|
||||
msgstr "1 kommentar"
|
||||
|
||||
#: content-aside.php:37 content-audio.php:37 content-gallery.php:37
|
||||
#: content-image.php:37 content-link.php:37 content-quote.php:37
|
||||
#: content-video.php:37 content.php:38 inc/widgets.php:194
|
||||
msgid "Leave a comment"
|
||||
msgstr "Legg igjen en kommentar"
|
||||
|
||||
#: content-aside.php:17 content-audio.php:17 content-featured-post.php:28
|
||||
#: content-gallery.php:17 content-image.php:17 content-link.php:17
|
||||
@@ -237,25 +383,9 @@ msgctxt "Used between list items, there is a space after the comma."
|
||||
msgid ", "
|
||||
msgstr ", "
|
||||
|
||||
#: footer.php:21
|
||||
msgid "Proudly powered by %s"
|
||||
msgstr "Stolt drevet av %s"
|
||||
|
||||
#: archive.php:31
|
||||
msgid "Daily Archives: %s"
|
||||
msgstr "Daglige arkiver: %s"
|
||||
|
||||
#: archive.php:34
|
||||
msgid "Monthly Archives: %s"
|
||||
msgstr "Månedlige arkiver: %s"
|
||||
|
||||
#: archive.php:37
|
||||
msgid "Yearly Archives: %s"
|
||||
msgstr "Årlige arkiver: %s"
|
||||
|
||||
#. Author of the plugin/theme
|
||||
msgid "the WordPress team"
|
||||
msgstr "WordPress-gjengen"
|
||||
#: comments.php:59
|
||||
msgid "Comments are closed."
|
||||
msgstr "Det er stengt for kommentarer."
|
||||
|
||||
#: comments.php:36 comments.php:54
|
||||
msgid "Newer Comments →"
|
||||
@@ -265,14 +395,6 @@ msgstr "Nyere kommentarer →"
|
||||
msgid "← Older Comments"
|
||||
msgstr "← Eldre kommentarer"
|
||||
|
||||
#: comments.php:59
|
||||
msgid "Comments are closed."
|
||||
msgstr "Det er stengt for kommentarer."
|
||||
|
||||
#: category.php:20
|
||||
msgid "Category Archives: %s"
|
||||
msgstr "Kategoriarkiv: %s"
|
||||
|
||||
#: comments.php:34 comments.php:52
|
||||
msgid "Comment navigation"
|
||||
msgstr "Kommentarnavigasjon"
|
||||
@@ -283,166 +405,44 @@ msgid_plural "%1$s thoughts on “%2$s”"
|
||||
msgstr[0] "En tanke om “%2$s”"
|
||||
msgstr[1] "%1$s tanker om “%2$s”"
|
||||
|
||||
#: tag.php:22
|
||||
msgid "Tag Archives: %s"
|
||||
msgstr "Stikkordarkiv: %s"
|
||||
#: category.php:20
|
||||
msgid "Category Archives: %s"
|
||||
msgstr "Kategoriarkiv: %s"
|
||||
|
||||
#: search.php:18
|
||||
msgid "Search Results for: %s"
|
||||
msgstr "Søkeresultater for: %s"
|
||||
|
||||
#: content-none.php:12
|
||||
msgid "Nothing Found"
|
||||
msgstr "Ingenting funnet"
|
||||
|
||||
#: header.php:48
|
||||
msgid "Search"
|
||||
msgstr "Søk"
|
||||
#: author.php:31
|
||||
msgid "All posts by %s"
|
||||
msgstr "Alle innlegg av %s"
|
||||
|
||||
#: archive.php:40 taxonomy-post_format.php:51
|
||||
msgid "Archives"
|
||||
msgstr "Arkiv"
|
||||
|
||||
#: inc/widgets.php:127 inc/widgets.php:172
|
||||
msgid "Continue reading <span class=\"meta-nav\">→</span>"
|
||||
msgstr "Les videre <span class=\"meta-nav\">→</span>"
|
||||
#: archive.php:37
|
||||
msgctxt "yearly archives date format"
|
||||
msgid "Y"
|
||||
msgstr "Y"
|
||||
|
||||
#: content-aside.php:53 content-audio.php:53 content-gallery.php:53
|
||||
#: content-image.php:53 content-link.php:53 content-page.php:22
|
||||
#: content-quote.php:53 content-video.php:53 content.php:61 image.php:54
|
||||
msgid "Pages:"
|
||||
msgstr "Sider:"
|
||||
#: archive.php:37
|
||||
msgid "Yearly Archives: %s"
|
||||
msgstr "Årlige arkiver: %s"
|
||||
|
||||
#: content-aside.php:40 content-audio.php:40 content-gallery.php:40
|
||||
#: content-image.php:40 content-link.php:40 content-page.php:28
|
||||
#: content-quote.php:40 content-video.php:40 content.php:42 image.php:34
|
||||
#: page-templates/contributors.php:35
|
||||
msgid "Edit"
|
||||
msgstr "Rediger"
|
||||
#: archive.php:34
|
||||
msgctxt "monthly archives date format"
|
||||
msgid "F Y"
|
||||
msgstr "F Y"
|
||||
|
||||
#: inc/template-tags.php:51
|
||||
msgid "Next →"
|
||||
msgstr "Neste →"
|
||||
#: archive.php:34
|
||||
msgid "Monthly Archives: %s"
|
||||
msgstr "Månedlige arkiver: %s"
|
||||
|
||||
#: inc/template-tags.php:50
|
||||
msgid "← Previous"
|
||||
msgstr "← Forrige"
|
||||
#: archive.php:31
|
||||
msgid "Daily Archives: %s"
|
||||
msgstr "Daglige arkiver: %s"
|
||||
|
||||
#: functions.php:495
|
||||
msgid "Page %s"
|
||||
msgstr "Side %s"
|
||||
#: 404.php:21
|
||||
msgid "It looks like nothing was found at this location. Maybe try a search?"
|
||||
msgstr "Det ser ikke ut til at noe ble funnet på denne adressen. Kanskje du kan prøve et søk?"
|
||||
|
||||
#: inc/template-tags.php:85
|
||||
msgid "Post navigation"
|
||||
msgstr "Innleggsnavigasjon"
|
||||
|
||||
#: header.php:52
|
||||
msgid "Primary Menu"
|
||||
msgstr "Primærmeny"
|
||||
|
||||
#: content-none.php:27
|
||||
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."
|
||||
|
||||
#: header.php:53
|
||||
msgid "Skip to content"
|
||||
msgstr "Gå til innhold"
|
||||
|
||||
#: content-aside.php:37 content-audio.php:37 content-gallery.php:37
|
||||
#: content-image.php:37 content-link.php:37 content-quote.php:37
|
||||
#: content-video.php:37 content.php:38 inc/widgets.php:194
|
||||
msgid "Leave a comment"
|
||||
msgstr "Legg igjen en kommentar"
|
||||
|
||||
#: content-none.php:18
|
||||
msgid "Ready to publish your first post? <a href=\"%1$s\">Get started here</a>."
|
||||
msgstr "Klar for å publisere ditt første innlegg? <a href=\"%1$s\">Kom i gang her</a>."
|
||||
|
||||
#: functions.php:171
|
||||
msgid "Primary Sidebar"
|
||||
msgstr "Første sidekolonne"
|
||||
|
||||
#: functions.php:173
|
||||
msgid "Main sidebar that appears on the left."
|
||||
msgstr "Hovedsidekolonne til venstre."
|
||||
|
||||
#: functions.php:180
|
||||
msgid "Content Sidebar"
|
||||
msgstr "Innhold sidekolonne"
|
||||
|
||||
#: inc/widgets.php:58 taxonomy-post_format.php:36
|
||||
msgid "Videos"
|
||||
msgstr "Videoer"
|
||||
|
||||
#: inc/widgets.php:54 taxonomy-post_format.php:33
|
||||
msgid "Images"
|
||||
msgstr "Bilder"
|
||||
|
||||
#: inc/widgets.php:74 taxonomy-post_format.php:48
|
||||
msgid "Galleries"
|
||||
msgstr "Gallerier"
|
||||
|
||||
#: inc/widgets.php:70 taxonomy-post_format.php:45
|
||||
msgid "Links"
|
||||
msgstr "Lenker"
|
||||
|
||||
#: inc/widgets.php:66 taxonomy-post_format.php:42
|
||||
msgid "Quotes"
|
||||
msgstr "Sitater"
|
||||
|
||||
#. #-#-#-#-# twentyfourteen.pot (Twenty Fourteen 1.4) #-#-#-#-#
|
||||
#. Theme Name of the plugin/theme
|
||||
#: inc/customizer.php:105
|
||||
msgid "Twenty Fourteen"
|
||||
msgstr "Twenty Fourteen"
|
||||
|
||||
#. Template Name of the plugin/theme
|
||||
msgid "Full Width Page"
|
||||
msgstr "Side i full bredde"
|
||||
|
||||
#: content-aside.php:37 content-audio.php:37 content-gallery.php:37
|
||||
#: content-image.php:37 content-link.php:37 content-quote.php:37
|
||||
#: content-video.php:37 content.php:38 inc/widgets.php:194
|
||||
msgid "1 Comment"
|
||||
msgstr "1 kommentar"
|
||||
|
||||
#: content-aside.php:37 content-audio.php:37 content-gallery.php:37
|
||||
#: content-image.php:37 content-link.php:37 content-quote.php:37
|
||||
#: content-video.php:37 content.php:38 inc/widgets.php:194
|
||||
msgid "% Comments"
|
||||
msgstr "% kommentarer"
|
||||
|
||||
#: functions.php:83
|
||||
msgid "Top primary menu"
|
||||
msgstr "Øverste primærmeny"
|
||||
|
||||
#: inc/widgets.php:79 taxonomy-post_format.php:30
|
||||
msgid "Asides"
|
||||
msgstr "Notiser"
|
||||
|
||||
#. Translators: If there are characters in your language that are not supported
|
||||
#. by Lato, translate this to 'off'. Do not translate into your own language.
|
||||
#: functions.php:213
|
||||
msgctxt "Lato font: on or off"
|
||||
msgid "on"
|
||||
msgstr "on"
|
||||
|
||||
#: content-none.php:22
|
||||
msgid "Sorry, but nothing matched your search terms. Please try again with some different keywords."
|
||||
msgstr "Beklager, men det ble ikke funnet noe som passet det du søkte etter. Vennligst prøv med noen andre søkeord."
|
||||
|
||||
#: functions.php:84
|
||||
msgid "Secondary menu in left sidebar"
|
||||
msgstr "Sekundærmeny i venstre sidekolonne"
|
||||
|
||||
#: inc/template-tags.php:109
|
||||
msgid "Sticky"
|
||||
msgstr "Klebrig"
|
||||
|
||||
#: footer.php:21
|
||||
msgid "http://wordpress.org/"
|
||||
msgstr "http://nb.wordpress.org/"
|
||||
|
||||
#: inc/widgets.php:55
|
||||
msgid "More images"
|
||||
msgstr "Flere bilder"
|
||||
#: 404.php:17
|
||||
msgid "Not Found"
|
||||
msgstr "Ikke funnet"
|
||||
Binary file not shown.
@@ -2,248 +2,167 @@
|
||||
# This file is distributed under the same license as the Twenty Thirteen package.
|
||||
msgid ""
|
||||
msgstr ""
|
||||
"PO-Revision-Date: 2015-03-27 07:44:03+0000\n"
|
||||
"PO-Revision-Date: 2015-07-27 22:21:23+0000\n"
|
||||
"MIME-Version: 1.0\n"
|
||||
"Content-Type: text/plain; charset=UTF-8\n"
|
||||
"Content-Transfer-Encoding: 8bit\n"
|
||||
"Plural-Forms: nplurals=2; plural=n != 1;\n"
|
||||
"X-Generator: GlotPress/1.0-alpha-1000\n"
|
||||
"X-Generator: GlotPress/1.0-alpha-1100\n"
|
||||
"Project-Id-Version: Twenty Thirteen\n"
|
||||
|
||||
#. Theme URI of the plugin/theme
|
||||
msgid "https://wordpress.org/themes/twentythirteen/"
|
||||
msgstr "https://wordpress.org/themes/twentythirteen/"
|
||||
|
||||
#. Author URI of the plugin/theme
|
||||
msgid "https://wordpress.org/"
|
||||
msgstr "https://wordpress.org/"
|
||||
|
||||
#. translators: %s: Name of current post
|
||||
#: content-aside.php:16 content-audio.php:27 content-chat.php:26
|
||||
#: content-gallery.php:27 content-image.php:26 content-link.php:27
|
||||
#: content-quote.php:16 content-status.php:16 content-video.php:26
|
||||
#: content.php:44 functions.php:478
|
||||
msgid "Continue reading %s <span class=\"meta-nav\">→</span>"
|
||||
msgstr "Fortsett å lese %s <span class=\"meta-nav\">→</span>"
|
||||
|
||||
#: 404.php:16
|
||||
msgid "Not Found"
|
||||
msgstr "Ikke funnet"
|
||||
#. Author of the plugin/theme
|
||||
msgid "the WordPress team"
|
||||
msgstr "WordPress-gjengen"
|
||||
|
||||
#. 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."
|
||||
|
||||
#: functions.php:233
|
||||
msgid "Appears in the footer section of the site."
|
||||
msgstr "Vises i bunnområdet på netttedet."
|
||||
#. Theme URI of the plugin/theme
|
||||
msgid "https://wordpress.org/themes/twentythirteen/"
|
||||
msgstr "https://wordpress.org/themes/twentythirteen/"
|
||||
|
||||
#: image.php:38
|
||||
msgid "Link to full-size image"
|
||||
msgstr "Lenke til bildet i full størrelse"
|
||||
#. Theme Name of the plugin/theme
|
||||
msgid "Twenty Thirteen"
|
||||
msgstr "Twenty Thirteen"
|
||||
|
||||
#: functions.php:231
|
||||
msgid "Main Widget Area"
|
||||
msgstr "Hovedområde for widgeter"
|
||||
|
||||
#: functions.php:241
|
||||
msgid "Secondary Widget Area"
|
||||
msgstr "Sekundærområde for widgeter"
|
||||
|
||||
#: functions.php:243
|
||||
msgid "Appears on posts and pages in the sidebar."
|
||||
msgstr "Vises på innleggssider og andre sider i sidekolonnen."
|
||||
|
||||
#: image.php:39
|
||||
msgid "Full resolution"
|
||||
msgstr "Full oppløsning"
|
||||
|
||||
#: inc/back-compat.php:37 inc/back-compat.php:47 inc/back-compat.php:60
|
||||
msgid "Twenty Thirteen requires at least WordPress version 3.6. You are running version %s. Please upgrade and try again."
|
||||
msgstr "Twenty Thirteen krever WordPress versjon 3.6. Du kjører versjon %s. Vennligst oppgrader og prøv igjen."
|
||||
|
||||
#: functions.php:218
|
||||
msgid "Page %s"
|
||||
msgstr "Side %s"
|
||||
|
||||
#: content-none.php:27
|
||||
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."
|
||||
|
||||
#: header.php:43
|
||||
msgid "Menu"
|
||||
msgstr "Meny"
|
||||
|
||||
#: header.php:44
|
||||
msgid "Skip to content"
|
||||
msgstr "Gå til innhold"
|
||||
|
||||
#: functions.php:343
|
||||
msgid "View all posts by %s"
|
||||
msgstr "Vis alle innlegg av %s"
|
||||
|
||||
#: search.php:18
|
||||
msgid "Search Results for: %s"
|
||||
msgstr "Søkeresultater for: %s"
|
||||
|
||||
#: archive.php:35
|
||||
msgid "Archives"
|
||||
msgstr "Arkiv"
|
||||
|
||||
#. Author of the plugin/theme
|
||||
msgid "the WordPress team"
|
||||
msgstr "WordPress-gjengen"
|
||||
|
||||
#: functions.php:369
|
||||
msgid "Permalink to %s"
|
||||
msgstr "Permalenke til %s"
|
||||
|
||||
#: functions.php:300
|
||||
msgid "Post navigation"
|
||||
msgstr "Innleggsnavigasjon"
|
||||
|
||||
#: functions.php:270
|
||||
msgid "<span class=\"meta-nav\">←</span> Older posts"
|
||||
msgstr "<span class=\"meta-nav\">←</span> Eldre innlegg"
|
||||
|
||||
#: functions.php:274
|
||||
msgid "Newer posts <span class=\"meta-nav\">→</span>"
|
||||
msgstr "Nyere innlegg <span class=\"meta-nav\">→</span>"
|
||||
|
||||
#: footer.php:19
|
||||
msgid "Proudly powered by %s"
|
||||
msgstr "Stolt drevet av %s"
|
||||
|
||||
#: content-aside.php:27 content-aside.php:35 content-audio.php:38
|
||||
#: content-chat.php:36 content-gallery.php:46 content-image.php:42
|
||||
#: content-link.php:19 content-quote.php:32 content-status.php:26
|
||||
#: content-video.php:42 content.php:31 image.php:44 page.php:39
|
||||
msgid "Edit"
|
||||
msgstr "Rediger"
|
||||
|
||||
#: comments.php:47
|
||||
msgid "Newer Comments →"
|
||||
msgstr "Nyere kommentarer →"
|
||||
|
||||
#: comments.php:52
|
||||
msgid "Comments are closed."
|
||||
msgstr "Det er stengt for kommentarer."
|
||||
|
||||
#: author-bio.php:26
|
||||
msgid "About %s"
|
||||
msgstr "Om %s"
|
||||
|
||||
#: archive.php:31
|
||||
msgctxt "monthly archives date format"
|
||||
msgid "F Y"
|
||||
msgstr "F Y"
|
||||
|
||||
#: archive.php:33
|
||||
msgid "Yearly Archives: %s"
|
||||
msgstr "Årlige arkiver: %s"
|
||||
|
||||
#: archive.php:33
|
||||
msgctxt "yearly archives date format"
|
||||
msgid "Y"
|
||||
msgstr "Y"
|
||||
#: taxonomy-post_format.php:23
|
||||
msgid "%s Archives"
|
||||
msgstr "Arkiv for %s"
|
||||
|
||||
#: tag.php:21
|
||||
msgid "Tag Archives: %s"
|
||||
msgstr "Stikkordarkiv: %s"
|
||||
|
||||
#: category.php:19
|
||||
msgid "Category Archives: %s"
|
||||
msgstr "Kategoriarkiv: %s"
|
||||
#: search.php:18
|
||||
msgid "Search Results for: %s"
|
||||
msgstr "Søkeresultater for: %s"
|
||||
|
||||
#: archive.php:29
|
||||
msgid "Daily Archives: %s"
|
||||
msgstr "Daglige arkiver: %s"
|
||||
#: inc/custom-header.php:59
|
||||
msgctxt "header image description"
|
||||
msgid "Star"
|
||||
msgstr "Stjerne"
|
||||
|
||||
#: archive.php:31
|
||||
msgid "Monthly Archives: %s"
|
||||
msgstr "Månedlige arkiver: %s"
|
||||
#: inc/custom-header.php:54
|
||||
msgctxt "header image description"
|
||||
msgid "Diamond"
|
||||
msgstr "Diamant"
|
||||
|
||||
#: footer.php:19
|
||||
msgid "http://wordpress.org/"
|
||||
msgstr "http://wordpress.org/"
|
||||
#: inc/custom-header.php:49
|
||||
msgctxt "header image description"
|
||||
msgid "Circle"
|
||||
msgstr "Sirkel"
|
||||
|
||||
#: footer.php:19
|
||||
msgid "Semantic Personal Publishing Platform"
|
||||
msgstr "Semantisk, personlig publiseringsplattform"
|
||||
#: inc/back-compat.php:37 inc/back-compat.php:47 inc/back-compat.php:60
|
||||
msgid "Twenty Thirteen requires at least WordPress version 3.6. You are running version %s. Please upgrade and try again."
|
||||
msgstr "Twenty Thirteen krever WordPress versjon 3.6. Du kjører versjon %s. Vennligst oppgrader og prøv igjen."
|
||||
|
||||
#: content-none.php:12
|
||||
msgid "Nothing Found"
|
||||
msgstr "Ingenting funnet"
|
||||
#: image.php:52
|
||||
msgid "Next <span class=\"meta-nav\">→</span>"
|
||||
msgstr "Neste <span class=\"meta-nav\">→</span>"
|
||||
|
||||
#: comments.php:45
|
||||
msgid "Comment navigation"
|
||||
msgstr "Kommentarnavigasjon"
|
||||
#: image.php:51
|
||||
msgid "<span class=\"meta-nav\">←</span> Previous"
|
||||
msgstr "<span class=\"meta-nav\">←</span> Forrige"
|
||||
|
||||
#: comments.php:46
|
||||
msgid "← Older Comments"
|
||||
msgstr "← Eldre kommentarer"
|
||||
#: image.php:39
|
||||
msgid "Full resolution"
|
||||
msgstr "Full oppløsning"
|
||||
|
||||
#: image.php:38
|
||||
msgid "Link to full-size image"
|
||||
msgstr "Lenke til bildet i full størrelse"
|
||||
|
||||
#: image.php:22
|
||||
msgid "<span class=\"attachment-meta\">Published on <time class=\"entry-date\" datetime=\"%1$s\">%2$s</time> in <a href=\"%3$s\" title=\"Return to %4$s\" rel=\"gallery\">%5$s</a></span>"
|
||||
msgstr "<span class=\"attachment-meta\">Publisert <time class=\"entry-date\" datetime=\"%1$s\">%2$s</time> i <a href=\"%3$s\" title=\"Tilbake til %4$s\" rel=\"gallery\">%5$s</a></span>"
|
||||
|
||||
#: header.php:44
|
||||
msgid "Skip to content"
|
||||
msgstr "Gå til innhold"
|
||||
|
||||
#: header.php:43
|
||||
msgid "Menu"
|
||||
msgstr "Meny"
|
||||
|
||||
#: functions.php:369
|
||||
msgid "Permalink to %s"
|
||||
msgstr "Permalenke til %s"
|
||||
|
||||
#: functions.php:363
|
||||
msgctxt "1: post format name. 2: date"
|
||||
msgid "%1$s on %2$s"
|
||||
msgstr "%1$s, %2$s"
|
||||
|
||||
#: functions.php:343
|
||||
msgid "View all posts by %s"
|
||||
msgstr "Vis alle innlegg av %s"
|
||||
|
||||
#. Translators: used between list items, there is a space after the comma.
|
||||
#: functions.php:328 functions.php:334
|
||||
msgid ", "
|
||||
msgstr ", "
|
||||
|
||||
#: content-aside.php:20 content-audio.php:31 content-chat.php:30
|
||||
#: content-gallery.php:31 content-image.php:30 content-link.php:31
|
||||
#: content-quote.php:20 content-status.php:20 content-video.php:30
|
||||
#: content.php:48 image.php:70 page.php:35
|
||||
msgid "Pages:"
|
||||
msgstr "Sider:"
|
||||
#: functions.php:322
|
||||
msgid "Sticky"
|
||||
msgstr "Fremhevet"
|
||||
|
||||
#: author-bio.php:30
|
||||
msgid "View all posts by %s <span class=\"meta-nav\">→</span>"
|
||||
msgstr "Les alle innlegg av %s <span class=\"meta-nav\">→</span>"
|
||||
#: functions.php:304
|
||||
msgctxt "Next post link"
|
||||
msgid "%title <span class=\"meta-nav\">→</span>"
|
||||
msgstr "%title <span class=\"meta-nav\">→</span>"
|
||||
|
||||
#: 404.php:21
|
||||
msgid "This is somewhat embarrassing, isn’t it?"
|
||||
msgstr "Dette er litt flaut, ikke sant?"
|
||||
#: functions.php:303
|
||||
msgctxt "Previous post link"
|
||||
msgid "<span class=\"meta-nav\">←</span> %title"
|
||||
msgstr "<span class=\"meta-nav\">←</span> %title"
|
||||
|
||||
#: 404.php:22
|
||||
msgid "It looks like nothing was found at this location. Maybe try a search?"
|
||||
msgstr "Det ble ikke funnet noe her. Kanskje du kan prøve å søke?"
|
||||
#: functions.php:300
|
||||
msgid "Post navigation"
|
||||
msgstr "Innleggsnavigasjon"
|
||||
|
||||
#: author.php:31
|
||||
msgid "All posts by %s"
|
||||
msgstr "Alle innlegg av %s"
|
||||
#: functions.php:274
|
||||
msgid "Newer posts <span class=\"meta-nav\">→</span>"
|
||||
msgstr "Nyere innlegg <span class=\"meta-nav\">→</span>"
|
||||
|
||||
#: comments.php:25
|
||||
msgctxt "comments title"
|
||||
msgid "One thought on “%2$s”"
|
||||
msgid_plural "%1$s thoughts on “%2$s”"
|
||||
msgstr[0] "En kommentar om “%2$s”"
|
||||
msgstr[1] "%1$s kommentarer om “%2$s”"
|
||||
#: functions.php:270
|
||||
msgid "<span class=\"meta-nav\">←</span> Older posts"
|
||||
msgstr "<span class=\"meta-nav\">←</span> Eldre innlegg"
|
||||
|
||||
#: content-gallery.php:43 content-image.php:39 content-quote.php:29
|
||||
#: content-video.php:39 content.php:56
|
||||
msgid "Leave a comment"
|
||||
msgstr "Legg igjen en kommentar"
|
||||
#: functions.php:266
|
||||
msgid "Posts navigation"
|
||||
msgstr "Innleggsnavigasjon"
|
||||
|
||||
#: content-gallery.php:43 content-image.php:39 content-quote.php:29
|
||||
#: content-video.php:39 content.php:56
|
||||
msgid "One comment so far"
|
||||
msgstr "En kommentar så langt"
|
||||
#: functions.php:243
|
||||
msgid "Appears on posts and pages in the sidebar."
|
||||
msgstr "Vises på innleggssider og andre sider i sidekolonnen."
|
||||
|
||||
#: content-gallery.php:43 content-image.php:39 content-quote.php:29
|
||||
#: content-video.php:39 content.php:56
|
||||
msgid "View all % comments"
|
||||
msgstr "Se alle % kommentarer"
|
||||
#: functions.php:241
|
||||
msgid "Secondary Widget Area"
|
||||
msgstr "Sekundærområde for widgeter"
|
||||
|
||||
#: content-none.php:18
|
||||
msgid "Ready to publish your first post? <a href=\"%1$s\">Get started here</a>."
|
||||
msgstr "Klar for å publisere ditt første innlegg? <a href=\"%1$s\">Kom i gang her</a>."
|
||||
#: functions.php:233
|
||||
msgid "Appears in the footer section of the site."
|
||||
msgstr "Vises i bunnområdet på netttedet."
|
||||
|
||||
#: content-none.php:22
|
||||
msgid "Sorry, but nothing matched your search terms. Please try again with different keywords."
|
||||
msgstr "Beklager, ingenting passet til dine søkekriterier. Vennligst prøv igjen med andre søkeord."
|
||||
#: functions.php:231
|
||||
msgid "Main Widget Area"
|
||||
msgstr "Hovedområde for widgeter"
|
||||
|
||||
#: functions.php:97
|
||||
msgid "Navigation Menu"
|
||||
msgstr "Navigasjonsmeny"
|
||||
#: functions.php:218
|
||||
msgid "Page %s"
|
||||
msgstr "Side %s"
|
||||
|
||||
#. 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"
|
||||
msgstr "på"
|
||||
|
||||
#. 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
|
||||
@@ -253,67 +172,148 @@ 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"
|
||||
msgstr "på"
|
||||
#: functions.php:97
|
||||
msgid "Navigation Menu"
|
||||
msgstr "Navigasjonsmeny"
|
||||
|
||||
#: taxonomy-post_format.php:23
|
||||
msgid "%s Archives"
|
||||
msgstr "Arkiv for %s"
|
||||
#: footer.php:19
|
||||
msgid "Proudly powered by %s"
|
||||
msgstr "Stolt drevet av %s"
|
||||
|
||||
#. Theme Name of the plugin/theme
|
||||
msgid "Twenty Thirteen"
|
||||
msgstr "Twenty Thirteen"
|
||||
#: footer.php:19
|
||||
msgid "Semantic Personal Publishing Platform"
|
||||
msgstr "Semantisk, personlig publiseringsplattform"
|
||||
|
||||
#: functions.php:266
|
||||
msgid "Posts navigation"
|
||||
msgstr "Innleggsnavigasjon"
|
||||
#: footer.php:19
|
||||
msgid "http://wordpress.org/"
|
||||
msgstr "http://wordpress.org/"
|
||||
|
||||
#: functions.php:303
|
||||
msgctxt "Previous post link"
|
||||
msgid "<span class=\"meta-nav\">←</span> %title"
|
||||
msgstr "<span class=\"meta-nav\">←</span> %title"
|
||||
#: content-none.php:27
|
||||
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."
|
||||
|
||||
#: functions.php:304
|
||||
msgctxt "Next post link"
|
||||
msgid "%title <span class=\"meta-nav\">→</span>"
|
||||
msgstr "%title <span class=\"meta-nav\">→</span>"
|
||||
#: content-none.php:22
|
||||
msgid "Sorry, but nothing matched your search terms. Please try again with different keywords."
|
||||
msgstr "Beklager, ingenting passet til dine søkekriterier. Vennligst prøv igjen med andre søkeord."
|
||||
|
||||
#: functions.php:322
|
||||
msgid "Sticky"
|
||||
msgstr "Fremhevet"
|
||||
#: content-none.php:18
|
||||
msgid "Ready to publish your first post? <a href=\"%1$s\">Get started here</a>."
|
||||
msgstr "Klar for å publisere ditt første innlegg? <a href=\"%1$s\">Kom i gang her</a>."
|
||||
|
||||
#: functions.php:363
|
||||
msgctxt "1: post format name. 2: date"
|
||||
msgid "%1$s on %2$s"
|
||||
msgstr "%1$s, %2$s"
|
||||
#: content-none.php:12
|
||||
msgid "Nothing Found"
|
||||
msgstr "Ingenting funnet"
|
||||
|
||||
#: image.php:22
|
||||
msgid "<span class=\"attachment-meta\">Published on <time class=\"entry-date\" datetime=\"%1$s\">%2$s</time> in <a href=\"%3$s\" title=\"Return to %4$s\" rel=\"gallery\">%5$s</a></span>"
|
||||
msgstr "<span class=\"attachment-meta\">Publisert <time class=\"entry-date\" datetime=\"%1$s\">%2$s</time> i <a href=\"%3$s\" title=\"Tilbake til %4$s\" rel=\"gallery\">%5$s</a></span>"
|
||||
#: content-gallery.php:43 content-image.php:39 content-quote.php:29
|
||||
#: content-video.php:39 content.php:56
|
||||
msgid "View all % comments"
|
||||
msgstr "Se alle % kommentarer"
|
||||
|
||||
#: image.php:51
|
||||
msgid "<span class=\"meta-nav\">←</span> Previous"
|
||||
msgstr "<span class=\"meta-nav\">←</span> Forrige"
|
||||
#: content-gallery.php:43 content-image.php:39 content-quote.php:29
|
||||
#: content-video.php:39 content.php:56
|
||||
msgid "One comment so far"
|
||||
msgstr "En kommentar så langt"
|
||||
|
||||
#: image.php:52
|
||||
msgid "Next <span class=\"meta-nav\">→</span>"
|
||||
msgstr "Neste <span class=\"meta-nav\">→</span>"
|
||||
#: content-gallery.php:43 content-image.php:39 content-quote.php:29
|
||||
#: content-video.php:39 content.php:56
|
||||
msgid "Leave a comment"
|
||||
msgstr "Legg igjen en kommentar"
|
||||
|
||||
#: inc/custom-header.php:49
|
||||
msgctxt "header image description"
|
||||
msgid "Circle"
|
||||
msgstr "Sirkel"
|
||||
#: content-aside.php:27 content-aside.php:35 content-audio.php:38
|
||||
#: content-chat.php:36 content-gallery.php:46 content-image.php:42
|
||||
#: content-link.php:19 content-quote.php:32 content-status.php:26
|
||||
#: content-video.php:42 content.php:31 image.php:44 page.php:39
|
||||
msgid "Edit"
|
||||
msgstr "Rediger"
|
||||
|
||||
#: inc/custom-header.php:54
|
||||
msgctxt "header image description"
|
||||
msgid "Diamond"
|
||||
msgstr "Diamant"
|
||||
#: content-aside.php:20 content-audio.php:31 content-chat.php:30
|
||||
#: content-gallery.php:31 content-image.php:30 content-link.php:31
|
||||
#: content-quote.php:20 content-status.php:20 content-video.php:30
|
||||
#: content.php:48 image.php:70 page.php:35
|
||||
msgid "Pages:"
|
||||
msgstr "Sider:"
|
||||
|
||||
#: inc/custom-header.php:59
|
||||
msgctxt "header image description"
|
||||
msgid "Star"
|
||||
msgstr "Stjerne"
|
||||
#. translators: %s: Name of current post
|
||||
#: content-aside.php:16 content-audio.php:27 content-chat.php:26
|
||||
#: content-gallery.php:27 content-image.php:26 content-link.php:27
|
||||
#: content-quote.php:16 content-status.php:16 content-video.php:26
|
||||
#: content.php:44 functions.php:478
|
||||
msgid "Continue reading %s <span class=\"meta-nav\">→</span>"
|
||||
msgstr "Fortsett å lese %s <span class=\"meta-nav\">→</span>"
|
||||
|
||||
#: comments.php:52
|
||||
msgid "Comments are closed."
|
||||
msgstr "Det er stengt for kommentarer."
|
||||
|
||||
#: comments.php:47
|
||||
msgid "Newer Comments →"
|
||||
msgstr "Nyere kommentarer →"
|
||||
|
||||
#: comments.php:46
|
||||
msgid "← Older Comments"
|
||||
msgstr "← Eldre kommentarer"
|
||||
|
||||
#: comments.php:45
|
||||
msgid "Comment navigation"
|
||||
msgstr "Kommentarnavigasjon"
|
||||
|
||||
#: comments.php:25
|
||||
msgctxt "comments title"
|
||||
msgid "One thought on “%2$s”"
|
||||
msgid_plural "%1$s thoughts on “%2$s”"
|
||||
msgstr[0] "En kommentar om “%2$s”"
|
||||
msgstr[1] "%1$s kommentarer om “%2$s”"
|
||||
|
||||
#: category.php:19
|
||||
msgid "Category Archives: %s"
|
||||
msgstr "Kategoriarkiv: %s"
|
||||
|
||||
#: author.php:31
|
||||
msgid "All posts by %s"
|
||||
msgstr "Alle innlegg av %s"
|
||||
|
||||
#: author-bio.php:30
|
||||
msgid "View all posts by %s <span class=\"meta-nav\">→</span>"
|
||||
msgstr "Les alle innlegg av %s <span class=\"meta-nav\">→</span>"
|
||||
|
||||
#: author-bio.php:26
|
||||
msgid "About %s"
|
||||
msgstr "Om %s"
|
||||
|
||||
#: archive.php:35
|
||||
msgid "Archives"
|
||||
msgstr "Arkiv"
|
||||
|
||||
#: archive.php:33
|
||||
msgctxt "yearly archives date format"
|
||||
msgid "Y"
|
||||
msgstr "Y"
|
||||
|
||||
#: archive.php:33
|
||||
msgid "Yearly Archives: %s"
|
||||
msgstr "Årlige arkiver: %s"
|
||||
|
||||
#: archive.php:31
|
||||
msgctxt "monthly archives date format"
|
||||
msgid "F Y"
|
||||
msgstr "F Y"
|
||||
|
||||
#: archive.php:31
|
||||
msgid "Monthly Archives: %s"
|
||||
msgstr "Månedlige arkiver: %s"
|
||||
|
||||
#: archive.php:29
|
||||
msgid "Daily Archives: %s"
|
||||
msgstr "Daglige arkiver: %s"
|
||||
|
||||
#: 404.php:22
|
||||
msgid "It looks like nothing was found at this location. Maybe try a search?"
|
||||
msgstr "Det ble ikke funnet noe her. Kanskje du kan prøve å søke?"
|
||||
|
||||
#: 404.php:21
|
||||
msgid "This is somewhat embarrassing, isn’t it?"
|
||||
msgstr "Dette er litt flaut, ikke sant?"
|
||||
|
||||
#: 404.php:16
|
||||
msgid "Not Found"
|
||||
msgstr "Ikke funnet"
|
||||
Binary file not shown.
@@ -2,45 +2,17 @@
|
||||
# This file is distributed under the same license as the Twenty Twelve package.
|
||||
msgid ""
|
||||
msgstr ""
|
||||
"PO-Revision-Date: 2015-03-26 15:59:36+0000\n"
|
||||
"PO-Revision-Date: 2015-07-27 22:21:31+0000\n"
|
||||
"MIME-Version: 1.0\n"
|
||||
"Content-Type: text/plain; charset=UTF-8\n"
|
||||
"Content-Transfer-Encoding: 8bit\n"
|
||||
"Plural-Forms: nplurals=2; plural=n != 1;\n"
|
||||
"X-Generator: GlotPress/1.0-alpha-1000\n"
|
||||
"X-Generator: GlotPress/1.0-alpha-1100\n"
|
||||
"Project-Id-Version: Twenty Twelve\n"
|
||||
|
||||
#: tag.php:21
|
||||
msgid "Tag Archives: %s"
|
||||
msgstr "Stikkordarkiv: %s"
|
||||
|
||||
#. Theme Name of the plugin/theme
|
||||
msgid "Twenty Twelve"
|
||||
msgstr "Twenty Twelve"
|
||||
|
||||
#: image.php:42
|
||||
msgid "Next →"
|
||||
msgstr "Neste →"
|
||||
|
||||
#: search.php:18
|
||||
msgid "Search Results for: %s"
|
||||
msgstr "Søkeresultater for: %s"
|
||||
|
||||
#: search.php:38
|
||||
msgid "Sorry, but nothing matched your search criteria. Please try again with some different keywords."
|
||||
msgstr "Det var ingen treff på dine søkekriterier. Søk på nytt med noen andre nøkkelord."
|
||||
|
||||
#. Author of the plugin/theme
|
||||
msgid "the WordPress team"
|
||||
msgstr "WordPress-gjengen"
|
||||
|
||||
#: index.php:42
|
||||
msgid "Ready to publish your first post? <a href=\"%s\">Get started here</a>."
|
||||
msgstr "Klar for å publisere ditt første innlegg? <a href=\"%s\">Start her</a>."
|
||||
|
||||
#: index.php:38
|
||||
msgid "No posts to display"
|
||||
msgstr "Ingen innlegg å vise"
|
||||
#. Author URI of the plugin/theme
|
||||
msgid "https://wordpress.org/"
|
||||
msgstr "https://wordpress.org/"
|
||||
|
||||
#. Template Name of the plugin/theme
|
||||
msgid "Full-width Page Template, No Sidebar"
|
||||
@@ -50,180 +22,63 @@ msgstr "Sidemal med full bredde, uten sidekolonne"
|
||||
msgid "Front Page Template"
|
||||
msgstr "Forsidemal"
|
||||
|
||||
#: single.php:21
|
||||
msgctxt "Previous post link"
|
||||
msgid "←"
|
||||
msgstr "←"
|
||||
|
||||
#: single.php:22
|
||||
msgctxt "Next post link"
|
||||
msgid "→"
|
||||
msgstr "→"
|
||||
#. Author of the plugin/theme
|
||||
msgid "the WordPress team"
|
||||
msgstr "WordPress-gjengen"
|
||||
|
||||
#. 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."
|
||||
|
||||
#. Theme URI of the plugin/theme
|
||||
msgid "http://wordpress.org/themes/twentytwelve"
|
||||
msgstr "http://wordpress.org/themes/twentytwelve"
|
||||
msgid "https://wordpress.org/themes/twentytwelve/"
|
||||
msgstr "https://wordpress.org/themes/twentytwelve/"
|
||||
|
||||
#: content.php:66
|
||||
msgid "View all posts by %s <span class=\"meta-nav\">→</span>"
|
||||
msgstr "Les alle innlegg av %s <span class=\"meta-nav\">→</span>"
|
||||
#. Theme Name of the plugin/theme
|
||||
msgid "Twenty Twelve"
|
||||
msgstr "Twenty Twelve"
|
||||
|
||||
#: functions.php:242
|
||||
msgid "Main Sidebar"
|
||||
msgstr "Primær sidekolonne"
|
||||
#: tag.php:21
|
||||
msgid "Tag Archives: %s"
|
||||
msgstr "Stikkordarkiv: %s"
|
||||
|
||||
#: functions.php:64
|
||||
msgid "Primary Menu"
|
||||
msgstr "Primærmeny"
|
||||
#: single.php:22
|
||||
msgctxt "Next post link"
|
||||
msgid "→"
|
||||
msgstr "→"
|
||||
|
||||
#: functions.php:286 single.php:20
|
||||
msgid "Post navigation"
|
||||
msgstr "Innleggsnavigasjon"
|
||||
#: single.php:21
|
||||
msgctxt "Previous post link"
|
||||
msgid "←"
|
||||
msgstr "←"
|
||||
|
||||
#: functions.php:287
|
||||
msgid "<span class=\"meta-nav\">←</span> Older posts"
|
||||
msgstr "<span class=\"meta-nav\">←</span> Eldre innlegg"
|
||||
#: search.php:38
|
||||
msgid "Sorry, but nothing matched your search criteria. Please try again with some different keywords."
|
||||
msgstr "Det var ingen treff på dine søkekriterier. Søk på nytt med noen andre nøkkelord."
|
||||
|
||||
#: functions.php:288
|
||||
msgid "Newer posts <span class=\"meta-nav\">→</span>"
|
||||
msgstr "Nyere innlegg <span class=\"meta-nav\">→</span>"
|
||||
#: search.php:18
|
||||
msgid "Search Results for: %s"
|
||||
msgstr "Søkeresultater for: %s"
|
||||
|
||||
#: functions.php:313
|
||||
msgid "Pingback:"
|
||||
msgstr "Tilbaketråkk:"
|
||||
#: index.php:42
|
||||
msgid "Ready to publish your first post? <a href=\"%s\">Get started here</a>."
|
||||
msgstr "Klar for å publisere ditt første innlegg? <a href=\"%s\">Start her</a>."
|
||||
|
||||
#: content-aside.php:26 content-image.php:26 content-link.php:24
|
||||
#: content-page.php:24 content-quote.php:23 content-status.php:40
|
||||
#: content.php:51 functions.php:345 image.php:37
|
||||
msgid "Edit"
|
||||
msgstr "Rediger"
|
||||
#: index.php:38
|
||||
msgid "No posts to display"
|
||||
msgstr "Ingen innlegg å vise"
|
||||
|
||||
#: content-aside.php:23 content-image.php:23 content-link.php:21
|
||||
#: content-quote.php:20 content-status.php:37 content.php:33
|
||||
msgid "Leave a reply"
|
||||
msgstr "Skriv en kommentar"
|
||||
|
||||
#: content-page.php:21 content.php:45 image.php:102
|
||||
msgid "Pages:"
|
||||
msgstr "Sider:"
|
||||
|
||||
#: content-aside.php:15 content-image.php:13 content-link.php:14
|
||||
#: content-quote.php:13 content-status.php:31 content.php:44
|
||||
msgid "Continue reading <span class=\"meta-nav\">→</span>"
|
||||
msgstr "Les videre <span class=\"meta-nav\">→</span>"
|
||||
|
||||
#: content-none.php:13 index.php:49 search.php:34
|
||||
msgid "Nothing Found"
|
||||
msgstr "Ingenting funnet"
|
||||
|
||||
#: author.php:32
|
||||
msgid "Author Archives: %s"
|
||||
msgstr "Forfatterarkiv: %s"
|
||||
|
||||
#: comments.php:31
|
||||
msgid "One thought on “%2$s”"
|
||||
msgid_plural "%1$s thoughts on “%2$s”"
|
||||
msgstr[0] "En tanke om “%2$s”"
|
||||
msgstr[1] "%1$s tanker om “%2$s”"
|
||||
|
||||
#: comments.php:42
|
||||
msgid "Comment navigation"
|
||||
msgstr "Kommentarnavigasjon"
|
||||
|
||||
#: category.php:21
|
||||
msgid "Category Archives: %s"
|
||||
msgstr "Kategoriarkiv: %s"
|
||||
|
||||
#: 404.php:17
|
||||
msgid "This is somewhat embarrassing, isn’t it?"
|
||||
msgstr "Dette er litt flaut, ikke sant?"
|
||||
|
||||
#: content-aside.php:20 content-link.php:18 content-quote.php:17
|
||||
#: content-status.php:15
|
||||
msgid "Permalink to %s"
|
||||
msgstr "Permalenke til %s"
|
||||
|
||||
#: comments.php:53
|
||||
msgid "Comments are closed."
|
||||
msgstr "Det er stengt for kommentarer."
|
||||
|
||||
#: comments.php:43
|
||||
msgid "← Older Comments"
|
||||
msgstr "← Eldre kommentarer"
|
||||
|
||||
#: comments.php:44
|
||||
msgid "Newer Comments →"
|
||||
msgstr "Nyere kommentarer →"
|
||||
|
||||
#. #-#-#-#-# twentytwelve.pot (Twenty Twelve 1.6) #-#-#-#-#
|
||||
#. Author URI of the plugin/theme
|
||||
#: footer.php:16
|
||||
msgid "http://wordpress.org/"
|
||||
msgstr "http://wordpress.org/"
|
||||
|
||||
#: author.php:63 content.php:62
|
||||
msgid "About %s"
|
||||
msgstr "Om %s"
|
||||
|
||||
#: archive.php:33
|
||||
msgid "Yearly Archives: %s"
|
||||
msgstr "Årlige arkiver: %s"
|
||||
|
||||
#: archive.php:29
|
||||
msgid "Daily Archives: %s"
|
||||
msgstr "Daglige arkiver: %s"
|
||||
|
||||
#: archive.php:31
|
||||
msgid "Monthly Archives: %s"
|
||||
msgstr "Månedlige arkiver: %s"
|
||||
|
||||
#: footer.php:16
|
||||
msgid "Proudly powered by %s"
|
||||
msgstr "Stolt drevet av %s"
|
||||
|
||||
#: footer.php:16
|
||||
msgid "Semantic Personal Publishing Platform"
|
||||
msgstr "Semantisk, personlig publiseringsplattform"
|
||||
|
||||
#. Translators: used between list items, there is a space after the comma.
|
||||
#: functions.php:370 functions.php:373
|
||||
msgid ", "
|
||||
msgstr ", "
|
||||
|
||||
#: archive.php:31
|
||||
msgctxt "monthly archives date format"
|
||||
msgid "F Y"
|
||||
msgstr "F Y"
|
||||
|
||||
#: archive.php:33
|
||||
msgctxt "yearly archives date format"
|
||||
msgid "Y"
|
||||
msgstr "Y"
|
||||
|
||||
#: functions.php:340
|
||||
msgid "Your comment is awaiting moderation."
|
||||
msgstr "Din kommentar avventer moderasjon."
|
||||
#: image.php:42
|
||||
msgid "Next →"
|
||||
msgstr "Neste →"
|
||||
|
||||
#: image.php:41
|
||||
msgid "← Previous"
|
||||
msgstr "← Forrige"
|
||||
|
||||
#: functions.php:384
|
||||
msgid "View all posts by %s"
|
||||
msgstr "Vis alle innlegg av %s"
|
||||
|
||||
#: archive.php:35
|
||||
msgid "Archives"
|
||||
msgstr "Arkiv"
|
||||
|
||||
#. translators: 1: date, 2: time
|
||||
#: functions.php:334
|
||||
msgid "%1$s at %2$s"
|
||||
msgstr "%1$s, kl. %2$s"
|
||||
#: image.php:26
|
||||
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>."
|
||||
|
||||
#: header.php:44
|
||||
msgid "Skip to content"
|
||||
@@ -233,58 +88,66 @@ msgstr "Gå til innhold"
|
||||
msgid "Menu"
|
||||
msgstr "Meny"
|
||||
|
||||
#: functions.php:313
|
||||
msgid "(Edit)"
|
||||
msgstr "(Rediger)"
|
||||
|
||||
#: functions.php:328
|
||||
msgid "Post author"
|
||||
msgstr "Innleggsforfatter"
|
||||
|
||||
#: content-aside.php:23 content-image.php:23 content-link.php:21
|
||||
#: content-quote.php:20 content-status.php:37 content.php:33
|
||||
msgid "1 Reply"
|
||||
msgstr "1 svar"
|
||||
|
||||
#: content-none.php:17 index.php:53
|
||||
msgid "Apologies, but no results were found. Perhaps searching will help find a related post."
|
||||
msgstr "Beklager, men ingen resultater ble funnet. Kanskje du kan finne et relatert innlegg ved å søke."
|
||||
|
||||
#: content-aside.php:23 content-image.php:23 content-link.php:21
|
||||
#: content-quote.php:20 content-status.php:37 content.php:33
|
||||
msgid "% Replies"
|
||||
msgstr "% svar"
|
||||
|
||||
#: content-link.php:12
|
||||
msgid "Link"
|
||||
msgstr "Lenke"
|
||||
|
||||
#: functions.php:213
|
||||
msgid "Page %s"
|
||||
msgstr "Side %s"
|
||||
|
||||
#: 404.php:21
|
||||
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."
|
||||
|
||||
#: content.php:16
|
||||
msgid "Featured post"
|
||||
msgstr "Fremhevet innlegg"
|
||||
|
||||
#. 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>."
|
||||
|
||||
#: functions.php:394
|
||||
#: functions.php:392
|
||||
msgid "This entry was posted on %3$s<span class=\"by-author\"> by %4$s</span>."
|
||||
msgstr "Dette innlegget ble skrevet %3$s<span class=\"by-author\"> av %4$s</span>."
|
||||
|
||||
#: functions.php:392
|
||||
#: functions.php:390
|
||||
msgid "This entry was posted in %1$s on %3$s<span class=\"by-author\"> by %4$s</span>."
|
||||
msgstr "Dette innlegget ble skrevet i %1$s, %3$s<span class=\"by-author\"> av %4$s</span>."
|
||||
|
||||
#. Translators: 1 is category, 2 is tag, 3 is the date and 4 is the author's
|
||||
#. name.
|
||||
#: functions.php:388
|
||||
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>."
|
||||
|
||||
#: functions.php:382
|
||||
msgid "View all posts by %s"
|
||||
msgstr "Vis alle innlegg av %s"
|
||||
|
||||
#. Translators: used between list items, there is a space after the comma.
|
||||
#: functions.php:368 functions.php:371
|
||||
msgid ", "
|
||||
msgstr ", "
|
||||
|
||||
#: functions.php:347
|
||||
msgid "Reply"
|
||||
msgstr "Svar"
|
||||
|
||||
#: functions.php:338
|
||||
msgid "Your comment is awaiting moderation."
|
||||
msgstr "Din kommentar avventer moderasjon."
|
||||
|
||||
#. translators: 1: date, 2: time
|
||||
#: functions.php:332
|
||||
msgid "%1$s at %2$s"
|
||||
msgstr "%1$s, kl. %2$s"
|
||||
|
||||
#: functions.php:326
|
||||
msgid "Post author"
|
||||
msgstr "Innleggsforfatter"
|
||||
|
||||
#: functions.php:311
|
||||
msgid "(Edit)"
|
||||
msgstr "(Rediger)"
|
||||
|
||||
#: functions.php:311
|
||||
msgid "Pingback:"
|
||||
msgstr "Tilbaketråkk:"
|
||||
|
||||
#: functions.php:286
|
||||
msgid "Newer posts <span class=\"meta-nav\">→</span>"
|
||||
msgstr "Nyere innlegg <span class=\"meta-nav\">→</span>"
|
||||
|
||||
#: functions.php:285
|
||||
msgid "<span class=\"meta-nav\">←</span> Older posts"
|
||||
msgstr "<span class=\"meta-nav\">←</span> Eldre innlegg"
|
||||
|
||||
#: functions.php:284 single.php:20
|
||||
msgid "Post navigation"
|
||||
msgstr "Innleggsnavigasjon"
|
||||
|
||||
#: functions.php:262
|
||||
msgid "Second Front Page Widget Area"
|
||||
msgstr "Andre widget-område på forside"
|
||||
@@ -293,17 +156,21 @@ msgstr "Andre widget-område på forside"
|
||||
msgid "Appears when using the optional Front Page template with a page set as Static Front Page"
|
||||
msgstr "Vises når man bruker den valgfrie forsidemalen med en side satt som statisk forside"
|
||||
|
||||
#: functions.php:252
|
||||
msgid "First Front Page Widget Area"
|
||||
msgstr "Første widget-område på forside"
|
||||
|
||||
#: functions.php:244
|
||||
msgid "Appears on posts and pages except the optional Front Page template, which has its own widgets"
|
||||
msgstr "Vises på innlegg og sider bortsett fra den valgfrie forsidemalen, som har sine egne widgeter"
|
||||
|
||||
#. 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"
|
||||
#: functions.php:242
|
||||
msgid "Main Sidebar"
|
||||
msgstr "Primær sidekolonne"
|
||||
|
||||
#: functions.php:213
|
||||
msgid "Page %s"
|
||||
msgstr "Side %s"
|
||||
|
||||
#. translators: To add an additional Open Sans character subset specific to
|
||||
#. your language, translate this to 'greek', 'cyrillic' or 'vietnamese'. Do not
|
||||
@@ -313,14 +180,149 @@ msgctxt "Open Sans font: add new subset (greek, cyrillic, vietnamese)"
|
||||
msgid "no-subset"
|
||||
msgstr "no-subset"
|
||||
|
||||
#: functions.php:252
|
||||
msgid "First Front Page Widget Area"
|
||||
msgstr "Første widget-område på forside"
|
||||
#. 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"
|
||||
|
||||
#: image.php:26
|
||||
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>."
|
||||
#: functions.php:64
|
||||
msgid "Primary Menu"
|
||||
msgstr "Primærmeny"
|
||||
|
||||
#: functions.php:349
|
||||
msgid "Reply"
|
||||
msgstr "Svar"
|
||||
#: footer.php:16
|
||||
msgid "Proudly powered by %s"
|
||||
msgstr "Stolt drevet av %s"
|
||||
|
||||
#: footer.php:16
|
||||
msgid "Semantic Personal Publishing Platform"
|
||||
msgstr "Semantisk, personlig publiseringsplattform"
|
||||
|
||||
#: footer.php:16
|
||||
msgid "http://wordpress.org/"
|
||||
msgstr "http://wordpress.org/"
|
||||
|
||||
#: content.php:66
|
||||
msgid "View all posts by %s <span class=\"meta-nav\">→</span>"
|
||||
msgstr "Les alle innlegg av %s <span class=\"meta-nav\">→</span>"
|
||||
|
||||
#: content.php:16
|
||||
msgid "Featured post"
|
||||
msgstr "Fremhevet innlegg"
|
||||
|
||||
#: content-page.php:21 content.php:45 image.php:102
|
||||
msgid "Pages:"
|
||||
msgstr "Sider:"
|
||||
|
||||
#: content-none.php:17 index.php:53
|
||||
msgid "Apologies, but no results were found. Perhaps searching will help find a related post."
|
||||
msgstr "Beklager, men ingen resultater ble funnet. Kanskje du kan finne et relatert innlegg ved å søke."
|
||||
|
||||
#: content-none.php:13 index.php:49 search.php:34
|
||||
msgid "Nothing Found"
|
||||
msgstr "Ingenting funnet"
|
||||
|
||||
#: content-link.php:12
|
||||
msgid "Link"
|
||||
msgstr "Lenke"
|
||||
|
||||
#: content-aside.php:26 content-image.php:26 content-link.php:24
|
||||
#: content-page.php:24 content-quote.php:23 content-status.php:40
|
||||
#: content.php:51 functions.php:343 image.php:37
|
||||
msgid "Edit"
|
||||
msgstr "Rediger"
|
||||
|
||||
#: content-aside.php:23 content-image.php:23 content-link.php:21
|
||||
#: content-quote.php:20 content-status.php:37 content.php:33
|
||||
msgid "% Replies"
|
||||
msgstr "% svar"
|
||||
|
||||
#: content-aside.php:23 content-image.php:23 content-link.php:21
|
||||
#: content-quote.php:20 content-status.php:37 content.php:33
|
||||
msgid "1 Reply"
|
||||
msgstr "1 svar"
|
||||
|
||||
#: content-aside.php:23 content-image.php:23 content-link.php:21
|
||||
#: content-quote.php:20 content-status.php:37 content.php:33
|
||||
msgid "Leave a reply"
|
||||
msgstr "Skriv en kommentar"
|
||||
|
||||
#: content-aside.php:20 content-link.php:18 content-quote.php:17
|
||||
#: content-status.php:15
|
||||
msgid "Permalink to %s"
|
||||
msgstr "Permalenke til %s"
|
||||
|
||||
#: content-aside.php:15 content-image.php:13 content-link.php:14
|
||||
#: content-quote.php:13 content-status.php:31 content.php:44
|
||||
msgid "Continue reading <span class=\"meta-nav\">→</span>"
|
||||
msgstr "Les videre <span class=\"meta-nav\">→</span>"
|
||||
|
||||
#: comments.php:53
|
||||
msgid "Comments are closed."
|
||||
msgstr "Det er stengt for kommentarer."
|
||||
|
||||
#: comments.php:44
|
||||
msgid "Newer Comments →"
|
||||
msgstr "Nyere kommentarer →"
|
||||
|
||||
#: comments.php:43
|
||||
msgid "← Older Comments"
|
||||
msgstr "← Eldre kommentarer"
|
||||
|
||||
#: comments.php:42
|
||||
msgid "Comment navigation"
|
||||
msgstr "Kommentarnavigasjon"
|
||||
|
||||
#: comments.php:31
|
||||
msgid "One thought on “%2$s”"
|
||||
msgid_plural "%1$s thoughts on “%2$s”"
|
||||
msgstr[0] "En tanke om “%2$s”"
|
||||
msgstr[1] "%1$s tanker om “%2$s”"
|
||||
|
||||
#: category.php:21
|
||||
msgid "Category Archives: %s"
|
||||
msgstr "Kategoriarkiv: %s"
|
||||
|
||||
#: author.php:63 content.php:62
|
||||
msgid "About %s"
|
||||
msgstr "Om %s"
|
||||
|
||||
#: author.php:32
|
||||
msgid "Author Archives: %s"
|
||||
msgstr "Forfatterarkiv: %s"
|
||||
|
||||
#: archive.php:35
|
||||
msgid "Archives"
|
||||
msgstr "Arkiv"
|
||||
|
||||
#: archive.php:33
|
||||
msgctxt "yearly archives date format"
|
||||
msgid "Y"
|
||||
msgstr "Y"
|
||||
|
||||
#: archive.php:33
|
||||
msgid "Yearly Archives: %s"
|
||||
msgstr "Årlige arkiver: %s"
|
||||
|
||||
#: archive.php:31
|
||||
msgctxt "monthly archives date format"
|
||||
msgid "F Y"
|
||||
msgstr "F Y"
|
||||
|
||||
#: archive.php:31
|
||||
msgid "Monthly Archives: %s"
|
||||
msgstr "Månedlige arkiver: %s"
|
||||
|
||||
#: archive.php:29
|
||||
msgid "Daily Archives: %s"
|
||||
msgstr "Daglige arkiver: %s"
|
||||
|
||||
#: 404.php:21
|
||||
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."
|
||||
|
||||
#: 404.php:17
|
||||
msgid "This is somewhat embarrassing, isn’t it?"
|
||||
msgstr "Dette er litt flaut, ikke sant?"
|
||||
@@ -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.1.1
|
||||
Version: 3.1.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.1.1' );
|
||||
define( 'AKISMET_VERSION', '3.1.3' );
|
||||
define( 'AKISMET__MINIMUM_WP_VERSION', '3.2' );
|
||||
define( 'AKISMET__PLUGIN_URL', plugin_dir_url( __FILE__ ) );
|
||||
define( 'AKISMET__PLUGIN_DIR', plugin_dir_path( __FILE__ ) );
|
||||
|
||||
@@ -232,7 +232,7 @@ class Akismet_Admin {
|
||||
if ( defined( 'WPCOM_API_KEY' ) )
|
||||
return false; //shouldn't have option to save key if already defined
|
||||
|
||||
$new_key = preg_replace( '/[^a-h0-9]/i', '', $_POST['key'] );
|
||||
$new_key = preg_replace( '/[^a-f0-9]/i', '', $_POST['key'] );
|
||||
$old_key = Akismet::get_api_key();
|
||||
|
||||
if ( empty( $new_key ) ) {
|
||||
@@ -290,15 +290,6 @@ class Akismet_Admin {
|
||||
|
||||
// WP 2.5+
|
||||
public static function rightnow_stats() {
|
||||
global $submenu, $wp_db_version;
|
||||
|
||||
if ( 8645 < $wp_db_version ) // 2.7
|
||||
$link = add_query_arg( array( 'comment_status' => 'spam' ), admin_url( 'edit-comments.php' ) );
|
||||
elseif ( isset( $submenu['edit-comments.php'] ) )
|
||||
$link = add_query_arg( array( 'page' => 'akismet-admin' ), admin_url( 'edit-comments.php' ) );
|
||||
else
|
||||
$link = add_query_arg( array( 'page' => 'akismet-admin' ), admin_url( 'edit.php' ) );
|
||||
|
||||
if ( $count = get_option('akismet_spam_count') ) {
|
||||
$intro = sprintf( _n(
|
||||
'<a href="%1$s">Akismet</a> has protected your site from %2$s spam comment already. ',
|
||||
@@ -309,15 +300,16 @@ class Akismet_Admin {
|
||||
$intro = sprintf( __('<a href="%s">Akismet</a> blocks spam from getting to your blog. ', 'akismet'), 'https://akismet.com/wordpress/' );
|
||||
}
|
||||
|
||||
$link = function_exists( 'esc_url' ) ? esc_url( $link ) : clean_url( $link );
|
||||
$link = add_query_arg( array( 'comment_status' => 'spam' ), admin_url( 'edit-comments.php' ) );
|
||||
|
||||
if ( $queue_count = self::get_spam_count() ) {
|
||||
$queue_text = sprintf( _n(
|
||||
'There’s <a href="%2$s">%1$s comment</a> in your spam queue right now.',
|
||||
'There are <a href="%2$s">%1$s comments</a> in your spam queue right now.',
|
||||
$queue_count
|
||||
, 'akismet'), number_format_i18n( $queue_count ), $link );
|
||||
, 'akismet'), number_format_i18n( $queue_count ), esc_url( $link ) );
|
||||
} else {
|
||||
$queue_text = sprintf( __( "There’s nothing in your <a href='%s'>spam queue</a> at the moment." , 'akismet'), $link );
|
||||
$queue_text = sprintf( __( "There’s nothing in your <a href='%s'>spam queue</a> at the moment." , 'akismet'), esc_url( $link ) );
|
||||
}
|
||||
|
||||
$text = $intro . '<br />' . $queue_text;
|
||||
@@ -379,17 +371,22 @@ class Akismet_Admin {
|
||||
update_comment_meta( $c['comment_ID'], 'akismet_result', 'true' );
|
||||
delete_comment_meta( $c['comment_ID'], 'akismet_error' );
|
||||
delete_comment_meta( $c['comment_ID'], 'akismet_delayed_moderation_email' );
|
||||
Akismet::update_comment_history( $c['comment_ID'], __('Akismet re-checked and caught this comment as spam', 'akismet'), 'check-spam' );
|
||||
Akismet::update_comment_history( $c['comment_ID'], '', 'recheck-spam' );
|
||||
|
||||
} elseif ( 'false' == $response[1] ) {
|
||||
update_comment_meta( $c['comment_ID'], 'akismet_result', 'false' );
|
||||
delete_comment_meta( $c['comment_ID'], 'akismet_error' );
|
||||
delete_comment_meta( $c['comment_ID'], 'akismet_delayed_moderation_email' );
|
||||
Akismet::update_comment_history( $c['comment_ID'], __('Akismet re-checked and cleared this comment', 'akismet'), 'check-ham' );
|
||||
Akismet::update_comment_history( $c['comment_ID'], '', 'recheck-ham' );
|
||||
// abnormal result: error
|
||||
} else {
|
||||
update_comment_meta( $c['comment_ID'], 'akismet_result', 'error' );
|
||||
Akismet::update_comment_history( $c['comment_ID'], sprintf( __('Akismet was unable to re-check this comment (response: %s)', 'akismet'), substr($response[1], 0, 50)), 'check-error' );
|
||||
Akismet::update_comment_history(
|
||||
$c['comment_ID'],
|
||||
'',
|
||||
'recheck-error',
|
||||
array( 'response' => substr( $response[1], 0, 50 ) )
|
||||
);
|
||||
}
|
||||
|
||||
delete_comment_meta( $c['comment_ID'], 'akismet_rechecking' );
|
||||
@@ -494,11 +491,95 @@ class Akismet_Admin {
|
||||
|
||||
if ( $history ) {
|
||||
echo '<div class="akismet-history" style="margin: 13px;">';
|
||||
|
||||
foreach ( $history as $row ) {
|
||||
$time = date( 'D d M Y @ h:i:m a', $row['time'] ) . ' GMT';
|
||||
echo '<div style="margin-bottom: 13px;"><span style="color: #999;" alt="' . $time . '" title="' . $time . '">' . sprintf( esc_html__('%s ago', 'akismet'), human_time_diff( $row['time'] ) ) . '</span> - ';
|
||||
echo esc_html( $row['message'] ) . '</div>';
|
||||
|
||||
$message = '';
|
||||
|
||||
if ( ! empty( $row['message'] ) ) {
|
||||
// Old versions of Akismet stored the message as a literal string in the commentmeta.
|
||||
// New versions don't do that for two reasons:
|
||||
// 1) Save space.
|
||||
// 2) The message can be translated into the current language of the blog, not stuck
|
||||
// in the language of the blog when the comment was made.
|
||||
$message = $row['message'];
|
||||
}
|
||||
|
||||
// If possible, use a current translation.
|
||||
switch ( $row['event'] ) {
|
||||
case 'recheck-spam';
|
||||
$message = __( 'Akismet re-checked and caught this comment as spam.', 'akismet' );
|
||||
break;
|
||||
case 'check-spam':
|
||||
$message = __( 'Akismet caught this comment as spam.', 'akismet' );
|
||||
break;
|
||||
case 'recheck-ham':
|
||||
$message = __( 'Akismet re-checked and cleared this comment.', 'akismet' );
|
||||
break;
|
||||
case 'check-ham':
|
||||
$message = __( 'Akismet cleared this comment.', 'akismet' );
|
||||
break;
|
||||
case 'wp-blacklisted':
|
||||
$message = __( 'Comment was caught by wp_blacklist_check.', 'akismet' );
|
||||
break;
|
||||
case 'report-spam':
|
||||
if ( isset( $row['user'] ) ) {
|
||||
$message = sprintf( __( '%s reported this comment as spam.', 'akismet' ), $row['user'] );
|
||||
}
|
||||
else if ( ! $message ) {
|
||||
$message = __( 'This comment was reported as spam.', 'akismet' );
|
||||
}
|
||||
break;
|
||||
case 'report-ham':
|
||||
if ( isset( $row['user'] ) ) {
|
||||
$message = sprintf( __( '%s reported this comment as not spam.', 'akismet' ), $row['user'] );
|
||||
}
|
||||
else if ( ! $message ) {
|
||||
$message = __( 'This comment was reported as not spam.', 'akismet' );
|
||||
}
|
||||
break;
|
||||
case 'cron-retry-spam':
|
||||
$message = __( 'Akismet caught this comment as spam during an automatic retry.' , 'akismet');
|
||||
break;
|
||||
case 'cron-retry-ham':
|
||||
$message = __( 'Akismet cleared this comment during an automatic retry.', 'akismet');
|
||||
break;
|
||||
case 'check-error':
|
||||
if ( isset( $row['meta'], $row['meta']['response'] ) ) {
|
||||
$message = sprintf( __( 'Akismet was unable to check this comment (response: %s) but will automatically retry later.', 'akismet'), $row['meta']['response'] );
|
||||
}
|
||||
break;
|
||||
case 'recheck-error':
|
||||
if ( isset( $row['meta'], $row['meta']['response'] ) ) {
|
||||
$message = sprintf( __( 'Akismet was unable to recheck this comment (response: %s).', 'akismet'), $row['meta']['response'] );
|
||||
}
|
||||
break;
|
||||
default:
|
||||
if ( preg_match( '/^status-changed/', $row['event'] ) ) {
|
||||
// Half of these used to be saved without the dash after 'status-changed'.
|
||||
// See https://plugins.trac.wordpress.org/changeset/1150658/akismet/trunk
|
||||
$new_status = preg_replace( '/^status-changed-?/', '', $row['event'] );
|
||||
$message = sprintf( __( 'Comment status was changed to %s', 'akismet' ), $new_status );
|
||||
}
|
||||
else if ( preg_match( '/^status-/', $row['event'] ) ) {
|
||||
$new_status = preg_replace( '/^status-/', '', $row['event'] );
|
||||
|
||||
if ( isset( $row['user'] ) ) {
|
||||
$message = sprintf( __( '%1$s changed the comment status to %2$s.', 'akismet' ), $row['user'], $new_status );
|
||||
}
|
||||
}
|
||||
break;
|
||||
|
||||
}
|
||||
|
||||
echo '<div style="margin-bottom: 13px;">';
|
||||
echo '<span style="color: #999;" alt="' . $time . '" title="' . $time . '">' . sprintf( esc_html__('%s ago', 'akismet'), human_time_diff( $row['time'] ) ) . '</span>';
|
||||
echo ' - ';
|
||||
echo esc_html( $message );
|
||||
echo '</div>';
|
||||
}
|
||||
|
||||
echo '</div>';
|
||||
}
|
||||
}
|
||||
@@ -631,13 +712,16 @@ class Akismet_Admin {
|
||||
}
|
||||
|
||||
public static function get_akismet_user( $api_key ) {
|
||||
$akismet_user = Akismet::http_post( Akismet::build_query( array( 'key' => $api_key ) ), 'get-subscription' );
|
||||
$akismet_user = false;
|
||||
|
||||
$subscription_verification = Akismet::http_post( Akismet::build_query( array( 'key' => $api_key, 'blog' => get_bloginfo( 'url' ) ) ), 'get-subscription' );
|
||||
|
||||
if ( ! empty( $subscription_verification[1] ) ) {
|
||||
if ( 'invalid' !== $subscription_verification[1] ) {
|
||||
$akismet_user = json_decode( $subscription_verification[1] );
|
||||
}
|
||||
}
|
||||
|
||||
if ( ! empty( $akismet_user[1] ) )
|
||||
$akismet_user = json_decode( $akismet_user[1] );
|
||||
else
|
||||
$akismet_user = false;
|
||||
|
||||
return $akismet_user;
|
||||
}
|
||||
|
||||
@@ -645,12 +729,13 @@ class Akismet_Admin {
|
||||
$stat_totals = array();
|
||||
|
||||
foreach( array( '6-months', 'all' ) as $interval ) {
|
||||
$response = Akismet::http_post( Akismet::build_query( array( 'blog' => urlencode( get_bloginfo('url') ), 'key' => $api_key, 'from' => $interval ) ), 'get-stats' );
|
||||
$response = Akismet::http_post( Akismet::build_query( array( 'blog' => get_bloginfo( 'url' ), 'key' => $api_key, 'from' => $interval ) ), 'get-stats' );
|
||||
|
||||
if ( ! empty( $response[1] ) ) {
|
||||
$stat_totals[$interval] = json_decode( $response[1] );
|
||||
}
|
||||
}
|
||||
|
||||
return $stat_totals;
|
||||
}
|
||||
|
||||
@@ -727,7 +812,7 @@ class Akismet_Admin {
|
||||
}
|
||||
}
|
||||
|
||||
if ( $api_key = Akismet::get_api_key() ) {
|
||||
if ( $api_key = Akismet::get_api_key() && ( empty( self::$notices['status'] ) || 'existing-key-invalid' != self::$notices['status'] ) ) {
|
||||
self::display_configuration_page();
|
||||
return;
|
||||
}
|
||||
@@ -768,8 +853,16 @@ class Akismet_Admin {
|
||||
public static function display_configuration_page() {
|
||||
$api_key = Akismet::get_api_key();
|
||||
$akismet_user = self::get_akismet_user( $api_key );
|
||||
$stat_totals = self::get_stats( $api_key );
|
||||
|
||||
if ( ! $akismet_user ) {
|
||||
// This could happen if the user's key became invalid after it was previously valid and successfully set up.
|
||||
self::$notices['status'] = 'existing-key-invalid';
|
||||
self::display_start_page();
|
||||
return;
|
||||
}
|
||||
|
||||
$stat_totals = self::get_stats( $api_key );
|
||||
|
||||
// If unset, create the new strictness option using the old discard option to determine its default
|
||||
if ( get_option( 'akismet_strictness' ) === false )
|
||||
add_option( 'akismet_strictness', (get_option('akismet_discard_month') === 'true' ? '1' : '0') );
|
||||
|
||||
@@ -9,7 +9,8 @@ class Akismet {
|
||||
private static $initiated = false;
|
||||
private static $prevent_moderation_email_for_these_comments = array();
|
||||
private static $last_comment_result = null;
|
||||
|
||||
private static $comment_as_submitted_allowed_keys = array( 'blog' => '', 'blog_charset' => '', 'blog_lang' => '', 'blog_ua' => '', 'comment_agent' => '', 'comment_author' => '', 'comment_author_IP' => '', 'comment_author_email' => '', 'comment_author_url' => '', 'comment_content' => '', 'comment_date_gmt' => '', 'comment_tags' => '', 'comment_type' => '', 'guid' => '', 'is_test' => '', 'permalink' => '', 'reporter' => '', 'site_domain' => '', 'submit_referer' => '', 'submit_uri' => '', 'user_ID' => '', 'user_agent' => '', 'user_id' => '', 'user_ip' => '' );
|
||||
|
||||
public static function init() {
|
||||
if ( ! self::$initiated ) {
|
||||
self::init_hooks();
|
||||
@@ -66,7 +67,14 @@ class Akismet {
|
||||
if ( $response[1] != 'valid' && $response[1] != 'invalid' )
|
||||
return 'failed';
|
||||
|
||||
self::update_alert( $response );
|
||||
return $response[1];
|
||||
}
|
||||
|
||||
public static function deactivate_key( $key ) {
|
||||
$response = self::http_post( Akismet::build_query( array( 'key' => $key, 'blog' => get_option('home') ) ), 'deactivate' );
|
||||
|
||||
if ( $response[1] != 'deactivated' )
|
||||
return 'failed';
|
||||
|
||||
return $response[1];
|
||||
}
|
||||
@@ -124,9 +132,7 @@ class Akismet {
|
||||
|
||||
do_action( 'akismet_comment_check_response', $response );
|
||||
|
||||
self::update_alert( $response );
|
||||
|
||||
$commentdata['comment_as_submitted'] = array_intersect_key( $comment, array( 'blog' => '', 'blog_charset' => '', 'blog_lang' => '', 'blog_ua' => '', 'comment_agent' => '', 'comment_author' => '', 'comment_author_IP' => '', 'comment_author_email' => '', 'comment_author_url' => '', 'comment_content' => '', 'comment_date_gmt' => '', 'comment_tags' => '', 'comment_type' => '', 'guid' => '', 'is_test' => '', 'permalink' => '', 'reporter' => '', 'site_domain' => '', 'submit_referer' => '', 'submit_uri' => '', 'user_ID' => '', 'user_agent' => '', 'user_id' => '', 'user_ip' => '' ) );
|
||||
$commentdata['comment_as_submitted'] = array_intersect_key( $comment, self::$comment_as_submitted_allowed_keys );
|
||||
$commentdata['akismet_result'] = $response[1];
|
||||
|
||||
if ( isset( $response[0]['x-akismet-pro-tip'] ) )
|
||||
@@ -228,23 +234,32 @@ class Akismet {
|
||||
// normal result: true or false
|
||||
if ( self::$last_comment['akismet_result'] == 'true' ) {
|
||||
update_comment_meta( $comment->comment_ID, 'akismet_result', 'true' );
|
||||
self::update_comment_history( $comment->comment_ID, __('Akismet caught this comment as spam', 'akismet'), 'check-spam' );
|
||||
self::update_comment_history( $comment->comment_ID, '', 'check-spam' );
|
||||
if ( $comment->comment_approved != 'spam' )
|
||||
self::update_comment_history( $comment->comment_ID, sprintf( __('Comment status was changed to %s', 'akismet'), $comment->comment_approved), 'status-changed'.$comment->comment_approved );
|
||||
self::update_comment_history(
|
||||
$comment->comment_ID,
|
||||
'',
|
||||
'status-changed-'.$comment->comment_approved
|
||||
);
|
||||
}
|
||||
elseif ( self::$last_comment['akismet_result'] == 'false' ) {
|
||||
update_comment_meta( $comment->comment_ID, 'akismet_result', 'false' );
|
||||
self::update_comment_history( $comment->comment_ID, __('Akismet cleared this comment', 'akismet'), 'check-ham' );
|
||||
self::update_comment_history( $comment->comment_ID, '', 'check-ham' );
|
||||
if ( $comment->comment_approved == 'spam' ) {
|
||||
if ( wp_blacklist_check($comment->comment_author, $comment->comment_author_email, $comment->comment_author_url, $comment->comment_content, $comment->comment_author_IP, $comment->comment_agent) )
|
||||
self::update_comment_history( $comment->comment_ID, __('Comment was caught by wp_blacklist_check', 'akismet'), 'wp-blacklisted' );
|
||||
self::update_comment_history( $comment->comment_ID, '', 'wp-blacklisted' );
|
||||
else
|
||||
self::update_comment_history( $comment->comment_ID, sprintf( __('Comment status was changed to %s', 'akismet'), $comment->comment_approved), 'status-changed-'.$comment->comment_approved );
|
||||
self::update_comment_history( $comment->comment_ID, '', 'status-changed-'.$comment->comment_approved );
|
||||
}
|
||||
} // abnormal result: error
|
||||
else {
|
||||
update_comment_meta( $comment->comment_ID, 'akismet_error', time() );
|
||||
self::update_comment_history( $comment->comment_ID, sprintf( __('Akismet was unable to check this comment (response: %s), will automatically retry again later.', 'akismet'), substr(self::$last_comment['akismet_result'], 0, 50)), 'check-error' );
|
||||
self::update_comment_history(
|
||||
$comment->comment_ID,
|
||||
'',
|
||||
'check-error',
|
||||
array( 'response' => substr( self::$last_comment['akismet_result'], 0, 50 ) )
|
||||
);
|
||||
}
|
||||
|
||||
// record the complete original data as submitted for checking
|
||||
@@ -350,8 +365,15 @@ class Akismet {
|
||||
return $history;
|
||||
}
|
||||
|
||||
// log an event for a given comment, storing it in comment_meta
|
||||
public static function update_comment_history( $comment_id, $message, $event=null ) {
|
||||
/**
|
||||
* Log an event for a given comment, storing it in comment_meta.
|
||||
*
|
||||
* @param int $comment_id The ID of the relevant comment.
|
||||
* @param string $message The string description of the event. No longer used.
|
||||
* @param string $event The event code.
|
||||
* @param array $meta Metadata about the history entry. e.g., the user that reported or changed the status of a given comment.
|
||||
*/
|
||||
public static function update_comment_history( $comment_id, $message, $event=null, $meta=null ) {
|
||||
global $current_user;
|
||||
|
||||
// failsafe for old WP versions
|
||||
@@ -359,15 +381,19 @@ class Akismet {
|
||||
return false;
|
||||
|
||||
$user = '';
|
||||
if ( is_object( $current_user ) && isset( $current_user->user_login ) )
|
||||
$user = $current_user->user_login;
|
||||
|
||||
$event = array(
|
||||
'time' => self::_get_microtime(),
|
||||
'message' => $message,
|
||||
'event' => $event,
|
||||
'user' => $user,
|
||||
);
|
||||
|
||||
if ( is_object( $current_user ) && isset( $current_user->user_login ) ) {
|
||||
$event['user'] = $current_user->user_login;
|
||||
}
|
||||
|
||||
if ( ! empty( $meta ) ) {
|
||||
$event['meta'] = $meta;
|
||||
}
|
||||
|
||||
// $unique = false so as to allow multiple values per comment
|
||||
$r = add_comment_meta( $comment_id, 'akismet_history', $event, false );
|
||||
@@ -443,7 +469,7 @@ class Akismet {
|
||||
}
|
||||
}
|
||||
|
||||
self::update_comment_history( $comment->comment_ID, sprintf( __('%1$s changed the comment status to %2$s', 'akismet'), $reporter, $new_status ), 'status-' . $new_status );
|
||||
self::update_comment_history( $comment->comment_ID, '', 'status-' . $new_status );
|
||||
}
|
||||
|
||||
public static function submit_spam_comment( $comment_id ) {
|
||||
@@ -460,7 +486,7 @@ class Akismet {
|
||||
return;
|
||||
|
||||
// use the original version stored in comment_meta if available
|
||||
$as_submitted = get_comment_meta( $comment_id, 'akismet_as_submitted', true);
|
||||
$as_submitted = self::sanitize_comment_as_submitted( get_comment_meta( $comment_id, 'akismet_as_submitted', true ) );
|
||||
|
||||
if ( $as_submitted && is_array( $as_submitted ) && isset( $as_submitted['comment_content'] ) )
|
||||
$comment = (object) array_merge( (array)$comment, $as_submitted );
|
||||
@@ -488,7 +514,7 @@ class Akismet {
|
||||
|
||||
$response = Akismet::http_post( Akismet::build_query( $comment ), 'submit-spam' );
|
||||
if ( $comment->reporter ) {
|
||||
self::update_comment_history( $comment_id, sprintf( __('%s reported this comment as spam', 'akismet'), $comment->reporter ), 'report-spam' );
|
||||
self::update_comment_history( $comment_id, '', 'report-spam' );
|
||||
update_comment_meta( $comment_id, 'akismet_user_result', 'true' );
|
||||
update_comment_meta( $comment_id, 'akismet_user', $comment->reporter );
|
||||
}
|
||||
@@ -506,7 +532,7 @@ class Akismet {
|
||||
return;
|
||||
|
||||
// use the original version stored in comment_meta if available
|
||||
$as_submitted = get_comment_meta( $comment_id, 'akismet_as_submitted', true);
|
||||
$as_submitted = self::sanitize_comment_as_submitted( get_comment_meta( $comment_id, 'akismet_as_submitted', true ) );
|
||||
|
||||
if ( $as_submitted && is_array($as_submitted) && isset($as_submitted['comment_content']) )
|
||||
$comment = (object) array_merge( (array)$comment, $as_submitted );
|
||||
@@ -534,7 +560,7 @@ class Akismet {
|
||||
|
||||
$response = self::http_post( Akismet::build_query( $comment ), 'submit-ham' );
|
||||
if ( $comment->reporter ) {
|
||||
self::update_comment_history( $comment_id, sprintf( __('%s reported this comment as not spam', 'akismet'), $comment->reporter ), 'report-ham' );
|
||||
self::update_comment_history( $comment_id, '', 'report-ham' );
|
||||
update_comment_meta( $comment_id, 'akismet_user_result', 'false' );
|
||||
update_comment_meta( $comment_id, 'akismet_user', $comment->reporter );
|
||||
}
|
||||
@@ -573,19 +599,19 @@ class Akismet {
|
||||
add_comment_meta( $comment_id, 'akismet_rechecking', true );
|
||||
$status = self::check_db_comment( $comment_id, 'retry' );
|
||||
|
||||
$msg = '';
|
||||
$event = '';
|
||||
if ( $status == 'true' ) {
|
||||
$msg = __( 'Akismet caught this comment as spam during an automatic retry.' , 'akismet');
|
||||
$event = 'cron-retry-spam';
|
||||
} elseif ( $status == 'false' ) {
|
||||
$msg = __( 'Akismet cleared this comment during an automatic retry.' , 'akismet');
|
||||
$event = 'cron-retry-ham';
|
||||
}
|
||||
|
||||
// If we got back a legit response then update the comment history
|
||||
// other wise just bail now and try again later. No point in
|
||||
// re-trying all the comments once we hit one failure.
|
||||
if ( !empty( $msg ) ) {
|
||||
if ( !empty( $event ) ) {
|
||||
delete_comment_meta( $comment_id, 'akismet_error' );
|
||||
self::update_comment_history( $comment_id, $msg, 'cron-retry' );
|
||||
self::update_comment_history( $comment_id, '', $event );
|
||||
update_comment_meta( $comment_id, 'akismet_result', $status );
|
||||
// make sure the comment status is still pending. if it isn't, that means the user has already moved it elsewhere.
|
||||
$comment = get_comment( $comment_id );
|
||||
@@ -681,8 +707,16 @@ class Akismet {
|
||||
return (
|
||||
isset( $comment1['comment_post_ID'], $comment2['comment_post_ID'] )
|
||||
&& intval( $comment1['comment_post_ID'] ) == intval( $comment2['comment_post_ID'] )
|
||||
&& $comment1['comment_author'] == $comment2['comment_author']
|
||||
&& $comment1['comment_author_email'] == $comment2['comment_author_email']
|
||||
&& (
|
||||
$comment1['comment_author'] == $comment2['comment_author']
|
||||
|| stripslashes( $comment1['comment_author'] ) == $comment2['comment_author']
|
||||
|| $comment1['comment_author'] == stripslashes( $comment2['comment_author'] )
|
||||
)
|
||||
&& (
|
||||
$comment1['comment_author_email'] == $comment2['comment_author_email']
|
||||
|| stripslashes( $comment1['comment_author_email'] ) == $comment2['comment_author_email']
|
||||
|| $comment1['comment_author_email'] == stripslashes( $comment2['comment_author_email'] )
|
||||
)
|
||||
);
|
||||
}
|
||||
|
||||
@@ -882,8 +916,12 @@ class Akismet {
|
||||
|
||||
do_action( 'akismet_https_disabled' );
|
||||
}
|
||||
|
||||
$simplified_response = array( $response['headers'], $response['body'] );
|
||||
|
||||
self::update_alert( $simplified_response );
|
||||
|
||||
return array( $response['headers'], $response['body'] );
|
||||
return $simplified_response;
|
||||
}
|
||||
|
||||
// given a response from an API call like check_key_status(), update the alert code options if an alert is present.
|
||||
@@ -999,7 +1037,7 @@ p {
|
||||
* @static
|
||||
*/
|
||||
public static function plugin_deactivation( ) {
|
||||
//tidy up
|
||||
return self::deactivate_key( self::get_api_key() );
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -1085,4 +1123,26 @@ p {
|
||||
|
||||
return $r;
|
||||
}
|
||||
|
||||
/**
|
||||
* Ensure that we are loading expected scalar values from akismet_as_submitted commentmeta.
|
||||
*
|
||||
* @param mixed $meta_value
|
||||
* @return mixed
|
||||
*/
|
||||
private static function sanitize_comment_as_submitted( $meta_value ) {
|
||||
if ( empty( $meta_value ) ) {
|
||||
return $meta_value;
|
||||
}
|
||||
|
||||
$meta_value = (array) $meta_value;
|
||||
|
||||
foreach ( $meta_value as $key => $value ) {
|
||||
if ( ! isset( self::$comment_as_submitted_allowed_keys[$key] ) || ! is_scalar( $value ) ) {
|
||||
unset( $meta_value[$key] );
|
||||
}
|
||||
}
|
||||
|
||||
return $meta_value;
|
||||
}
|
||||
}
|
||||
@@ -1,9 +1,9 @@
|
||||
=== Akismet ===
|
||||
Contributors: matt, ryan, andy, mdawaffe, tellyworth, josephscott, lessbloat, eoigal, cfinke, automattic, jgs
|
||||
Tags: akismet, comments, spam
|
||||
Tags: akismet, comments, spam, antispam, anti-spam, anti spam, comment moderation, comment spam, contact form spam, spam comments
|
||||
Requires at least: 3.2
|
||||
Tested up to: 4.2.1
|
||||
Stable tag: 3.1.1
|
||||
Tested up to: 4.2.2
|
||||
Stable tag: 3.1.3
|
||||
License: GPLv2 or later
|
||||
|
||||
Akismet checks your comments against the Akismet Web service to see if they look like spam or not.
|
||||
@@ -30,6 +30,21 @@ Upload the Akismet plugin to your blog, Activate it, then enter your [Akismet.co
|
||||
|
||||
== Changelog ==
|
||||
|
||||
= 3.1.3 =
|
||||
*Release Date - 6 July 2015*
|
||||
|
||||
* Notify users when their account status changes after previously being successfully set up. This should help any users who are seeing blank Akismet settings screens.
|
||||
|
||||
= 3.1.2 =
|
||||
*Release Date - 7 June 2015*
|
||||
|
||||
* Reduced the amount of space Akismet uses in the commentmeta table.
|
||||
* Fixed a bug where some comments with quotes in the author name weren't getting history entries
|
||||
* Pre-emptive security improvements to ensure that the Akismet plugin can't be used by attackers to compromise a WordPress installation.
|
||||
* Better UI for the key entry field: allow whitespace to be included at the beginning or end of the key and strip it out automatically when the form is submitted.
|
||||
* When deactivating the plugin, notify the Akismet API so the site can be marked as inactive.
|
||||
* Clearer error messages.
|
||||
|
||||
= 3.1.1 =
|
||||
*Release Date - 17th March, 2015*
|
||||
|
||||
|
||||
@@ -67,7 +67,7 @@
|
||||
<th class="akismet-api-key" width="10%" align="left" scope="row"><?php esc_html_e('API Key', 'akismet');?></th>
|
||||
<td width="5%"/>
|
||||
<td align="left">
|
||||
<span class="api-key"><input id="key" name="key" type="text" size="15" maxlength="12" value="<?php echo esc_attr( get_option('wordpress_api_key') ); ?>" class="regular-text code <?php echo $akismet_user->status;?>"></span>
|
||||
<span class="api-key"><input id="key" name="key" type="text" size="15" value="<?php echo esc_attr( get_option('wordpress_api_key') ); ?>" class="regular-text code <?php echo $akismet_user->status;?>"></span>
|
||||
</td>
|
||||
</tr>
|
||||
<?php endif; ?>
|
||||
|
||||
@@ -75,7 +75,11 @@
|
||||
<?php elseif ( $type == 'no-sub' ) :?>
|
||||
<div class="wrap alert critical">
|
||||
<h3 class="key-status failed"><?php esc_html_e( 'Your subscription is missing.', 'akismet'); ?></h3>
|
||||
<p class="description"><?php printf( __('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.', 'akismet'), 'https://akismet.com/account/upgrade/', 'https://akismet.com/contact/' ); ?></p>
|
||||
<p class="description">
|
||||
<?php printf( __( '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.', 'akismet'), 'https://akismet.com/account/upgrade/' ); ?>
|
||||
<br /><br />
|
||||
<?php printf( __( 'Please <a href="%s" target="_blank">contact our support team</a> with any questions.', 'akismet' ), 'https://akismet.com/contact/' ); ?>
|
||||
</p>
|
||||
</div>
|
||||
<?php elseif ( $type == 'new-key-valid' ) :?>
|
||||
<div class="wrap alert active">
|
||||
@@ -85,18 +89,31 @@
|
||||
<div class="wrap alert critical">
|
||||
<h3 class="key-status"><?php esc_html_e( 'The key you entered is invalid. Please double-check it.' , 'akismet'); ?></h3>
|
||||
</div>
|
||||
<?php elseif ( $type == 'existing-key-invalid' ) :?>
|
||||
<div class="wrap alert critical">
|
||||
<h3 class="key-status"><?php esc_html_e( 'Your API key is no longer valid. Please enter a new key or contact support@akismet.com.' , 'akismet'); ?></h3>
|
||||
</div>
|
||||
<?php elseif ( $type == 'new-key-failed' ) :?>
|
||||
<div class="wrap alert critical">
|
||||
<h3 class="key-status"><?php esc_html_e( 'The key you entered could not be verified because a connection to akismet.com could not be established. Please check your server configuration.' , 'akismet'); ?></h3>
|
||||
<h3 class="key-status"><?php esc_html_e( 'The key you entered could not be verified.' , 'akismet'); ?></h3>
|
||||
<p class="description"><?php printf( __('The connection to akismet.com cannot be established. Please refer to <a href="%s" target="_blank">our guide about firewalls</a> and check your server configuration.', 'akismet'), 'http://blog.akismet.com/akismet-hosting-faq/'); ?></p>
|
||||
</div>
|
||||
<?php elseif ( $type == 'limit-reached' && in_array( $level, array( 'yellow', 'red' ) ) ) :?>
|
||||
<div class="wrap alert critical">
|
||||
<?php if ( $level == 'yellow' ): ?>
|
||||
<h3 class="key-status failed"><?php esc_html_e("You're using your Akismet key on more sites than your Pro subscription allows.", 'akismet'); ?></h3>
|
||||
<p class="description"><?php printf( __('Your Pro subscription allows the use of Akismet on only one site. Please <a href="http://docs.akismet.com/billing/add-more-sites/">purchase additional Pro subscriptions</a> or upgrade to an Enterprise subscription that allows the use of Akismet on unlimited sites.<br /><br />If you have any questions, please get in touch with our support team.', 'akismet'), 'https://akismet.com/account/upgrade/', 'https://akismet.com/contact/'); ?></p>
|
||||
<h3 class="key-status failed"><?php esc_html_e( 'You’re using your Akismet key on more sites than your Pro subscription allows.', 'akismet' ); ?></h3>
|
||||
<p class="description">
|
||||
<?php printf( __( 'Your Pro subscription allows the use of Akismet on only one site. Please <a href="%s" target="_blank">purchase additional Pro subscriptions</a> or upgrade to an Enterprise subscription that allows the use of Akismet on unlimited sites.', 'akismet' ), 'http://docs.akismet.com/billing/add-more-sites/' ); ?>
|
||||
<br /><br />
|
||||
<?php printf( __( 'Please <a href="%s" target="_blank">contact our support team</a> with any questions.', 'akismet' ), 'https://akismet.com/contact/'); ?>
|
||||
</p>
|
||||
<?php elseif ( $level == 'red' ): ?>
|
||||
<h3 class="key-status failed"><?php esc_html_e("You're using Akismet on far too many sites for your Pro subscription.", 'akismet'); ?></h3>
|
||||
<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>
|
||||
<h3 class="key-status failed"><?php esc_html_e( 'You’re using Akismet on far too many sites for your Pro subscription.', 'akismet' ); ?></h3>
|
||||
<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.', 'akismet'), 'https://akismet.com/account/upgrade/' ); ?></p>
|
||||
<br /><br />
|
||||
<?php printf( __( 'Please <a href="%s" target="_blank">contact our support team</a> with any questions.', 'akismet' ), 'https://akismet.com/contact/'); ?></p>
|
||||
</p>
|
||||
<?php endif; ?>
|
||||
</div>
|
||||
<?php endif;?>
|
||||
<?php endif;?>
|
||||
@@ -8,7 +8,7 @@
|
||||
<?php echo esc_attr( $akismet_user->user_email ); ?>
|
||||
</div>
|
||||
<form name="akismet_activate" id="akismet_activate" action="https://akismet.com/get/" method="post" class="right" target="_blank">
|
||||
<input type="hidden" name="passback_url" value="<?php echo esc_attr( Akismet_Admin::get_page_url() ); ?>"/>
|
||||
<input type="hidden" name="passback_url" value="<?php echo esc_url( Akismet_Admin::get_page_url() ); ?>"/>
|
||||
<input type="hidden" name="auto-connect" value="<?php echo $akismet_user->ID;?>"/>
|
||||
<input type="hidden" name="redirect" value="plugin-signup"/>
|
||||
<input type="submit" class="button button-primary" value="<?php esc_attr_e( 'Register Akismet' , 'akismet'); ?>"/>
|
||||
@@ -22,7 +22,7 @@
|
||||
<?php printf( esc_html__( 'Your subscription for %s is cancelled' , 'akismet'), $akismet_user->user_email ); ?>
|
||||
</div>
|
||||
<form name="akismet_activate" id="akismet_activate" action="https://akismet.com/get/" method="post" class="right" target="_blank">
|
||||
<input type="hidden" name="passback_url" value="<?php echo esc_attr( Akismet_Admin::get_page_url() ); ?>"/>
|
||||
<input type="hidden" name="passback_url" value="<?php echo esc_url( Akismet_Admin::get_page_url() ); ?>"/>
|
||||
<input type="hidden" name="user_id" value="<?php echo $akismet_user->ID;?>"/>
|
||||
<input type="hidden" name="redirect" value="upgrade"/>
|
||||
<input type="submit" class="button button-primary" value="<?php esc_attr_e( 'Reactivate Akismet' , 'akismet'); ?>"/>
|
||||
@@ -64,7 +64,7 @@
|
||||
<p><?php esc_html_e('If you already know your API key.', 'akismet'); ?></p>
|
||||
</div>
|
||||
<form action="<?php echo esc_url( Akismet_Admin::get_page_url() ); ?>" method="post" id="akismet-enter-api-key" class="right">
|
||||
<input id="key" name="key" type="text" size="15" maxlength="12" value="" class="regular-text code">
|
||||
<input id="key" name="key" type="text" size="15" value="" class="regular-text code">
|
||||
<input type="hidden" name="action" value="enter-key">
|
||||
<?php wp_nonce_field( Akismet_Admin::NONCE ) ?>
|
||||
<input type="submit" name="submit" id="submit" class="button button-secondary" value="<?php esc_attr_e('Use this key', 'akismet');?>">
|
||||
@@ -85,7 +85,7 @@
|
||||
<p><?php esc_html_e('If you already know your API key.', 'akismet'); ?></p>
|
||||
</div>
|
||||
<form action="<?php echo esc_url( Akismet_Admin::get_page_url() ); ?>" method="post" id="akismet-enter-api-key" class="right">
|
||||
<input id="key" name="key" type="text" size="15" maxlength="12" value="" class="regular-text code">
|
||||
<input id="key" name="key" type="text" size="15" value="<?php echo esc_attr( Akismet::get_api_key() ); ?>" class="regular-text code">
|
||||
<input type="hidden" name="action" value="enter-key">
|
||||
<?php wp_nonce_field( Akismet_Admin::NONCE ); ?>
|
||||
<input type="submit" name="submit" id="submit" class="button button-secondary" value="<?php esc_attr_e('Use this key', 'akismet');?>">
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
Thanks for reading our conribution guidelines! What do you want to do:
|
||||
Thanks for reading our contribution guidelines! What do you want to do:
|
||||
|
||||
* [File a bug / an issue](#filing-issue)
|
||||
* [Security issues](#security)
|
||||
* [Contribute to WordPress SEO](#contribute)
|
||||
* [Contribute to Yoast SEO](#contribute)
|
||||
|
||||
<a name="filing-issue"></a>
|
||||
#Filing issues
|
||||
@@ -20,7 +20,7 @@ A useful bug report explains:
|
||||
2. What you were expecting to happen.
|
||||
3. What actually happened, illustrated with screenshots if possible.
|
||||
|
||||
Your bug report should also contain your WordPress version and if there are any errors, the _exact_ error text, including line numbers.
|
||||
Your bug report should also contain your WordPress version and if there are any errors, the _exact_ error text, including line numbers.
|
||||
|
||||
### Blank / white screen
|
||||
If you're getting a blank screen and you report just that, we can do _absolutely_ nothing. By default, your WordPress install suppresses all errors, to prevent information leaks, but we need those errors to be able to help you. If you apply the small piece of code in [this post on WP_DEBUG](https://yoast.com/wordpress-debug/) to your site, you should be able to open the URL that gave you a white screen, append `?debug=debug` to the URL and get the actual error.
|
||||
@@ -35,9 +35,9 @@ If you're reporting a bug about specific interface elements not working as expec
|
||||
Please do _not_ report security issues here, but email them to security at yoast dot com so we can deal with them securely and quickly.
|
||||
|
||||
<a name="contribute"></a>
|
||||
#Contribute to WordPress SEO
|
||||
#Contribute to Yoast SEO
|
||||
|
||||
Community made patches, localisations, bug reports and contributions are very welcome and help make WordPress SEO remains the #1 SEO plugin for WordPress.
|
||||
Community made patches, localisations, bug reports and contributions are very welcome and help make Yoast SEO remains the #1 SEO plugin for WordPress.
|
||||
|
||||
When contributing please ensure you follow the guidelines below so that we can keep on top of things.
|
||||
|
||||
@@ -51,7 +51,7 @@ If there is no ticket for your issue, submit it first, following the above guide
|
||||
* 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 'trunk' branch of the WordPress SEO repository.
|
||||
* Push the changes to your fork and submit a pull request to the 'trunk' branch of the Yoast 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.
|
||||
|
||||
@@ -61,6 +61,6 @@ At this point you're waiting on us to merge your pull request. We'll review all
|
||||
Some issues are labeled "Patch-welcome". This means we see the value in the particular enhancement being suggested but have decided for now not to prioritize it. If you however decide to write a patch for it we'll gladly include it after some code review.
|
||||
|
||||
# Additional Resources
|
||||
* [WordPress SEO API](https://yoast.com/wordpress/plugins/seo/api/)
|
||||
* [Yoast SEO API](https://yoast.com/wordpress/plugins/seo/api/)
|
||||
* [General GitHub Documentation](http://help.github.com/)
|
||||
* [GitHub Pull Request documentation](http://help.github.com/send-pull-requests/)
|
||||
@@ -1,21 +1,21 @@
|
||||
WordPress SEO by Yoast
|
||||
Yoast SEO
|
||||
======================
|
||||
|
||||
[](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
|
||||
Welcome to the Yoast SEO GitHub repository
|
||||
----------------------------------------------
|
||||
|
||||
While the documentation for the [WordPress SEO plugin](https://yoast.com/wordpress/seo/) can be found on [Yoast.com](https://yoast.com/), here
|
||||
While the documentation for the [Yoast SEO plugin](https://yoast.com/wordpress/seo/) can be found on [Yoast.com](https://yoast.com/), here
|
||||
you can browse the source of the project, find and discuss open issues and even
|
||||
[contribute yourself](https://github.com/yoast/wordpress-seo/blob/master/CONTRIBUTING.md).
|
||||
|
||||
Installation
|
||||
------------
|
||||
|
||||
Here's a [guide on how to install WordPress SEO in your WordPress site](https://yoast.com/wordpress/seo/installation/).
|
||||
Here's a [guide on how to install Yoast SEO in your WordPress site](https://yoast.com/wordpress/seo/installation/).
|
||||
|
||||
If you want to run the Git version for development though, you can set it up with [Composer](https://getcomposer.org/):
|
||||
|
||||
@@ -23,25 +23,28 @@ If you want to run the Git version for development though, you can set it up wit
|
||||
composer create-project yoast/wordpress-seo:dev-trunk --prefer-source --keep-vcs
|
||||
```
|
||||
|
||||
Read more about [using Composer with WordPress SEO](https://github.com/Yoast/wordpress-seo/wiki/Using-Composer).
|
||||
Read more about [using Composer with Yoast SEO](https://github.com/Yoast/wordpress-seo/wiki/Using-Composer).
|
||||
|
||||
This will download the latest development version of WordPress SEO by Yoast. While this version is usually stable,
|
||||
This will download the latest development version of Yoast SEO. While this version is usually stable,
|
||||
it is not recommended for use in a production environment.
|
||||
|
||||
Support
|
||||
-------
|
||||
This is a developer's portal for WordPress SEO by Yoast and should not be used for support. Please visit the
|
||||
This is a developer's portal for Yoast SEO and should not be used for support. Please visit the
|
||||
[support forums](https://wordpress.org/support/plugin/wordpress-seo).
|
||||
|
||||
Reporting bugs
|
||||
----
|
||||
We try to fix as many bugs we can, this is a graph of our recent activity:
|
||||
[](https://waffle.io/yoast/wordpress-seo/metrics)
|
||||
|
||||
If you find an issue, [let us know here](https://github.com/yoast/wordpress-seo/issues/new)! Please follow [how to write a good bug report?](http://kb.yoast.com/article/180-how-to-write-a-good-bug-report) guidelines.
|
||||
|
||||
It may help us a lot if you can provide a backtrace of the error encountered. You can use [code in this gist](https://gist.github.com/jrfnl/5925642) to enable the backtrace in your website's configuration.
|
||||
|
||||
Contributions
|
||||
-------------
|
||||
Anyone is welcome to contribute to WordPress SEO. Please
|
||||
Anyone is welcome to contribute to Yoast SEO. Please
|
||||
[read the guidelines](https://github.com/yoast/wordpress-seo/blob/master/CONTRIBUTING.md) for contributing to this
|
||||
repository.
|
||||
|
||||
@@ -49,5 +52,5 @@ There are various ways you can contribute:
|
||||
|
||||
* [Raise an issue](https://github.com/yoast/wordpress-seo/issues) on GitHub.
|
||||
* Send us a Pull Request with your bug fixes and/or new features.
|
||||
* [Translate WordPress SEO by Yoast into different languages](http://translate.yoast.com/projects/wordpress-seo/).
|
||||
* [Translate Yoast SEO into different languages](http://translate.yoast.com/projects/wordpress-seo/).
|
||||
* Provide feedback and [suggestions on enhancements](https://github.com/yoast/wordpress-seo/issues?direction=desc&labels=Enhancement&page=1&sort=created&state=open).
|
||||
@@ -33,7 +33,7 @@ function wpseo_set_option() {
|
||||
|
||||
check_ajax_referer( 'wpseo-setoption' );
|
||||
|
||||
$option = sanitize_text_field( WPSEO_Utils::filter_input( INPUT_POST, 'option' ) );
|
||||
$option = sanitize_text_field( filter_input( INPUT_POST, 'option' ) );
|
||||
if ( $option !== 'page_comments' ) {
|
||||
die( '-1' );
|
||||
}
|
||||
@@ -54,15 +54,51 @@ function wpseo_set_ignore() {
|
||||
|
||||
check_ajax_referer( 'wpseo-ignore' );
|
||||
|
||||
$options = get_option( 'wpseo' );
|
||||
$ignore_key = sanitize_text_field( WPSEO_Utils::filter_input( INPUT_POST, 'option' ) );
|
||||
$ignore_key = sanitize_text_field( filter_input( INPUT_POST, 'option' ) );
|
||||
|
||||
$options = get_option( 'wpseo' );
|
||||
$options[ 'ignore_' . $ignore_key ] = true;
|
||||
update_option( 'wpseo', $options );
|
||||
|
||||
die( '1' );
|
||||
}
|
||||
|
||||
add_action( 'wp_ajax_wpseo_set_ignore', 'wpseo_set_ignore' );
|
||||
|
||||
/**
|
||||
* Hides the after-update notification until the next update for a specific user.
|
||||
*/
|
||||
function wpseo_dismiss_about() {
|
||||
if ( ! current_user_can( 'manage_options' ) ) {
|
||||
die( '-1' );
|
||||
}
|
||||
|
||||
check_ajax_referer( 'wpseo-dismiss-about' );
|
||||
|
||||
update_user_meta( get_current_user_id(), 'wpseo_seen_about_version' , WPSEO_VERSION );
|
||||
|
||||
die( '1' );
|
||||
}
|
||||
|
||||
add_action( 'wp_ajax_wpseo_dismiss_about', 'wpseo_dismiss_about' );
|
||||
|
||||
/**
|
||||
* Hides the default tagline notice for a specific user.
|
||||
*/
|
||||
function wpseo_dismiss_tagline_notice() {
|
||||
if ( ! current_user_can( 'manage_options' ) ) {
|
||||
die( '-1' );
|
||||
}
|
||||
|
||||
check_ajax_referer( 'wpseo-dismiss-tagline-notice' );
|
||||
|
||||
update_user_meta( get_current_user_id(), 'wpseo_seen_tagline_notice', 'seen' );
|
||||
|
||||
die( '1' );
|
||||
}
|
||||
|
||||
add_action( 'wp_ajax_wpseo_dismiss_tagline_notice', 'wpseo_dismiss_tagline_notice' );
|
||||
|
||||
/**
|
||||
* Function used to delete blocking files, dies on exit.
|
||||
*/
|
||||
@@ -97,32 +133,6 @@ function wpseo_kill_blocking_files() {
|
||||
|
||||
add_action( 'wp_ajax_wpseo_kill_blocking_files', 'wpseo_kill_blocking_files' );
|
||||
|
||||
/**
|
||||
* Retrieve the suggestions from the Google Suggest API and return them to be
|
||||
* used in the suggest box within the plugin. Dies on exit.
|
||||
*/
|
||||
function wpseo_get_suggest() {
|
||||
check_ajax_referer( 'wpseo-get-suggest' );
|
||||
|
||||
$term = urlencode( WPSEO_Utils::filter_input( INPUT_GET, 'term' ) );
|
||||
$result = wp_remote_get( 'https://www.google.com/complete/search?output=toolbar&q=' . $term );
|
||||
|
||||
$return_arr = array();
|
||||
|
||||
if ( ! is_wp_error( $result ) ) {
|
||||
preg_match_all( '`suggestion data="([^"]+)"/>`u', $result['body'], $matches );
|
||||
|
||||
if ( isset( $matches[1] ) && ( is_array( $matches[1] ) && $matches[1] !== array() ) ) {
|
||||
foreach ( $matches[1] as $match ) {
|
||||
$return_arr[] = html_entity_decode( $match, ENT_COMPAT, 'UTF-8' );
|
||||
}
|
||||
}
|
||||
}
|
||||
wpseo_ajax_json_echo_die( $return_arr );
|
||||
}
|
||||
|
||||
add_action( 'wp_ajax_wpseo_get_suggest', 'wpseo_get_suggest' );
|
||||
|
||||
/**
|
||||
* Used in the editor to replace vars for the snippet preview
|
||||
*/
|
||||
@@ -130,9 +140,9 @@ function wpseo_ajax_replace_vars() {
|
||||
global $post;
|
||||
check_ajax_referer( 'wpseo-replace-vars' );
|
||||
|
||||
$post = get_post( intval( WPSEO_Utils::filter_input( INPUT_POST, 'post_id' ) ) );
|
||||
$post = get_post( intval( filter_input( INPUT_POST, 'post_id' ) ) );
|
||||
$omit = array( 'excerpt', 'excerpt_only', 'title' );
|
||||
echo wpseo_replace_vars( stripslashes( WPSEO_Utils::filter_input( INPUT_POST, 'string' ) ), $post, $omit );
|
||||
echo wpseo_replace_vars( stripslashes( filter_input( INPUT_POST, 'string' ) ), $post, $omit );
|
||||
die;
|
||||
}
|
||||
|
||||
@@ -164,9 +174,9 @@ add_action( 'wp_ajax_wpseo_save_metadesc', 'wpseo_save_description' );
|
||||
function wpseo_save_what( $what ) {
|
||||
check_ajax_referer( 'wpseo-bulk-editor' );
|
||||
|
||||
$new = WPSEO_Utils::filter_input( INPUT_POST, 'new_value' );
|
||||
$post_id = intval( WPSEO_Utils::filter_input( INPUT_POST, 'wpseo_post_id' ) );
|
||||
$original = WPSEO_Utils::filter_input( INPUT_POST, 'existing_value' );
|
||||
$new = filter_input( INPUT_POST, 'new_value' );
|
||||
$post_id = intval( filter_input( INPUT_POST, 'wpseo_post_id' ) );
|
||||
$original = filter_input( INPUT_POST, 'existing_value' );
|
||||
|
||||
$results = wpseo_upsert_new( $what, $post_id, $new, $original );
|
||||
|
||||
@@ -309,12 +319,30 @@ function wpseo_upsert_new( $what, $post_id, $new, $original ) {
|
||||
* Create an export and return the URL
|
||||
*/
|
||||
function wpseo_get_export() {
|
||||
check_ajax_referer( 'wpseo-export' );
|
||||
|
||||
$include_taxonomy = ( WPSEO_Utils::filter_input( INPUT_POST, 'include_taxonomy' ) === 'true' ) ? true : false;
|
||||
$include_taxonomy = ( filter_input( INPUT_POST, 'include_taxonomy' ) === 'true' );
|
||||
$export = new WPSEO_Export( $include_taxonomy );
|
||||
|
||||
wpseo_ajax_json_echo_die( $export->get_results() );
|
||||
}
|
||||
|
||||
add_action( 'wp_ajax_wpseo_export', 'wpseo_get_export' );
|
||||
add_action( 'wp_ajax_wpseo_export', 'wpseo_get_export' );
|
||||
|
||||
/**
|
||||
* Handles the posting of a new FB admin.
|
||||
*/
|
||||
function wpseo_add_fb_admin() {
|
||||
check_ajax_referer( 'wpseo_fb_admin_nonce' );
|
||||
|
||||
if ( ! current_user_can( 'manage_options' ) ) {
|
||||
die( '-1' );
|
||||
}
|
||||
|
||||
$facebook_social = new Yoast_Social_Facebook();
|
||||
|
||||
wp_die( $facebook_social->add_admin( filter_input( INPUT_POST, 'admin_name' ), filter_input( INPUT_POST, 'admin_id' ) ) );
|
||||
}
|
||||
|
||||
add_action( 'wp_ajax_wpseo_add_fb_admin', 'wpseo_add_fb_admin' );
|
||||
|
||||
new Yoast_Dashboard_Widget();
|
||||
@@ -0,0 +1,106 @@
|
||||
<?php
|
||||
/**
|
||||
* @package WPSEO\admin|ajax
|
||||
*/
|
||||
|
||||
/**
|
||||
* Class Yoast_Plugin_Conflict_Ajax
|
||||
*/
|
||||
class Yoast_Plugin_Conflict_Ajax {
|
||||
|
||||
/**
|
||||
* @var string
|
||||
*/
|
||||
private $option_name = 'wpseo_dismissed_conflicts';
|
||||
|
||||
/**
|
||||
* @var array
|
||||
*/
|
||||
private $dismissed_conflicts = array();
|
||||
|
||||
/**
|
||||
* Initialize the hooks for the AJAX request
|
||||
*/
|
||||
public function __construct() {
|
||||
add_action( 'wp_ajax_wpseo_dismiss_plugin_conflict', array( $this, 'dismiss_notice' ) );
|
||||
}
|
||||
|
||||
/**
|
||||
* Handles the dismiss notice request
|
||||
*/
|
||||
public function dismiss_notice() {
|
||||
check_ajax_referer( 'dismiss-plugin-conflict' );
|
||||
|
||||
$conflict_data = filter_input( INPUT_POST, 'data', FILTER_DEFAULT, FILTER_REQUIRE_ARRAY );
|
||||
|
||||
$this->dismissed_conflicts = $this->get_dismissed_conflicts( $conflict_data['section'] );
|
||||
|
||||
$this->compare_plugins( $conflict_data['plugins'] );
|
||||
|
||||
$this->save_dismissed_conflicts( $conflict_data['section'] );
|
||||
|
||||
wp_die( 'true' );
|
||||
}
|
||||
|
||||
/**
|
||||
* Getting the user option from the database
|
||||
*
|
||||
* @return bool|array
|
||||
*/
|
||||
private function get_dismissed_option() {
|
||||
return get_user_meta( get_current_user_id(), $this->option_name, true );
|
||||
}
|
||||
|
||||
/**
|
||||
* Getting the dismissed conflicts from the database
|
||||
*
|
||||
* @param string $plugin_section
|
||||
*
|
||||
* @return array
|
||||
*/
|
||||
private function get_dismissed_conflicts( $plugin_section ) {
|
||||
$dismissed_conflicts = $this->get_dismissed_option();
|
||||
|
||||
if ( is_array( $dismissed_conflicts ) && array_key_exists( $plugin_section, $dismissed_conflicts ) ) {
|
||||
return $dismissed_conflicts[ $plugin_section ];
|
||||
}
|
||||
|
||||
return array();
|
||||
}
|
||||
|
||||
/**
|
||||
* Storing the conflicting plugins as an user option in the database
|
||||
*
|
||||
* @param string $plugin_section
|
||||
*/
|
||||
private function save_dismissed_conflicts( $plugin_section ) {
|
||||
$dismissed_conflicts = $this->get_dismissed_option();
|
||||
|
||||
$dismissed_conflicts[ $plugin_section ] = $this->dismissed_conflicts;
|
||||
|
||||
update_user_meta( get_current_user_id(), $this->option_name, $dismissed_conflicts );
|
||||
}
|
||||
|
||||
/**
|
||||
* Loop through the plugins to compare them with the already stored dismissed plugin conflicts
|
||||
*
|
||||
* @param array $posted_plugins
|
||||
*/
|
||||
public function compare_plugins( array $posted_plugins ) {
|
||||
foreach ( $posted_plugins as $posted_plugin ) {
|
||||
$this->compare_plugin( $posted_plugin );
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Check if plugin is already dismissed, if not store it in the array that will be saved later
|
||||
*
|
||||
* @param string $posted_plugin
|
||||
*/
|
||||
private function compare_plugin( $posted_plugin ) {
|
||||
if ( ! in_array( $posted_plugin, $this->dismissed_conflicts ) ) {
|
||||
$this->dismissed_conflicts[] = $posted_plugin;
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
@@ -9,7 +9,7 @@
|
||||
class WPSEO_Admin_Init {
|
||||
|
||||
/**
|
||||
* Holds the WP SEO Options
|
||||
* Holds the Yoast SEO Options
|
||||
*
|
||||
* @var array
|
||||
*/
|
||||
@@ -32,43 +32,149 @@ class WPSEO_Admin_Init {
|
||||
|
||||
$this->pagenow = $GLOBALS['pagenow'];
|
||||
|
||||
add_action( 'admin_init', array( $this, 'redirect_to_about_page' ), 15 );
|
||||
add_action( 'admin_enqueue_scripts', array( $this, 'enqueue_dismissible' ) );
|
||||
add_action( 'admin_init', array( $this, 'after_update_notice' ), 15 );
|
||||
add_action( 'admin_init', array( $this, 'tagline_notice' ), 15 );
|
||||
add_action( 'admin_init', array( $this, 'ga_compatibility_notice' ), 15 );
|
||||
|
||||
$this->load_meta_boxes();
|
||||
$this->load_taxonomy_class();
|
||||
$this->load_admin_page_class();
|
||||
$this->load_admin_user_class();
|
||||
$this->load_yoast_tracking();
|
||||
$this->ignore_tour();
|
||||
$this->load_tour();
|
||||
$this->load_xml_sitemaps_admin();
|
||||
}
|
||||
|
||||
/**
|
||||
* For WP versions older than 4.2, this includes styles and a script to make notices dismissible.
|
||||
*/
|
||||
public function enqueue_dismissible() {
|
||||
if ( version_compare( $GLOBALS['wp_version'], '4.2', '<' ) ) {
|
||||
wp_enqueue_style( 'wpseo-dismissible', plugins_url( 'css/wpseo-dismissible' . WPSEO_CSSJS_SUFFIX . '.css', WPSEO_FILE ), array(), WPSEO_VERSION );
|
||||
wp_enqueue_script( 'wpseo-dismissible', plugins_url( 'js/wp-seo-dismissible' . WPSEO_CSSJS_SUFFIX . '.js', WPSEO_FILE ), array( 'jquery' ), WPSEO_VERSION, true );
|
||||
}
|
||||
}
|
||||
/**
|
||||
* Redirect first time or just upgraded users to the about screen.
|
||||
*/
|
||||
public function redirect_to_about_page() {
|
||||
if ( ! current_user_can( 'manage_options' ) ) {
|
||||
return;
|
||||
public function after_update_notice() {
|
||||
if ( current_user_can( 'manage_options' ) && ! $this->seen_about() ) {
|
||||
|
||||
if ( filter_input( INPUT_GET, 'intro' ) === '1' ) {
|
||||
update_user_meta( get_current_user_id(), 'wpseo_seen_about_version' , WPSEO_VERSION );
|
||||
|
||||
return;
|
||||
}
|
||||
/* translators: %1$s expands to Yoast SEO, $2%s to the version number, %3$s and %4$s to anchor tags with link to intro page */
|
||||
$info_message = sprintf(
|
||||
__( '%1$s has been updated to version %2$s. %3$sClick here%4$s to find out what\'s new!', 'wordpress-seo' ),
|
||||
'Yoast SEO',
|
||||
WPSEO_VERSION,
|
||||
'<a href="' . admin_url( 'admin.php?page=wpseo_dashboard&intro=1' ) . '">',
|
||||
'</a>'
|
||||
);
|
||||
|
||||
$notification_options = array(
|
||||
'type' => 'updated',
|
||||
'id' => 'wpseo-dismiss-about',
|
||||
'nonce' => wp_create_nonce( 'wpseo-dismiss-about' ),
|
||||
);
|
||||
|
||||
Yoast_Notification_Center::get()->add_notification( new Yoast_Notification( $info_message, $notification_options ) );
|
||||
}
|
||||
}
|
||||
|
||||
if ( $this->options['seen_about'] ) {
|
||||
return;
|
||||
/**
|
||||
* Helper to verify if the current user has already seen the about page for the current version
|
||||
*
|
||||
* @return bool
|
||||
*/
|
||||
private function seen_about() {
|
||||
return get_user_meta( get_current_user_id(), 'wpseo_seen_about_version', true ) === WPSEO_VERSION;
|
||||
}
|
||||
|
||||
/**
|
||||
* Notify about the default tagline if the user hasn't changed it
|
||||
*/
|
||||
public function tagline_notice() {
|
||||
if ( current_user_can( 'manage_options' ) && $this->has_default_tagline() && ! $this->seen_tagline_notice() ) {
|
||||
|
||||
// Only add the notice on GET requests and not in the customizer to prevent faulty return url.
|
||||
if ( 'GET' !== filter_input( INPUT_SERVER, 'REQUEST_METHOD' ) || is_customize_preview() ) {
|
||||
return;
|
||||
}
|
||||
|
||||
$current_url = ( is_ssl() ? 'https://' : 'http://' );
|
||||
$current_url .= sanitize_text_field( $_SERVER['SERVER_NAME'] ) . sanitize_text_field( $_SERVER['REQUEST_URI'] );
|
||||
$customize_url = add_query_arg( array(
|
||||
'url' => urlencode( $current_url ),
|
||||
), wp_customize_url() );
|
||||
|
||||
$info_message = sprintf(
|
||||
__( 'You still have the default WordPress tagline, even an empty one is probably better. %1$sYou can fix this in the customizer%2$s.', 'wordpress-seo' ),
|
||||
'<a href="' . esc_attr( $customize_url ) . '">',
|
||||
'</a>'
|
||||
);
|
||||
|
||||
$notification_options = array(
|
||||
'type' => 'error',
|
||||
'id' => 'wpseo-dismiss-tagline-notice',
|
||||
'nonce' => wp_create_nonce( 'wpseo-dismiss-tagline-notice' ),
|
||||
);
|
||||
|
||||
Yoast_Notification_Center::get()->add_notification( new Yoast_Notification( $info_message, $notification_options ) );
|
||||
}
|
||||
}
|
||||
|
||||
if ( in_array( $this->pagenow, array(
|
||||
'update.php',
|
||||
'update-core.php',
|
||||
'plugins.php',
|
||||
'plugin-install.php',
|
||||
) ) ) {
|
||||
return;
|
||||
/**
|
||||
* Returns whether or not the site has the default tagline
|
||||
*
|
||||
* @return bool
|
||||
*/
|
||||
public function has_default_tagline() {
|
||||
return __( 'Just another WordPress site' ) === get_bloginfo( 'description' );
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns whether or not the user has seen the tagline notice
|
||||
*
|
||||
* @return bool
|
||||
*/
|
||||
public function seen_tagline_notice() {
|
||||
return 'seen' === get_user_meta( get_current_user_id(), 'wpseo_seen_tagline_notice', true );
|
||||
}
|
||||
|
||||
/**
|
||||
* Shows a notice to the user if they have Google Analytics for WordPress 5.4.3 installed because it causes an error
|
||||
* on the google search console page.
|
||||
*/
|
||||
public function ga_compatibility_notice() {
|
||||
if ( defined( 'GAWP_VERSION' ) && '5.4.3' === GAWP_VERSION ) {
|
||||
|
||||
$info_message = sprintf(
|
||||
/* translators: %1$s expands to Yoast SEO, %2$s expands to 5.4.3, %3$s expands to Google Analytics by Yoast */
|
||||
__( '%1$s detected you are using version %2$s of %3$s, please update to the latest version to prevent compatibility issues.', 'wordpress-seo' ),
|
||||
'Yoast SEO',
|
||||
'5.4.3',
|
||||
'Google Analytics by Yoast'
|
||||
);
|
||||
|
||||
$notification_options = array(
|
||||
'type' => 'error',
|
||||
);
|
||||
|
||||
Yoast_Notification_Center::get()->add_notification( new Yoast_Notification( $info_message, $notification_options ) );
|
||||
}
|
||||
}
|
||||
|
||||
// We're redirecting the user to the about screen, let's make sure we don't do it again until he/she upgrades again
|
||||
$wpseo_option = get_option( 'wpseo' );
|
||||
$wpseo_option['seen_about'] = true;
|
||||
update_option( 'wpseo', $wpseo_option );
|
||||
|
||||
wp_safe_redirect( admin_url( 'admin.php?page=wpseo_dashboard&intro=1' ) );
|
||||
/**
|
||||
* Helper to verify if the user is currently visiting one of our admin pages.
|
||||
*
|
||||
* @return bool
|
||||
*/
|
||||
private function on_wpseo_admin_page() {
|
||||
return 'admin.php' === $this->pagenow && strpos( filter_input( INPUT_GET, 'page' ), 'wpseo' ) === 0;
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -110,7 +216,7 @@ class WPSEO_Admin_Init {
|
||||
* Loads admin page class for all admin pages starting with `wpseo_`.
|
||||
*/
|
||||
private function load_admin_user_class() {
|
||||
if ( in_array( $this->pagenow, array( 'user-edit.php', 'profile.php' ) ) ) {
|
||||
if ( in_array( $this->pagenow, array( 'user-edit.php', 'profile.php' ) ) && current_user_can( 'edit_users' ) ) {
|
||||
new WPSEO_Admin_User_Profile;
|
||||
}
|
||||
}
|
||||
@@ -121,8 +227,8 @@ class WPSEO_Admin_Init {
|
||||
* Loads admin page class for all admin pages starting with `wpseo_`.
|
||||
*/
|
||||
private function load_admin_page_class() {
|
||||
$page = filter_input( INPUT_GET, 'page' );
|
||||
if ( 'admin.php' === $this->pagenow && strpos( $page, 'wpseo' ) === 0 ) {
|
||||
|
||||
if ( $this->on_wpseo_admin_page() ) {
|
||||
// For backwards compatabilty, this still needs a global, for now...
|
||||
$GLOBALS['wpseo_admin_pages'] = new WPSEO_Admin_Pages;
|
||||
$this->register_i18n_promo_class();
|
||||
@@ -134,51 +240,31 @@ class WPSEO_Admin_Init {
|
||||
*
|
||||
* @link https://github.com/Yoast/i18n-module
|
||||
*/
|
||||
function register_i18n_promo_class() {
|
||||
private function register_i18n_promo_class() {
|
||||
new yoast_i18n(
|
||||
array(
|
||||
'textdomain' => 'wordpress-seo',
|
||||
'project_slug' => 'wordpress-seo',
|
||||
'plugin_name' => 'WordPress SEO by Yoast',
|
||||
'plugin_name' => 'Yoast SEO',
|
||||
'hook' => 'wpseo_admin_footer',
|
||||
'glotpress_url' => 'http://translate.yoast.com/',
|
||||
'glotpress_url' => 'https://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=wpseo-i18n-promo',
|
||||
'register_url' => 'https://translate.yoast.com/projects#utm_source=plugin&utm_medium=promo-box&utm_campaign=wpseo-i18n-promo',
|
||||
)
|
||||
);
|
||||
}
|
||||
|
||||
/**
|
||||
* Determine if we're allowed to load our tracking class and if so, load it.
|
||||
*/
|
||||
private function load_yoast_tracking() {
|
||||
if ( $this->options['yoast_tracking'] === true ) {
|
||||
/**
|
||||
* @internal this is not a proper lean loading implementation (method_exist will autoload the class),
|
||||
* but it can't be helped as there are other plugins out there which also use versions
|
||||
* of the Yoast Tracking class and we need to take that into account unfortunately
|
||||
*/
|
||||
if ( method_exists( 'Yoast_Tracking', 'get_instance' ) ) {
|
||||
add_action( 'yoast_tracking', array( 'Yoast_Tracking', 'get_instance' ) );
|
||||
}
|
||||
else {
|
||||
$GLOBALS['yoast_tracking'] = new Yoast_Tracking;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* See if we should start our tour.
|
||||
*/
|
||||
private function load_tour() {
|
||||
$restart_tour = filter_input( INPUT_GET, 'wpseo_restart_tour' );
|
||||
if ( $restart_tour ) {
|
||||
$this->options['ignore_tour'] = false;
|
||||
update_option( 'wpseo', $this->options );
|
||||
delete_user_meta( get_current_user_id(), 'wpseo_ignore_tour' );
|
||||
}
|
||||
|
||||
if ( $this->options['tracking_popup_done'] === false || $this->options['ignore_tour'] === false ) {
|
||||
if ( ! get_user_meta( get_current_user_id(), 'wpseo_ignore_tour' ) ) {
|
||||
add_action( 'admin_enqueue_scripts', array( 'WPSEO_Pointers', 'get_instance' ) );
|
||||
}
|
||||
}
|
||||
@@ -191,4 +277,14 @@ class WPSEO_Admin_Init {
|
||||
new WPSEO_Sitemaps_Admin;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Listener for the ignore tour GET value. If this one is set, just set the user meta to true.
|
||||
*/
|
||||
private function ignore_tour() {
|
||||
if ( filter_input( INPUT_GET, 'wpseo_ignore_tour' ) && wp_verify_nonce( filter_input( INPUT_GET, 'nonce' ), 'wpseo-ignore-tour' ) ) {
|
||||
update_user_meta( get_current_user_id(), 'wpseo_ignore_tour', true );
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
@@ -28,7 +28,7 @@ class WPSEO_Admin_User_Profile {
|
||||
private function filter_input_post( $var_name ) {
|
||||
$val = filter_input( INPUT_POST, $var_name );
|
||||
if ( $val ) {
|
||||
return WPSEO_Option::sanitize_text_field( $val );
|
||||
return WPSEO_Utils::sanitize_text_field( $val );
|
||||
}
|
||||
return '';
|
||||
}
|
||||
@@ -36,21 +36,17 @@ class WPSEO_Admin_User_Profile {
|
||||
/**
|
||||
* Updates the user metas that (might) have been set on the user profile page.
|
||||
*
|
||||
* @param int $user_id of the updated user
|
||||
* @param int $user_id of the updated user.
|
||||
*/
|
||||
public function process_user_option_update( $user_id ) {
|
||||
update_user_meta( $user_id, '_yoast_wpseo_profile_updated', time() );
|
||||
|
||||
if ( current_user_can( 'edit_user', $user_id ) ) {
|
||||
update_user_meta( $user_id, '_yoast_wpseo_profile_updated', time() );
|
||||
}
|
||||
check_admin_referer( 'wpseo_user_profile_update', 'wpseo_nonce' );
|
||||
|
||||
if ( $this->filter_input_post( 'wpseo_author_title' ) ) {
|
||||
check_admin_referer( 'wpseo_user_profile_update', 'wpseo_nonce' );
|
||||
update_user_meta( $user_id, 'wpseo_title', $this->filter_input_post( 'wpseo_author_title' ) );
|
||||
update_user_meta( $user_id, 'wpseo_metadesc', $this->filter_input_post( 'wpseo_author_metadesc' ) );
|
||||
update_user_meta( $user_id, 'wpseo_metakey', $this->filter_input_post( 'wpseo_author_metakey' ) );
|
||||
update_user_meta( $user_id, 'wpseo_excludeauthorsitemap', $this->filter_input_post( 'wpseo_author_exclude' ) );
|
||||
}
|
||||
update_user_meta( $user_id, 'wpseo_title', $this->filter_input_post( 'wpseo_author_title' ) );
|
||||
update_user_meta( $user_id, 'wpseo_metadesc', $this->filter_input_post( 'wpseo_author_metadesc' ) );
|
||||
update_user_meta( $user_id, 'wpseo_metakey', $this->filter_input_post( 'wpseo_author_metakey' ) );
|
||||
update_user_meta( $user_id, 'wpseo_excludeauthorsitemap', $this->filter_input_post( 'wpseo_author_exclude' ) );
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -59,11 +55,6 @@ class WPSEO_Admin_User_Profile {
|
||||
* @param object $user
|
||||
*/
|
||||
public function user_profile( $user ) {
|
||||
|
||||
if ( ! current_user_can( 'edit_users' ) ) {
|
||||
return;
|
||||
}
|
||||
|
||||
$options = WPSEO_Options::get_all();
|
||||
|
||||
wp_nonce_field( 'wpseo_user_profile_update', 'wpseo_nonce' );
|
||||
@@ -71,4 +62,4 @@ class WPSEO_Admin_User_Profile {
|
||||
require_once( 'views/user-profile.php' );
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
@@ -4,7 +4,7 @@
|
||||
*/
|
||||
|
||||
/**
|
||||
* Class that holds most of the admin functionality for WP SEO.
|
||||
* Class that holds most of the admin functionality for Yoast SEO.
|
||||
*/
|
||||
class WPSEO_Admin {
|
||||
|
||||
@@ -13,6 +13,16 @@ class WPSEO_Admin {
|
||||
*/
|
||||
private $options;
|
||||
|
||||
/**
|
||||
* @var Yoast_Dashboard_Widget
|
||||
*/
|
||||
public $dashboard_widget;
|
||||
|
||||
/**
|
||||
* @var WPSEO_GSC
|
||||
*/
|
||||
private $page_gsc;
|
||||
|
||||
/**
|
||||
* Class constructor
|
||||
*/
|
||||
@@ -29,6 +39,9 @@ class WPSEO_Admin {
|
||||
add_action( 'delete_category', array( $this, 'schedule_rewrite_flush' ) );
|
||||
}
|
||||
|
||||
$this->page_gsc = new WPSEO_GSC();
|
||||
$this->dashboard_widget = new Yoast_Dashboard_Widget();
|
||||
|
||||
// Needs the lower than default priority so other plugins can hook underneath it without issue.
|
||||
add_action( 'admin_menu', array( $this, 'register_settings_page' ), 5 );
|
||||
add_action( 'network_admin_menu', array( $this, 'register_network_settings_page' ) );
|
||||
@@ -58,7 +71,9 @@ class WPSEO_Admin {
|
||||
|
||||
add_filter( 'set-screen-option', array( $this, 'save_bulk_edit_options' ), 10, 3 );
|
||||
|
||||
add_action( 'activated_plugin', array( 'WPSEO_Plugin_Conflict', 'hook_check_for_plugin_conflicts' ), 10, 1 );
|
||||
add_action( 'admin_init', array( 'WPSEO_Plugin_Conflict', 'hook_check_for_plugin_conflicts' ), 10, 1 );
|
||||
|
||||
WPSEO_Utils::register_cache_clear_option( 'wpseo', '' );
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -78,11 +93,11 @@ class WPSEO_Admin {
|
||||
return;
|
||||
}
|
||||
|
||||
// Base 64 encoded SVG image
|
||||
// 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(
|
||||
// Add main page.
|
||||
$admin_page = add_menu_page( 'Yoast SEO: ' . __( 'General Settings', 'wordpress-seo' ), __( 'SEO', 'wordpress-seo' ), 'manage_options', 'wpseo_dashboard', array(
|
||||
$this,
|
||||
'load_page',
|
||||
), $icon_svg, '99.31337' );
|
||||
@@ -94,7 +109,7 @@ class WPSEO_Admin {
|
||||
*/
|
||||
$manage_options_cap = apply_filters( 'wpseo_manage_options_capability', 'manage_options' );
|
||||
|
||||
// Sub menu pages
|
||||
// Sub menu pages.
|
||||
$submenu_pages = array(
|
||||
array(
|
||||
'wpseo_dashboard',
|
||||
@@ -141,9 +156,18 @@ class WPSEO_Admin {
|
||||
array( $this, 'load_page' ),
|
||||
null,
|
||||
),
|
||||
array(
|
||||
'wpseo_dashboard',
|
||||
'',
|
||||
__( 'Search Console', 'wordpress-seo' ),
|
||||
$manage_options_cap,
|
||||
'wpseo_search_console',
|
||||
array( $this->page_gsc, 'display' ),
|
||||
array( array( $this->page_gsc, 'set_help' ) ),
|
||||
),
|
||||
);
|
||||
|
||||
// Add Extension submenu page
|
||||
// Add Extension submenu page.
|
||||
$submenu_pages[] = array(
|
||||
'wpseo_dashboard',
|
||||
'',
|
||||
@@ -154,17 +178,17 @@ class WPSEO_Admin {
|
||||
null,
|
||||
);
|
||||
|
||||
// Allow submenu pages manipulation
|
||||
// Allow submenu pages manipulation.
|
||||
$submenu_pages = apply_filters( 'wpseo_submenu_pages', $submenu_pages );
|
||||
|
||||
// Loop through submenu pages and add them
|
||||
// Loop through submenu pages and add them.
|
||||
if ( count( $submenu_pages ) ) {
|
||||
foreach ( $submenu_pages as $submenu_page ) {
|
||||
|
||||
// Add submenu page
|
||||
$admin_page = add_submenu_page( $submenu_page[0], $submenu_page[2] . ' - ' . __( 'WordPress SEO by Yoast', 'wordpress-seo' ), $submenu_page[2], $submenu_page[3], $submenu_page[4], $submenu_page[5] );
|
||||
// Add submenu page.
|
||||
$admin_page = add_submenu_page( $submenu_page[0], $submenu_page[2] . ' - Yoast SEO', $submenu_page[2], $submenu_page[3], $submenu_page[4], $submenu_page[5] );
|
||||
|
||||
// Check if we need to hook
|
||||
// Check if we need to hook.
|
||||
if ( isset( $submenu_page[6] ) && ( is_array( $submenu_page[6] ) && $submenu_page[6] !== array() ) ) {
|
||||
foreach ( $submenu_page[6] as $submenu_page_action ) {
|
||||
add_action( 'load-' . $admin_page, $submenu_page_action );
|
||||
@@ -195,7 +219,8 @@ class WPSEO_Admin {
|
||||
array(
|
||||
'id' => 'basic-help',
|
||||
'title' => __( 'Template explanation', 'wordpress-seo' ),
|
||||
'content' => '<p>' . __( 'The title & metas settings for WordPress SEO are made up of variables that are replaced by specific values from the page when the page is displayed. The tabs on the left explain the available variables.', 'wordpress-seo' ) . '</p>' . '<p>' . __( 'Note that not all variables can be used in every template.', 'wordpress-seo' ) . '</p>',
|
||||
/* translators: %1$s expands to Yoast SEO */
|
||||
'content' => '<p>' . sprintf( __( 'The title & metas settings for %1$s are made up of variables that are replaced by specific values from the page when the page is displayed. The tabs on the left explain the available variables.', 'wordpress-seo' ), 'Yoast SEO' ) . '</p>' . '<p>' . __( 'Note that not all variables can be used in every template.', 'wordpress-seo' ) . '</p>',
|
||||
)
|
||||
);
|
||||
|
||||
@@ -221,22 +246,22 @@ class WPSEO_Admin {
|
||||
*/
|
||||
function register_network_settings_page() {
|
||||
if ( WPSEO_Utils::grant_access() ) {
|
||||
// Base 64 encoded SVG image
|
||||
// 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(
|
||||
add_menu_page( 'Yoast SEO: ' . __( 'MultiSite Settings', 'wordpress-seo' ), __( 'SEO', 'wordpress-seo' ), 'delete_users', 'wpseo_dashboard', array(
|
||||
$this,
|
||||
'network_config_page',
|
||||
), $icon_svg );
|
||||
|
||||
if ( WPSEO_Utils::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(
|
||||
add_submenu_page( 'wpseo_dashboard', 'Yoast SEO: ' . __( 'Edit Files', 'wordpress-seo' ), __( 'Edit Files', 'wordpress-seo' ), 'delete_users', 'wpseo_files', array(
|
||||
$this,
|
||||
'load_page',
|
||||
) );
|
||||
}
|
||||
|
||||
// Add Extension submenu page
|
||||
add_submenu_page( 'wpseo_dashboard', __( 'Yoast WordPress SEO:', 'wordpress-seo' ) . ' ' . __( 'Extensions', 'wordpress-seo' ), __( 'Extensions', 'wordpress-seo' ), 'delete_users', 'wpseo_licenses', array(
|
||||
// Add Extension submenu page.
|
||||
add_submenu_page( 'wpseo_dashboard', 'Yoast SEO: ' . __( 'Extensions', 'wordpress-seo' ), __( 'Extensions', 'wordpress-seo' ), 'delete_users', 'wpseo_licenses', array(
|
||||
$this,
|
||||
'load_page',
|
||||
) );
|
||||
@@ -275,6 +300,10 @@ class WPSEO_Admin {
|
||||
require_once( WPSEO_PATH . 'admin/pages/licenses.php' );
|
||||
break;
|
||||
|
||||
case 'wpseo_files':
|
||||
require_once( WPSEO_PATH . 'admin/views/tool-file-editor.php' );
|
||||
break;
|
||||
|
||||
case 'wpseo_dashboard':
|
||||
default:
|
||||
require_once( WPSEO_PATH . 'admin/pages/dashboard.php' );
|
||||
@@ -338,7 +367,7 @@ class WPSEO_Admin {
|
||||
<p>
|
||||
<strong>%1$s</strong>
|
||||
%2$s
|
||||
<a href="javascript:wpseo_setIgnore(\'blog_public_warning\',\'robotsmessage\',\'%3$s\');" class="button">%4$s</a>
|
||||
<a href="javascript:wpseoSetIgnore(\'blog_public_warning\',\'robotsmessage\',\'%3$s\');" class="button">%4$s</a>
|
||||
</p>
|
||||
</div>',
|
||||
__( 'Huge SEO Issue: You\'re blocking access to robots.', 'wordpress-seo' ),
|
||||
@@ -358,7 +387,7 @@ class WPSEO_Admin {
|
||||
return;
|
||||
}
|
||||
|
||||
// No need to double display it on the dashboard
|
||||
// No need to double display it on the dashboard.
|
||||
if ( 'wpseo_dashboard' === filter_input( INPUT_GET, 'page' ) ) {
|
||||
return;
|
||||
}
|
||||
@@ -372,11 +401,12 @@ class WPSEO_Admin {
|
||||
<p>
|
||||
<strong>%1$s</strong>
|
||||
%2$s
|
||||
<a href="javascript:wpseo_setIgnore(\'meta_description_warning\',\'metamessage\',\'%3$s\');" class="button">%4$s</a>
|
||||
<a href="javascript:wpseoSetIgnore(\'meta_description_warning\',\'metamessage\',\'%3$s\');" class="button">%4$s</a>
|
||||
</p>
|
||||
</div>',
|
||||
__( 'SEO Issue:', 'wordpress-seo' ),
|
||||
sprintf( __( 'Your theme contains a meta description, which blocks WordPress SEO from working properly. Please visit the %sSEO Dashboard%s to fix this.', 'wordpress-seo' ), sprintf( '<a href="%s">', esc_url( admin_url( 'admin.php?page=wpseo_dashboard' ) ) ), '</a>' ),
|
||||
/* translators: %1$s expands to Yoast SEO, %2$s to opening anchor and %3$s the anchor closing tag */
|
||||
sprintf( __( 'Your theme contains a meta description, which blocks %1$s from working properly. Please visit the %2$sSEO Dashboard%3$s to fix this.', 'wordpress-seo' ), 'Yoast SEO', sprintf( '<a href="%s">', esc_url( admin_url( 'admin.php?page=wpseo_dashboard' ) ) ), '</a>' ),
|
||||
esc_js( wp_create_nonce( 'wpseo-ignore' ) ),
|
||||
__( 'I know, don\'t bug me.', 'wordpress-seo' )
|
||||
);
|
||||
@@ -405,11 +435,11 @@ class WPSEO_Admin {
|
||||
}
|
||||
}
|
||||
|
||||
// add link to premium support landing page
|
||||
$premium_link = '<a href="https://yoast.com/wordpress/plugins/seo-premium/support/#utm_source=wordpress-seo-settings-link&utm_medium=text-link&utm_campaign=support-link">' . __( 'Premium Support', 'wordpress-seo' ) . '</a>';
|
||||
// Add link to premium support landing page.
|
||||
$premium_link = '<a href="https://yoast.com/wordpress/plugins/seo-premium/support/#utm_source=wordpress-seo-settings-link&utm_medium=textlink&utm_campaign=support-link">' . __( 'Premium Support', 'wordpress-seo' ) . '</a>';
|
||||
array_unshift( $links, $premium_link );
|
||||
|
||||
// add link to docs
|
||||
// Add link to docs.
|
||||
$faq_link = '<a href="https://yoast.com/wordpress/plugins/seo/faq/">' . __( 'FAQ', 'wordpress-seo' ) . '</a>';
|
||||
array_unshift( $links, $faq_link );
|
||||
|
||||
@@ -435,11 +465,11 @@ class WPSEO_Admin {
|
||||
* @return array $contactmethods with added contactmethods.
|
||||
*/
|
||||
public function update_contactmethods( $contactmethods ) {
|
||||
// Add Google+
|
||||
// Add Google+.
|
||||
$contactmethods['googleplus'] = __( 'Google+', 'wordpress-seo' );
|
||||
// Add Twitter
|
||||
// Add Twitter.
|
||||
$contactmethods['twitter'] = __( 'Twitter username (without @)', 'wordpress-seo' );
|
||||
// Add Facebook
|
||||
// Add Facebook.
|
||||
$contactmethods['facebook'] = __( 'Facebook profile URL', 'wordpress-seo' );
|
||||
|
||||
return $contactmethods;
|
||||
@@ -455,7 +485,7 @@ class WPSEO_Admin {
|
||||
* @return string $clean_slug cleaned slug
|
||||
*/
|
||||
function remove_stopwords_from_slug( $slug ) {
|
||||
// Don't change an existing slug
|
||||
// Don't change an existing slug.
|
||||
if ( isset( $slug ) && $slug !== '' ) {
|
||||
return $slug;
|
||||
}
|
||||
@@ -464,18 +494,23 @@ class WPSEO_Admin {
|
||||
return $slug;
|
||||
}
|
||||
|
||||
// Don't change slug if the post is a draft, this conflicts with polylang
|
||||
// Don't change slug if the post is a draft, this conflicts with polylang.
|
||||
if ( 'draft' == filter_input( INPUT_POST, 'post_status' ) ) {
|
||||
return $slug;
|
||||
}
|
||||
|
||||
// Lowercase the slug and strip slashes
|
||||
// Lowercase the slug and strip slashes.
|
||||
$clean_slug = sanitize_title( stripslashes( filter_input( INPUT_POST, 'post_title' ) ) );
|
||||
|
||||
// Turn it to an array and strip stopwords by comparing against an array of stopwords
|
||||
// Turn it to an array and strip stopwords by comparing against an array of stopwords.
|
||||
$clean_slug_array = array_diff( explode( '-', $clean_slug ), $this->stopwords() );
|
||||
|
||||
// Turn the sanitized array into a string
|
||||
// Don't change the slug if there are less than 3 words left.
|
||||
if ( count( $clean_slug_array ) < 3 ) {
|
||||
return $clean_slug;
|
||||
}
|
||||
|
||||
// Turn the sanitized array into a string.
|
||||
$clean_slug = join( '-', $clean_slug_array );
|
||||
|
||||
return $clean_slug;
|
||||
@@ -507,8 +542,8 @@ class WPSEO_Admin {
|
||||
/**
|
||||
* Check whether the stopword appears in the string
|
||||
*
|
||||
* @param string $haystack The string to be checked for the stopword
|
||||
* @param bool $checkingUrl Whether or not we're checking a URL
|
||||
* @param string $haystack The string to be checked for the stopword.
|
||||
* @param bool $checkingUrl Whether or not we're checking a URL.
|
||||
*
|
||||
* @return bool|mixed
|
||||
*/
|
||||
@@ -517,13 +552,13 @@ class WPSEO_Admin {
|
||||
|
||||
if ( is_array( $stopWords ) && $stopWords !== array() ) {
|
||||
foreach ( $stopWords as $stopWord ) {
|
||||
// If checking a URL remove the single quotes
|
||||
// If checking a URL remove the single quotes.
|
||||
if ( $checkingUrl ) {
|
||||
$stopWord = str_replace( "'", '', $stopWord );
|
||||
}
|
||||
|
||||
// Check whether the stopword appears as a whole word
|
||||
// @todo [JRF => whomever] check whether the use of \b (=word boundary) would be more efficient ;-)
|
||||
// Check whether the stopword appears as a whole word.
|
||||
// @todo [JRF => whomever] check whether the use of \b (=word boundary) would be more efficient ;-).
|
||||
$res = preg_match( "`(^|[ \n\r\t\.,'\(\)\"\+;!?:])" . preg_quote( $stopWord, '`' ) . "($|[ \n\r\t\.,'\(\)\"\+;!?:])`iu", $haystack );
|
||||
if ( $res > 0 ) {
|
||||
return $stopWord;
|
||||
|
||||
@@ -130,14 +130,14 @@ class WPSEO_Bulk_List_Table extends WP_List_Table {
|
||||
*/
|
||||
private function verify_nonce() {
|
||||
if ( $this->should_verify_nonce() && ! wp_verify_nonce( filter_input( INPUT_GET, 'nonce' ), 'bulk-editor-table' ) ) {
|
||||
Yoast_Notification_Center::get()->add_notification( new Yoast_Notification( __( 'You are not allowed to access this page.', 'wordpress-seo' ), 'error' ) );
|
||||
Yoast_Notification_Center::get()->add_notification( new Yoast_Notification( __( 'You are not allowed to access this page.', 'wordpress-seo' ), array( 'type' => 'error' ) ) );
|
||||
Yoast_Notification_Center::get()->display_notifications();
|
||||
die;
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* checks if additional parameters have been sent to determine if nonce should be checked or not.
|
||||
* Checks if additional parameters have been sent to determine if nonce should be checked or not.
|
||||
*
|
||||
* @return bool
|
||||
*/
|
||||
@@ -414,9 +414,9 @@ class WPSEO_Bulk_List_Table extends WP_List_Table {
|
||||
$current_status = $this->current_status;
|
||||
$current_order = $this->current_order;
|
||||
|
||||
// If current type doesn't compare with objects page_type, than we have to unset some vars in the requested url (which will be use for internal table urls)
|
||||
// If current type doesn't compare with objects page_type, than we have to unset some vars in the requested url (which will be use for internal table urls).
|
||||
if ( $_GET['type'] != $this->page_type ) {
|
||||
$request_url = remove_query_arg( 'paged', $request_url ); // page will be set with value 1 below.
|
||||
$request_url = remove_query_arg( 'paged', $request_url ); // Page will be set with value 1 below.
|
||||
$request_url = remove_query_arg( 'post_type_filter', $request_url );
|
||||
$request_url = remove_query_arg( 'post_status', $request_url );
|
||||
$request_url = remove_query_arg( 'orderby', $request_url );
|
||||
@@ -451,18 +451,18 @@ class WPSEO_Bulk_List_Table extends WP_List_Table {
|
||||
$all_states = $this->get_all_states();
|
||||
$subquery = $this->get_base_subquery();
|
||||
|
||||
// Setting the column headers
|
||||
// Setting the column headers.
|
||||
$this->set_column_headers();
|
||||
|
||||
// Count the total number of needed items and setting pagination given $total_items
|
||||
// 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
|
||||
// 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)
|
||||
// Get the metadata for the current items ($this->items).
|
||||
$this->get_meta_data();
|
||||
|
||||
}
|
||||
@@ -514,7 +514,7 @@ class WPSEO_Bulk_List_Table extends WP_List_Table {
|
||||
* @return string
|
||||
*/
|
||||
protected function get_post_type_clause() {
|
||||
// Filter Block
|
||||
// Filter Block.
|
||||
$post_types = null;
|
||||
$post_type_clause = '';
|
||||
$post_type_filter = filter_input( INPUT_GET, 'post_type_filter' );
|
||||
@@ -536,7 +536,7 @@ class WPSEO_Bulk_List_Table extends WP_List_Table {
|
||||
*/
|
||||
protected function set_pagination( $total_items ) {
|
||||
|
||||
// Calculate items per page
|
||||
// Calculate items per page.
|
||||
$per_page = $this->get_items_per_page( 'wpseo_posts_per_page', 10 );
|
||||
$paged = esc_sql( sanitize_text_field( filter_input( INPUT_GET, 'paged' ) ) );
|
||||
|
||||
@@ -572,18 +572,18 @@ class WPSEO_Bulk_List_Table extends WP_List_Table {
|
||||
* @return string
|
||||
*/
|
||||
protected function parse_item_query( $subquery, $all_states, $post_type_clause ) {
|
||||
// Order By block
|
||||
// Order By block.
|
||||
$orderby = filter_input( INPUT_GET, 'orderby' );
|
||||
|
||||
$orderby = ! empty( $orderby ) ? esc_sql( sanitize_text_field( $orderby ) ) : 'post_title';
|
||||
$orderby = $this->sanitize_orderby( $orderby );
|
||||
|
||||
// Order clause
|
||||
// Order clause.
|
||||
$order = filter_input( INPUT_GET, 'order' );
|
||||
$order = ! empty( $order ) ? esc_sql( strtoupper( sanitize_text_field( $order ) ) ) : 'ASC';
|
||||
$order = $this->sanitize_order( $order );
|
||||
|
||||
// Get all needed results
|
||||
// Get all needed results.
|
||||
$query = "
|
||||
SELECT ID, post_title, post_type, post_status, post_modified, post_date
|
||||
FROM {$subquery}
|
||||
@@ -598,7 +598,7 @@ class WPSEO_Bulk_List_Table extends WP_List_Table {
|
||||
/**
|
||||
* Heavily restricts the possible columns by which a user can order the table in the bulk editor, thereby preventing a possible CSRF vulnerability.
|
||||
*
|
||||
* @param string $orderby The column by which we want to order
|
||||
* @param string $orderby The column by which we want to order.
|
||||
*
|
||||
* @return string $orderby
|
||||
*/
|
||||
@@ -619,12 +619,12 @@ class WPSEO_Bulk_List_Table extends WP_List_Table {
|
||||
/**
|
||||
* Makes sure the order clause is always ASC or DESC for the bulk editor table, thereby preventing a possible CSRF vulnerability.
|
||||
*
|
||||
* @param string $order Whether we want to sort ascending or descending
|
||||
* @param string $order Whether we want to sort ascending or descending.
|
||||
*
|
||||
* @return string $order
|
||||
*/
|
||||
protected function sanitize_order( $order ) {
|
||||
if ( in_array( strtoupper( $order ), array( 'ASC', 'DESC', ) ) ) {
|
||||
if ( in_array( strtoupper( $order ), array( 'ASC', 'DESC' ) ) ) {
|
||||
return $order;
|
||||
}
|
||||
|
||||
@@ -827,7 +827,7 @@ class WPSEO_Bulk_List_Table extends WP_List_Table {
|
||||
*/
|
||||
protected function parse_meta_data_field( $record_id, $attributes, $values = false ) {
|
||||
|
||||
// Fill meta data if exists in $this->meta_data
|
||||
// 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 ] : '';
|
||||
@@ -852,7 +852,7 @@ class WPSEO_Bulk_List_Table extends WP_List_Table {
|
||||
|
||||
$this->parse_meta_data( $meta_data );
|
||||
|
||||
// Little housekeeping
|
||||
// Little housekeeping.
|
||||
unset( $post_ids, $meta_data );
|
||||
|
||||
}
|
||||
|
||||
@@ -60,7 +60,7 @@ class WPSEO_Bulk_Title_Editor_List_Table extends WPSEO_Bulk_List_Table {
|
||||
*/
|
||||
protected function parse_page_specific_column( $column_name, $record, $attributes ) {
|
||||
|
||||
// Fill meta data if exists in $this->meta_data
|
||||
// Fill meta data if exists in $this->meta_data.
|
||||
$meta_data = ( ! empty( $this->meta_data[ $record->ID ] ) ) ? $this->meta_data[ $record->ID ] : array();
|
||||
|
||||
switch ( $column_name ) {
|
||||
|
||||
@@ -4,9 +4,9 @@
|
||||
*/
|
||||
|
||||
/**
|
||||
* class WPSEO_Admin_Pages
|
||||
* Class WPSEO_Admin_Pages
|
||||
*
|
||||
* Class with functionality for the WP SEO admin pages.
|
||||
* Class with functionality for the Yoast SEO admin pages.
|
||||
*/
|
||||
class WPSEO_Admin_Pages {
|
||||
|
||||
@@ -113,7 +113,7 @@ class WPSEO_Admin_Pages {
|
||||
/********************** DEPRECATED METHODS **********************/
|
||||
|
||||
/**
|
||||
* Exports the current site's WP SEO settings.
|
||||
* Exports the current site's Yoast SEO settings.
|
||||
*
|
||||
* @param bool $include_taxonomy Whether to include the taxonomy metadata the plugin creates.
|
||||
*
|
||||
@@ -153,7 +153,7 @@ class WPSEO_Admin_Pages {
|
||||
* @deprecated 2.0
|
||||
*
|
||||
* @param bool $submit Whether or not a submit button and form end tag should be shown.
|
||||
* @param bool $show_sidebar Whether or not to show the banner sidebar - used by premium plugins to disable it
|
||||
* @param bool $show_sidebar Whether or not to show the banner sidebar - used by premium plugins to disable it.
|
||||
*/
|
||||
public function admin_footer( $submit = true, $show_sidebar = true ) {
|
||||
_deprecated_function( __METHOD__, 'WPSEO 2.0', 'This method is deprecated, please use the <code>Yoast_Form</code> class.' );
|
||||
@@ -384,7 +384,7 @@ class WPSEO_Admin_Pages {
|
||||
}
|
||||
|
||||
/**
|
||||
* Resets the site to the default WordPress SEO settings and runs a title test to check
|
||||
* Resets the site to the default Yoast SEO settings and runs a title test to check
|
||||
* whether force rewrite needs to be on.
|
||||
*
|
||||
* @deprecated 1.5.0
|
||||
|
||||
@@ -0,0 +1,255 @@
|
||||
<?php
|
||||
/**
|
||||
* @package WPSEO\Admin\Customizer
|
||||
*/
|
||||
|
||||
/**
|
||||
* Class with functionality to support WP SEO settings in WordPress Customizer.
|
||||
*/
|
||||
class WPSEO_Customizer {
|
||||
|
||||
/**
|
||||
* @var WP_Customize_Manager
|
||||
*/
|
||||
protected $wp_customize;
|
||||
|
||||
/**
|
||||
* Construct Method.
|
||||
*/
|
||||
public function __construct() {
|
||||
add_action( 'customize_register', array( $this, 'wpseo_customize_register' ) );
|
||||
}
|
||||
|
||||
/**
|
||||
* Function to support WordPress Customizer
|
||||
*
|
||||
* @param WP_Customize_Manager $wp_customize
|
||||
*/
|
||||
public function wpseo_customize_register( $wp_customize ) {
|
||||
if ( ! current_user_can( 'manage_options' ) ) {
|
||||
return;
|
||||
}
|
||||
|
||||
$this->wp_customize = $wp_customize;
|
||||
|
||||
$this->breadcrumbs_section();
|
||||
$this->breadcrumbs_blog_remove_setting();
|
||||
$this->breadcrumbs_separator_setting();
|
||||
$this->breadcrumbs_home_setting();
|
||||
$this->breadcrumbs_prefix_setting();
|
||||
$this->breadcrumbs_archiveprefix_setting();
|
||||
$this->breadcrumbs_searchprefix_setting();
|
||||
$this->breadcrumbs_404_setting();
|
||||
}
|
||||
|
||||
/**
|
||||
* Add the breadcrumbs section to the customizer
|
||||
*/
|
||||
private function breadcrumbs_section() {
|
||||
$this->wp_customize->add_section(
|
||||
'wpseo_breadcrumbs_customizer_section', array(
|
||||
/* translators: %s is the name of the plugin */
|
||||
'title' => sprintf( __( '%s Breadcrumbs', 'wordpress-seo' ), 'Yoast SEO' ),
|
||||
'priority' => 999,
|
||||
'active_callback' => array( $this, 'breadcrumbs_active_callback' ),
|
||||
)
|
||||
);
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns whether or not the breadcrumbs are active
|
||||
*
|
||||
* @return bool
|
||||
*/
|
||||
public function breadcrumbs_active_callback() {
|
||||
$options = WPSEO_Options::get_all();
|
||||
|
||||
return true === ( current_theme_supports( 'yoast-seo-breadcrumbs' ) || $options['breadcrumbs-enable'] );
|
||||
}
|
||||
|
||||
/**
|
||||
* Adds the breadcrumbs remove blog checkbox
|
||||
*/
|
||||
private function breadcrumbs_blog_remove_setting() {
|
||||
$this->wp_customize->add_setting(
|
||||
'wpseo_internallinks[breadcrumbs-blog-remove]', array(
|
||||
'default' => '',
|
||||
'type' => 'option',
|
||||
'transport' => 'refresh',
|
||||
)
|
||||
);
|
||||
|
||||
$this->wp_customize->add_control(
|
||||
new WP_Customize_Control(
|
||||
$this->wp_customize, 'wpseo-breadcrumbs-blog-remove', array(
|
||||
'label' => __( 'Remove blog page from breadcrumbs', 'wordpress-seo' ),
|
||||
'type' => 'checkbox',
|
||||
'section' => 'wpseo_breadcrumbs_customizer_section',
|
||||
'settings' => 'wpseo_internallinks[breadcrumbs-blog-remove]',
|
||||
'context' => '',
|
||||
'active_callback' => array( $this, 'breadcrumbs_blog_remove_active_cb' ),
|
||||
)
|
||||
)
|
||||
);
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns whether or not to show the breadcrumbs blog remove option
|
||||
*
|
||||
* @return bool
|
||||
*/
|
||||
public function breadcrumbs_blog_remove_active_cb() {
|
||||
return 'page' === get_option( 'show_on_front' );
|
||||
}
|
||||
|
||||
/**
|
||||
* Adds the breadcrumbs separator text field
|
||||
*/
|
||||
private function breadcrumbs_separator_setting() {
|
||||
$this->wp_customize->add_setting(
|
||||
'wpseo_internallinks[breadcrumbs-sep]', array(
|
||||
'default' => '',
|
||||
'type' => 'option',
|
||||
'transport' => 'refresh',
|
||||
)
|
||||
);
|
||||
|
||||
$this->wp_customize->add_control(
|
||||
new WP_Customize_Control(
|
||||
$this->wp_customize, 'wpseo-breadcrumbs-separator', array(
|
||||
'label' => __( 'Breadcrumbs separator:', 'wordpress-seo' ),
|
||||
'type' => 'text',
|
||||
'section' => 'wpseo_breadcrumbs_customizer_section',
|
||||
'settings' => 'wpseo_internallinks[breadcrumbs-sep]',
|
||||
'context' => '',
|
||||
)
|
||||
)
|
||||
);
|
||||
}
|
||||
|
||||
/**
|
||||
* Adds the breadcrumbs home anchor text field
|
||||
*/
|
||||
private function breadcrumbs_home_setting() {
|
||||
$this->wp_customize->add_setting(
|
||||
'wpseo_internallinks[breadcrumbs-home]', array(
|
||||
'default' => '',
|
||||
'type' => 'option',
|
||||
'transport' => 'refresh',
|
||||
)
|
||||
);
|
||||
|
||||
$this->wp_customize->add_control(
|
||||
new WP_Customize_Control(
|
||||
$this->wp_customize, 'wpseo-breadcrumbs-home', array(
|
||||
'label' => __( 'Anchor text for the homepage:', 'wordpress-seo' ),
|
||||
'type' => 'text',
|
||||
'section' => 'wpseo_breadcrumbs_customizer_section',
|
||||
'settings' => 'wpseo_internallinks[breadcrumbs-home]',
|
||||
'context' => '',
|
||||
)
|
||||
)
|
||||
);
|
||||
}
|
||||
|
||||
/**
|
||||
* Adds the breadcrumbs prefix text field
|
||||
*/
|
||||
private function breadcrumbs_prefix_setting() {
|
||||
$this->wp_customize->add_setting(
|
||||
'wpseo_internallinks[breadcrumbs-prefix]', array(
|
||||
'default' => '',
|
||||
'type' => 'option',
|
||||
'transport' => 'refresh',
|
||||
)
|
||||
);
|
||||
|
||||
$this->wp_customize->add_control(
|
||||
new WP_Customize_Control(
|
||||
$this->wp_customize, 'wpseo-breadcrumbs-prefix', array(
|
||||
'label' => __( 'Prefix for breadcrumbs:', 'wordpress-seo' ),
|
||||
'type' => 'text',
|
||||
'section' => 'wpseo_breadcrumbs_customizer_section',
|
||||
'settings' => 'wpseo_internallinks[breadcrumbs-prefix]',
|
||||
'context' => '',
|
||||
)
|
||||
)
|
||||
);
|
||||
}
|
||||
|
||||
/**
|
||||
* Adds the breadcrumbs archive prefix text field
|
||||
*/
|
||||
private function breadcrumbs_archiveprefix_setting() {
|
||||
$this->wp_customize->add_setting(
|
||||
'wpseo_internallinks[breadcrumbs-archiveprefix]', array(
|
||||
'default' => '',
|
||||
'type' => 'option',
|
||||
'transport' => 'refresh',
|
||||
)
|
||||
);
|
||||
|
||||
$this->wp_customize->add_control(
|
||||
new WP_Customize_Control(
|
||||
$this->wp_customize, 'wpseo-breadcrumbs-archiveprefix', array(
|
||||
'label' => __( 'Prefix for archive pages:', 'wordpress-seo' ),
|
||||
'type' => 'text',
|
||||
'section' => 'wpseo_breadcrumbs_customizer_section',
|
||||
'settings' => 'wpseo_internallinks[breadcrumbs-archiveprefix]',
|
||||
'context' => '',
|
||||
)
|
||||
)
|
||||
);
|
||||
}
|
||||
|
||||
/**
|
||||
* Adds the breadcrumbs search prefix text field
|
||||
*/
|
||||
private function breadcrumbs_searchprefix_setting() {
|
||||
$this->wp_customize->add_setting(
|
||||
'wpseo_internallinks[breadcrumbs-searchprefix]', array(
|
||||
'default' => '',
|
||||
'type' => 'option',
|
||||
'transport' => 'refresh',
|
||||
)
|
||||
);
|
||||
|
||||
$this->wp_customize->add_control(
|
||||
new WP_Customize_Control(
|
||||
$this->wp_customize, 'wpseo-breadcrumbs-searchprefix', array(
|
||||
'label' => __( 'Prefix for search result pages:', 'wordpress-seo' ),
|
||||
'type' => 'text',
|
||||
'section' => 'wpseo_breadcrumbs_customizer_section',
|
||||
'settings' => 'wpseo_internallinks[breadcrumbs-searchprefix]',
|
||||
'context' => '',
|
||||
)
|
||||
)
|
||||
);
|
||||
}
|
||||
|
||||
/**
|
||||
* Adds the breadcrumb 404 prefix text field
|
||||
*/
|
||||
private function breadcrumbs_404_setting() {
|
||||
$this->wp_customize->add_setting(
|
||||
'wpseo_internallinks[breadcrumbs-404crumb]', array(
|
||||
'default' => '',
|
||||
'type' => 'option',
|
||||
'transport' => 'refresh',
|
||||
)
|
||||
);
|
||||
|
||||
$this->wp_customize->add_control(
|
||||
new WP_Customize_Control(
|
||||
$this->wp_customize, 'wpseo-breadcrumbs-404crumb', array(
|
||||
'label' => __( 'Breadcrumb for 404 pages:', 'wordpress-seo' ),
|
||||
'type' => 'text',
|
||||
'section' => 'wpseo_breadcrumbs_customizer_section',
|
||||
'settings' => 'wpseo_internallinks[breadcrumbs-404crumb]',
|
||||
'context' => '',
|
||||
)
|
||||
)
|
||||
);
|
||||
}
|
||||
}
|
||||
@@ -4,7 +4,7 @@
|
||||
*/
|
||||
|
||||
/**
|
||||
* class WPSEO_Export
|
||||
* Class WPSEO_Export
|
||||
*
|
||||
* Class with functionality to export the WP SEO settings
|
||||
*/
|
||||
@@ -67,7 +67,8 @@ class WPSEO_Export {
|
||||
}
|
||||
else {
|
||||
$results['status'] = 'failure';
|
||||
$results['msg'] = __( 'Error creating WordPress SEO export: ', 'wordpress-seo' ) . $this->error;
|
||||
/* translators: %1$s expands to Yoast SEO */
|
||||
$results['msg'] = sprintf( __( 'Error creating %1$s export: ', 'wordpress-seo' ), 'Yoast SEO' ) . $this->error;
|
||||
}
|
||||
|
||||
return $results;
|
||||
@@ -107,7 +108,8 @@ class WPSEO_Export {
|
||||
* Writes the header of the export file.
|
||||
*/
|
||||
private function export_header() {
|
||||
$this->write_line( '; ' . __( 'This is a settings export file for the WordPress SEO plugin by Yoast.com', 'wordpress-seo' ) . ' - https://yoast.com/wordpress/plugins/seo/' );
|
||||
/* translators: %1$s expands to Yoast SEO */
|
||||
$this->write_line( '; ' . sprintf( __( 'This is a settings export file for the %1$s plugin by Yoast.com', 'wordpress-seo' ), 'Yoast SEO' ) . ' - https://yoast.com/wordpress/plugins/seo/' );
|
||||
if ( $this->include_taxonomy ) {
|
||||
$this->write_line( '; ' . __( 'This export includes taxonomy metadata', 'wordpress-seo' ) );
|
||||
}
|
||||
@@ -219,4 +221,4 @@ class WPSEO_Export {
|
||||
return true;
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
@@ -4,9 +4,9 @@
|
||||
*/
|
||||
|
||||
/**
|
||||
* class WPSEO_Import_WooThemes_SEO
|
||||
* Class WPSEO_Import_WooThemes_SEO
|
||||
*
|
||||
* Class with functionality to import WP SEO settings from WooThemes SEO
|
||||
* Class with functionality to import Yoast SEO settings from WooThemes SEO
|
||||
*/
|
||||
class WPSEO_Import_AIOSEO extends WPSEO_Import_External {
|
||||
|
||||
@@ -48,7 +48,7 @@ class WPSEO_Import_AIOSEO extends WPSEO_Import_External {
|
||||
update_option( 'yst_ga', $this->determine_ga_settings() );
|
||||
}
|
||||
|
||||
$plugin_install_nonce = wp_create_nonce( 'install-plugin_google-analytics-for-wordpress' ); // Use the old name because that's the WordPress.org repo
|
||||
$plugin_install_nonce = wp_create_nonce( 'install-plugin_google-analytics-for-wordpress' ); // Use the old name because that's the WordPress.org repo.
|
||||
|
||||
$this->set_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?',
|
||||
@@ -95,4 +95,4 @@ class WPSEO_Import_AIOSEO extends WPSEO_Import_External {
|
||||
),
|
||||
);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -4,9 +4,9 @@
|
||||
*/
|
||||
|
||||
/**
|
||||
* class WPSEO_Import_External
|
||||
* Class WPSEO_Import_External
|
||||
*
|
||||
* Class with functionality to import WP SEO settings from other plugins
|
||||
* Class with functionality to import Yoast SEO settings from other plugins
|
||||
*/
|
||||
class WPSEO_Import_External {
|
||||
|
||||
@@ -67,12 +67,16 @@ class WPSEO_Import_External {
|
||||
WPSEO_Meta::replace_meta( '_headspace_description', WPSEO_Meta::$meta_prefix . 'metadesc', $this->replace );
|
||||
WPSEO_Meta::replace_meta( '_headspace_keywords', WPSEO_Meta::$meta_prefix . 'metakeywords', $this->replace );
|
||||
WPSEO_Meta::replace_meta( '_headspace_page_title', WPSEO_Meta::$meta_prefix . 'title', $this->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) */
|
||||
|
||||
/**
|
||||
* @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)
|
||||
*/
|
||||
WPSEO_Meta::replace_meta( '_headspace_noindex', WPSEO_Meta::$meta_prefix . 'meta-robots-noindex', $this->replace );
|
||||
WPSEO_Meta::replace_meta( '_headspace_nofollow', WPSEO_Meta::$meta_prefix . 'meta-robots-nofollow', $this->replace );
|
||||
|
||||
/* @todo - [JRF => whomever] check if this can be done more efficiently by querying only the meta table
|
||||
/*
|
||||
* @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
|
||||
*/
|
||||
$posts = $wpdb->get_results( "SELECT ID FROM $wpdb->posts" );
|
||||
@@ -119,7 +123,7 @@ class WPSEO_Import_External {
|
||||
}
|
||||
if ( is_array( $posts ) && $posts !== array() ) {
|
||||
foreach ( $posts as $post ) {
|
||||
// sync all possible settings
|
||||
// Sync all possible settings.
|
||||
if ( $post->robotsmeta ) {
|
||||
$pieces = explode( ',', $post->robotsmeta );
|
||||
foreach ( $pieces as $meta ) {
|
||||
@@ -188,4 +192,4 @@ class WPSEO_Import_External {
|
||||
$this->set_msg( __( 'Yoast Breadcrumbs options could not be found', 'wordpress-seo' ) );
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -4,9 +4,9 @@
|
||||
*/
|
||||
|
||||
/**
|
||||
* class WPSEO_Import_WooThemes_SEO
|
||||
* Class WPSEO_Import_WooThemes_SEO
|
||||
*
|
||||
* Class with functionality to import WP SEO settings from WooThemes SEO
|
||||
* Class with functionality to import Yoast SEO settings from WooThemes SEO
|
||||
*/
|
||||
class WPSEO_Import_WooThemes_SEO extends WPSEO_Import_External {
|
||||
|
||||
@@ -91,7 +91,7 @@ class WPSEO_Import_WooThemes_SEO extends WPSEO_Import_External {
|
||||
* @param string $key
|
||||
*/
|
||||
private function import_custom_values( $option, $key ) {
|
||||
// Import the custom homepage description
|
||||
// Import the custom homepage description.
|
||||
if ( 'c' == get_option( $option ) ) {
|
||||
$this->options[ $key ] = get_option( $option . '_custom' );
|
||||
}
|
||||
@@ -124,17 +124,17 @@ class WPSEO_Import_WooThemes_SEO extends WPSEO_Import_External {
|
||||
WPSEO_Meta::replace_meta( 'seo_follow', WPSEO_Meta::$meta_prefix . 'meta-robots-nofollow', $this->replace );
|
||||
WPSEO_Meta::replace_meta( 'seo_noindex', WPSEO_Meta::$meta_prefix . 'meta-robots-noindex', $this->replace );
|
||||
|
||||
// If WooSEO is set to use the Woo titles, import those
|
||||
// If WooSEO is set to use the Woo titles, import those.
|
||||
if ( 'true' == get_option( 'seo_woo_wp_title' ) ) {
|
||||
WPSEO_Meta::replace_meta( 'seo_title', WPSEO_Meta::$meta_prefix . 'title', $this->replace );
|
||||
}
|
||||
|
||||
// If WooSEO is set to use the Woo meta descriptions, import those
|
||||
// If WooSEO is set to use the Woo meta descriptions, import those.
|
||||
if ( 'b' == get_option( 'seo_woo_meta_single_desc' ) ) {
|
||||
WPSEO_Meta::replace_meta( 'seo_description', WPSEO_Meta::$meta_prefix . 'metadesc', $this->replace );
|
||||
}
|
||||
|
||||
// If WooSEO is set to use the Woo meta keywords, import those
|
||||
// If WooSEO is set to use the Woo meta keywords, import those.
|
||||
if ( 'b' == get_option( 'seo_woo_meta_single_key' ) ) {
|
||||
WPSEO_Meta::replace_meta( 'seo_keywords', WPSEO_Meta::$meta_prefix . 'metakeywords', $this->replace );
|
||||
}
|
||||
@@ -143,4 +143,4 @@ class WPSEO_Import_WooThemes_SEO extends WPSEO_Import_External {
|
||||
$this->perhaps_delete( $option );
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -4,9 +4,9 @@
|
||||
*/
|
||||
|
||||
/**
|
||||
* class WPSEO_Import
|
||||
* Class WPSEO_Import
|
||||
*
|
||||
* Class with functionality to import the WP SEO settings
|
||||
* Class with functionality to import the Yoast SEO settings
|
||||
*/
|
||||
class WPSEO_Import {
|
||||
|
||||
@@ -69,13 +69,22 @@ class WPSEO_Import {
|
||||
* @return boolean
|
||||
*/
|
||||
private function handle_upload() {
|
||||
$this->file = wp_handle_upload( $_FILES['settings_import_file'] );
|
||||
$overrides = array( 'mimes' => array( 'zip' => 'application/zip' ) ); // Explicitly allow zip in multisite.
|
||||
$this->file = wp_handle_upload( $_FILES['settings_import_file'], $overrides );
|
||||
|
||||
if ( is_wp_error( $this->file ) ) {
|
||||
$this->msg = __( 'Settings could not be imported:', 'wordpress-seo' ) . ' ' . $this->file->get_error_message();
|
||||
|
||||
return false;
|
||||
}
|
||||
elseif ( ! isset( $this->file['file'] ) ) {
|
||||
|
||||
if ( is_array( $this->file ) && isset( $this->file['error'] ) ) {
|
||||
$this->msg = __( 'Settings could not be imported:', 'wordpress-seo' ) . ' ' . $this->file['error'];
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
if ( ! isset( $this->file['file'] ) ) {
|
||||
$this->msg = __( 'Settings could not be imported:', 'wordpress-seo' ) . ' ' . __( 'Upload failed.', 'wordpress-seo' );
|
||||
|
||||
return false;
|
||||
@@ -155,7 +164,7 @@ class WPSEO_Import {
|
||||
$opt_group = json_decode( urldecode( $opt_group['wpseo_taxonomy_meta'] ), true );
|
||||
}
|
||||
|
||||
// Make sure that the imported options are cleaned/converted on import
|
||||
// Make sure that the imported options are cleaned/converted on import.
|
||||
$option_instance = WPSEO_Options::get_option_instance( $name );
|
||||
if ( is_object( $option_instance ) && method_exists( $option_instance, 'import' ) ) {
|
||||
$option_instance->import( $opt_group, $this->old_wpseo_version, $options );
|
||||
@@ -180,4 +189,4 @@ class WPSEO_Import {
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
@@ -31,7 +31,6 @@ class WPSEO_Metabox extends WPSEO_Meta {
|
||||
*
|
||||
* IMPORTANT: if you want to add a new string (option) somewhere, make sure you add that array key to
|
||||
* the main meta box definition array in the class WPSEO_Meta() as well!!!!
|
||||
*
|
||||
*/
|
||||
public static function translate_meta_boxes() {
|
||||
self::$meta_fields['general']['snippetpreview']['title'] = __( 'Snippet Preview', 'wordpress-seo' );
|
||||
@@ -77,21 +76,6 @@ class WPSEO_Metabox extends WPSEO_Meta {
|
||||
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' );
|
||||
self::$meta_fields['advanced']['sitemap-include']['description'] = __( 'Should this page be in the XML Sitemap at all times, regardless of Robots Meta settings?', 'wordpress-seo' );
|
||||
self::$meta_fields['advanced']['sitemap-include']['options']['-'] = __( 'Auto detect', 'wordpress-seo' );
|
||||
self::$meta_fields['advanced']['sitemap-include']['options']['always'] = __( 'Always include', 'wordpress-seo' );
|
||||
self::$meta_fields['advanced']['sitemap-include']['options']['never'] = __( 'Never include', 'wordpress-seo' );
|
||||
|
||||
self::$meta_fields['advanced']['sitemap-prio']['title'] = __( 'Sitemap Priority', 'wordpress-seo' );
|
||||
self::$meta_fields['advanced']['sitemap-prio']['description'] = __( 'The priority given to this page in the XML sitemap.', 'wordpress-seo' );
|
||||
self::$meta_fields['advanced']['sitemap-prio']['options']['-'] = __( 'Automatic prioritization', 'wordpress-seo' );
|
||||
self::$meta_fields['advanced']['sitemap-prio']['options']['1'] = __( '1 - Highest priority', 'wordpress-seo' );
|
||||
self::$meta_fields['advanced']['sitemap-prio']['options']['0.8'] .= __( 'Default for first tier pages', 'wordpress-seo' );
|
||||
self::$meta_fields['advanced']['sitemap-prio']['options']['0.6'] .= __( 'Default for second tier pages and posts', 'wordpress-seo' );
|
||||
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']['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>' );
|
||||
|
||||
@@ -107,7 +91,7 @@ class WPSEO_Metabox extends WPSEO_Meta {
|
||||
*
|
||||
* @since 1.5.0
|
||||
*
|
||||
* @param string $post_type (optional) The post type to test, defaults to the current post post_type
|
||||
* @param string $post_type (optional) The post type to test, defaults to the current post post_type.
|
||||
*
|
||||
* @return bool Whether or not the meta box (and associated columns etc) should be hidden
|
||||
*/
|
||||
@@ -122,7 +106,7 @@ class WPSEO_Metabox extends WPSEO_Meta {
|
||||
}
|
||||
|
||||
if ( isset( $post_type ) ) {
|
||||
// Don't make static as post_types may still be added during the run
|
||||
// Don't make static as post_types may still be added during the run.
|
||||
$cpts = get_post_types( array( 'public' => true ), 'names' );
|
||||
$options = get_option( 'wpseo_titles' );
|
||||
|
||||
@@ -152,6 +136,14 @@ class WPSEO_Metabox extends WPSEO_Meta {
|
||||
$this,
|
||||
'column_sort',
|
||||
), 10, 2 );
|
||||
|
||||
/*
|
||||
* Use the `get_user_option_{$option}` filter to change the output of the get_user_option
|
||||
* function for the `manage{$screen}columnshidden` option, which is based on the current
|
||||
* admin screen. The admin screen we want to target is the `edit-{$post_type}` screen.
|
||||
*/
|
||||
$filter = sprintf( 'get_user_option_%s', sprintf( 'manage%scolumnshidden', 'edit-' . $pt ) );
|
||||
add_filter( $filter, array( $this, 'column_hidden' ), 10, 3 );
|
||||
}
|
||||
}
|
||||
unset( $pt );
|
||||
@@ -198,13 +190,13 @@ class WPSEO_Metabox extends WPSEO_Meta {
|
||||
*
|
||||
* This should work with Greek, Russian, Polish & French amongst other languages...
|
||||
*
|
||||
* @param string $string String to lowercase
|
||||
* @param string $string String to lowercase.
|
||||
*
|
||||
* @return string
|
||||
*/
|
||||
public function strtolower_utf8( $string ) {
|
||||
|
||||
// Prevent comparison between utf8 characters and html entities (é vs é)
|
||||
// Prevent comparison between utf8 characters and html entities (é vs é).
|
||||
$string = html_entity_decode( $string );
|
||||
|
||||
$convert_to = array(
|
||||
@@ -411,7 +403,6 @@ class WPSEO_Metabox extends WPSEO_Meta {
|
||||
|
||||
/**
|
||||
* Outputs the page analysis score in the Publish Box.
|
||||
*
|
||||
*/
|
||||
public function publish_box() {
|
||||
if ( $this->is_metabox_hidden() === true ) {
|
||||
@@ -464,7 +455,7 @@ class WPSEO_Metabox extends WPSEO_Meta {
|
||||
}
|
||||
|
||||
/**
|
||||
* Adds the WordPress SEO meta box to the edit boxes in the edit post / page / cpt pages.
|
||||
* Adds the Yoast SEO meta box to the edit boxes in the edit post / page / cpt pages.
|
||||
*/
|
||||
public function add_meta_box() {
|
||||
$post_types = get_post_types( array( 'public' => true ) );
|
||||
@@ -472,7 +463,7 @@ class WPSEO_Metabox extends WPSEO_Meta {
|
||||
if ( is_array( $post_types ) && $post_types !== array() ) {
|
||||
foreach ( $post_types as $post_type ) {
|
||||
if ( $this->is_metabox_hidden( $post_type ) === false ) {
|
||||
add_meta_box( 'wpseo_meta', __( 'WordPress SEO by Yoast', 'wordpress-seo' ), array(
|
||||
add_meta_box( 'wpseo_meta', 'Yoast SEO', array(
|
||||
$this,
|
||||
'meta_box',
|
||||
), $post_type, 'normal', apply_filters( 'wpseo_metabox_prio', 'high' ) );
|
||||
@@ -566,7 +557,7 @@ class WPSEO_Metabox extends WPSEO_Meta {
|
||||
}
|
||||
|
||||
/**
|
||||
* Output a tab in the WP SEO Metabox
|
||||
* Output a tab in the Yoast SEO Metabox
|
||||
*
|
||||
* @param string $id CSS ID of the tab.
|
||||
* @param string $heading Heading for the tab.
|
||||
@@ -637,7 +628,7 @@ class WPSEO_Metabox extends WPSEO_Meta {
|
||||
* @todo [JRF] check if $class is added appropriately everywhere
|
||||
*
|
||||
* @param array $meta_field_def Contains the vars based on which output is generated.
|
||||
* @param string $key Internal key (without prefix)
|
||||
* @param string $key Internal key (without prefix).
|
||||
*
|
||||
* @return string
|
||||
*/
|
||||
@@ -696,10 +687,10 @@ class WPSEO_Metabox extends WPSEO_Meta {
|
||||
case 'multiselect':
|
||||
if ( isset( $meta_field_def['options'] ) && is_array( $meta_field_def['options'] ) && $meta_field_def['options'] !== array() ) {
|
||||
|
||||
// Set $meta_value as $selected_arr
|
||||
// Set $meta_value as $selected_arr.
|
||||
$selected_arr = $meta_value;
|
||||
|
||||
// If the multiselect field is 'meta-robots-adv' we should explode on ,
|
||||
// If the multiselect field is 'meta-robots-adv' we should explode on ,.
|
||||
if ( 'meta-robots-adv' === $key ) {
|
||||
$selected_arr = explode( ',', $meta_value );
|
||||
}
|
||||
@@ -710,7 +701,7 @@ class WPSEO_Metabox extends WPSEO_Meta {
|
||||
|
||||
$options_count = count( $meta_field_def['options'] );
|
||||
|
||||
// @todo [JRF => whomever] verify height calculation for older WP versions, was 16x, for WP3.8 20x is more appropriate
|
||||
// @todo [JRF => whomever] verify height calculation for older WP versions, was 16x, for WP3.8 20x is more appropriate.
|
||||
$content .= '<select multiple="multiple" size="' . esc_attr( $options_count ) . '" style="height: ' . esc_attr( ( $options_count * 20 ) + 4 ) . 'px;" name="' . $esc_form_key . '[]" id="' . $esc_form_key . '" class="yoast' . $class . '">';
|
||||
foreach ( $meta_field_def['options'] as $val => $option ) {
|
||||
$selected = '';
|
||||
@@ -742,7 +733,7 @@ class WPSEO_Metabox extends WPSEO_Meta {
|
||||
break;
|
||||
|
||||
case 'upload':
|
||||
$content .= '<input id="' . $esc_form_key . '" type="text" size="36" name="' . $esc_form_key . '" value="' . esc_attr( $meta_value ) . '" />';
|
||||
$content .= '<input id="' . $esc_form_key . '" type="text" size="36" class="' . $class . '" name="' . $esc_form_key . '" value="' . esc_attr( $meta_value ) . '" />';
|
||||
$content .= '<input id="' . $esc_form_key . '_button" class="wpseo_image_upload_button button" type="button" value="Upload Image" />';
|
||||
break;
|
||||
}
|
||||
@@ -823,7 +814,7 @@ class WPSEO_Metabox extends WPSEO_Meta {
|
||||
}
|
||||
|
||||
/**
|
||||
* Save the WP SEO metadata for posts.
|
||||
* Save the Yoast SEO metadata for posts.
|
||||
*
|
||||
* @internal $_POST parameters are validated via sanitize_post_meta()
|
||||
*
|
||||
@@ -844,7 +835,7 @@ class WPSEO_Metabox extends WPSEO_Meta {
|
||||
$post = get_post( $post_id );
|
||||
|
||||
if ( ! is_object( $post ) ) {
|
||||
// non-existent post
|
||||
// Non-existent post.
|
||||
return false;
|
||||
}
|
||||
|
||||
@@ -899,21 +890,19 @@ class WPSEO_Metabox extends WPSEO_Meta {
|
||||
}
|
||||
else {
|
||||
if ( 0 != get_queried_object_id() ) {
|
||||
wp_enqueue_media( array( 'post' => get_queried_object_id() ) ); // enqueue files needed for upload functionality
|
||||
wp_enqueue_media( array( 'post' => get_queried_object_id() ) ); // Enqueue files needed for upload functionality.
|
||||
}
|
||||
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( 'featured-image', plugins_url( 'css/featured-image' . 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' . WPSEO_CSSJS_SUFFIX . '.js', WPSEO_FILE ), array( 'jquery' ), '2.2.1', true );
|
||||
// Always enqueue minified as it's not our code.
|
||||
wp_enqueue_script( 'jquery-qtip', plugins_url( 'js/jquery.qtip.min.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 );
|
||||
|
||||
if ( post_type_supports( get_post_type(), 'thumbnail' ) ) {
|
||||
@@ -927,7 +916,7 @@ class WPSEO_Metabox extends WPSEO_Meta {
|
||||
|
||||
wp_localize_script( 'wpseo-admin-media', 'wpseoMediaL10n', $this->localize_media_script() );
|
||||
|
||||
// Text strings to pass to metabox for keyword analysis
|
||||
// Text strings to pass to metabox for keyword analysis.
|
||||
wp_localize_script( 'wp-seo-metabox', 'wpseoMetaboxL10n', $this->localize_script() );
|
||||
}
|
||||
}
|
||||
@@ -959,7 +948,7 @@ class WPSEO_Metabox extends WPSEO_Meta {
|
||||
'poor' => __( 'SEO: Poor', 'wordpress-seo' ),
|
||||
'ok' => __( 'SEO: OK', 'wordpress-seo' ),
|
||||
'good' => __( 'SEO: Good', 'wordpress-seo' ),
|
||||
'noindex' => __( 'SEO: Post Noindexed', 'wordpress-seo' )
|
||||
'noindex' => __( 'SEO: Post Noindexed', 'wordpress-seo' ),
|
||||
);
|
||||
|
||||
echo '
|
||||
@@ -993,7 +982,7 @@ class WPSEO_Metabox extends WPSEO_Meta {
|
||||
'wpseo-score' => __( 'SEO', 'wordpress-seo' ),
|
||||
'wpseo-title' => __( 'SEO Title', 'wordpress-seo' ),
|
||||
'wpseo-metadesc' => __( 'Meta Desc.', 'wordpress-seo' ),
|
||||
'wpseo-focuskw' => __( 'Focus KW', 'wordpress-seo' )
|
||||
'wpseo-focuskw' => __( 'Focus KW', 'wordpress-seo' ),
|
||||
) );
|
||||
}
|
||||
|
||||
@@ -1111,8 +1100,9 @@ class WPSEO_Metabox extends WPSEO_Meta {
|
||||
break;
|
||||
}
|
||||
if ( $low !== false ) {
|
||||
/* @internal DON'T touch the order of these without double-checking/adjusting
|
||||
* the seo_score_posts_where() method below! */
|
||||
/**
|
||||
* @internal DON'T touch the order of these without double-checking/adjusting the seo_score_posts_where() method below!
|
||||
*/
|
||||
$vars = array_merge(
|
||||
$vars,
|
||||
array(
|
||||
@@ -1134,7 +1124,7 @@ class WPSEO_Metabox extends WPSEO_Meta {
|
||||
'value' => '1',
|
||||
'compare' => '!=',
|
||||
),
|
||||
)
|
||||
),
|
||||
)
|
||||
);
|
||||
|
||||
@@ -1152,7 +1142,7 @@ class WPSEO_Metabox extends WPSEO_Meta {
|
||||
'value' => 'needs-a-value-anyway',
|
||||
'compare' => 'NOT EXISTS',
|
||||
)
|
||||
)
|
||||
),
|
||||
)
|
||||
);
|
||||
|
||||
@@ -1167,7 +1157,7 @@ class WPSEO_Metabox extends WPSEO_Meta {
|
||||
'value' => '1',
|
||||
'compare' => '=',
|
||||
),
|
||||
)
|
||||
),
|
||||
)
|
||||
);
|
||||
}
|
||||
@@ -1209,6 +1199,31 @@ class WPSEO_Metabox extends WPSEO_Meta {
|
||||
return $vars;
|
||||
}
|
||||
|
||||
/**
|
||||
* Hide the SEO Title, Meta Desc and Focus KW columns if the user hasn't chosen which columns to hide
|
||||
*
|
||||
* @param array|false $result
|
||||
* @param string $option
|
||||
* @param WP_User $user
|
||||
*
|
||||
* @return array|false $result
|
||||
*/
|
||||
public function column_hidden( $result, $option, $user ) {
|
||||
global $wpdb;
|
||||
|
||||
$prefix = $wpdb->get_blog_prefix();
|
||||
if ( ! $user->has_prop( $prefix . $option ) && ! $user->has_prop( $option ) ) {
|
||||
|
||||
if ( ! is_array( $result ) ) {
|
||||
$result = array();
|
||||
}
|
||||
|
||||
array_push( $result, 'wpseo-title', 'wpseo-metadesc', 'wpseo-focuskw' );
|
||||
}
|
||||
|
||||
return $result;
|
||||
}
|
||||
|
||||
/**
|
||||
* Hacky way to get round the limitation that you can only have AND *or* OR relationship between
|
||||
* meta key clauses and not a combination - which is what we need.
|
||||
@@ -1301,7 +1316,7 @@ class WPSEO_Metabox extends WPSEO_Meta {
|
||||
|
||||
$output = '<table class="wpseoanalysis">';
|
||||
$perc_score = absint( $results['total'] );
|
||||
unset( $results['total'] ); // unset to prevent echoing it.
|
||||
unset( $results['total'] ); // Unset to prevent echoing it.
|
||||
|
||||
foreach ( $results as $result ) {
|
||||
if ( is_array( $result ) ) {
|
||||
@@ -1384,11 +1399,11 @@ class WPSEO_Metabox extends WPSEO_Meta {
|
||||
*
|
||||
* @api string $post_content The post content
|
||||
*
|
||||
* @param object $post The post
|
||||
* @param object $post The post.
|
||||
*/
|
||||
$post_content = apply_filters( 'wpseo_pre_analysis_post_content', $post->post_content, $post );
|
||||
|
||||
// Check if the post content is not empty
|
||||
// Check if the post content is not empty.
|
||||
if ( ! empty( $post_content ) ) {
|
||||
@$dom->loadHTML( $post_content );
|
||||
}
|
||||
@@ -1400,10 +1415,10 @@ class WPSEO_Metabox extends WPSEO_Meta {
|
||||
// Check if this focus keyword has been used already.
|
||||
$this->check_double_focus_keyword( $job, $results );
|
||||
|
||||
// Keyword
|
||||
// Keyword.
|
||||
$this->score_keyword( $job['keyword'], $results );
|
||||
|
||||
// Title
|
||||
// Title.
|
||||
$title = self::get_value( 'title', $post->ID );
|
||||
if ( $title !== '' ) {
|
||||
$job['title'] = $title;
|
||||
@@ -1420,7 +1435,7 @@ class WPSEO_Metabox extends WPSEO_Meta {
|
||||
unset( $title );
|
||||
$this->score_title( $job, $results );
|
||||
|
||||
// Meta description
|
||||
// Meta description.
|
||||
$description = '';
|
||||
$desc_meta = self::get_value( 'metadesc', $post->ID );
|
||||
if ( $desc_meta !== '' ) {
|
||||
@@ -1436,26 +1451,26 @@ class WPSEO_Metabox extends WPSEO_Meta {
|
||||
$this->score_description( $job, $results, $description, self::$meta_length );
|
||||
unset( $description );
|
||||
|
||||
// Body
|
||||
// Body.
|
||||
$body = $this->get_body( $post );
|
||||
$firstp = $this->get_first_paragraph( $body );
|
||||
$this->score_body( $job, $results, $body, $firstp );
|
||||
unset( $firstp );
|
||||
|
||||
// URL
|
||||
// URL.
|
||||
$this->score_url( $job, $results );
|
||||
|
||||
// Headings
|
||||
// Headings.
|
||||
$headings = $this->get_headings( $body );
|
||||
$this->score_headings( $job, $results, $headings );
|
||||
unset( $headings );
|
||||
|
||||
// Images
|
||||
// Images.
|
||||
$imgs = array();
|
||||
$imgs['count'] = substr_count( $body, '<img' );
|
||||
$imgs = $this->get_images_alt_text( $post->ID, $body, $imgs );
|
||||
|
||||
// Check featured image
|
||||
// Check featured image.
|
||||
if ( function_exists( 'has_post_thumbnail' ) && has_post_thumbnail() ) {
|
||||
$imgs['count'] += 1;
|
||||
|
||||
@@ -1470,7 +1485,7 @@ class WPSEO_Metabox extends WPSEO_Meta {
|
||||
unset( $imgs );
|
||||
unset( $body );
|
||||
|
||||
// Anchors
|
||||
// Anchors.
|
||||
$anchors = $this->get_anchor_texts( $xpath );
|
||||
$count = $this->get_anchor_count( $xpath );
|
||||
|
||||
@@ -1513,7 +1528,7 @@ class WPSEO_Metabox extends WPSEO_Meta {
|
||||
*/
|
||||
function get_sample_permalink( $post ) {
|
||||
if ( ! function_exists( 'get_sample_permalink' ) ) {
|
||||
// Front-end post update
|
||||
// Front-end post update.
|
||||
include_once( ABSPATH . 'wp-admin/includes/post.php' );
|
||||
}
|
||||
|
||||
@@ -1551,18 +1566,18 @@ class WPSEO_Metabox extends WPSEO_Meta {
|
||||
$keywordCharactersRemovedOrReplaced = array( '_', '-' );
|
||||
$keywordWordsRemoved = array( ' a ', ' in ', ' an ', ' on ', ' for ', ' the ', ' and ' );
|
||||
|
||||
// lower
|
||||
// Lower.
|
||||
$inputString = $this->strtolower_utf8( $inputString );
|
||||
|
||||
// default characters replaced by space
|
||||
// Default characters replaced by space.
|
||||
$inputString = str_replace( $keywordCharactersAlwaysReplacedBySpace, ' ', $inputString );
|
||||
|
||||
// standardise whitespace
|
||||
// Standardise whitespace.
|
||||
$inputString = WPSEO_Utils::standardize_whitespace( $inputString );
|
||||
|
||||
// deal with the separators that can be either removed or replaced by space
|
||||
// Deal with the separators that can be either removed or replaced by space.
|
||||
if ( $removeOptionalCharacters ) {
|
||||
// remove word separators with a space
|
||||
// Remove word separators with a space.
|
||||
$inputString = str_replace( $keywordWordsRemoved, ' ', $inputString );
|
||||
|
||||
$inputString = str_replace( $keywordCharactersRemovedOrReplaced, '', $inputString );
|
||||
@@ -1571,7 +1586,7 @@ class WPSEO_Metabox extends WPSEO_Meta {
|
||||
$inputString = str_replace( $keywordCharactersRemovedOrReplaced, ' ', $inputString );
|
||||
}
|
||||
|
||||
// standardise whitespace again
|
||||
// Standardise whitespace again.
|
||||
$inputString = WPSEO_Utils::standardize_whitespace( $inputString );
|
||||
|
||||
return trim( $inputString );
|
||||
@@ -1605,7 +1620,16 @@ class WPSEO_Metabox extends WPSEO_Meta {
|
||||
), admin_url( 'post.php' ) ) ) . '">', '</a>' ), 'keyword_overused' );
|
||||
}
|
||||
else {
|
||||
$this->save_score_result( $results, 1, sprintf( __( 'You\'ve used this focus keyword %3$s%4$d times before%2$s, it\'s probably a good idea to read %1$sthis post on cornerstone content%2$s and improve your keyword strategy.', 'wordpress-seo' ), '<a href="https://yoast.com/cornerstone-content-rank/">', '</a>', '<a href="' . esc_url( add_query_arg( array( 'seo_kw_filter' => $job['keyword'] ), admin_url( 'edit.php' ) ) ) . '">', count( $posts ) ), 'keyword_overused' );
|
||||
$keyword = str_replace( ' ', '%20', $job['keyword'] );
|
||||
$url = add_query_arg( array( 'seo_kw_filter' => $keyword ), admin_url( 'edit.php' ) );
|
||||
$message = sprintf(
|
||||
__( 'You\'ve used this focus keyword %3$s%4$d times before%2$s, it\'s probably a good idea to read %1$sthis post on cornerstone content%2$s and improve your keyword strategy.', 'wordpress-seo' ),
|
||||
'<a href="https://yoast.com/cornerstone-content-rank/">',
|
||||
'</a>',
|
||||
'<a href="' . esc_url( $url ) . '">',
|
||||
count( $posts )
|
||||
);
|
||||
$this->save_score_result( $results, 1, $message, 'keyword_overused' );
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1648,12 +1672,12 @@ class WPSEO_Metabox extends WPSEO_Meta {
|
||||
$this->save_score_result( $results, 6, $urlMedium, 'url_keyword' );
|
||||
}
|
||||
|
||||
// Check for Stop Words in the slug
|
||||
// Check for Stop Words in the slug.
|
||||
if ( $GLOBALS['wpseo_admin']->stopwords_check( $job['pageSlug'], true ) !== false ) {
|
||||
$this->save_score_result( $results, 5, $urlStopWords, 'url_stopword' );
|
||||
}
|
||||
|
||||
// Check if the slug isn't too long relative to the length of the keyword
|
||||
// Check if the slug isn't too long relative to the length of the keyword.
|
||||
if ( ( $this->statistics()->text_length( $job['keyword'] ) + 20 ) < $this->statistics()->text_length( $job['pageSlug'] ) && 40 < $this->statistics()->text_length( $job['pageSlug'] ) ) {
|
||||
$this->save_score_result( $results, 5, $longSlug, 'url_length' );
|
||||
}
|
||||
@@ -1695,7 +1719,7 @@ class WPSEO_Metabox extends WPSEO_Meta {
|
||||
$this->save_score_result( $results, 9, $scoreTitleCorrectLength, 'title_length' );
|
||||
}
|
||||
|
||||
// @todo MA Keyword/Title matching is exact match with separators removed, but should extend to distributed match
|
||||
// @todo MA Keyword/Title matching is exact match with separators removed, but should extend to distributed match.
|
||||
$needle_position = stripos( $job['title'], $job['keyword_folded'] );
|
||||
|
||||
if ( $needle_position === false ) {
|
||||
@@ -2020,7 +2044,7 @@ class WPSEO_Metabox extends WPSEO_Meta {
|
||||
$this->save_score_result( $results, 6, sprintf( $scoreDescriptionTooLong, $maxlength, $metaShorter ), 'description_length' );
|
||||
}
|
||||
|
||||
// @todo MA Keyword/Title matching is exact match with separators removed, but should extend to distributed match
|
||||
// @todo MA Keyword/Title matching is exact match with separators removed, but should extend to distributed match.
|
||||
$haystack1 = $this->strip_separators_and_fold( $description, true );
|
||||
$haystack2 = $this->strip_separators_and_fold( $description, false );
|
||||
if ( strrpos( $haystack1, $job['keyword_folded'] ) === false && strrpos( $haystack2, $job['keyword_folded'] ) === false ) {
|
||||
@@ -2064,11 +2088,11 @@ class WPSEO_Metabox extends WPSEO_Meta {
|
||||
$fleschurl = '<a href="http://en.wikipedia.org/wiki/Flesch-Kincaid_readability_test#Flesch_Reading_Ease">' . __( 'Flesch Reading Ease', 'wordpress-seo' ) . '</a>';
|
||||
$scoreFlesch = __( 'The copy scores %s in the %s test, which is considered %s to read. %s', 'wordpress-seo' );
|
||||
|
||||
// Replace images with their alt tags, then strip all tags
|
||||
// Replace images with their alt tags, then strip all tags.
|
||||
$body = preg_replace( '`<img(?:[^>]+)?alt="([^"]+)"(?:[^>]+)>`', '$1', $body );
|
||||
$body = strip_tags( $body );
|
||||
|
||||
// Copy length check
|
||||
// Copy length check.
|
||||
$wordCount = $this->statistics()->word_count( $body );
|
||||
|
||||
if ( $wordCount < $lengthScore['bad'] ) {
|
||||
@@ -2096,7 +2120,7 @@ class WPSEO_Metabox extends WPSEO_Meta {
|
||||
$this->save_score_result( $results, 0, __( 'Your keyphrase is over 10 words, a keyphrase should be shorter and there can be only one keyphrase.', 'wordpress-seo' ), 'focus_keyword_length' );
|
||||
}
|
||||
else {
|
||||
// Keyword Density check
|
||||
// Keyword Density check.
|
||||
$keywordDensity = 0;
|
||||
if ( $wordCount > 100 ) {
|
||||
$keywordCount = preg_match_all( '`\b' . preg_quote( $job['keyword'], '`' ) . '\b`miu', $body, $matches );
|
||||
@@ -2117,8 +2141,8 @@ class WPSEO_Metabox extends WPSEO_Meta {
|
||||
|
||||
$firstp = $this->strtolower_utf8( $firstp );
|
||||
|
||||
// First Paragraph Test
|
||||
// check without /u modifier as well as /u might break with non UTF-8 chars.
|
||||
// First Paragraph Test.
|
||||
// Check without /u modifier as well as /u might break with non UTF-8 chars.
|
||||
if ( preg_match( '`\b' . preg_quote( $job['keyword'], '`' ) . '\b`miu', $firstp ) || preg_match( '`\b' . preg_quote( $job['keyword'], '`' ) . '\b`mi', $firstp ) || preg_match( '`\b' . preg_quote( $job['keyword_folded'], '`' ) . '\b`miu', $firstp )
|
||||
) {
|
||||
$this->save_score_result( $results, 9, $scoreFirstParagraphHigh, 'keyword_first_paragraph' );
|
||||
@@ -2129,7 +2153,7 @@ class WPSEO_Metabox extends WPSEO_Meta {
|
||||
|
||||
$lang = get_bloginfo( 'language' );
|
||||
if ( substr( $lang, 0, 2 ) == 'en' && $wordCount > 100 ) {
|
||||
// Flesch Reading Ease check
|
||||
// Flesch Reading Ease check.
|
||||
$flesch = $this->statistics()->flesch_kincaid_reading_ease( $body );
|
||||
|
||||
$note = '';
|
||||
@@ -2235,7 +2259,7 @@ class WPSEO_Metabox extends WPSEO_Meta {
|
||||
/********************** DEPRECATED METHODS **********************/
|
||||
|
||||
/**
|
||||
* Adds the WordPress SEO box
|
||||
* Adds the Yoast SEO box
|
||||
*
|
||||
* @deprecated 1.4.24
|
||||
* @deprecated use WPSEO_Metabox::add_meta_box()
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
*/
|
||||
|
||||
/**
|
||||
* This class adds the Social tab to the WP SEO metabox and makes sure the settings are saved.
|
||||
* This class adds the Social tab to the Yoast SEO metabox and makes sure the settings are saved.
|
||||
*/
|
||||
class WPSEO_Social_Admin extends WPSEO_Metabox {
|
||||
|
||||
@@ -26,16 +26,28 @@ class WPSEO_Social_Admin extends WPSEO_Metabox {
|
||||
* the main meta box definition array in the class WPSEO_Meta() as well!!!!
|
||||
*/
|
||||
public static function translate_meta_boxes() {
|
||||
/* translators: %s expands to the social network's name */
|
||||
$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' );
|
||||
/* translators: %s expands to the social network's name */
|
||||
$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' );
|
||||
/* translators: %s expands to the social network's name */
|
||||
$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' );
|
||||
/* translators: %1$s expands to the social network, %2$s to the recommended image size */
|
||||
$image_size_text = __( 'The recommended image size for %1$s is %2$spx.', 'wordpress-seo' );
|
||||
|
||||
$options = WPSEO_Options::get_all();
|
||||
|
||||
$social_networks = array(
|
||||
'opengraph' => __( 'Facebook', 'wordpress-seo' ),
|
||||
'twitter' => __( 'Twitter', 'wordpress-seo' ),
|
||||
'googleplus' => __( 'Google+', 'wordpress-seo' ),
|
||||
'opengraph' => __( 'Facebook', 'wordpress-seo' ),
|
||||
'twitter' => __( 'Twitter', 'wordpress-seo' ),
|
||||
'googleplus' => __( 'Google+', 'wordpress-seo' ),
|
||||
);
|
||||
|
||||
// Source: https://blog.bufferapp.com/ideal-image-sizes-social-media-posts.
|
||||
$recommended_image_sizes = array(
|
||||
'opengraph' => '1200 x 628',
|
||||
'twitter' => '1024 x 512',
|
||||
'google-plus' => '800 x 1200',
|
||||
);
|
||||
|
||||
foreach ( $social_networks as $network => $label ) {
|
||||
@@ -51,7 +63,7 @@ class WPSEO_Social_Admin extends WPSEO_Metabox {
|
||||
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'][ $network . '-image' ]['description'] = sprintf( $image_text, $label ) . ' ' . sprintf( $image_size_text, $label, $recommended_image_sizes[ $network ] );
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -95,10 +107,10 @@ class WPSEO_Social_Admin extends WPSEO_Metabox {
|
||||
*/
|
||||
public function og_data_compare( $post ) {
|
||||
|
||||
// Check if post data is available, if post_id is set and if original post_status is publish
|
||||
// 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' &&
|
||||
isset ( $_POST['original_post_status'] ) && $_POST['original_post_status'] === 'publish'
|
||||
isset( $_POST['original_post_status'] ) && $_POST['original_post_status'] === 'publish'
|
||||
) {
|
||||
|
||||
$fields_to_compare = array(
|
||||
|
||||
@@ -17,82 +17,82 @@ class WPSEO_Plugin_Conflict extends Yoast_Plugin_Conflict {
|
||||
* @var array
|
||||
*/
|
||||
protected $plugins = array(
|
||||
// The plugin which are writing OG metadata
|
||||
// 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
|
||||
// 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
|
||||
// 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 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
|
||||
'opengraph/opengraph.php', // Open Graph
|
||||
// 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.
|
||||
'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
|
||||
// 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
|
||||
// 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
|
||||
// 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)
|
||||
// Google Sitemap (BestWebSoft).
|
||||
'xml-sitemaps/xml-sitemaps.php',
|
||||
// XML Sitemaps (Denis de Bernardy and Mike Koepke)
|
||||
// XML Sitemaps (Denis de Bernardy and Mike Koepke).
|
||||
'bwp-google-xml-sitemaps/bwp-simple-gxs.php',
|
||||
// Better WordPress Google XML Sitemaps (Khang Minh)
|
||||
// Better WordPress Google XML Sitemaps (Khang Minh).
|
||||
'google-sitemap-generator/sitemap.php',
|
||||
// Google XML Sitemaps (Arne Brachhold)
|
||||
// Google XML Sitemaps (Arne Brachhold).
|
||||
'xml-sitemap-feed/xml-sitemap.php',
|
||||
// XML Sitemap & Google News feeds (RavanH)
|
||||
// XML Sitemap & Google News feeds (RavanH).
|
||||
'google-monthly-xml-sitemap/monthly-xml-sitemap.php',
|
||||
// Google Monthly XML Sitemap (Andrea Pernici)
|
||||
// Google Monthly XML Sitemap (Andrea Pernici).
|
||||
'simple-google-sitemap-xml/simple-google-sitemap-xml.php',
|
||||
// Simple Google Sitemap XML (iTx Technologies)
|
||||
// Simple Google Sitemap XML (iTx Technologies).
|
||||
'another-simple-xml-sitemap/another-simple-xml-sitemap.php',
|
||||
// Another Simple XML Sitemap
|
||||
// Another Simple XML Sitemap.
|
||||
'xml-maps/google-sitemap.php',
|
||||
// Xml Sitemap (Jason Martens)
|
||||
// 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)
|
||||
// Google XML Sitemap Generator by Anton Dachauer (Anton Dachauer).
|
||||
'wp-xml-sitemap/wp-xml-sitemap.php',
|
||||
// WP XML Sitemap (Team Vivacity)
|
||||
// WP XML Sitemap (Team Vivacity).
|
||||
'sitemap-generator-for-webmasters/sitemap.php',
|
||||
// Sitemap Generator for Webmasters (iwebslogtech)
|
||||
// Sitemap Generator for Webmasters (iwebslogtech).
|
||||
'xml-sitemap-xml-sitemapcouk/xmls.php',
|
||||
// XML Sitemap - XML-Sitemap.co.uk (Simon Hancox)
|
||||
// XML Sitemap - XML-Sitemap.co.uk (Simon Hancox).
|
||||
'sewn-in-xml-sitemap/sewn-xml-sitemap.php',
|
||||
// Sewn In XML Sitemap (jcow)
|
||||
// Sewn In XML Sitemap (jcow).
|
||||
'rps-sitemap-generator/rps-sitemap-generator.php',
|
||||
// RPS Sitemap Generator (redpixelstudios)
|
||||
)
|
||||
// RPS Sitemap Generator (redpixelstudios).
|
||||
),
|
||||
);
|
||||
|
||||
/**
|
||||
@@ -112,25 +112,32 @@ class WPSEO_Plugin_Conflict extends Yoast_Plugin_Conflict {
|
||||
* 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
|
||||
// The instance of itself.
|
||||
$instance = self::get_instance();
|
||||
|
||||
// Only add plugin as active plugin if $plugin isn't false
|
||||
// Only add plugin as active plugin if $plugin isn't false.
|
||||
if ( $plugin ) {
|
||||
// Because it's just activated
|
||||
// Because it's just activated.
|
||||
$instance->add_active_plugin( $instance->find_plugin_category( $plugin ), $plugin );
|
||||
}
|
||||
|
||||
$plugin_sections = array(
|
||||
/* translators: %s: 'Facebook' plugin name of possibly conflicting plugin with regard to creating OpenGraph output*/
|
||||
'open_graph' => __( 'Both WordPress SEO by Yoast and %s create OpenGraph output, which might make Facebook, Twitter, LinkedIn and other social networks use the wrong texts and images when your pages are being shared.', 'wordpress-seo' ) . '<br/><br/>'
|
||||
. '<a target="_blank" class="button" href="' . admin_url( 'admin.php?page=wpseo_social#top#facebook' ) . '">' . __( 'Configure WordPress SEO\'s OpenGraph settings', 'wordpress-seo' ) . '</a>' ,
|
||||
/* translators: %s: 'Google XML Sitemaps' plugin name of possibly conflicting plugin with regard to the creation of sitemaps*/
|
||||
'xml_sitemaps' => __( 'Both WordPress SEO by Yoast and %s can create XML sitemaps. Having two XML sitemaps is not beneficial for search engines, yet might slow down your site.', 'wordpress-seo' ) . '<br/><br/>'
|
||||
. '<a target="_blank" class="button" href="' . admin_url( 'admin.php?page=wpseo_xml' ) . '">' . __( 'Configure WordPress SEO\'s XML Sitemap settings', 'wordpress-seo' ) . '</a>' ,
|
||||
/* translators: %1$s expands to Yoast SEO, %2%s: 'Facebook' plugin name of possibly conflicting plugin with regard to creating OpenGraph output*/
|
||||
'open_graph' => __( 'Both %1$s and %2$s create OpenGraph output, which might make Facebook, Twitter, LinkedIn and other social networks use the wrong texts and images when your pages are being shared.', 'wordpress-seo' )
|
||||
. '<br/><br/>'
|
||||
. '<a target="_blank" class="button" href="' . admin_url( 'admin.php?page=wpseo_social#top#facebook' ) . '">'
|
||||
/* translators: %1$s expands to Yoast SEO */
|
||||
. sprintf( __( 'Configure %1$s\'s OpenGraph settings', 'wordpress-seo' ), 'Yoast SEO' )
|
||||
. '</a>',
|
||||
/* translators: %1$s expands to Yoast SEO, %2$s: 'Google XML Sitemaps' plugin name of possibly conflicting plugin with regard to the creation of sitemaps*/
|
||||
'xml_sitemaps' => __( 'Both %1$s and %2$s can create XML sitemaps. Having two XML sitemaps is not beneficial for search engines, yet might slow down your site.', 'wordpress-seo' )
|
||||
. '<br/><br/>'
|
||||
. '<a target="_blank" class="button" href="' . admin_url( 'admin.php?page=wpseo_xml' ) . '">'
|
||||
/* translators: %1$s expands to Yoast SEO */
|
||||
. sprintf( __( 'Configure %1$s\'s XML Sitemap settings', 'wordpress-seo' ), 'Yoast SEO' )
|
||||
. '</a>',
|
||||
);
|
||||
|
||||
$instance->check_plugin_conflicts( $plugin_sections );
|
||||
|
||||
@@ -11,26 +11,37 @@
|
||||
class WPSEO_Pointers {
|
||||
|
||||
/**
|
||||
* @var object Instance of this class
|
||||
* @var object Instance of this class
|
||||
*/
|
||||
public static $instance;
|
||||
|
||||
/**
|
||||
* @var array Holds the buttons to be put out
|
||||
*/
|
||||
private $button_array;
|
||||
|
||||
/**
|
||||
* @var array Holds the admin pages we have pointers for and the callback that generates the pointers content
|
||||
*/
|
||||
private $admin_pages = array(
|
||||
'dashboard' => 'dashboard_pointer',
|
||||
'titles' => 'titles_pointer',
|
||||
'social' => 'social_pointer',
|
||||
'xml' => 'xml_sitemaps_pointer',
|
||||
'advanced' => 'advanced_pointer',
|
||||
'licenses' => 'licenses_pointer',
|
||||
);
|
||||
|
||||
/**
|
||||
* Class constructor.
|
||||
*/
|
||||
private function __construct() {
|
||||
if ( current_user_can( 'manage_options' ) ) {
|
||||
$options = get_option( 'wpseo' );
|
||||
if ( $options['tracking_popup_done'] === false || $options['ignore_tour'] === false ) {
|
||||
|
||||
if ( ! get_user_meta( get_current_user_id(), 'wpseo_ignore_tour' ) ) {
|
||||
wp_enqueue_style( 'wp-pointer' );
|
||||
wp_enqueue_script( 'jquery-ui' );
|
||||
wp_enqueue_script( 'wp-pointer' );
|
||||
wp_enqueue_script( 'utils' );
|
||||
}
|
||||
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 ) {
|
||||
add_action( 'admin_print_footer_scripts', array( $this, 'intro_tour' ) );
|
||||
}
|
||||
}
|
||||
@@ -49,166 +60,31 @@ class WPSEO_Pointers {
|
||||
return self::$instance;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Shows a popup that asks for permission to allow tracking.
|
||||
*/
|
||||
function tracking_request() {
|
||||
$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' => $content,
|
||||
'position' => array( 'edge' => 'top', 'align' => 'center' )
|
||||
);
|
||||
$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 . '")',
|
||||
),
|
||||
);
|
||||
|
||||
$this->print_scripts( $id, $opt_arr, $button_array );
|
||||
}
|
||||
|
||||
/**
|
||||
* Load the introduction tour
|
||||
*/
|
||||
function intro_tour() {
|
||||
global $pagenow, $current_user;
|
||||
public function intro_tour() {
|
||||
global $pagenow;
|
||||
|
||||
$admin_pages = array(
|
||||
'dashboard' => array(
|
||||
'content' => '<h3>' . __( 'General settings', 'wordpress-seo' ) . '</h3><p>' . __( 'These are the General settings for WordPress SEO, here you can restart this tour or revert the WP SEO settings to default.', 'wordpress-seo' ) . '</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>' . __( 'Tab: Your Info / Company Info', 'wordpress-seo' ) . '</strong><br/>' . __( 'Add some info here needed for Google\'s Knowledge Graph.', 'wordpress-seo' ) . '</p>'
|
||||
. '<p><strong>' . __( 'Tab: Webmaster Tools', 'wordpress-seo' ) . '</strong><br/>' . __( 'You can 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>' . __( 'Tab: Security', 'wordpress-seo' ) . '</strong><br/>' . __( 'Determine who has access to the plugins advanced settings on the post edit screen.', '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 style="font-size:150%;">' . __( 'Subscribe to our Newsletter', 'wordpress-seo' ) . '</strong><br/>'
|
||||
. __( 'If you would like 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>' .
|
||||
'<input style="margin: 5px; color:#666" name="EMAIL" value="' . esc_attr( $current_user->user_email ) . '" id="newsletter-email" placeholder="' . __( 'Email', 'wordpress-seo' ) . '"/>' .
|
||||
'<input type="hidden" name="group" value="2"/>' .
|
||||
'<button type="submit" class="button-primary">' . __( 'Subscribe', 'wordpress-seo' ) . '</button>' .
|
||||
'</p></form>',
|
||||
'next_page' => 'titles',
|
||||
),
|
||||
'titles' => array(
|
||||
'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 for titles, normally you\'ll only need to change the Title Separator.', '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>'
|
||||
. '<p><strong>' . __( 'Archives', 'wordpress-seo' ) . '</strong><br/>' . __( 'On the archives tab you can set templates for specific pages like author archives, search results and more.', 'wordpress-seo' )
|
||||
. '<p><strong>' . __( 'Other', 'wordpress-seo' ) . '</strong><br/>' . __( 'On the Other tab you can change sitewide meta settings, like enable meta keywords.', 'wordpress-seo' ),
|
||||
'next_page' => 'social',
|
||||
'prev_page' => 'dashboard',
|
||||
),
|
||||
'social' => array(
|
||||
'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>' . __( 'Pinterest', 'wordpress-seo' ) . '</strong><br/>' . __( 'On this tab you can verify your site with Pinterest and enter your Pinterest account.', 'wordpress-seo' ) . '</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>'
|
||||
. '<p><strong>' . __( 'Other', 'wordpress-seo' ) . '</strong><br/>' . __( 'On this tab you can enter some more of your social accounts, mostly used for Google\'s Knowledge Graph.', 'wordpress-seo' ) . '</p>',
|
||||
'next_page' => 'xml',
|
||||
'prev_page' => 'titles',
|
||||
),
|
||||
'xml' => array(
|
||||
'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.', '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_page' => 'advanced',
|
||||
'prev_page' => 'social',
|
||||
),
|
||||
'advanced' => array(
|
||||
'content' => '<h3>' . __( 'Advanced Settings', 'wordpress-seo' ) . '</h3><p>' . __( 'All of the options on these tabs are for advanced users only, if you don’t know whether you should check any, don’t touch them.', 'wordpress-seo' ) . '</p>',
|
||||
'next_page' => 'licenses',
|
||||
'prev_page' => 'xml',
|
||||
),
|
||||
'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 %1$shere%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 our 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_page' => 'advanced',
|
||||
),
|
||||
);
|
||||
$page = preg_replace( '/^(wpseo_)/', '', filter_input( INPUT_GET, 'page' ) );
|
||||
|
||||
$page = filter_input( INPUT_GET, 'page' );
|
||||
$page = str_replace( 'wpseo_', '', $page );
|
||||
|
||||
$button_array = array(
|
||||
'button1' => array(
|
||||
'text' => __( 'Close', 'wordpress-seo' ),
|
||||
'function' => '',
|
||||
),
|
||||
);
|
||||
$opt_arr = array();
|
||||
$id = '#wpseo-title';
|
||||
if ( 'admin.php' != $pagenow || ! array_key_exists( $page, $admin_pages ) ) {
|
||||
$id = 'li.toplevel_page_wpseo_dashboard';
|
||||
$content = '
|
||||
<h3>' . __( 'Congratulations!', 'wordpress-seo' ) . '</h3>
|
||||
<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' => 'bottom', 'align' => 'center' )
|
||||
);
|
||||
$button_array['button2']['text'] = __( 'Start Tour', 'wordpress-seo' );
|
||||
$button_array['button2']['function'] = sprintf( 'document.location="%s";', admin_url( 'admin.php?page=wpseo_dashboard' ) );
|
||||
if ( 'admin.php' === $pagenow && array_key_exists( $page, $this->admin_pages ) ) {
|
||||
$this->do_page_pointer( $page );
|
||||
}
|
||||
else {
|
||||
if ( '' != $page && in_array( $page, array_keys( $admin_pages ) ) ) {
|
||||
$align = ( is_rtl() ) ? 'left' : 'right';
|
||||
$default_position = array(
|
||||
'edge' => 'top',
|
||||
'align' => $align,
|
||||
);
|
||||
$opt_arr = array(
|
||||
'content' => $admin_pages[ $page ]['content'],
|
||||
'position' => ( isset ( $admin_pages[ $page ]['position'] ) ) ? ( $admin_pages[ $page ]['position'] ) : $default_position,
|
||||
'pointerWidth' => 450,
|
||||
);
|
||||
if ( isset( $admin_pages[ $page ]['next_page'] ) ) {
|
||||
$button_array['button2'] = array(
|
||||
'text' => __( 'Next', 'wordpress-seo' ),
|
||||
'function' => 'window.location="' . admin_url( 'admin.php?page=wpseo_' . $admin_pages[ $page ]['next_page'] ) . '";',
|
||||
);
|
||||
}
|
||||
if ( isset( $admin_pages[ $page ]['prev_page'] ) ) {
|
||||
$button_array['button3'] = array(
|
||||
'text' => __( 'Previous', 'wordpress-seo' ),
|
||||
'function' => 'window.location="' . admin_url( 'admin.php?page=wpseo_' . $admin_pages[ $page ]['prev_page'] ) . '";',
|
||||
);
|
||||
}
|
||||
}
|
||||
$this->start_tour_pointer();
|
||||
}
|
||||
|
||||
$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 array $button_array The options for the buttons.
|
||||
* @param string $selector The CSS selector the pointer is attached to.
|
||||
* @param array $options The options for the pointer.
|
||||
*/
|
||||
function print_scripts( $selector, $options, $button_array ) {
|
||||
public function print_scripts( $selector, $options ) {
|
||||
// Button1 is the close button, which always exists.
|
||||
$button_array_defaults = array(
|
||||
'button1' => array(
|
||||
'text' => false,
|
||||
'function' => '',
|
||||
),
|
||||
'button2' => array(
|
||||
'text' => false,
|
||||
'function' => '',
|
||||
@@ -218,7 +94,17 @@ class WPSEO_Pointers {
|
||||
'function' => '',
|
||||
),
|
||||
);
|
||||
$button_array = wp_parse_args( $button_array, $button_array_defaults );
|
||||
$this->button_array = wp_parse_args( $this->button_array, $button_array_defaults );
|
||||
|
||||
if ( function_exists( 'wp_json_encode' ) ) {
|
||||
$json_options = wp_json_encode( $options );
|
||||
}
|
||||
else {
|
||||
// @codingStandardsIgnoreStart
|
||||
$json_options = json_encode( $options );
|
||||
// @codingStandardsIgnoreEnd
|
||||
}
|
||||
|
||||
?>
|
||||
<script type="text/javascript">
|
||||
//<![CDATA[
|
||||
@@ -228,22 +114,11 @@ class WPSEO_Pointers {
|
||||
return;
|
||||
}
|
||||
|
||||
var wpseo_pointer_options = <?php echo json_encode( $options ); ?>, setup;
|
||||
|
||||
function wpseo_store_answer(input, nonce) {
|
||||
var wpseo_tracking_data = {
|
||||
action: 'wpseo_allow_tracking',
|
||||
allow_tracking: input,
|
||||
nonce: nonce
|
||||
};
|
||||
jQuery.post(ajaxurl, wpseo_tracking_data, function () {
|
||||
jQuery('#wp-pointer-0').remove();
|
||||
});
|
||||
}
|
||||
var wpseo_pointer_options = <?php echo $json_options; ?>, setup;
|
||||
|
||||
wpseo_pointer_options = $.extend(wpseo_pointer_options, {
|
||||
buttons: function (event, t) {
|
||||
var button = jQuery('<a id="pointer-close" style="margin:0 5px;" class="button-secondary">' + '<?php echo $button_array['button1']['text']; ?>' + '</a>');
|
||||
var button = jQuery('<a href="<?php echo $this->get_ignore_url(); ?>" id="pointer-close" style="margin:0 5px;" class="button-secondary">' + '<?php _e( 'Close', 'wordpress-seo' ) ?>' + '</a>');
|
||||
button.bind('click.pointer', function () {
|
||||
t.element.pointer('close');
|
||||
});
|
||||
@@ -255,30 +130,10 @@ class WPSEO_Pointers {
|
||||
|
||||
setup = function () {
|
||||
$('<?php echo $selector; ?>').pointer(wpseo_pointer_options).pointer('open');
|
||||
<?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 $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 ( $button_array['button1']['function'] == '' ) : ?>
|
||||
wpseo_setIgnore("tour", "wp-pointer-0", "<?php echo esc_js( wp_create_nonce( 'wpseo-ignore' ) ); ?>");
|
||||
<?php else : ?>
|
||||
<?php echo $button_array['button1']['function']; ?>
|
||||
<?php endif; ?>
|
||||
});
|
||||
<?php elseif ( $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 endif; ?>
|
||||
<?php
|
||||
$this->button2();
|
||||
$this->button3();
|
||||
?>
|
||||
};
|
||||
|
||||
if (wpseo_pointer_options.position && wpseo_pointer_options.position.defer_loading)
|
||||
@@ -291,16 +146,224 @@ class WPSEO_Pointers {
|
||||
<?php
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Load a tiny bit of CSS in the head
|
||||
*
|
||||
* @deprecated 1.5.0, now handled by css
|
||||
* Render button 2, if needed
|
||||
*/
|
||||
function admin_head() {
|
||||
_deprecated_function( __METHOD__, 'WPSEO 1.5.0' );
|
||||
|
||||
return;
|
||||
private function button2() {
|
||||
if ( $this->button_array['button2']['text'] ) {
|
||||
?>
|
||||
jQuery('#pointer-close').after('<a id="pointer-primary" class="button-primary">' +
|
||||
'<?php echo $this->button_array['button2']['text']; ?>' + '</a>');
|
||||
jQuery('#pointer-primary').click(function () {
|
||||
<?php echo $this->button_array['button2']['function']; ?>
|
||||
});
|
||||
<?php
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Render button 3, if needed. This is the previous button in most cases
|
||||
*/
|
||||
private function button3() {
|
||||
if ( $this->button_array['button3']['text'] ) {
|
||||
?>
|
||||
jQuery('#pointer-primary').after('<a id="pointer-ternary" style="float: left;" class="button-secondary">' +
|
||||
'<?php echo $this->button_array['button3']['text']; ?>' + '</a>');
|
||||
jQuery('#pointer-ternary').click(function () {
|
||||
<?php echo $this->button_array['button3']['function']; ?>
|
||||
});
|
||||
<?php }
|
||||
}
|
||||
|
||||
/**
|
||||
* Show a pointer that starts the tour for Yoast SEO
|
||||
*/
|
||||
private function start_tour_pointer() {
|
||||
$selector = 'li.toplevel_page_wpseo_dashboard';
|
||||
$content = '<h3>' . __( 'Congratulations!', 'wordpress-seo' ) . '</h3>'
|
||||
/* translators: %1$s expands to Yoast SEO */
|
||||
.'<p>' . sprintf( __( 'You’ve just installed %1$s! Click “Start Tour” to view a quick introduction of this plugin’s core functionality.', 'wordpress-seo' ), 'Yoast SEO' ) . '</p>';
|
||||
$opt_arr = array(
|
||||
'content' => $content,
|
||||
'position' => array( 'edge' => 'bottom', 'align' => 'center' ),
|
||||
);
|
||||
|
||||
$this->button_array['button2']['text'] = __( 'Start Tour', 'wordpress-seo' );
|
||||
$this->button_array['button2']['function'] = sprintf( 'document.location="%s";', admin_url( 'admin.php?page=wpseo_dashboard' ) );
|
||||
|
||||
$this->print_scripts( $selector, $opt_arr );
|
||||
}
|
||||
|
||||
/**
|
||||
* Shows a pointer on the proper pages
|
||||
*
|
||||
* @param string $page
|
||||
*/
|
||||
private function do_page_pointer( $page ) {
|
||||
$selector = '#wpseo-title';
|
||||
|
||||
$pointer = call_user_func( array( $this, $this->admin_pages[ $page ] ) );
|
||||
|
||||
$opt_arr = array(
|
||||
'content' => $pointer['content'],
|
||||
'position' => array(
|
||||
'edge' => 'top',
|
||||
'align' => ( is_rtl() ) ? 'left' : 'right',
|
||||
),
|
||||
'pointerWidth' => 450,
|
||||
);
|
||||
if ( isset( $pointer['next_page'] ) ) {
|
||||
$this->button_array['button2'] = array(
|
||||
'text' => __( 'Next', 'wordpress-seo' ),
|
||||
'function' => 'window.location="' . admin_url( 'admin.php?page=wpseo_' . $pointer['next_page'] ) . '";',
|
||||
);
|
||||
}
|
||||
if ( isset( $pointer['prev_page'] ) ) {
|
||||
$this->button_array['button3'] = array(
|
||||
'text' => __( 'Previous', 'wordpress-seo' ),
|
||||
'function' => 'window.location="' . admin_url( 'admin.php?page=wpseo_' . $pointer['prev_page'] ) . '";',
|
||||
);
|
||||
}
|
||||
$this->print_scripts( $selector, $opt_arr );
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns the content of the General Settings page pointer
|
||||
*
|
||||
* @return array
|
||||
*/
|
||||
private function dashboard_pointer() {
|
||||
global $current_user;
|
||||
|
||||
return array(
|
||||
'content' => '<h3>' . __( 'General settings', 'wordpress-seo' ) . '</h3>'
|
||||
/* translators: %1$s expands to Yoast SEO */
|
||||
. '<p>' . sprintf( __( 'These are the General settings for %1$s, here you can restart this tour or revert the %1$s settings to default.', 'wordpress-seo' ), 'Yoast SEO' ) . '</p>'
|
||||
. '<p><strong>' . __( 'Tab: Your Info / Company Info', 'wordpress-seo' ) . '</strong><br/>' . __( 'Add some info here needed for Google\'s Knowledge Graph.', 'wordpress-seo' ) . '</p>'
|
||||
. '<p><strong>' . __( 'Tab: Webmaster Tools', 'wordpress-seo' ) . '</strong><br/>' . __( 'You can 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>' . __( 'Tab: Security', 'wordpress-seo' ) . '</strong><br/>' . __( 'Determine who has access to the plugins advanced settings on the post edit screen.', 'wordpress-seo' ) . '</p>'
|
||||
|
||||
/* translators: %1$s expands to Yoast SEO */
|
||||
. '<p><strong>' . sprintf( __( 'More %1$s', 'wordpress-seo' ), 'Yoast SEO' ) . '</strong><br/>'
|
||||
|
||||
/* @todo What about this translation */
|
||||
. 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 style="font-size:150%;">' . __( 'Subscribe to our Newsletter', 'wordpress-seo' ) . '</strong><br/>'
|
||||
/* translators: %1$s expands to Yoast SEO */
|
||||
. sprintf( __( 'If you would like us to keep you up-to-date regarding %1$s and other plugins by Yoast, subscribe to our newsletter:', 'wordpress-seo' ), 'Yoast SEO' ) . '</p>'
|
||||
. '<form target="_blank" action="http://yoast.us1.list-manage1.com/subscribe/post?u=ffa93edfe21752c921f860358&id=972f1c9122" method="post" selector="newsletter-form" accept-charset="' . esc_attr( get_bloginfo( 'charset' ) ) . '">'
|
||||
. '<p>'
|
||||
. '<input style="margin: 5px; color:#666" name="EMAIL" value="' . esc_attr( $current_user->user_email ) . '" selector="newsletter-email" placeholder="' . __( 'Email', 'wordpress-seo' ) . '"/>'
|
||||
. '<input type="hidden" name="group" value="2"/>'
|
||||
. '<button type="submit" class="button-primary">' . __( 'Subscribe', 'wordpress-seo' ) . '</button>'
|
||||
. '</p>'
|
||||
. '</form>',
|
||||
'next_page' => 'titles',
|
||||
);
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns the content of the titles page pointer
|
||||
*
|
||||
* @return array
|
||||
*/
|
||||
private function titles_pointer() {
|
||||
return array(
|
||||
'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 for titles, normally you\'ll only need to change the Title Separator.', '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>'
|
||||
. '<p><strong>' . __( 'Archives', 'wordpress-seo' ) . '</strong><br/>' . __( 'On the archives tab you can set templates for specific pages like author archives, search results and more.', 'wordpress-seo' )
|
||||
. '<p><strong>' . __( 'Other', 'wordpress-seo' ) . '</strong><br/>' . __( 'On the Other tab you can change sitewide meta settings, like enable meta keywords.', 'wordpress-seo' ),
|
||||
'next_page' => 'social',
|
||||
'prev_page' => 'dashboard',
|
||||
);
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns the content of the social page pointer
|
||||
*
|
||||
* @return array
|
||||
*/
|
||||
private function social_pointer() {
|
||||
return array(
|
||||
'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>' . __( 'Pinterest', 'wordpress-seo' ) . '</strong><br/>' . __( 'On this tab you can verify your site with Pinterest and enter your Pinterest account.', 'wordpress-seo' ) . '</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>'
|
||||
. '<p><strong>' . __( 'Other', 'wordpress-seo' ) . '</strong><br/>' . __( 'On this tab you can enter some more of your social accounts, mostly used for Google\'s Knowledge Graph.', 'wordpress-seo' ) . '</p>',
|
||||
'next_page' => 'xml',
|
||||
'prev_page' => 'titles',
|
||||
);
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns the content of the social page pointer
|
||||
*
|
||||
* @return array
|
||||
*/
|
||||
private function xml_sitemaps_pointer() {
|
||||
return array(
|
||||
'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.', '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_page' => 'advanced',
|
||||
'prev_page' => 'social',
|
||||
);
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns the content of the advanced page pointer
|
||||
*
|
||||
* @return array
|
||||
*/
|
||||
private function advanced_pointer() {
|
||||
return array(
|
||||
'content' => '<h3>' . __( 'Advanced Settings', 'wordpress-seo' ) . '</h3><p>' . __( 'All of the options on these tabs are for advanced users only, if you don’t know whether you should check any, don’t touch them.', 'wordpress-seo' ) . '</p>',
|
||||
'next_page' => 'licenses',
|
||||
'prev_page' => 'xml',
|
||||
);
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns the content of the extensions and licenses page pointer
|
||||
*
|
||||
* @return array
|
||||
*/
|
||||
private function licenses_pointer() {
|
||||
return array(
|
||||
'content' => '<h3>' . __( 'Extensions and Licenses', 'wordpress-seo' ) . '</h3>'
|
||||
. '<p><strong>' . __( 'Extensions', 'wordpress-seo' ) . '</strong><br/>'
|
||||
/* translators: %1$s expands to Yoast SEO, %2$s to Yoast SEO Premium, %3$s and %4$s to an anchor with link about our premium plugins */
|
||||
. sprintf( __( 'The powerful functions of %1$s can be extended with %3$sYoast premium plugins%4$s. These premium plugins require the installation of %1$s or %2$s and add specific functionality. You can read all about the Yoast Premium Plugins %3$shere%4$s.', 'wordpress-seo' ), 'Yoast SEO', 'Yoast SEO Premium', '<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/>'
|
||||
/* translators: %1$s expands to Yoast SEO Premium */
|
||||
. sprintf( __( 'Once you’ve purchased %1$s 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' ), 'Yoast SEO Premium' )
|
||||
. '</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 our 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_page' => 'advanced',
|
||||
);
|
||||
}
|
||||
|
||||
/**
|
||||
* Extending the current page URL with two params to be able to ignore the tour.
|
||||
*
|
||||
* @return mixed
|
||||
*/
|
||||
private function get_ignore_url() {
|
||||
$arr_params = array(
|
||||
'wpseo_restart_tour' => false,
|
||||
'wpseo_ignore_tour' => '1',
|
||||
'nonce' => wp_create_nonce( 'wpseo-ignore-tour' ),
|
||||
);
|
||||
|
||||
return esc_url( add_query_arg( $arr_params ) );
|
||||
}
|
||||
} /* End of class */
|
||||
@@ -26,9 +26,11 @@ class WPSEO_Sitemaps_Admin {
|
||||
if ( $options['enablexmlsitemap'] === true ) {
|
||||
|
||||
$file_to_check_for = array(
|
||||
// ABSPATH . 'sitemap.xml',
|
||||
// ABSPATH . 'sitemap.xslt',
|
||||
// ABSPATH . 'sitemap.xsl',
|
||||
/**
|
||||
* ABSPATH . 'sitemap.xml',
|
||||
* ABSPATH . 'sitemap.xslt',
|
||||
* ABSPATH . 'sitemap.xsl',
|
||||
*/
|
||||
ABSPATH . 'sitemap_index.xml',
|
||||
);
|
||||
|
||||
@@ -56,14 +58,13 @@ class WPSEO_Sitemaps_Admin {
|
||||
* @param string $new_status New post status.
|
||||
* @param string $old_status Old post status.
|
||||
* @param \WP_Post $post Post object.
|
||||
|
||||
*/
|
||||
function status_transition( $new_status, $old_status, $post ) {
|
||||
if ( $new_status != 'publish' ) {
|
||||
return;
|
||||
}
|
||||
|
||||
wp_cache_delete( 'lastpostmodified:gmt:' . $post->post_type, 'timeinfo' ); // #17455
|
||||
wp_cache_delete( 'lastpostmodified:gmt:' . $post->post_type, 'timeinfo' ); // #17455.
|
||||
|
||||
$options = WPSEO_Options::get_all();
|
||||
if ( isset( $options[ 'post_types-' . $post->post_type . '-not_in_sitemap' ] ) && $options[ 'post_types-' . $post->post_type . '-not_in_sitemap' ] === true ) {
|
||||
@@ -75,7 +76,8 @@ class WPSEO_Sitemaps_Admin {
|
||||
}
|
||||
|
||||
// Allow the pinging to happen slightly after the hit sitemap index so the sitemap is fully regenerated when the ping happens.
|
||||
if ( WPSEO_Meta::get_value( 'sitemap-include', $post->ID ) !== 'never' ) {
|
||||
$excluded_posts = explode( ',', $options['excluded-posts'] );
|
||||
if ( ! in_array( $post->ID, $excluded_posts ) ) {
|
||||
if ( defined( 'YOAST_SEO_PING_IMMEDIATELY' ) && YOAST_SEO_PING_IMMEDIATELY ) {
|
||||
wpseo_ping_search_engines();
|
||||
}
|
||||
|
||||
@@ -5,12 +5,11 @@
|
||||
*/
|
||||
|
||||
/**
|
||||
* class WPSEO_Snippet_Preview
|
||||
* Class WPSEO_Snippet_Preview
|
||||
*
|
||||
* Generates a Google Search snippet preview.
|
||||
*
|
||||
* Takes a $post, $title and $description
|
||||
*
|
||||
*/
|
||||
class WPSEO_Snippet_Preview {
|
||||
/**
|
||||
@@ -150,7 +149,7 @@ HTML;
|
||||
protected function set_content_through_filter( $content ) {
|
||||
$properties = get_object_vars( $this );
|
||||
|
||||
// Backward compatibility for functions hooking into the wpseo_snippet filter
|
||||
// Backward compatibility for functions hooking into the wpseo_snippet filter.
|
||||
$properties['desc'] = $properties['description'];
|
||||
|
||||
/**
|
||||
|
||||
@@ -10,32 +10,124 @@
|
||||
class Yoast_Social_Facebook {
|
||||
|
||||
/**
|
||||
* @var array - The options for social
|
||||
* @var array - The options for social
|
||||
*/
|
||||
private $options;
|
||||
|
||||
/**
|
||||
* @var Yoast_Social_Facebook_Form
|
||||
*/
|
||||
private $form;
|
||||
|
||||
/**
|
||||
* Setting the options and define the listener to fetch $_GET values
|
||||
*
|
||||
*/
|
||||
public function __construct() {
|
||||
$this->options = get_option( 'wpseo_social' );
|
||||
|
||||
$this->get_listener();
|
||||
|
||||
$this->form = new Yoast_Social_Facebook_Form();
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns the output from the form class
|
||||
*
|
||||
*/
|
||||
public function show_form() {
|
||||
$form = new Yoast_Social_Facebook_Form();
|
||||
$form->show_form();
|
||||
$this->form->show_form();
|
||||
}
|
||||
|
||||
/**
|
||||
* Adding a new admin
|
||||
*
|
||||
* @param string $admin_name
|
||||
* @param string $admin_id
|
||||
*
|
||||
* @return string
|
||||
*/
|
||||
public function add_admin( $admin_name, $admin_id ) {
|
||||
$success = 0;
|
||||
|
||||
// If one of the fields is empty.
|
||||
if ( empty( $admin_name ) || empty( $admin_id ) ) {
|
||||
$response_body = $this->get_response_body( 'not_present' );
|
||||
}
|
||||
else {
|
||||
$admin_id = $this->parse_admin_id( $admin_id );
|
||||
|
||||
if ( ! isset( $this->options['fb_admins'][ $admin_id ] ) ) {
|
||||
$name = sanitize_text_field( urldecode( $admin_name ) );
|
||||
$admin_id = sanitize_text_field( $admin_id );
|
||||
|
||||
if ( preg_match( '/[0-9]+?/', $admin_id ) && preg_match( '/[\w\s]+?/', $name ) ) {
|
||||
$this->options['fb_admins'][ $admin_id ]['name'] = $name;
|
||||
$this->options['fb_admins'][ $admin_id ]['link'] = urldecode( 'http://www.facebook.com/' . $admin_id );
|
||||
|
||||
$this->save_options();
|
||||
|
||||
$success = 1;
|
||||
$response_body = $this->form->get_admin_link( $admin_id, $this->options['fb_admins'][ $admin_id ] );
|
||||
}
|
||||
else {
|
||||
$response_body = $this->get_response_body( 'invalid_format' );
|
||||
}
|
||||
}
|
||||
else {
|
||||
$response_body = $this->get_response_body( 'already_exists' );
|
||||
}
|
||||
}
|
||||
|
||||
return json_encode(
|
||||
array(
|
||||
'success' => $success,
|
||||
'html' => $response_body,
|
||||
)
|
||||
);
|
||||
}
|
||||
|
||||
/**
|
||||
* Fetches the id if the full meta tag or a full url was given
|
||||
*
|
||||
* @param string $admin_id
|
||||
*
|
||||
* @return string
|
||||
*/
|
||||
private function parse_admin_id( $admin_id ) {
|
||||
if ( preg_match( '/^\<meta property\=\"fb:admins\" content\=\"(\d+?)\"/', $admin_id, $matches_full_meta ) ) {
|
||||
return $matches_full_meta[1];
|
||||
}
|
||||
|
||||
return trim( parse_url( $admin_id, PHP_URL_PATH ), '/' );
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns a different response body depending on the response type
|
||||
*
|
||||
* @param string $type
|
||||
*
|
||||
* @return null|string
|
||||
*/
|
||||
private function get_response_body( $type ) {
|
||||
switch ( $type ) {
|
||||
case 'not_present':
|
||||
$return = "<p class='notice-error notice'><span style='margin-left: 5px'>" . __( 'Please make sure both fields are filled.', 'wordpress-seo' ) . '</span></p>';
|
||||
break;
|
||||
case 'invalid_format':
|
||||
$return = "<p class='notice-error notice'><span style='margin-left: 5px'>" . __( 'Your input contains invalid characters. Please make sure both fields are filled in correctly.', 'wordpress-seo' ) . '</span></p>';
|
||||
break;
|
||||
case 'already_exists':
|
||||
$return = "<p class='notice-error notice'><span style='margin-left: 5px'>" . __( 'This Facebook user has already been added as an admin.', 'wordpress-seo' ) . '</span></p>';
|
||||
break;
|
||||
default:
|
||||
$return = '';
|
||||
break;
|
||||
}
|
||||
|
||||
return $return;
|
||||
}
|
||||
|
||||
/**
|
||||
* This method will hook into the defined get params
|
||||
*
|
||||
*/
|
||||
private function get_listener() {
|
||||
if ( $delfbadmin = filter_input( INPUT_GET, 'delfbadmin' ) ) {
|
||||
@@ -44,9 +136,6 @@ class Yoast_Social_Facebook {
|
||||
elseif ( filter_input( INPUT_GET, 'fbclearall' ) ) {
|
||||
$this->clear_all();
|
||||
}
|
||||
elseif ( $key = filter_input( INPUT_GET, 'key' ) ) {
|
||||
$this->handle_user( $key );
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -70,7 +159,7 @@ class Yoast_Social_Facebook {
|
||||
|
||||
unset( $admin_id );
|
||||
|
||||
// Clean up the referrer url for later use
|
||||
// Clean up the referrer url for later use.
|
||||
if ( filter_input( INPUT_SERVER, 'REQUEST_URI' ) ) {
|
||||
$this->cleanup_referrer_url( 'nonce', 'delfbadmin' );
|
||||
}
|
||||
@@ -78,60 +167,22 @@ class Yoast_Social_Facebook {
|
||||
|
||||
/**
|
||||
* Clear all the facebook that has been set already
|
||||
*
|
||||
*/
|
||||
private function clear_all() {
|
||||
$this->verify_nonce( 'fbclearall' );
|
||||
|
||||
// Reset to defaults, don't unset as otherwise the old values will be retained
|
||||
$this->options['fb_admins'] = WPSEO_Options::get_default( 'wpseo_social', 'fb_admins' );
|
||||
// Reset to defaults, don't unset as otherwise the old values will be retained.
|
||||
$this->options['fb_admins'] = WPSEO_Options::get_default( 'wpseo_social', 'fb_admins' );
|
||||
|
||||
$this->save_options();
|
||||
$this->success_notice( __( 'Successfully cleared all Facebook Data', 'wordpress-seo' ) );
|
||||
|
||||
// Clean up the referrer url for later use
|
||||
// Clean up the referrer url for later use.
|
||||
if ( filter_input( INPUT_SERVER, 'REQUEST_URI' ) ) {
|
||||
$this->cleanup_referrer_url( 'nonce', 'fbclearall' );
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Adding a new facebook admin
|
||||
*
|
||||
* @param string $key_value
|
||||
*/
|
||||
private function handle_user( $key_value ) {
|
||||
if ( $key_value === $this->options['fbconnectkey'] && $user_id = filter_input( INPUT_GET, 'userid', FILTER_CALLBACK, array( 'options' => 'sanitize_text_field' ) ) ) {
|
||||
if ( ! isset( $this->options['fb_admins'][ $user_id ] ) ) {
|
||||
$this->options['fb_admins'][ $user_id ]['name'] = sanitize_text_field( urldecode( filter_input( INPUT_GET, 'userrealname' ) ) );
|
||||
$this->options['fb_admins'][ $user_id ]['link'] = sanitize_text_field( urldecode( filter_input( INPUT_GET, 'link' ) ) );
|
||||
|
||||
$this->save_options();
|
||||
$this->success_notice(
|
||||
sprintf( __( 'Successfully added %s as a Facebook Admin!', 'wordpress-seo' ), '<a href="' . esc_url( $this->options['fb_admins'][ $user_id ]['link'] ) . '">' . esc_html( $this->options['fb_admins'][ $user_id ]['name'] ) . '</a>' )
|
||||
);
|
||||
}
|
||||
else {
|
||||
add_settings_error(
|
||||
'yoast_wpseo_social_options',
|
||||
'error',
|
||||
sprintf(
|
||||
__( '%s already exists as a Facebook Admin.', 'wordpress-seo' ),
|
||||
'<a href="' . esc_url( $this->options['fb_admins'][ $user_id ]['link'] ) . '">' . esc_html( $this->options['fb_admins'][ $user_id ]['name'] ) . '</a>'
|
||||
),
|
||||
'error'
|
||||
);
|
||||
}
|
||||
|
||||
unset( $user_id );
|
||||
}
|
||||
|
||||
// Clean up the referrer url for later use
|
||||
if ( filter_input( INPUT_SERVER, 'REQUEST_URI' ) ) {
|
||||
$this->cleanup_referrer_url( 'key', 'userid', 'userrealname', 'link' );
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Clean up the request_uri. The given params are the params that will be removed from the URL
|
||||
*/
|
||||
@@ -179,23 +230,22 @@ class Yoast_Social_Facebook {
|
||||
class Yoast_Social_Facebook_Form {
|
||||
|
||||
/**
|
||||
* @var array - The options for social
|
||||
* @var array - The options for social
|
||||
*/
|
||||
private $options;
|
||||
|
||||
/**
|
||||
* @var array - The repository for the buttons that will be shown
|
||||
* @var array - The repository for the buttons that will be shown
|
||||
*/
|
||||
private $buttons = array();
|
||||
|
||||
/**
|
||||
* @var string - The URL to link to
|
||||
* @var string - The URL to link to
|
||||
*/
|
||||
private $admin_url = 'admin.php?page=wpseo_social';
|
||||
|
||||
/**
|
||||
* Setting the options and call the methods to display everything
|
||||
*
|
||||
*/
|
||||
public function __construct() {
|
||||
$this->options = get_option( 'wpseo_social' );
|
||||
@@ -208,10 +258,31 @@ class Yoast_Social_Facebook_Form {
|
||||
$this
|
||||
->form_head()
|
||||
->manage_user_admin()
|
||||
->form_thickbox()
|
||||
->show_buttons()
|
||||
->manage_app_as_admin();
|
||||
}
|
||||
|
||||
/**
|
||||
* Parses the admin_link
|
||||
*
|
||||
* @param string $admin_id
|
||||
* @param array $admin
|
||||
* @param string|bool $nonce
|
||||
*
|
||||
* @return string
|
||||
*/
|
||||
public function get_admin_link( $admin_id, $admin, $nonce = false ) {
|
||||
if ( $nonce === false ) {
|
||||
$nonce = $this->get_delete_nonce();
|
||||
}
|
||||
|
||||
$return = '<li><a target="_blank" href="' . esc_url( $admin['link'] ) . '">' . esc_html( $admin['name'] ) . '</a>';
|
||||
$return .= ' - <strong><a href="' . $this->admin_delete_link( $admin_id, $nonce ) . '">X</a></strong></li>';
|
||||
|
||||
return $return;
|
||||
}
|
||||
|
||||
/**
|
||||
* SHow the top of the social insights part of the page
|
||||
*
|
||||
@@ -223,10 +294,48 @@ class Yoast_Social_Facebook_Form {
|
||||
esc_html__(
|
||||
'To be able to access %sFacebook Insights%s for your site, you need to specify a Facebook Admin. This can be a user. If you have an app for your site, you could use that as well.', 'wordpress-seo'
|
||||
),
|
||||
'<a href="https://www.facebook.com/insights">',
|
||||
'<a target="_blank" href="https://www.facebook.com/insights">',
|
||||
'</a>'
|
||||
);
|
||||
echo'</p>';
|
||||
echo ' ';
|
||||
/* translators: %1$s and %2$s expand to a link to the Yoast Knowledge Base */
|
||||
printf( __( 'More info can be found %1$son our knowledge base%2$s.', 'wordpress-seo' ), '<a target="_blank" href="http://kb.yoast.com/article/254-gaining-access-to-facebook-insights">', '</a>' );
|
||||
echo '</p>';
|
||||
|
||||
return $this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Show the form inside the thickbox
|
||||
*/
|
||||
private function form_thickbox() {
|
||||
// Adding the thickbox.
|
||||
add_thickbox();
|
||||
|
||||
echo '<div id="add_facebook_admin" style="display:none;">';
|
||||
echo "<div class='form-wrap wpseo_content_wrapper'>";
|
||||
echo '<p>';
|
||||
/* translators: %1$s and %2$s expand to a link to Facebook Insights */
|
||||
printf( __( 'To be able to access %1$sFacebook Insights%2$s, you need to add a user here. The name is used for reference only, the ID is used for verification.', 'wordpress-seo' ), '<a target="_blank" href="https://www.facebook.com/insights">', '</a>' );
|
||||
echo '</p>';
|
||||
echo '<p>';
|
||||
/* translators: %1$s and %2$s expand to a link to the Yoast Knowledge Base */
|
||||
printf( __( 'If you don\'t know where to find the needed ID, see %1$sthis knowledge base article%2$s.', 'wordpress-seo' ), '<a target="_blank" href="http://kb.yoast.com/article/254-gaining-access-to-facebook-insights">', '</a>' );
|
||||
echo '</p>';
|
||||
echo '<div class="form-field form-required">';
|
||||
echo '<label for="fb_admin_name">' . __( 'Admin\'s name:', 'wordpress-seo' ) . '</label>';
|
||||
echo '<input type="text" id="fb_admin_name" name="fb_admin_name" value="" maxlength="255" />';
|
||||
echo '</div>';
|
||||
echo '<div class="form-field form-required">';
|
||||
echo '<label for="fb_admin_id">' . __( 'Admin\'s Facebook user ID:', 'wordpress-seo' ) . '</label>';
|
||||
echo '<input type="text" id="fb_admin_id" name="fb_admin_id" value="" maxlength="255" />';
|
||||
echo '</div>';
|
||||
echo "<p class='submit'>";
|
||||
echo '<input type="hidden" name="fb_admin_nonce" value="' . wp_create_nonce( 'wpseo_fb_admin_nonce' ) . '" />';
|
||||
echo '<input type="submit" value="' . __( 'Add Facebook admin', 'wordpress-seo' ) . '" class="button-primary" onclick="javascript:wpseo_add_fb_admin();" />';
|
||||
echo '</p>';
|
||||
echo '</div>';
|
||||
echo '</div>';
|
||||
|
||||
return $this;
|
||||
}
|
||||
@@ -237,24 +346,32 @@ class Yoast_Social_Facebook_Form {
|
||||
* @return $this
|
||||
*/
|
||||
private function manage_user_admin() {
|
||||
$button_text = __( 'Add Facebook Admin', 'wordpress-seo' );
|
||||
$button_text = __( 'Add Facebook admin', 'wordpress-seo' );
|
||||
$nonce = false;
|
||||
$style = 'style="display:none"';
|
||||
|
||||
if ( is_array( $this->options['fb_admins'] ) && $this->options['fb_admins'] !== array() ) {
|
||||
$nonce = wp_create_nonce( 'delfbadmin' );
|
||||
$nonce = $this->get_delete_nonce();
|
||||
$button_text = __( 'Add Another Facebook Admin', 'wordpress-seo' );
|
||||
|
||||
echo '<p>' . __( 'Currently connected Facebook admins:', 'wordpress-seo' ) . '</p>';
|
||||
echo '<ul>';
|
||||
$this->show_user_admins( $nonce );
|
||||
echo '</ul>';
|
||||
|
||||
unset( $admin_id, $admin, $nonce );
|
||||
$style = '';
|
||||
}
|
||||
|
||||
echo "<div id='connected_fb_admins' {$style}>";
|
||||
echo '<p>' . __( 'Currently connected Facebook admins:', 'wordpress-seo' ) . '</p>';
|
||||
echo '<ul id="user_admin">';
|
||||
$this->show_user_admins( $nonce );
|
||||
echo '</ul>';
|
||||
echo '</div>';
|
||||
|
||||
unset( $nonce );
|
||||
|
||||
$this->add_button(
|
||||
'https://yoast.com/fb-connect/?key=' . urlencode( $this->options['fbconnectkey'] ) . '&redirect=' . urlencode( admin_url( $this->admin_url ) ),
|
||||
$button_text,'',
|
||||
true
|
||||
array(
|
||||
'url' => '#TB_inline?width=600&height=350&inlineId=add_facebook_admin',
|
||||
'value' => $button_text,
|
||||
'class' => 'thickbox',
|
||||
'title' => $button_text,
|
||||
)
|
||||
);
|
||||
|
||||
return $this;
|
||||
@@ -279,8 +396,7 @@ class Yoast_Social_Facebook_Form {
|
||||
*/
|
||||
private function show_user_admins( $nonce ) {
|
||||
foreach ( $this->options['fb_admins'] as $admin_id => $admin ) {
|
||||
echo '<li><a href="' . esc_url( $admin['link'] ) . '">' . esc_html( $admin['name'] ) . '</a>';
|
||||
echo ' - <strong><a href="' . $this->admin_delete_link( $admin_id, $nonce ) . '">X</a></strong></li>';
|
||||
echo $this->get_admin_link( $admin_id, $admin, $nonce );
|
||||
}
|
||||
}
|
||||
|
||||
@@ -307,13 +423,22 @@ class Yoast_Social_Facebook_Form {
|
||||
/**
|
||||
* Adding a button to the button property
|
||||
*
|
||||
* @param string $button_url
|
||||
* @param string $button_value
|
||||
* @param string $button_class
|
||||
* @param string $button_id
|
||||
* @param array $args
|
||||
*/
|
||||
private function add_button( $button_url, $button_value, $button_class = '', $button_id = '' ) {
|
||||
$this->buttons[] = '<a id="' .esc_attr( $button_id ). '" class="button' . esc_attr( $button_class ) . '" href="' . esc_url( $button_url ) . '">' . esc_html( $button_value ) . '</a>';
|
||||
private function add_button( $args ) {
|
||||
$args = wp_parse_args(
|
||||
$args,
|
||||
array(
|
||||
'url' => '',
|
||||
'value' => '',
|
||||
'class' => '',
|
||||
'id' => '',
|
||||
'title' => '',
|
||||
|
||||
)
|
||||
);
|
||||
|
||||
$this->buttons[] = '<a title="' . esc_attr( $args['title'] ) . '" id="' . esc_attr( $args['id'] ) . '" class="button' . ' ' . esc_attr( $args['class'] ) . '" href="' . esc_url( $args['url'] ) . '">' . esc_html( $args['value'] ) . '</a>';
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -322,8 +447,13 @@ class Yoast_Social_Facebook_Form {
|
||||
private function show_buttons() {
|
||||
if ( $this->get_clearall() ) {
|
||||
$this->add_button(
|
||||
esc_url( add_query_arg( array( 'nonce' => wp_create_nonce( 'fbclearall' ), 'fbclearall' => 'true', ), admin_url( $this->admin_url . '#top#facebook' ) ) ),
|
||||
__( 'Clear all Facebook Data', 'wordpress-seo' )
|
||||
array(
|
||||
'url' => add_query_arg( array(
|
||||
'nonce' => wp_create_nonce( 'fbclearall' ),
|
||||
'fbclearall' => 'true',
|
||||
), admin_url( $this->admin_url . '#top#facebook' ) ),
|
||||
'value' => __( 'Clear all Facebook Data', 'wordpress-seo' ),
|
||||
)
|
||||
);
|
||||
}
|
||||
|
||||
@@ -343,4 +473,13 @@ class Yoast_Social_Facebook_Form {
|
||||
return is_array( $this->options['fb_admins'] ) && $this->options['fb_admins'] !== array();
|
||||
}
|
||||
|
||||
}
|
||||
/**
|
||||
* Creates nonce for removal link
|
||||
*
|
||||
* @return mixed
|
||||
*/
|
||||
private function get_delete_nonce() {
|
||||
return wp_create_nonce( 'delfbadmin' );
|
||||
}
|
||||
|
||||
}
|
||||
@@ -46,7 +46,7 @@ class WPSEO_Taxonomy {
|
||||
/**
|
||||
* Makes sure the taxonomy meta is updated when a taxonomy term is split.
|
||||
*
|
||||
* @link https://make.wordpress.org/core/2015/02/16/taxonomy-term-splitting-in-4-2-a-developer-guide/ Article explaining the taxonomy term splitting in WP 4.2
|
||||
* @link https://make.wordpress.org/core/2015/02/16/taxonomy-term-splitting-in-4-2-a-developer-guide/ Article explaining the taxonomy term splitting in WP 4.2.
|
||||
*
|
||||
* @param string $old_term_id Old term id of the taxonomy term that was splitted.
|
||||
* @param string $new_term_id New term id of the taxonomy term that was splitted.
|
||||
@@ -58,7 +58,7 @@ class WPSEO_Taxonomy {
|
||||
|
||||
if ( ! empty( $tax_meta[ $taxonomy ][ $old_term_id ] ) ) {
|
||||
$tax_meta[ $taxonomy ][ $new_term_id ] = $tax_meta[ $taxonomy ][ $old_term_id ];
|
||||
unset( $tax_meta[ $taxonomy ][ $old_term_id ]);
|
||||
unset( $tax_meta[ $taxonomy ][ $old_term_id ] );
|
||||
update_option( 'wpseo_taxonomy_meta', $tax_meta );
|
||||
}
|
||||
}
|
||||
@@ -91,7 +91,7 @@ class WPSEO_Taxonomy {
|
||||
* @since 1.5.0
|
||||
*/
|
||||
function tax_is_public() {
|
||||
// Don't make static as taxonomies may still be added during the run
|
||||
// Don't make static as taxonomies may still be added during the run.
|
||||
$taxonomies = get_taxonomies( array( 'public' => true ), 'names' );
|
||||
|
||||
return ( isset( $_GET['taxonomy'] ) && in_array( $_GET['taxonomy'], $taxonomies ) );
|
||||
@@ -163,7 +163,7 @@ class WPSEO_Taxonomy {
|
||||
|
||||
echo '
|
||||
<tr class="form-field">
|
||||
<th scope="row">' . ( ( '' !== $label ) ? '<label for="' . $esc_var . '">' . esc_html( $label ) . ':</label>' : '' ) . '</th>
|
||||
<th scope="row">' . ( ( '' !== $label ) ? '<label for="' . $esc_var . '">' . esc_html( $label ) . '</label>' : '' ) . '</th>
|
||||
<td>' . $field . '</td>
|
||||
</tr>';
|
||||
}
|
||||
@@ -181,8 +181,8 @@ class WPSEO_Taxonomy {
|
||||
$tax_meta = WPSEO_Taxonomy_Meta::get_term_meta( (int) $term->term_id, $term->taxonomy );
|
||||
$options = WPSEO_Options::get_all();
|
||||
|
||||
|
||||
echo '<h2>', __( 'Yoast WordPress SEO Settings', 'wordpress-seo' ), '</h2>';
|
||||
/* translators: %1$s expands to Yoast SEO */
|
||||
echo '<h3>', sprintf( __( '%1$s Settings', 'wordpress-seo' ), 'Yoast SEO' ) . '</h3>';
|
||||
echo '<table class="form-table wpseo-taxonomy-form">';
|
||||
|
||||
$this->form_row( 'wpseo_title', __( 'SEO Title', 'wordpress-seo' ), esc_html__( 'The SEO title is used on the archive page for this term.', 'wordpress-seo' ), $tax_meta );
|
||||
@@ -223,7 +223,7 @@ class WPSEO_Taxonomy {
|
||||
/**
|
||||
* Update the taxonomy meta data on save.
|
||||
*
|
||||
* @param int $term_id ID of the term to save data for
|
||||
* @param int $term_id ID of the term to save data for.
|
||||
* @param int $tt_id The taxonomy_term_id for the term.
|
||||
* @param string $taxonomy The taxonomy the term belongs to.
|
||||
*/
|
||||
@@ -254,7 +254,7 @@ class WPSEO_Taxonomy {
|
||||
}
|
||||
}
|
||||
|
||||
// Prevent complete array validation
|
||||
// Prevent complete array validation.
|
||||
$tax_meta['wpseo_already_validated'] = true;
|
||||
|
||||
update_option( 'wpseo_taxonomy_meta', $tax_meta );
|
||||
|
||||
@@ -1,237 +0,0 @@
|
||||
<?php
|
||||
/**
|
||||
* Contains the Tracking class and filtering specific to WordPress SEO for the tracking class.
|
||||
*
|
||||
* If the class is instatiated from another plugin, the filtering still works.
|
||||
*
|
||||
* @package WPSEO\Admin\Tracking
|
||||
*/
|
||||
|
||||
if ( ! defined( 'WPSEO_VERSION' ) ) {
|
||||
header( 'Status: 403 Forbidden' );
|
||||
header( 'HTTP/1.1 403 Forbidden' );
|
||||
exit();
|
||||
}
|
||||
|
||||
/**
|
||||
* Class that creates the tracking functionality for WP SEO, as the core class might be used in more plugins,
|
||||
* it's checked for existence first.
|
||||
*
|
||||
* NOTE: this functionality is opt-in. Disabling the tracking in the settings or saying no when asked will cause
|
||||
* this file to not even be loaded.
|
||||
*
|
||||
* @todo [JRF => testers] check if tracking still works if an old version of the Yoast Tracking class was loaded
|
||||
* (i.e. another plugin loaded their version first)
|
||||
*/
|
||||
class Yoast_Tracking {
|
||||
|
||||
/**
|
||||
* @var object Instance of this class
|
||||
*/
|
||||
public static $instance;
|
||||
|
||||
|
||||
/**
|
||||
* Class constructor
|
||||
*/
|
||||
function __construct() {
|
||||
// Constructor is called from WP SEO
|
||||
if ( current_filter( 'yoast_tracking' ) ) {
|
||||
$this->tracking();
|
||||
} // Backward compatibility - constructor is called from other Yoast plugin
|
||||
elseif ( ! has_action( 'yoast_tracking', array( $this, 'tracking' ) ) ) {
|
||||
add_action( 'yoast_tracking', array( $this, 'tracking' ) );
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Get the singleton instance of this class
|
||||
*
|
||||
* @return object
|
||||
*/
|
||||
public static function get_instance() {
|
||||
if ( ! ( self::$instance instanceof self ) ) {
|
||||
self::$instance = new self();
|
||||
}
|
||||
|
||||
return self::$instance;
|
||||
}
|
||||
|
||||
/**
|
||||
* Main tracking function.
|
||||
*/
|
||||
function tracking() {
|
||||
|
||||
$transient_key = 'yoast_tracking_cache';
|
||||
$data = get_transient( $transient_key );
|
||||
|
||||
// bail if transient is set and valid
|
||||
if ( $data !== false ) {
|
||||
return;
|
||||
}
|
||||
|
||||
// Make sure to only send tracking data once a week
|
||||
set_transient( $transient_key, 1, WEEK_IN_SECONDS );
|
||||
|
||||
// Start of Metrics
|
||||
global $wpdb;
|
||||
|
||||
$hash = get_option( 'Yoast_Tracking_Hash', false );
|
||||
|
||||
if ( ! $hash || empty( $hash ) ) {
|
||||
// create and store hash
|
||||
$hash = md5( site_url() );
|
||||
update_option( 'Yoast_Tracking_Hash', $hash );
|
||||
}
|
||||
|
||||
$pts = array();
|
||||
$post_types = get_post_types( array( 'public' => true ) );
|
||||
if ( is_array( $post_types ) && $post_types !== array() ) {
|
||||
foreach ( $post_types as $post_type ) {
|
||||
$count = wp_count_posts( $post_type );
|
||||
$pts[ $post_type ] = $count->publish;
|
||||
}
|
||||
}
|
||||
unset( $post_types, $post_type, $count );
|
||||
|
||||
$comments_count = wp_count_comments();
|
||||
|
||||
$theme_data = wp_get_theme();
|
||||
$theme = array(
|
||||
'name' => $theme_data->display( 'Name', false, false ),
|
||||
'theme_uri' => $theme_data->display( 'ThemeURI', false, false ),
|
||||
'version' => $theme_data->display( 'Version', false, false ),
|
||||
'author' => $theme_data->display( 'Author', false, false ),
|
||||
'author_uri' => $theme_data->display( 'AuthorURI', false, false ),
|
||||
);
|
||||
$theme_template = $theme_data->get_template();
|
||||
if ( $theme_template !== '' && $theme_data->parent() ) {
|
||||
$theme['template'] = array(
|
||||
'version' => $theme_data->parent()->display( 'Version', false, false ),
|
||||
'name' => $theme_data->parent()->display( 'Name', false, false ),
|
||||
'theme_uri' => $theme_data->parent()->display( 'ThemeURI', false, false ),
|
||||
'author' => $theme_data->parent()->display( 'Author', false, false ),
|
||||
'author_uri' => $theme_data->parent()->display( 'AuthorURI', false, false ),
|
||||
);
|
||||
}
|
||||
else {
|
||||
$theme['template'] = '';
|
||||
}
|
||||
unset( $theme_template );
|
||||
|
||||
|
||||
$plugins = array();
|
||||
$active_plugins = get_option( 'active_plugins' );
|
||||
foreach ( $active_plugins as $plugin_path ) {
|
||||
if ( ! function_exists( 'get_plugin_data' ) ) {
|
||||
require_once( ABSPATH . 'wp-admin/includes/plugin.php' );
|
||||
}
|
||||
|
||||
$plugin_info = get_plugin_data( WP_PLUGIN_DIR . '/' . $plugin_path );
|
||||
|
||||
$slug = str_replace( '/' . basename( $plugin_path ), '', $plugin_path );
|
||||
$plugins[ $slug ] = array(
|
||||
'version' => $plugin_info['Version'],
|
||||
'name' => $plugin_info['Name'],
|
||||
'plugin_uri' => $plugin_info['PluginURI'],
|
||||
'author' => $plugin_info['AuthorName'],
|
||||
'author_uri' => $plugin_info['AuthorURI'],
|
||||
);
|
||||
}
|
||||
unset( $active_plugins, $plugin_path, $plugin_info, $slug );
|
||||
|
||||
|
||||
$data = array(
|
||||
'site' => array(
|
||||
'hash' => $hash,
|
||||
'version' => get_bloginfo( 'version' ),
|
||||
'multisite' => is_multisite(),
|
||||
'users' => $wpdb->get_var( $wpdb->prepare( "SELECT COUNT(*) FROM $wpdb->users INNER JOIN $wpdb->usermeta ON ({$wpdb->users}.ID = {$wpdb->usermeta}.user_id) WHERE 1 = 1 AND ( {$wpdb->usermeta}.meta_key = %s )", 'wp_' . $GLOBALS['blog_id'] . '_capabilities' ) ),
|
||||
'lang' => get_locale(),
|
||||
),
|
||||
'pts' => $pts,
|
||||
'comments' => array(
|
||||
'total' => $comments_count->total_comments,
|
||||
'approved' => $comments_count->approved,
|
||||
'spam' => $comments_count->spam,
|
||||
'pings' => $wpdb->get_var( "SELECT COUNT(comment_ID) FROM $wpdb->comments WHERE comment_type = 'pingback'" ),
|
||||
),
|
||||
'options' => apply_filters( 'yoast_tracking_filters', array() ),
|
||||
'theme' => $theme,
|
||||
'plugins' => $plugins,
|
||||
);
|
||||
|
||||
$args = array(
|
||||
'body' => $data,
|
||||
'blocking' => false,
|
||||
'sslverify' => false,
|
||||
);
|
||||
|
||||
wp_remote_post( 'https://tracking.yoast.com/', $args );
|
||||
|
||||
}
|
||||
} /* End of class */
|
||||
|
||||
/**
|
||||
* Adds tracking parameters for WP SEO settings. Outside of the main class as the class could also be in use in other plugins.
|
||||
*
|
||||
* @param array $options
|
||||
*
|
||||
* @return array
|
||||
*/
|
||||
function wpseo_tracking_additions( $options ) {
|
||||
if ( function_exists( 'curl_version' ) ) {
|
||||
$curl = curl_version();
|
||||
}
|
||||
else {
|
||||
$curl = null;
|
||||
}
|
||||
|
||||
|
||||
$opt = WPSEO_Options::get_all();
|
||||
|
||||
$options['wpseo'] = array(
|
||||
'xml_sitemaps' => ( $opt['enablexmlsitemap'] === true ) ? 1 : 0,
|
||||
'force_rewrite' => ( $opt['forcerewritetitle'] === true ) ? 1 : 0,
|
||||
'opengraph' => ( $opt['opengraph'] === true ) ? 1 : 0,
|
||||
'twitter' => ( $opt['twitter'] === true ) ? 1 : 0,
|
||||
'strip_category_base' => ( $opt['stripcategorybase'] === true ) ? 1 : 0,
|
||||
'on_front' => get_option( 'show_on_front' ),
|
||||
'wmt_alexa' => ( ! empty( $opt['alexaverify'] ) ) ? 1 : 0,
|
||||
'wmt_bing' => ( ! empty( $opt['msverify'] ) ) ? 1 : 0,
|
||||
'wmt_google' => ( ! empty( $opt['googleverify'] ) ) ? 1 : 0,
|
||||
'wmt_pinterest' => ( ! empty( $opt['pinterestverify'] ) ) ? 1 : 0,
|
||||
'wmt_yandex' => ( ! empty( $opt['yandexverify'] ) ) ? 1 : 0,
|
||||
'permalinks_clean' => ( $opt['cleanpermalinks'] == 1 ) ? 1 : 0,
|
||||
'site_db_charset' => DB_CHARSET,
|
||||
'webserver_apache' => WPSEO_Utils::is_apache() ? 1 : 0,
|
||||
'webserver_apache_version' => function_exists( 'apache_get_version' ) ? apache_get_version() : 0,
|
||||
'webserver_nginx' => WPSEO_Utils::is_nginx() ? 1 : 0,
|
||||
'webserver_server_software' => $_SERVER['SERVER_SOFTWARE'],
|
||||
'webserver_gateway_interface' => $_SERVER['GATEWAY_INTERFACE'],
|
||||
'webserver_server_protocol' => $_SERVER['SERVER_PROTOCOL'],
|
||||
'php_version' => phpversion(),
|
||||
'php_max_execution_time' => ini_get( 'max_execution_time' ),
|
||||
'php_memory_limit' => ini_get( 'memory_limit' ),
|
||||
'php_open_basedir' => ini_get( 'open_basedir' ),
|
||||
'php_bcmath_enabled' => extension_loaded( 'bcmath' ) ? 1 : 0,
|
||||
'php_ctype_enabled' => extension_loaded( 'ctype' ) ? 1 : 0,
|
||||
'php_curl_enabled' => extension_loaded( 'curl' ) ? 1 : 0,
|
||||
'php_curl_version_a' => phpversion( 'curl' ),
|
||||
'php_curl' => ( ! is_null( $curl ) ) ? $curl['version'] : 0,
|
||||
'php_dom_enabled' => extension_loaded( 'dom' ) ? 1 : 0,
|
||||
'php_dom_version' => phpversion( 'dom' ),
|
||||
'php_filter_enabled' => extension_loaded( 'filter' ) ? 1 : 0,
|
||||
'php_mbstring_enabled' => extension_loaded( 'mbstring' ) ? 1 : 0,
|
||||
'php_mbstring_version' => phpversion( 'mbstring' ),
|
||||
'php_pcre_enabled' => extension_loaded( 'pcre' ) ? 1 : 0,
|
||||
'php_pcre_version' => phpversion( 'pcre' ),
|
||||
'php_pcre_with_utf8_a' => @preg_match( '/^.{1}$/u', 'ñ', $UTF8_ar ),
|
||||
'php_pcre_with_utf8_b' => defined( 'PREG_BAD_UTF8_ERROR' ),
|
||||
'php_spl_enabled' => extension_loaded( 'spl' ) ? 1 : 0,
|
||||
);
|
||||
|
||||
return $options;
|
||||
}
|
||||
|
||||
add_filter( 'yoast_tracking_filters', 'wpseo_tracking_additions' );
|
||||
@@ -0,0 +1,164 @@
|
||||
<?php
|
||||
/**
|
||||
* @package WPSEO\Admin
|
||||
*/
|
||||
|
||||
/**
|
||||
* Class to change or add WordPress dashboard widgets
|
||||
*/
|
||||
class Yoast_Dashboard_Widget {
|
||||
|
||||
const CACHE_TRANSIENT_KEY = 'wpseo-dashboard-totals';
|
||||
|
||||
/**
|
||||
* @var WPSEO_Statistics
|
||||
*/
|
||||
protected $statistics;
|
||||
|
||||
/**
|
||||
* @param WPSEO_Statistics $statistics The statistics class to retrieve statistics from.
|
||||
*/
|
||||
public function __construct( WPSEO_Statistics $statistics = null ) {
|
||||
if ( null === $statistics ) {
|
||||
$statistics = new WPSEO_Statistics();
|
||||
}
|
||||
|
||||
$this->statistics = $statistics;
|
||||
|
||||
add_action( 'admin_enqueue_scripts', array( $this, 'enqueue_dashboard_stylesheet' ) );
|
||||
add_action( 'wp_dashboard_setup', array( $this, 'add_dashboard_widget' ) );
|
||||
add_action( 'wp_insert_post', array( $this, 'clear_cache' ) );
|
||||
add_action( 'delete_post', array( $this, 'clear_cache' ) );
|
||||
}
|
||||
|
||||
/**
|
||||
* Adds dashboard widget to WordPress
|
||||
*/
|
||||
public function add_dashboard_widget() {
|
||||
wp_add_dashboard_widget(
|
||||
'wpseo-dashboard-overview',
|
||||
/* translators: %s is the plugin name */
|
||||
sprintf( __( '%s Posts Overview', 'wordpress-seo' ), 'Yoast SEO' ),
|
||||
array( $this, 'display_dashboard_widget' )
|
||||
);
|
||||
}
|
||||
|
||||
/**
|
||||
* Display the dashboard widget
|
||||
*/
|
||||
public function display_dashboard_widget() {
|
||||
$statistics = $this->statistic_items();
|
||||
|
||||
include WPSEO_PATH . '/admin/views/dashboard-widget.php';
|
||||
}
|
||||
|
||||
/**
|
||||
* Enqueue's stylesheet for the dashboard if the current page is the dashboard
|
||||
*/
|
||||
public function enqueue_dashboard_stylesheet() {
|
||||
if ( 'dashboard' === get_current_screen()->id ) {
|
||||
wp_enqueue_style( 'wpseo-wp-dashboard', plugins_url( 'css/dashboard' . WPSEO_CSSJS_SUFFIX . '.css', WPSEO_FILE ), array(), WPSEO_VERSION );
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Clears the dashboard widget items cache
|
||||
*/
|
||||
public function clear_cache() {
|
||||
delete_transient( self::CACHE_TRANSIENT_KEY );
|
||||
}
|
||||
|
||||
/**
|
||||
* An array representing items to be added to the At a Glance dashboard widget
|
||||
*
|
||||
* @return array
|
||||
*/
|
||||
private function statistic_items() {
|
||||
$transient = get_transient( self::CACHE_TRANSIENT_KEY );
|
||||
$user_id = get_current_user_id();
|
||||
|
||||
if ( isset( $transient[ $user_id ][1] ) ) {
|
||||
return $transient[ $user_id ];
|
||||
}
|
||||
|
||||
return $this->set_statistic_items_for_this_user( $transient );
|
||||
}
|
||||
|
||||
/**
|
||||
* Set the cache for a specific user
|
||||
*
|
||||
* @param array|boolean $transient The current stored transient with the cached data.
|
||||
*
|
||||
* @return mixed
|
||||
*/
|
||||
private function set_statistic_items_for_this_user( $transient ) {
|
||||
if ( $transient === false ) {
|
||||
$transient = array();
|
||||
}
|
||||
|
||||
$user_id = get_current_user_id();
|
||||
$filtered_items[ $user_id ] = array_filter( $this->get_seo_scores_with_post_count(), array( $this, 'filter_items' ) );
|
||||
|
||||
set_transient( self::CACHE_TRANSIENT_KEY, array_merge( $filtered_items, $transient ), DAY_IN_SECONDS );
|
||||
|
||||
return $filtered_items[ $user_id ];
|
||||
}
|
||||
|
||||
/**
|
||||
* Set the SEO scores belonging to their SEO score result
|
||||
*
|
||||
* @return array
|
||||
*/
|
||||
private function get_seo_scores_with_post_count() {
|
||||
return array(
|
||||
array(
|
||||
'seo_rank' => 'good',
|
||||
'title' => __( 'Posts with good SEO score', 'wordpress-seo' ),
|
||||
'class' => 'wpseo-glance-good',
|
||||
'count' => $this->statistics->get_good_seo_post_count(),
|
||||
),
|
||||
array(
|
||||
'seo_rank' => 'ok',
|
||||
'title' => __( 'Posts with OK SEO score', 'wordpress-seo' ),
|
||||
'class' => 'wpseo-glance-ok',
|
||||
'count' => $this->statistics->get_ok_seo_post_count(),
|
||||
),
|
||||
array(
|
||||
'seo_rank' => 'poor',
|
||||
'title' => __( 'Posts with poor SEO score', 'wordpress-seo' ),
|
||||
'class' => 'wpseo-glance-poor',
|
||||
'count' => $this->statistics->get_poor_seo_post_count(),
|
||||
),
|
||||
array(
|
||||
'seo_rank' => 'bad',
|
||||
'title' => __( 'Posts with bad SEO score', 'wordpress-seo' ),
|
||||
'class' => 'wpseo-glance-bad',
|
||||
'count' => $this->statistics->get_bad_seo_post_count(),
|
||||
),
|
||||
array(
|
||||
'seo_rank' => 'na',
|
||||
'title' => __( 'Posts without focus keyword', 'wordpress-seo' ),
|
||||
'class' => 'wpseo-glance-na',
|
||||
'count' => $this->statistics->get_no_focus_post_count(),
|
||||
),
|
||||
array(
|
||||
'seo_rank' => 'noindex',
|
||||
/* translators: %s expands to <code>noindex</code> */
|
||||
'title' => sprintf( __( 'Posts that are set to %s', 'wordpress-seo' ), '<code>noindex</code>' ),
|
||||
'class' => 'wpseo-glance-noindex',
|
||||
'count' => $this->statistics->get_no_index_post_count(),
|
||||
),
|
||||
);
|
||||
}
|
||||
|
||||
/**
|
||||
* Filter items if they have a count of zero
|
||||
*
|
||||
* @param array $item
|
||||
*
|
||||
* @return bool
|
||||
*/
|
||||
private function filter_items( $item ) {
|
||||
return 0 !== $item['count'];
|
||||
}
|
||||
}
|
||||
@@ -99,7 +99,7 @@ class Yoast_Form {
|
||||
* Generates the footer for admin pages
|
||||
*
|
||||
* @param bool $submit Whether or not a submit button and form end tag should be shown.
|
||||
* @param bool $show_sidebar Whether or not to show the banner sidebar - used by premium plugins to disable it
|
||||
* @param bool $show_sidebar Whether or not to show the banner sidebar - used by premium plugins to disable it.
|
||||
*/
|
||||
public function admin_footer( $submit = true, $show_sidebar = true ) {
|
||||
if ( $submit ) {
|
||||
@@ -148,7 +148,7 @@ class Yoast_Form {
|
||||
*/
|
||||
public function admin_sidebar() {
|
||||
|
||||
// No banners in Premium
|
||||
// No banners in Premium.
|
||||
if ( class_exists( 'WPSEO_Product_Premium' ) ) {
|
||||
$license_manager = new Yoast_Plugin_License_Manager( new WPSEO_Product_Premium() );
|
||||
if ( $license_manager->license_is_valid() ) {
|
||||
@@ -168,7 +168,7 @@ class Yoast_Form {
|
||||
array(
|
||||
'url' => 'https://yoast.com/wordpress/plugins/seo-premium/#utm_source=wordpress-seo-config&utm_medium=banner&utm_campaign=premium-seo-banner',
|
||||
'img' => 'banner-premium-seo.png',
|
||||
'alt' => 'Banner WordPress SEO Premium',
|
||||
'alt' => 'Banner Yoast SEO Premium',
|
||||
),
|
||||
);
|
||||
|
||||
@@ -176,7 +176,7 @@ class Yoast_Form {
|
||||
$plugin_banners[] = array(
|
||||
'url' => 'https://yoast.com/wordpress/plugins/video-seo/#utm_source=wordpress-seo-config&utm_medium=banner&utm_campaign=video-seo-banner',
|
||||
'img' => 'banner-video-seo.png',
|
||||
'alt' => 'Banner WordPress SEO Video SEO extension',
|
||||
'alt' => 'Banner Yoast Video SEO plugin',
|
||||
);
|
||||
}
|
||||
|
||||
@@ -184,7 +184,7 @@ class Yoast_Form {
|
||||
$plugin_banners[] = array(
|
||||
'url' => 'https://yoast.com/wordpress/plugins/yoast-woocommerce-seo/#utm_source=wordpress-seo-config&utm_medium=banner&utm_campaign=woocommerce-seo-banner',
|
||||
'img' => 'banner-woocommerce-seo.png',
|
||||
'alt' => 'Banner WooCommerce SEO plugin',
|
||||
'alt' => 'Banner Yoast WooCommerce SEO plugin',
|
||||
);
|
||||
}
|
||||
|
||||
@@ -192,7 +192,7 @@ class Yoast_Form {
|
||||
$plugin_banners[] = array(
|
||||
'url' => 'https://yoast.com/wordpress/plugins/local-seo/#utm_source=wordpress-seo-config&utm_medium=banner&utm_campaign=local-seo-banner',
|
||||
'img' => 'banner-local-seo.png',
|
||||
'alt' => 'Banner Local SEO plugin',
|
||||
'alt' => 'Banner Yoast Local SEO plugin',
|
||||
);
|
||||
}
|
||||
|
||||
@@ -200,7 +200,7 @@ class Yoast_Form {
|
||||
$plugin_banners[] = array(
|
||||
'url' => 'https://yoast.com/wordpress/plugins/news-seo/#utm_source=wordpress-seo-config&utm_medium=banner&utm_campaign=news-seo-banner',
|
||||
'img' => 'banner-news-seo.png',
|
||||
'alt' => 'Banner News SEO',
|
||||
'alt' => 'Banner Yoast News SEO plugin',
|
||||
);
|
||||
}
|
||||
|
||||
@@ -220,12 +220,14 @@ class Yoast_Form {
|
||||
if ( $i == 2 ) {
|
||||
break;
|
||||
}
|
||||
echo '<a target="_blank" href="' . esc_url( $banner['url'] ) . '"><img width="261" src="' . plugins_url( 'images/' . $banner['img'], WPSEO_FILE ) . '" alt="' . esc_attr( $banner['alt'] ) . '"/></a><br/><br/>';
|
||||
echo '<a target="_blank" href="' . esc_url( $banner['url'] ) . '"><img width="261" height="130" src="' . plugins_url( 'images/' . $banner['img'], WPSEO_FILE ) . '" alt="' . esc_attr( $banner['alt'] ) . '"/></a><br/><br/>';
|
||||
$i ++;
|
||||
}
|
||||
?>
|
||||
<strong><?php _e( 'Remove these ads?', 'wordpress-seo' ); ?></strong><br/>
|
||||
<a target="_blank" href="https://yoast.com/wordpress/plugins/seo-premium/#utm_source=wordpress-seo-config&utm_medium=textlink&utm_campaign=remove-ads-link"><?php _e( 'Upgrade to WordPress SEO Premium »', 'wordpress-seo' ); ?></a><br/><br/>
|
||||
<a target="_blank" href="https://yoast.com/wordpress/plugins/seo-premium/#utm_source=wordpress-seo-config&utm_medium=textlink&utm_campaign=remove-ads-link"><?php
|
||||
/* translators: %1$s expands to Yoast SEO Premium */
|
||||
printf( __( 'Upgrade to %1$s »', 'wordpress-seo' ), 'Yoast SEO Premium' ); ?></a><br/><br/>
|
||||
</div>
|
||||
</div>
|
||||
<?php
|
||||
@@ -291,7 +293,7 @@ class Yoast_Form {
|
||||
*
|
||||
* @param string $var The variable within the option to create the text input field for.
|
||||
* @param string $label The label to show for the variable.
|
||||
* @param array|string $attr Extra class to add to the input field
|
||||
* @param array|string $attr Extra class to add to the input field.
|
||||
*/
|
||||
public function textinput( $var, $label, $attr = array() ) {
|
||||
if ( ! is_array( $attr ) ) {
|
||||
@@ -337,7 +339,7 @@ class Yoast_Form {
|
||||
* Create a hidden input field.
|
||||
*
|
||||
* @param string $var The variable within the option to create the hidden input for.
|
||||
* @param string $id The ID of the element
|
||||
* @param string $id The ID of the element.
|
||||
*/
|
||||
public function hidden( $var, $id = '' ) {
|
||||
$val = ( isset( $this->options[ $var ] ) ) ? $this->options[ $var ] : '';
|
||||
@@ -453,4 +455,4 @@ class Yoast_Form {
|
||||
echo '<div class="clear"></div>';
|
||||
echo '</div><br/>';
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -27,22 +27,18 @@ class Yoast_Notification_Center {
|
||||
*/
|
||||
private function __construct() {
|
||||
|
||||
// Load the notifications from cookie
|
||||
// Load the notifications from cookie.
|
||||
$this->notifications = $this->get_notifications_from_transient();
|
||||
|
||||
// Clear the cookie
|
||||
// Clear the cookie.
|
||||
if ( count( $this->notifications ) > 0 ) {
|
||||
$this->remove_transient();
|
||||
}
|
||||
|
||||
// Display the notifications in all_admin_notices
|
||||
add_action( 'all_admin_notices', array( $this, 'display_notifications' ) );
|
||||
|
||||
// Write the cookie on shutdown
|
||||
add_action( 'shutdown', array( $this, 'set_transient' ) );
|
||||
|
||||
// AJAX
|
||||
add_action( 'wp_ajax_yoast_get_notifications', array( $this, 'ajax_get_notifications' ) );
|
||||
add_action( 'wpseo_deactivate', array( $this, 'deactivate_hook' ) );
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -66,21 +62,21 @@ class Yoast_Notification_Center {
|
||||
*/
|
||||
private function get_notifications_from_transient() {
|
||||
|
||||
// The notifications array
|
||||
// The notifications array.
|
||||
$notifications = array();
|
||||
|
||||
$transient_notifications = get_transient( self::TRANSIENT_KEY );
|
||||
|
||||
// Check if cookie is set
|
||||
// Check if cookie is set.
|
||||
if ( false !== $transient_notifications ) {
|
||||
|
||||
// Get json notifications from cookie
|
||||
// Get json notifications from cookie.
|
||||
$json_notifications = json_decode( $transient_notifications, true );
|
||||
|
||||
// Create Yoast_Notification objects
|
||||
// Create Yoast_Notification objects.
|
||||
if ( count( $json_notifications ) > 0 ) {
|
||||
foreach ( $json_notifications as $json_notification ) {
|
||||
$notifications[] = new Yoast_Notification( $json_notification['message'], $json_notification['type'] );
|
||||
$notifications[] = new Yoast_Notification( $json_notification['message'], $json_notification['options'] );
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -103,22 +99,29 @@ class Yoast_Notification_Center {
|
||||
}
|
||||
|
||||
/**
|
||||
* Write the notifications to cookie
|
||||
* Remove transient when the plugin is deactivated
|
||||
*/
|
||||
public function deactivate_hook() {
|
||||
$this->clear_notifications();
|
||||
}
|
||||
|
||||
/**
|
||||
* Write the notifications to a cookie (hooked on shutdown)
|
||||
*/
|
||||
public function set_transient() {
|
||||
|
||||
// Count local stored notifications
|
||||
// Count local stored notifications.
|
||||
if ( count( $this->notifications ) > 0 ) {
|
||||
|
||||
// Create array with all notifications
|
||||
// Create array with all notifications.
|
||||
$arr_notifications = array();
|
||||
|
||||
// Add each notification as array to $arr_notifications
|
||||
// Add each notification as array to $arr_notifications.
|
||||
foreach ( $this->notifications as $notification ) {
|
||||
$arr_notifications[] = $notification->to_array();
|
||||
}
|
||||
|
||||
// Set the cookie with notifications
|
||||
// Set the cookie with notifications.
|
||||
set_transient( self::TRANSIENT_KEY, json_encode( $arr_notifications ), ( MINUTE_IN_SECONDS * 10 ) );
|
||||
}
|
||||
}
|
||||
@@ -136,15 +139,16 @@ class Yoast_Notification_Center {
|
||||
* Display the notifications
|
||||
*/
|
||||
public function display_notifications() {
|
||||
$this->notifications = array_unique( $this->notifications );
|
||||
|
||||
// Display notifications
|
||||
// Display notifications.
|
||||
if ( count( $this->notifications ) > 0 ) {
|
||||
foreach ( $this->notifications as $notification ) {
|
||||
$notification->output();
|
||||
echo $notification;
|
||||
}
|
||||
}
|
||||
|
||||
// Clear the local stored notifications
|
||||
// Clear the local stored notifications.
|
||||
$this->clear_notifications();
|
||||
}
|
||||
|
||||
@@ -153,11 +157,11 @@ class Yoast_Notification_Center {
|
||||
*/
|
||||
public function ajax_get_notifications() {
|
||||
|
||||
// Display the notices
|
||||
// Display the notices.
|
||||
$this->display_notifications();
|
||||
|
||||
// AJAX die
|
||||
// AJAX die.
|
||||
exit;
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
@@ -1,6 +1,6 @@
|
||||
<?php
|
||||
/**
|
||||
* @package WPSEO\Admin
|
||||
* @package WPSEO\Admin
|
||||
* @since 1.5.3
|
||||
*/
|
||||
|
||||
@@ -8,54 +8,38 @@
|
||||
* Implements individual notification.
|
||||
*/
|
||||
class Yoast_Notification {
|
||||
/**
|
||||
* Contains optional arguments:
|
||||
*
|
||||
* - type: The notification type, i.e. 'updated' or 'error'
|
||||
* - id: The ID of the notification
|
||||
* - nonce: Security nonce to use in case of dismissible notice.
|
||||
*
|
||||
* @var array
|
||||
*/
|
||||
private $options;
|
||||
|
||||
/**
|
||||
* @var string The notification message
|
||||
* Contains default values for the optional arguments
|
||||
*
|
||||
* @var array
|
||||
*/
|
||||
private $message;
|
||||
|
||||
/**
|
||||
* @var string The notification type, i.e. 'updated' or 'error'
|
||||
*/
|
||||
private $type;
|
||||
private $defaults = array(
|
||||
'type' => 'updated',
|
||||
'id' => '',
|
||||
'nonce' => null,
|
||||
'data_json' => array(),
|
||||
);
|
||||
|
||||
/**
|
||||
* The Constructor
|
||||
*
|
||||
* @param String $message
|
||||
* @param String $type
|
||||
* @param string $message
|
||||
* @param array $options
|
||||
*/
|
||||
public function __construct( $message, $type = 'updated' ) {
|
||||
$this->message = $message;
|
||||
$this->type = $type;
|
||||
}
|
||||
|
||||
/**
|
||||
* @return String
|
||||
*/
|
||||
public function get_message() {
|
||||
return $this->message;
|
||||
}
|
||||
|
||||
/**
|
||||
* @param String $message
|
||||
*/
|
||||
public function set_message( $message ) {
|
||||
$this->message = $message;
|
||||
}
|
||||
|
||||
/**
|
||||
* @return String
|
||||
*/
|
||||
public function get_type() {
|
||||
return $this->type;
|
||||
}
|
||||
|
||||
/**
|
||||
* @param String $type
|
||||
*/
|
||||
public function set_type( $type ) {
|
||||
$this->type = $type;
|
||||
public function __construct( $message, $options = array() ) {
|
||||
$this->options = wp_parse_args( $options, $this->defaults );
|
||||
$this->message = $message;
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -65,16 +49,53 @@ class Yoast_Notification {
|
||||
*/
|
||||
public function to_array() {
|
||||
return array(
|
||||
'message' => $this->get_message(),
|
||||
'type' => $this->get_type()
|
||||
'message' => $this->message,
|
||||
'options' => $this->options,
|
||||
);
|
||||
}
|
||||
|
||||
/**
|
||||
* Output the message
|
||||
* Adds string (view) behaviour to the Notification
|
||||
*
|
||||
* @return string
|
||||
*/
|
||||
public function output() {
|
||||
echo '<div class="yoast-notice ', esc_attr( $this->get_type() ), '">', wpautop( $this->get_message() ), '</div>', PHP_EOL;
|
||||
public function __toString() {
|
||||
return '<div class="yoast-notice notice is-dismissible ' . esc_attr( $this->options['type'] ) . '" id="' . esc_attr( $this->options['id'] ) . '"' . $this->parse_data_attributes() . '>' . wpautop( $this->message ) . '</div>' . PHP_EOL;
|
||||
}
|
||||
|
||||
}
|
||||
/**
|
||||
* Parsing the data attributes
|
||||
*
|
||||
* @return string
|
||||
*/
|
||||
private function parse_data_attributes() {
|
||||
return $this->parse_nonce_attribute() . '' . $this->parse_data_json_attribute();
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns a data attribute containing the nonce if present
|
||||
*
|
||||
* @return string
|
||||
*/
|
||||
private function parse_nonce_attribute() {
|
||||
return ( ! empty( $this->options['nonce'] ) ? ' data-nonce="' . $this->options['nonce'] . '"' : '' );
|
||||
}
|
||||
|
||||
/**
|
||||
* Make it possible to pass some JSON data
|
||||
*
|
||||
* @return string
|
||||
*/
|
||||
private function parse_data_json_attribute() {
|
||||
if ( empty( $this->options['data_json'] ) ) {
|
||||
return '';
|
||||
}
|
||||
|
||||
// @codingStandardsIgnoreStart
|
||||
$data = ( function_exists( 'wp_json_encode' ) ) ? wp_json_encode( $this->options['data_json'] ) : json_encode( $this->options['data_json'] );
|
||||
// @codingStandardsIgnoreEnd
|
||||
|
||||
return " data-json='" . $data . "'";
|
||||
}
|
||||
|
||||
}
|
||||
@@ -43,7 +43,7 @@ class Yoast_Plugin_Conflict {
|
||||
/**
|
||||
* For the use of singleton pattern. Create instance of itself and return his instance
|
||||
*
|
||||
* @param string $class_name Give the classname to initialize. If classname is false (empty) it will use it's own __CLASS__
|
||||
* @param string $class_name Give the classname to initialize. If classname is false (empty) it will use it's own __CLASS__.
|
||||
*
|
||||
* @return Yoast_Plugin_Conflict
|
||||
*/
|
||||
@@ -65,13 +65,16 @@ class Yoast_Plugin_Conflict {
|
||||
*
|
||||
* 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
|
||||
// Set active plugins.
|
||||
$this->all_active_plugins = get_option( 'active_plugins' );
|
||||
|
||||
// Search for active plugins
|
||||
if ( filter_input( INPUT_GET, 'action' ) === 'deactivate' ) {
|
||||
$this->remove_deactivated_plugin();
|
||||
}
|
||||
|
||||
// Search for active plugins.
|
||||
$this->search_active_plugins();
|
||||
}
|
||||
|
||||
@@ -86,7 +89,7 @@ class Yoast_Plugin_Conflict {
|
||||
|
||||
static $sections_checked;
|
||||
|
||||
if ( $sections_checked == null ) {
|
||||
if ( $sections_checked === null ) {
|
||||
$sections_checked = array();
|
||||
}
|
||||
|
||||
@@ -96,24 +99,7 @@ class Yoast_Plugin_Conflict {
|
||||
|
||||
return $has_conflicts;
|
||||
}
|
||||
else {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Get plugin name from file
|
||||
*
|
||||
* @param string $plugin
|
||||
*
|
||||
* @return bool
|
||||
*/
|
||||
private function get_plugin_name( $plugin ) {
|
||||
$plugin_details = get_plugin_data( ABSPATH . '/wp-content/plugins/' . $plugin );
|
||||
|
||||
if ( $plugin_details['Name'] != '' ) {
|
||||
return $plugin_details['Name'];
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
@@ -132,12 +118,12 @@ class Yoast_Plugin_Conflict {
|
||||
require_once( ABSPATH . '/wp-admin/includes/plugin.php' );
|
||||
}
|
||||
|
||||
// Getting the active plugins by given section
|
||||
// Getting the active plugins by given section.
|
||||
$plugins = $this->active_plugins[ $plugin_section ];
|
||||
|
||||
$plugin_names = array();
|
||||
foreach ( $plugins as $plugin ) {
|
||||
if ( $name = $this->get_plugin_name( $plugin ) ) {
|
||||
if ( $name = WPSEO_Utils::get_plugin_name( $plugin ) ) {
|
||||
$plugin_names[] = '<em>' . $name . '</em>';
|
||||
}
|
||||
}
|
||||
@@ -155,7 +141,7 @@ class Yoast_Plugin_Conflict {
|
||||
*/
|
||||
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
|
||||
// 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 );
|
||||
}
|
||||
@@ -166,29 +152,41 @@ class Yoast_Plugin_Conflict {
|
||||
* Setting an error on the screen
|
||||
*
|
||||
* @param string $plugin_section
|
||||
* @param string $readable_plugin_section This is the value for the translation
|
||||
* @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 = '<h3>' . __( 'Warning!', 'wordpress-seo' ) . '</h3>';
|
||||
|
||||
/* translators: %s: 'Facebook & Open Graph' plugin name(s) of possibly conflicting plugin(s) */
|
||||
$error_message .= '<p>' . sprintf( __( 'The %s plugin(s) might cause issues when used in conjunction with Yoast WordPress SEO.', 'wordpress-seo' ), $plugins_as_string ) . '</p>';
|
||||
$error_message .= sprintf( $readable_plugin_section, $plugins_as_string ) . '<br/><br/>';
|
||||
/* translators: %1$s: 'Facebook & Open Graph' plugin name(s) of possibly conflicting plugin(s), %2$s to Yoast SEO */
|
||||
$error_message .= '<p>' . sprintf( __( 'The %1$s plugin(s) might cause issues when used in conjunction with %2$s.', 'wordpress-seo' ), $plugins_as_string, 'Yoast SEO' ) . '</p>';
|
||||
$error_message .= sprintf( $readable_plugin_section, 'Yoast SEO', $plugins_as_string ) . '<br/><br/>';
|
||||
$error_message .= '<p><strong>' . __( 'Recommended solution', 'wordpress-seo' ) . '</strong><br/>';
|
||||
|
||||
/* translators: %s: 'Facebook & Open Graph' plugin name(s) of possibly conflicting plugin(s) */
|
||||
$error_message .= sprintf( __( 'We recommend you deactivate %s and have another look at your WordPress SEO configuration using the button above.', 'wordpress-seo' ), $plugins_as_string ) . '</p>';
|
||||
/* translators: %1$s: 'Facebook & Open Graph' plugin name(s) of possibly conflicting plugin(s). %2$s to Yoast SEO */
|
||||
$error_message .= sprintf( __( 'We recommend you deactivate %1$s and have another look at your %2$s configuration using the button above.', 'wordpress-seo' ), $plugins_as_string, 'Yoast SEO' ) . '</p>';
|
||||
foreach ( $this->active_plugins[ $plugin_section ] as $plugin_file ) {
|
||||
|
||||
/* translators: %s: 'Facebook' plugin name of possibly conflicting plugin */
|
||||
$error_message .= '<a target="_blank" class="button-primary" href="' . wp_nonce_url( 'plugins.php?action=deactivate&plugin=' . $plugin_file . '&plugin_status=all', 'deactivate-plugin_' . $plugin_file ) . '">' . sprintf( __( 'Deactivate %s', 'wordpress-seo' ), $this->get_plugin_name( $plugin_file ) ) . '</a> ';
|
||||
$error_message .= '<a target="_blank" class="button-primary" href="' . wp_nonce_url( 'plugins.php?action=deactivate&plugin=' . $plugin_file . '&plugin_status=all', 'deactivate-plugin_' . $plugin_file ) . '">' . sprintf( __( 'Deactivate %s', 'wordpress-seo' ), WPSEO_Utils::get_plugin_name( $plugin_file ) ) . '</a> ';
|
||||
}
|
||||
$error_message .= '<p class="alignright"><small>' . __( 'This warning is generated by WordPress SEO by Yoast.', 'wordpress-seo' ) . '</small></p><div class="clear"></div>';
|
||||
|
||||
// Add the message to the notifications center
|
||||
Yoast_Notification_Center::get()->add_notification( new Yoast_Notification( $error_message, 'error' ) );
|
||||
/* translators: %1$s expands to Yoast SEO */
|
||||
$error_message .= '<p class="alignright"><small>' . sprintf( __( 'This warning is generated by %1$s.', 'wordpress-seo' ), 'Yoast SEO' ) . '</small></p><div class="clear"></div>';
|
||||
|
||||
// Add the message to the notifications center.
|
||||
Yoast_Notification_Center::get()->add_notification(
|
||||
new Yoast_Notification(
|
||||
$error_message,
|
||||
array(
|
||||
'type' => 'error yoast-dismissible',
|
||||
'id' => 'wpseo-dismiss-plugin-conflict',
|
||||
'nonce' => wp_create_nonce( 'dismiss-plugin-conflict' ),
|
||||
'data_json' => array( 'section' => $plugin_section, 'plugins' => $this->active_plugins[ $plugin_section ] ),
|
||||
)
|
||||
)
|
||||
);
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -209,6 +207,7 @@ class Yoast_Plugin_Conflict {
|
||||
* @param string $plugin_section
|
||||
*/
|
||||
protected function check_plugins_active( $plugins, $plugin_section ) {
|
||||
$plugins = $this->filter_already_dismissed( $plugin_section, $plugins );
|
||||
foreach ( $plugins as $plugin ) {
|
||||
if ( $this->check_plugin_is_active( $plugin ) ) {
|
||||
$this->add_active_plugin( $plugin_section, $plugin );
|
||||
@@ -216,6 +215,28 @@ class Yoast_Plugin_Conflict {
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Filter the already dismissed plugins
|
||||
*
|
||||
* @param string $plugin_section
|
||||
* @param array $plugins
|
||||
*
|
||||
* @return array
|
||||
*/
|
||||
protected function filter_already_dismissed( $plugin_section, array $plugins ) {
|
||||
$already_dismissed = get_user_option( 'wpseo_dismissed_conflicts', get_current_user_id() );
|
||||
|
||||
if ( ! empty( $already_dismissed[ $plugin_section ] ) ) {
|
||||
foreach ( $plugins as $array_key => $plugin ) {
|
||||
if ( in_array( $plugin, $already_dismissed[ $plugin_section ] ) ) {
|
||||
unset( $plugins[ $array_key ] );
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
return $plugins;
|
||||
}
|
||||
|
||||
/**
|
||||
* Check if given plugin exists in array with all_active_plugins
|
||||
*
|
||||
@@ -266,4 +287,16 @@ class Yoast_Plugin_Conflict {
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
* When being in the deactivation process the currently deactivated plugin has to be removed.
|
||||
*/
|
||||
private function remove_deactivated_plugin() {
|
||||
$deactivated_plugin = filter_input( INPUT_GET, 'plugin' );
|
||||
$key_to_remove = array_search( $deactivated_plugin, $this->all_active_plugins );
|
||||
|
||||
if ( $key_to_remove !== false ) {
|
||||
unset( $this->all_active_plugins[ $key_to_remove ] );
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
+43
-43
@@ -6,7 +6,7 @@
|
||||
/**
|
||||
* Modified (Reduced) TextStatistics Class
|
||||
*
|
||||
* Mostly removed functionality that isn't needed within the WordPress SEO plugin.
|
||||
* Mostly removed functionality that isn't needed within the Yoast SEO plugin.
|
||||
*
|
||||
* @link http://code.google.com/p/php-text-statistics/
|
||||
* @link https://github.com/DaveChild/Text-Statistics (new repo location)
|
||||
@@ -50,7 +50,7 @@ class Yoast_TextStatistics {
|
||||
/**
|
||||
* Gives the Flesch-Kincaid Reading Ease of text entered rounded to one digit
|
||||
*
|
||||
* @param string $strText Text to be checked
|
||||
* @param string $strText Text to be checked.
|
||||
*
|
||||
* @return int|float
|
||||
*/
|
||||
@@ -64,7 +64,7 @@ class Yoast_TextStatistics {
|
||||
/**
|
||||
* Gives string length.
|
||||
*
|
||||
* @param string $strText Text to be measured
|
||||
* @param string $strText Text to be measured.
|
||||
*
|
||||
* @return int
|
||||
*/
|
||||
@@ -90,12 +90,12 @@ class Yoast_TextStatistics {
|
||||
/**
|
||||
* Gives letter count (ignores all non-letters). Tries mb_strlen and if that fails uses regular strlen.
|
||||
*
|
||||
* @param string $strText Text to be measured
|
||||
* @param string $strText Text to be measured.
|
||||
*
|
||||
* @return int
|
||||
*/
|
||||
public function letter_count( $strText ) {
|
||||
$strText = $this->clean_text( $strText ); // To clear out newlines etc
|
||||
$strText = $this->clean_text( $strText ); // To clear out newlines etc.
|
||||
$strText = preg_replace( '`[^A-Za-z]+`', '', $strText );
|
||||
|
||||
if ( ! $this->blnMbstring ) {
|
||||
@@ -119,7 +119,7 @@ class Yoast_TextStatistics {
|
||||
/**
|
||||
* Trims, removes line breaks, multiple spaces and generally cleans text before processing.
|
||||
*
|
||||
* @param string $strText Text to be transformed
|
||||
* @param string $strText Text to be transformed.
|
||||
*
|
||||
* @return string
|
||||
*/
|
||||
@@ -132,25 +132,25 @@ class Yoast_TextStatistics {
|
||||
return $clean[ $key ];
|
||||
}
|
||||
|
||||
// all these tags should be preceeded by a full stop.
|
||||
// All these tags should be preceeded by a full stop.
|
||||
$fullStopTags = array( 'li', 'p', 'h1', 'h2', 'h3', 'h4', 'h5', 'h6', 'dd' );
|
||||
foreach ( $fullStopTags as $tag ) {
|
||||
$strText = str_ireplace( '</' . $tag . '>', '.', $strText );
|
||||
}
|
||||
$strText = strip_tags( $strText );
|
||||
$strText = preg_replace( '`[",:;\(\)-]`', ' ', $strText ); // Replace commas, hyphens etc (count them as spaces)
|
||||
$strText = preg_replace( '`[\.!?]`', '.', $strText ); // Unify terminators
|
||||
$strText = preg_replace( '`[",:;\(\)-]`', ' ', $strText ); // Replace commas, hyphens etc (count them as spaces).
|
||||
$strText = preg_replace( '`[\.!?]`', '.', $strText ); // Unify terminators.
|
||||
$strText = trim( $strText ) . '.'; // Add final terminator, just in case it's missing.
|
||||
$strText = preg_replace( '`[ ]*(\n|\r\n|\r)[ ]*`', ' ', $strText ); // Replace new lines with spaces
|
||||
$strText = preg_replace( '`([\.])[\. ]+`', '$1', $strText ); // Check for duplicated terminators
|
||||
$strText = trim( preg_replace( '`[ ]*([\.])`', '$1 ', $strText ) ); // Pad sentence terminators
|
||||
$strText = preg_replace( '` [0-9]+ `', ' ', ' ' . $strText . ' ' ); // Remove "words" comprised only of numbers
|
||||
$strText = preg_replace( '`[ ]+`', ' ', $strText ); // Remove multiple spaces
|
||||
$strText = preg_replace_callback( '`\. [^ ]+?`', create_function( '$matches', 'return strtolower( $matches[0] );' ), $strText ); // Lower case all words following terminators (for gunning fog score)
|
||||
$strText = preg_replace( '`[ ]*(\n|\r\n|\r)[ ]*`', ' ', $strText ); // Replace new lines with spaces.
|
||||
$strText = preg_replace( '`([\.])[\. ]+`', '$1', $strText ); // Check for duplicated terminators.
|
||||
$strText = trim( preg_replace( '`[ ]*([\.])`', '$1 ', $strText ) ); // Pad sentence terminators.
|
||||
$strText = preg_replace( '` [0-9]+ `', ' ', ' ' . $strText . ' ' ); // Remove "words" comprised only of numbers.
|
||||
$strText = preg_replace( '`[ ]+`', ' ', $strText ); // Remove multiple spaces.
|
||||
$strText = preg_replace_callback( '`\. [^ ]+?`', create_function( '$matches', 'return strtolower( $matches[0] );' ), $strText ); // Lower case all words following terminators (for gunning fog score).
|
||||
|
||||
$strText = trim( $strText );
|
||||
|
||||
// Cache it and return
|
||||
// Cache it and return.
|
||||
$clean[ $key ] = $strText;
|
||||
|
||||
return $strText;
|
||||
@@ -159,7 +159,7 @@ class Yoast_TextStatistics {
|
||||
/**
|
||||
* Converts string to lower case. Tries mb_strtolower and if that fails uses regular strtolower.
|
||||
*
|
||||
* @param string $strText Text to be transformed
|
||||
* @param string $strText Text to be transformed.
|
||||
*
|
||||
* @return string
|
||||
*/
|
||||
@@ -186,7 +186,7 @@ class Yoast_TextStatistics {
|
||||
/**
|
||||
* Converts string to upper case. Tries mb_strtoupper and if that fails uses regular strtoupper.
|
||||
*
|
||||
* @param string $strText Text to be transformed
|
||||
* @param string $strText Text to be transformed.
|
||||
*
|
||||
* @return string
|
||||
*/
|
||||
@@ -212,7 +212,7 @@ class Yoast_TextStatistics {
|
||||
/**
|
||||
* Returns sentence count for text.
|
||||
*
|
||||
* @param string $strText Text to be measured
|
||||
* @param string $strText Text to be measured.
|
||||
*
|
||||
* @return int
|
||||
*/
|
||||
@@ -225,7 +225,7 @@ class Yoast_TextStatistics {
|
||||
// Will be tripped up by "Mr." or "U.K.". Not a major concern at this point.
|
||||
// [JRF] Will also be tripped up by ... or ?!
|
||||
// @todo [JRF => whomever] May be replace with something along the lines of this - will at least provide better count in ... and ?! situations:
|
||||
// $intSentences = max( 1, preg_match_all( '`[^\.!?]+[\.!?]+([\s]+|$)`u', $strText, $matches ) ); [/JRF]
|
||||
// $intSentences = max( 1, preg_match_all( '`[^\.!?]+[\.!?]+([\s]+|$)`u', $strText, $matches ) ); [/JRF].
|
||||
$intSentences = max( 1, $this->text_length( preg_replace( '`[^\.!?]`', '', $strText ) ) );
|
||||
|
||||
return $intSentences;
|
||||
@@ -234,7 +234,7 @@ class Yoast_TextStatistics {
|
||||
/**
|
||||
* Returns word count for text.
|
||||
*
|
||||
* @param string $strText Text to be measured
|
||||
* @param string $strText Text to be measured.
|
||||
*
|
||||
* @return int
|
||||
*/
|
||||
@@ -244,15 +244,15 @@ class Yoast_TextStatistics {
|
||||
}
|
||||
|
||||
$strText = $this->clean_text( $strText );
|
||||
// Will be tripped by em dashes with spaces either side, among other similar characters
|
||||
$intWords = ( 1 + $this->text_length( preg_replace( '`[^ ]`', '', $strText ) ) ); // Space count + 1 is word count
|
||||
// Will be tripped by em dashes with spaces either side, among other similar characters.
|
||||
$intWords = ( 1 + $this->text_length( preg_replace( '`[^ ]`', '', $strText ) ) ); // Space count + 1 is word count.
|
||||
return $intWords;
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns average words per sentence for text.
|
||||
*
|
||||
* @param string $strText Text to be measured
|
||||
* @param string $strText Text to be measured.
|
||||
*
|
||||
* @return int|float
|
||||
*/
|
||||
@@ -267,7 +267,7 @@ class Yoast_TextStatistics {
|
||||
/**
|
||||
* Returns average syllables per word for text.
|
||||
*
|
||||
* @param string $strText Text to be measured
|
||||
* @param string $strText Text to be measured.
|
||||
*
|
||||
* @return int|float
|
||||
*/
|
||||
@@ -287,7 +287,7 @@ class Yoast_TextStatistics {
|
||||
* Returns the number of syllables in the word.
|
||||
* Based in part on Greg Fast's Perl module Lingua::EN::Syllables
|
||||
*
|
||||
* @param string $strWord Word to be measured
|
||||
* @param string $strWord Word to be measured.
|
||||
*
|
||||
* @return int
|
||||
*/
|
||||
@@ -296,14 +296,14 @@ class Yoast_TextStatistics {
|
||||
return 0;
|
||||
}
|
||||
|
||||
// Should be no non-alpha characters
|
||||
// Should be no non-alpha characters.
|
||||
$strWord = preg_replace( '`[^A-Za-z]`', '', $strWord );
|
||||
|
||||
$intSyllableCount = 0;
|
||||
$strWord = $this->lower_case( $strWord );
|
||||
|
||||
// Specific common exceptions that don't follow the rule set below are handled individually
|
||||
// Array of problem words (with word as key, syllable count as value)
|
||||
// Specific common exceptions that don't follow the rule set below are handled individually.
|
||||
// Array of problem words (with word as key, syllable count as value).
|
||||
$arrProblemWords = array(
|
||||
'simile' => 3,
|
||||
'forever' => 3,
|
||||
@@ -316,7 +316,7 @@ class Yoast_TextStatistics {
|
||||
return $intSyllableCount;
|
||||
}
|
||||
|
||||
// These syllables would be counted as two but should be one
|
||||
// These syllables would be counted as two but should be one.
|
||||
$arrSubSyllables = array(
|
||||
'cial',
|
||||
'tia',
|
||||
@@ -332,13 +332,13 @@ class Yoast_TextStatistics {
|
||||
'rved?$',
|
||||
'[aeiouy][dt]es?$',
|
||||
'[aeiouy][^aeiouydt]e[rsd]?$',
|
||||
// Sorts out deal, deign etc
|
||||
// Sorts out deal, deign etc.
|
||||
'^[dr]e[aeiou][^aeiou]+$',
|
||||
// Purse, hearse
|
||||
// Purse, hearse.
|
||||
'[aeiouy]rse$',
|
||||
);
|
||||
|
||||
// These syllables would be counted as one but should be two
|
||||
// These syllables would be counted as one but should be two.
|
||||
$arrAddSyllables = array(
|
||||
'ia',
|
||||
'riet',
|
||||
@@ -359,7 +359,7 @@ class Yoast_TextStatistics {
|
||||
'ie(r|st)$',
|
||||
);
|
||||
|
||||
// Single syllable prefixes and suffixes
|
||||
// Single syllable prefixes and suffixes.
|
||||
$arrPrefixSuffix = array(
|
||||
'`^un`',
|
||||
'`^fore`',
|
||||
@@ -370,10 +370,10 @@ class Yoast_TextStatistics {
|
||||
'`ings?$`',
|
||||
);
|
||||
|
||||
// Remove prefixes and suffixes and count how many were taken
|
||||
// Remove prefixes and suffixes and count how many were taken.
|
||||
$strWord = preg_replace( $arrPrefixSuffix, '', $strWord, - 1, $intPrefixSuffixCount );
|
||||
|
||||
// Removed non-word characters from word
|
||||
// Removed non-word characters from word.
|
||||
$strWord = preg_replace( '`[^a-z]`is', '', $strWord );
|
||||
$arrWordParts = preg_split( '`[^aeiouy]+`', $strWord );
|
||||
$intWordPartCount = 0;
|
||||
@@ -383,8 +383,8 @@ class Yoast_TextStatistics {
|
||||
}
|
||||
}
|
||||
|
||||
// Some syllables do not follow normal rules - check for them
|
||||
// Thanks to Joe Kovar for correcting a bug in the following lines
|
||||
// Some syllables do not follow normal rules - check for them.
|
||||
// Thanks to Joe Kovar for correcting a bug in the following lines.
|
||||
$intSyllableCount = ( $intWordPartCount + $intPrefixSuffixCount );
|
||||
foreach ( $arrSubSyllables as $strSyllable ) {
|
||||
$intSyllableCount -= preg_match( '`' . $strSyllable . '`', $strWord );
|
||||
@@ -403,15 +403,15 @@ class Yoast_TextStatistics {
|
||||
* Also rounds result to specified precision.
|
||||
* Thanks to github.com/lvil.
|
||||
*
|
||||
* @param int|float $score Initial score
|
||||
* @param int $min Minimum score allowed
|
||||
* @param int $max Maximum score allowed
|
||||
* @param int $dps Round to # decimals
|
||||
* @param int|float $score Initial score.
|
||||
* @param int $min Minimum score allowed.
|
||||
* @param int $max Maximum score allowed.
|
||||
* @param int $dps Round to # decimals.
|
||||
*
|
||||
* @return int|float
|
||||
*/
|
||||
public function normalize_score( $score, $min, $max, $dps = 1 ) {
|
||||
$score = WPSEO_Utils::calc( $score, '+', 0, true, $dps ); // Round
|
||||
$score = WPSEO_Utils::calc( $score, '+', 0, true, $dps ); // Round.
|
||||
if ( ! $this->normalize ) {
|
||||
return $score;
|
||||
}
|
||||
@@ -0,0 +1,77 @@
|
||||
<?php
|
||||
/**
|
||||
* @package WPSEO\Admin|Google_Search_Console
|
||||
*/
|
||||
|
||||
/**
|
||||
* Class WPSEO_GSC_Ajax
|
||||
*/
|
||||
class WPSEO_GSC_Ajax {
|
||||
|
||||
/**
|
||||
* Setting the AJAX hooks for GSC
|
||||
*/
|
||||
public function __construct() {
|
||||
add_action( 'wp_ajax_wpseo_mark_fixed_crawl_issue', array( $this, 'ajax_mark_as_fixed' ) );
|
||||
add_action( 'wp_ajax_wpseo_gsc_create_redirect_url', array( $this, 'ajax_create_redirect' ) );
|
||||
add_action( 'wp_ajax_wpseo_dismiss_gsc', array( $this, 'dismiss_notice' ) );
|
||||
}
|
||||
|
||||
/**
|
||||
* This method will be access by an AJAX request and will mark an issue as fixed.
|
||||
*
|
||||
* First it will do a request to the Google API
|
||||
*/
|
||||
public function ajax_mark_as_fixed( ) {
|
||||
if ( $this->valid_nonce() ) {
|
||||
$marker = new WPSEO_GSC_Marker( filter_input( INPUT_POST, 'url' ) );
|
||||
|
||||
wp_die( $marker->get_response() );
|
||||
}
|
||||
|
||||
wp_die( 'false' );
|
||||
}
|
||||
|
||||
/**
|
||||
* Handling the request to create a new redirect from the issued URL
|
||||
*/
|
||||
public function ajax_create_redirect() {
|
||||
if ( $this->valid_nonce() && class_exists( 'WPSEO_URL_Redirect_Manager' ) && defined( 'WPSEO_PREMIUM_PATH' ) ) {
|
||||
$redirect_manager = new WPSEO_URL_Redirect_Manager();
|
||||
|
||||
$old_url = filter_input( INPUT_POST, 'old_url' );
|
||||
|
||||
// Creates the redirect.
|
||||
if ( $redirect_manager->create_redirect( $old_url, filter_input( INPUT_POST, 'new_url' ), filter_input( INPUT_POST, 'type' ) ) ) {
|
||||
if ( filter_input( INPUT_POST, 'mark_as_fixed' ) === 'true' ) {
|
||||
new WPSEO_GSC_Marker( $old_url );
|
||||
}
|
||||
|
||||
wp_die( 'true' );
|
||||
}
|
||||
}
|
||||
|
||||
wp_die( 'false' );
|
||||
}
|
||||
|
||||
/**
|
||||
* Handle the AJAX request and dismiss the GSC notice
|
||||
*/
|
||||
public function dismiss_notice() {
|
||||
check_ajax_referer( 'dismiss-gsc-notice' );
|
||||
|
||||
update_user_meta( get_current_user_id(), 'wpseo_dismissed_gsc_notice', true );
|
||||
|
||||
wp_die( 'true' );
|
||||
}
|
||||
|
||||
/**
|
||||
* Check if posted nonce is valid and return true if it is
|
||||
*
|
||||
* @return mixed
|
||||
*/
|
||||
private function valid_nonce() {
|
||||
return wp_verify_nonce( filter_input( INPUT_POST, 'ajax_nonce' ), 'wpseo-gsc-ajax-security' );
|
||||
}
|
||||
|
||||
}
|
||||
+93
@@ -0,0 +1,93 @@
|
||||
<?php
|
||||
/**
|
||||
* @package WPSEO\Admin|Google_Search_Console
|
||||
*/
|
||||
|
||||
/**
|
||||
* Class WPSEO_GSC_Bulk_Action
|
||||
*/
|
||||
class WPSEO_GSC_Bulk_Action {
|
||||
|
||||
/**
|
||||
* Setting the listener on the bulk action post
|
||||
*/
|
||||
public function __construct() {
|
||||
if ( wp_verify_nonce( filter_input( INPUT_POST, 'wpseo_gsc_nonce' ), 'wpseo_gsc_nonce' ) ) {
|
||||
$this->handle_bulk_action();
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Handles the bulk action when there is an action posted
|
||||
*/
|
||||
private function handle_bulk_action() {
|
||||
if ( $bulk_action = $this->determine_bulk_action() ) {
|
||||
$this->run_bulk_action( $bulk_action, $this->posted_issues() );
|
||||
|
||||
wp_redirect( filter_input( INPUT_POST, '_wp_http_referer' ) );
|
||||
exit;
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Determine which bulk action is selected and return that value
|
||||
*
|
||||
* @return string|bool
|
||||
*/
|
||||
private function determine_bulk_action() {
|
||||
// If posted action is the selected one above the table, return that value.
|
||||
if ( $action = filter_input( INPUT_POST, 'action' ) ) {
|
||||
return $action;
|
||||
}
|
||||
|
||||
// If posted action is the selected one below the table, return that value.
|
||||
if ( $action = filter_input( INPUT_POST, 'action2' ) ) {
|
||||
return $action;
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
/**
|
||||
* Get the posted issues and return them
|
||||
*
|
||||
* @return array
|
||||
*/
|
||||
private function posted_issues() {
|
||||
if ( $issues = filter_input( INPUT_POST, 'wpseo_crawl_issues', FILTER_DEFAULT, FILTER_REQUIRE_ARRAY ) ) {
|
||||
return $issues;
|
||||
}
|
||||
|
||||
// Fallback if issues are empty.
|
||||
return array();
|
||||
}
|
||||
|
||||
/**
|
||||
* Runs the bulk action
|
||||
*
|
||||
* @param string $bulk_action
|
||||
* @param array $issues
|
||||
*/
|
||||
private function run_bulk_action( $bulk_action, $issues ) {
|
||||
switch ( $bulk_action ) {
|
||||
case 'mark_as_fixed' :
|
||||
array_map( array( $this, 'action_mark_as_fixed' ), $issues );
|
||||
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Marks the issue as fixed
|
||||
*
|
||||
* @param string $issue
|
||||
*
|
||||
* @return string
|
||||
*/
|
||||
private function action_mark_as_fixed( $issue ) {
|
||||
new WPSEO_GSC_Marker( $issue );
|
||||
|
||||
return $issue;
|
||||
}
|
||||
|
||||
}
|
||||
+187
@@ -0,0 +1,187 @@
|
||||
<?php
|
||||
/**
|
||||
* @package WPSEO\Admin|Google_Search_Console
|
||||
*/
|
||||
|
||||
/**
|
||||
* Class WPSEO_GSC_Category_Filters
|
||||
*
|
||||
* This class will get all category counts from the options and will parse the filter links that are displayed above
|
||||
* the crawl issue tables.
|
||||
*/
|
||||
class WPSEO_GSC_Category_Filters {
|
||||
|
||||
/**
|
||||
* The counts per category
|
||||
*
|
||||
* @var array
|
||||
*/
|
||||
private $category_counts = array();
|
||||
|
||||
/**
|
||||
* All the possible filters
|
||||
*
|
||||
* @var array
|
||||
*/
|
||||
private $filter_values = array();
|
||||
|
||||
/**
|
||||
* The current category
|
||||
*
|
||||
* @var string
|
||||
*/
|
||||
private $category;
|
||||
|
||||
/**
|
||||
* Constructing this object
|
||||
*
|
||||
* Setting the hook to create the issues categories as the links
|
||||
*
|
||||
* @param array $platform_counts
|
||||
*/
|
||||
public function __construct( array $platform_counts ) {
|
||||
if ( ! empty( $platform_counts ) ) {
|
||||
$this->set_counts( $platform_counts );
|
||||
}
|
||||
|
||||
// Setting the filter values.
|
||||
$this->set_filter_values();
|
||||
|
||||
$this->category = $this->get_current_category();
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns the value of the current category
|
||||
*
|
||||
* @return mixed|string
|
||||
*/
|
||||
public function get_category() {
|
||||
return $this->category;
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns the current filters as an array
|
||||
*
|
||||
* Only return categories with more than 0 issues
|
||||
*
|
||||
* @return array
|
||||
*/
|
||||
public function as_array() {
|
||||
$new_views = array();
|
||||
|
||||
foreach ( $this->category_counts as $category_name => $category ) {
|
||||
$new_views[] = $this->create_view_link( $category_name, $category['count'] );
|
||||
}
|
||||
|
||||
return $new_views;
|
||||
}
|
||||
|
||||
/**
|
||||
* Getting the current view
|
||||
*/
|
||||
private function get_current_category() {
|
||||
if ( $current_category = filter_input( INPUT_GET, 'category' ) ) {
|
||||
return $current_category;
|
||||
}
|
||||
|
||||
// Just prevent redirect loops.
|
||||
if ( ! empty( $this->category_counts ) ) {
|
||||
$current_category = 'not_found';
|
||||
if ( empty( $this->category_counts[ $current_category ] ) ) {
|
||||
$current_category = key( $this->category_counts );
|
||||
}
|
||||
|
||||
// Just redirect to set the category.
|
||||
wp_redirect( add_query_arg( 'category', $current_category ) );
|
||||
exit;
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Setting the view counts based on the saved data. The info will be used to display the category filters
|
||||
*
|
||||
* @param array $platform_counts
|
||||
*/
|
||||
private function set_counts( array $platform_counts ) {
|
||||
$this->category_counts = $this->parse_counts( $platform_counts );
|
||||
}
|
||||
|
||||
/**
|
||||
* Setting the values for the filter
|
||||
*/
|
||||
private function set_filter_values() {
|
||||
$this->set_filter_value( 'access_denied', __( 'Access denied', 'wordpress-seo' ), __( 'Server requires authentication or is blocking Googlebot from accessing the site.', 'wordpress-seo' ) );
|
||||
$this->set_filter_value( 'faulty_redirects', __( 'Faulty redirects', 'wordpress-seo' ) );
|
||||
$this->set_filter_value( 'not_followed',__( 'Not followed', 'wordpress-seo' ) );
|
||||
$this->set_filter_value( 'not_found', __( 'Not found', 'wordpress-seo' ), __( 'URL points to a non-existent page.', 'wordpress-seo' ) );
|
||||
$this->set_filter_value( 'other', __( 'Other', 'wordpress-seo' ), __( 'Google was unable to crawl this URL due to an undetermined issue.', 'wordpress-seo' ) );
|
||||
/* Translators: %1$s: expands to '<code>robots.txt</code>'. */
|
||||
$this->set_filter_value( 'roboted', __( 'Blocked', 'wordpress-seo' ), sprintf( __( 'Googlebot could access your site, but certain URLs are blocked for Googlebot in your %1$s file. This block could either be for all Googlebots or even specifically for Googlebot-mobile.', 'wordpress-seo' ), '<code>robots.txt</code>' ) );
|
||||
$this->set_filter_value( 'server_error', __( 'Server Error', 'wordpress-seo' ), __( 'Request timed out or site is blocking Google.', 'wordpress-seo' ) );
|
||||
$this->set_filter_value( 'soft_404', __( 'Soft 404', 'wordpress-seo' ), __( "The target URL doesn't exist, but your server is not returning a 404 (file not found) error.", 'wordpress-seo' ) );
|
||||
}
|
||||
|
||||
/**
|
||||
* Add new filter value to the filter_values
|
||||
* @param string $key
|
||||
* @param string $value
|
||||
* @param string $description
|
||||
*/
|
||||
private function set_filter_value( $key, $value, $description = '' ) {
|
||||
$this->filter_values[ $key ] = array(
|
||||
'value' => $value,
|
||||
'description' => $description,
|
||||
);
|
||||
}
|
||||
|
||||
/**
|
||||
* Creates a filter link
|
||||
*
|
||||
* @param string $category
|
||||
* @param integer $count
|
||||
*
|
||||
* @return string
|
||||
*/
|
||||
private function create_view_link( $category, $count ) {
|
||||
$href = add_query_arg( array( 'category' => $category, 'paged' => 1 ) );
|
||||
|
||||
$class = 'gsc_category';
|
||||
|
||||
if ( $this->category === $category ) {
|
||||
$class .= ' current';
|
||||
}
|
||||
|
||||
$title = '';
|
||||
if ( $this->filter_values[ $category ]['description'] !== '' ) {
|
||||
$title = " title='" . esc_attr( $this->filter_values[ $category ]['description'] ) . "'";
|
||||
}
|
||||
|
||||
return sprintf(
|
||||
'<a href="%1$s" class="%2$s" %3$s>%4$s</a> (<span id="gsc_count_%5$s">%6$s</span>)',
|
||||
esc_attr( $href ),
|
||||
$class,
|
||||
$title,
|
||||
$this->filter_values[ $category ]['value'],
|
||||
$category,
|
||||
$count
|
||||
);
|
||||
}
|
||||
|
||||
/**
|
||||
* Parsing the category counts. When there are 0 issues for a specific category, just remove that one from the array
|
||||
*
|
||||
* @param array $category_counts
|
||||
*
|
||||
* @return mixed
|
||||
*/
|
||||
private function parse_counts( $category_counts ) {
|
||||
foreach ( $category_counts as $category_name => $category ) {
|
||||
if ( $category['count'] === '0' ) {
|
||||
unset( $category_counts[ $category_name ] );
|
||||
}
|
||||
}
|
||||
|
||||
return $category_counts;
|
||||
}
|
||||
|
||||
}
|
||||
@@ -0,0 +1,22 @@
|
||||
<?php
|
||||
/**
|
||||
* @package WPSEO\Admin
|
||||
*/
|
||||
|
||||
/**
|
||||
* Class WPSEO_GSC_Config
|
||||
*/
|
||||
class WPSEO_GSC_Config {
|
||||
|
||||
/**
|
||||
* @var array
|
||||
*/
|
||||
public static $gsc = array(
|
||||
'application_name' => 'Yoast SEO',
|
||||
'client_id' => '395430892738-ushj8aced0cji2j4bkq6bda6felaigb9.apps.googleusercontent.com',
|
||||
'client_secret' => 'c2kYgOwMhk1emWxQ3NaA8wOi',
|
||||
'redirect_uri' => 'urn:ietf:wg:oauth:2.0:oob',
|
||||
'scopes' => array( 'https://www.googleapis.com/auth/webmasters' ),
|
||||
);
|
||||
|
||||
}
|
||||
@@ -0,0 +1,222 @@
|
||||
<?php
|
||||
/**
|
||||
* @package WPSEO\Admin|Google_Search_Console
|
||||
*/
|
||||
|
||||
/**
|
||||
* Class WPSEO_GSC_Count
|
||||
*/
|
||||
class WPSEO_GSC_Count {
|
||||
|
||||
// The last checked timestamp.
|
||||
const OPTION_CI_LAST_FETCH = 'wpseo_gsc_last_fetch';
|
||||
|
||||
// The option name where the issues counts are saved.
|
||||
const OPTION_CI_COUNTS = 'wpseo_gsc_issues_counts';
|
||||
|
||||
/**
|
||||
* @var WPSEO_GSC_Service
|
||||
*/
|
||||
private $service;
|
||||
|
||||
/**
|
||||
* Holder for the fetched issues from GSC
|
||||
*
|
||||
* @var array
|
||||
*/
|
||||
private $issues = array();
|
||||
|
||||
/**
|
||||
* Fetching the counts
|
||||
*
|
||||
* @param WPSEO_GSC_Service $service
|
||||
*/
|
||||
public function __construct( WPSEO_GSC_Service $service ) {
|
||||
$this->service = $service;
|
||||
}
|
||||
|
||||
/**
|
||||
* Getting the counts for given platform and return them as an array
|
||||
*
|
||||
* @param string $platform
|
||||
*
|
||||
* @return array
|
||||
*/
|
||||
public function get_platform_counts( $platform ) {
|
||||
$counts = $this->get_counts();
|
||||
if ( array_key_exists( $platform, $counts ) ) {
|
||||
return $counts[ $platform ];
|
||||
}
|
||||
|
||||
return array();
|
||||
}
|
||||
|
||||
/**
|
||||
* Return the fetched issues
|
||||
*
|
||||
* @return array
|
||||
*/
|
||||
public function get_issues() {
|
||||
return $this->issues;
|
||||
}
|
||||
|
||||
/**
|
||||
* Listing the issues an gives them back as fetched issues
|
||||
*
|
||||
* @param string $platform
|
||||
* @param string $category
|
||||
*/
|
||||
public function list_issues( $platform, $category ) {
|
||||
$counts = $this->get_counts();
|
||||
|
||||
if ( array_key_exists( $platform, $counts ) ) {
|
||||
$counts[ $platform ] = $this->list_category_issues( $counts[ $platform ], $platform, $category );
|
||||
|
||||
// Write the new counts value.
|
||||
$this->set_counts( $counts );
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Getting the counts for given platform and category.
|
||||
*
|
||||
* @param string $platform
|
||||
* @param string $category
|
||||
*
|
||||
* @return integer
|
||||
*/
|
||||
public function get_issue_count( $platform, $category ) {
|
||||
$counts = $this->get_counts();
|
||||
|
||||
if ( ! empty( $counts[ $platform ][ $category ]['count'] ) ) {
|
||||
return $counts[ $platform ][ $category ]['count'];
|
||||
}
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
/**
|
||||
* Update the count of the issues
|
||||
*
|
||||
* @param string $platform
|
||||
* @param string $category
|
||||
* @param integer $new_count
|
||||
*/
|
||||
public function update_issue_count( $platform, $category, $new_count ) {
|
||||
$counts = $this->get_counts();
|
||||
|
||||
if ( ! empty( $counts[ $platform ][ $category ] ) && is_array( $counts[ $platform ][ $category ] ) ) {
|
||||
$counts[ $platform ][ $category ]['count'] = $new_count;
|
||||
}
|
||||
|
||||
$this->set_counts( $counts );
|
||||
}
|
||||
|
||||
/**
|
||||
* Fetching the counts from the GSC API
|
||||
*/
|
||||
public function fetch_counts() {
|
||||
if ( WPSEO_GSC_Settings::get_profile() && $this->get_last_fetch() <= strtotime( '-12 hours' ) ) {
|
||||
// Remove the timestamp.
|
||||
$this->remove_last_fetch();
|
||||
|
||||
// Getting the counts and parse them.
|
||||
$counts = $this->parse_counts( $this->service->get_crawl_issue_counts() );
|
||||
|
||||
// Fetching the counts by setting an option.
|
||||
$this->set_counts( $counts );
|
||||
|
||||
// Saving the current timestamp.
|
||||
$this->save_last_fetch();
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Parsing the received counts from the API and map the keys to plugin friendly values
|
||||
*
|
||||
* @param array $fetched_counts
|
||||
*
|
||||
* @return array
|
||||
*/
|
||||
private function parse_counts( array $fetched_counts ) {
|
||||
$counts = array();
|
||||
foreach ( $fetched_counts as $platform_name => $categories ) {
|
||||
$new_platform = WPSEO_GSC_Mapper::platform_from_api( $platform_name );
|
||||
|
||||
foreach ( $categories as $category_name => $category ) {
|
||||
$new_category = WPSEO_GSC_Mapper::category_from_api( $category_name );
|
||||
$counts[ $new_platform ][ $new_category ] = $category;
|
||||
}
|
||||
}
|
||||
|
||||
return $counts;
|
||||
}
|
||||
|
||||
/**
|
||||
* Listing the issues for current category.
|
||||
*
|
||||
* @param array $counts
|
||||
* @param string $platform
|
||||
* @param string $category
|
||||
*
|
||||
* @return array
|
||||
*/
|
||||
private function list_category_issues( array $counts, $platform, $category ) {
|
||||
// When the issues have to be fetched.
|
||||
if ( array_key_exists( $category, $counts ) && $counts[ $category ]['count'] > 0 && $counts[ $category ]['last_fetch'] <= strtotime( '-12 hours' ) ) {
|
||||
if ( $issues = $this->service->fetch_category_issues( WPSEO_GSC_Mapper::platform_to_api( $platform ), WPSEO_GSC_Mapper::category_to_api( $category ) ) ) {
|
||||
$this->issues = $issues;
|
||||
}
|
||||
|
||||
// Be sure the total count is correct.
|
||||
$counts[ $category ]['count'] = count( $this->issues );
|
||||
|
||||
// Set last fetch.
|
||||
$counts[ $category ]['last_fetch'] = time();
|
||||
}
|
||||
|
||||
return $counts;
|
||||
}
|
||||
|
||||
/**
|
||||
* Getting the counts from the options
|
||||
*
|
||||
* @return array
|
||||
*/
|
||||
private function get_counts() {
|
||||
return get_option( self::OPTION_CI_COUNTS, array() );
|
||||
}
|
||||
|
||||
/**
|
||||
* Fetching the counts from the service and store them in an option
|
||||
*
|
||||
* @param array $counts
|
||||
*/
|
||||
private function set_counts( array $counts ) {
|
||||
update_option( self::OPTION_CI_COUNTS, $counts );
|
||||
}
|
||||
|
||||
/**
|
||||
* Store the timestamp of when crawl errors were saved the last time.
|
||||
*/
|
||||
private function save_last_fetch() {
|
||||
add_option( self::OPTION_CI_LAST_FETCH, time(), '', 'no' );
|
||||
}
|
||||
|
||||
/**
|
||||
* Remove the last checked option
|
||||
*/
|
||||
private function remove_last_fetch() {
|
||||
delete_option( self::OPTION_CI_LAST_FETCH );
|
||||
}
|
||||
|
||||
/**
|
||||
* Get the timestamp of when the crawl errors were last saved
|
||||
*
|
||||
* @return int
|
||||
*/
|
||||
private function get_last_fetch() {
|
||||
return get_option( self::OPTION_CI_LAST_FETCH, 0 );
|
||||
}
|
||||
|
||||
}
|
||||
@@ -0,0 +1,85 @@
|
||||
<?php
|
||||
/**
|
||||
* @package WPSEO\Admin|Google_Search_Console
|
||||
*/
|
||||
|
||||
/**
|
||||
* Class WPSEO_GSC_Issue
|
||||
*/
|
||||
class WPSEO_GSC_Issue {
|
||||
|
||||
/**
|
||||
* @var string
|
||||
*/
|
||||
private $url;
|
||||
|
||||
/**
|
||||
* @var DateTime
|
||||
*/
|
||||
private $first_detected;
|
||||
|
||||
/**
|
||||
* @var DateTime
|
||||
*/
|
||||
private $last_crawled;
|
||||
|
||||
/**
|
||||
* @var string
|
||||
*/
|
||||
private $response_code;
|
||||
|
||||
/**
|
||||
* Constructor
|
||||
*
|
||||
* @param string $url
|
||||
* @param DateTime $first_detected
|
||||
* @param DateTime $last_crawled
|
||||
* @param string $response_code
|
||||
*/
|
||||
public function __construct( $url, DateTime $first_detected, DateTime $last_crawled, $response_code ) {
|
||||
$this->url = $url;
|
||||
$this->first_detected = $first_detected;
|
||||
$this->last_crawled = $last_crawled;
|
||||
$this->response_code = $response_code;
|
||||
}
|
||||
|
||||
/**
|
||||
* Put the class properties in array
|
||||
*
|
||||
* @return array
|
||||
*/
|
||||
public function to_array() {
|
||||
return array(
|
||||
'url' => $this->url,
|
||||
'first_detected' => $this->to_date_format( $this->first_detected ),
|
||||
'first_detected_raw' => $this->to_timestamp( $this->first_detected ),
|
||||
'last_crawled' => $this->to_date_format( $this->last_crawled ),
|
||||
'last_crawled_raw' => $this->to_timestamp( $this->last_crawled ),
|
||||
'response_code' => $this->response_code,
|
||||
);
|
||||
}
|
||||
|
||||
/**
|
||||
* Converting the date to a date format
|
||||
*
|
||||
* @param DateTime $date_to_convert
|
||||
* @param string $format
|
||||
*
|
||||
* @return string
|
||||
*/
|
||||
private function to_date_format( DateTime $date_to_convert, $format = 'Y-m-d H:i:s' ) {
|
||||
return (string) strftime( '%x', strtotime( $date_to_convert->format( $format ) ) );
|
||||
}
|
||||
|
||||
/**
|
||||
* Converting the date to a timestamp
|
||||
*
|
||||
* @param DateTime $date_to_convert
|
||||
*
|
||||
* @return string
|
||||
*/
|
||||
private function to_timestamp( DateTime $date_to_convert ) {
|
||||
return $date_to_convert->format( 'U' );
|
||||
}
|
||||
|
||||
}
|
||||
@@ -0,0 +1,176 @@
|
||||
<?php
|
||||
/**
|
||||
* @package WPSEO\Admin|Google_Search_Console
|
||||
*/
|
||||
|
||||
/**
|
||||
* Class WPSEO_GSC_Issues
|
||||
*/
|
||||
class WPSEO_GSC_Issues {
|
||||
|
||||
/**
|
||||
* @var string
|
||||
*/
|
||||
private $option_name = '';
|
||||
|
||||
/**
|
||||
* List of all current issues to compare with received issues
|
||||
*
|
||||
* @var array
|
||||
*/
|
||||
private $current_issues = array();
|
||||
|
||||
/**
|
||||
* Holder for all the issues
|
||||
*
|
||||
* @var array
|
||||
*/
|
||||
private $issues = array();
|
||||
|
||||
/**
|
||||
* Setting up the properties and fetching the current issues
|
||||
*
|
||||
* @param string $platform
|
||||
* @param string $category
|
||||
* @param array|bool $fetched_issues
|
||||
*/
|
||||
public function __construct( $platform, $category, $fetched_issues = false ) {
|
||||
$this->option_name = strtolower( 'wpseo-gsc-issues-' . $platform . '-' . $category );
|
||||
$this->issues = $this->get_issues();
|
||||
|
||||
if ( ! empty( $fetched_issues ) && is_array( $fetched_issues ) ) {
|
||||
$this->save_fetched_issues( $fetched_issues );
|
||||
}
|
||||
}
|
||||
/**
|
||||
* Getting the issues from the options.
|
||||
*
|
||||
* @return array
|
||||
*/
|
||||
public function get_issues() {
|
||||
return get_option( $this->option_name, array() );
|
||||
}
|
||||
|
||||
/**
|
||||
* Deleting the issue from the issues
|
||||
*
|
||||
* @param string $url
|
||||
*
|
||||
* @return bool
|
||||
*/
|
||||
public function delete_issue( $url ) {
|
||||
$target_issue = $this->get_issue_by_url( $url );
|
||||
if ( $target_issue !== false ) {
|
||||
unset( $this->issues[ $target_issue ] );
|
||||
|
||||
$this->save_issues( $this->issues );
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
/**
|
||||
* Fetching the issues for current category and compare them with the already existing issues.
|
||||
*
|
||||
* @param array $fetched_issues
|
||||
*/
|
||||
private function save_fetched_issues( array $fetched_issues ) {
|
||||
$this->set_current_issues();
|
||||
|
||||
$crawl_issues = $this->get_issues();
|
||||
|
||||
// Walk through the issues to do the comparison.
|
||||
foreach ( $fetched_issues as $issue ) {
|
||||
$this->issue_compare( $crawl_issues, $issue );
|
||||
}
|
||||
|
||||
$this->save_issues( $crawl_issues );
|
||||
|
||||
// Refresh the value of $this->issues.
|
||||
$this->issues = $this->get_issues();
|
||||
}
|
||||
|
||||
/**
|
||||
* Comparing the issue with the list of current existing issues
|
||||
*
|
||||
* @param array $crawl_issues
|
||||
* @param stdClass $issue
|
||||
*/
|
||||
private function issue_compare( &$crawl_issues, $issue ) {
|
||||
$issue->pageUrl = WPSEO_Utils::format_url( (string) $issue->pageUrl );
|
||||
|
||||
if ( ! in_array( $issue->pageUrl, $this->current_issues ) ) {
|
||||
array_push(
|
||||
$crawl_issues,
|
||||
$this->get_issue( $this->create_issue( $issue ) )
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* The fetched issue from the API will be parsed as an WPSEO_Crawl_Issue object. After initializing the issue as an
|
||||
* object, the object will be returned
|
||||
*
|
||||
* @param stdClass $issue
|
||||
*
|
||||
* @return WPSEO_GSC_Issue
|
||||
*/
|
||||
private function create_issue( $issue ) {
|
||||
return new WPSEO_GSC_Issue(
|
||||
$issue->pageUrl,
|
||||
new DateTime( (string) $issue->first_detected ),
|
||||
new DateTime( (string) $issue->last_crawled ),
|
||||
(string) ( ! empty( $issue->responseCode ) ) ? $issue->responseCode : null
|
||||
);
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns the crawl issue as an array.
|
||||
*
|
||||
* @param WPSEO_GSC_Issue $crawl_issue
|
||||
*
|
||||
* @return array()
|
||||
*/
|
||||
private function get_issue( WPSEO_GSC_Issue $crawl_issue ) {
|
||||
return $crawl_issue->to_array();
|
||||
}
|
||||
|
||||
/**
|
||||
* Saving the issues to the options. The target option is base on current platform and category.
|
||||
*
|
||||
* @param array $issues
|
||||
*/
|
||||
private function save_issues( array $issues ) {
|
||||
update_option( $this->option_name, $issues, false );
|
||||
}
|
||||
|
||||
/**
|
||||
* Getting the issues from the options and get only the URL out of it. This is because there will be a comparison
|
||||
* with the issues from the API.
|
||||
*/
|
||||
private function set_current_issues() {
|
||||
if ( ! empty( $this->issues ) ) {
|
||||
$this->current_issues = wp_list_pluck( $this->issues, 'url' );
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Search in the issues for the given $url
|
||||
*
|
||||
* @param string $url
|
||||
*
|
||||
* @return int|string
|
||||
*/
|
||||
private function get_issue_by_url( $url ) {
|
||||
foreach ( $this->issues as $key => $issue ) {
|
||||
if ( $url === $issue['url'] ) {
|
||||
return $key;
|
||||
}
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
}
|
||||
@@ -0,0 +1,113 @@
|
||||
<?php
|
||||
/**
|
||||
* @package WPSEO\Admin|Google_Search_Console
|
||||
*/
|
||||
|
||||
/**
|
||||
* Class WPSEO_GSC_Mapper
|
||||
*/
|
||||
class WPSEO_GSC_Mapper {
|
||||
|
||||
/**
|
||||
* The platforms which can be mapped.
|
||||
*
|
||||
* @var array
|
||||
*/
|
||||
private static $platforms = array(
|
||||
'web' => 'web',
|
||||
'mobile' => 'mobile',
|
||||
'smartphone_only' => 'smartphoneOnly',
|
||||
'settings' => 'settings', // This one is basicly not a platform, but a tab.
|
||||
);
|
||||
|
||||
/**
|
||||
* The categories which can be mapped
|
||||
*
|
||||
* @var array
|
||||
*/
|
||||
private static $categories = array(
|
||||
'access_denied' => 'authPermissions',
|
||||
'faulty_redirects' => 'manyToOneRedirect',
|
||||
'not_followed' => 'notFollowed',
|
||||
'not_found' => 'notFound',
|
||||
'other' => 'other',
|
||||
'roboted' => 'roboted',
|
||||
'server_error' => 'serverError',
|
||||
'soft_404' => 'soft404',
|
||||
);
|
||||
|
||||
/**
|
||||
* If there is no platform, just get the first key out of the array and redirect to it.
|
||||
*
|
||||
* @param string $platform
|
||||
*
|
||||
* @return mixed
|
||||
*/
|
||||
public static function get_current_platform( $platform ) {
|
||||
if ( $current_platform = filter_input( INPUT_GET, $platform ) ) {
|
||||
return $current_platform;
|
||||
}
|
||||
|
||||
wp_redirect( add_query_arg( $platform, key( self::$platforms ) ) );
|
||||
exit;
|
||||
}
|
||||
|
||||
/**
|
||||
* Mapping the platform
|
||||
*
|
||||
* @param string $platform
|
||||
*
|
||||
* @return mixed
|
||||
*/
|
||||
public static function platform_to_api( $platform ) {
|
||||
if ( ! empty( $platform ) && array_key_exists( $platform, self::$platforms ) ) {
|
||||
return self::$platforms[ $platform ];
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Mapping the given platform by value and return its key
|
||||
*
|
||||
* @param string $platform
|
||||
*
|
||||
* @return string
|
||||
*/
|
||||
public static function platform_from_api( $platform ) {
|
||||
if ( ! empty( $platform ) && $platform = array_search( $platform, self::$platforms ) ) {
|
||||
return $platform;
|
||||
}
|
||||
|
||||
return $platform;
|
||||
}
|
||||
|
||||
/**
|
||||
* Mapping the given category by searching for its key.
|
||||
*
|
||||
* @param string $category
|
||||
*
|
||||
* @return mixed
|
||||
*/
|
||||
public static function category_to_api( $category) {
|
||||
if ( ! empty( $category ) && array_key_exists( $category, self::$categories ) ) {
|
||||
return self::$categories[ $category ];
|
||||
}
|
||||
|
||||
return $category;
|
||||
}
|
||||
|
||||
/**
|
||||
* Mapping the given category by value and return its key
|
||||
*
|
||||
* @param string $category
|
||||
*
|
||||
* @return string
|
||||
*/
|
||||
public static function category_from_api( $category ) {
|
||||
if ( ! empty( $category ) && $category = array_search( $category, self::$categories ) ) {
|
||||
return $category;
|
||||
}
|
||||
|
||||
return $category;
|
||||
}
|
||||
|
||||
}
|
||||
Loaded 100 of 314 files, more files were not shown because too many files have changed in this diff.
Show more
Reference in new issue
Block a user