• Resolved net

    (@krstarica)


    Is it possible to detect using PHP code if the current page has ads disabled using [adinserter disable="#"]?

Viewing 3 replies - 1 through 3 (of 3 total)
  • Plugin Author Spacetime

    (@spacetime)

    Hello,

    there are many ways the insertion of the blocks can be disabled via plugin settings. Therefore, this is not possible.

    Thread Starter net

    (@krstarica)

    How about:

    1) Querying some Ad Inserter global variable or

    2) Calling some Ad Inserter function or

    3) Using some filter to catch and save the info globally if ad position number 1 is disabled?

    Plugin Author Spacetime

    (@spacetime)

    Not possible as the insertion of a block depends on many settings and also on insertion of other blocks. The final status of blocks is known at the end of page generation process when the wp_footer actons hook is called and where the code is post-processed. However, it is also possible that some blocks are inserted when the_content hooks is called but the results are discarded by the theme so the blocks are actually not inserted in the final “visible” page.

    Viewing 3 replies - 1 through 3 (of 3 total)
    • The topic ‘Detect ads being disabled using PHP’ is closed to new replies.