Beispiel #1
0
				
				<div class="form-group row">
					<label class="col-sm-2 control-label">你的邮箱[必填]</label>
					<div class="col-sm-4">
						<input type="text" class="form-control" value="<?php 
    the_author_meta('user_email', wt_get_user_id());
    ?>
" name="email">
					</div>
				</div>
				
				<div class="form-group row">
					<label class="col-sm-2 control-label">签名</label>
					<div class="col-sm-6">
						<textarea name="description" class="form-control" rows="5"><?php 
    the_author_meta('description', wt_get_user_id());
    ?>
</textarea>
					</div>
				</div>
				
				<div class="form-group row">
					<label class="col-sm-2 control-label"><h4><i class="glyphicon glyphicon-lock"></i> 修改密码</h4></label>
				</div>
				<div class="acc-form-head"></div>
				
				<div class="form-group row">
					<label class="col-sm-2 control-label">新密码</label>
					<div class="col-sm-4">
						<input type="password" class="form-control" value="" name="user_pass">
					</div>
Beispiel #2
0
        if (current_time('timestamp') - strtotime($last_post) < 120) {
            $error = '<script type="text/javascript">$(document).ready(function(){function postform0() {$.globalMessenger().post({message: "操作过于频繁,请稍后尝试!",type: "error",showCloseButton: true});};setTimout(postform0(),100);}); </script>';
        }
        // 表单变量初始化
        $post_title = $_POST['post_title'];
        $post_content = $_POST['post_content'];
        //$post_tags =  $_POST['post_tags'];
        // 表单项数据验证
        if (empty($post_title) || mb_strlen($post_title) > 100) {
            $error = '<script type="text/javascript">$(document).ready(function(){function postform0() {$.globalMessenger().post({message: "标题必须填写,且长度不得超过100字!",type: "error",showCloseButton: true});};setTimout(postform0(),100);}); </script>';
        }
        if (empty($post_content) || mb_strlen($post_content) > 3000 || mb_strlen($post_content) < 10) {
            $error = '<script type="text/javascript">$(document).ready(function(){function postform0() {$.globalMessenger().post({message: "内容必须填写,且长度不得超过3000字,不得少于10字!",type: "error",showCloseButton: true});};setTimout(postform0(),100);}); </script>';
        }
        $user_id = wt_get_user_id();
        $tougao = array('ID' => get_the_author_meta('bianji', wt_get_user_id()), 'post_title' => $post_title, 'post_content' => $post_content, 'post_author' => '' . $user_id . '', 'post_status' => 'publish');
        // 将文章插入数据库
        if ($error == '') {
            $status = wp_update_post($tougao);
            if ($status != 0) {
                //add_post_meta($status, 'wzc_value', $meta_value,TRUE);
                $postlink = get_permalink($status);
                Header("Location:{$postlink}");
            } else {
                $error = '<script type="text/javascript">$(document).ready(function(){function postform0() {$.globalMessenger().post({message: "发布失败,请稍后尝试!",type: "error",showCloseButton: true});};setTimout(postform0(),100);}); </script>';
            }
        }
    }
}
get_header();
?>
Beispiel #3
0
">
					<?php 
    echo get_avatar(wt_get_user_id(), 20);
    echo get_the_author_meta('display_name', wt_get_user_id());
    ?>
				</a>
			</li>
			<li class="dropdown">
				<a href="javascript:;" class="dropdown-toggle" data-toggle="dropdown">
					<i class="glyphicon glyphicon-user"></i> 用户中心
					<b class="caret"></b>
				</a>
				<ul class="dropdown-menu">
					<li>
						<a href="<?php 
    echo get_author_posts_url(wt_get_user_id());
    ?>
">
							<i class="glyphicon glyphicon-home"></i> 我的首页
						</a>
					</li>
					<!--li>
						<a href="<?php 
    bloginfo('url');
    ?>
/shoucang/">
							 <i class="glyphicon glyphicon-map-marker"></i> 我的收藏
						</a>
					</li-->
					<li>
						<a href="<?php 
Beispiel #4
0
        ?>
				<h1 id="the_title"><?php 
        the_title();
        ?>
</h1>
				<div id="entry">
					<?php 
        the_content();
        ?>
					<div class="clearfix"></div>
					<?php 
        the_tags('<div id="tags"><span><i class="glyphicon glyphicon-tag"></i> 话题标签</span>', '', '</div>');
        ?>
					<div class="clearfix"></div>
					<?php 
        if (get_the_author_meta('ID') == wt_get_user_id()) {
            echo '<br><a href="' . $url . '/bianji?edit=' . get_the_ID() . '">编辑话题</a> ';
        }
        ?>
				</div>
		<!--作者信息开始 -->	<div class="panel-group" id="accordion">
  <div class="panel panel-default" style="margin-bottom:30px">
    <div class="panel-heading">
      <h4 class="panel-title">
        <a data-toggle="collapse" data-toggle="collapse" data-parent="#accordion" href="#collapseOne">
         <i class="glyphicon glyphicon-zoom-in"></i> 作者 <?php 
        echo the_author_meta('display_name');
        ?>
 的信息 >>
        </a>
      </h4>
Beispiel #5
0
<?php

/*
Template Name: 关注
*/
get_header();
?>
<div class="container">
	<?php 
$guanzhu = get_the_author_meta('guanzhu', wt_get_user_id());
if ($guanzhu) {
    ?>
	<div class="panel panel-default" id="list-grid">
		<div class="panel-heading row">
			<div class="col-sm-12 col">
				<i class="glyphicon glyphicon-plus-sign"></i> 我的关注
			</div>
		</div>
		<?php 
    $guanzhu_array = explode(',', $guanzhu);
    array_pop($guanzhu_array);
    foreach ($guanzhu_array as $val) {
        ?>
		<div class="list-group">
			<a href="<?php 
        echo get_author_posts_url($val);
        ?>
" class="list-group-item row">
				<div class="col-sm-1 col">
					<?php 
        echo get_avatar($val, 100);
Beispiel #6
0
    update_user_meta(wt_get_user_id(), 'guanzhu', $guanzhu);
    wp_update_user(array('ID' => wt_get_user_id(), 'guanzhu' => $guanzhu));
}
if ($_GET['uidx']) {
    $guanzhu_array_x = explode(',', $guanzhu_old);
    $str = $_GET['uidx'];
    $len = count($guanzhu_array_x);
    for ($i = 0; $i < $len; $i++) {
        if ($guanzhu_array_x[$i] == $str) {
            unset($guanzhu_array_x[$i]);
        }
    }
    $guanzhu_new = implode(',', $guanzhu_array_x);
    array_unique($guanzhu_new);
    update_user_meta(wt_get_user_id(), 'guanzhu', $guanzhu_new);
    wp_update_user(array('ID' => wt_get_user_id(), 'guanzhu' => $guanzhu_new));
}
?>
<div class="container" id="author">
			<div class="media" id="author-info">
					<a class="pull-left" href="<?php 
echo get_author_posts_url($val);
?>
"><?php 
echo get_avatar($val, 100);
?>
</a>
					<div class="media-body">
						<h4 class="media-heading">
							<a href="<?php 
echo get_author_posts_url($val);