- File:
-
- 1 edited
-
trunk/wp-admin/options-permalink.php (modified) (7 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/wp-admin/options-permalink.php
r15233 r16980 24 24 '<p>' . __('You must click the Save Changes button at the bottom of the screen for new settings to take effect.') . '</p>' . 25 25 '<p><strong>' . __('For more information:') . '</strong></p>' . 26 '<p>' . __('<a href="http://codex.wordpress.org/Settings_Permalinks_SubPanel" target="_blank"> Permalinks Settings Documentation</a>') . '</p>' .27 '<p>' . __('<a href="http://codex.wordpress.org/Using_Permalinks" target="_blank"> Using Permalinks Documentation</a>') . '</p>' .26 '<p>' . __('<a href="http://codex.wordpress.org/Settings_Permalinks_SubPanel" target="_blank">Documentation on Permalinks Settings</a>') . '</p>' . 27 '<p>' . __('<a href="http://codex.wordpress.org/Using_Permalinks" target="_blank">Documentation on Using Permalinks</a>') . '</p>' . 28 28 '<p>' . __('<a href="http://wordpress.org/support/" target="_blank">Support Forums</a>') . '</p>' 29 29 ); … … 36 36 */ 37 37 function add_js() { 38 ?>38 ?> 39 39 <script type="text/javascript"> 40 40 //<![CDATA[ 41 function GetElementsWithClassName(elementName, className) { 42 var allElements = document.getElementsByTagName(elementName); 43 var elemColl = new Array(); 44 for (i = 0; i < allElements.length; i++) { 45 if (allElements[i].className == className) { 46 elemColl[elemColl.length] = allElements[i]; 47 } 48 } 49 return elemColl; 50 } 51 52 function upit() { 53 var inputColl = GetElementsWithClassName('input', 'tog'); 54 var structure = document.getElementById('permalink_structure'); 55 var inputs = ''; 56 for (i = 0; i < inputColl.length; i++) { 57 if ( inputColl[i].checked && inputColl[i].value != '') { 58 inputs += inputColl[i].value + ' '; 59 } 60 } 61 inputs = inputs.substr(0,inputs.length - 1); 62 if ( 'custom' != inputs ) 63 structure.value = inputs; 64 } 65 66 function blurry() { 67 if (!document.getElementById) return; 68 69 var structure = document.getElementById('permalink_structure'); 70 structure.onfocus = function () { document.getElementById('custom_selection').checked = 'checked'; } 71 72 var aInputs = document.getElementsByTagName('input'); 73 74 for (var i = 0; i < aInputs.length; i++) { 75 aInputs[i].onclick = aInputs[i].onkeyup = upit; 76 } 77 } 78 79 window.onload = blurry; 41 jQuery(document).ready(function() { 42 jQuery('input:radio.tog').change(function() { 43 if ( 'custom' == this.value ) 44 return; 45 jQuery('#permalink_structure').val( this.value ); 46 }); 47 jQuery('#permalink_structure').focus(function() { 48 jQuery("#custom_selection").attr('checked', 'checked'); 49 }); 50 }); 80 51 //]]> 81 52 </script> … … 127 98 $wp_rewrite->set_tag_base( $tag_base ); 128 99 } 100 101 create_initial_taxonomies(); 129 102 } 130 103 … … 251 224 <?php do_settings_sections('permalink'); ?> 252 225 253 <p class="submit"> 254 <input type="submit" name="submit" class="button-primary" value="<?php esc_attr_e('Save Changes') ?>" /> 255 </p> 226 <?php submit_button(); ?> 256 227 </form> 257 228 <?php if ( !is_multisite() ) { ?> … … 262 233 <form action="options-permalink.php" method="post"> 263 234 <?php wp_nonce_field('update-permalink') ?> 264 <p><textarea rows="9" class="large-text readonly" name="rules" id="rules" readonly="readonly"><?php echo esc_ html($wp_rewrite->iis7_url_rewrite_rules()); ?></textarea></p>235 <p><textarea rows="9" class="large-text readonly" name="rules" id="rules" readonly="readonly"><?php echo esc_textarea( $wp_rewrite->iis7_url_rewrite_rules() ); ?></textarea></p> 265 236 </form> 266 237 <p><?php _e('If you temporarily make your <code>web.config</code> file writable for us to generate rewrite rules automatically, do not forget to revert the permissions after rule has been saved.') ?></p> … … 269 240 <form action="options-permalink.php" method="post"> 270 241 <?php wp_nonce_field('update-permalink') ?> 271 <p><textarea rows="18" class="large-text readonly" name="rules" id="rules" readonly="readonly"><?php echo esc_ html($wp_rewrite->iis7_url_rewrite_rules(true)); ?></textarea></p>242 <p><textarea rows="18" class="large-text readonly" name="rules" id="rules" readonly="readonly"><?php echo esc_textarea( $wp_rewrite->iis7_url_rewrite_rules(true) ); ?></textarea></p> 272 243 </form> 273 244 <p><?php _e('If you temporarily make your site’s root directory writable for us to generate the <code>web.config</code> file automatically, do not forget to revert the permissions after the file has been created.') ?></p> … … 279 250 <form action="options-permalink.php" method="post"> 280 251 <?php wp_nonce_field('update-permalink') ?> 281 <p><textarea rows="6" class="large-text readonly" name="rules" id="rules" readonly="readonly"><?php echo esc_ html($wp_rewrite->mod_rewrite_rules()); ?></textarea></p>252 <p><textarea rows="6" class="large-text readonly" name="rules" id="rules" readonly="readonly"><?php echo esc_textarea( $wp_rewrite->mod_rewrite_rules() ); ?></textarea></p> 282 253 </form> 283 254 <?php endif; ?>
Note: See TracChangeset
for help on using the changeset viewer.