當前位置: 首頁>>代碼示例>>PHP>>正文


PHP um_convert_tags函數代碼示例

本文整理匯總了PHP中um_convert_tags函數的典型用法代碼示例。如果您正苦於以下問題:PHP um_convert_tags函數的具體用法?PHP um_convert_tags怎麽用?PHP um_convert_tags使用的例子?那麽, 這裏精選的函數代碼示例或許可以為您提供幫助。


在下文中一共展示了um_convert_tags函數的5個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。

示例1: UM_Mail

function UM_Mail($user_id_or_email = 1, $subject_line = 'Email Subject', $template, $path = null, $args = array())
{
    if (absint($user_id_or_email)) {
        $user = get_userdata($user_id_or_email);
        $email = $user->user_email;
    } else {
        $email = $user_id_or_email;
    }
    $headers = 'From: ' . um_get_option('mail_from') . ' <' . um_get_option('mail_from_addr') . '>' . "\r\n";
    $attachments = null;
    if (file_exists(get_stylesheet_directory() . '/ultimate-member/templates/email/' . get_locale() . '/' . $template . '.html')) {
        $path_to_email = get_stylesheet_directory() . '/ultimate-member/templates/email/' . get_locale() . '/' . $template . '.html';
    } else {
        if (file_exists(get_stylesheet_directory() . '/ultimate-member/templates/email/' . $template . '.html')) {
            $path_to_email = get_stylesheet_directory() . '/ultimate-member/templates/email/' . $template . '.html';
        } else {
            $path_to_email = $path . $template . '.html';
        }
    }
    if (um_get_option('email_html')) {
        $message = file_get_contents($path_to_email);
        add_filter('wp_mail_content_type', 'um_mail_content_type');
    } else {
        $message = um_get_option('email-' . $template) ? um_get_option('email-' . $template) : 'Untitled';
    }
    $message = um_convert_tags($message, $args);
    wp_mail($email, $subject_line, $message, $headers, $attachments);
}
開發者ID:lytranuit,項目名稱:wordpress,代碼行數:28,代碼來源:um-short-functions.php

示例2: send

 function send($email, $template = null, $args = array())
 {
     if (!$template) {
         return;
     }
     if (um_get_option($template . '_on') != 1) {
         return;
     }
     if (!is_email($email)) {
         return;
     }
     $this->attachments = null;
     $this->headers = 'From: ' . um_get_option('mail_from') . ' <' . um_get_option('mail_from_addr') . '>' . "\r\n";
     $this->subject = um_get_option($template . '_sub');
     $this->subject = um_convert_tags($this->subject, $args);
     if (isset($args['admin']) || isset($args['plain_text'])) {
         $this->force_plain_text = 'forced';
     }
     // HTML e-mail or text
     if (um_get_option('email_html') && $this->email_template($template, $args)) {
         add_filter('wp_mail_content_type', array(&$this, 'set_content_type'));
         $this->message = file_get_contents($this->email_template($template, $args));
     } else {
         $this->message = um_get_option($template);
     }
     // Convert tags in body
     $this->message = um_convert_tags($this->message, $args);
     // Send mail
     wp_mail($email, $this->subject, $this->message, $this->headers, $this->attachments);
     remove_filter('wp_mail_content_type', array(&$this, 'set_content_type'));
     // reset globals
     $this->force_plain_text = '';
 }
開發者ID:CoolWP,項目名稱:ultimatemember,代碼行數:33,代碼來源:um-mail.php

示例3: um_dynamic_user_profile_pagetitle

function um_dynamic_user_profile_pagetitle($title, $sep = '')
{
    global $paged, $page, $ultimatemember;
    $profile_title = um_get_option('profile_title');
    if (um_is_core_page('user') && um_get_requested_user()) {
        um_fetch_user(um_get_requested_user());
        $profile_title = um_convert_tags($profile_title);
        $title = $profile_title;
        um_reset_user();
    }
    return $title;
}
開發者ID:jonfalcon,項目名稱:ultimatemember,代碼行數:12,代碼來源:um-filters-profile.php

示例4: um_profile_dynamic_meta_desc

function um_profile_dynamic_meta_desc()
{
    global $ultimatemember;
    if (um_is_core_page('user') && um_get_requested_user()) {
        um_fetch_user(um_get_requested_user());
        $content = um_convert_tags(um_get_option('profile_desc'));
        $user_id = um_user('ID');
        $url = um_user_profile_url();
        if (um_profile('profile_photo')) {
            $avatar = um_user_uploads_uri() . um_profile('profile_photo');
        } else {
            $avatar = um_get_default_avatar_uri();
        }
        um_reset_user();
        ?>

			<meta name="description" content="<?php 
        echo $content;
        ?>
">

			<meta property="og:title" content="<?php 
        echo um_get_display_name($user_id);
        ?>
" />
			<meta property="og:type" content="article" />
			<meta property="og:image" content="<?php 
        echo $avatar;
        ?>
" />
			<meta property="og:url" content="<?php 
        echo $url;
        ?>
" />
			<meta property="og:description" content="<?php 
        echo $content;
        ?>
" />

		<?php 
    }
}
開發者ID:TeamSubjectMatter,項目名稱:juddfoundation,代碼行數:42,代碼來源:um-actions-profile.php

示例5: convert_locker_tags

 function convert_locker_tags($str)
 {
     $str = um_convert_tags($str);
     return $str;
 }
開發者ID:TeamSubjectMatter,項目名稱:juddfoundation,代碼行數:5,代碼來源:um-shortcodes.php


注:本文中的um_convert_tags函數示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。