WordPress.org

Make WordPress Core

Changeset 5490


Ignore:
Timestamp:
05/19/07 04:26:02 (8 years ago)
Author:
rob1n
Message:

Select the option if it's set to that. fixes #4291

Files:
2 edited

Legend:

Unmodified
Added
Removed
  • branches/2.2/wp-includes/widgets.php

    r5486 r5490  
    374374            <p><label for="pages-sortby"><?php _e( 'Sort by:' ); ?>  
    375375                <select name="pages-sortby" id="pages-sortby"> 
    376                     <option value="post_title"><?php _e('Page title'); ?></option> 
    377                     <option value="menu_order"><?php _e('Menu order'); ?></option> 
    378                     <option value="ID"><?php _e( 'Page ID' ); ?></option> 
     376                    <option value="post_title"<?php if ( $options['sortby'] == 'post_title' ) { ?> selected="selected"<?php } ?>><?php _e('Page title'); ?></option> 
     377                    <option value="menu_order"<?php if ( $options['sortby'] == 'menu_order' ) { ?> selected="selected"<?php } ?>><?php _e('Menu order'); ?></option> 
     378                    <option value="ID"<?php if ( $options['sortby'] == 'ID' ) { ?> selected="selected"<?php } ?>><?php _e( 'Page ID' ); ?></option> 
    379379                </select></label></p> 
    380380            <input type="hidden" id="pages-submit" name="pages-submit" value="1" /> 
  • trunk/wp-includes/widgets.php

    r5486 r5490  
    374374            <p><label for="pages-sortby"><?php _e( 'Sort by:' ); ?>  
    375375                <select name="pages-sortby" id="pages-sortby"> 
    376                     <option value="post_title"><?php _e('Page title'); ?></option> 
    377                     <option value="menu_order"><?php _e('Menu order'); ?></option> 
    378                     <option value="ID"><?php _e( 'Page ID' ); ?></option> 
     376                    <option value="post_title"<?php if ( $options['sortby'] == 'post_title' ) { ?> selected="selected"<?php } ?>><?php _e('Page title'); ?></option> 
     377                    <option value="menu_order"<?php if ( $options['sortby'] == 'menu_order' ) { ?> selected="selected"<?php } ?>><?php _e('Menu order'); ?></option> 
     378                    <option value="ID"<?php if ( $options['sortby'] == 'ID' ) { ?> selected="selected"<?php } ?>><?php _e( 'Page ID' ); ?></option> 
    379379                </select></label></p> 
    380380            <input type="hidden" id="pages-submit" name="pages-submit" value="1" /> 
Note: See TracChangeset for help on using the changeset viewer.