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


PHP get_edit_user_link函数代码示例

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


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

示例1: getUserListing

function getUserListing($curuser)
{
    $html = '<div class="uyd-user ' . ($curuser->ID === 'GUEST' ? 'guest' : '') . '">';
    /* Gravatar */
    if (function_exists('get_wp_user_avatar')) {
        $display_gravatar = get_wp_user_avatar($curuser->user_email, 32);
    } else {
        $display_gravatar = get_avatar($curuser->user_email, 32);
        if ($display_gravatar === false) {
            //Gravatar is disabled, show default image.
            $display_gravatar = '<img src="' . USEYOURDRIVE_ROOTPATH . '/css/images/usericon.png"/>';
        }
    }
    $html .= "<div class=\"uyd-avatar\"><a title=\"{$curuser->display_name}\">{$display_gravatar}</a></div>\n";
    $html .= "<div class=\"uyd-userinfo\" data-userid=\"" . $curuser->ID . "\">";
    /* name */
    $html .= "<div class=\"uyd-name\"><a href=\"" . ($curuser->ID === 'GUEST' ? '#' : get_edit_user_link($curuser->ID)) . "\"title=\"{$curuser->display_name}\">{$curuser->display_name}</a></div>\n";
    /* Current link */
    if ($curuser->ID === 'GUEST') {
        $curfolder = get_site_option('use_your_drive_guestlinkedto');
    } else {
        $curfolder = get_user_option('use_your_drive_linkedto', $curuser->ID);
    }
    $nolink = true;
    if (empty($curfolder) || !is_array($curfolder) || !isset($curfolder['foldertext'])) {
        $curfolder = __('Not yet linked to a folder', 'useyourdrive');
    } else {
        $curfolder = $curfolder['foldertext'];
        $nolink = false;
    }
    $html .= "<div class=\"uyd-linkedto\">{$curfolder}</div>\n";
    $html .= "<input class='uyd-linkbutton button-primary' type='submit' title='" . __('Link to folder', 'useyourdrive') . "' value='" . __('Link to folder', 'useyourdrive') . "'>";
    $html .= "<input class='uyd-unlinkbutton button-secondary " . ($nolink ? 'disabled' : '') . "' type='submit' title='" . __('Remove link', 'useyourdrive') . "' value='" . __('Remove link', 'useyourdrive') . "'>";
    $html .= "</div>";
    $html .= '</div>';
    return $html;
}
开发者ID:kd5ytx,项目名称:Empirical-Wordpress,代码行数:37,代码来源:UseyourDrive_LinkUsers.php

示例2: ajax_get_customers_per_period

 public function ajax_get_customers_per_period()
 {
     $customers_num = isset($_POST['product_num']) ? $_POST['product_num'] : 10;
     $start_date = isset($_POST['start_date']) ? $_POST['start_date'] : null;
     $end_date = isset($_POST['end_date']) ? $_POST['end_date'] : null;
     $stats = $this->get_customers_per_period($customers_num, $start_date, $end_date);
     //wcds_var_dump($stats);
     /* Format:
     			array(2) {
     			  [0]=>
     			  array(4) {
     				["order_total"]=>
     				string(4) "15.6"
     				["order_num"]=>
     				string(1) "2"
     				["name"]=>
     				string(8) "Domenico"
     				["last_name"]=>
     				string(6) "Lagudi"
     				["customer_id"] =>
     				int 1234123
     			  }
     			  */
     foreach ($stats as $index => $customer) {
         $stats[$index]['total_spent'] = round($customer['total_spent'], 2);
         $stats[$index]['permalink'] = $customer['customer_id'] > 0 ? get_edit_user_link($customer['customer_id']) : 'none';
     }
     echo json_encode($stats);
     wp_die();
 }
开发者ID:bear12345678,项目名称:keylessoption,代码行数:30,代码来源:WCDS_Customer.php

示例3: get_wp_login_form

        protected function get_wp_login_form($args = array())
        {
            $defaults = array('echo' => false, 'redirect' => (is_ssl() ? 'https://' : 'http://') . $_SERVER['HTTP_HOST'] . $_SERVER['REQUEST_URI'], 'form_id' => 'loginform', 'label_username' => _x('Username', 'shortcode simple login', 'the7mk2'), 'label_password' => _x('Password', 'shortcode simple login', 'the7mk2'), 'label_remember' => _x('Remember Me', 'shortcode simple login', 'the7mk2'), 'label_log_in' => _x('Log In', 'shortcode simple login', 'the7mk2'), 'id_username' => 'user_login', 'id_password' => 'user_pass', 'id_remember' => 'rememberme', 'id_submit' => 'wp-submit', 'remember' => true, 'value_username' => '', 'value_remember' => false);
            $args = wp_parse_args($args, apply_filters('login_form_defaults', $defaults));
            if (is_user_logged_in()) {
                global $user_identity;
                get_currentuserinfo();
                $form = '<p class="logged-in-as">' . sprintf(_x('Logged in as <a href="%1$s">%2$s</a>. <a href="%3$s" title="Log out of this account">Log out?</a>', 'shortcode simple login', 'the7mk2'), get_edit_user_link(), $user_identity, wp_logout_url(apply_filters('the_permalink', get_permalink()))) . '</p>';
            } else {
                $login_form_top = apply_filters('login_form_top', '', $args);
                $login_form_middle = apply_filters('login_form_middle', '', $args);
                $login_form_bottom = apply_filters('login_form_bottom', '', $args);
                $form = '
					<form name="' . $args['form_id'] . '" id="' . $args['form_id'] . '" action="' . esc_url(site_url('wp-login.php', 'login_post')) . '" method="post">
						' . $login_form_top . '
						<p class="login-username">
							<label class="assistive-text" for="' . esc_attr($args['id_username']) . '">' . esc_html($args['label_username']) . '</label>
							<input type="text" name="log" placeholder="' . esc_attr($args['label_username']) . '" id="' . esc_attr($args['id_username']) . '" class="input" value="' . esc_attr($args['value_username']) . '" size="20" />
						</p>
						<p class="login-password">
							<label class="assistive-text" for="' . esc_attr($args['id_password']) . '">' . esc_html($args['label_password']) . '</label>
							<input type="password" name="pwd" placeholder="' . esc_attr($args['label_password']) . '" id="' . esc_attr($args['id_password']) . '" class="input" value="" size="20" />
						</p>
						' . $login_form_middle . '
						' . ($args['remember'] ? '<p class="login-remember"><label><input name="rememberme" type="checkbox" id="' . esc_attr($args['id_remember']) . '" value="forever"' . ($args['value_remember'] ? ' checked="checked"' : '') . ' /> ' . esc_html($args['label_remember']) . '</label></p>' : '') . '
						<p class="login-submit">
							<input type="submit" name="wp-submit" id="' . esc_attr($args['id_submit']) . '" class="button-primary" value="' . esc_attr($args['label_log_in']) . '" />
							<input type="hidden" name="redirect_to" value="' . esc_url($args['redirect']) . '" />
						</p>
						' . $login_form_bottom . '
					</form>';
            }
            return $form;
        }
开发者ID:10asfar,项目名称:WordPress-the7-theme-demo-,代码行数:34,代码来源:simple-login.php

示例4: sumobi_edd_customer_details_username

function sumobi_edd_customer_details_username($payment_id)
{
    $user_info = edd_get_payment_meta_user_info($payment_id);
    $customer_id = $user_info['id'];
    if (!$customer_id) {
        return;
    }
    $user_data = get_userdata($customer_id);
    $user_name = $user_data->user_login;
    ?>
	<div class="column-container" style="margin-top: 20px;">
		<div class="column">
			<strong><?php 
    _e('Username:', 'edd');
    ?>
</strong><br />
			<a href="<?php 
    echo get_edit_user_link($customer_id);
    ?>
"><?php 
    echo $user_name;
    ?>
</a>
		</div>
	</div>
	<?php 
}
开发者ID:mintplugins,项目名称:library,代码行数:27,代码来源:add-username-to-customer-details.php

示例5: ellak_social_links

function ellak_social_links()
{
    ?>
	<div class="header-login">
				<?php 
    if (is_user_logged_in()) {
        ?>
				<a href="<?php 
        echo esc_url(get_edit_user_link());
        ?>
"><?php 
        _e('Ο λογαριασμός μου', 'gpchild-ellak');
        ?>
</a>
				<a href="<?php 
        echo esc_url(wp_logout_url(get_permalink()));
        ?>
"><?php 
        _e('Αποσύνδεση', 'gpchild-ellak');
        ?>
</a>

				<?php 
    } else {
        if (get_option('users_can_register')) {
            ?>
				<a href="<?php 
            echo esc_url(wp_registration_url());
            ?>
"><?php 
            _e('Εγγραφή', 'gpchild-ellak');
            ?>
</a>
				<?php 
        }
        // get_option
        ?>

				<a href="<?php 
        echo esc_url(wp_login_url());
        ?>
"><?php 
        _e('Συνδεση', 'gpchild-ellak');
        ?>
</a>

				<?php 
    }
    // is_user_logged_in
    ?>
			</div>
	<div class="header-social-links">
		<ul class="social-links">
			<li class="social-link-facebook"><a href="https://www.facebook.com/CreativeCommonsGreece" target="_blank"><span>Facebook</span></a></li>
			<li class="social-link-twitter"><a href="https://www.twitter.com/cc_greece" target="_blank"><span>Twitter</span></a></li>
			<li class="social-link-rss"><a href="https://ellak.gr/rss-feeds/" target="_blank"><span>RSS</span></a></li>
		</ul>
	</div><!-- .header-social-links -->
<?php 
}
开发者ID:eellak,项目名称:gpchild-ellak-CC,代码行数:60,代码来源:functions.php

示例6: column_default

 /**
  * Get column content, this is called once per column, per row item ($order)
  * returns the content to be rendered within that cell.
  *
  * @see WP_List_Table::single_row_columns()
  * @since 1.0
  * @param object $log_entry one row (item) in the table
  * @param string $column_name the column slug
  * @return string the column content
  */
 public function column_default($log_entry, $column_name)
 {
     switch ($column_name) {
         case 'customer':
             $customer_email = null;
             if ($log_entry->user_id) {
                 $customer_email = get_user_meta($log_entry->user_id, 'billing_email', true);
             }
             if ($customer_email) {
                 $column_content = sprintf('<a href="%s">%s</a>', get_edit_user_link($log_entry->user_id), $customer_email);
             } else {
                 $user = get_user_by('id', $log_entry->user_id);
                 $column_content = sprintf('<a href="%s">%s</a>', get_edit_user_link($log_entry->user_id), $user ? $user->user_login : __('Unknown', 'wc_points_rewards'));
             }
             break;
         case 'points':
             // add a '+' sign when needed
             $column_content = ($log_entry->points > 0 ? '+' : '') . $log_entry->points;
             break;
         case 'event':
             $column_content = $log_entry->description;
             break;
         case 'date':
             $column_content = '<abbr title="' . esc_attr($log_entry->date_display) . '">' . esc_html($log_entry->date_display_human) . '</abbr>';
             break;
         default:
             $column_content = '';
             break;
     }
     return $column_content;
 }
开发者ID:chhavinav,项目名称:fr.ilovejuice,代码行数:41,代码来源:class-wc-points-rewards-points-log-list-table.php

示例7: wphacks_edit_user_profile_add_banned_option

function wphacks_edit_user_profile_add_banned_option($profile_user)
{
    ?>
<table class="form-table">
	<tr class="wphacks-user-banned">
		<th scope="row"><label><?php 
    echo __('Banned?', 'wphacks');
    ?>
</label></th>
		<td>
		<?php 
    $banned = get_user_meta($profile_user->ID, '_wphacks_banned', true);
    $banning_user = get_user_meta($profile_user->ID, '_wphacks_banned_by', true);
    ?>
		<input type="checkbox" name="_wphacks_banned" <?php 
    checked(1, $banned, true);
    ?>
 value="1"?> <?php 
    echo $banned ? '<p>Banned on ' . date('r', get_user_meta($profile_user->ID, '_wphacks_banned_timestamp', true)) . (get_user_by('id', $banning_user) ? ' by <a href="' . get_edit_user_link($banning_user) . '">' . get_user_by('id', $banning_user)->display_name . '</a>' : '') . '</p>' : '';
    ?>
		<p class="description">If checked, the user will be unable to log in.</p>
		</td>
	</tr>
</table>
<?php 
}
开发者ID:WP-Hacks,项目名称:ban-user,代码行数:26,代码来源:wphacks-ban-user.php

示例8: admin_notices

    /**
     * Displays an admin notice when backup codes have run out.
     *
     * @since 0.1-dev
     */
    public function admin_notices()
    {
        $user = wp_get_current_user();
        // Return if the provider is not enabled.
        if (!in_array(__CLASS__, Two_Factor_Core::get_enabled_providers_for_user($user->ID))) {
            return;
        }
        // Return if we are not out of codes.
        if ($this->is_available_for_user($user)) {
            return;
        }
        ?>
		<div class="error">
			<p>
				<span><?php 
        esc_html_e('Two-Factor: You are out of backup codes and need to ');
        ?>
<span>
				<a href="<?php 
        echo esc_url(get_edit_user_link($user->ID) . '#two-factor-backup-codes');
        ?>
"><?php 
        esc_html_e('regenerate!');
        ?>
</a>
			</p>
		</div>
		<?php 
    }
开发者ID:aaroncampbell,项目名称:two-factor,代码行数:34,代码来源:class.two-factor-backup-codes.php

示例9: getUserLink

 public static function getUserLink($customer)
 {
     if ($customer instanceof Guest) {
         return $customer->getName();
     }
     return sprintf('<a href="%s">%s</a>', get_edit_user_link($customer->getId()), $customer->getName());
 }
开发者ID:jigoshop,项目名称:Jigoshop2,代码行数:7,代码来源:Order.php

示例10: change_link_to_admin

 public function change_link_to_admin($link, $item)
 {
     $cpt = rtbiz_get_contact_post_type();
     if ($cpt == get_current_screen()->post_type && $cpt . '_to_user' === $item->p2p_type && current_user_can('edit_users')) {
         return get_edit_user_link($item->ID);
     }
     return $link;
 }
开发者ID:chandra-patel,项目名称:rtbiz,代码行数:8,代码来源:class-rtbiz-p2p.php

示例11: action_links

 /**
  * Add action links to Stream drop row in admin list screen
  *
  * @filter wp_stream_action_links_{connector}
  *
  * @param array $links   Previous links registered
  * @param Record $record Stream record
  *
  * @return array Action links
  */
 public function action_links($links, $record)
 {
     if ($record->object_id) {
         if ($link = get_edit_user_link($record->object_id)) {
             $links[esc_html__('Edit User', 'stream')] = $link;
         }
     }
     return $links;
 }
开发者ID:evgenykireev,项目名称:stream,代码行数:19,代码来源:class-connector-users.php

示例12: action_links

 public static function action_links($links, $record)
 {
     if ($record->object_id) {
         if ($link = get_edit_user_link($record->object_id)) {
             $links[__('Edit User', 'default')] = $link;
         }
     }
     return $links;
 }
开发者ID:HasClass0,项目名称:mainwp-child-reports,代码行数:9,代码来源:users.php

示例13: edit

 function edit($id)
 {
     if (is_object($id)) {
         $id = $id->id;
     }
     // redirect to WP admin user edit
     $link = get_edit_user_link($id);
     $this->redirect($link);
     exit;
 }
开发者ID:RCMmedia,项目名称:rubicon,代码行数:10,代码来源:users.php

示例14: upme_wpmember_validate_profile_visibility

function upme_wpmember_validate_profile_visibility($params)
{
    $args = $params;
    extract($args);
    if (!upme_validate_wpmember()) {
        return $params;
    }
    if ('INACTIVE' == get_user_meta($user_id, 'upme_wpmember_profile_status', true) && !user_can($user_id, 'manage_options')) {
        $params['status'] = false;
        $params['info'] = __('Please purchase a package to continue. Click ', 'upme') . '<a href="' . get_edit_user_link($user_id) . '">' . __('Here', 'upme') . '</a>';
    }
    return $params;
}
开发者ID:nikwin333,项目名称:pcu_project,代码行数:13,代码来源:wpmember.php

示例15: admin_page_cpfs_print_user

    function admin_page_cpfs_print_user($user_id)
    {
        $userinfo = get_userdata($user_id);
        ?>
        <a href="<?php 
        echo get_edit_user_link($user_id);
        ?>
"><?php 
        echo $userinfo->user_email;
        ?>
</a>
        <?php 
    }
开发者ID:CoordCulturaDigital-Minc,项目名称:eleicoescnpc,代码行数:13,代码来源:admin-cpfs-cnpjs.php


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