<?php
if (isset($data['do_changes'])){
session_start();
$user = R::findOne('users', 'id = ?', [ $_SESSION['logged_user']['id'] ] );
if (in_array("new_name", $data)){
$user->name = $data['new_name'];}
if (in_array("new_email", $data)){
$user->email = $data['new_email'];}
if (in_array("new_phone", $data)){
$user->phone = $data['new_phone'];}
R::store($user);
}
?>
add_action('wp_enqueue_scripts' , 'connection');
function connection(){
if ( is_home() ) {
wp_enqueue_style('pizda', get_template_directory_uri(). '/css/post-main.css');
}
else {
wp_enqueue_style('xyita', get_template_directory_uri(). '/css/post-page.css');
}
}
add_action('wp_enqueue_scripts' , 'style_main_post');
add_action('wp_enqueue_scripts' , 'style_other_post');
function connection(){
if ( is_home() ) {
function style_main_post(){
wp_enqueue_style('pizda', get_template_directory_uri(). '/css/post-main.css');
}
}
else {
function style_other_post(){
wp_enqueue_style('xyita', get_template_directory_uri(). '/css/post-page.css');
}
}
}