=== SiteNivo – Modular Site Toolkit ===
Contributors: forgewpdevx
Tags: scf, permalink manager, smtp, search and replace, duplicate post
Requires at least: 6.0
Tested up to: 7.0
Requires PHP: 8.1
Stable tag: 1.1.6
License: GPLv2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html

WordPress custom fields, custom post types, taxonomies & meta boxes in one toolkit — build content structure from the admin, no code required.

== Description ==

**SiteNivo** is a WordPress custom fields and custom post type toolkit for building structured content without writing code.

Create **custom post types**, **custom taxonomies**, **custom fields** (field groups / meta boxes), **options pages**, and **admin columns** from one clean admin UI. Ideal if you want CPT + fields in a single plugin instead of juggling separate tools.

### Why SiteNivo?

* **All-in-one content toolkit** — custom post types, taxonomies, custom fields, options pages, and admin columns together
* **No-code admin builders** — register CPTs and taxonomies, then add field groups with location rules
* **Developer-ready** — use `sn_get_field()` / `sn_the_field()` in themes; export CPT/taxonomy PHP when you need portable code
* **Site tools included** — Maintenance Mode, Coming Soon, Import/Export, WP Reset, URL Replace, Permalink Manager, Redirections, SMTP, Header & Footer, Classic Editor, Classic Widgets, Duplicate Post, Download Theme & Plugin, Rollback, SVG support, and useful settings

### Custom Post Types (CPT Builder)

Create and manage **WordPress custom post types** from the admin:

* Labels, slug, public/private visibility, and menu icon
* Supports: title, editor, thumbnail, excerpt, comments, revisions, and more
* Hierarchical (page-like) or flat (post-like) structure
* Archives and rewrite settings

### Custom Taxonomies

Register **custom taxonomies** and assign them to any post type:

* Hierarchical (like categories) or flat (like tags)
* Labels, slug, admin UI, and rewrite options
* Attach to core or custom post types

### Custom Fields & Meta Boxes (Field Groups)

Build **custom fields** and field groups that appear as meta boxes on posts, pages, taxonomies, users, and options pages — with AND/OR location rules.

**Field types included:**

* **Basic:** Text, Textarea, Email, URL, Password, Number, Range, Color, Select, Checkbox, Date, Time, Date Time, WYSIWYG, oEmbed, Link
* **Media:** Image, File, Gallery
* **Relational:** Post Object, Relationship, Taxonomy, User, Page Link
* **Maps:** Google Map, OpenStreetMap
* **Layout:** Tab, Accordion, Message
* **Pro Version:** Repeater, Clone, Flexible Content, and Table field types

### Options Pages

Create WordPress **options pages** (global settings screens) and attach any field group for site-wide options.

### Admin Columns

Add **custom admin columns** to post list tables and map them to your SiteNivo custom fields.

### Code Generator

Export custom post types and taxonomies as clean `register_post_type()` / `register_taxonomy()` PHP — no SiteNivo dependency at runtime.

### URL Replace

Search and replace URLs across the **full WordPress database** (posts, options, meta, and other text columns), with serialized data handled safely.

**Free:** run a full-database URL replace anytime.  
**Pro Version:** replace **history is stored** so you can **roll back** a previous replace if needed (Coming Soon In Pro Version).

### Permalink Manager

Set a **custom URI** for any post, page, or public custom post type — without changing the whole site permalink structure.

* Edit-screen **Permalink Manager** box with live URL preview
* Choose which post types are supported from **SiteNivo → Permalink Manager**
* Visitors hitting the old WordPress permalink get a **301 redirect** to your custom URI
* List of all customized URIs on the module page, plus Flush permalinks

### SMTP (Email)

Configure how WordPress sends email from **SiteNivo → SMTP**.

* **Default** — WordPress / PHP `mail()` (no SMTP override)
* **Other SMTP** — any custom host (cPanel, transactional SMTP, etc.)
* **Common providers (Free)** — Gmail, Outlook / Microsoft 365, SendGrid, Mailgun, Amazon SES, Brevo, and Zoho Mail with SMTP host presets
* **From Email / From Name** and optional **Force From**
* **Send Test Email** to verify delivery

SMTP passwords are saved only for administrators, never printed back in the admin HTML, and left blank means “keep the existing password.”

**Pro Version:** rarer branded mailers, Email Log, and advanced connection testing (Coming Soon In Pro Version).

### Import / Export

Migrate custom post types, taxonomies, field groups, options pages, admin columns, and redirections between sites with JSON.

### Maintenance Mode & Coming Soon

Show a branded Maintenance Mode or Coming Soon page with built-in templates while you build or launch.

### WP Reset & Settings

* **WP Reset** — selectively reset posts, comments, terms, media, users, transients, theme mods, or plugin options. **Complete Site Reset** is available in the Pro Version.
* **Settings (Free)** — Classic Editor, Classic Widgets, Duplicate Post, Download Theme & Plugin, Rollback, Favicon (Site Icon), safe SVG uploads, **Performance-related settings**, security toggles, Google Maps API key, and uninstall cleanup. Settings are organized in tabs (General, Media, Performance, Security, Admin UI, Integrations, Maintenance).

**Classic Widgets** restores the classic (non-block) Widgets screen via WordPress’s `use_widgets_block_editor` filter — toggle it under **SiteNivo → Settings → General**.

**Duplicate Post** adds a Duplicate row action and Bulk actions option for posts, pages, and public custom post types (creates drafts). Enable it under **SiteNivo → Settings → General**. Copying SiteNivo **custom field** values when duplicating is a **Pro Version** feature.

### Download Theme & Plugin

Download any installed theme or plugin as a ZIP from the WordPress admin — useful for backups, moving a theme/plugin to another site, or keeping a local copy.

* **Appearance → Themes** — open a theme’s details modal and use **Download** next to Customize / Menus
* **Plugins → All Plugins** — use the **Download** link next to Activate / Deactivate on each plugin row
* Creates a ZIP of that theme or plugin folder (ready to install elsewhere)

Enable it under **SiteNivo → Settings → General → Download Theme & Plugin**. When the toggle is Off, the Download actions are hidden.

### Rollback

Roll plugins, themes, or WordPress core back to a **previous WordPress.org version** (classic rollback style).

* Enable under **SiteNivo → Settings → General → Rollback**
* **Plugins:** Rollback link on plugin list rows (WordPress.org plugins only)
* **Themes:** Rollback on the theme details modal (WordPress.org themes only)
* **Core:** roll back WordPress from the Settings → General Rollback card (not the Updates screen)
* Choose a version, confirm, and SiteNivo installs that package from WordPress.org

When the toggle is Off, Rollback actions are hidden.

### Redirections

Manage **301 / 302 redirects** from **SiteNivo → Redirections** (below Permalink Manager).

* Add, edit, enable/disable, and delete redirect rules (exact path match)
* Optional ignore query string when matching (on by default)
* **404 Log** — see broken URLs visitors hit and create a redirect in one click
* Backup / migrate redirect rules via **SiteNivo → Import / Export** (JSON)
* Bulk enable, disable, or delete selected redirects

### Favicon

Set your site favicon from **SiteNivo → Settings → Media**. SiteNivo uses WordPress **Site Icon** (same as Appearance → Customize → Site Identity).

* Required size: square image at least **512×512** pixels (PNG or JPG recommended)
* Select / change / remove from the Media tab, then **Save Changes**
* Works on the frontend automatically via WordPress core

### Header & Footer

Add tracking and analytics snippets from **SiteNivo → Header & Footer** (below SMTP).

* **Header scripts** — output on `wp_head` (GA, GTM, meta tags, pixels)
* **Footer scripts** — output on `wp_footer`
* Editors use WordPress core **CodeMirror** (`wp_enqueue_code_editor`)
* Only users with `manage_options` can save; snippets print on the frontend only

### For Developers

Read field values in your theme:

    sn_get_field( 'field_key', $post_id );
    sn_the_field( 'field_key', $post_id );
    sn_get_field( 'field_key', 'option' );

Works with post meta, options pages, user meta, and term meta.

---

### Coming Soon in Free

Upcoming free updates will include:

* Disable Theme & Plugin Updates
* Social Buttons
* Header & Footer
* Visitor Tracking
* Disable Comments
* Hide Identity
* and much more

### SiteNivo Pro — Coming Soon

**SiteNivo Pro** is coming soon with advanced modules such as:

* Forms
* Blocks Development
* User Activity
* Login Activity
* URL Replace history & rollback
* Duplicate Post — custom field values when duplicating
* SMTP rarer mailers, Email Log, and advanced testing
* REST API Module
* Complete Site Reset
* Repeater, Clone, Flexible Content, and Table fields
* and much more

The free plugin already includes **Performance-related settings** under **SiteNivo → Settings**, so you can tune common performance options without Pro.

---

== Installation ==

1. In WordPress go to **Plugins → Add New**, search for **SiteNivo** (custom fields / custom post types), then install and activate.
2. Or upload the plugin ZIP via **Plugins → Add New → Upload Plugin**.
3. Open **SiteNivo** in the admin menu to create your first custom post type, taxonomy, or field group.

== Frequently Asked Questions ==

= Is SiteNivo a custom fields plugin? =

Yes. SiteNivo lets you create custom fields and field groups (meta boxes) for posts, pages, taxonomies, users, and options pages — plus custom post types and taxonomies in the same plugin.

= Can I create custom post types without code? =

Yes. Use the CPT builder to register WordPress custom post types from the admin. You can also export PHP with the Code Generator if you want portable `register_post_type()` code.

= Does it support custom taxonomies? =

Yes. Create custom taxonomies, choose hierarchical or flat behaviour, and assign them to any post type.

= Will SiteNivo conflict with ACF or other custom fields plugins? =

No. SiteNivo is independent. You can run it alongside Advanced Custom Fields (ACF) or similar plugins if needed.

= Do I need coding skills? =

No. Build custom post types, taxonomies, custom fields, and options pages from the UI. Developers can use `sn_get_field()` / `sn_the_field()` in themes when needed.

= Where can I get support? =

Use the **WordPress.org support forum** for this plugin (Support tab on the plugin page).

= What happens if I uninstall? =

Configuration stays in the database by default so you can reinstall later. Enable **Delete data on uninstall** under **SiteNivo → Settings** to remove tables and options.

= Can I download themes and plugins as ZIP files? =

Yes. Enable **Download Theme & Plugin** under **SiteNivo → Settings → General**. Then use **Download** on the theme details modal (**Appearance → Themes**) or on plugin list rows (**Plugins → All Plugins**). SiteNivo zips that theme or plugin folder for you.

= Can I roll back a plugin, theme, or WordPress core? =

Yes. Enable **Rollback** under **SiteNivo → Settings → General**. Then use **Rollback** on plugin rows or the theme details modal (WordPress.org items only), or use the Core Rollback card on the Settings page. SiteNivo installs the version you pick from WordPress.org.

= Can I set a favicon from SiteNivo? =

Yes. Open **SiteNivo → Settings → Media → Favicon**, select a square image at least **512×512** pixels, then Save Changes. This sets the WordPress Site Icon (same setting as Appearance → Customize → Site Identity).

= Can I add Google Analytics or tracking scripts? =

Yes. Open **SiteNivo → Header & Footer** (below SMTP). Paste your tracking tags into Header (wp_head) and/or Footer (wp_footer), then Save Changes. Only administrators can edit these fields.

= Can I manage URL redirects? =

Yes. Open **SiteNivo → Redirections** to add 301/302 rules (source path → destination), view a **404 Log** of broken URLs, and create redirects from those hits. Back up or migrate rules from **SiteNivo → Import / Export**.

= Does SiteNivo include SMTP / email settings? =

Yes. Open **SiteNivo → SMTP** to use Default PHP mail, Other SMTP, or common providers (Gmail, Outlook, SendGrid, and more). Save your settings, then use **Send Test Email**. Branded API/OAuth mailers and the Email Log are Coming Soon In Pro Version.

== Screenshots ==

1. SiteNivo dashboard — custom post types, fields, and site tools overview
2. Custom post type builder
3. Custom taxonomy builder
4. Custom fields / field group editor with field types
5. Options page settings
6. Admin columns manager for post list tables
7. Code Generator for CPT and taxonomy PHP export
8. Maintenance Mode and Coming Soon templates

== External Services ==

SiteNivo works without external services by default. Optional features may contact third parties only when you use them:

* **Google Map field** — Google Maps JavaScript API / Places API when a Maps API key is saved in Settings. [Terms](https://cloud.google.com/maps-platform/terms) · [Privacy](https://policies.google.com/privacy)
* **OpenStreetMap field** — Leaflet is bundled locally; map tiles / geocoding may use OpenStreetMap-compatible providers and Nominatim. [OSM copyright](https://www.openstreetmap.org/copyright) · [Privacy](https://osmfoundation.org/wiki/Privacy_Policy)
* **oEmbed field** — uses WordPress core oEmbed (may contact the URL’s provider, e.g. YouTube).
* **SMTP / Email** — when you choose an SMTP mailer, WordPress sends mail through the SMTP host **you** configure (for example `smtp.gmail.com`, `smtp.sendgrid.net`, or your own server). SiteNivo does not relay mail through SiteNivo servers; credentials stay in your WordPress database and are only used to authenticate with your chosen host.
* **Rollback** — when you roll back a plugin, theme, or WordPress core, SiteNivo contacts **WordPress.org** APIs and downloads packages from `downloads.wordpress.org` / `wordpress.org` only (the version you select). [API](https://api.wordpress.org/) · [Privacy](https://wordpress.org/about/privacy/)

== Changelog ==

= 1.1.6 =
* New: Header & Footer module — tracking/analytics snippets (wp_head / wp_footer), below SMTP.
* Uses WordPress core CodeMirror via wp_enqueue_code_editor (no bundled editor).
* Capability-gated save (manage_options); frontend-only output.

= 1.1.5 =
* Fix: Favicon no longer breaks the frontend (removed full-page HTML buffer that could blank the site).
* Site Icon still uses WordPress core output via Settings → Media.
* Redirections polish: Import/Export integration, UI fixes, Plugin Check cleanup.

= 1.1.4 =
* New: Redirections — 301/302 rules, 404 log, bulk enable/disable; backup via Import / Export.
* Module page below Permalink Manager (sidebar, dashboard, menu).
* Admin shell: WordPress notices re-homed so they no longer break the layout.

= 1.1.3 =
* New: Favicon — set WordPress Site Icon from Settings → Media (min 512×512).
* Syncs with Appearance → Customize → Site Identity; size validation on select and save.

= 1.1.2 =
* New: Rollback — install a previous WordPress.org version of plugins, themes, or WordPress core.
* Settings → General toggle; Plugins row + Themes modal actions; Core rollback card in Settings only.
* Tags: replaced `custom post types` with `duplicate post`.

= 1.1.1 =
* New: SMTP module — Default PHP mail, Other SMTP, and common SMTP providers (Gmail, Outlook, SendGrid, and more), From Email/Name, Force From, Send Test Email.
* Pro teasers: rarer mailers, Email Log, and advanced testing (Coming Soon In Pro Version).
* Module page below Permalink Manager in the SiteNivo menu, sidebar, and dashboard.

= 1.1.0 =
* New: Permalink Manager — custom URIs for posts, pages, and public CPTs (edit-screen box).
* 301 redirect from the native WordPress permalink to the custom URI.
* Module page below URL Replace: supported post types, custom URI list, flush permalinks.

= 1.0.9 =
* Settings: tabbed layout (General, Media, Performance, Security, Admin UI, Integrations, Maintenance) — layout only; no setting behavior changes.

= 1.0.8 =
* New: Download Theme & Plugin — ZIP download for any installed theme or plugin.
* Themes: Download button in the theme details modal (Appearance → Themes).
* Plugins: Download link on plugin list rows (Plugins → All Plugins).
* Settings: toggle under SiteNivo → Settings → General (below Duplicate Post).

= 1.0.7 =
* New: Duplicate Post — row action + bulk duplicate for posts, pages, and public CPTs (Settings → General).
* Pro: SiteNivo custom field values are copied when duplicating (Coming Soon In Pro Version / licensed Pro).

= 1.0.6 =
* New: Classic Widgets setting — restore the classic Widgets screen (Settings → General, below Classic Editor).
* Settings: renamed the Editor settings card to General.

= 1.0.5 =
* Fix: Options page render fatal error — anonymous BasePage now implements get_screen_nonce_action().

= 1.0.4 =
* New: URL Replace module — full-database URL search/replace with serialized-aware handling.
* History table UI reserved for SiteNivo Pro (Coming Soon In Pro Version) via extension hooks.

= 1.0.3 =
* Readme: Developers sample now shows sn_get_field / sn_the_field with $post_id.

= 1.0.2 =
* Readme updates: tags, Coming Soon / Pro roadmap, developer code sample fix.
* Removed external site / donate links until the official website launches.

= 1.0.1 =
* Updated readme and branding.
* Plugin Check compliance improvements.
* Admin menu and dashboard icon refinements.

= 1.0.0 =
* Initial release: Custom Post Types, Taxonomies, Field Groups, Options Pages, Admin Columns, Code Generator, Import/Export, Maintenance Mode, Coming Soon, WP Reset, and Settings.

== Upgrade Notice ==

= 1.1.6 =
Adds Header & Footer tracking scripts (below SMTP). WordPress CodeMirror for GA/GTM/pixels.

= 1.1.5 =
Fixes blank frontend when a Favicon/Site Icon is set. Redirections Import/Export polish included.

= 1.1.4 =
New Redirections module: 301/302 rules, 404 log, Import / Export backup. Below Permalink Manager.

= 1.1.3 =
Favicon (Site Icon) from Settings → Media. Minimum size 512×512.

= 1.1.2 =
Adds Rollback (WordPress.org previous versions for plugins, themes, and core) under Settings → General. Tags updated: duplicate post.

= 1.1.1 =
Adds SMTP (Default, Other SMTP, common providers + test email) below Permalink Manager. Rarer Pro mailers / Email Log Coming Soon In Pro Version.

= 1.1.0 =
Adds Permalink Manager (custom URIs for posts/pages/CPTs) below URL Replace in the SiteNivo menu.

= 1.0.9 =
Settings page now uses tabs (General, Media, Performance, and more). No setting behavior changes.

= 1.0.8 =
Adds Download Theme & Plugin (Settings → General). ZIP any theme from the Themes modal or any plugin from the Plugins list.

= 1.0.7 =
Adds Duplicate Post (row + bulk) under Settings → General. Custom field copy is Pro.

= 1.0.6 =
Adds Classic Widgets under Settings → General (restore classic Widgets screen).

= 1.0.5 =
Fixes a fatal error when opening a custom Options Page in the admin.

= 1.0.4 =
Adds URL Replace (full database). History / rollback Coming Soon In Pro Version.

= 1.0.3 =
Readme developer sample update for v1.0.3.

= 1.0.2 =
Readme and listing updates for v1.0.2.

= 1.0.1 =
Maintenance update — branding, readme, and Plugin Check fixes.

= 1.0.0 =
Initial release.
