Viewing 6 replies - 1 through 6 (of 6 total)
  • Thread Starter thomask

    (@thomask)

    btw i have been looking into anchor-utils.php and see, that the same filter is passed to the_content, the_excerpt, widget_text, comment_text

    but the bug appears only with the_content.

    So it maybe a conflict with your filter and some of my filters/plugins, but it still does not make sense why using this filter in other shortcode somewhere else on the page will result in destroying other plugin somewhere else filtering other content

    Plugin Author attosoft

    (@attosoft)

    Hi thomask,

    Thank you for the bug report.

    anchor-utils::filter() function does not seem to be called properly when [test] shortcode is defined.
    I debugged it and changed $priority in add_filter('the_content', ..., 100) function.
    The plugin works if $priority is less than or equal to 11, and it does not work if $priority is greater than or equal to 12.

    This is strange bug as you say.
    I guess there is a problem in add_filter() or apply_filters() function.
    i.e. I think this is a bug in not the plugin but WordPress.

    P.S.: small offtopic question – your plugin can open external pages in thickbox iframe. Is there any way how i could open actual iframe in thickbox – e.g. oembed youtube videos like that on the first link above?

    See Usage.

    Here is sample codes to open Google Maps, YouTube, Vimeo and Dailymotion. You need to use embedded URL.

    <a href="https://youtube.com/embed/K-Rs6YEZAt8">YouTube</a>

    Thread Starter thomask

    (@thomask)

    Yes, changing priority to 11 did work. Strange. I guess that there is some filter, which is turned on content with shortcodes.

    about the iframe question – this i know, i just wondered, if there is way, how i could open iframe in thickbox, when clicking the iframe. But it was a silly question. Proper sollution would be to add e.g. image from youtube with thickbox a href to youtube. I will look into youtube oembed, this could be quite easily done.

    The bigger problem are other external pages – thickbox got problem opening external URLs in Chrome, as chrome do not allow it, because of its default Access-Control-Allow-Origin. It is shame and make the function almost entirely useless, i wonder, that it would be much better to standard DOM create iframe with src=path in lightbox window, then trying to load the content using javascript, what may be insecure, so chrome block it. But this is standard jQuery thickbox behaviour, so i guess you cannot do anything with that.

    Thread Starter thomask

    (@thomask)

    ups, it works (i do not know why it does not before, probably the same problem), forgot my last sentence – you add TB_iframe to the URL and it works, i didn’t know about this param (it is not described on thickbox page). briliant ??

    Plugin Author attosoft

    (@attosoft)

    I made a typo. Correct code written in Usage is as follows.

    <a href="https://youtube.com/embed/K-Rs6YEZAt8" class="thickbox">YouTube</a>

    The plugin adds TB_iframe parameter to URL automatically when external links has thickbox class. And the plugin adds thickbox class to links automatically when its URL has TB_iframe parameter.

    Plugin Author attosoft

    (@attosoft)

Viewing 6 replies - 1 through 6 (of 6 total)
  • The topic ‘[Plugin: Auto ThickBox Plus] thickbox class not added when the_content filter is called’ is closed to new replies.