Plugin Directory

Changeset 3014091


Ignore:
Timestamp:
12/25/2023 02:16:18 PM (2 years ago)
Author:
nativerentplugin
Message:

1.9.0

Location:
nativerent/trunk
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • nativerent/trunk/nativerent-bootstrap.php

    r3014028 r3014091  
    4343// Plugin version.
    4444if ( ! defined( 'NATIVERENT_PLUGIN_VERSION' ) ) {
    45     define( 'NATIVERENT_PLUGIN_VERSION', '1.8.5' );
     45    define( 'NATIVERENT_PLUGIN_VERSION', '1.9.0' );
    4646}
    4747
  • nativerent/trunk/nativerent.php

    r3014028 r3014091  
    66 * Plugin URI:        https://wordpress.org/plugins/nativerent/
    77 * Description:       Релевантная реклама для ваших читателей. Рекламодатели сервиса платят в 2-3 раза больше за 1 тыс. показов страниц, чем привычные рекламные сетки. Страница выкупается полностью, на ней размещается максимум четыре рекламных блока, которые выглядят нативно в стиле сайта.
    8  * Version:           1.8.5
     8 * Version:           1.9.0
    99 * Requires at least: 4.9
    1010 * Tested up to:      6.4.2
  • nativerent/trunk/readme.txt

    r3014028 r3014091  
    77Tested up to:      6.4.2
    88Requires PHP:      5.6.20
    9 Stable tag:        1.8.5
     9Stable tag:        1.9.0
    1010License:           GPLv2 or later
    1111License URI:       https://www.gnu.org/licenses/gpl-2.0.html
  • nativerent/trunk/static/content.js

    r3014028 r3014091  
    6161            ntgb: {}
    6262        }
     63        var ntgbUnitsCount = 0;
    6364
    6465        for (var i = 0; i < window.NRentAdUnits.length; i++) {
     
    162163                insertedUnits[adUnit.element.id] = adUnit
    163164                if (adUnit.type === 'ntgb') {
     165                    ++ntgbUnitsCount
     166                    if (adUnit.unitId === undefined) {
     167                        adUnit.unitId = ntgbUnitsCount
     168                    }
    164169                    adUnit.element.setAttribute('data-nrent-ntgb-id', adUnit.unitId)
    165170                    unitsToCheckDistance.ntgb[adUnit.element.id] = adUnit
     
    173178        }
    174179
    175         logger.debug('NRentPlugin: Units to check distance', unitsToCheckDistance)
    176         checkDistanceOfGroupUnits(unitsToCheckDistance.regular, insertedUnits, minDistance)
    177         checkDistanceOfGroupUnits(unitsToCheckDistance.ntgb, insertedUnits, minDistanceNTGB)
    178         logger.debug('NRentPlugin: Units with valid distance', unitsToCheckDistance)
     180        try {
     181            logger.debug('NRentPlugin: Units to check distance', unitsToCheckDistance)
     182            checkDistanceOfGroupUnits(unitsToCheckDistance.regular, insertedUnits, minDistance)
     183            checkDistanceOfGroupUnits(unitsToCheckDistance.ntgb, insertedUnits, minDistanceNTGB)
     184            logger.debug('NRentPlugin: Units with valid distance', unitsToCheckDistance)
     185        } catch (error) {
     186            logger.error(error)
     187        }
    179188
    180189        logger.debug('NRentPlugin: Init inserted ad-units', insertedUnits)
     
    210219     */
    211220    function checkDistanceOfGroupUnits(unitsMap, insertedUnits, minDistance) {
    212         if (unitsMap.length < 2) {
     221        if (unitsMap.length === undefined || unitsMap.length < 2) {
    213222            return
    214223        }
Note: See TracChangeset for help on using the changeset viewer.