本文整理汇总了PHP中NewsletterControls::get_value方法的典型用法代码示例。如果您正苦于以下问题:PHP NewsletterControls::get_value方法的具体用法?PHP NewsletterControls::get_value怎么用?PHP NewsletterControls::get_value使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类NewsletterControls
的用法示例。
在下文中一共展示了NewsletterControls::get_value方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: unset
$controls->messages = 'Activation email resent to ' . $user->email;
}
if ($controls->is_action('resend_welcome')) {
$user = NewsletterUsers::instance()->get_user($controls->button_data);
$opts = get_option('newsletter');
NewsletterSubscription::instance()->mail($user->email, $newsletter->replace($opts['confirmed_subject'], $user), $newsletter->replace($opts['confirmed_message'], $user));
$controls->messages = 'Welcome email resent.';
}
if ($controls->is_action('remove')) {
$wpdb->query($wpdb->prepare("delete from " . NEWSLETTER_USERS_TABLE . " where id=%d", $controls->button_data));
unset($controls->data['subscriber_id']);
}
// We build the query condition
$where = "where 1=1";
$query_args = array();
$text = trim($controls->get_value('search_text'));
if ($text) {
$query_args[] = '%' . $text . '%';
$query_args[] = '%' . $text . '%';
$query_args[] = '%' . $text . '%';
$where .= " and (email like %s or name like %s or surname like %s)";
}
//if (isset($controls->data['search_test'])) {
// $where .= " and test=1";
//}
if (!empty($controls->data['search_status'])) {
if ($controls->data['search_status'] == 'T') {
$where .= " and test=1";
} else {
$query_args[] = $controls->data['search_status'];
$where .= " and status=%s";