本文整理汇总了PHP中Jot::span方法的典型用法代码示例。如果您正苦于以下问题:PHP Jot::span方法的具体用法?PHP Jot::span怎么用?PHP Jot::span使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Jot
的用法示例。
在下文中一共展示了Jot::span方法的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: function
// include once ...
}
}, 20);
Weapon::add('SHIPMENT_REGION_BOTTOM', function () use($config) {
Session::kill('recent_item_update');
$path = __DIR__ . DS . 'assets' . DS . 'sword' . DS;
echo Asset::javascript(array($path . 'ajax.js', $path . 'row.js', $path . 'slug.js', $path . 'upload.js', $path . 'tab.js', $path . 'toggle.js', $path . 'modal.js', $path . 'tooltip.js', $path . 'sortable.js', $path . 'accordion.js', SHIELD . DS . $config->shield . DS . 'assets' . DS . 'sword' . DS . 'manager.js'), "", 'sword/manager.min.js');
}, 1);
/**
* Footer Link(s)
* --------------
*/
if ($config->page_type === 'manager' || $config->is->post) {
// Add default comment footer link(s)
Weapon::add('comment_footer', function ($comment, $article) use($config, $speak) {
$status = Mecha::alter(File::E($comment->path), array('hold' => Jot::span('info', Jot::icon('clock-o') . ' ' . $speak->pending) . ' · '), "");
echo $status . Cell::a($config->manager->slug . '/comment/repair/id:' . $comment->id, $speak->edit) . ' / ' . Cell::a($config->manager->slug . '/comment/kill/id:' . $comment->id, $speak->delete);
}, 20);
}
/**
* Widget Manager Menu(s) and Bar(s)
* ---------------------------------
*
* [1]. Config::merge('manager_menu', array());
* [2]. Config::merge('manager_bar', array());
*
*/
Weapon::add('shield_before', function () {
$config = Config::get();
$speak = Config::speak();
$total = $config->__total_comments;
示例2: function
* Footer Link(s)
* --------------
*/
// Add default article footer link(s)
Weapon::add('article_footer', function ($article) use($config, $speak) {
$e = File::E($article->path);
$comments = count(glob(COMMENT . DS . Date::slug($article->id) . '_*_*.{txt,hold}', GLOB_NOSORT | GLOB_BRACE));
$t = Jot::icon('comments') . ' ' . $comments;
$tt = array('title' => $comments . ' ' . ($comments === 1 ? $speak->comment : $speak->comments));
$comments = ($e === 'draft' || $comments === 0 ? Cell::span($t, $tt) : Cell::a($config->manager->slug . '/comment?filter=post%3A' . $article->id, $t, null, $tt)) . ' · ';
$status = Mecha::alter($e, array('draft' => Jot::span('info', Jot::icon('clock-o') . ' ' . $speak->draft) . ' · ', 'archive' => Jot::span('info', Jot::icon('history') . ' ' . $speak->archive) . ' · '), "");
echo $comments . $status . Cell::a($config->manager->slug . '/article/repair/id:' . $article->id, $speak->edit) . ' / ' . Cell::a($config->manager->slug . '/article/kill/id:' . $article->id, $speak->delete);
}, 20);
// Add default page footer link(s)
Weapon::add('page_footer', function ($page) use($config, $speak) {
$status = Mecha::alter(File::E($page->path), array('draft' => Jot::span('info', Jot::icon('clock-o') . ' ' . $speak->draft) . ' · ', 'archive' => Jot::span('info', Jot::icon('history') . ' ' . $speak->archive) . ' · '), "");
echo $status . Cell::a($config->manager->slug . '/page/repair/id:' . $page->id, $speak->edit) . ' / ' . Cell::a($config->manager->slug . '/page/kill/id:' . $page->id, $speak->delete);
}, 20);
/**
* Backend Route(s)
* ----------------
*
* Load the routes.
*
*/
Weapon::add('plugins_after', function () use($config, $speak, $segment) {
// loading cargo ...
require __DIR__ . DS . 'workers' . DS . 'cargo.php';
if ($detour = File::exist(__DIR__ . DS . 'workers' . DS . 'route.' . $segment . '.php')) {
require $detour;
}
示例3: foreach
foreach ($files as $file) {
?>
<?php
if (strpos($file->path, $shield_path . 'states' . DS) === 0 || strpos($file->path, $shield_path . 'workers' . DS) === 0) {
continue;
}
?>
<?php
$url = File::url(str_replace($shield_path, "", $file->path));
?>
<tr<?php
echo Session::get('recent_item_update') === File::B($file->path) ? ' class="active"' : "";
?>
>
<td><?php
echo strpos($url, '/') !== false ? Jot::span('fade', File::D($url) . '/') . File::B($url) : $url;
?>
</td>
<td class="td-icon">
<?php
echo Jot::a('construct', $shield_url_repair . $url, Jot::icon('pencil'), array('title' => $speak->edit));
?>
</td>
<td class="td-icon">
<?php
echo Jot::a('destruct', $shield_url_kill . $url, Jot::icon('times'), array('title' => $speak->delete));
?>
</td>
</tr>
<?php
}
示例4: function
* --------------
*/
if ($config->page_type === 'manager') {
// Add default article footer link(s)
Weapon::add('article_footer', function ($article) use($config, $speak) {
$status = Mecha::alter(File::E($article->path), array('draft' => Jot::span('info', Jot::icon('clock-o') . ' ' . $speak->draft) . ' · ', 'archive' => Jot::span('info', Jot::icon('history') . ' ' . $speak->archive) . ' · '), "");
echo $status . Cell::a($config->manager->slug . '/article/repair/id:' . $article->id, $speak->edit) . ' / ' . Cell::a($config->manager->slug . '/article/kill/id:' . $article->id, $speak->delete);
}, 20);
// Add default page footer link(s)
Weapon::add('page_footer', function ($page) use($config, $speak) {
$status = Mecha::alter(File::E($page->path), array('draft' => Jot::span('info', Jot::icon('clock-o') . ' ' . $speak->draft) . ' · ', 'archive' => Jot::span('info', Jot::icon('history') . ' ' . $speak->archive) . ' · '), "");
echo $status . Cell::a($config->manager->slug . '/page/repair/id:' . $page->id, $speak->edit) . ' / ' . Cell::a($config->manager->slug . '/page/kill/id:' . $page->id, $speak->delete);
}, 20);
// Add default comment footer link(s)
Weapon::add('comment_footer', function ($comment, $article) use($config, $speak) {
$status = Mecha::alter($comment->state, array('pending' => Jot::span('info', Jot::icon('clock-o') . ' ' . $speak->pending) . ' · '), "");
echo $status . Cell::a($config->manager->slug . '/comment/repair/id:' . $comment->id, $speak->edit) . ' / ' . Cell::a($config->manager->slug . '/comment/kill/id:' . $comment->id, $speak->delete);
}, 20);
}
/**
* Widget Manager Menu(s)
* ----------------------
*/
Weapon::add('shield_before', function () {
$config = Config::get();
$speak = Config::speak();
$total = $config->total_comments_backend;
$destination = SYSTEM . DS . 'log' . DS . 'comments.total.log';
if ($file = File::exist($destination)) {
$old = (int) File::open($file)->read();
$total = $total > $old ? $total - $old : 0;