WordPress.org

Make WordPress Core

Ticket #2001: 2001.diff

File 2001.diff, 2.4 KB (added by robmiller, 12 years ago)
  • options-permalink.php

     
    3131inputs = inputs.substr(0,inputs.length - 1);
    3232if ( 'custom' != inputs )
    3333structure.value = inputs;
     34togglehelp();
    3435}
    3536
    3637function blurry() {
     
    4445for (var i = 0; i < aInputs.length; i++) {
    4546aInputs[i].onclick = aInputs[i].onkeyup = upit;
    4647}
     48
     49var link = document.getElementById('custom_selection');
     50var help = document.getElementById('cp_help');
     51if(!link.checked) help.className = 'zerosize';
    4752}
    4853
     54function togglehelp() {
     55var help = document.getElementById('cp_help');
     56var link = document.getElementById('custom_selection');
     57if(link.checked) {
     58        help.className = '';
     59} else {
     60        help.className = 'zerosize';
     61}
     62}
     63
    4964window.onload = blurry;
    5065//]]>
    5166</script>
     
    145160</label>
    146161<br />
    147162</p>
     163<div id="cp_help" class="cp_help">
     164<p><?php _e('WordPress permalink structures are made up of variables, typically separated by forward-slashes. Some variables you can use are:'); ?></p>
     165<ul>
     166        <li><code>%post_id%</code> &mdash; <?php _e('the numeric ID of the page'); ?></li>
     167        <li><code>%year%</code> &mdash; <?php _e('the year the entry was posted'); ?></li>
     168        <li><code>%monthnum%</code> &mdash; <?php _e('the numeric form of the month in which the entry was posted'); ?></li>
     169        <li><code>%day%</code> &mdash; <?php _e('the numeric form of the day of the month on which the entry was posted'); ?></li>
     170        <li><code>%postname%</code> &mdash; <?php _e("the post's slug"); ?></li>
     171</ul>
     172<p><?php _e('Some tips for creating your own permalink structure:'); ?></p>
     173<ul>
     174        <li><?php _e('Be sure to end your permalinks with something unique to each post, like <code>%postname%</code> or <code>%post_id%</code>.'); ?></li>
     175        <li><?php _e("If you don't have <code>mod_rewrite</code> installed, you can start your permalink structure with <code>/index.php/</code> and WordPress will try to bypass the need for <code>mod_rewrite</code>."); ?></li>
     176</ul>
     177<p><?php _e(sprintf('For more detailed information, check <a href="%s">the Codex</a>.', 'http://codex.wordpress.org/Using_Permalinks')); ?></p>
     178</div>
    148179<p id="customstructure"><?php _e('Custom structure'); ?>: <input name="permalink_structure" id="permalink_structure" type="text" class="code" style="width: 60%;" value="<?php echo $permalink_structure; ?>" size="50" /></p>
    149180
    150181<h3><?php _e('Optional'); ?></h3>