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
$("#bar") | |
.css({ | |
"background":"yellow", | |
"border":"1px solid black" | |
}) | |
.hide(2000,function(){ | |
console.log("Animation complete!"); | |
}); | |
$("#bar") | |
.css({ |
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
class NavMenus{ | |
public function test_nav(){ | |
echo array( | |
'one' => 'This is One', | |
'two' => 'This is Two', | |
'three' => 'This is Three' | |
); | |
} | |
} |
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; |
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 | |
function sce_create_page($user_id){ | |
$the_user = get_userdata($user_id);; | |
$new_user_name = $the_user->user_login; | |
$my_post = array(); | |
$cat_name = wp_create_category('premium'); | |
$my_post['post_title'] = $new_user_name . $cat_name; | |
$my_post['post_type'] = 'post'; | |
$my_post['post_content'] = ''; | |
$my_post['post_status'] = 'publish'; |