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

PHP um_user_uploads_uri函数代码示例

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

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



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

示例1: edit_field


//.........这里部分代码省略.........
            /* Gap/Space */
            case 'spacing':
                $output .= '<div class="um-field um-field-spacing' . $classes . '"' . $conditional . ' style="height: ' . $spacing . '"></div>';
                break;
                /* A line divider */
            /* A line divider */
            case 'divider':
                $output .= '<div class="um-field um-field-divider' . $classes . '"' . $conditional . ' style="border-bottom: ' . $borderwidth . 'px ' . $borderstyle . ' ' . $bordercolor . '">';
                if ($divider_text) {
                    $output .= '<div class="um-field-divider-text"><span>' . $divider_text . '</span></div>';
                }
                $output .= '</div>';
                break;
                /* Single Image Upload */
            /* Single Image Upload */
            case 'image':
                $output .= '<div class="um-field' . $classes . '"' . $conditional . ' data-key="' . $key . '">';
                if (in_array($key, array('profile_photo', 'cover_photo'))) {
                    $field_value = '';
                } else {
                    $field_value = $this->field_value($key, $default, $data);
                }
                $output .= '<input type="hidden" name="' . $key . $ultimatemember->form->form_suffix . '" id="' . $key . $ultimatemember->form->form_suffix . '" value="' . $field_value . '" />';
                if (isset($data['label'])) {
                    $output .= $this->field_label($label, $key, $data);
                }
                $modal_label = isset($data['label']) ? $data['label'] : __('Upload Photo', 'ultimatemember');
                $output .= '<div class="um-field-area" style="text-align: center">';
                if ($this->field_value($key, $default, $data)) {
                    if (!in_array($key, array('profile_photo', 'cover_photo'))) {
                        if (isset($this->set_mode) && $this->set_mode == 'register') {
                            $imgValue = $this->field_value($key, $default, $data);
                        } else {
                            $imgValue = um_user_uploads_uri() . $this->field_value($key, $default, $data);
                        }
                        $img = '<img src="' . $imgValue . '" alt="" />';
                    } else {
                        $img = '';
                    }
                    $output .= '<div class="um-single-image-preview show ' . $crop_class . '" data-crop="' . $crop_data . '" data-key="' . $key . '">
								<a href="#" class="cancel"><i class="um-icon-close"></i></a>' . $img . '
							</div><a href="#" data-modal="um_upload_single" data-modal-size="' . $modal_size . '" data-modal-copy="1" class="um-button um-btn-auto-width">' . __('Change photo', 'ultimatemember') . '</a>';
                } else {
                    $output .= '<div class="um-single-image-preview ' . $crop_class . '" data-crop="' . $crop_data . '" data-key="' . $key . '">
								<a href="#" class="cancel"><i class="um-icon-close"></i></a>
								<img src="" alt="" />
							</div><a href="#" data-modal="um_upload_single" data-modal-size="' . $modal_size . '" data-modal-copy="1" class="um-button um-btn-auto-width">' . $button_text . '</a>';
                }
                $output .= '</div>';
                /* modal hidden */
                $output .= '<div class="um-modal-hidden-content">';
                $output .= '<div class="um-modal-header"> ' . $modal_label . '</div>';
                $output .= '<div class="um-modal-body">';
                if (isset($this->set_id)) {
                    $set_id = $this->set_id;
                    $set_mode = $this->set_mode;
                } else {
                    $set_id = 0;
                    $set_mode = '';
                }
                $output .= '<div class="um-single-image-preview ' . $crop_class . '" data-crop="' . $crop_data . '" data-ratio="' . $ratio . '" data-min_width="' . $min_width . '" data-min_height="' . $min_height . '" data-coord=""><a href="#" class="cancel"><i class="um-icon-close"></i></a><img src="" alt="" /></div>';
                $output .= '<div class="um-single-image-upload" data-icon="' . $icon . '" data-set_id="' . $set_id . '" data-set_mode="' . $set_mode . '" data-type="' . $type . '" data-key="' . $key . '" data-max_size="' . $max_size . '" data-max_size_error="' . $max_size_error . '" data-min_size_error="' . $min_size_error . '" data-extension_error="' . $extension_error . '"  data-allowed_types="' . $allowed_types . '" data-upload_text="' . $upload_text . '" data-max_files_error="' . $max_files_error . '" data-upload_help_text="' . $upload_help_text . '">' . $button_text . '</div>';
                $output .= '<div class="um-modal-footer">
									<div class="um-modal-right">
										<a href="#" class="um-modal-btn um-finish-upload image disabled" data-key="' . $key . '" data-change="' . __('Change photo', 'ultimatemember') . '" data-processing="' . __('Processing...', 'ultimatemember') . '"> ' . __('Apply', 'ultimatemember') . '</a>
										<a href="#" class="um-modal-btn alt" data-action="um_remove_modal"> ' . __('Cancel', 'ultimatemember') . '</a>
开发者ID:Ksajikyan,项目名称:poiskuslug,代码行数:67,代码来源:um-fields.php


示例2: um_get_avatar_uri

function um_get_avatar_uri($image, $attrs)
{
    global $ultimatemember;
    $uri = false;
    $find = false;
    if (file_exists($ultimatemember->files->upload_basedir . um_user('ID') . '/profile_photo-' . $attrs . '.jpg')) {
        $uri = um_user_uploads_uri() . 'profile_photo-' . $attrs . '.jpg?' . current_time('timestamp');
    } else {
        $sizes = um_get_option('photo_thumb_sizes');
        if (is_array($sizes)) {
            $find = um_closest_num($sizes, $attrs);
        }
        if (file_exists($ultimatemember->files->upload_basedir . um_user('ID') . '/profile_photo-' . $find . '.jpg')) {
            $uri = um_user_uploads_uri() . 'profile_photo-' . $find . '.jpg?' . current_time('timestamp');
        } else {
            if (file_exists($ultimatemember->files->upload_basedir . um_user('ID') . '/profile_photo.jpg')) {
                $uri = um_user_uploads_uri() . 'profile_photo.jpg?' . current_time('timestamp');
            }
        }
        if ($attrs == 'original') {
            $uri = um_user_uploads_uri() . 'profile_photo.jpg?' . current_time('timestamp');
        }
    }
    return $uri;
}
开发者ID:lytranuit,项目名称:wordpress,代码行数:25,代码来源:um-short-functions.php


示例3: um_profile_field_filter_hook__image

function um_profile_field_filter_hook__image($value, $data)
{
    $uri = um_user_uploads_uri() . $value;
    $title = isset($data['title']) ? $data['title'] : __('Untitled photo');
    if (file_exists(um_user_uploads_dir() . $value)) {
        $value = '<div class="um-photo"><a href="#" class="um-photo-modal" data-src="' . $uri . '"><img src="' . $uri . '" alt="' . $title . '" title="' . $title . '" class="" /></a></div>';
    } else {
        $value = '';
    }
    return $value;
}
开发者ID:shramee,项目名称:ultimatemember,代码行数:11,代码来源:um-filters-fields.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: um_profile_field_filter_hook__image

function um_profile_field_filter_hook__image($value, $data)
{
    $uri = um_user_uploads_uri() . $value;
    $title = isset($data['title']) ? $data['title'] : __('Untitled photo');
    // if value is an image tag
    if (preg_match('/\\<img.*src=\\"([^"]+).*/', $value, $matches)) {
        $uri = $matches[1];
        $value = '<div class="um-photo"><a href="#" class="um-photo-modal" data-src="' . $uri . '"><img src="' . $uri . '" alt="' . $title . '" title="' . $title . '" class="" /></a></div>';
    } else {
        if (file_exists(um_user_uploads_dir() . $value)) {
            $value = '<div class="um-photo"><a href="#" class="um-photo-modal" data-src="' . $uri . '"><img src="' . $uri . '" alt="' . $title . '" title="' . $title . '" class="" /></a></div>';
        } else {
            $value = '';
        }
    }
    return $value;
}
开发者ID:TeamSubjectMatter,项目名称:juddfoundation,代码行数:17,代码来源:um-filters-fields.php


示例6: um_get_avatar_uri

function um_get_avatar_uri($image, $attrs)
{
    global $ultimatemember;
    $uri = false;
    $find = false;
    $ext = '.' . pathinfo($image, PATHINFO_EXTENSION);
    $cache_time = apply_filters('um_filter_avatar_cache_time', current_time('timestamp'), um_user('ID'));
    if (file_exists($ultimatemember->files->upload_basedir . um_user('ID') . '/profile_photo-' . $attrs . $ext)) {
        $uri = um_user_uploads_uri() . 'profile_photo-' . $attrs . $ext . '?' . $cache_time;
    } else {
        $sizes = um_get_option('photo_thumb_sizes');
        if (is_array($sizes)) {
            $find = um_closest_num($sizes, $attrs);
        }
        if (file_exists($ultimatemember->files->upload_basedir . um_user('ID') . '/profile_photo-' . $find . $ext)) {
            $uri = um_user_uploads_uri() . 'profile_photo-' . $find . $ext . '?' . $cache_time;
        } else {
            if (file_exists($ultimatemember->files->upload_basedir . um_user('ID') . '/profile_photo' . $ext)) {
                $uri = um_user_uploads_uri() . 'profile_photo' . $ext . '?' . $cache_time;
            }
        }
        if ($attrs == 'original') {
            $uri = um_user_uploads_uri() . 'profile_photo' . $ext . '?' . $cache_time;
        }
    }
    return $uri;
}
开发者ID:TeamSubjectMatter,项目名称:juddfoundation,代码行数:27,代码来源:um-short-functions.php



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


鲜花

握手

雷人

路过

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

请发表评论

全部评论

专题导读
上一篇:
PHP umask函数代码示例发布时间:2022-05-23
下一篇:
PHP um_user_profile_url函数代码示例发布时间: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