当前位置: 首页>>代码示例>>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;未经允许,请勿转载。