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


PHP wpmu_signup_blog_notification函数代码示例

本文整理汇总了PHP中wpmu_signup_blog_notification函数的典型用法代码示例。如果您正苦于以下问题:PHP wpmu_signup_blog_notification函数的具体用法?PHP wpmu_signup_blog_notification怎么用?PHP wpmu_signup_blog_notification使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。


在下文中一共展示了wpmu_signup_blog_notification函数的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: resend_email

 /**
  * Resends an activation email
  *
  * This sends exactly the same email the registrant originally got, using data pulled from
  * their registration. In the future I may add a UI for customized emails.
  *
  * @package Unconfirmed
  * @since 1.0
  *
  * @uses wpmu_signup_blog_notification() to notify users who signed up with a blog
  * @uses wpmu_signup_user_notification() to notify users who signed up without a blog
  */
 function resend_email()
 {
     global $wpdb;
     // Hubba hubba
     if (isset($_REQUEST['unconfirmed_bulk'])) {
         check_admin_referer('unconfirmed_bulk_action');
     } else {
         check_admin_referer('unconfirmed_resend_email');
     }
     // Get the user's activation key out of the URL params
     if (!isset($_REQUEST['unconfirmed_key'])) {
         $this->record_status('error_nokey');
         return;
     }
     $resent_counts = get_site_option('unconfirmed_resent_counts');
     $keys = $_REQUEST['unconfirmed_key'];
     foreach ((array) $keys as $key) {
         if ($this->is_multisite) {
             $user = $wpdb->get_row($wpdb->prepare("SELECT * FROM {$wpdb->signups} WHERE activation_key = %s", $key));
         } else {
             $user = $this->get_userdata_from_key($key);
         }
         if (!$user) {
             $this->record_status('error_nouser', $key);
             continue;
         }
         if ($this->is_multisite) {
             // We use a different email function depending on whether they registered with blog
             if (!empty($user->domain)) {
                 wpmu_signup_blog_notification($user->domain, $user->path, $user->title, $user->user_login, $user->user_email, $user->activation_key, maybe_unserialize($user->meta));
             } else {
                 wpmu_signup_user_notification($user->user_login, $user->user_email, $user->activation_key, maybe_unserialize($user->meta));
             }
         } else {
             // If you're running BP on a non-multisite instance of WP, use the
             // BP function to send the email
             if (function_exists('bp_core_signup_send_validation_email')) {
                 bp_core_signup_send_validation_email($user->ID, $user->user_email, $key);
             }
         }
         if (isset($resent_counts[$key])) {
             $resent_counts[$key] = $resent_counts[$key] + 1;
         } else {
             $resent_counts[$key] = 1;
         }
         // I can't do a true/false check on whether the email was sent because of
         // the crappy way that WPMU and BP work together to send these messages
         // See bp_core_activation_signup_user_notification()
         $this->record_status('updated_resent', $key);
     }
     update_site_option('unconfirmed_resent_counts', $resent_counts);
 }
开发者ID:adenilsonpaiva,项目名称:redelivre,代码行数:64,代码来源:unconfirmed.php

示例2: wpmu_signup_blog

/**
 * Record site signup information for future activation.
 *
 * @since MU
 * @uses wpmu_signup_blog_notification()
 *
 * @param string $domain The requested domain.
 * @param string $path The requested path.
 * @param string $title The requested site title.
 * @param string $user The user's requested login name.
 * @param string $user_email The user's email address.
 * @param array $meta By default, contains the requested privacy setting and lang_id.
 */
function wpmu_signup_blog($domain, $path, $title, $user, $user_email, $meta = '')
{
    global $wpdb;
    $key = substr(md5(time() . rand() . $domain), 0, 16);
    $meta = serialize($meta);
    $domain = $wpdb->escape($domain);
    $path = $wpdb->escape($path);
    $title = $wpdb->escape($title);
    $wpdb->insert($wpdb->signups, array('domain' => $domain, 'path' => $path, 'title' => $title, 'user_login' => $user, 'user_email' => $user_email, 'registered' => current_time('mysql', true), 'activation_key' => $key, 'meta' => $meta));
    wpmu_signup_blog_notification($domain, $path, $title, $user, $user_email, $key, $meta);
}
开发者ID:nhemsley,项目名称:wordpress,代码行数:24,代码来源:ms-functions.php

示例3: wpmu_signup_blog

function wpmu_signup_blog($domain, $path, $title, $user, $user_email, $meta = '')
{
    global $wpdb;
    $key = substr(md5(time() . rand() . $domain), 0, 16);
    $registered = current_time('mysql', true);
    $meta = serialize($meta);
    $domain = $wpdb->escape($domain);
    $path = $wpdb->escape($path);
    $title = $wpdb->escape($title);
    $wpdb->query("INSERT INTO {$wpdb->signups} ( domain, path, title, user_login, user_email, registered, activation_key, meta )\n\t\t\t\t\tVALUES ( '{$domain}', '{$path}', '{$title}', '{$user}', '{$user_email}', '{$registered}', '{$key}', '{$meta}' )");
    wpmu_signup_blog_notification($domain, $path, $title, $user, $user_email, $key, $meta);
}
开发者ID:alx,项目名称:blogsfera,代码行数:12,代码来源:wpmu-functions.php


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