本文整理汇总了PHP中text::auto_link_urls方法的典型用法代码示例。如果您正苦于以下问题:PHP text::auto_link_urls方法的具体用法?PHP text::auto_link_urls怎么用?PHP text::auto_link_urls使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类text
的用法示例。
在下文中一共展示了text::auto_link_urls方法的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: auto_link_urls
/**
* Tests the text::auto_link_urls() function.
* @dataProvider auto_link_urls_provider
* @group core.helpers.text.auto_link_urls
* @test
*/
public function auto_link_urls($text, $expected_result)
{
$result = text::auto_link_urls($text);
$this->assertEquals($expected_result, $result);
}
示例2: foreach
if ($option->tags) {
?>
<div class="tags">
<?php
foreach ($option->tags as $name => $set) {
?>
<h5><?php
echo ucfirst($name);
?>
</h5>
<ul>
<?php
foreach ($set as $tag) {
?>
<li><?php
echo text::auto_link_urls($tag);
?>
</li>
<?php
}
?>
</ul>
<?php
}
?>
</div>
<?php
}
?>
<a class="top" href="#top">(top)</a>
</div>
示例3: auto_link
/**
* Converts text email addresses and anchors into links.
*
* @param string text to auto link
* @return string
*/
public static function auto_link($text)
{
// Auto link emails first to prevent problems with "www.domain.com@example.com"
return text::auto_link_urls(text::auto_link_emails($text));
}
示例4: __
<?php
echo html::nick($comment->author_id, $comment->author->username);
?>
,
<?php
echo __(':ago ago', array(':ago' => html::time(date::timespan_short($comment->created), $comment->created)));
?>
</header>
<p>
<?php
echo $comment->private ? '<abbr title="' . __('Private comment') . '">' . __('Priv') . '</abbr>: ' : '';
?>
<?php
echo text::smileys(text::auto_link_urls(html::specialchars($comment->comment)));
?>
</p>
</article>
<?php
}
?>
<footer>
<?php
echo $pagination;
?>
</footer>