Пример #1
0
<?php do_action( 'bp_before_profile_loop_content' ) ?>

<?php if ( function_exists('xprofile_get_profile') ) : ?>

	<?php if ( bp_has_profile() ) : ?>

		<?php while ( bp_profile_groups() ) : bp_the_profile_group(); ?>

			<?php if ( bp_profile_group_has_fields() ) : ?>

				<?php do_action( 'bp_before_profile_field_content' ) ?>

				<div class="bp-widget <?php bp_the_profile_group_slug() ?>">
					<?php if ( 1 != bp_get_the_profile_group_id() ) : ?>
						<h4><?php bp_the_profile_group_name() ?></h4>
					<?php endif; ?>

					<table class="profile-fields zebra">
						<?php while ( bp_profile_fields() ) : bp_the_profile_field(); ?>

							<?php if ( bp_field_has_data() ) : ?>
								<tr<?php bp_field_css_class() ?>>

									<td class="label">
										<?php bp_the_profile_field_name() ?>
									</td>

									<td class="data">
										<?php bp_the_profile_field_value() ?>
									</td>
Пример #2
0
    while (bp_profile_groups()) {
        bp_the_profile_group();
        ?>

			<?php 
        if (bp_profile_fields()) {
            ?>

				<table class="profile-settings" id="xprofile-settings-<?php 
            bp_the_profile_group_slug();
            ?>
">
					<thead>
						<tr>
							<th class="title field-group-name"><?php 
            bp_the_profile_group_name();
            ?>
</th>
							<th class="title"><?php 
            _e('Visibility', 'buddypress');
            ?>
</th>
						</tr>
					</thead>

					<tbody>

						<?php 
            while (bp_profile_fields()) {
                bp_the_profile_field();
                ?>
Пример #3
0
function bp_gameful_admin_eggs()
{
    global $bp;
    /* If the form has been submitted and the admin referrer checks out, save the settings */
    if (isset($_POST['submit']) && check_admin_referer('bp-gameful-settings')) {
        foreach ((array) $_POST['bp-gameful-role-points'] as $key => $value) {
            $options[$key] = $value;
        }
        update_option('bp-gameful-role-points', $options);
        $updated = true;
    }
    $options = get_option('bp-gameful-role-points');
    ?>
	<div class="wrap">
		<h2><?php 
    _e('Easter Eggs', 'bp-gameful');
    ?>
</h2>
		<br />

		<?php 
    if (isset($updated)) {
        echo "<div id='message' class='updated fade'><p>" . __('Settings Updated.', 'bp-gameful') . "</p></div>";
    }
    ?>

		<form action="<?php 
    echo site_url() . '/wp-admin/admin.php?page=bp-gameful-settings';
    ?>
" name="gameful-settings-form" id="gameful-settings-form" method="post">
                    <div class="'bp-widget">
			<table class="widefat field-group">
                            <thead>
                                <tr>
                                    <th scope="col" colspan="3"><?php 
    bp_the_profile_group_name();
    ?>
</th>
                                </tr>
                                    <tr class="header">
                                    <td><?php 
    _e('Role', 'bp-gameful');
    ?>
</td>
                                    <td width="80%"><?php 
    _e('Points', 'bp-gameful');
    ?>
</td>
                                </tr>
                            </thead>
                            <tbody id="the-list">
                                <tr>
                                    <td>Gameful Beginner</td>
                                    <td>
                                        <input type="text" name="bp-gameful-role-points[gf_beginner]"
                                            id="bp-gameful-role-points[gf_beginner]" size='3' value="<?php 
    echo $options['gf_beginner'];
    ?>
" />
                                    </td>
                                </tr>
                                <tr>
                                    <td>Gameful Contributor</td>
                                    <td>
                                        <input type="text" name="bp-gameful-role-points[gf_contributer]"
                                            id="bp-gameful-role-points[gf_contributer]" size='3' value="<?php 
    echo $options['gf_contributer'];
    ?>
" />
                                    </td>
                                </tr>
                                <tr>
                                    <td>Board Member</td>
                                    <td>
                                        <input type="text" name="bp-gameful-role-points[gf_boardmember]"
                                            id="bp-gameful-role-points[gf_boardmember]" size='3' value="<?php 
    echo $options['gf_boardmember'];
    ?>
" />
                                    </td>
                                </tr>
                            </tbody>
                        </table>
                    </div>
			<div class="submit">
				<input type="submit" name="submit" value="<?php 
    _e('Save Settings', 'bp-gameful');
    ?>
"/>
			</div>

			<?php 
    /* This is very important, don't leave it out. */
    wp_nonce_field('bp-gameful-settings');
    ?>
		</form>
	</div>
<?php 
}