Skip to:
Content
Pages
Categories
Search
Top
Bottom

Re: Settings Page Template File – Please?!


Alex
Participant

@hempsworth

The only change I’m actually going to propose is this:

function bp_core_screen_general_settings_content() {
global $bp, $current_user, $bp_settings_updated, $pass_error; ?>

<?php if ( $bp_settings_updated && !$pass_error ) { ?>
<div id="message" class="updated fade">
<p><?php _e( 'Changes Saved.', 'buddypress' ) ?></p>
</div>
<?php } ?>

<?php if ( $pass_error && !$bp_settings_updated ) { ?>
<div id="message" class="error fade">
<p><?php _e( 'Your passwords did not match', 'buddypress' ) ?></p>
</div>
<?php } ?>

<form action="<?php echo $bp->loggedin_user->domain . 'settings/general' ?>" method="post" id="settings-form">
<p>
<ul>
<li><label for="email" class="settings-label"><?php _e( 'Account Email', 'buddypress' ) ?></label> <input type="text" name="email" id="email" value="<?php echo attribute_escape( $current_user->user_email ); ?>" class="settings-input" /></li>
<li><label for="pass1" class="settings-label"><?php _e( 'Change Password <span>(leave blank for no change)</span>', 'buddypress' ) ?></label> <input type="password" name="pass1" id="pass1" size="16" value="" class="settings-input small" /></li>
<li><label for="pass2" class="settings-label"><?php _e( 'Repeat Password <span>(leave blank for no change)</span>', 'buddypress' ) ?></label> <input type="password" name="pass2" id="pass2" size="16" value="" class="settings-input small" /></li>
</ul>
</p>
<p class="submit"><input type="submit" name="submit" value="<?php _e( 'Save Changes', 'buddypress' ) ?>" id="submit" class="auto"/></p>
<?php wp_nonce_field('bp_settings_general') ?>
</form>
<?php
}

If I can’t get this in core, how can I make sure these HTML changes persist after upgrades? Can I make a small plugin to do this?! I’m a real PHP n00b…

Skip to toolbar