Open
Description
DocBlocks outside a conditional are not imported if there are other filters (with DocBlocks) within the conditional.
Example 1
In this example DocBlock 2 is not imported for the filter in_conditional_expression
/**
* DocBlock 1
*/
function test_docblocks() {
/**
* DocBlock 2
*/
if ( apply_filters( 'in_conditional_expression', true ) ) {
/**
* DocBlock 3
*/
$value = apply_filters( 'in_conditional', true );
}
}
Example 2
In this example the (wrong) DocBlock 2 is imported for the filter 'in_conditional`.
/**
* DocBlock 1
*/
function test_docblocks() {
/**
* DocBlock 2
*/
if ( apply_filters( 'in_conditional_expression', true ) ) {
$value = apply_filters( 'in_conditional', true );
}
}
The wp_save_post_revision_check_for_changes filter doesn't get its DocBlock imported because of this bug.
See this filter in trac