Skip to content

Commit 92c3cca

Browse files
committed
Radio selection smartness. Props filosofo. fixes WordPress#1895
git-svn-id: https://develop.svn.wordpress.org/trunk@3148 602fd350-edb4-49c9-b593-d223f7449a82
1 parent f19c925 commit 92c3cca

1 file changed

Lines changed: 4 additions & 1 deletion

File tree

wp-admin/options-permalink.php

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,9 @@ function upit() {
3636
function blurry() {
3737
if (!document.getElementById) return;
3838

39+
var structure = document.getElementById('permalink_structure');
40+
structure.onfocus = function () { document.getElementById('custom_selection').checked = 'checked'; }
41+
3942
var aInputs = document.getElementsByTagName('input');
4043

4144
for (var i = 0; i < aInputs.length; i++) {
@@ -135,7 +138,7 @@ function blurry() {
135138
</p>
136139
<p>
137140
<label>
138-
<input name="selection" type="radio" value="custom" class="tog"
141+
<input name="selection" id="custom_selection" type="radio" value="custom" class="tog"
139142
<?php if ( !in_array($permalink_structure, $structures) ) { ?>
140143
checked="checked"
141144
<?php } ?>

0 commit comments

Comments
 (0)