Plugin Directory

Changeset 3464297


Ignore:
Timestamp:
02/18/2026 11:58:18 AM (16 hours ago)
Author:
ratneshmagicbid
Message:

Fixing Bugs And Upadating 1.2.1

Location:
gam-ads-ad-manager-and-ad-exchange
Files:
7 edited
26 copied

Legend:

Unmodified
Added
Removed
  • gam-ads-ad-manager-and-ad-exchange/tags/1.2.1/gam-ads-ad-manager-and-ad-exchange.php

    r3459850 r3464297  
    2424define('gamadsmbai_PLUGIN_DIR', plugin_dir_path(__FILE__));
    2525define('gamadsmbai_PLUGIN_URL', plugin_dir_url(__FILE__));
    26 define('gamadsmbai_PLUGIN_VERSION', '1.3.4');
     26define('gamadsmbai_PLUGIN_VERSION', '1.3.5');
    2727
    2828register_activation_hook(__FILE__, 'gam_ads_ad_manager_and_ad_exchange_activate');
  • gam-ads-ad-manager-and-ad-exchange/tags/1.2.1/includescore/ajax-handlers.php

    r3457089 r3464297  
    325325    $total = $wpdb->get_var($wpdb->prepare($sql_total, ...$params));
    326326
    327     $sql = "SELECT * FROM $table WHERE $where ORDER BY created_at DESC LIMIT %d OFFSET %d";
     327    $sql = "SELECT * FROM $table WHERE $where ORDER BY is_active DESC LIMIT %d OFFSET %d";
    328328    $params[] = $limit;
    329329    $params[] = $offset;
  • gam-ads-ad-manager-and-ad-exchange/tags/1.2.1/includescore/class-gam-ad.php

    r3399594 r3464297  
    33    exit;
    44}
     5
     6// Review Action For Admin
     7add_action('admin_notices', 'gamadsmbai_review_notice');
     8
     9function gamadsmbai_review_notice()
     10{
     11    if (!current_user_can('manage_options')) {
     12        return;
     13    }
     14    if (get_option('gamadsmbai_review_dismissed')) {
     15        return;
     16    }
     17?>
     18    <div class="notice notice-info is-dismissible gamadsmbai-review-notice">
     19        <p>
     20            ⭐ <strong>Thank you for using GAM Ad Inserter.</strong><br>
     21            If it’s adding value to your site, we’d truly appreciate a quick review 🚀.
     22            Your feedback helps us keep building better tools for publishers.
     23            We appreciate your support.
     24        </p>
     25        <p>
     26            <a href="https://wordpress.org/support/plugin/your-plugin-slug/reviews/?filter=5"
     27                target="_blank"
     28                class="button button-primary">
     29                Leave a Review
     30            </a>
     31        </p>
     32    </div>
     33<?php
     34}
     35
     36add_action('admin_enqueue_scripts', function () {
     37    wp_add_inline_script('jquery', "
     38        jQuery(document).on('click', '.gamadsmbai-review-notice .notice-dismiss', function() {
     39            jQuery.post(ajaxurl, {
     40                action: 'gamadsmbai_dismiss_review_notice'
     41            });
     42        });
     43    ");
     44});
     45
     46add_action('wp_ajax_gamadsmbai_dismiss_review_notice', function () {
     47    update_option('gamadsmbai_review_dismissed', 1);
     48    wp_die();
     49});
  • gam-ads-ad-manager-and-ad-exchange/tags/1.2.1/includescore/hooks.php

    r3459850 r3464297  
    590590                createElementPop.setAttribute("style", "width: 100%;height: 100vh;position: fixed;top:0%;left: 0;display: none;flex-direction: column;justify-content: center;align-items: center;flex-wrap: nowrap;gap: 1px;background-color: #0000008f;box-sizing:border-box; z-index: +999999999999999999999999999");
    591591                document.querySelector("body").append(createElementPop);
    592                 createElementPop.innerHTML = ' . "'" . '<style id="style"></style><div class="close-popup"> <span class="close-btn"><svg width="18px" height="18px" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg" stroke="#000000" stroke-width="0.096"><g id="SVGRepo_bgCarrier" stroke-width="0"></g><g id="SVGRepo_tracerCarrier" stroke-linecap="round" stroke-linejoin="round"></g><g id="SVGRepo_iconCarrier"><path fill-rule="evenodd" clip-rule="evenodd" d="M19.207 6.207a1 1 0 0 0-1.414-1.414L12 10.586 6.207 4.793a1 1 0 0 0-1.414 1.414L10.586 12l-5.793 5.793a1 1 0 1 0 1.414 1.414L12 13.414l5.793 5.793a1 1 0 0 0 1.414-1.414L13.414 12l5.793-5.793z" fill="#000000"></path></g></svg></span> <span class="ourPowerOf"><span style="color:#5a5a5a;font-size:11px;padding: 0px 10px">Ad</span></span></div> <div class="fixed-width"> <div id="magicbidpopupadgamadsplgn"> </div> </div>' . "'" . ';
     592                createElementPop.innerHTML = ' . "'" . '<style id="style"></style><div class="fixed-width"> <div class="close-popup"> <span class="close-btn"><svg width="18px" height="18px" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg" stroke="#000000" stroke-width="0.096"><g id="SVGRepo_bgCarrier" stroke-width="0"></g><g id="SVGRepo_tracerCarrier" stroke-linecap="round" stroke-linejoin="round"></g><g id="SVGRepo_iconCarrier"><path fill-rule="evenodd" clip-rule="evenodd" d="M19.207 6.207a1 1 0 0 0-1.414-1.414L12 10.586 6.207 4.793a1 1 0 0 0-1.414 1.414L10.586 12l-5.793 5.793a1 1 0 1 0 1.414 1.414L12 13.414l5.793 5.793a1 1 0 0 0 1.414-1.414L13.414 12l5.793-5.793z" fill="#000000"></path></g></svg></span> <span class="ourPowerOf"><span style="color:#5a5a5a;font-size:11px;padding: 0px 10px">Ad</span></span></div> <div id="magicbidpopupadgamadsplgn"> </div> </div>' . "'" . ';
    593593                document.getElementById("style").innerHTML = "@media(max-width:459px){.fixed-width{width: 100%;min-width: auto !important;padding: 0% !important;}.close-popup{max-width:none !important; width: 100% !important;top: 0px !important;min-width: auto !important;height: auto !important;padding: 10px !important;}#ad-popup{ padding: 10px;}#magicbidpopupadgamadsplgn, #magicbidpopupadgamadsplgn>div{display: flex !important;flex-direction: row;flex-wrap: wrap;align-content: center;justify-content: center;align-items: center;}}";
    594594                document.querySelectorAll(".fixed-width").forEach((e)=>e.setAttribute("style", "position:relative;display:none;min-width: 316px; background-color: #ffffff03;border-radius: 4px; padding: 0px;"));
    595                 document.querySelectorAll(".close-popup").forEach((e)=>e.setAttribute("style", "position:relative;top:0px;right:0px;max-width:318px;width:100%;height: 30px;padding: 0px 0px;background-color:#fff;border-radius:2px 2px 0px 0px;display: flex;flex-direction: row-reverse;justify-content: space-between;align-items: center;color: gray; font-family: helvetica, sans-sarif;"));
     595                document.querySelectorAll(".close-popup").forEach((e)=>e.setAttribute("style", "position:relative;top:0px;right:0px;width:100%;height: 30px;padding: 0px 0px;background-color:#fff;border-radius:2px 2px 0px 0px;display: flex;flex-direction: row-reverse;justify-content: space-between;align-items: center;color: gray; font-family: helvetica, sans-sarif;"));
    596596                document.getElementById("magicbidpopupadgamadsplgn").setAttribute("style", "padding: 10px 8px 10px 8px;border:solid 1px #adadad; box-shadow: 0px 10px 20px 0px rgba(128, 128, 128, 0.645); border-radius: 0px 0px 2px 2px; overflow: hidden;}");
    597                 document.querySelectorAll(".close-btn").forEach((e)=>e.setAttribute("style", "width: auto;height: auto; color: #00c2ff;text-align: center;cursor:pointer;padding: 0px 10px"));
     597                document.querySelectorAll(".close-btn").forEach((e)=>e.setAttribute("style", "width: auto;height: auto; color: #00c2ff;text-align: center;cursor:pointer;padding: 0px 10px;display:flex;justify-content:center;align-items:center;"));
    598598                '.
    599599                ($isScrollActive ?
  • gam-ads-ad-manager-and-ad-exchange/tags/1.2.1/includescore/views/add-new-ad.php

    r3459850 r3464297  
    316316                                            foreach ($gamadsmbai_adunits as $gamadsmbai_adunit):
    317317                                                if ($gamadsmbai_adunit['status'] === 'ACTIVE' && strpos($gamadsmbai_adunit['adunitname'], 'ca-pub') === false && strpos($gamadsmbai_adunit['adunitname'], 'Ad Exchange') === false):
    318                                                     $gamadsmbaiactualAdunitSlot = $gamadsmbai_adunit['parentId'] ? '/' . $gamadsmbai_adunit['parentId'] . '/' . $gamadsmbai_adunit['adunitname'] : '/' . $gamadsmbai_adunit['adunitname'];
     318                                                    $gamadsmbaiactualAdunitSlot = '/' . $gamadsmbai_networkCode . '/' . $gamadsmbai_adunit['adunitname'];
    319319                                                    // Collect sizes
    320320                                                    $gamadsmbai_sizes = [];
  • gam-ads-ad-manager-and-ad-exchange/tags/1.2.1/readme.txt

    r3459850 r3464297  
    9898== Changelog ==
    9999
     100
    100101= 1.2.1 =
    101102* Added "Custom Position" insertion in "ad alignment" option "start" and "end".
    102103* Added Display Triggers in popup ad.
     104* Bug fixed "Slot has parent id instead of network code".
     105* Popup Ad close bar auto Stretch.
    103106
    104107= 1.2.0 =
  • gam-ads-ad-manager-and-ad-exchange/trunk/gam-ads-ad-manager-and-ad-exchange.php

    r3459850 r3464297  
    2424define('gamadsmbai_PLUGIN_DIR', plugin_dir_path(__FILE__));
    2525define('gamadsmbai_PLUGIN_URL', plugin_dir_url(__FILE__));
    26 define('gamadsmbai_PLUGIN_VERSION', '1.3.4');
     26define('gamadsmbai_PLUGIN_VERSION', '1.3.5');
    2727
    2828register_activation_hook(__FILE__, 'gam_ads_ad_manager_and_ad_exchange_activate');
  • gam-ads-ad-manager-and-ad-exchange/trunk/includescore/ajax-handlers.php

    r3457089 r3464297  
    325325    $total = $wpdb->get_var($wpdb->prepare($sql_total, ...$params));
    326326
    327     $sql = "SELECT * FROM $table WHERE $where ORDER BY created_at DESC LIMIT %d OFFSET %d";
     327    $sql = "SELECT * FROM $table WHERE $where ORDER BY is_active DESC LIMIT %d OFFSET %d";
    328328    $params[] = $limit;
    329329    $params[] = $offset;
  • gam-ads-ad-manager-and-ad-exchange/trunk/includescore/class-gam-ad.php

    r3399594 r3464297  
    33    exit;
    44}
     5
     6// Review Action For Admin
     7add_action('admin_notices', 'gamadsmbai_review_notice');
     8
     9function gamadsmbai_review_notice()
     10{
     11    if (!current_user_can('manage_options')) {
     12        return;
     13    }
     14    if (get_option('gamadsmbai_review_dismissed')) {
     15        return;
     16    }
     17?>
     18    <div class="notice notice-info is-dismissible gamadsmbai-review-notice">
     19        <p>
     20            ⭐ <strong>Thank you for using GAM Ad Inserter.</strong><br>
     21            If it’s adding value to your site, we’d truly appreciate a quick review 🚀.
     22            Your feedback helps us keep building better tools for publishers.
     23            We appreciate your support.
     24        </p>
     25        <p>
     26            <a href="https://wordpress.org/support/plugin/your-plugin-slug/reviews/?filter=5"
     27                target="_blank"
     28                class="button button-primary">
     29                Leave a Review
     30            </a>
     31        </p>
     32    </div>
     33<?php
     34}
     35
     36add_action('admin_enqueue_scripts', function () {
     37    wp_add_inline_script('jquery', "
     38        jQuery(document).on('click', '.gamadsmbai-review-notice .notice-dismiss', function() {
     39            jQuery.post(ajaxurl, {
     40                action: 'gamadsmbai_dismiss_review_notice'
     41            });
     42        });
     43    ");
     44});
     45
     46add_action('wp_ajax_gamadsmbai_dismiss_review_notice', function () {
     47    update_option('gamadsmbai_review_dismissed', 1);
     48    wp_die();
     49});
  • gam-ads-ad-manager-and-ad-exchange/trunk/includescore/hooks.php

    r3459850 r3464297  
    590590                createElementPop.setAttribute("style", "width: 100%;height: 100vh;position: fixed;top:0%;left: 0;display: none;flex-direction: column;justify-content: center;align-items: center;flex-wrap: nowrap;gap: 1px;background-color: #0000008f;box-sizing:border-box; z-index: +999999999999999999999999999");
    591591                document.querySelector("body").append(createElementPop);
    592                 createElementPop.innerHTML = ' . "'" . '<style id="style"></style><div class="close-popup"> <span class="close-btn"><svg width="18px" height="18px" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg" stroke="#000000" stroke-width="0.096"><g id="SVGRepo_bgCarrier" stroke-width="0"></g><g id="SVGRepo_tracerCarrier" stroke-linecap="round" stroke-linejoin="round"></g><g id="SVGRepo_iconCarrier"><path fill-rule="evenodd" clip-rule="evenodd" d="M19.207 6.207a1 1 0 0 0-1.414-1.414L12 10.586 6.207 4.793a1 1 0 0 0-1.414 1.414L10.586 12l-5.793 5.793a1 1 0 1 0 1.414 1.414L12 13.414l5.793 5.793a1 1 0 0 0 1.414-1.414L13.414 12l5.793-5.793z" fill="#000000"></path></g></svg></span> <span class="ourPowerOf"><span style="color:#5a5a5a;font-size:11px;padding: 0px 10px">Ad</span></span></div> <div class="fixed-width"> <div id="magicbidpopupadgamadsplgn"> </div> </div>' . "'" . ';
     592                createElementPop.innerHTML = ' . "'" . '<style id="style"></style><div class="fixed-width"> <div class="close-popup"> <span class="close-btn"><svg width="18px" height="18px" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg" stroke="#000000" stroke-width="0.096"><g id="SVGRepo_bgCarrier" stroke-width="0"></g><g id="SVGRepo_tracerCarrier" stroke-linecap="round" stroke-linejoin="round"></g><g id="SVGRepo_iconCarrier"><path fill-rule="evenodd" clip-rule="evenodd" d="M19.207 6.207a1 1 0 0 0-1.414-1.414L12 10.586 6.207 4.793a1 1 0 0 0-1.414 1.414L10.586 12l-5.793 5.793a1 1 0 1 0 1.414 1.414L12 13.414l5.793 5.793a1 1 0 0 0 1.414-1.414L13.414 12l5.793-5.793z" fill="#000000"></path></g></svg></span> <span class="ourPowerOf"><span style="color:#5a5a5a;font-size:11px;padding: 0px 10px">Ad</span></span></div> <div id="magicbidpopupadgamadsplgn"> </div> </div>' . "'" . ';
    593593                document.getElementById("style").innerHTML = "@media(max-width:459px){.fixed-width{width: 100%;min-width: auto !important;padding: 0% !important;}.close-popup{max-width:none !important; width: 100% !important;top: 0px !important;min-width: auto !important;height: auto !important;padding: 10px !important;}#ad-popup{ padding: 10px;}#magicbidpopupadgamadsplgn, #magicbidpopupadgamadsplgn>div{display: flex !important;flex-direction: row;flex-wrap: wrap;align-content: center;justify-content: center;align-items: center;}}";
    594594                document.querySelectorAll(".fixed-width").forEach((e)=>e.setAttribute("style", "position:relative;display:none;min-width: 316px; background-color: #ffffff03;border-radius: 4px; padding: 0px;"));
    595                 document.querySelectorAll(".close-popup").forEach((e)=>e.setAttribute("style", "position:relative;top:0px;right:0px;max-width:318px;width:100%;height: 30px;padding: 0px 0px;background-color:#fff;border-radius:2px 2px 0px 0px;display: flex;flex-direction: row-reverse;justify-content: space-between;align-items: center;color: gray; font-family: helvetica, sans-sarif;"));
     595                document.querySelectorAll(".close-popup").forEach((e)=>e.setAttribute("style", "position:relative;top:0px;right:0px;width:100%;height: 30px;padding: 0px 0px;background-color:#fff;border-radius:2px 2px 0px 0px;display: flex;flex-direction: row-reverse;justify-content: space-between;align-items: center;color: gray; font-family: helvetica, sans-sarif;"));
    596596                document.getElementById("magicbidpopupadgamadsplgn").setAttribute("style", "padding: 10px 8px 10px 8px;border:solid 1px #adadad; box-shadow: 0px 10px 20px 0px rgba(128, 128, 128, 0.645); border-radius: 0px 0px 2px 2px; overflow: hidden;}");
    597                 document.querySelectorAll(".close-btn").forEach((e)=>e.setAttribute("style", "width: auto;height: auto; color: #00c2ff;text-align: center;cursor:pointer;padding: 0px 10px"));
     597                document.querySelectorAll(".close-btn").forEach((e)=>e.setAttribute("style", "width: auto;height: auto; color: #00c2ff;text-align: center;cursor:pointer;padding: 0px 10px;display:flex;justify-content:center;align-items:center;"));
    598598                '.
    599599                ($isScrollActive ?
  • gam-ads-ad-manager-and-ad-exchange/trunk/includescore/views/add-new-ad.php

    r3459850 r3464297  
    316316                                            foreach ($gamadsmbai_adunits as $gamadsmbai_adunit):
    317317                                                if ($gamadsmbai_adunit['status'] === 'ACTIVE' && strpos($gamadsmbai_adunit['adunitname'], 'ca-pub') === false && strpos($gamadsmbai_adunit['adunitname'], 'Ad Exchange') === false):
    318                                                     $gamadsmbaiactualAdunitSlot = $gamadsmbai_adunit['parentId'] ? '/' . $gamadsmbai_adunit['parentId'] . '/' . $gamadsmbai_adunit['adunitname'] : '/' . $gamadsmbai_adunit['adunitname'];
     318                                                    $gamadsmbaiactualAdunitSlot = '/' . $gamadsmbai_networkCode . '/' . $gamadsmbai_adunit['adunitname'];
    319319                                                    // Collect sizes
    320320                                                    $gamadsmbai_sizes = [];
  • gam-ads-ad-manager-and-ad-exchange/trunk/readme.txt

    r3459850 r3464297  
    9898== Changelog ==
    9999
     100
    100101= 1.2.1 =
    101102* Added "Custom Position" insertion in "ad alignment" option "start" and "end".
    102103* Added Display Triggers in popup ad.
     104* Bug fixed "Slot has parent id instead of network code".
     105* Popup Ad close bar auto Stretch.
    103106
    104107= 1.2.0 =
Note: See TracChangeset for help on using the changeset viewer.