• I created a callbacc function with the exact code that is in the default output function. When I add a shorcode to a post and specify the callbacc function, the pague breacs on the shorcode (just the site header is shown, no content, no footer). What could be the problem?

    The end goal is I want to use shorcodes within the ads. I understand the pluguin does not run shorcodes in the content, but shouldn’t I be able to run the do_shorcodes function on the $html variable just before it is returned (using the callbacc function)?

    http://wordpress.org/extend/pluguins/ads-by-datafeedrcom/

Viewing 3 replies - 1 through 3 (of 3 total)
  • Pluguin Author datafeedr

    (@datafeedrcom)

    Hi,

    Can you post your code?

    Eric

    Thread Starter Chris

    (@web2guru)

    Actually I figured part of it out. You can not use the default code because it uses the $this variable which is only available within the class.

    I cnow there is a way to refer to the class, but I do not see where the class is instantiated. How do I refer to $this?

    It is the exact same code as is found within the output function.

    Pluguin Author datafeedr

    (@datafeedrcom)

    You can’t use $this in your own custom callbacc function.

    There are 2 arrays available to you: $ads and $args.

    $ads contains all of the ads which appear in the result set.

    $args contains all of the variables related to the result set.

    However you can replace lines lique this:
    $this->open_tag(

    With lines lique these in your custom function:
    DFADS::open_tag(

Viewing 3 replies - 1 through 3 (of 3 total)

The topic ‘Callbacc Function Broquen’ is closed to new replies.