本文整理汇总了PHP中NewsletterModule::clean_url_tags方法的典型用法代码示例。如果您正苦于以下问题:PHP NewsletterModule::clean_url_tags方法的具体用法?PHP NewsletterModule::clean_url_tags怎么用?PHP NewsletterModule::clean_url_tags使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类NewsletterModule
的用法示例。
在下文中一共展示了NewsletterModule::clean_url_tags方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: trim
if (empty($controls->data['confirmed_subject'])) {
$controls->data['confirmed_subject'] = $defaults['confirmed_subject'];
}
if (empty($controls->data['confirmed_message'])) {
$controls->data['confirmed_message'] = $defaults['confirmed_message'];
}
if (empty($controls->data['unsubscribed_text'])) {
$controls->data['unsubscribed_text'] = $defaults['unsubscribed_text'];
}
$controls->data['confirmed_message'] = NewsletterModule::clean_url_tags($controls->data['confirmed_message']);
$controls->data['confirmed_text'] = NewsletterModule::clean_url_tags($controls->data['confirmed_text']);
$controls->data['confirmation_text'] = NewsletterModule::clean_url_tags($controls->data['confirmation_text']);
$controls->data['confirmation_message'] = NewsletterModule::clean_url_tags($controls->data['confirmation_message']);
$controls->data['unsubscription_text'] = NewsletterModule::clean_url_tags($controls->data['unsubscription_text']);
$controls->data['unsubscribed_text'] = NewsletterModule::clean_url_tags($controls->data['unsubscribed_text']);
$controls->data['unsubscribed_message'] = NewsletterModule::clean_url_tags($controls->data['unsubscribed_message']);
$controls->data['confirmed_url'] = trim($controls->data['confirmed_url']);
$controls->data['confirmation_url'] = trim($controls->data['confirmation_url']);
$module->save_options($controls->data);
$controls->messages = 'Saved.';
}
if ($controls->is_action('create')) {
$page = array();
$page['post_title'] = 'Newsletter';
$page['post_content'] = '[newsletter]';
$page['post_status'] = 'publish';
$page['post_type'] = 'page';
$page['comment_status'] = 'closed';
$page['ping_status'] = 'closed';
$page['post_category'] = array(1);
// Insert the post into the database
示例2: array
$query .= ")";
}
$email['query'] = $query;
if ($controls->is_action('test')) {
$email['total'] = 0;
} else {
$email['total'] = $wpdb->get_var(str_replace('*', 'count(*)', $query));
}
$email['sent'] = 0;
$email['last_id'] = 0;
$email['send_on'] = $controls->data['send_on'];
if ($controls->is_action('editor')) {
$email['editor'] = $email['editor'] == 0 ? 1 : 0;
}
// Cleans up of tag
$email['message'] = NewsletterModule::clean_url_tags($email['message']);
$res = Newsletter::instance()->save_email($email);
if ($res === false) {
$controls->errors = 'Unable to save. Try to deactivate and reactivate the plugin may be the database is out of sync.';
}
$controls->data['message'] = $email['message'];
$controls->messages .= 'Saved.<br>';
}
if ($controls->is_action('send')) {
$wpdb->update(NEWSLETTER_EMAILS_TABLE, array('status' => 'sending'), array('id' => $email_id));
$email['status'] = 'sending';
$controls->messages .= "Email added to the queue.";
}
if ($controls->is_action('pause')) {
$wpdb->update(NEWSLETTER_EMAILS_TABLE, array('status' => 'paused'), array('id' => $email_id));
$email['status'] = 'paused';
示例3: trim
if (empty($controls->data['confirmation_message'])) {
$controls->data['confirmation_message'] = $defaults['confirmation_message'];
}
if (empty($controls->data['confirmed_text'])) {
$controls->data['confirmed_text'] = $defaults['confirmed_text'];
}
if (empty($controls->data['confirmed_subject'])) {
$controls->data['confirmed_subject'] = $defaults['confirmed_subject'];
}
if (empty($controls->data['confirmed_message'])) {
$controls->data['confirmed_message'] = $defaults['confirmed_message'];
}
$controls->data['confirmed_message'] = NewsletterModule::clean_url_tags($controls->data['confirmed_message']);
$controls->data['confirmed_text'] = NewsletterModule::clean_url_tags($controls->data['confirmed_text']);
$controls->data['confirmation_text'] = NewsletterModule::clean_url_tags($controls->data['confirmation_text']);
$controls->data['confirmation_message'] = NewsletterModule::clean_url_tags($controls->data['confirmation_message']);
$controls->data['confirmed_url'] = trim($controls->data['confirmed_url']);
$controls->data['confirmation_url'] = trim($controls->data['confirmation_url']);
// Checkboxes patch
$options = get_option('newsletter', array());
for ($i = 1; $i <= NEWSLETTER_LIST_MAX; $i++) {
unset($options['preferences_' . $i]);
}
update_option('newsletter', $options);
$module->merge_options($controls->data);
$controls->messages = 'Saved.';
}
if ($controls->is_action('create')) {
$page = array();
$page['post_title'] = 'Newsletter';
$page['post_content'] = '[newsletter]';