We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent cccacc9 commit 05554ddCopy full SHA for 05554dd
html-api-debugger/html-api-integration.php
@@ -26,8 +26,10 @@ class_exists( '\WP_CSS_Complex_Selector_List' )
26
* @return string|null The normalized HTML or null if not supported.
27
*/
28
function get_normalized_html( string $html, array $options ): ?string {
29
- $cfacn = new ReflectionMethod( WP_HTML_Processor::class, 'create_fragment_at_current_node' );
30
- $cfacn->setAccessible( true );
+ if ( method_exists( WP_HTML_Processor::class, 'create_fragment_at_current_node' ) ) {
+ $cfacn = new ReflectionMethod( WP_HTML_Processor::class, 'create_fragment_at_current_node' );
31
+ $cfacn->setAccessible( true );
32
+ }
33
34
if (
35
method_exists( WP_HTML_Processor::class, 'create_fragment_at_current_node' ) &&
0 commit comments