Changeset 3014091
- Timestamp:
- 12/25/2023 02:16:18 PM (2 years ago)
- Location:
- nativerent/trunk
- Files:
-
- 4 edited
-
nativerent-bootstrap.php (modified) (1 diff)
-
nativerent.php (modified) (1 diff)
-
readme.txt (modified) (1 diff)
-
static/content.js (modified) (4 diffs)
Legend:
- Unmodified
- Added
- Removed
-
nativerent/trunk/nativerent-bootstrap.php
r3014028 r3014091 43 43 // Plugin version. 44 44 if ( ! defined( 'NATIVERENT_PLUGIN_VERSION' ) ) { 45 define( 'NATIVERENT_PLUGIN_VERSION', '1. 8.5' );45 define( 'NATIVERENT_PLUGIN_VERSION', '1.9.0' ); 46 46 } 47 47 -
nativerent/trunk/nativerent.php
r3014028 r3014091 6 6 * Plugin URI: https://wordpress.org/plugins/nativerent/ 7 7 * Description: Релевантная реклама для ваших читателей. Рекламодатели сервиса платят в 2-3 раза больше за 1 тыс. показов страниц, чем привычные рекламные сетки. Страница выкупается полностью, на ней размещается максимум четыре рекламных блока, которые выглядят нативно в стиле сайта. 8 * Version: 1. 8.58 * Version: 1.9.0 9 9 * Requires at least: 4.9 10 10 * Tested up to: 6.4.2 -
nativerent/trunk/readme.txt
r3014028 r3014091 7 7 Tested up to: 6.4.2 8 8 Requires PHP: 5.6.20 9 Stable tag: 1. 8.59 Stable tag: 1.9.0 10 10 License: GPLv2 or later 11 11 License URI: https://www.gnu.org/licenses/gpl-2.0.html -
nativerent/trunk/static/content.js
r3014028 r3014091 61 61 ntgb: {} 62 62 } 63 var ntgbUnitsCount = 0; 63 64 64 65 for (var i = 0; i < window.NRentAdUnits.length; i++) { … … 162 163 insertedUnits[adUnit.element.id] = adUnit 163 164 if (adUnit.type === 'ntgb') { 165 ++ntgbUnitsCount 166 if (adUnit.unitId === undefined) { 167 adUnit.unitId = ntgbUnitsCount 168 } 164 169 adUnit.element.setAttribute('data-nrent-ntgb-id', adUnit.unitId) 165 170 unitsToCheckDistance.ntgb[adUnit.element.id] = adUnit … … 173 178 } 174 179 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 } 179 188 180 189 logger.debug('NRentPlugin: Init inserted ad-units', insertedUnits) … … 210 219 */ 211 220 function checkDistanceOfGroupUnits(unitsMap, insertedUnits, minDistance) { 212 if (unitsMap.length < 2) {221 if (unitsMap.length === undefined || unitsMap.length < 2) { 213 222 return 214 223 }
Note: See TracChangeset
for help on using the changeset viewer.