当前位置: 首页>>代码示例>>PHP>>正文


PHP um_is_core_page函数代码示例

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


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

示例1: password_reset

 function password_reset()
 {
     global $ultimatemember;
     if (um_is_core_page('password-reset')) {
         $ultimatemember->fields->set_mode = 'password';
     }
 }
开发者ID:Zurtr,项目名称:ultimatemember,代码行数:7,代码来源:um-password.php

示例2: account

 function account()
 {
     global $ultimatemember;
     if (um_is_core_page('account') && !is_user_logged_in()) {
         um_redirect_home();
     }
     if (um_is_core_page('account')) {
         $ultimatemember->fields->set_mode = 'account';
         $ultimatemember->fields->editing = true;
         if (get_query_var('um_tab')) {
             $this->current_tab = get_query_var('um_tab');
         }
     }
 }
开发者ID:smithsa,项目名称:daily-job-hunter,代码行数:14,代码来源:um-account.php

示例3: account

 function account()
 {
     global $ultimatemember;
     if (um_is_core_page('account') && !is_user_logged_in()) {
         exit(wp_redirect(add_query_arg('redirect_to', urlencode(um_get_core_page('account')), um_get_core_page('login'))));
     }
     if (um_is_core_page('account')) {
         $ultimatemember->fields->set_mode = 'account';
         $ultimatemember->fields->editing = true;
         if (get_query_var('um_tab')) {
             $this->current_tab = get_query_var('um_tab');
         }
     }
 }
开发者ID:samuelshih,项目名称:daily-gazette,代码行数:14,代码来源:um-account.php

示例4: template_redirect

 function template_redirect()
 {
     global $post, $ultimatemember;
     do_action('um_access_homepage_per_role');
     do_action('um_access_global_settings');
     do_action('um_access_category_settings');
     do_action('um_access_post_settings');
     if ($this->redirect_handler && !$this->allow_access && !um_is_core_page('login')) {
         // login page add protected page automatically
         if (strstr($this->redirect_handler, um_get_core_page('login'))) {
             $curr = $ultimatemember->permalinks->get_current_url();
             $this->redirect_handler = esc_url(add_query_arg('redirect_to', $curr, $this->redirect_handler));
         }
         exit(wp_redirect($this->redirect_handler));
     }
 }
开发者ID:chrisuehlein,项目名称:couponsite,代码行数:16,代码来源:um-access.php

示例5: um_dynamic_user_profile_title

function um_dynamic_user_profile_title($title, $id = '')
{
    global $ultimatemember;
    if (is_admin()) {
        return $title;
    }
    if ($id == $ultimatemember->permalinks->core['user']) {
        if (um_is_core_page('user') && um_get_requested_user()) {
            $title = um_get_display_name(um_get_requested_user());
        } else {
            if (um_is_core_page('user') && is_user_logged_in()) {
                $title = um_get_display_name(get_current_user_id());
            }
        }
    }
    return strlen($title) !== strlen(utf8_decode($title)) ? $title : utf8_encode($title);
}
开发者ID:Makenrro,项目名称:repos,代码行数:17,代码来源:um-filters-profile.php

示例6: locate_user_profile

 function locate_user_profile()
 {
     global $post, $ultimatemember;
     if (um_queried_user() && um_is_core_page('user')) {
         if (um_get_option('permalink_base') == 'user_login') {
             $user_id = username_exists(um_queried_user());
             // Try nice name
             if (!$user_id) {
                 $slug = um_queried_user();
                 $slug = str_replace('.', '-', $slug);
                 $the_user = get_user_by('slug', $slug);
                 if (isset($the_user->ID)) {
                     $user_id = $the_user->ID;
                 }
             }
         }
         if (um_get_option('permalink_base') == 'user_id') {
             $user_id = $ultimatemember->user->user_exists_by_id(um_queried_user());
         }
         if (um_get_option('permalink_base') == 'name') {
             $user_id = $ultimatemember->user->user_exists_by_name(um_queried_user());
         }
         /** USER EXISTS SET USER AND CONTINUE **/
         if ($user_id) {
             um_set_requested_user($user_id);
         } else {
             exit(wp_redirect(um_get_core_page('user')));
         }
     } else {
         if (um_is_core_page('user')) {
             if (is_user_logged_in()) {
                 // just redirect to their profile
                 $query = $ultimatemember->permalinks->get_query_array();
                 $url = um_user_profile_url();
                 if ($query) {
                     foreach ($query as $key => $val) {
                         $url = add_query_arg($key, $val, $url);
                     }
                 }
                 exit(wp_redirect($url));
             }
         }
     }
 }
开发者ID:Zurtr,项目名称:ultimatemember,代码行数:44,代码来源:um-rewrite.php

示例7: body_class

 function body_class($classes)
 {
     global $ultimatemember;
     $array = $ultimatemember->permalinks->core;
     if (!$array) {
         return $classes;
     }
     foreach ($array as $slug => $info) {
         if (um_is_core_page($slug)) {
             $classes[] = 'um-page-' . $slug;
         }
     }
     if (is_user_logged_in()) {
         $classes[] = 'um-page-loggedin';
     } else {
         $classes[] = 'um-page-loggedout';
     }
     return $classes;
 }
开发者ID:smithsa,项目名称:daily-job-hunter,代码行数:19,代码来源:um-shortcodes.php

示例8: logout_page

 function logout_page()
 {
     if (um_is_core_page('logout')) {
         if (is_user_logged_in()) {
             if (isset($_REQUEST['redirect_to']) && $_REQUEST['redirect_to'] !== '') {
                 $redirect_to = $_REQUEST['redirect_to'];
             } else {
                 if (um_user('after_logout') == 'redirect_home') {
                     $redirect_to = home_url();
                 } else {
                     $redirect_to = um_user('logout_redirect_url');
                 }
             }
             wp_logout();
             exit(wp_redirect($redirect_to));
         } else {
             um_redirect_home();
         }
     }
 }
开发者ID:BurlesonBrad,项目名称:ultimatemember,代码行数:20,代码来源:um-logout.php

示例9: logout_page

 function logout_page()
 {
     if (um_is_core_page('logout')) {
         if (is_user_logged_in()) {
             if (isset($_REQUEST['redirect_to']) && $_REQUEST['redirect_to'] !== '') {
                 wp_logout();
                 session_unset();
                 exit(wp_redirect($_REQUEST['redirect_to']));
             } else {
                 if (um_user('after_logout') == 'redirect_home') {
                     wp_logout();
                     session_unset();
                     um_redirect_home();
                 } else {
                     wp_logout();
                     session_unset();
                     exit(wp_redirect(um_user('logout_redirect_url')));
                 }
             }
         } else {
             um_redirect_home();
         }
     }
 }
开发者ID:TeamSubjectMatter,项目名称:juddfoundation,代码行数:24,代码来源:um-logout.php

示例10: title_from_special_fields

 /**
  * Fetches title from special fields, like other plugins with special queries.
  * Used before and has priority over custom fields.
  * Front end only.
  *
  * @since 2.5.2
  *
  * @return string $title Title from Special Field.
  */
 public function title_from_special_fields()
 {
     $title = '';
     if (false === $this->is_admin()) {
         if ($this->is_ultimate_member_user_page() && um_is_core_page('user') && um_get_requested_user()) {
             $title = um_user('display_name');
         }
     }
     return $title;
 }
开发者ID:sybrew,项目名称:the-seo-framework,代码行数:19,代码来源:generate-title.class.php

示例11: edit_field


//.........这里部分代码省略.........
                if (isset($icon) && $icon && isset($this->field_icons) && $this->field_icons == 'field') {
                    $output .= '<div class="um-field-icon"><i class="' . $icon . '"></i></div>';
                }
                $output .= '<input ' . $disabled . ' class="' . $this->get_class($key, $data) . '" type="' . $input . '" name="' . $key . $ultimatemember->form->form_suffix . '" id="' . $key . $ultimatemember->form->form_suffix . '" value="' . htmlspecialchars($this->field_value($key, $default, $data)) . '" placeholder="' . $placeholder . '" data-validate="' . $validate . '" data-key="' . $key . '" />
							
						</div>';
                if ($this->is_error($key)) {
                    $output .= $this->field_error($this->show_error($key));
                }
                $output .= '</div>';
                break;
                /* Password */
            /* Password */
            case 'password':
                $original_key = $key;
                if ($key == 'single_user_password') {
                    $key = $original_key;
                    $output .= '<div class="um-field' . $classes . '"' . $conditional . ' data-key="' . $key . '">';
                    if (isset($data['label'])) {
                        $output .= $this->field_label($label, $key, $data);
                    }
                    $output .= '<div class="um-field-area">';
                    if (isset($icon) && $icon && $this->field_icons == 'field') {
                        $output .= '<div class="um-field-icon"><i class="' . $icon . '"></i></div>';
                    }
                    $output .= '<input class="' . $this->get_class($key, $data) . '" type="' . $input . '" name="' . $key . $ultimatemember->form->form_suffix . '" id="' . $key . $ultimatemember->form->form_suffix . '" value="' . $this->field_value($key, $default, $data) . '" placeholder="' . $placeholder . '" data-validate="' . $validate . '" data-key="' . $key . '" />
								
							</div>';
                    if ($this->is_error($key)) {
                        $output .= $this->field_error($this->show_error($key));
                    }
                    $output .= '</div>';
                } else {
                    if ($this->set_mode == 'account' && um_is_core_page('account')) {
                        $key = 'current_' . $original_key;
                        $output .= '<div class="um-field' . $classes . '"' . $conditional . ' data-key="' . $key . '">';
                        if (isset($data['label'])) {
                            $output .= $this->field_label(__('Current Password', 'ultimatemember'), $key, $data);
                        }
                        $output .= '<div class="um-field-area">';
                        if (isset($icon) && $icon && $this->field_icons == 'field') {
                            $output .= '<div class="um-field-icon"><i class="' . $icon . '"></i></div>';
                        }
                        $output .= '<input class="' . $this->get_class($key, $data) . '" type="' . $input . '" name="' . $key . $ultimatemember->form->form_suffix . '" id="' . $key . $ultimatemember->form->form_suffix . '" value="' . $this->field_value($key, $default, $data) . '" placeholder="' . $placeholder . '" data-validate="' . $validate . '" data-key="' . $key . '" />
									
								</div>';
                        if ($this->is_error($key)) {
                            $output .= $this->field_error($this->show_error($key));
                        }
                        $output .= '</div>';
                    }
                    $key = $original_key;
                    $output .= '<div class="um-field' . $classes . '"' . $conditional . ' data-key="' . $key . '">';
                    if ($this->set_mode == 'account' && um_is_core_page('account') || $this->set_mode == 'password' && um_is_core_page('password-reset')) {
                        $output .= $this->field_label(__('New Password', 'ultimatemember'), $key, $data);
                    } else {
                        if (isset($data['label'])) {
                            $output .= $this->field_label($label, $key, $data);
                        }
                    }
                    $output .= '<div class="um-field-area">';
                    if (isset($icon) && $icon && $this->field_icons == 'field') {
                        $output .= '<div class="um-field-icon"><i class="' . $icon . '"></i></div>';
                    }
                    $output .= '<input class="' . $this->get_class($key, $data) . '" type="' . $input . '" name="' . $key . $ultimatemember->form->form_suffix . '" id="' . $key . $ultimatemember->form->form_suffix . '" value="' . $this->field_value($key, $default, $data) . '" placeholder="' . $placeholder . '" data-validate="' . $validate . '" data-key="' . $key . '" />
							
开发者ID:Ksajikyan,项目名称:poiskuslug,代码行数:66,代码来源:um-fields.php

示例12: um_is_myprofile

function um_is_myprofile()
{
    global $ultimatemember;
    if (get_current_user_id() && get_current_user_id() == um_get_requested_user()) {
        return true;
    }
    if (!um_get_requested_user() && um_is_core_page('user') && get_current_user_id()) {
        return true;
    }
    return false;
}
开发者ID:lytranuit,项目名称:wordpress,代码行数:11,代码来源:um-short-functions.php

示例13: access_members

 function access_members()
 {
     if (um_get_option('members_page') == 0 && um_is_core_page('members')) {
         um_redirect_home();
     }
 }
开发者ID:purplewhite,项目名称:ultimatemember,代码行数:6,代码来源:um-members.php

示例14: 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

示例15: um_edit_profile_url

function um_edit_profile_url()
{
    global $ultimatemember;
    if (um_is_core_page('user')) {
        $url = $ultimatemember->permalinks->get_current_url();
    } else {
        $url = um_user_profile_url();
    }
    $url = remove_query_arg('profiletab', $url);
    $url = remove_query_arg('subnav', $url);
    $url = add_query_arg('profiletab', 'main', $url);
    $url = add_query_arg('um_action', 'edit', $url);
    return $url;
}
开发者ID:TeamSubjectMatter,项目名称:juddfoundation,代码行数:14,代码来源:um-short-functions.php


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