Execute filter in theme as last

Question

Is it possible the execute the called add_filter in theme after all plugins they’ve been loaded?

I use one of the plugins from repository to can add the ability to define custom target links for gallery item but this one packs additional things which breaks my angular routing so I want to remove theme.

the rule should work I have been tested.
dumping html shows the plugins override is not present at this state.

I have in my functions.php

function attachment_link_sanitize($html) {
  $html = preg_replace("/class="no-lightbox" target="_self"/", "", $html);
  return $html;
}

add_filter('wp_get_attachment_link', 'attachment_link_sanitize',PHP_INT_MAX+1);

Sorry for disturbing I’ve been checking the plugins JS and seems like everything comes from Jquery

0
, fefe 2 years 2020-01-10T08:39:20-05:00 0 Answers 79 views 0

Leave an answer

Browse
Browse