Support » Plugins » Custom Apply_filters Issue – Returns Null on Multiple

  • Resolved cpres


    I’m building a way to extend a plugin I’m developing using the following filter for grabbing the html content from a different plugin:

    $content = apply_filters('satl_render_view', array($view, $slides));

    With just one plugin this works perfectly, but once I activate a second plugin utilizing this filter it stops working, $content is null :

    I’m adding the filters on the plugins in the __construct() method:
    add_filter('satl_render_view', array('SatellitePortraitPlugin','addRender'));
    add_filter('satl_render_view', array('SatelliteAwesomePlugin', 'addRender'));

    Anyone run into this before?

    In case it helps, this is the addRender method as it currently stands:

    public static function addRender($params)
            list($view, $slides) = $params;
            $plugin = new SatelliteAwesomePlugin();
            return $plugin->render($view, array('slides' => $slides, 'frompost' => 'false'), false);

    For the record, I’ve tried remove_filter() if there is no content to return, but that didn’t solve the problem.

Viewing 1 replies (of 1 total)
Viewing 1 replies (of 1 total)
  • The topic ‘Custom Apply_filters Issue – Returns Null on Multiple’ is closed to new replies.