Empty DIV ID for inserted content
-
Dear Paul,
first of all, thank you very much for your continuous effort in maintaining this plugin. I discovered that W3C Validator detects empty ID tag in the div tag generated around the inserted content.
The corresponding HTML code is created in the latest version of the plugin in function insert_pages_wrap_content in insert-pages.php:840.
There is already a special handling for detecting the existence of id in the attributes array, but apparently the test for _isset_ is not sufficient. Therefore, I added the following test to improve reliability.
before:
$maybe_id = isset( $attributes['id'] ) ? ' id="' . esc_attr( $attributes['id'] ) . '"' : '';after:
$maybe_id = ( isset( $attributes['id'] ) && strlen( $attributes['id'] ) > 0 ) ? ' id="' . esc_attr( $attributes['id'] ) . '"' : '';Hope this helps.
Cheers,
Matthieu
The topic ‘Empty DIV ID for inserted content’ is closed to new replies.