=== UCD Ads Network ===
Contributors: urbancraftdepartment
Tags: ads, advertising, monetization, ad network, publisher
Requires at least: 5.8
Tested up to: 7.1
Requires PHP: 7.4
Stable tag: 1.1.4
License: GPLv2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html

Earn money from your site by showing UCD Ads Network ads — no subscription, no contract, no minimum.

== Description ==

UCD Ads Network is a self-serve ad network: advertisers set up their own campaigns with their own
budget, and publishers (you) automatically earn credit every time one of those ads is shown on
your site.

This plugin lets you place an ad unit — created on
[ads.urbancraftdepartment.com](https://ads.urbancraftdepartment.com) — on your site with a single
shortcode or widget. No coding knowledge required.

**How it works:**

1. Create a free account at ads.urbancraftdepartment.com, go to Settings → API Keys, and generate
   a key.
2. Paste that key into this plugin under Settings → UCD Ads Network to connect your account.
3. Pick an existing ad unit from the list, or let the plugin create one for you automatically.
4. Place the shortcode, widget, or Elementor block the plugin gives you.

An ad only appears once a matching, active campaign exists — an empty ad unit simply means no
suitable campaign is bidding at that moment, not an error.

Every ad carries a clear "Advertisement" label with the advertiser's name, and can be reported by
visitors. Your credit balance (what you've earned so far) is visible directly on the plugin's
settings page.

Using Elementor? The plugin registers its own "UCD Ads Network" block in the Elementor editor,
alongside the shortcode and the classic widget.

== Installation ==

1. Upload the plugin folder to `/wp-content/plugins/`, or install it through the WordPress plugin
   screen.
2. Activate the plugin through the "Plugins" screen.
3. Go to Settings → UCD Ads Network and connect your account with an API key.
4. Pick an ad unit or create one, and place the shortcode (e.g.
   `[ucd_ad slot="sidebar-banner"]`), the "UCD Ads Network" widget, or the Elementor block wherever
   you want the ad to show.

== Frequently Asked Questions ==

= I don't see an ad — is something broken? =

Not necessarily. An ad unit only shows an ad when there's currently an approved, paid campaign
that matches your ad unit's exact size (or, for an auto-scaling ad unit, any size) and is within
budget and targeting. If none exists, the ad unit simply stays empty — that's normal, not a fault.

= Do I need to fill in width and height myself? =

No. As soon as you pick or create an ad unit, the plugin automatically fetches the correct size
from UCD Ads Network.

= Can I use multiple ad units on one site? =

Yes, add as many as you like under Settings → UCD Ads Network, and use each one's own shortcode.

= How and when do I get paid? =

UCD Ads Network works with credit, not direct payout: every ad shown earns credit on your UCD Ad
Network account, which is automatically deducted from your own next invoice there. See
ads.urbancraftdepartment.com/hoe-het-werkt for the full explanation.

== External services ==

This plugin connects to UCD Ads Network (ads.urbancraftdepartment.com) to serve ads and manage
your publisher account. It requires a free account on that service to function — without it, the
plugin cannot show ads or earn credit.

The following happens:

* **When you connect your account** (Settings → UCD Ads Network): the API key you paste is sent to
  ads.urbancraftdepartment.com to verify it and fetch your organization's name and credit balance.
* **When you list, create, or add an ad unit**: your site's domain name and the ad unit's name/
  size are sent to ads.urbancraftdepartment.com, using your stored API key for authentication.
* **On every page view that includes a `[ucd_ad]` shortcode, widget, or Elementor block**: the
  visitor's own browser loads a small script directly from ads.urbancraftdepartment.com
  (`/ucd-ads.js` or `/ucd-ads-autoscale.js`) and requests an ad to display. As with any such
  request, the visitor's IP address, User-Agent, and the referring page URL are visible to
  ads.urbancraftdepartment.com as part of that request — the same as loading an image or script
  from any other external site. This is the plugin's core function (serving and measuring ads);
  it cannot be disabled while still showing ads. No advertising cookies are set by this request.
* **When a visitor clicks an ad**, their browser is redirected through
  ads.urbancraftdepartment.com/v1/click/... to the advertiser's own site, so the click can be
  attributed and the advertiser's campaign charged.

UCD Ads Network Terms of Service: https://ads.urbancraftdepartment.com/voorwaarden
UCD Ads Network Privacy Policy: https://ads.urbancraftdepartment.com/privacy

== Screenshots ==

1. Connecting your account with an API key.
2. Creating a new ad unit for your site, or adding an existing one.
3. Overview of the ad units added to your site, with ready-to-use shortcodes.

== Changelog ==

= 1.1.4 =
* Fixed: the plugin is officially named "UCD Ads Network" — corrected everywhere it still read
  "UCD Ad Network" (settings page, widget, notices).

= 1.1.3 =
* Added: Dutch translation. The plugin's settings page now shows in Dutch automatically on
  Dutch-language sites, and in English everywhere else.
* Fixed: the settings page now uses the plugin's official WordPress.org text domain, so
  community translations load correctly.

= 1.1.2 =
* Fixed: ad scripts now load the way WordPress expects, instead of being printed directly into
  the page — no visible change, just a cleaner, more compatible way of loading them.

= 1.1.1 =
* Fixed: your API key is now properly removed from the database when the plugin is uninstalled.
* Added: a clear "External services" disclosure (see above) explaining exactly what data this
  plugin sends to UCD Ads Network, and when.

= 1.1.0 =
* Added: connect your UCD Ads Network account with an API key, then pick from your existing ad
  units or let the plugin create one for you automatically — no more copying and pasting an ID
  by hand.
* Added: your credit balance is now visible on the settings page.
* Added: an Elementor widget, alongside the existing shortcode and classic widget.

= 1.0.0 =
* First release: settings page, shortcode, and classic widget.
