本文整理汇总了PHP中MainWP_Utility::resetUserCookie方法的典型用法代码示例。如果您正苦于以下问题:PHP MainWP_Utility::resetUserCookie方法的具体用法?PHP MainWP_Utility::resetUserCookie怎么用?PHP MainWP_Utility::resetUserCookie使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类MainWP_Utility
的用法示例。
在下文中一共展示了MainWP_Utility::resetUserCookie方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: renderHeader
public static function renderHeader($shownPage, &$extensions)
{
?>
<div class="wrap">
<a href="https://mainwp.com" id="mainwplogo" title="MainWP" target="_blank"><img
src="<?php
echo plugins_url('images/logo.png', dirname(__FILE__));
?>
" height="50"
alt="MainWP"/></a>
<h2><i class="fa fa-plug"></i> <?php
_e('Extensions', 'mainwp');
?>
</h2>
<div style="clear: both;"></div><br/><br/>
<?php
if ($shownPage === '') {
$loader_url = '<i class="fa fa-spinner fa-pulse"></i>';
if (mainwp_current_user_can('dashboard', 'bulk_install_and_activate_extensions')) {
$username = $password = '';
$checked_save = false;
if (get_option('mainwp_extensions_api_save_login') == true) {
$enscrypt_u = get_option('mainwp_extensions_api_username');
$enscrypt_p = get_option('mainwp_extensions_api_password');
$username = !empty($enscrypt_u) ? MainWP_Api_Manager_Password_Management::decrypt_string($enscrypt_u) : '';
$password = !empty($enscrypt_p) ? MainWP_Api_Manager_Password_Management::decrypt_string($enscrypt_p) : '';
$checked_save = true;
}
if (!MainWP_Utility::resetUserCookie('api_bulk_install')) {
?>
<span id="mainwp_api_postbox_reset_showhide"></span>
<?php
}
?>
<div class="postbox mainwp_api_postbox" section="1">
<!-- <div class="handlediv"><br></div> -->
<h3 class="mainwp_box_title">
<span><i class="fa fa-cog"></i> <?php
_e('Bulk Install and Activate Extensions', 'mainwp');
?>
</span>
</h3>
<div class="mainwp-inside" style="clear: both;">
<div style="padding: 0 5px;">
<?php
if (get_option('mainwp_api_sslVerifyCertificate') == 1) {
update_option('mainwp_api_sslVerifyCertificate', 0);
}
// $apisslverify = get_option('mainwp_api_sslVerifyCertificate');
// if (defined('OPENSSL_VERSION_NUMBER') && (OPENSSL_VERSION_NUMBER <= 0x009080bf) && ($apisslverify === false)) {
// $apisslverify = 0;
// MainWP_Utility::update_option("mainwp_api_sslVerifyCertificate", $apisslverify);
// }
// $_selected_1 = (($apisslverify === false) || ($apisslverify == 1)) ? "selected" : '';
// $_selected_0 = empty($_selected_1) ? "selected" : "";
?>
<strong><?php
_e('Step 1', 'mainwp');
?>
</strong>
<p>
<span class="description"><?php
_e('Enter your MainWP Extensions (https://extensions.mainwp.com) Login to automatically install and activate purchased extensions.');
?>
</span>
</p>
<span><?php
_e('MainWP Extensions Login:', 'mainwp');
?>
</span><br/><br/>
<div class="api-grabbing-fields">
<input type="text" class="input username" placeholder="<?php
esc_attr_e('Username', 'mainwp');
?>
" value="<?php
echo $username;
?>
"/>
<input type="password" class="input passwd" placeholder="<?php
esc_attr_e('Password', 'mainwp');
?>
" value="<?php
echo $password;
?>
"/>
<label><input type="checkbox" <?php
echo $checked_save ? 'checked="checked"' : '';
?>
name="extensions_api_savemylogin_chk" id="extensions_api_savemylogin_chk"><?php
_e('Check to Save API login', 'mainwp');
?>
</label>
</div>
<p>
<span class="extension_api_loading">
//.........这里部分代码省略.........