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');
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.
Closed: cannot reproduce
1.1
Code
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');