Skip to content

Commit 65db1f6

Browse files
committed
Merge branch 'develop' into trunk
2 parents 4b153b1 + d545ca6 commit 65db1f6

File tree

10 files changed

+195
-81
lines changed

10 files changed

+195
-81
lines changed

.distignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22
/.git
33
/.github
44
/.wordpress-org
5+
/assets
56
/config
67
/tests
78
/node_modules
Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
# Dependency Review Action
2+
#
3+
# This Action will scan dependency manifest files that change as part of a Pull Reqest, surfacing known-vulnerable versions of the packages declared or updated in the PR. Once installed, if the workflow run is marked as required, PRs introducing known-vulnerable packages will be blocked from merging.
4+
#
5+
# Source repository: https://github.com/actions/dependency-review-action
6+
# Public documentation: https://docs.github.com/en/code-security/supply-chain-security/understanding-your-software-supply-chain/about-dependency-review#dependency-review-enforcement
7+
name: 'Dependency Review'
8+
on: [pull_request]
9+
10+
permissions:
11+
contents: read
12+
13+
jobs:
14+
dependency-review:
15+
runs-on: ubuntu-latest
16+
steps:
17+
- name: 'Checkout Repository'
18+
uses: actions/checkout@v3
19+
- name: 'Dependency Review'
20+
uses: actions/dependency-review-action@v1

CHANGELOG.md

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,24 @@ All notable changes to this project will be documented in this file, per [the Ke
44

55
## [Unreleased] - TBD
66

7+
## [1.1.0] - 2022-06-27
8+
### Added
9+
- Dependency security scanning (props [@jeffpaul](https://github.com/jeffpaul), [@Sidsector9](https://github.com/Sidsector9) via [#63](https://github.com/10up/Ad-Refresh-Control/pull/63)).
10+
11+
### Changed
12+
- Bump WordPress version "tested up to" 6.0 (props [@cadic](https://github.com/cadic) via [#66](https://github.com/10up/Ad-Refresh-Control/issues/66)).
13+
14+
### Fixed
15+
- PHP Warnings when pushing "Submit" on the settings page (props [@sksaju](https://github.com/sksaju), [@peterwilsoncc](https://github.com/peterwilsoncc) via [#60](https://github.com/10up/Ad-Refresh-Control/pull/60)).
16+
- Error when saving settings for the first time of using the plugin (props [@cadic](https://github.com/cadic), [@faisal-alvi](https://github.com/faisal-alvi) via [#67](https://github.com/10up/Ad-Refresh-Control/pull/67)).
17+
18+
### Security
19+
- Bump `color-string` from 1.5.3 to 1.5.5 (props [@dependabot](https://github.com/apps/dependabot) via [#51](https://github.com/10up/Ad-Refresh-Control/pull/51)).
20+
- Bump `path-parse` from 1.0.6 to 1.0.7 (props [@dependabot](https://github.com/apps/dependabot) via [#53](https://github.com/10up/Ad-Refresh-Control/pull/53)).
21+
- Bump `follow-redirects` from 1.7.0 to 1.14.8 (props [@dependabot](https://github.com/apps/dependabot) via [#55](https://github.com/10up/Ad-Refresh-Control/pull/55), [#57](https://github.com/10up/Ad-Refresh-Control/pull/57)).
22+
- Bump `ajv` from 6.10.0 to 6.12.6 (props [@dependabot](https://github.com/apps/dependabot) via [#56](https://github.com/10up/Ad-Refresh-Control/pull/56)).
23+
- Bump `tar` from 4.4.8 to 4.4.19 (props [@dependabot](https://github.com/apps/dependabot) via [#58](https://github.com/10up/Ad-Refresh-Control/pull/58)).
24+
725
## [1.0.5] - 2021-06-23
826
### Added
927
- `avc_refresh_interval_value` filter applied to default refresh interval value of 30 seconds (props [@10upsimon](https://github.com/10upsimon) via [#48](https://github.com/10up/Ad-Refresh-Control/pull/48)).
@@ -69,6 +87,7 @@ All notable changes to this project will be documented in this file, per [the Ke
6987
- Initial public release! 🎉
7088

7189
[Unreleased]: https://github.com/10up/Ad-Refresh-Control/compare/trunk...develop
90+
[1.1.0]: https://github.com/10up/Ad-Refresh-Control/compare/1.0.5...1.1.0
7291
[1.0.5]: https://github.com/10up/Ad-Refresh-Control/compare/1.0.4...1.0.5
7392
[1.0.4]: https://github.com/10up/Ad-Refresh-Control/compare/1.0.3...1.0.4
7493
[1.0.3]: https://github.com/10up/Ad-Refresh-Control/compare/1.0.2...1.0.3

CREDITS.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ The following individuals are responsible for curating the list of issues, respo
1010

1111
Thank you to all the people who have already contributed to this repository via bug reports, code, design, ideas, project management, translation, testing, etc.
1212

13-
[10up (@10up)](https://github.com/10up), [Gary Thayer (@gthayer)](https://github.com/gthayer), [David Green (@davidrgreen)](https://github.com/davidrgreen), [Jeffrey Paul (@jeffpaul)](https://github.com/jeffpaul), [Jackie Kjome (@JackieKjome)](https://github.com/JackieKjome), [GitHub Dependabot (@dependabot)](https://github.com/apps/dependabotg), [Elliott Stocks (@elliott-stocks)](https://github.com/elliott-stocks), [Barry Ceelen (@barryceelen)](https://github.com/barryceelen), [Daryll Doyle (@darylldoyle)](https://github.com/darylldoyle), [Tung Du (@dinhtungdu)](https://github.com/dinhtungdu), [Simon Dowdles (@10upsimon)](https://github.com/10upsimon).
13+
[10up (@10up)](https://github.com/10up), [Gary Thayer (@gthayer)](https://github.com/gthayer), [David Green (@davidrgreen)](https://github.com/davidrgreen), [Jeffrey Paul (@jeffpaul)](https://github.com/jeffpaul), [Jackie Kjome (@JackieKjome)](https://github.com/JackieKjome), [GitHub Dependabot (@dependabot)](https://github.com/apps/dependabotg), [Elliott Stocks (@elliott-stocks)](https://github.com/elliott-stocks), [Barry Ceelen (@barryceelen)](https://github.com/barryceelen), [Daryll Doyle (@darylldoyle)](https://github.com/darylldoyle), [Tung Du (@dinhtungdu)](https://github.com/dinhtungdu), [Simon Dowdles (@10upsimon)](https://github.com/10upsimon), [Siddharth Thevaril (@Sidsector9)](https://github.com/Sidsector9), [Max Lyuchin (@cadic)](https://github.com/cadic), [Shazahan Kabir Saju (@sksaju)](https://github.com/sksaju), [Peter Wilson (@peterwilsoncc)](https://github.com/peterwilsoncc), [Faisal Alvi (@faisal-alvi)](https://github.com/faisal-alvi).
1414

1515
## Libraries
1616

README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
> Enable Active View refresh for Google Ad Manager ads without needing to modify any code.
44
5-
[![Support Level](https://img.shields.io/badge/support-active-green.svg)](#support-level) [![Release Version](https://img.shields.io/github/release/10up/ad-refresh-control.svg)](https://github.com/10up/ad-refresh-control/releases/latest) ![WordPress tested up to version](https://img.shields.io/badge/WordPress-v5.7%20tested-success.svg) [![GPLv2 License](https://img.shields.io/github/license/10up/ad-refresh-control.svg)](https://github.com/10up/ad-refresh-control/blob/develop/LICENSE.md)
5+
[![Support Level](https://img.shields.io/badge/support-active-green.svg)](#support-level) [![Release Version](https://img.shields.io/github/release/10up/ad-refresh-control.svg)](https://github.com/10up/ad-refresh-control/releases/latest) ![WordPress tested up to version](https://img.shields.io/wordpress/plugin/tested/ad-refresh-control?label=WordPress) [![GPLv2 License](https://img.shields.io/github/license/10up/ad-refresh-control.svg)](https://github.com/10up/ad-refresh-control/blob/develop/LICENSE.md)
66

77
## Background & Purpose
88

@@ -40,7 +40,7 @@ A settings page will allow adjustments such as the time between refreshes, the m
4040

4141
### Hooks
4242

43-
####`avc_refresh_interval_value`
43+
#### `avc_refresh_interval_value`
4444
- Filters the default refresh interval value of 30 seconds. This filter is applied to the value at storage and retrieval phases.
4545
- Since 1.0.5
4646

ad-refresh-control.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
* Plugin Name: Ad Refresh Control
44
* Plugin URI: https://github.com/10up/Ad-Refresh-Control
55
* Description: Enable Active View refresh for Google Ad Manager ads without needing to modify any code.
6-
* Version: 1.0.5
6+
* Version: 1.1.0
77
* Requires at least: 4.9
88
* Requires PHP: 7.0
99
* Author: 10up
@@ -17,7 +17,7 @@
1717
*/
1818

1919
// Useful global constants.
20-
define( 'AD_REFRESH_CONTROL_VERSION', '1.0.5' );
20+
define( 'AD_REFRESH_CONTROL_VERSION', '1.1.0' );
2121
define( 'AD_REFRESH_CONTROL_URL', plugin_dir_url( __FILE__ ) );
2222
define( 'AD_REFRESH_CONTROL_PATH', plugin_dir_path( __FILE__ ) );
2323
define( 'AD_REFRESH_CONTROL_INC', AD_REFRESH_CONTROL_PATH . 'includes/' );

includes/settings.php

Lines changed: 19 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -292,9 +292,13 @@ function sanitize_settings( $settings ) {
292292

293293
// advertiser_ids
294294
$advertiser_ids_default = [];
295-
if ( isset( $settings['advertiser_ids'] ) ) {
295+
if ( ! empty( $settings['advertiser_ids'] ) ) {
296296

297-
$advertiser_ids = explode( ',', $settings['advertiser_ids'] );
297+
if ( is_array( $settings['advertiser_ids'] ) ) {
298+
$advertiser_ids = $settings['advertiser_ids'];
299+
} else {
300+
$advertiser_ids = explode( ',', $settings['advertiser_ids'] );
301+
}
298302

299303
$advertiser_ids = array_filter(
300304
$advertiser_ids,
@@ -316,9 +320,13 @@ function( $advertiser_id ) {
316320

317321
// Line item IDs.
318322
$line_item_ids_default = [];
319-
if ( isset( $settings['line_item_ids'] ) ) {
323+
if ( ! empty( $settings['line_item_ids'] ) ) {
320324

321-
$line_item_ids = explode( ',', $settings['line_item_ids'] );
325+
if ( is_array( $settings['line_item_ids'] ) ) {
326+
$line_item_ids = $settings['line_item_ids'];
327+
} else {
328+
$line_item_ids = explode( ',', $settings['line_item_ids'] );
329+
}
322330

323331
$line_item_ids = array_filter(
324332
$line_item_ids,
@@ -340,7 +348,7 @@ function ( $line_item_id ) {
340348

341349
// Sizes.
342350
$sizes_to_exclude_default = '';
343-
if ( isset( $settings['sizes_to_exclude'] ) ) {
351+
if ( ! empty( $settings['sizes_to_exclude'] ) ) {
344352
$sizes = sanitize_text_field( $settings['sizes_to_exclude'] );
345353
$settings['sizes_to_exclude'] = $sizes;
346354
} else {
@@ -349,9 +357,13 @@ function ( $line_item_id ) {
349357

350358
// Slot IDs.
351359
$slot_ids_to_exclude_default = [];
352-
if ( isset( $settings['slot_ids_to_exclude'] ) ) {
360+
if ( ! empty( $settings['slot_ids_to_exclude'] ) ) {
353361

354-
$slot_ids_to_exclude = explode( ',', $settings['slot_ids_to_exclude'] );
362+
if ( is_array( $settings['slot_ids_to_exclude'] ) ) {
363+
$slot_ids_to_exclude = $settings['slot_ids_to_exclude'];
364+
} else {
365+
$slot_ids_to_exclude = explode( ',', $settings['slot_ids_to_exclude'] );
366+
}
355367

356368
$slot_ids_to_exclude = array_filter(
357369
$slot_ids_to_exclude,

0 commit comments

Comments
 (0)