function xt_get_page_header() { global $wp_query, $xt_template_name; if ($xt_template_name == 'error404') { xt_set_404(); } if (empty($xt_template_name)) { global $wp_query; $xt_template_name = $wp_query->post->ID; } if (!empty($xt_template_name)) { $headerAndFooters = get_option(XT_OPTION_PAGE_HEADER_FOOTER); if (!empty($headerAndFooters) && isset($headerAndFooters[$xt_template_name])) { $header = $headerAndFooters[$xt_template_name]['header']; xt_dynamic_page(xt_init_page($header, '', true)); } else { xt_dynamic_page(xt_init_page('header', '', true)); } } }
function xt_setup_single_userdata($user = 0) { global $wpdb, $xt_user_meta, $xt_user, $xt_user_counts, $xt_user_avatar; if (!$user) { $user = $xt_user; } if ($user->ID == 0) { xt_set_404(); } if (!empty($user)) { if (empty($user->display_name)) { $user->display_name = $user->user_login; } $user->display_name = $wpdb->escape($user->display_name); $xt_user_meta = get_user_meta($user->ID); $xt_user_counts = xt_default_counts(); if (isset($xt_user_meta[XT_USER_COUNT])) { $xt_user_counts = array_merge($xt_user_counts, unserialize($xt_user_meta[XT_USER_COUNT][0])); } if (isset($xt_user_meta[XT_USER_AVATAR])) { $xt_user_avatar = $xt_user_meta[XT_USER_AVATAR][0]; } } return true; }
<?php global $xt, $wp_query; if ($xt->is_error404) { xt_set_404(); status_header(404); nocache_headers(); } ?> <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <!--[if IE 8]> <html id="ie8" <?php language_attributes(); ?> > <![endif]--> <!--[if !(IE 8) ]><!--> <html <?php language_attributes(); ?> > <!--<![endif]--> <head> <?php do_action('xt_header_start'); ?> <?php if ($xt->is_brands || $xt->is_stars || $xt->is_activities || $xt->is_taoquan || $xt->is_error404) { ?> <meta name="robots" content="nofollow"> <?php