=== Do Gooder campaign iframe ===
Requires at least: 4.7
Tested up to: 6.8
Requires PHP: 5.6
Stable tag: 1.2
License: GPL2

Embed a Do Gooder action in a WordPress post or page.

== Usage ==

Paste your action URL into a shortcode:

    [dogooder url=https://your-org.good.do/campaign-slug/action-slug/]

Use the ACTION url (campaign-slug/action-slug/), not the campaign URL.

If your page builder passes enclosed shortcodes through, this also works:

    [dogooder]https://your-org.good.do/campaign-slug/action-slug/[/dogooder]

== Upgrading from 1.1 ==

IMPORTANT: deactivate and DELETE any earlier copy of this plugin first
(it may be installed under a folder such as DoG-WIP_plugin_SupersonicThemev2).
The old version hooks `the_content` at priority 10, so if both are active the
old one still wins and its PHP warnings continue.

== Changelog ==

= 1.2 =
* Fix "Warning: Undefined array key 1" printed on EVERY page under PHP 8 --
  1.1 read $matches[1] without checking whether preg_match() matched, so any
  page WITHOUT the shortcode triggered it (platform#4760).
* Fix "Undefined variable $pattern" + str_replace() deprecation on pages that
  DO contain the shortcode.
* Register a real shortcode via add_shortcode() instead of regex-replacing in
  a `the_content` filter, so page builders that call do_shortcode() work
  (platform#2713).
* Load //static.good.do/embed.js from the server instead of inlining a 2016
  copy of the embed/resize glue, so the embed tracks platform changes. Drops
  the jQuery 1.11 dependency and the hard-coded hashed asset filename.
* Escape the URL, and reject anything that is not an absolute http(s) URL.
* Fix "...?a=b?embedded=" when the action URL already had a query string.
* Fix "...#anchor?embedded=" -- an action URL with a fragment had the marker
  appended INSIDE the fragment, so browsers never sent it and the action
  rendered un-embedded inside the frame.
