本文整理汇总了PHP中SendPress_Option::check_for_keys方法的典型用法代码示例。如果您正苦于以下问题:PHP SendPress_Option::check_for_keys方法的具体用法?PHP SendPress_Option::check_for_keys怎么用?PHP SendPress_Option::check_for_keys使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类SendPress_Option
的用法示例。
在下文中一共展示了SendPress_Option::check_for_keys方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: maybe_upgrade
function maybe_upgrade()
{
//SendPress::update_templates();
$current_version = SendPress_Option::get('version', '0');
//SendPress_Error::log($current_version);
if (version_compare($current_version, SENDPRESS_VERSION, '==')) {
return;
}
$current_version_base = SendPress_Option::base_get('version', '0');
if (version_compare($current_version_base, SENDPRESS_VERSION, '==')) {
return;
}
SendPress_DB_Tables::install();
@SPNL()->db->subscribers_tracker->create_table();
@SPNL()->db->subscribers_url->create_table();
@SPNL()->db->url->create_table();
SendPress_Option::base_set('update-info', 'show');
//On version change update default template
$this->set_template_default();
SendPress_Template_Manager::update_template_content();
//SendPress_Data::create_default_form();
SendPress_Option::check_for_keys();
if (version_compare($current_version, '0.8.6', '<')) {
$widget_options = array();
$widget_options['widget_options']['load_css'] = 0;
$widget_options['widget_options']['load_ajax'] = 0;
$widget_options['widget_options']['load_scripts_in_footer'] = 0;
SendPress_Option::set($widget_options);
}
if (version_compare($current_version, '0.8.7.5', '<')) {
SendPress_Data::set_double_optin_content();
}
if (version_compare($current_version, '0.8.8', '<')) {
$pro_plugins = array();
$pro_plugins['pro_plugins']['setup_value'] = false;
SendPress_Option::set($pro_plugins);
}
if (version_compare($current_version, '0.9.3', '<')) {
$options = SendPress_Option::get('notification_options');
$new_options = array('email' => '', 'name' => '', 'notifications-enable' => false, 'notifications-subscribed-instant' => false, 'notifications-subscribed-daily' => false, 'notifications-subscribed-weekly' => false, 'notifications-subscribed-monthly' => false, 'notifications-unsubscribed-instant' => false, 'notifications-unsubscribed-daily' => false, 'notifications-unsubscribed-weekly' => false, 'notifications-unsubscribed-monthly' => false);
if ($options === false || $options === '') {
SendPress_Option::set('notification_options', $new_options);
} else {
if (is_array($options)) {
$result = array_merge($new_options, $options);
SendPress_Option::set('notification_options', $result);
}
}
}
/*
if(version_compare( $current_version, '0.9.4.7', '<' )){
SendPress_Data::update_tables_0947();
}
if(version_compare( $current_version, '0.9.5.2', '<' )){
SendPress_Data::update_tables_0952();
}
if(version_compare( $current_version, '0.9.5.4', '<' )){
SendPress_Data::update_tables_0954();
}
*/
if (version_compare($current_version, '0.9.6', '<')) {
$options = SendPress_Option::get('notification_options');
$new_options = array('email' => '', 'notifications-enable' => false, 'subscribed' => 1, 'unsubscribed' => 1, 'send-to-admins' => false, 'enable-hipchat' => false, 'hipchat-api' => '', 'hipchat-room' => '', 'post-notifications-enable' => false, 'post-notification-subject' => '');
if ($options === false || $options === '') {
SendPress_Option::set('notification_options', $new_options);
} else {
if (is_array($options)) {
$result = array_merge($new_options, $options);
SendPress_Option::set('notification_options', $result);
}
}
}
if (version_compare($current_version, '0.9.9', '<')) {
$link = SendPress_Option::get('socialicons');
if ($twit = SendPress_Option::get('twitter')) {
$link['Twitter'] = $twit;
}
if ($fb = SendPress_Option::get('facebook')) {
$link['Facebook'] = $fb;
}
if ($ld = SendPress_Option::get('linkedin')) {
$link['LinkedIn'] = $ld;
}
SendPress_Option::set('socialicons', $link);
}
/*
if( version_compare( $current_version, '0.9.9.8', '<' ) && SendPress_Option::get('autocron','no') == 'yes' ){
$email = get_option( 'admin_email' );
$url = "http://api.sendpress.com/senddiscountcode/".md5($_SERVER['SERVER_NAME']."|".$email)."/".$email;
wp_remote_get( $url );
}
*/
$update_options_sp = array();
if (isset($_GET['sendpress_ignore_087']) && '0' == $_GET['sendpress_ignore_087']) {
$update_options_sp['sendpress_ignore_087'] = 'true';
//SendPress_Option::set('sendpress_ignore_087', 'true');
}
//dadd_action('admin_notices', array($this,'sendpress_ignore_087'));
//.........这里部分代码省略.........