当前位置: 首页>>代码示例>>PHP>>正文


PHP NewsletterModule::clean_url_tags方法代码示例

本文整理汇总了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
开发者ID:chicosilva,项目名称:olharambiental,代码行数:31,代码来源:options.php

示例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';
开发者ID:taeche,项目名称:SoDoEx,代码行数:31,代码来源:edit.php

示例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]';
开发者ID:akshayxhtmljunkies,项目名称:brownglock,代码行数:31,代码来源:options.php


注:本文中的NewsletterModule::clean_url_tags方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。