This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
body { | |
font-family: "OpenSans", Helvetica, Arial, sans-serif; | |
} | |
.pull-right-footer { | |
text-align: center; | |
padding-top: 20px; | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
// Processing Section | |
global $current_user, $wp_roles; | |
get_currentuserinfo(); | |
/* Load the registration file. */ | |
require_once( ABSPATH . WPINC . '/registration.php' ); | |
/* If profile was saved, update profile. */ | |
if ( 'POST' == $_SERVER['REQUEST_METHOD'] && !empty( $_POST['action'] ) && $_POST['action'] == 'update-user' ) { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/** | |
* Plugin Name: Custom user registration fields | |
* Plugin URI: http://yoda.neun12.de | |
* Description: Add custom fields to the user registration | |
* Version: 0.1 | |
* Author: Ralf Albert | |
* Author URI: http://yoda.neun12.de | |
* Text Domain: | |
* Domain Path: |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/** | |
* Plugin Name: Custom user registration fields | |
* Plugin URI: http://yoda.neun12.de | |
* Description: Add custom fields to the user registration | |
* Version: 0.1 | |
* Author: Ralf Albert | |
* Author URI: http://yoda.neun12.de | |
* Text Domain: | |
* Domain Path: |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public function profile_save( $user_id ) { | |
$fields = self::$setup['theme']['profile']['fields']; | |
if ( !current_user_can( 'edit_user', $user_id ) ) return false; | |
foreach ($fields as $field => $attr) { | |
if ( isset($_POST[$field]) || isset($_FILES[$field]) ) { | |
$value = $_POST[$field]; | |
if ( $value ) update_user_meta( $user_id, $field, $value ); | |
} | |
} | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* NAVIGATION MENU --------------------*/ | |
.navbar, .navbar-inner, .nav, .navbar-inverse { | |
float: none; | |
} | |
.navbar-inverse .btn-navbar { | |
background: #666; | |
margin-top: 20px; | |
} | |
.navbar,.navbar-inverse .navbar-inner { | |
background: none; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$(document).ready(function() { | |
// animation of navigation | |
$(function() { | |
$('.nav-collapse .nav li a').bind('click',function(event){ | |
var anchor = $(this); | |
$('html, body').stop().animate({ | |
scrollTop: $(anchor.attr('href')).offset().top - $('.navbar-inner').height() - ($('.navbar-inner').height()/4.8) | |
}, 1500/*,'easeInOutExpo'*/); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
global $current_user; | |
get_currentuserinfo(); | |
echo 'Username: ' . $current_user->user_login . "\n"; | |
echo '<br />'; | |
echo 'User first name: ' . $current_user->user_firstname . "\n"; | |
echo '<br />'; | |
echo 'User last name: ' . $current_user->user_lastname . "\n"; | |
echo '<br />'; | |
echo 'User display name: ' . $current_user->display_name . "\n"; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
//hides the personal options | |
function hide_personal_options(){ | |
echo "\n" . '<script type="text/javascript">jQuery(document).ready(function($) { | |
$(\'form#your-profile > h3:first\').hide(); | |
$(\'form#your-profile > table:first\').hide(); | |
$(\'form#your-profile\').show(); | |
$(\'label[for=url], input#url\').hide(); | |
}); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/** | |
* Template Name: User Profile | |
* | |
* Allow users to update their profiles from Frontend. | |
* | |
*/ | |
/* Get user info. */ | |
global $current_user, $wp_roles; |