当前位置: 首页>>代码示例>>PHP>>正文


PHP wfConfig::liveTrafficEnabled方法代码示例

本文整理汇总了PHP中wfConfig::liveTrafficEnabled方法的典型用法代码示例。如果您正苦于以下问题:PHP wfConfig::liveTrafficEnabled方法的具体用法?PHP wfConfig::liveTrafficEnabled怎么用?PHP wfConfig::liveTrafficEnabled使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在wfConfig的用法示例。


在下文中一共展示了wfConfig::liveTrafficEnabled方法的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: setupAdminVars

 private static function setupAdminVars()
 {
     $updateInt = wfConfig::get('actUpdateInterval', 2);
     if (!preg_match('/^\\d+$/', $updateInt)) {
         $updateInt = 2;
     }
     $updateInt *= 1000;
     wp_localize_script('wordfenceAdminjs', 'WordfenceAdminVars', array('ajaxURL' => admin_url('admin-ajax.php'), 'firstNonce' => wp_create_nonce('wp-ajax'), 'siteBaseURL' => wfUtils::getSiteBaseURL(), 'debugOn' => wfConfig::get('debugOn', 0), 'actUpdateInterval' => $updateInt, 'tourClosed' => wfConfig::get('tourClosed', 0), 'welcomeClosed' => wfConfig::get('welcomeClosed', 0), 'cacheType' => wfConfig::get('cacheType'), 'liveTrafficEnabled' => wfConfig::liveTrafficEnabled()));
 }
开发者ID:ashenkar,项目名称:sanga,代码行数:9,代码来源:wordfenceClass.php

示例2: wfView

				<td id="wfLiveStatus"></td>
			</tr>
		</table>
	</div>
	<div class="wordfenceWrap<?php 
if (!wfConfig::get('isPaid')) {
    echo " wordfence-community";
}
?>
">
		<?php 
$rightRail = new wfView('marketing/rightrail', array('additionalClasses' => 'wordfenceRightRailLiveTraffic'));
echo $rightRail;
?>
		<?php 
if (!wfConfig::liveTrafficEnabled()) {
    ?>
			<div id="wordfenceLiveActivityDisabled"><p><strong>Live activity is disabled.</strong> <?php 
    if (wfConfig::get('cacheType') == 'falcon') {
        ?>
This is done to improve performance because you have Wordfence Falcon Engine enabled.<?php 
    }
    ?>
 Login and firewall activity will still appear below.</p></div>
		<?php 
}
?>
		
		<div id="wf-live-traffic" class="wfTabsContainer">

				<div id="wf-live-traffic-legend">
开发者ID:GafaMX,项目名称:operaciondespierta.org,代码行数:31,代码来源:menu_activity.php

示例3: logHit

 public function logHit()
 {
     if (!wfConfig::liveTrafficEnabled()) {
         return;
     }
     $headers = array();
     foreach ($_SERVER as $h => $v) {
         if (preg_match('/^HTTP_(.+)$/', $h, $matches)) {
             $headers[$matches[1]] = $v;
         }
     }
     $ua = isset($_SERVER['HTTP_USER_AGENT']) ? $_SERVER['HTTP_USER_AGENT'] : '';
     $this->getDB()->queryWrite("insert into " . $this->hitsTable . " (ctime, is404, isGoogle, IP, userID, newVisit, URL, referer, UA, jsRun) values (%f, %d, %d, %s, %s, %d, '%s', '%s', '%s', %d)", sprintf('%.6f', microtime(true)), is_404() ? 1 : 0, wfCrawl::isGoogleCrawler() ? 1 : 0, wfUtils::inet_pton(wfUtils::getIP()), $this->getCurrentUserID(), wordfence::$newVisit ? 1 : 0, wfUtils::getRequestedURL(), isset($_SERVER['HTTP_REFERER']) ? $_SERVER['HTTP_REFERER'] : '', $ua, (int) (isset($_COOKIE['wordfence_verifiedHuman']) && wp_verify_nonce($_COOKIE['wordfence_verifiedHuman'], 'wordfence_verifiedHuman' . $ua . wfUtils::getIP())));
     return $this->getDB()->querySingle("select last_insert_id()");
 }
开发者ID:TomFarrow,项目名称:wordpress-stackable,代码行数:15,代码来源:wfLog.php

示例4: logHit

 /**
  * @return bool|int
  */
 public function logHit()
 {
     $liveTrafficEnabled = wfConfig::liveTrafficEnabled();
     $action = $this->currentRequest->action;
     $logHitOK = $this->logHitOK();
     if (!$logHitOK) {
         return false;
     }
     if (!$liveTrafficEnabled && !$action) {
         return false;
     }
     if ($this->currentRequest !== null) {
         if ($this->currentRequest->save()) {
             return $this->currentRequest->getPrimaryKey();
         }
     }
     return false;
 }
开发者ID:ashenkar,项目名称:sanga,代码行数:21,代码来源:wfLog.php


注:本文中的wfConfig::liveTrafficEnabled方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。