=== IsItDown.now Uptime Badge ===
Contributors: isitdownnow
Tags: uptime, monitoring, status, badge, downtime
Requires at least: 5.8
Tested up to: 6.6
Requires PHP: 7.4
Stable tag: 1.0.0
License: GPLv2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html

Adds the IsItDown.now uptime-monitoring badge to your site so the free plan checks it every 20 minutes.

== Description ==

IsItDown.now offers free uptime monitoring. A free site is checked every 20 minutes while the IsItDown.now badge is on its homepage, exactly as issued. Without the badge, the site is checked every 3 hours.

This plugin places that badge for you. It outputs the embed code unchanged, so WordPress and the plugin do not add attributes (such as rel or target) that would stop the badge from counting.

What it does:

* Adds a settings page under Settings -> IsItDown.now Badge where you enter your badge token.
* Accepts the 16-character token, the badge image URL or the whole embed code, and extracts the token from it.
* Shows the badge in the site footer (on by default), which covers the homepage.
* Provides the `[isitdown_badge]` shortcode and a classic "IsItDown.now Uptime Badge" widget for other placements.
* Shows a preview of the badge and warns you if "Discourage search engines" is on, because that setting tells search engines to ignore the page, which stops the badge from counting.

What it does not do:

* It does not load any JavaScript on your site.
* It does not track visitors or set cookies.
* It does not contact IsItDown.now from your server. The only external request is the badge image, which visitors' browsers load from isitdown.now.

You need a free IsItDown.now account and a site added at https://isitdown.now/dashboard/sites to get a badge token.

= External service =

The badge image is served by IsItDown.now (https://isitdown.now/). When a visitor views a page containing the badge, their browser requests the image from isitdown.now, which receives the visitor's IP address and user agent as with any image request. See https://isitdown.now/privacy and https://isitdown.now/terms.

== Installation ==

1. Upload the `isitdown-uptime-badge` folder to `/wp-content/plugins/`, or install the plugin from Plugins -> Add New.
2. Activate the plugin.
3. Add your site at https://isitdown.now/dashboard/sites and copy its badge token (or the whole embed code).
4. Go to Settings -> IsItDown.now Badge, paste the token and save.
5. Leave "Show the badge in the site footer" checked, or place the badge with the `[isitdown_badge]` shortcode or the widget. The badge must appear on your homepage.

== Frequently Asked Questions ==

= Where do I find my badge token? =

On https://isitdown.now/dashboard/sites, next to the site you added. It is 16 characters long and uses only 0-9 and a-f. You can paste the whole embed code instead; the plugin extracts the token.

= Why must the badge be on the homepage? =

IsItDown.now checks your homepage for the badge. If it is only on other pages, the site is checked every 3 hours instead of every 20 minutes.

= Can I change the badge code? =

No. Any modification to the badge code, including an added attribute or a changed link, voids the free 20-minute tier, and the site falls back to 3-hour checks. The plugin outputs the code exactly as issued for this reason.

= Can I hide the badge or restyle it? =

The badge must be visible. It does not count if it, or an element around it, uses the hidden attribute, display:none or visibility:hidden, or sits inside a noscript or template element. You can position the footer wrapper with CSS on the `.isitdown-badge` class as long as it stays visible.

= Another plugin rewrites my external links. What do I do? =

Exclude isitdown.now in that plugin's settings. Some SEO, security and "external links" plugins rewrite every outbound link; the badge will not count while they change it.

= Why does the badge not count while "Discourage search engines" is on? =

That setting (Settings -> Reading) makes WordPress tell search engines to ignore every page, including the homepage the badge is on, so the badge cannot count.

= Does the plugin slow down my site? =

No. It prints one link and one 160x28 image. It loads no scripts or stylesheets.

== Changelog ==

= 1.0.0 =
* First release: settings page with token validation and preview, footer output, `[isitdown_badge]` shortcode and classic widget.
