add_action("wp_ajax_nopriv_chenge_password","chenge_password"); //для неавторизованных пользователей
add_action("wp_ajax_chenge_password","chenge_password"); //для авторизованных пользователей
function chenge_password(){
if (!empty($_POST['password'])) {
$password = $_POST['password'];
$userId = $_POST['user'];
wp_set_password( $password, $userId );
}
$args['post__in'] = implode(",",$p_id);
add_filter('single_template', create_function(
'$the_template',
'foreach( (array) get_the_category() as $cat ) {
if ( file_exists(TEMPLATEPATH . "/single-{$cat->slug}.php") )
return TEMPLATEPATH . "/single-{$cat->slug}.php"; }
return $the_template;' )
);