$advertiser_ids_assoc, 'lineItemIds' => $line_item_ids_assoc, 'sizesToExclude' => $sizes_to_exclude, 'slotIdsToExclude' => $slot_ids_to_exclude_assoc, 'viewabilityThreshold' => apply_filters( 'avc_viewability_threshold', $viewability_threshold ), 'refreshInterval' => apply_filters( 'avc_refresh_interval', $refresh_interval ), 'maximumRefreshes' => apply_filters( 'avc_maximum_refreshes', $maximum_refreshes ), 'refreshCallback' => apply_filters( 'avc_refresh_callback', false ), ] ); } /** * Add async/defer attributes to enqueued scripts that have the specified script_execution flag. * * @link https://core.trac.wordpress.org/ticket/12009 * @param string $tag The script tag. * @param string $handle The script handle. * @return string */ function script_loader_tag( $tag, $handle ) { $script_execution = wp_scripts()->get_data( $handle, 'script_execution' ); if ( ! $script_execution ) { return $tag; } if ( 'async' !== $script_execution && 'defer' !== $script_execution ) { return $tag; // _doing_it_wrong()? } // Abort adding async/defer for scripts that have this script as a dependency. _doing_it_wrong()? foreach ( wp_scripts()->registered as $script ) { if ( in_array( $handle, $script->deps, true ) ) { return $tag; } } // Add the attribute if it hasn't already been added. if ( ! preg_match( ":\s$script_execution(=|>|\s):", $tag ) ) { $tag = preg_replace( ':(?=>):', " $script_execution", $tag, 1 ); } return $tag; }