本文整理汇总了PHP中Wiki::get_instance方法的典型用法代码示例。如果您正苦于以下问题:PHP Wiki::get_instance方法的具体用法?PHP Wiki::get_instance怎么用?PHP Wiki::get_instance使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Wiki
的用法示例。
在下文中一共展示了Wiki::get_instance方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: str_replace
$wiki_notification_content[$key] = str_replace("\\'", "'", $wiki_notification_content[$key]);
}
global $blog_id;
$query = "SELECT * FROM " . $this->db_prefix . "wiki_subscriptions WHERE blog_id = {$blog_id} AND wiki_id = {$post->ID}";
$subscription_emails = $wpdb->get_results($query, ARRAY_A);
if (count($subscription_emails) > 0) {
foreach ($subscription_emails as $subscription_email) {
$loop_notification_content = $wiki_notification_content['user'];
$loop_notification_content = $wiki_notification_content['user'];
if ($subscription_email['user_id'] > 0) {
if ($subscription_email['user_id'] == $post->post_author) {
$loop_notification_content = $wiki_notification_content['author'];
}
$user = get_userdata($subscription_email['user_id']);
$subscription_to = $user->user_email;
} else {
$subscription_to = $subscription_email['email'];
}
$loop_notification_content = str_replace("CANCEL_URL", $cancel_url . $subscription_email['ID'], $loop_notification_content);
$subject_content = $blog_name . ': ' . __('Wiki Page Changes', 'wiki');
$from_email = $admin_email;
$message_headers = "MIME-Version: 1.0\n" . "From: " . $blog_name . " <{$from_email}>\n" . "Content-Type: text/plain; charset=\"" . get_option('blog_charset') . "\"\n";
wp_mail($subscription_to, $subject_content, $loop_notification_content, $message_headers);
}
}
}
}
$wiki = Wiki::get_instance();
if (file_exists($wiki->plugin_dir . 'premium/wiki-premium.php')) {
require_once $wiki->plugin_dir . 'premium/wiki-premium.php';
}