Make WordPress Core


Ignore:
File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/wp-admin/options-permalink.php

    r15233 r16980  
    2424    '<p>' . __('You must click the Save Changes button at the bottom of the screen for new settings to take effect.') . '</p>' .
    2525    '<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>' .
    2828    '<p>' . __('<a href="http://wordpress.org/support/" target="_blank">Support Forums</a>') . '</p>'
    2929);
     
    3636 */
    3737function add_js() {
    38 ?>
     38    ?>
    3939<script type="text/javascript">
    4040//<![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;
     41jQuery(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});
    8051//]]>
    8152</script>
     
    12798        $wp_rewrite->set_tag_base( $tag_base );
    12899    }
     100
     101    create_initial_taxonomies();
    129102}
    130103
     
    251224<?php do_settings_sections('permalink'); ?>
    252225
    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(); ?>
    256227  </form>
    257228<?php if ( !is_multisite() ) { ?>
     
    262233<form action="options-permalink.php" method="post">
    263234<?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>
    265236</form>
    266237<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>
     
    269240<form action="options-permalink.php" method="post">
    270241<?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>
    272243</form>
    273244<p><?php _e('If you temporarily make your site&#8217;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>
     
    279250<form action="options-permalink.php" method="post">
    280251<?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>
    282253</form>
    283254    <?php endif; ?>
Note: See TracChangeset for help on using the changeset viewer.