Author panel

if ( is_user_logged_in() ) {

add_action('wp_head', 'artdir_jquery', 8);

// убираем магические кавычки
function stripslashes_array($array) { return is_array($array) ? array_map('stripslashes_array', $array) : stripslashes($array); }
if (get_magic_quotes_gpc()) { $_POST = stripslashes_array($_POST); }

global $current_user;
get_currentuserinfo();

$options = get_option('article_directory');
$uri = 'http://' . $_SERVER['HTTP_HOST'] . $_SERVER['REQUEST_URI'];
$apl = get_permalink($options['author_panel_id']);
$profile = '';
if (get_option('permalink_structure') == '') {
$profile = '&profile';
} else {
$profile = '?profile';
}

$authorNav = "\r\n\r\n" . '

‘ . get_the_title() . ‘

‘ . “\r\n\r\n”;
$authorNav .= ‘

‘ . “\r\n\r\n”;

// профиль
if (isset($_GET['profile']) || isset($_GET['updated'])) {

$error = ”;

if ($_POST['action'] == ‘updateProfile’) {

require_once( ABSPATH . WPINC . ‘/registration.php’);

global $demo;

if (!$demo) {
if(isset($_POST['display_name'])) {
wp_update_user(array(‘ID’ => $current_user->ID, ‘display_name’ => $_POST['display_name']));
}
}

if(empty($_POST['user_email'])) {
$error .= ‘

‘ . __(‘ERROR: Please enter an e-mail address.’) . ‘

‘;
} elseif (!is_email($_POST['user_email'])) {
$error .= ‘

‘ . __(‘ERROR: The e-mail address isn’t correct.’) . ‘

‘;
} else {
if (!$demo) {
wp_update_user(array(‘ID’ => $current_user->ID, ‘user_email’ => $_POST['user_email']));
}
}

if (!$demo) {
if(isset($_POST['url'])) {
wp_update_user(array(‘ID’ => $current_user->ID, ‘user_url’ => $_POST['url']));
}
}

if (!$demo) {
if(isset($_POST['description'])) {
wp_update_user(array(‘ID’ => $current_user->ID, ‘description’ => strip_tags($_POST['description'])));
}
}

if (empty($_POST['pass1']) && !empty($_POST['pass2']) or !empty($_POST['pass1']) && empty($_POST['pass2']) or !empty($_POST['pass1']) && !empty($_POST['pass2'])) {
if ($_POST['pass1'] != $_POST['pass2']) {
$error .= ‘

‘ . __(‘ERROR: Please enter the same password in the two password fields.’) . ‘

‘;
} else {
if (!$demo) {
wp_update_user(array(‘ID’ => $current_user->ID, ‘user_pass’ => esc_attr( $_POST['pass1'])));
}
}
}

if (!$error) {
if (strpos($uri, ‘&updated’) === false ) {
wp_redirect($uri . ‘&updated’);
} else {
wp_redirect($uri);
}
exit;
} else {
$error = $error;
}

}

get_header();
echo $authorNav;

if (isset($_GET['updated'])) {
if (!$error) echo ‘

‘ . __(‘User updated.’) . ‘

‘;
}
if ($error) echo ‘

‘ . $error . ‘

‘;

?>


user_registered); ?>
‘ . __(‘Thank you! Your article has been published.’, ‘article-directory’) . ‘

‘;
} else {
echo ‘

‘ . __(‘Thank you! Your article has been added and is awaiting review by the administrator.’, ‘article-directory’) . ‘

‘;
}
}
}
if ($error) echo ‘

‘ . $error . ‘

‘;

if (!empty($options['publish_terms_text'])) {
?>






wp_print_scripts('quicktags');
require_once(ABSPATH . '/wp-admin/includes/post.php');
function richedit() { return true; }
add_filter('user_can_richedit', 'richedit');
wp_tiny_mce( false, array( 'height' => ’370′ ) );
if ($options['default_editor'] == ‘html’) {
add_filter( ‘wp_default_editor’, create_function(”, ‘return “html”;’) );
} else {
add_filter( ‘wp_default_editor’, create_function(”, ‘return “tinymce”;’) );
}
the_editor($_POST['post'], ‘post’ , ”, false);
} else {
echo ‘

‘;
the_editor($_POST['post'], ‘post’ , ”, false);
}
?>



&taxonomy=category&hide_empty=0&name=cats[]&orderby=name&hierarchical=1′); ?>

$categories = wp_dropdown_categories("taxonomy=category&hide_empty=0&orderby=name&hierarchical=1&echo=0");
preg_match_all('/\s*

\n”;
}
?>


if ($options['show_tags'] == 1) {
$tags = get_tags('get=all');
if (!empty($tags)) { ?>

echo '

Authorization

Recent Articles

Just how do you choose the right Course available for you?

7:48 am | Author: | Posted in Reference & Education

Do you want more details with regards to your education choices? Are you looking to start your career or perhaps do you seek a change in your current profession? There are various courses you’re able to do to be able to help you create a better future such as: Online Courses, TAFE Courses, College Courses, University Courses, Training Courses, Government Funded Courses, Distance Education Courses plus Short Courses.

Steve Ostler Homeowners Insurance Quotes

7:39 am | Author: | Posted in Home & Family

What can you say that you love the most about your home or property? – the bright, sun-filled kitchen, the shiny wood floors or the comfy bedrooms?

How To Treat Alcohol Treatment Programs Properly

7:39 am | Author: | Posted in Disease & Illness

Alcoholism is usually a disabling condition, restricting the actual functional nature of the individual caused because of this dysfunction.

Aerial Photography for Internet Advertising

7:33 am | Author: | Posted in Advertising

A particular kind of art that uses aircrafts, balloons, and helicopters to create different aerial shots is called aerial photography. Nardar, a French balloonist, was the first person to use this kind of photography. He used it to create aerial shots of Paris in 1858. Facebook groups and Internet ads use this technique often.

The Mother of the Groom on the Big Day

7:33 am | Author: | Posted in Marriage

So the time is rapidly approaching. The date is leering over you and you still have a lot to accomplish. The mother of the groom has been trying to tell you what will be happening at your own wedding; polluting your thoughts with ideas you may not exactly find copasetic. There is no need to be afraid though as this is your time to shine. But you mustn’t allow her to walk all over you because that is no way to gain respect. You must make sure to play nice but play rough or she will walk all over you for the remainder of your life.