當前位置: 首頁>>代碼示例>>PHP>>正文


PHP Dashboard::getUserPosts方法代碼示例

本文整理匯總了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">
開發者ID:0x27,項目名稱:Philippine-Tourism,代碼行數:31,代碼來源:articles.php

示例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>
開發者ID:0x27,項目名稱:Philippine-Tourism,代碼行數:31,代碼來源:view-article.php


注:本文中的Dashboard::getUserPosts方法示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。