• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    迪恩网络公众号

PHP wpmu_signup_blog_notification函数代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

本文整理汇总了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;未经允许,请勿转载。


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
PHP wpmu_signup_user函数代码示例发布时间:2022-05-23
下一篇:
PHP wpmu_signup_blog函数代码示例发布时间:2022-05-23
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap