Changeset 9871
- Timestamp:
- 11/25/2008 06:33:04 PM (16 years ago)
- Location:
- trunk
- Files:
-
- 8 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/wp-admin/edit-attachment-rows.php
r9807 r9871 36 36 37 37 <?php 38 $posts_columns = wp_manage_media_columns();39 $hidden = (array) get_user_option( 'manage-media-columns-hidden');38 $posts_columns = get_column_headers('media'); 39 $hidden = get_hidden_columns('media'); 40 40 41 41 foreach ($posts_columns as $column_name => $column_display_name ) { -
trunk/wp-admin/edit-form-advanced.php
r9835 r9871 436 436 <p class="hide-if-no-js"><a href="#commentstatusdiv" id="show-comments" onclick="commentsBox.get(<?php echo $total; ?>);return false;"><?php _e('Show comments'); ?></a> <img class="waiting" style="display:none;" src="images/loading.gif" alt="" /></p> 437 437 <?php 438 $hidden = (array) get_user_option( "meta-box-hidden_post" );438 $hidden = (array) get_user_option( "meta-box-hidden_post", 0, false ); 439 439 if ( ! in_array('commentstatusdiv', $hidden) ) { ?> 440 440 <script type="text/javascript">commentsBox.get(<?php echo $total; ?>, 10);</script> -
trunk/wp-admin/includes/post.php
r9847 r9871 870 870 return ''; 871 871 $current_user = wp_get_current_user(); 872 if ( $closed = get_user meta( $current_user->ID, 'closedpostboxes_'.$page ) ) {872 if ( $closed = get_user_option('closedpostboxes_'.$page, 0, false ) ) { 873 873 if ( !is_array( $closed ) ) return ''; 874 874 return in_array( $id, $closed )? 'if-js-closed' : ''; -
trunk/wp-admin/includes/schema.php
r9316 r9871 295 295 add_option('default_comments_page', 'newest'); 296 296 add_option('comment_order', 'asc'); 297 297 add_option('use_ssl', 0); 298 add_option('sticky_posts', array()); 299 add_option('widget_categories', array()); 300 add_option('widget_text', array()); 301 add_option('widget_rss', array()); 302 add_option('update_core', array()); 303 add_option('dismissed_update_core', array()); 304 298 305 // Delete unused options 299 306 $unusedoptions = array ('blodotgsping_url', 'bodyterminator', 'emailtestonly', 'phoneemail_separator', 'smilies_directory', 'subjectprefix', 'use_bbcode', 'use_blodotgsping', 'use_phoneemail', 'use_quicktags', 'use_weblogsping', 'weblogs_cache_file', 'use_preview', 'use_htmltrans', 'smilies_directory', 'fileupload_allowedusers', 'use_phoneemail', 'default_post_status', 'default_post_category', 'archive_mode', 'time_difference', 'links_minadminlevel', 'links_use_adminlevels', 'links_rating_type', 'links_rating_char', 'links_rating_ignore_zero', 'links_rating_single_image', 'links_rating_image0', 'links_rating_image1', 'links_rating_image2', 'links_rating_image3', 'links_rating_image4', 'links_rating_image5', 'links_rating_image6', 'links_rating_image7', 'links_rating_image8', 'links_rating_image9', 'weblogs_cacheminutes', 'comment_allowed_tags', 'search_engine_friendly_urls', 'default_geourl_lat', 'default_geourl_lon', 'use_default_geourl', 'weblogs_xml_url', 'new_users_can_blog', '_wpnonce', '_wp_http_referer', 'Update', 'action', 'rich_editing', 'autosave_interval', 'deactivated_plugins'); -
trunk/wp-admin/includes/template.php
r9868 r9871 204 204 $is_tag = $type == 'tag'; 205 205 $columns = $is_tag ? get_column_headers('tag') : get_column_headers('category'); 206 $hidden = array_intersect( array_keys( $columns ), array_filter( (array) get_user_option( "manage-$type-columns-hidden") ) );206 $hidden = array_intersect( array_keys( $columns ), array_filter( get_hidden_columns($type) ) ); 207 207 $col_count = count($columns) - count($hidden); 208 208 ?> … … 901 901 function get_hidden_columns($page) { 902 902 $page = str_replace('.php', '', $page); 903 return (array) get_user_option( 'manage-' . $page . '-columns-hidden' );903 return (array) get_user_option( 'manage-' . $page . '-columns-hidden', 0, false ); 904 904 } 905 905 … … 923 923 924 924 $columns = $is_page ? wp_manage_pages_columns() : wp_manage_posts_columns(); 925 $hidden = array_intersect( array_keys( $columns ), array_filter( (array) get_user_option( "manage-$type-columns-hidden") ) );925 $hidden = array_intersect( array_keys( $columns ), array_filter( get_hidden_columns($type) ) ); 926 926 $col_count = count($columns) - count($hidden); 927 927 $m = ( isset($mode) && 'excerpt' == $mode ) ? 'excerpt' : 'list'; … … 2698 2698 //do_action('do_meta_boxes', $page, $context, $object); 2699 2699 2700 $hidden = (array) get_user_option( "meta-box-hidden_$page" );2700 $hidden = (array) get_user_option( "meta-box-hidden_$page", 0, false ); 2701 2701 2702 2702 echo "<div id='$context-sortables' class='meta-box-sortables'>\n"; … … 2705 2705 do { 2706 2706 // Grab the ones the user has manually sorted. Pull them out of their previous context/priority and into the one the user chose 2707 if ( !$already_sorted && $sorted = get_user_option( "meta-box-order_$page" ) ) {2707 if ( !$already_sorted && $sorted = get_user_option( "meta-box-order_$page", 0, false ) ) { 2708 2708 foreach ( $sorted as $box_context => $ids ) 2709 2709 foreach ( explode(',', $ids) as $id ) … … 2778 2778 return; 2779 2779 2780 $hidden = (array) get_user_option( "meta-box-hidden_$page" );2780 $hidden = (array) get_user_option( "meta-box-hidden_$page", 0, false ); 2781 2781 2782 2782 foreach ( array_keys($wp_meta_boxes[$page]) as $context ) { -
trunk/wp-admin/link-manager.php
r9779 r9871 139 139 if ( $links ) { 140 140 $link_columns = get_column_headers('link-manager'); 141 $hidden = (array) get_user_option( 'manage-link-manager-columns-hidden');141 $hidden = get_hidden_columns('link-manager'); 142 142 ?> 143 143 -
trunk/wp-includes/user.php
r9716 r9871 169 169 * @param string $option User option name. 170 170 * @param int $user Optional. User ID. 171 * @param bool $check_global Whether to check for a global option if a per-user option does not exist. Default is true. 171 172 * @return mixed 172 173 */ 173 function get_user_option( $option, $user = 0 ) {174 function get_user_option( $option, $user = 0, $check_global = true ) { 174 175 global $wpdb; 175 176 … … 184 185 elseif ( isset( $user->{$option} ) ) // User specific and cross-blog 185 186 $result = $user->{$option}; 186 else // Blog global187 elseif ( $check_global ) // Blog global 187 188 $result = get_option( $option ); 189 else 190 $result = false; 188 191 189 192 return apply_filters("get_user_option_{$option}", $result, $option, $user); -
trunk/wp-includes/version.php
r9863 r9871 16 16 * @global int $wp_db_version 17 17 */ 18 $wp_db_version = 9 621;18 $wp_db_version = 9872; 19 19 20 20 ?>
Note: See TracChangeset
for help on using the changeset viewer.