本文整理汇总了PHP中plugins::run_hook方法的典型用法代码示例。如果您正苦于以下问题:PHP plugins::run_hook方法的具体用法?PHP plugins::run_hook怎么用?PHP plugins::run_hook使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类plugins
的用法示例。
在下文中一共展示了plugins::run_hook方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: kleeja_run_hook
function kleeja_run_hook($hookname)
{
global $plugin;
if (!$plugin) {
include_once PATH . 'includes/classes/plugins.php';
$plugin = new plugins();
}
return $plugin->run_hook($hookname);
}
示例2: filesize
#site close message if enabled
$login_page = '';
if ($config['siteclose'] == '1' && !user_can('enter_acp') && !defined('IN_LOGIN') && !defined('IN_ADMIN')) {
#if download, images ?
if (defined('IN_DOWNLOAD') && (ig('img') || ig('thmb') || ig('thmbf') || ig('imgf'))) {
@$SQL->close();
$fullname = "images/site_closed.jpg";
$filesize = filesize($fullname);
header("Content-length: {$filesize}");
header("Content-type: image/jpg");
readfile($fullname);
exit;
}
#Send a 503 HTTP response code to prevent search bots from indexing the maintenace message
header('HTTP/1.1 503 Service Temporarily Unavailable');
kleeja_info($config['closemsg'], $lang['SITE_CLOSED']);
}
#exceed total size
if ($stat_sizes >= $config['total_size'] * 1048576 && !defined('IN_LOGIN') && !defined('IN_ADMIN')) {
// Send a 503 HTTP response code to prevent search bots from indexing the maintenace message
header('HTTP/1.1 503 Service Temporarily Unavailable');
kleeja_info($lang['SIZES_EXCCEDED'], $lang['STOP_FOR_SIZE']);
}
#check for rows per page number
if (empty($perpage) || intval($perpage) == 0) {
$perpage = 14;
}
#captcha file path
$captcha_file_path = $config['siteurl'] . 'captcha.php';
($hook = $plugin->run_hook('end_common')) ? eval($hook) : null;
//run hook