Roles accessiblity option in Auto ads visibility?

Created on 7 August 2019, over 5 years ago
Updated 18 November 2023, about 1 year ago

Hi, I like this module, save lots of time for me.

I found the permissions of "Hide AdSense" is limited to hide adsense blocks, not for Auto ads. And in "Auto ads visibility" setting page, it can be controlled by url pattern only.

I am wondering if visibility based on roles is possible in future version? It would be very useful for website constructors to implement a ads system based on memberships.

Feature request
Status

Closed: cannot reproduce

Version

1.1

Component

Code

Created by

🇹🇼Taiwan tky

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Comments & Activities

Not all content is available!

It's likely this issue predates Contrib.social: some issue and comment data are missing.

  • adsense.module

    function adsense_page_attachments(array &$attachments) {
      /*WT+:Disable Auto-ads for roles with access 'Hide AdSense'*/ if( \Drupal::currentUser()->hasPermission('hide adsense') ) RETURN;
      $config = \Drupal::config('adsense.settings');
    
Production build 0.71.5 2024