I wnat to use wp_dropdown_pages() the get a select with all pages within the site. But for all pages that have children, I'd like the <option> to be disabled, because these pages don't have any content. They are there just for hierachial reasons.
So
<select >
<option class="level-0" value="2">Home</option>
<option class="level-0" value="8">Praktisch</option>
<option class="level-1" value="53"> Contact & Route</option>
<option class="level-1" value="55"> Mission</option>
<option class="level-1" value="57"> Who is who</option>
<option class="level-0" value="12">Schrijfcoaching</option>
<option class="level-1" value="63"> Schrijfcoaching</option>
<option class="level-1" value="65"> Manuscriptbeoordeling</option>
</select>
should be
<select >
<option class="level-0" value="2" disabled>Home</option>
<option class="level-0" value="8">Praktisch</option>
<option class="level-1" value="53"> Contact & Route</option>
<option class="level-1" value="55"> Mission</option>
<option class="level-1" value="57"> Who is who</option>
<option class="level-0" value="12" disabled>Schrijfcoaching</option>
<option class="level-1" value="63"> Schrijfcoaching</option>
<option class="level-1" value="65"> Manuscriptbeoordeling</option>
</select>
Is there a way to do this?