Plugin Directory

Changeset 3694223


Ignore:
Timestamp:
09/13/2026 09:50:24 PM (6 weeks ago)
Author:
urbancraftdepartment
Message:

1.2.0: rename embed script/attribute to ucd-embed.js/data-ucd-slot (ad-blocker filter lists generically flag anything with 'ads' in the name); add optional caption text above/below an image creative.

Location:
ucd-ads/trunk
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • ucd-ads/trunk/includes/class-ucd-shortcode.php

    r3684915 r3694223  
    1313class UCD_Ad_Network_Shortcode
    1414{
    15     private const HANDLE_FIXED = 'ucd-ads';
    16     private const HANDLE_AUTOSCALE = 'ucd-ads-autoscale';
     15    private const HANDLE_FIXED = 'ucd-embed';
     16    private const HANDLE_AUTOSCALE = 'ucd-embed-autoscale';
    1717
    1818    public static function init(): void
    … …  
    7878    {
    7979        $ad_unit_id = esc_attr($ad_unit_id);
    80         $attr = $autoscale ? 'data-ucd-ad-unit-autoscale' : 'data-ucd-ad-unit';
     80        $attr = $autoscale ? 'data-ucd-slot-autoscale' : 'data-ucd-slot';
    8181        $style = sprintf('width:%dpx; height:%dpx;', $width, $height);
    8282
    … …  
    106106     * externally-hosted script/image. This is the plugin's core ad-serving function; see the
    107107     * "External services" section of readme.txt for the full disclosure.
     108     *
     109     * ucd-embed.js/ucd-embed-autoscale.js (not ucd-ads.js/ucd-ads-autoscale.js, and
     110     * data-ucd-slot/-autoscale, not data-ucd-ad-unit/-autoscale) — some ad-blocker filter lists
     111     * generically flag anything with "ads" in the script URL or attribute name, independent of
     112     * this being an actual ad script. The old files/attribute stay live indefinitely for any site
     113     * that hand-copied a snippet before this changed; this plugin itself always uses the current
     114     * naming now.
    108115     */
    109116    private static function maybe_script_tag(bool $autoscale): string
    110117    {
    111118        $handle = $autoscale ? self::HANDLE_AUTOSCALE : self::HANDLE_FIXED;
    112         $file = $autoscale ? 'ucd-ads-autoscale.js' : 'ucd-ads.js';
     119        $file = $autoscale ? 'ucd-embed-autoscale.js' : 'ucd-embed.js';
    113120
    114121        wp_enqueue_script($handle, UCD_AD_NETWORK_API_BASE . '/' . $file, [], UCD_AD_NETWORK_VERSION, true);
  • ucd-ads/trunk/readme.txt

    r3684915 r3694223  
    55Tested up to: 7.1
    66Requires PHP: 7.4
    7 Stable tag: 1.1.4
     7Stable tag: 1.2.0
    88License: GPLv2 or later
    99License URI: https://www.gnu.org/licenses/gpl-2.0.html
    … …  
    8686* **On every page view that includes a `[ucd_ad]` shortcode, widget, or Elementor block**: the
    8787  visitor's own browser loads a small script directly from ads.urbancraftdepartment.com
    88   (`/ucd-ads.js` or `/ucd-ads-autoscale.js`) and requests an ad to display. As with any such
     88  (`/ucd-embed.js` or `/ucd-embed-autoscale.js`) and requests an ad to display. As with any such
    8989  request, the visitor's IP address, User-Agent, and the referring page URL are visible to
    9090  ads.urbancraftdepartment.com as part of that request — the same as loading an image or script
    … …  
    105105
    106106== Changelog ==
     107
     108= 1.2.0 =
     109* Changed: the embed script and container attribute now load from `ucd-embed.js`/
     110  `data-ucd-slot` (previously `ucd-ads.js`/`data-ucd-ad-unit`) — some ad-blocker filter lists
     111  generically flag anything with "ads" in a script URL or attribute name, blocking the ad for
     112  visitors using them regardless of it being a real ad request. No action needed on your end;
     113  existing shortcodes/widgets/blocks keep working exactly as before.
     114* Added: an advertiser can now attach optional caption text above/below an image creative —
     115  shown automatically if a campaign uses it, no plugin configuration required.
    107116
    108117= 1.1.4 =
  • ucd-ads/trunk/ucd-ads.php

    r3684915 r3694223  
    44 * Plugin URI: https://ads.urbancraftdepartment.com
    55 * Description: Earn money from your site by showing UCD Ads Network ads. Connect your account, pick or create an ad unit, and place it with a shortcode, widget, or Elementor block — no minimum, no contract.
    6  * Version: 1.1.4
     6 * Version: 1.2.0
    77 * Requires at least: 5.8
    88 * Requires PHP: 7.4
    … …  
    1919}
    2020
    21 define('UCD_AD_NETWORK_VERSION', '1.1.4');
     21define('UCD_AD_NETWORK_VERSION', '1.2.0');
    2222define('UCD_AD_NETWORK_DIR', plugin_dir_path(__FILE__));
    2323define('UCD_AD_NETWORK_URL', plugin_dir_url(__FILE__));
Note: See TracChangeset for help on using the changeset viewer.