本文整理匯總了PHP中Themes::list_all方法的典型用法代碼示例。如果您正苦於以下問題:PHP Themes::list_all方法的具體用法?PHP Themes::list_all怎麽用?PHP Themes::list_all使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類Themes
的用法示例。
在下文中一共展示了Themes::list_all方法的2個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。
示例1: index
public function index()
{
if (Input::method() == 'POST') {
if (Metadata::update()) {
return Response::redirect($this->admin_url . '/metadata');
}
}
// provide a list to set for our home page and posts page
$pages = Pages::list_all(array('status' => 'published'));
// list valid themes
$themes = Themes::list_all();
Template::render('metadata/index', array('pages' => $pages, 'themes' => $themes, 'metadata' => (object) Config::get('metadata')));
}
示例2:
<?php
// get themes
require PATH . 'classes/themes' . EXT;
$themes = Themes::list_all();
?>
<hgroup role="banner">
<h1>Marketplace</h1>
<a href="/themes/submit">Submit your theme</a>
</hgroup>
<section>
<ul class="submissions">
<?php
foreach ($themes as $key => $theme) {
?>
<li>
<figure>
<a class="img" href="/themes/view/<?php
echo $key;
?>
">
<img src="/submissions/<?php
echo $key;
?>
/preview.png">
</a>
<figcaption>
<h2><a href="/themes/view/<?php