Synced folder

This commit is contained in:
Andreas Andersen 2026-04-17 23:07:12 +02:00
parent e1f4ba78c4
commit 3ec49b71eb
7 changed files with 1496 additions and 56 deletions

Binary file not shown.

Binary file not shown.

Binary file not shown.

File diff suppressed because it is too large Load diff

View file

@ -74,8 +74,155 @@
font-weight: 600; font-weight: 600;
} }
.ansico-wp-basic-settings-page .form-table th { .ansico-wp-basic-settings-page {
width: 280px; max-width: 1320px;
}
.ansico-wp-basic-page-header {
display: flex;
justify-content: space-between;
align-items: flex-start;
gap: 20px;
margin: 22px 0 20px;
}
.ansico-wp-basic-page-header h1 {
margin: 0 0 8px;
}
.ansico-wp-basic-page-intro {
margin: 0;
color: #50575e;
max-width: 760px;
}
.ansico-wp-basic-status-card,
.ansico-wp-basic-panel,
.ansico-wp-basic-settings-card,
.ansico-wp-basic-tool-card {
background: #fff;
border: 1px solid #dcdcde;
border-radius: 12px;
box-shadow: 0 1px 2px rgba(0, 0, 0, 0.04);
}
.ansico-wp-basic-status-card {
min-width: 260px;
padding: 16px 18px;
}
.ansico-wp-basic-status-label {
display: block;
font-size: 12px;
font-weight: 700;
letter-spacing: 0.03em;
text-transform: uppercase;
color: #50575e;
margin-bottom: 8px;
}
.ansico-wp-basic-status-muted {
color: #50575e;
}
.ansico-wp-basic-layout {
display: grid;
grid-template-columns: minmax(0, 1fr) 340px;
gap: 20px;
align-items: start;
}
.ansico-wp-basic-main-column,
.ansico-wp-basic-side-column,
.ansico-wp-basic-tool-stack {
display: grid;
gap: 20px;
}
.ansico-wp-basic-panel {
padding: 22px;
}
.ansico-wp-basic-panel-sticky {
position: sticky;
top: 42px;
}
.ansico-wp-basic-panel-header {
margin-bottom: 18px;
padding-bottom: 16px;
border-bottom: 1px solid #f0f0f1;
}
.ansico-wp-basic-panel-header h2 {
margin: 0 0 6px;
font-size: 20px;
line-height: 1.3;
}
.ansico-wp-basic-panel-header p,
.ansico-wp-basic-subsection > h3 + p {
margin: 0;
color: #50575e;
}
.ansico-wp-basic-field-list {
display: grid;
gap: 0;
}
.ansico-wp-basic-field-row {
display: grid;
grid-template-columns: minmax(180px, 240px) minmax(0, 1fr);
gap: 24px;
padding: 18px 0;
border-top: 1px solid #f0f0f1;
}
.ansico-wp-basic-field-row:first-child {
border-top: 0;
padding-top: 0;
}
.ansico-wp-basic-field-row:last-child {
padding-bottom: 0;
}
.ansico-wp-basic-field-label h3,
.ansico-wp-basic-subsection > h3,
.ansico-wp-basic-tool-card h3,
.ansico-wp-basic-settings-card h3 {
margin: 0;
font-size: 15px;
line-height: 1.4;
}
.ansico-wp-basic-field-control .description,
.ansico-wp-basic-settings-card .description,
.ansico-wp-basic-tool-card .description,
.ansico-wp-basic-tools-box .description {
color: #646970;
}
.ansico-wp-basic-checkbox-grid {
display: grid;
grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
gap: 10px;
margin: 0;
}
.ansico-wp-basic-checkbox-item {
display: flex;
align-items: flex-start;
gap: 10px;
padding: 12px 14px;
border: 1px solid #e0e0e0;
border-radius: 10px;
background: #fcfcfc;
}
.ansico-wp-basic-checkbox-item input {
margin-top: 2px;
} }
.ansico-wp-basic-settings-grid { .ansico-wp-basic-settings-grid {
@ -85,24 +232,42 @@
} }
.ansico-wp-basic-settings-card { .ansico-wp-basic-settings-card {
background: #fff; padding: 16px;
border: 1px solid #dcdcde;
border-radius: 8px;
padding: 14px;
} }
.ansico-wp-basic-settings-card h3 { .ansico-wp-basic-settings-card h3 {
margin-bottom: 14px;
}
.ansico-wp-basic-subsection {
margin-top: 22px;
}
.ansico-wp-basic-subsection:first-of-type {
margin-top: 0; margin-top: 0;
} }
.ansico-wp-basic-subsection > h3 {
margin-bottom: 14px;
}
.ansico-wp-basic-term-fields .ansico-wp-basic-metabox, .ansico-wp-basic-term-fields .ansico-wp-basic-metabox,
.ansico-wp-basic-term-fields-wrap .ansico-wp-basic-metabox { .ansico-wp-basic-term-fields-wrap .ansico-wp-basic-metabox {
background: #fff; background: #fff;
} }
.ansico-wp-basic-tool-card {
padding: 18px;
}
.ansico-wp-basic-tools-box,
.ansico-wp-basic-tools-box p { .ansico-wp-basic-tools-box p {
margin: 0 0 14px; margin: 0;
}
.ansico-wp-basic-tools-box {
display: grid;
gap: 12px;
} }
.ansico-wp-basic-tools-box label strong { .ansico-wp-basic-tools-box label strong {
@ -119,7 +284,103 @@
vertical-align: middle; vertical-align: middle;
} }
.ansico-wp-basic-tools-box .description { .ansico-wp-basic-submit-row {
display: block; margin-top: 20px;
margin-top: 6px; }
@media (max-width: 1100px) {
.ansico-wp-basic-layout {
grid-template-columns: 1fr;
}
.ansico-wp-basic-panel-sticky {
position: static;
}
}
@media (max-width: 782px) {
.ansico-wp-basic-page-header,
.ansico-wp-basic-field-row {
grid-template-columns: 1fr;
display: grid;
}
.ansico-wp-basic-page-header {
gap: 14px;
}
.ansico-wp-basic-panel,
.ansico-wp-basic-tool-card,
.ansico-wp-basic-settings-card,
.ansico-wp-basic-status-card {
padding: 16px;
}
}
.ansico-wp-basic-tab-nav {
margin: 0 0 20px;
}
.ansico-wp-basic-tab-panel {
display: grid;
gap: 20px;
}
.ansico-wp-basic-panel-narrow {
max-width: 900px;
}
.ansico-wp-basic-panel-header-intro {
margin-bottom: 8px;
}
.ansico-wp-basic-panel-header-intro p {
font-size: 14px;
}
.ansico-wp-basic-inline-code {
margin: 12px 0 0;
}
.ansico-wp-basic-inline-code code {
word-break: break-all;
}
.ansico-wp-basic-sitemap-url-row {
display: flex;
align-items: center;
gap: 8px;
flex-wrap: wrap;
margin-top: 12px;
}
.ansico-wp-basic-sitemap-url-label {
margin-right: 2px;
}
.ansico-wp-basic-sitemap-url {
display: inline-block;
padding: 6px 8px;
}
.ansico-wp-basic-copy-button {
display: inline-flex;
align-items: center;
justify-content: center;
min-width: 34px;
padding: 0 6px;
}
.ansico-wp-basic-copy-button .dashicons {
font-size: 16px;
width: 16px;
height: 16px;
}
.ansico-wp-basic-copy-button.is-copied {
color: #008a20;
border-color: #8bc34a;
} }

View file

@ -3,9 +3,7 @@ document.addEventListener('DOMContentLoaded', function () {
var descInput = document.getElementById('ansico_wp_basic_meta_description'); var descInput = document.getElementById('ansico_wp_basic_meta_description');
var snippet = document.querySelector('.ansico-wp-basic-snippet'); var snippet = document.querySelector('.ansico-wp-basic-snippet');
if (!titleInput || !descInput || !snippet) { if (titleInput && descInput && snippet) {
return;
}
var titleTarget = snippet.querySelector('.ansico-wp-basic-snippet-title'); var titleTarget = snippet.querySelector('.ansico-wp-basic-snippet-title');
var descTextTarget = snippet.querySelector('.ansico-wp-basic-snippet-description-text'); var descTextTarget = snippet.querySelector('.ansico-wp-basic-snippet-description-text');
@ -157,4 +155,58 @@ document.addEventListener('DOMContentLoaded', function () {
titleInput.addEventListener('input', updateSnippet); titleInput.addEventListener('input', updateSnippet);
descInput.addEventListener('input', updateSnippet); descInput.addEventListener('input', updateSnippet);
updateSnippet(); updateSnippet();
}
document.querySelectorAll('.ansico-wp-basic-copy-button').forEach(function (button) {
button.addEventListener('click', function () {
var text = button.getAttribute('data-copy-text') || '';
if (!text) {
return;
}
var resetButtonState = function () {
button.classList.remove('is-copied');
button.setAttribute('title', button.getAttribute('data-original-title') || '');
button.setAttribute('aria-label', button.getAttribute('data-original-label') || '');
};
if (!button.hasAttribute('data-original-title')) {
button.setAttribute('data-original-title', button.getAttribute('title') || '');
}
if (!button.hasAttribute('data-original-label')) {
button.setAttribute('data-original-label', button.getAttribute('aria-label') || '');
}
var markCopied = function () {
button.classList.add('is-copied');
button.setAttribute('title', 'Copied');
button.setAttribute('aria-label', 'Copied');
window.setTimeout(resetButtonState, 1500);
};
if (navigator.clipboard && navigator.clipboard.writeText) {
navigator.clipboard.writeText(text).then(markCopied).catch(function () {
var tempInput = document.createElement('input');
tempInput.value = text;
document.body.appendChild(tempInput);
tempInput.select();
document.execCommand('copy');
document.body.removeChild(tempInput);
markCopied();
});
return;
}
var tempInput = document.createElement('input');
tempInput.value = text;
document.body.appendChild(tempInput);
tempInput.select();
document.execCommand('copy');
document.body.removeChild(tempInput);
markCopied();
});
});
}); });

View file

@ -1,43 +1,70 @@
=== Ansico WP Basic === === Ansico WP Basic ===
Contributors: ansico Contributors: aphandersen
Tags: seo, meta title, meta description, search preview Tags: seo, metadata, meta tags, open graph, xml sitemap
Requires at least: 6.0 Requires at least: 6.0
Tested up to: 6.5 Tested up to: 6.9.4
Requires PHP: 7.4 Requires PHP: 7.4
Stable tag: 0.0.0.2 Stable tag: 1.0.0
License: GPLv3 or later License: GPLv3 or later
License URI: https://www.gnu.org/licenses/gpl-3.0.html License URI: https://www.gnu.org/licenses/gpl-3.0.html
Basic SEO fields for posts, pages, custom post types, author archives, taxonomy archives, and special archive pages. Lightweight SEO tools for WordPress with meta titles, meta descriptions, social tags, canonical URLs, and XML sitemaps.
== Description == == Description ==
Ansico WP Basic adds simple SEO fields to WordPress: Ansico WP Basic adds essential SEO controls to WordPress without the overhead of a large SEO suite.
- Meta title and meta description fields for posts, pages, and public custom post types Features include:
- Live search result preview in the editor
- SEO fields for author archives via user profiles * Meta title and meta description fields for posts, pages, and public custom post types
- SEO fields for taxonomy archives such as categories, tags, and public custom taxonomies * Live search result preview in the editor
- Settings for archive-style pages such as blog home, date archives, search results, 404, and post type archives * SEO fields for author archives
- Outputs the meta description tag in the frontend head when a description is available * SEO fields for taxonomy archives such as categories, tags, and public custom taxonomies
- Uses the custom meta title as the document title when one is available * SEO settings for archive-style pages such as the posts page, date archives, search results, 404 pages, and post type archives
* Open Graph and Twitter/X meta tags
* Canonical URL output
* Lightweight JSON-LD schema output
* XML sitemap generation
* Import tools for migrating SEO data from Yoast SEO
* Bulk generation of missing meta titles and meta descriptions for existing content
The plugin is designed for site owners who want straightforward SEO fields and metadata management directly inside WordPress.
== Installation == == Installation ==
1. Upload the plugin ZIP file in WordPress. 1. Upload the plugin ZIP file through the WordPress admin plugin installer, or upload the plugin folder to `/wp-content/plugins/`.
2. Activate the plugin. 2. Activate the plugin through the **Plugins** screen in WordPress.
3. Go to Ansico WP Basic > Settings. 3. Go to **Ansico WP Basic > Settings**.
4. Choose which post types should have SEO fields. 4. Choose the post types and archive areas where SEO fields should be available.
5. Configure optional social defaults, sitemap settings, and maintenance tools as needed.
== Frequently Asked Questions ==
= Can I import my SEO data from Yoast SEO? =
Yes. The **Tools** tab includes an importer for supported Yoast SEO metadata and selected social defaults.
= Will existing values be overwritten? =
No. The importer and bulk generator are designed to preserve existing Ansico WP Basic values unless a field is empty.
= Does the plugin support custom post types? =
Yes. Public custom post types can be enabled from the settings screen.
== Changelog == == Changelog ==
= 1.1.0 = = 1.0.0 =
- Improved search result preview styling * First public release prepared for WordPress.org
- Made meta description output always active * Added meta title and meta description support for posts, pages, public custom post types, author archives, taxonomy archives, and archive-style pages
- Removed title and description output toggles from settings * Added live search result preview in the editor
- Added support for author archives * Added Open Graph, Twitter/X, canonical URL, and lightweight schema output
- Added support for taxonomy term archives * Added XML sitemap generation
- Added settings for archive and special pages * Added Yoast SEO import tools for supported metadata and social defaults
* Added bulk generation of missing meta titles and meta descriptions
* Improved the settings screen with tabs and cleaner organization
== Upgrade Notice ==
= 1.0.0 = = 1.0.0 =
- Initial release Initial public release.