saiflok
Forum Replies Created
-
Forum: Plugins
In reply to: [Embed Privacy] Does it only work with “the_content”?Ok, that was not obvious to me, sorry. Done now!
For anyone else wondering, how to use this with custom content, that is not filtered by the_content():if (class_exists('epiphyt\Embed_Privacy\Embed_Privacy')) { $allEmbeds = epiphyt\Embed_Privacy\Embed_Privacy::get_instance()->get_embeds(); foreach ($allEmbeds as $post) { $regex = trim(get_post_meta($post->ID, 'regex_default', true), '/'); if (!empty($regex)) { $regex = '/' . $regex . '/'; } else { continue; } $args = [ 'regex' => $regex, ]; $customContent = epiphyt\Embed_Privacy\Embed_Privacy::get_instance()->get_single_overlay($customContent, $post->post_title, $post->post_name, $args); } }Thank you very much for the support @kittmedia !
- This reply was modified 2 years, 11 months ago by saiflok.
Forum: Plugins
In reply to: [Embed Privacy] Does it only work with “the_content”?Specifically providing embed_provider and embed_provider_lowercase will detect and swap the iframe with the right overlay – fine.
Iterating over all Providers however will just replace the iframe with an overlay of the first Provider (amazon-kindle) – clicking on it will reveal the correct iframe again however.
if (class_exists('epiphyt\Embed_Privacy\Embed_Privacy')) { $allEmbeds = epiphyt\Embed_Privacy\Embed_Privacy::get_instance()->get_embeds(); foreach ($allEmbeds as $post) { $customContent = epiphyt\Embed_Privacy\Embed_Privacy::get_instance()->get_single_overlay($werkDetailsContent, $post->post_title, $post->post_name, []); } }Forum: Plugins
In reply to: [Embed Privacy] Does it only work with “the_content”?You mean the Embed_Privacy::get_single_overlay() part?
Two questions regarding that:
- How can I make sure my custom content is being checked for all providers (including custom ones I provided)? get_single_overlay($myCustomContent, ”, ”, []) ?
- Does this also work for detection via JavaScript? I am using a caching plugin.
Thank you very much.
Forum: Plugins
In reply to: [Embed Privacy] Rewoking of global opt in not workinghttps://cannot-tell.local/datenschutz
Protocol ist HTTPS, without subdomain (no www).
Forum: Plugins
In reply to: [Embed Privacy] Rewoking of global opt in not workingSeems that the problem originates from class-embed-privacy.php $current_url. For me current_url is https://$2s:domain.local/datenschutz/ i guess that is not the desired url.
Forum: Plugins
In reply to: [Embed Privacy] Rewoking of global opt in not workingHey. The fix indeed did work for the test installation, however another project still has the problem – I can see, that script and css are not being loaded on the page. How can we proceed?
Forum: Plugins
In reply to: [Embed Privacy] Rewoking of global opt in not workingI can grant you access, sure. You got an email.
Regards