function.mtblogcclicenseimage.php
来自「1. 记录每个帖子的访问人情况」· PHP 代码 · 共 14 行
PHP
14 行
<?phpfunction smarty_function_MTBlogCCLicenseImage($args, &$ctx) { // status: complete // parameters: none $blog = $ctx->stash('blog'); $cc = $blog['blog_cc_license']; if (empty($cc)) return ''; if (preg_match('/(\S+) (\S+) (\S+)/', $cc, $matches)) return $matches[3]; # the third element is the image return 'http://creativecommons.org/images/public/' . ($cc == 'pd' ? 'norights' : 'somerights');}?>
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?