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

PHP um_edit_profile_url函数代码示例

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

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



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

示例1: display_view

 function display_view($mode, $args)
 {
     global $ultimatemember;
     $output = null;
     $this->global_args = $args;
     $ultimatemember->form->form_suffix = '-' . $this->global_args['form_id'];
     $this->set_mode = $mode;
     $this->set_id = $this->global_args['form_id'];
     $this->field_icons = isset($this->global_args['icons']) ? $this->global_args['icons'] : 'label';
     // start output here
     $this->get_fields = $this->get_fields();
     if (um_get_option('profile_empty_text')) {
         $emo = um_get_option('profile_empty_text_emo');
         if ($emo) {
             $emo = '<i class="um-faicon-frown-o"></i>';
         } else {
             $emo = false;
         }
         if (um_is_myprofile()) {
             $output .= '<p class="um-profile-note">' . $emo . '<span>' . sprintf(__('Your profile is looking a little empty. Why not <a href="%s">add</a> some information!', 'ultimatemember'), um_edit_profile_url()) . '</span></p>';
         } else {
             $output .= '<p class="um-profile-note">' . $emo . '<span>' . __('This user has not added any information to their profile yet.', 'ultimatemember') . '</span></p>';
         }
     }
     if (!empty($this->get_fields)) {
         // find rows
         foreach ($this->get_fields as $key => $array) {
             if ($array['type'] == 'row') {
                 $this->rows[$key] = $array;
                 unset($this->get_fields[$key]);
                 // not needed anymore
             }
         }
         // rows fallback
         if (!isset($this->rows)) {
             $this->rows = array('_um_row_1' => array('type' => 'row', 'id' => '_um_row_1', 'sub_rows' => 1, 'cols' => 1));
         }
         // master rows
         foreach ($this->rows as $row_id => $row_array) {
             $row_fields = $this->get_fields_by_row($row_id);
             if ($row_fields) {
                 $output .= $this->new_row_output($row_id, $row_array);
                 $sub_rows = isset($row_array['sub_rows']) ? $row_array['sub_rows'] : 1;
                 for ($c = 0; $c < $sub_rows; $c++) {
                     // cols
                     $cols = isset($row_array['cols']) ? $row_array['cols'] : 1;
                     if (strstr($cols, ':')) {
                         $col_split = explode(':', $cols);
                     } else {
                         $col_split = array($cols);
                     }
                     $cols_num = $col_split[$c];
                     // sub row fields
                     $subrow_fields = null;
                     $subrow_fields = $this->get_fields_in_subrow($row_fields, $c);
                     if (is_array($subrow_fields)) {
                         $subrow_fields = $this->array_sort_by_column($subrow_fields, 'position');
                         if ($cols_num == 1) {
                             $output .= '<div class="um-col-1">';
                             $col1_fields = $this->get_fields_in_column($subrow_fields, 1);
                             if ($col1_fields) {
                                 foreach ($col1_fields as $key => $data) {
                                     $output .= $this->view_field($key, $data);
                                 }
                             }
                             $output .= '</div>';
                         } else {
                             if ($cols_num == 2) {
                                 $output .= '<div class="um-col-121">';
                                 $col1_fields = $this->get_fields_in_column($subrow_fields, 1);
                                 if ($col1_fields) {
                                     foreach ($col1_fields as $key => $data) {
                                         $output .= $this->view_field($key, $data);
                                     }
                                 }
                                 $output .= '</div>';
                                 $output .= '<div class="um-col-122">';
                                 $col2_fields = $this->get_fields_in_column($subrow_fields, 2);
                                 if ($col2_fields) {
                                     foreach ($col2_fields as $key => $data) {
                                         $output .= $this->view_field($key, $data);
                                     }
                                 }
                                 $output .= '</div><div class="um-clear"></div>';
                             } else {
                                 $output .= '<div class="um-col-131">';
                                 $col1_fields = $this->get_fields_in_column($subrow_fields, 1);
                                 if ($col1_fields) {
                                     foreach ($col1_fields as $key => $data) {
                                         $output .= $this->view_field($key, $data);
                                     }
                                 }
                                 $output .= '</div>';
                                 $output .= '<div class="um-col-132">';
                                 $col2_fields = $this->get_fields_in_column($subrow_fields, 2);
                                 if ($col2_fields) {
                                     foreach ($col2_fields as $key => $data) {
                                         $output .= $this->view_field($key, $data);
                                     }
                                 }
//.........这里部分代码省略.........
开发者ID:Ksajikyan,项目名称:poiskuslug,代码行数:101,代码来源:um-fields.php


示例2: um_add_edit_icon

function um_add_edit_icon($args)
{
    global $ultimatemember;
    $output = '';
    if (!is_user_logged_in()) {
        return;
    }
    // not allowed for guests
    if (isset($ultimatemember->user->cannot_edit) && $ultimatemember->user->cannot_edit == 1) {
        return;
    }
    // do not proceed if user cannot edit
    if ($ultimatemember->fields->editing == true) {
        ?>

		<div class="um-profile-edit um-profile-headericon">

			<a href="#" class="um-profile-edit-a um-profile-save"><i class="um-faicon-check"></i></a>

		</div>

		<?php 
    } else {
        ?>

		<div class="um-profile-edit um-profile-headericon">

			<a href="#" class="um-profile-edit-a"><i class="um-faicon-cog"></i></a>

			<?php 
        $items = array('editprofile' => '<a href="' . um_edit_profile_url() . '" class="real_url">' . __('Edit Profile', 'ultimatemember') . '</a>', 'myaccount' => '<a href="' . um_get_core_page('account') . '" class="real_url">' . __('My Account', 'ultimatemember') . '</a>', 'logout' => '<a href="' . um_get_core_page('logout') . '" class="real_url">' . __('Logout', 'ultimatemember') . '</a>', 'cancel' => '<a href="#" class="um-dropdown-hide">' . __('Cancel', 'ultimatemember') . '</a>');
        $cancel = $items['cancel'];
        if (!um_is_myprofile()) {
            $actions = $ultimatemember->user->get_admin_actions();
            unset($items['myaccount']);
            unset($items['logout']);
            unset($items['cancel']);
            if (is_array($actions)) {
                $items = array_merge($items, $actions);
            }
            $items = apply_filters('um_profile_edit_menu_items', $items, um_profile_id());
            $items['cancel'] = $cancel;
        } else {
            $items = apply_filters('um_myprofile_edit_menu_items', $items);
        }
        echo $ultimatemember->menu->new_ui($args['header_menu'], 'div.um-profile-edit', 'click', $items);
        ?>

		</div>

		<?php 
    }
}
开发者ID:TeamSubjectMatter,项目名称:juddfoundation,代码行数:53,代码来源:um-actions-profile.php



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


鲜花

握手

雷人

路过

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

请发表评论

全部评论

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