Skip to content

Commit

Permalink
Issue #120 - check that bw_trace_get_attached_hooks is available
Browse files Browse the repository at this point in the history
  • Loading branch information
bobbingwide committed Jun 12, 2019
1 parent 39da821 commit 56a6df6
Showing 1 changed file with 6 additions and 4 deletions.
10 changes: 6 additions & 4 deletions oik.php
Original file line number Diff line number Diff line change
Expand Up @@ -462,10 +462,12 @@ function oik_rest_api_init() {
bw_trace2( $context, "context", false );
if ( $context === 'edit') {
//bw_trace_attached_hooks( 'the_content');
$hooks = bw_trace_get_attached_hooks( 'the_content' );
bw_trace2( $hooks, 'the_content', false, BW_TRACE_ALWAYS );
$hooks = bw_trace_get_attached_hooks( 'get_the_excerpt' );
bw_trace2( $hooks, 'get_the_excerpt', false, BW_TRACE_ALWAYS );
if ( function_exists( 'bw_trace_get_attached_hooks')) {
$hooks = bw_trace_get_attached_hooks( 'the_content' );
bw_trace2( $hooks, 'the_content', false, BW_TRACE_ALWAYS );
$hooks = bw_trace_get_attached_hooks( 'get_the_excerpt' );
bw_trace2( $hooks, 'get_the_excerpt', false, BW_TRACE_ALWAYS );
}
remove_all_filters("the_content");
remove_all_filters( 'get_the_excerpt');
}
Expand Down

0 comments on commit 56a6df6

Please sign in to comment.