本文整理汇总了PHP中Dashboard::getUserPosts方法的典型用法代码示例。如果您正苦于以下问题:PHP Dashboard::getUserPosts方法的具体用法?PHP Dashboard::getUserPosts怎么用?PHP Dashboard::getUserPosts使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Dashboard
的用法示例。
在下文中一共展示了Dashboard::getUserPosts方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: header
<?php
include "../wp-load.php";
if (!is_user_logged_in()) {
header("Location: /dashboard/login.php");
exit;
}
include "dashboard.class.php";
$dashboard = new Dashboard($wpdb, $table_prefix, $current_user);
$current_page = isset($_GET['page']) ? $_GET['page'] : 1;
$userPosts = $dashboard->getUserPosts(0, 5, $current_page, "DESC");
$navigation = $dashboard->getNavi($userPosts['navi'], $current_page);
?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" >
<head>
<meta charset="utf-8">
<title>My Articles</title>
<link rel="stylesheet" href="style.css" type="text/css" media="screen" title="main styleguide" charset="utf-8"/>
<link rel="stylesheet" href="editor/docs/style.css" type="text/css">
</head>
<body>
<div class="logohead"><img src="logoTop.png" border="0" /></div>
<div class="centerStage">
<div class="sideBar">
<?php
include "sidebar.php";
?>
</div>
<div class="mainStage">
示例2: header
<?php
include "../wp-load.php";
if (!is_user_logged_in()) {
header("Location: /dashboard/login.php");
exit;
}
include "dashboard.class.php";
$dashboard = new Dashboard($wpdb, $table_prefix, $current_user);
$userPosts = $dashboard->getUserPosts();
$postinfo = getPost($_GET['id']);
$otherInfo = getOtherInfo($_GET['id']);
?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" >
<head>
<meta charset="utf-8">
<title>Article Editor</title>
<link rel="stylesheet" href="style.css" type="text/css" media="screen" title="main styleguide" charset="utf-8"/>
<link rel="stylesheet" href="editor/docs/style.css" type="text/css">
<script type="text/javascript" src="ckeditor/ckeditor.js"></script>
<link rel="stylesheet" href="ckeditor/sample.css" type="text/css" media="screen" title="main styleguide" charset="utf-8"/>
<script type="text/javascript" src="ckeditor/sample.js"></script>
<script type="text/javascript" src="<?php
bloginfo("stylesheet_directory");
?>
/js/jquery.js"></script>