Created
August 18, 2023 14:34
-
-
Save michael-sumner/e350c5559f37456af7d10e6cecc2253b to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
// List down all the functions assigned to the "the_content" filter hook. | |
function get_the_content_filters() { | |
$filters = array(); | |
ob_start(); | |
the_content(); | |
$output = ob_get_clean(); | |
global $wp_filter; | |
if ( isset( $wp_filter['the_content'] ) ) { | |
foreach ( $wp_filter['the_content'] as $priority => $callbacks ) { | |
foreach ( $callbacks as $callback ) { | |
$filters[] = $callback['function']; | |
} | |
} | |
} | |
return $filters; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment