(12 . 61)(12 . 6)
29462 $title = __('Permalink Settings');
29463 $parent_file = 'options-general.php';
29464
29465 /**
29466 * Display JavaScript on the page.
29467 *
29468 * @package WordPress
29469 * @subpackage Permalink_Settings_Panel
29470 */
29471 function add_js() {
29472 ?>
29473 <script type="text/javascript">
29474 //<![CDATA[
29475 function GetElementsWithClassName(elementName, className) {
29476 var allElements = document.getElementsByTagName(elementName);
29477 var elemColl = new Array();
29478 for (i = 0; i < allElements.length; i++) {
29479 if (allElements[i].className == className) {
29480 elemColl[elemColl.length] = allElements[i];
29481 }
29482 }
29483 return elemColl;
29484 }
29485
29486 function upit() {
29487 var inputColl = GetElementsWithClassName('input', 'tog');
29488 var structure = document.getElementById('permalink_structure');
29489 var inputs = '';
29490 for (i = 0; i < inputColl.length; i++) {
29491 if ( inputColl[i].checked && inputColl[i].value != '') {
29492 inputs += inputColl[i].value + ' ';
29493 }
29494 }
29495 inputs = inputs.substr(0,inputs.length - 1);
29496 if ( 'custom' != inputs )
29497 structure.value = inputs;
29498 }
29499
29500 function blurry() {
29501 if (!document.getElementById) return;
29502
29503 var structure = document.getElementById('permalink_structure');
29504 structure.onfocus = function () { document.getElementById('custom_selection').checked = 'checked'; }
29505
29506 var aInputs = document.getElementsByTagName('input');
29507
29508 for (var i = 0; i < aInputs.length; i++) {
29509 aInputs[i].onclick = aInputs[i].onkeyup = upit;
29510 }
29511 }
29512
29513 window.onload = blurry;
29514 //]]>
29515 </script>
29516 <?php
29517 }
29518 add_filter('admin_head', 'add_js');
29519
29520 include('admin-header.php');
29521
29522 $home_path = get_home_path();