=== Kenter2909 Embed Viewer Fixer ===
Tags: pdf, embed, shortcode, documents, viewer
Requires at least: 6.2
Tested up to: 7.1
Stable tag: 1.1.6
Requires PHP: 7.4
License: GPLv2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html

Finds Embed Any Document shortcodes that use local uploads and adds the browser viewer attribute without changing the document URL.

== Description ==

Kenter2909 Embed Viewer Fixer is a small administrative maintenance tool for WordPress sites using the `[embeddoc]` shortcode.

It finds shortcode content containing `download="all"]` for documents stored under `/wp-content/uploads/` and changes only that exact fragment to:

`download="all" viewer="browser"]`

The plugin does not replace document URLs and does not modify unrelated shortcode attributes.

The document URL host can be configured in the plugin screen. By default, the current WordPress site's host is used.

== Features ==

* Counts posts requiring a change.
* Counts exact shortcode occurrences requiring a change.
* Shows the WordPress posts table used by the installation.
* Lets an administrator review the number of changes before running the update.
* Requires a nonce and an additional confirmation before changing the database.
* Verifies the result after the update.
* Does not contact external services.
* Does not create custom database tables.

== Installation ==

1. Upload the plugin ZIP through **Plugins → Add New → Upload Plugin**.
2. Activate the plugin.
3. Go to **Tools → Kenter2909 Embed Viewer Fixer**.
4. Check the detected number of posts and shortcode occurrences.
5. Confirm the document URL host.
6. Create a database backup before making changes.
7. Click **Repair All** and confirm the operation.
8. Verify that the remaining count is zero.

== Frequently Asked Questions ==

= Does the plugin modify the PDF files? =

No. It changes only the stored WordPress post content.

= Does it modify postmeta? =

No. The repair operation updates only the WordPress posts table and the `post_content` column.

= Does it change document URLs? =

No. The replacement changes only `download="all"]` to `download="all" viewer="browser"]`.

= Can I use it on a site with a custom table prefix? =

Yes. The plugin uses WordPress's `$wpdb->posts` table reference rather than hard-coding a table prefix.

= Is a backup recommended? =

Yes. Always make a database backup before performing a bulk content update.

== Screenshots ==

1. Panel administracyjny wtyczki — konfiguracja zakresu wyszukiwania, podsumowanie znalezionych shortcode'ów oraz informacje o zakresie i bezpieczeństwie operacji.

== Changelog ==

= 1.1.6 =
* Updated the plugin display name and WordPress.org slug to use a distinctive author identifier.
* No functional changes.


= 1.1.5 =
* Aligns the readme minimum WordPress version with the plugin header (6.2).
* No functional changes.


= 1.1.1 =
* Fixed the text domain to match the WordPress.org plugin slug.

= 1.1.0 =
* Prepared for public distribution.
* Added GPLv2-or-later licensing information.
* Added configurable document URL host.
* Added explicit confirmation before bulk changes.
* Improved validation and output escaping.
* Added clearer verification and safety information.

= 1.0.0 =
* Initial release.