文件操作 - class-wp-highlevel.php
返回文件管理
返回主菜单
删除本文件
文件: /storage/v12552/forteagencynew/public_html/wp-content/plugins/WP-Highlevel/class-wp-highlevel.php
编辑文件内容
<?php class Wp_HigheLevel{ protected $options; public function __construct(){ $HighLevel_Settings = get_option('HighLevel_Settings'); $this->options = array('highLevel_settings' => $HighLevel_Settings); } /* * method getHighLevelAPIResponse * return high level automation data based on endpoint provided */ public function getHighLevelAPIResponse($endpoint){ $response = array(); $ApiUrl = $this->options['highLevel_settings']['api_url']; $CompanyId = $this->options['highLevel_settings']['company_id']; $LocationId = $this->options['highLevel_settings']['location_id']; $clientId = $this->options['highLevel_settings']['client_id']; $clientSecret = $this->options['highLevel_settings']['client_secret']; $ApiVersion = $this->options['highLevel_settings']['api_version']; $ch = curl_init(); curl_setopt($ch, CURLOPT_URL, $ApiUrl."/oauth/token"); // curl_setopt($ch, CURLOPT_HTTPHEADER, [ // 'Version: '.$ApiVersion.'' // ]); curl_setopt($ch, CURLOPT_POST, true); curl_setopt($ch, CURLOPT_POSTFIELDS, http_build_query(array('client_id' => $clientId, 'client_secret' => $clientSecret, 'grant_type' => 'authorization_code'))); curl_setopt($ch, CURLOPT_RETURNTRANSFER, true); $server_output = curl_exec($ch); curl_close($ch); echo "<pre>"; print_r($server_output); die("38"); //$request_url = $endpoint."/".$apiType."?WebsiteId=".$WebsiteId; // $request = wp_remote_get($request_url); /*if(! is_wp_error($request)){ $request_body = wp_remote_retrieve_body( $request ); $response = json_decode($request_body, true); } return $response;*/ } }
修改文件时间
将文件时间修改为当前时间的前一年
删除文件