Skip to content

Commit

Permalink
Remove the _deprecated_function() call from add_legacy_block_on_conse…
Browse files Browse the repository at this point in the history
…nt_attributes().
  • Loading branch information
techanvil committed Mar 7, 2024
1 parent 73b0df0 commit e401ca5
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions includes/Modules/Analytics_4/Web_Tag.php
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ class Web_Tag extends Module_Web_Tag implements Tag_Interface {
*
* @since 1.122.0
* @deprecated This property is deprecated and should be removed when the legacy tag blocking mechanism
* is removed (see the `add_legacy_block_on_consent_attributes()` method below).
* is removed (see the method `Module_Web_Tag::is_tag_blocked_on_consent`).
* @var bool
*/
private $is_consent_mode_enabled;
Expand Down Expand Up @@ -97,7 +97,7 @@ public function set_ads_conversion_id( $ads_conversion_id ) {
*
* @since 1.122.0
* @deprecated This method is deprecated and should be removed when the legacy tag blocking mechanism
* is removed (see the `add_legacy_block_on_consent_attributes()` method below).
* is removed (see the method `Module_Web_Tag::is_tag_blocked_on_consent`).
*
* @return array args to pass to apply_filters_deprecated if deprecated ($version, $replacement, $message)
*/
Expand Down Expand Up @@ -248,15 +248,15 @@ protected function get_tag_config() {
*
* @since 1.122.0
* @deprecated This mechanism for blocking the tag is deprecated and the Consent Mode feature should be used instead.
* This method should be removed when the legacy tag blocking mechanism is removed (see the method
* `Module_Web_Tag::is_tag_blocked_on_consent`).
*
* @param string $tag The script tag.
* @param string $gtag_src The gtag script source URL.
* @param string $block_on_consent_attrs The attributes to add to the script tag to block it until user consent is granted.
* @return string The script tag with the added attributes.
*/
protected function add_legacy_block_on_consent_attributes( $tag, $gtag_src, $block_on_consent_attrs ) {
_deprecated_function( __METHOD__, '1.122.0' );

return str_replace(
array(
"<script src='$gtag_src'", // phpcs:ignore WordPress.WP.EnqueuedResources.NonEnqueuedScript
Expand Down

0 comments on commit e401ca5

Please sign in to comment.