本文整理汇总了PHP中NewsletterControls::update方法的典型用法代码示例。如果您正苦于以下问题:PHP NewsletterControls::update方法的具体用法?PHP NewsletterControls::update怎么用?PHP NewsletterControls::update使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类NewsletterControls
的用法示例。
在下文中一共展示了NewsletterControls::update方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1:
if (!empty($nc->data['sex'])) {
$query .= " and sex='" . $nc->data['sex'] . "'";
}
}
}
$newsletter->log($query, 3);
$newsletter->log('total: ' . $wpdb->get_var($query), 3);
$nc->data['total'] = $wpdb->get_var($query);
$nc->data['sent'] = 0;
$nc->data['status'] = 'sending';
$nc->data['last_id'] = 0;
$nc->save($wpdb->prefix . 'newsletter_emails');
$nc->load($wpdb->prefix . 'newsletter_emails', $nc->data['id']);
}
if ($nc->is_action('pause')) {
$nc->update($wpdb->prefix . 'newsletter_emails', 'status', 'paused');
$nc->load($wpdb->prefix . 'newsletter_emails', $nc->data['id']);
}
if ($nc->is_action('continue')) {
$wpdb->query("update " . $wpdb->prefix . "newsletter_emails set status='sending' where id=" . $nc->data['id']);
$nc->load($wpdb->prefix . 'newsletter_emails', $nc->data['id']);
}
if ($nc->is_action('abort')) {
$wpdb->query("update " . $wpdb->prefix . "newsletter_emails set last_id=0, status='new' where id=" . $nc->data['id']);
$nc->load($wpdb->prefix . 'newsletter_emails', $nc->data['id']);
}
if ($nc->is_action('delete')) {
$wpdb->query("delete from " . $wpdb->prefix . "newsletter_emails where id=" . $nc->data['id']);
?>
<script>location.href="admin.php?page=newsletter/emails.php";</script><?php
return;