Support » Plugin: Ambrosite Next/Previous Post Link Plus » Apply filters to returned output

  • If this plugin ever gets an update, I think it would be good to run app_filters before returning the text output. Replace lines 384–389 with:

    $adjacent = $previous ? 'previous' : 'next';
    	$output = apply_filters( "{$adjacent}_post_link_plus", $output, $r );
    	//	If echo is false, don't display anything. Return the link as a PHP string.
    	if ( !$r['echo'] || $r['return'] === 'output' )
    		return $output;
    	echo $output;

    It’s baffling when you don’t get the same output using echo next_post_link_plus('return=output') as you get with next_post_link_plus(). At the very least, the documentation could mention this behavior.

    Thanks for a kickass plugin!

Viewing 1 replies (of 1 total)
  • Plugin Author ambrosite


    A good suggestion. For years there has never been any technical reason to update the plugin, however that may change if core ever gets around to refactoring the taxonomy tables like they have been talking about in the dev blog. If I do release an updated version I will implement your fix.

Viewing 1 replies (of 1 total)
  • The topic ‘Apply filters to returned output’ is closed to new replies.