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

PHP bp_get_admin_url函数代码示例

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

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



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

示例1: bp_checkins_needs_activity

function bp_checkins_needs_activity()
{
    if (!bp_is_active('activity')) {
        $buddy_settings_page = bp_core_do_network_admin() ? 'settings.php' : 'options-general.php';
        ?>
		<div id="message" class="updated">
			<p><?php 
        printf(__('If you want to use BP Checkins, you need to activate the Activity Stream BuddyPress component, to do so, please activate it in <a href="%s">BuddyPress settings</a>', 'bp-checkins'), bp_get_admin_url(add_query_arg(array('page' => 'bp-components'), $buddy_settings_page)));
        ?>
</p>
		</div>
		<?php 
    }
}
开发者ID:socialray,项目名称:surfied-2-0,代码行数:14,代码来源:bp-checkins.php


示例2: bp_activity_admin_menu

/**
 * Add the Activity top-level menu link when viewing single activity item.
 *
 * @since 2.6.0
 *
 * @return null Null if user does not have access to editing functionality.
 */
function bp_activity_admin_menu()
{
    global $wp_admin_bar;
    // Only show if viewing a single activity item.
    if (!bp_is_single_activity()) {
        return;
    }
    // Only show this menu to super admins
    if (!bp_current_user_can('bp_moderate')) {
        return;
    }
    $activity_edit_link = add_query_arg(array('page' => 'bp-activity', 'aid' => bp_current_action(), 'action' => 'edit'), bp_get_admin_url('admin.php'));
    // Add the top-level Edit Activity button.
    $wp_admin_bar->add_menu(array('id' => 'activity-admin', 'title' => __('Edit Activity', 'buddypress'), 'href' => esc_url($activity_edit_link)));
}
开发者ID:CompositeUK,项目名称:clone.BuddyPress,代码行数:22,代码来源:bp-activity-adminbar.php


示例3: is_unique

 /**
  * Make sure only one Field will hold the member type
  *
  * We also use this function to intercept the Member types descriptions
  * when the field is the one to manage the member types
  *
  * @since 1.0.1
  */
 public function is_unique()
 {
     if (!function_exists('get_current_screen')) {
         return;
     }
     // Get current screen
     $current_screen = get_current_screen();
     if (empty($current_screen->id)) {
         return;
     }
     // Check we're on a profile page
     if (false === strpos($current_screen->id, 'users_page_bp-profile-setup')) {
         return;
     }
     // Check we're saving a member type field
     if (!isset($_POST['saveField']) || isset($_POST['fieldtype']) && 'member_type' !== $_POST['fieldtype']) {
         return;
     }
     // Get the allowed field id
     $saved_option = (int) bp_get_option('cfbgr_xfield_id', 0);
     if (!empty($saved_option)) {
         if (!empty($_GET['field_id']) && $saved_option === (int) $_GET['field_id']) {
             // We're saving description for the member type, let's append this to the field
             // this will be usefull to set the option descriptions as BuddyPress is always
             // deleting options (???) when a file is edited to recreate them later (???)
             if (!empty($_POST['_cfbgr_option_description']) && is_array($_POST['_cfbgr_option_description'])) {
                 $this->descriptions = $_POST['_cfbgr_option_description'];
                 foreach ($this->descriptions as $key => $desc) {
                     if (empty($desc)) {
                         unset($this->descriptions[$key]);
                     }
                 }
             }
             return;
         }
         wp_die(sprintf(__('Only one field can hold the member type. <a href="%s">Please choose another field type</a>', 'buddypress-group-restrictions'), add_query_arg('page', 'bp-profile-setup', bp_get_admin_url('users.php'))));
     }
 }
开发者ID:WeFoster,项目名称:buddypress-group-restrictions,代码行数:46,代码来源:field.php


示例4: signups_admin_manage

        /**
         * This is the confirmation screen for actions.
         *
         * @since 2.0.0
         *
         * @param string $action Delete, activate, or resend activation link.
         *
         * @return string
         */
        public function signups_admin_manage($action = '')
        {
            if (!current_user_can($this->capability) || empty($action)) {
                die('-1');
            }
            // Get the user IDs from the URL.
            $ids = false;
            if (!empty($_POST['allsignups'])) {
                $ids = wp_parse_id_list($_POST['allsignups']);
            } elseif (!empty($_GET['signup_id'])) {
                $ids = absint($_GET['signup_id']);
            }
            if (empty($ids)) {
                return false;
            }
            // Query for signups, and filter out those IDs that don't
            // correspond to an actual signup.
            $signups_query = BP_Signup::get(array('include' => $ids));
            $signups = $signups_query['signups'];
            $signup_ids = wp_list_pluck($signups, 'signup_id');
            // Set up strings.
            switch ($action) {
                case 'delete':
                    $header_text = __('Delete Pending Accounts', 'buddypress');
                    if (1 == count($signup_ids)) {
                        $helper_text = __('You are about to delete the following account:', 'buddypress');
                    } else {
                        $helper_text = __('You are about to delete the following accounts:', 'buddypress');
                    }
                    break;
                case 'activate':
                    $header_text = __('Activate Pending Accounts', 'buddypress');
                    if (1 == count($signup_ids)) {
                        $helper_text = __('You are about to activate the following account:', 'buddypress');
                    } else {
                        $helper_text = __('You are about to activate the following accounts:', 'buddypress');
                    }
                    break;
                case 'resend':
                    $header_text = __('Resend Activation Emails', 'buddypress');
                    if (1 == count($signup_ids)) {
                        $helper_text = __('You are about to resend an activation email to the following account:', 'buddypress');
                    } else {
                        $helper_text = __('You are about to resend an activation email to the following accounts:', 'buddypress');
                    }
                    break;
            }
            // These arguments are added to all URLs.
            $url_args = array('page' => 'bp-signups');
            // These arguments are only added when performing an action.
            $action_args = array('action' => 'do_' . $action, 'signup_ids' => implode(',', $signup_ids));
            if (is_network_admin()) {
                $base_url = network_admin_url('users.php');
            } else {
                $base_url = bp_get_admin_url('users.php');
            }
            $cancel_url = add_query_arg($url_args, $base_url);
            $action_url = wp_nonce_url(add_query_arg(array_merge($url_args, $action_args), $base_url), 'signups_' . $action);
            ?>

		<div class="wrap">
			<h1><?php 
            echo esc_html($header_text);
            ?>
</h1>
			<p><?php 
            echo esc_html($helper_text);
            ?>
</p>

			<ol class="bp-signups-list">
			<?php 
            foreach ($signups as $signup) {
                $last_notified = mysql2date('Y/m/d g:i:s a', $signup->date_sent);
                ?>

				<li>
					<?php 
                echo esc_html($signup->user_name);
                ?>
 - <?php 
                echo sanitize_email($signup->user_email);
                ?>

					<?php 
                if ('resend' == $action) {
                    ?>

						<p class="description">
							<?php 
                    printf(esc_html__('Last notified: %s', 'buddypress'), $last_notified);
//.........这里部分代码省略.........
开发者ID:buddypress,项目名称:BuddyPress-build,代码行数:101,代码来源:class-bp-members-admin.php


示例5: column_response

 /**
  * "In response to" column markup.
  *
  * @since BuddyPress (1.6.0)
  *
  * @see WP_List_Table::single_row_columns()
  *
  * @param array $item A singular item (one full row).
  */
 function column_response($item)
 {
     // Is $item is a root activity?
     /**
      * Filters default list of default root activity types.
      *
      * @since BuddyPress (1.6.0)
      *
      * @param array $value Array of default activity types.
      * @param array $item  Current item being displayed.
      */
     if (empty($item['item_id']) || !in_array($item['type'], apply_filters('bp_activity_admin_root_activity_types', array('activity_comment'), $item))) {
         $comment_count = !empty($item['children']) ? bp_activity_recurse_comment_count((object) $item) : 0;
         $root_activity_url = bp_get_admin_url('admin.php?page=bp-activity&amp;aid=' . $item['id']);
         // If the activity has comments, display a link to the activity's permalink, with its comment count in a speech bubble
         if ($comment_count) {
             $title_attr = sprintf(_n('%s related activity', '%s related activities', $comment_count, 'buddypress'), number_format_i18n($comment_count));
             printf('<a href="%1$s" title="%2$s" class="post-com-count"><span class="comment-count">%3$s</span></a>', esc_url($root_activity_url), esc_attr($title_attr), number_format_i18n($comment_count));
         }
         // For non-root activities, display a link to the replied-to activity's author's profile
     } else {
         echo '<strong>' . get_avatar($this->get_activity_user_id($item['item_id']), '32') . ' ' . bp_core_get_userlink($this->get_activity_user_id($item['item_id'])) . '</strong><br />';
     }
     // Activity permalink
     if (!$item['is_spam']) {
         printf(__('<a href="%1$s">View Activity</a>', 'buddypress'), bp_activity_get_permalink($item['id'], (object) $item));
     }
 }
开发者ID:un1coin,项目名称:ovn-space,代码行数:37,代码来源:bp-activity-admin.php


示例6: bp_admin_url

/**
 * Output the correct admin URL based on BuddyPress and WordPress configuration.
 *
 * @since BuddyPress (1.5.0)
 *
 * @see bp_get_admin_url() For description of parameters.
 *
 * @param string $path See {@link bp_get_admin_url()}.
 * @param string $scheme See {@link bp_get_admin_url()}.
 */
function bp_admin_url($path = '', $scheme = 'admin')
{
    echo bp_get_admin_url($path, $scheme);
}
开发者ID:antares-ff,项目名称:ANTARES-Test,代码行数:14,代码来源:bp-core-functions.php


示例7: bp_forums_bbpress_install_wizard

function bp_forums_bbpress_install_wizard()
{
    $post_url = bp_get_admin_url('admin.php?page=bb-forums-setup');
    $bbpress_plugin_is_active = false;
    $step = isset($_REQUEST['step']) ? $_REQUEST['step'] : '';
    // The text and URL of the Site Wide Forums button differs depending on whether bbPress
    // is running
    if (is_plugin_active('bbpress/bbpress.php')) {
        $bbpress_plugin_is_active = true;
        // The bbPress admin page will always be on the root blog. switch_to_blog() will
        // pass through if we're already there.
        switch_to_blog(bp_get_root_blog_id());
        $button_url = admin_url(add_query_arg(array('page' => 'bbpress'), 'options-general.php'));
        restore_current_blog();
        $button_text = __('Configure bbPress', 'buddypress');
    } else {
        $button_url = bp_get_admin_url(add_query_arg(array('tab' => 'plugin-information', 'plugin' => 'bbpress', 'TB_iframe' => 'true', 'width' => '640', 'height' => '500'), 'plugin-install.php'));
        $button_text = __('Install bbPress', 'buddypress');
    }
    switch ($step) {
        case 'existing':
            if (isset($_REQUEST['doinstall']) && 1 == (int) $_REQUEST['doinstall']) {
                if (!bp_forums_configure_existing_install()) {
                    _e('The bb-config.php file was not found at that location, please try again.', 'buddypress');
                } else {
                    ?>
					<h3><?php 
                    _e('Forums were set up correctly using your existing bbPress install!', 'buddypress');
                    ?>
</h3>
					<p><?php 
                    _e('BuddyPress will now use its internal copy of bbPress to run the forums on your site. If you wish, you can remove your old bbPress installation files, as long as you keep the bb-config.php file in the same location.', 'buddypress');
                    ?>
</p><?php 
                }
            } else {
                ?>

					<form action="" method="post">
						<h3><?php 
                _e('Existing bbPress Installation', 'buddypress');
                ?>
</h3>
						<p><?php 
                _e("BuddyPress can make use of your existing bbPress install. Just provide the location of your <code>bb-config.php</code> file, and BuddyPress will do the rest.", 'buddypress');
                ?>
</p>
						<p><label><code>bb-config.php</code> file location:</label><br /><input style="width: 50%" type="text" name="bbconfigloc" id="bbconfigloc" value="<?php 
                echo str_replace('buddypress', '', $_SERVER['DOCUMENT_ROOT']);
                ?>
" /></p>
						<p><input type="submit" class="button-primary" value="<?php 
                _e('Complete Installation', 'buddypress');
                ?>
" /></p>
						<input type="hidden" name="step" value="existing" />
						<input type="hidden" name="doinstall" value="1" />
						<?php 
                wp_nonce_field('bp_forums_existing_install_init');
                ?>
					</form>

				<?php 
            }
            break;
        case 'new':
            if (isset($_REQUEST['doinstall']) && 1 == (int) $_REQUEST['doinstall']) {
                $result = bp_forums_bbpress_install();
                switch ($result) {
                    case 1:
                        _e('<p>All done! Configuration settings have been saved to the file <code>bb-config.php</code> in the root of your WordPress install.</p>', 'buddypress');
                        break;
                    default:
                        // Just write the contents to screen
                        _e('<p>A configuration file could not be created. No problem, but you will need to save the text shown below into a file named <code>bb-config.php</code> in the root directory of your WordPress installation before you can start using the forum functionality.</p>', 'buddypress');
                        ?>

						<textarea style="display:block; margin-top: 30px; width: 80%;" rows="50"><?php 
                        echo htmlspecialchars($result);
                        ?>
</textarea>

					<?php 
                        break;
                }
            } else {
                ?>

				<h3><?php 
                _e('New bbPress Installation', 'buddypress');
                ?>
</h3>
				<p><?php 
                _e("You've decided to set up a new installation of bbPress for forum management in BuddyPress. This is very simple and is usually just a one click\n\t\t\t\tprocess. When you're ready, hit the link below.", 'buddypress');
                ?>
</p>
				<p><a class="button-primary" href="<?php 
                echo wp_nonce_url($post_url . '&step=new&doinstall=1', 'bp_forums_new_install_init');
                ?>
"><?php 
//.........这里部分代码省略.........
开发者ID:pyropictures,项目名称:wordpress-plugins,代码行数:101,代码来源:1.6.php


示例8: bp_checkins_settings_admin


//.........这里部分代码省略.........
 id="bp-checkins-activate-component-yes" value="0" /> <?php 
            _e('Yes', 'bp-checkins');
            ?>
 &nbsp;
									<input type="radio" name="bpci-admin[bp-checkins-activate-component]"<?php 
            if ((int) bp_get_option('bp-checkins-activate-component')) {
                ?>
 checked="checked"<?php 
            }
            ?>
 id="bp-checkins-activate-component-no" value="1" /> <?php 
            _e('No', 'bp-checkins');
            ?>
								</td>
							</tr>
						</tbody>
					</table>
					
				<?php 
        }
        ?>
			
			<?php 
    } elseif ($_GET['tab'] == 'foursquare') {
        ?>
				
				<?php 
        if (!bp_is_active('settings')) {
            ?>
					
					<div id="message" class="updated">
						<p>
							<?php 
            printf(__('If you want to use this feature, you need to activate the Account Settings BuddyPress component, to do so, please activate it in <a href="%s">BuddyPress settings</a>', 'bp-checkins'), bp_get_admin_url(add_query_arg(array('page' => 'bp-components'), $buddy_settings_page)));
            ?>
						</p>
					</div>
				
				<?php 
        } elseif (!(int) bp_get_option('bp-checkins-activate-component') || '' == bp_get_option('bp-checkins-activate-component')) {
            ?>
					
					<p>
						<?php 
            printf(__('If you want to use this feature, you need to activate the Checkins and Places component, to do so use <a href="%s">the appropriate tab</a>', 'bp-checkins'), bp_get_admin_url(add_query_arg(array('page' => 'bp-checkins-admin', 'tab' => 'component'), $admin_page)));
            ?>
					</p>
					
				<?php 
        } else {
            ?>
					
					<h3><?php 
            _e('Foursquare credentials', 'bp-checkins');
            ?>
</h3>

					<table class="form-table">
						<tbody>
								<tr>
									<th scope="row"><?php 
            _e('Client ID', 'bp-checkins');
            ?>
</th>
									<td>
										<input type="text" name="bpci-admin[foursquare-client-id]" value="<?php 
开发者ID:socialray,项目名称:surfied-2-0,代码行数:67,代码来源:bp-checkins-admin.php


示例9: column_username

	/**
	 * The row actions (delete/activate/email).
	 *
	 * @since BuddyPress (2.0.0)
	 *
	 * @param object $signup_object The signup data object.
	 */
	public function column_username( $signup_object = null ) {
		$avatar	= get_avatar( $signup_object->user_email, 32 );

		// Activation email link
		$email_link = add_query_arg(
			array(
				'page'	    => 'bp-signups',
				'signup_id' => $signup_object->id,
				'action'    => 'resend',
			),
			bp_get_admin_url( 'users.php' )
		);

		// Activate link
		$activate_link = add_query_arg(
			array(
				'page'      => 'bp-signups',
				'signup_id' => $signup_object->id,
				'action'    => 'activate',
			),
			bp_get_admin_url( 'users.php' )
		);

		// Delete link
		$delete_link = add_query_arg(
			array(
				'page'      => 'bp-signups',
				'signup_id' => $signup_object->id,
				'action'    => 'delete',
			),
			bp_get_admin_url( 'users.php' )
		);

		echo $avatar . sprintf( '<strong><a href="%1$s" class="edit" title="%2$s">%3$s</a></strong><br/>', esc_url( $activate_link ), esc_attr__( 'Activate', 'buddypress' ), $signup_object->user_login );

		$actions = array();

		$actions['activate'] = sprintf( '<a href="%1$s">%2$s</a>', esc_url( $activate_link ), __( 'Activate', 'buddypress' ) );
		$actions['resend']   = sprintf( '<a href="%1$s">%2$s</a>', esc_url( $email_link    ), __( 'Email',    'buddypress' ) );

		if ( current_user_can( 'delete_users' ) ) {
			$actions['delete'] = sprintf( '<a href="%1$s" class="delete">%2$s</a>', esc_url( $delete_link ), __( 'Delete', 'buddypress' ) );
		}

		/** This filter is documented in bp-members/admin/bp-members-classes.php */
		$actions = apply_filters( 'bp_members_ms_signup_row_actions', $actions, $signup_object );

		echo $this->row_actions( $actions );
	}
开发者ID:pombredanne,项目名称:ArcherSys,代码行数:56,代码来源:bp-members-classes.php


示例10: column_username

 /**
  * The row actions (delete/activate/email).
  *
  * @since BuddyPress (2.0.0)
  *
  * @param object $signup_object The signup data object.
  */
 public function column_username($signup_object = null)
 {
     $avatar = get_avatar($signup_object->user_email, 32);
     // Activation email link
     $email_link = add_query_arg(array('page' => 'bp-signups', 'signup_id' => $signup_object->id, 'action' => 'resend'), bp_get_admin_url('users.php'));
     // Activate link
     $activate_link = add_query_arg(array('page' => 'bp-signups', 'signup_id' => $signup_object->id, 'action' => 'activate'), bp_get_admin_url('users.php'));
     // Delete link
     $delete_link = add_query_arg(array('page' => 'bp-signups', 'signup_id' => $signup_object->id, 'action' => 'delete'), bp_get_admin_url('users.php'));
     echo $avatar . '<strong><a href="' . esc_url($activate_link) . '" class="edit" title="' . esc_attr__('Activate', 'buddypress') . '">' . $signup_object->user_login . '</a></strong><br/>';
     $actions['activate'] = '<a href="' . esc_url($activate_link) . '">' . __('Activate', 'buddypress') . '</a>';
     $actions['resend'] = '<a href="' . esc_url($email_link) . '">' . __('Email', 'buddypress') . '</a>';
     if (current_user_can('delete_users')) {
         $actions['delete'] = '<a href="' . esc_url($delete_link) . '" class="delete">' . __('Delete', 'buddypress') . '</a>';
     }
     $actions = apply_filters('bp_members_ms_signup_row_actions', $actions, $signup_object);
     echo $this->row_actions($actions);
 }
开发者ID:danielcoats,项目名称:schoolpress,代码行数:25,代码来源:bp-members-classes.php


示例11: bp_forums_bbpress_admin

function bp_forums_bbpress_admin()
{
    global $bp;
    $action = bp_get_admin_url('admin.php?page=bb-forums-setup&reinstall=1');
    ?>

	<div class="wrap">
		<?php 
    screen_icon('buddypress');
    ?>

		<h2 class="nav-tab-wrapper"><?php 
    bp_core_admin_tabs(__('Forums', 'buddypress'));
    ?>
</h2>

		<?php 
    if (isset($_POST['submit'])) {
        ?>

			<div id="message" class="updated fade">
				<p><?php 
        _e('Settings Saved.', 'buddypress');
        ?>
</p>
			</div>

		<?php 
    }
    ?>

		<?php 
    if (isset($_REQUEST['reinstall']) || !bp_forums_is_installed_correctly()) {
        // Delete the bb-config.php location option
        bp_delete_option('bb-config-location');
        bp_forums_bbpress_install_wizard();
    } else {
        ?>

			<div style="width: 45%; float: left; margin-top: 20px;">
				<h3><?php 
        _e('(Installed)', 'buddypress');
        ?>
 <?php 
        _e('Forums for Groups', 'buddypress');
        ?>
</h3>

				<p><?php 
        _e('Give each individual group its own discussion forum. Choose this if you\'d like to keep your members\' conversations separated into distinct areas.', 'buddypress');
        ?>
</p>
				<p class="description"><?php 
        _e('You may use an existing bbPress installation if you have one.', 'buddypress');
        ?>
</p>

				<h4 style="margin-bottom: 10px;"><?php 
        _e('Features', 'buddypress');
        ?>
</h4>
				<ul class="description" style="list-style: square; margin-left: 30px;">
					<li><?php 
        _e('Group Integration', 'buddypress');
        ?>
</p></li>
					<li><?php 
        _e('Member Profile Integration', 'buddypress');
        ?>
</p></li>
					<li><?php 
        _e('Activity Stream Integration', 'buddypress');
        ?>
</p></li>
					<li><?php 
        _e('@ Mention Integration', 'buddypress');
        ?>
</p></li>
				</ul>

				<div>
					<a class="button button-primary" href="<?php 
        echo $action;
        ?>
"><?php 
        _e('Uninstall Group Forums', 'buddypress');
        ?>
</a> &nbsp;
				</div>
			</div>

			<div style="width: 45%; float: left; margin: 20px 0 20px 20px; padding: 0 20px 20px 20px; border: 1px solid #ddd; background-color: #fff;">
				<h3><?php 
        _e('New! Site Wide Forums', 'buddypress');
        ?>
</h3>
				<p><?php 
        _e('Your site will have central forums that are not isolated to any specific group. Choose this if you\'d like to have a central forum area for your members.', 'buddypress');
        ?>
</p>
//.........这里部分代码省略.........
开发者ID:hornetalcala,项目名称:trunk,代码行数:101,代码来源:bp-forums-admin.php


示例12: bp_core_admin_user_row_actions

/**
 * Add "Mark as Spam/Ham" button to user row actions.
 *
 * @since BuddyPress (2.0.0)
 *
 * @param array $actions User row action links.
 * @param object $user_object Current user information.
 * @return array $actions User row action links.
 */
function bp_core_admin_user_row_actions($actions, $user_object)
{
    if (current_user_can('edit_user', $user_object->ID) && bp_loggedin_user_id() != $user_object->ID) {
        $url = bp_get_admin_url('users.php');
        if (bp_is_user_spammer($user_object->ID)) {
            $actions['ham'] = "<a href='" . wp_nonce_url($url . "?action=ham&amp;user={$user_object->ID}", 'bp-spam-user') . "'>" . __('Not Spam', 'buddypress') . "</a>";
        } else {
            $actions['spam'] = "<a class='submitdelete' href='" . wp_nonce_url($url . "?action=spam&amp;user={$user_object->ID}", 'bp-spam-user') . "'>" . __('Mark as Spam', 'buddypress') . "</a>";
        }
    }
    return $actions;
}
开发者ID:danielcoats,项目名称:schoolpress,代码行数:21,代码来源:bp-core-functions.php


示例13: sprintf

sprintf(_e('%s Complete', 'dln-theme-skill'), '60%');
?>
</span>
                                    </div>
                                </div>
                            </li>
                            <li class="divider"></li>
                            <li><a href="<?php 
echo bp_loggedin_user_domain();
?>
"><span class="icon"><i class="ico-user-plus2"></i></span><?php 
_e('My Accounts', 'dln-theme-skill');
?>
</a></li>
                            <li><a href="<?php 
echo bp_get_admin_url('settings.php');
?>
"><span class="icon"><i class="ico-cog4"></i></span><?php 
_e('Profile Setting', 'dln-theme-skill');
?>
</a></li>
                            <li class="divider"></li>
                            <li><a href="<?php 
echo wp_logout_url();
?>
"><span class="icon"><i class="ico-exit"></i></span><?php 
_e('Sign Out', 'dln-theme-skill');
?>
</a></li>
                        </ul>
                    </li>
开发者ID:httvncoder,项目名称:151722441,代码行数:31,代码来源:header.php


示例14: admin_tab

    /**
     * Rendez-vous tab
     *
     * @package Rendez Vous
     * @subpackage Admin
     *
     * @since Rendez Vous (1.2.0)
     */
    public function admin_tab()
    {
        $class = false;
        $current_screen = get_current_screen();
        // Set the active class
        if (!empty($current_screen->id) && strpos($current_screen->id, 'rendez-vous') !== false) {
            $class = "nav-tab-active";
        }
        ?>
		<a href="<?php 
        echo esc_url(bp_get_admin_url(add_query_arg(array('page' => 'rendez-vous'), 'admin.php')));
        ?>
" class="nav-tab <?php 
        echo $class;
        ?>
" style="margin-left:-6px"><?php 
        esc_html_e('Rendez-vous', 'rendez-vous');
        ?>
</a>
		<?php 
    }
开发者ID:socialray,项目名称:surfied-2-0,代码行数:29,代码来源:rendez-vous-admin.php


示例15: buddydrive_do_activation_redirect

/**
 * Welcome screen step two
 *
 * @uses get_transient()
 * @uses delete_transient()
 * @uses wp_safe_redirect to redirect to the Welcome screen
 * @uses add_query_arg() to add some arguments to the url
 * @uses bp_get_admin_url() to build the admin url
 */
function buddydrive_do_activation_redirect()
{
    // Bail if no activation redirect
    if (!get_transient('_buddydrive_activation_redirect')) {
        return;
    }
    // Delete the redirect transient
    delete_transient('_buddydrive_activation_redirect');
    // Bail if activating from network, or bulk
    if (isset($_GET['activate-multi'])) {
        return;
    }
    $query_args = array('page' => 'buddydrive-about');
    if (get_transient('_buddydrive_is_new_install')) {
        $query_args['is_new_install'] = '1';
        delete_transient('_buddydrive_is_new_install');
    }
    // Redirect to BuddyDrive about page
    wp_safe_redirect(add_query_arg($query_args, bp_get_admin_url('index.php')));
}
开发者ID:MrVibe,项目名称:buddydrive,代码行数:29,代码来源:buddydrive-functions.php


示例16: bp_groups_admin_edit_metabox_status

/**
 * Renders the Status metabox for the Groups admin edit screen.
 *
 * @since 1.7.0
 *
 * @param object $item Information about the currently displayed group.
 */
function bp_groups_admin_edit_metabox_status($item)
{
    $base_url = add_query_arg(array('page' => 'bp-groups', 'gid' => $item->id), bp_get_admin_url('admin.php'));
    ?>

	<div id="submitcomment" class="submitbox">
		<div id="major-publishing-actions">
			<div id="delete-action">
				<a class="submitdelete deletion" href="<?php 
    echo esc_url(wp_nonce_url(add_query_arg('action', 'delete', $base_url), 'bp-groups-delete'));
    ?>
"><?php 
    _e('Delete Group', 'buddypress');
    ?>
</a>
			</div>

			<div id="publishing-action">
				<?php 
    submit_button(__('Save Changes', 'buddypress'), 'primary', 'save', false);
    ?>
			</div>
			<div class="clear"></div>
		</div><!-- #major-publishing-actions -->
	</div><!-- #submitcomment -->

<?php 
}
开发者ID:buddypress,项目名称:BuddyPress-build,代码行数:35,代码来源:bp-groups-admin.php


示例17: column_comment

 /**
  * Name column, and "quick admin" rollover actions.
  *
  * Called "comment" in the CSS so we can re-use some WP core CSS.
  *
  * @since BuddyPress (1.7.0)
  *
  * @see WP_List_Table::single_row_columns()
  *
  * @param array $item A singular item (one full row).
  */
 public function column_comment($item = array())
 {
     // Preorder items: Edit | Delete | View
     $actions = array('edit' => '', 'delete' => '', 'view' => '');
     // We need the group object for some BP functions
     $item_obj = (object) $item;
     // Build actions URLs
     $base_url = bp_get_admin_url('admin.php?page=bp-groups&amp;gid=' . $item['id']);
     $delete_url = wp_nonce_url($base_url . "&amp;action=delete", 'bp-groups-delete');
     $edit_url = $base_url . '&amp;action=edit';
     $view_url = bp_get_group_permalink($item_obj);
     $group_name = apply_filters_ref_array('bp_get_group_name', array($item['name']), $item);
     // Rollover actions
     // Edit
     $actions['edit'] = sprintf('<a href="%s">%s</a>', esc_url($edit_url), __('Edit', 'buddypress'));
     // Delete
     $actions['delete'] = sprintf('<a href="%s">%s</a>', esc_url($delete_url), __('Delete', 'buddypress'));
     // Visit
     $actions['view'] = sprintf('<a href="%s">%s</a>', esc_url($view_url), __('View', 'buddypress'));
     // Other plugins can filter which actions are shown
     $actions = apply_filters('bp_groups_admin_comment_row_actions', array_filter($actions), $item);
     // Get group name and avatar
     $avatar = '';
     if (buddypress()->avatar->show_avatars) {
         $avatar = bp_core_fetch_avatar(array('item_id' => $item['id'], 'object' => 'group', 'type' => 'thumb', 'avatar_dir' => 'group-avatars', 'alt' => sprintf(__('Group logo of %s', 'buddypress'), $group_name), 'width' => '32', 'height' => '32', 'title' => $group_name));
     }
     $content = sprintf('<strong><a href="%s">%s</a></strong>', esc_url($edit_url), $group_name);
     echo $avatar . ' ' . $content . ' ' . $this->row_actions($actions);
 }
开发者ID:antares-ff,项目名称:ANTARES-Test,代码行数:40,代码来源:bp-groups-admin.php


示例18: bp_core_admin_tabs

/**
 * Output the tabs in the admin area
 *
 * @since BuddyPress (1.5)
 * @param string $active_tab Name of the tab that is active
 */
function bp_core_admin_tabs($active_tab = '')
{
    // Declare local variables
    $tabs_html = '';
    $idle_class = 'nav-tab';
    $active_class = 'nav-tab nav-tab-active';
    // Setup core admin tabs
    $tabs = array('0' => array('href' => bp_get_admin_url(add_query_arg(array('page' => 'bp-components'), 'admin.php')), 'name' => __('Components', 'buddypress')), '1' => array('href' => bp_get_admin_url(add_query_arg(array('page' => 'bp-page-settings'), 'admin.php')), 'name' => __('Pages', 'buddypress')), '2' => array('href' => bp_get_admin_url(add_query_arg(array('page' => 'bp-settings'), 'admin.php')), 'name' => __('Settings', 'buddypress')));
    // If forums component is active, add additional tab
    if (bp_is_active('forums') && class_exists('BP_Forums_Component')) {
        // enqueue thickbox
        wp_enqueue_script('thickbox');
        wp_enqueue_style('thickbox');
        $tabs['3'] = array('href' => bp_get_admin_url(add_query_arg(array('page' => 'bb-forums-setup'), 'admin.php')), 'name' => __('Forums', 'buddypress'));
    }
    // Loop through tabs and build navigation
    foreach (array_values($tabs) as $tab_data) {
        $is_current = (bool) ($tab_data['name'] == $active_tab);
        $tab_class = $is_current ? $active_class : $idle_class;
        $tabs_html .= '<a href="' . $tab_data['href'] . '" class="' . $tab_class . '">' . $tab_data['name'] . '</a>';
    }
    // Output the tabs
    echo $tabs_html;
    // Do other fun things
    do_action('bp_admin_tabs');
}
开发者ID:pyropictures,项目名称:wordpress-plugins,代码行数:32,代码来源:bp-core-functions.php


示例19: bp_core_admin_settings_save

/**
 * Save our settings.
 *
 * @since 1.6.0
 */
function bp_core_admin_settings_save()
{
    global $wp_settings_fields;
    if (isset($_GET['page']) && 'bp-settings' == $_GET['page'] && !empty($_POST['submit'])) {
        check_admin_referer('buddypress-options');
        // Because many settings are saved with checkboxes, and thus will have no values
        // in the $_POST array when unchecked, we loop through the registered settings.
        if (isset($wp_settings_fields['buddypress'])) {
            foreach ((array) $wp_settings_fields['buddypress'] as $section => $settings) {
                foreach ($settings as $setting_name => $setting) {
                    $value = isset($_POST[$setting_name]) ? $_POST[$setting_name] : '';
                    bp_update_option($setting_name, $value);
                }
            }
        }
        // Some legacy options are not registered with the Settings API, or are reversed in the UI.
        $legacy_options = array('bp-disable-account-deletion', 'bp-disable-avatar-uploads', 'bp-disable-cover-image-uploads', 'bp-disable-group-avatar-uploads', 'bp-disable-group-cover-image-uploads', 'bp_disable_blogforum_comments', 'bp-disable-profile-sync', 'bp_restrict_group_creation', 'hide-loggedout-adminbar');
        foreach ($legacy_options as $legacy_option) {
            // Note: Each of these options is represented by its opposite in the UI
            // Ie, the Profile Syncing option reads "Enable Sync", so when it's checked,
            // the corresponding option should be unset.
            $value = isset($_POST[$legacy_option]) ? '' : 1;
            bp_update_option($legacy_option, $value);
        }
        bp_core_redirect(add_query_arg(array('page' => 'bp-settings', 'updated' => 'true'), bp_get_admin_url('admin.php')));
    }
}
开发者ID:swissspidy,项目名称:BuddyPress,代码行数:32,代码来源:bp-core-admin-settings.php


示例20: bp_activity_admin_edit


//.........这里部分代码省略.........
    ?>
</h1>

		<?php 
    if (!empty($activity)) {
        ?>

			<form action="<?php 
        echo esc_url($form_url);
        ?>
" id="bp-activities-edit-form" method="post">
				<div id="poststuff">

					<div id="post-body" class="metabox-holder columns-<?php 
        echo 1 == get_current_screen()->get_columns() ? '1' : '2';
        ?>
">
						<div id="post-body-content">
							<div id="postdiv">
								<div id="bp_activity_action" class="postbox">
									<h2><?php 
        _e('Action', 'buddypress');
        ?>
</h2>
									<div clas 

鲜花

握手

雷人

路过

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

请发表评论

全部评论

专题导读
上一篇:
PHP bp_get_avatar_admin_step函数代码示例发布时间:2022-05-24
下一篇:
PHP bp_get_activity_user_id函数代码示例发布时间:2022-05-24
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap