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


PHP get_edit_profile_url函数代码示例

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


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

示例1: thatcamp_modify_admin_bar

function thatcamp_modify_admin_bar($admin_bar)
{
    remove_filter('edit_profile_url', 'bp_members_edit_profile_url', 10, 3);
    $admin_bar->add_node(array('id' => 'edit-profile', 'href' => get_edit_profile_url(get_current_user_id())));
    $admin_bar->add_node(array('id' => 'user-info', 'href' => get_edit_profile_url(get_current_user_id())));
    $admin_bar->add_node(array('id' => 'my-account', 'href' => get_edit_profile_url(get_current_user_id())));
    add_filter('edit_profile_url', 'bp_members_edit_profile_url', 10, 3);
    $admin_bar->add_node(array('id' => 'my-account-activity', 'title' => 'About Me'));
    $admin_bar->add_node(array('id' => 'my-account-groups', 'title' => 'My THATCamps'));
    $admin_bar->add_node(array('id' => 'my-account-friends', 'title' => 'My Friends'));
    $admin_bar->remove_node('my-account-activity-mentions');
    $admin_bar->remove_node('my-account-activity-personal');
    $admin_bar->remove_node('my-account-activity-favorites');
    $admin_bar->remove_node('my-account-activity-friends');
    $admin_bar->remove_node('my-account-activity-groups');
    $admin_bar->remove_node('my-account-blogs');
    $admin_bar->remove_node('my-account-forums');
    $admin_bar->remove_node('my-account-friends-friendships');
    $admin_bar->remove_node('my-account-friends-requests');
    $admin_bar->remove_node('my-account-groups-memberships');
    $admin_bar->remove_node('my-account-groups-invites');
    $admin_bar->remove_node('my-account-messages');
    $admin_bar->remove_node('my-account-settings');
    $admin_bar->remove_node('my-account-xprofile');
}
开发者ID:kosir,项目名称:thatcamp-org,代码行数:25,代码来源:thatcamp-adminbar.php

示例2: appthemes_get_edit_profile_url

function appthemes_get_edit_profile_url()
{
    if ($page_id = APP_User_Profile::get_id()) {
        return get_permalink($page_id);
    }
    return get_edit_profile_url(get_current_user_id());
}
开发者ID:kalushta,项目名称:darom,代码行数:7,代码来源:view-edit-profile.php

示例3: appthemes_get_edit_profile_url

function appthemes_get_edit_profile_url()
{
    if ($page_id = APP_Page_Template::get_id('edit-profile.php')) {
        return get_permalink($page_id);
    }
    return get_edit_profile_url(get_current_user_id());
}
开发者ID:joaosigno,项目名称:dazake-job,代码行数:7,代码来源:page-edit-profile.php

示例4: get_value

 public function get_value($id)
 {
     $user_id = $this->get_raw_value($id);
     if (!$user_id) {
         return false;
     }
     $display_name = $this->get_display_name($user_id);
     if ($edit_link = get_edit_profile_url($user_id)) {
         $display_name = '<a href="' . $edit_link . ' ">' . $display_name . '</a>';
     }
     return $display_name;
 }
开发者ID:xeiter,项目名称:timeplannr,代码行数:12,代码来源:user.php

示例5: tf_change_howdy

function tf_change_howdy($wp_admin_bar)
{
    $user_id = get_current_user_id();
    $current_user = wp_get_current_user();
    $profile_url = get_edit_profile_url($user_id);
    if ($user_id != 0) {
        $avatar = get_avatar($user_id, 28);
        $howdy = sprintf(__('Welcome, %1$s'), $current_user->display_name);
        $class = empty($avatar) ? '' : 'with-avatar';
        $wp_admin_bar->add_menu(array('id' => 'my-account', 'parent' => 'top-secondary', 'title' => $howdy . $avatar, 'href' => $profile_url, 'meta' => array('class' => $class)));
    }
}
开发者ID:TenfoldMedia,项目名称:tenfold-white-label,代码行数:12,代码来源:tenfold-white-label.php

示例6: wp_admin_bar_my_custom_account_menu

function wp_admin_bar_my_custom_account_menu($wp_admin_bar)
{
    $user_id = get_current_user_id();
    $current_user = wp_get_current_user();
    $profile_url = get_edit_profile_url($user_id);
    if (0 != $user_id) {
        /* Add the "My Account" menu */
        $avatar = get_avatar($user_id, 28);
        $howdy = sprintf(__('สวัสดี, %1$s'), $current_user->display_name);
        $class = empty($avatar) ? '' : 'with-avatar';
        $wp_admin_bar->add_menu(array('id' => 'my-account', 'parent' => 'top-secondary', 'title' => $howdy . $avatar, 'href' => $profile_url, 'meta' => array('class' => $class)));
    }
}
开发者ID:weerapat,项目名称:wp-daily,代码行数:13,代码来源:functions.php

示例7: wp_admin_bar_my_account_menu

/**
 * Add the "My Account" menu and all submenus.
 *
 * @since 3.1.0
 */
function wp_admin_bar_my_account_menu($wp_admin_bar)
{
    global $user_identity;
    $user_id = get_current_user_id();
    if (0 != $user_id) {
        /* Add the 'My Account' menu */
        $avatar = get_avatar(get_current_user_id(), 16);
        $id = !empty($avatar) ? 'my-account-with-avatar' : 'my-account';
        $wp_admin_bar->add_menu(array('id' => $id, 'title' => $avatar . $user_identity, 'href' => get_edit_profile_url($user_id)));
        /* Add the "My Account" sub menus */
        $wp_admin_bar->add_menu(array('id' => 'edit-profile', 'parent' => $id, 'title' => __('Edit My Profile'), 'href' => get_edit_profile_url($user_id)));
        $wp_admin_bar->add_menu(array('id' => 'logout', 'parent' => $id, 'title' => __('Log Out'), 'href' => wp_logout_url()));
    }
}
开发者ID:nightsh,项目名称:hartapoliticii,代码行数:19,代码来源:admin-bar.php

示例8: wp_admin_bar_my_custom_account_menu

function wp_admin_bar_my_custom_account_menu($wp_admin_bar)
{
    $user_id = get_current_user_id();
    $current_user = wp_get_current_user();
    $profile_url = get_edit_profile_url($user_id);
    if (0 != $user_id) {
        /* Add the "My Account" menu */
        $avatar = get_avatar($user_id, 28);
        $howdies = array("It's a great day to make an InMail", "Top o' th' mornin'", "Howdy", "I live to serve", "Sup", "Lookin' good", "Welcome", "Hello", "You make InMail look easy", "Nice to see you again", "The robot overlords say hi", "Awaiting your orders", "It's good to be InMailin'", "Hi", "I like working with you", "Mo' InMails, mo' problems", "Bonjour", "Bah-weep-Graaaaagnah wheep ni ni bong", "0100100001100101011011000110110001101111", "Your shoelaces are untied", "Greetings", "I hope Adam doesn't break me again", "You should see me as a blog", "This greeting is randomly selected", "Word to the mutha", ":)", "#yolo", "Yo", "If it's InMails you want, it's InMails I got", "Let's get crackin'", "Party on", "randomly_generated_greeting", "Start the party", "Stylin' like The Chicago Manual", "'I' before 'E', except after 'C'", "The postal service ain't got nothing on me", "So InMail me maybe", "Oppa InMail Style", "Love it, ship it", "Next play", "#swag", "Link Out", "With great power comes great responsibility", "Freedom after 5pm is the right of all CMs");
        $howdiesIndex = $howdies[rand(0, count($howdies) - 1)];
        $howdy = $howdiesIndex . sprintf(__(', %1$s.'), $current_user->display_name);
        $class = empty($avatar) ? '' : 'with-avatar';
        $wp_admin_bar->add_menu(array('id' => 'my-account', 'parent' => 'top-secondary', 'title' => $howdy . $avatar, 'href' => $profile_url, 'meta' => array('class' => $class)));
    }
}
开发者ID:aeligature,项目名称:sponsored-inmail,代码行数:15,代码来源:index.php

示例9: _mw_adminimize_add_user_logout

function _mw_adminimize_add_user_logout($wp_admin_bar)
{
    $user_id = get_current_user_id();
    $current_user = wp_get_current_user();
    $profile_url = get_edit_profile_url($user_id);
    $_mw_adminimize_ui_redirect = _mw_adminimize_get_option_value('_mw_adminimize_ui_redirect');
    if ('1' === $_mw_adminimize_ui_redirect) {
        $redirect = '&amp;redirect_to=' . get_option('siteurl');
    } else {
        $redirect = '';
    }
    if (!$user_id) {
        return;
    }
    $user_info = $current_user->display_name;
    $wp_admin_bar->add_menu(array('id' => 'mw-account', 'parent' => 'top-secondary', 'title' => $user_info . ' ' . __('Log Out'), 'href' => wp_logout_url() . $redirect));
}
开发者ID:hram908,项目名称:albertos-project,代码行数:17,代码来源:remove-admin-bar.php

示例10: get_edit_user_link

 function get_edit_user_link($user_id = null)
 {
     if (!$user_id) {
         $user_id = get_current_user_id();
     }
     if (empty($user_id) || !current_user_can('edit_user', $user_id)) {
         return '';
     }
     $user = new WP_User($user_id);
     if (!$user->exists()) {
         return '';
     }
     if (get_current_user_id() == $user->ID) {
         $link = get_edit_profile_url($user->ID);
     } else {
         $link = add_query_arg('user_id', $user->ID, self_admin_url('user-edit.php'));
     }
     return apply_filters('get_edit_user_link', $link, $user->ID);
 }
开发者ID:Ezyva2015,项目名称:SMSF-Academy-Wordpress,代码行数:19,代码来源:item-user.php

示例11: bbwp_howdy_mod

function bbwp_howdy_mod($wp_admin_bar)
{
    // Get user info
    $user_id = get_current_user_id();
    $current_user = wp_get_current_user();
    $profile_url = get_edit_profile_url($user_id);
    // Custom greatings
    $messages = array('May the 4th be with you', 'Do... or do not. There is no try', 'Bazzinga', 'Kame Hame Ha');
    // Get a ranfom greating
    $all = count($messages) - 1;
    $num = rand(0, $all);
    $greating = $messages[$num];
    // Print user menu with custom greeting
    if (0 != $user_id) {
        $avatar = get_avatar($user_id, 28);
        $howdy = sprintf(__($greating . ', %1$s'), $current_user->display_name);
        $class = empty($avatar) ? '' : 'with-avatar';
        $wp_admin_bar->add_menu(array('id' => 'my-account', 'parent' => 'top-secondary', 'title' => $howdy . $avatar, 'href' => $profile_url, 'meta' => array('class' => $class)));
    }
}
开发者ID:bbustamante,项目名称:BBWP-AutoFunctions,代码行数:20,代码来源:update_howdy.php

示例12: wp_get_current_user

 if ($header_profile_display) {
     $profile_li = '';
     $current_user = wp_get_current_user();
     if ($current_user->exists()) {
         $author_url = get_edit_profile_url($current_user->ID);
         $avatar_url = dmeng_get_avatar($current_user->ID, '54', dmeng_get_avatar_type($current_user->ID), false);
         $profile_li .= '<li class="clearfix">' . sprintf(__('<a href="%1$s" class="name" title="%2$s">%2$s</a>,你好!', 'dmeng'), get_edit_profile_url($current_user->ID), $current_user->display_name) . '<a href="' . wp_logout_url(dmeng_get_current_page_url()) . '" title="' . esc_attr__('Log out of this account') . '" data-no-instant>' . __('Log out &raquo;') . '</a></li>';
         $unread_count = intval(get_dmeng_message($current_user->ID, 'count', "( msg_type='unread' OR msg_type='unrepm' )"));
         $unread_count = $unread_count ? sprintf(__('(%s)', 'dmeng'), $unread_count) : '';
         $profile_tabs = array('message' => __('消息', 'dmeng') . $unread_count);
         $profile_tabs_output = '';
         foreach ($profile_tabs as $tab_key => $tab_title) {
             $tab_attr_title = sprintf(__('查看我的%s', 'dmeng'), $tab_title);
             $profile_tabs_output .= sprintf('<a href="%1$s" title="%2$s">%3$s</a>', dmeng_get_user_url($tab_key), $tab_attr_title, $tab_title);
         }
         $profile_tabs_output .= sprintf('<a href="%1$s" title="%2$s">%3$s</a>', get_edit_profile_url($current_user->ID), '修改个人资料', '修改个人资料');
         $profile_li .= '<li class="tabs">' . $profile_tabs_output . '</li>';
     } else {
         $weekname = date('l', current_time('timestamp', 0));
         $weekarray = array('Monday' => __('星期一', 'dmeng'), 'Tuesday' => __('星期二', 'dmeng'), 'Wednesday' => __('星期三', 'dmeng'), 'Thursday' => __('星期四', 'dmeng'), 'Friday' => __('星期五', 'dmeng'), 'Saturday' => __('星期六', 'dmeng'), 'Sunday' => __('星期天', 'dmeng'));
         $profile_li .= '<li class="date">' . sprintf(__('今天是%1$s,%2$s', 'dmeng'), date(__(' Y 年 m 月 d 日', 'dmeng'), current_time('timestamp', 0)), $weekarray[$weekname]) . '</li>';
         $author_url = 'javascript:;';
         $avatar_url = '';
         // $login_methods[] = array(
         // 	'key' => 'wordpress',
         // 	'name' => __( '本地' , 'dmeng' ),
         // 	'url' => wp_login_url(dmeng_get_current_page_url())
         // );
         // if(dmeng_is_open_qq()){
         // 	$login_methods[] = array(
         // 		'key' => 'qq',
开发者ID:jixingyu,项目名称:gdmusik,代码行数:31,代码来源:header-masthead.php

示例13: user_profile

    function user_profile()
    {
        $blog_name = get_bloginfo('blogname');
        if (empty($blog_name)) {
            $blog_name = home_url('/');
        }
        ?>
		<div id="post-by-email" class="jetpack-targetable">
		<h3><?php 
        esc_html_e('Post by Email', 'jetpack');
        ?>
</h3>
		<table class="form-table">
			<tr>
				<th scope="row"><?php 
        esc_html_e('Email Address', 'jetpack');
        ?>
<span id="jp-pbe-spinner" class="spinner"></span></th>
				<td>
				<div id="jp-pbe-error" class="jetpack-inline-error"></div> <?php 
        if ($this->check_user_connection()) {
            $email = $this->get_post_by_email_address();
            if (empty($email)) {
                $enable_hidden = '';
                $info_hidden = ' style="display: none;"';
            } else {
                $enable_hidden = ' style="display: none;"';
                $info_hidden = '';
            }
            ?>

					<input type="button" name="jp-pbe-enable" id="jp-pbe-enable" class="button" value="<?php 
            esc_attr_e('Enable Post By Email', 'jetpack');
            ?>
 "<?php 
            echo $enable_hidden;
            ?>
 />
					<div id="jp-pbe-info"<?php 
            echo $info_hidden;
            ?>
>
						<p id="jp-pbe-email-wrapper">
							<input type="text" id="jp-pbe-email" value="<?php 
            echo esc_attr($email);
            ?>
" readonly="readonly" class="regular-text" />
							<span class="description"><a target="_blank" href="http://jetpack.me/support/post-by-email/"><?php 
            esc_html_e('More information', 'jetpack');
            ?>
</a></span>
						</p>
						<p>
							<input type="button" name="jp-pbe-regenerate" id="jp-pbe-regenerate" class="button" value="<?php 
            esc_attr_e('Regenerate Address', 'jetpack');
            ?>
 " />
							<input type="button" name="jp-pbe-disable" id="jp-pbe-disable" class="button" value="<?php 
            esc_attr_e('Disable Post By Email', 'jetpack');
            ?>
 " />
						</p>
					</div> <?php 
        } else {
            $jetpack = Jetpack::init();
            ?>

					<p class="jetpack-inline-message">
						<?php 
            printf(esc_html(wptexturize(__('To use Post By Email, you need to link your %s account to your WordPress.com account.', 'jetpack'))), '<strong>' . esc_html($blog_name) . '</strong>');
            ?>
<br />
						<?php 
            echo esc_html(wptexturize(__("If you don't have a WordPress.com account yet, you can sign up for free in just a few seconds.", 'jetpack')));
            ?>
					</p>
					<p>
						<a href="<?php 
            echo $jetpack->build_connect_url(false, get_edit_profile_url(get_current_user_id()) . '#post-by-email');
            ?>
" class="button button-connector" id="wpcom-connect"><?php 
            esc_html_e('Link account with WordPress.com', 'jetpack');
            ?>
</a>
					</p>
					<?php 
        }
        ?>
				</td>
			</tr>
		</table>
		</div>
	<?php 
    }
开发者ID:KurtMakesWeb,项目名称:CandG,代码行数:94,代码来源:post-by-email.php

示例14: wp_admin_bar_my_account_menu

/**
 * Add the "My Account" submenu items.
 *
 * @since 3.1.0
 *
 * @param WP_Admin_Bar $wp_admin_bar
 */
function wp_admin_bar_my_account_menu($wp_admin_bar)
{
    $user_id = get_current_user_id();
    $current_user = wp_get_current_user();
    $profile_url = get_edit_profile_url($user_id);
    if (!$user_id) {
        return;
    }
    $wp_admin_bar->add_group(array('parent' => 'my-account', 'id' => 'user-actions'));
    $user_info = get_avatar($user_id, 64);
    $user_info .= "<span class='display-name'>{$current_user->display_name}</span>";
    if ($current_user->display_name !== $current_user->user_login) {
        $user_info .= "<span class='username'>{$current_user->user_login}</span>";
    }
    $wp_admin_bar->add_menu(array('parent' => 'user-actions', 'id' => 'user-info', 'title' => $user_info, 'href' => $profile_url, 'meta' => array('tabindex' => -1)));
    $wp_admin_bar->add_menu(array('parent' => 'user-actions', 'id' => 'edit-profile', 'title' => __('Edit My Profile'), 'href' => $profile_url));
    $wp_admin_bar->add_menu(array('parent' => 'user-actions', 'id' => 'logout', 'title' => __('Log Out'), 'href' => wp_logout_url()));
}
开发者ID:ajspencer,项目名称:NCSSM-SG-WordPress,代码行数:25,代码来源:admin-bar.php

示例15: printf

?>
</h4>
			<p><?php 
printf(__('Embedding videos from Vine is as simple as pasting a URL onto its own line in a post. See the <a href="%s">full list</a> of supported embeds.'), 'http://codex.wordpress.org/Embeds');
?>
</p>
		</div>

		<div>
			<svg viewBox="-30 -30 160 160"><path d="M61.4,78.6V61.4L72.9,50v40H10V27.1h45.7L44.3,38.6H21.4v40H61.4z M44.3,10H90v45.7L78.6,50V32.4l-32,31.9l-8.1-8.1 l34.8-34.9H50L44.3,10z"/></svg>
			<h4><?php 
_e('Log out everywhere');
?>
</h4>
			<p><?php 
printf(__('If you&#8217;ve ever worried you forgot to sign out from a shared computer, you can now go to <a href="%s">your profile</a> and log out everywhere.'), get_edit_profile_url());
?>
</p>
		</div>

		<div class="last-feature">
			<svg viewBox="-30 -30 160 160"><path d="M35.1,30.1l4.7-5.8l46.4,46.4L80,75c-1.7,1.7-4.6,3.1-8.6,4.3c-4,1.1-7.7,1.7-11,1.7h-20L34,87.4 c-1.5,1.5-3.3,2.3-5.5,2.3c-2.1,0-3.9-0.8-5.5-2.3c-1.5-1.5-2.3-3.3-2.3-5.4c0-2.1,0.8-4,2.3-5.5l6.4-6.4v-20 c0-3.3,0.5-7,1.6-11.2C32.1,34.7,33.4,31.8,35.1,30.1z M76.2,21L59.6,37.7L49.9,28l16.7-16.7c0.9-0.9,2.1-1.2,3.7-0.8 c1.6,0.3,3,1.2,4.3,2.5c1.3,1.3,2.2,2.7,2.5,4.3C77.4,18.9,77.1,20.1,76.2,21z M72.4,50.5l16.7-16.7c0.9-0.9,2.1-1.2,3.7-0.9 c1.6,0.3,3,1.1,4.3,2.5c1.3,1.3,2.2,2.7,2.5,4.3c0.3,1.6,0,2.8-0.9,3.7L82,60.1L72.4,50.5z"/><path d="M10.9,40.4l3.4,6.8L21,48l-4.7,5.2l1.3,7.5l-6.8-3.4l-6.8,3.4l1.3-7.5L0.7,48l6.8-0.8L10.9,40.4z"/></svg>
			<h4><?php 
_e('Plugin recommendations');
?>
</h4>
			<p><?php 
$string = __('The <a href="%s">plugin installer</a> suggests plugins for you to try. Recommendations are based on the plugins you and other users have installed.');
if (!current_user_can('install_plugins')) {
    $string = strip_tags($string);
}
开发者ID:AtomPy,项目名称:AtomPySite,代码行数:31,代码来源:about.php


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