本文整理汇总了PHP中MainWP_Utility::getPostDataAuthed方法的典型用法代码示例。如果您正苦于以下问题:PHP MainWP_Utility::getPostDataAuthed方法的具体用法?PHP MainWP_Utility::getPostDataAuthed怎么用?PHP MainWP_Utility::getPostDataAuthed使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类MainWP_Utility
的用法示例。
在下文中一共展示了MainWP_Utility::getPostDataAuthed方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: fetchUrlAuthed
static function fetchUrlAuthed(&$website, $what, $params = null, $checkConstraints = false, $pForceFetch = false, $pRetryFailed = true)
{
if ($params == null) {
$params = array();
}
if ($what == 'stats' || $what == 'upgradeplugintheme' && isset($params['type']) && 'plugin' == $params['type']) {
// to fix bug
$try_tounch_plugins_page = get_option('mainwp_request_plugins_page_site_' . $website->id);
if ('yes' == $try_tounch_plugins_page) {
$page_plugins_url = MainWP_Utility::getGetDataAuthed($website, 'plugins.php');
wp_remote_get($page_plugins_url, array('timeout' => 25, 'httpversion' => '1.1'));
}
}
$params['optimize'] = get_option('mainwp_optimize') == 1 ? 1 : 0;
$postdata = MainWP_Utility::getPostDataAuthed($website, $what, $params);
$information = MainWP_Utility::fetchUrl($website, $website->url, $postdata, $checkConstraints, $pForceFetch, $website->verify_certificate, $pRetryFailed, $website->http_user, $website->http_pass, $website->ssl_version);
if (is_array($information) && isset($information['sync']) && !empty($information['sync'])) {
MainWP_Sync::syncInformationArray($website, $information['sync']);
unset($information['sync']);
}
return $information;
}
示例2: fetchUrlAuthed
static function fetchUrlAuthed(&$website, $what, $params = null, $checkConstraints = false, $pForceFetch = false, $pRetryFailed = true)
{
if ($params == null) {
$params = array();
}
$params['optimize'] = get_option('mainwp_optimize') == 1 ? 1 : 0;
$postdata = MainWP_Utility::getPostDataAuthed($website, $what, $params);
$information = MainWP_Utility::fetchUrl($website, $website->url, $postdata, $checkConstraints, $pForceFetch, $website->verify_certificate, $pRetryFailed, $website->http_user, $website->http_pass, $website->ssl_version);
if (is_array($information) && isset($information['sync']) && !empty($information['sync'])) {
MainWP_Sync::syncInformationArray($website, $information['sync']);
unset($information['sync']);
}
return $information;
}