te != null) { $whereType = ($post_type != null ? $wpdb->prepare(" AND `type`=%s", $post_type) : ''); $result = $wpdb->get_results( $wpdb->prepare("SELECT `uri`,`id`,`type` FROM " . \WP_STATISTICS\DB::table('pages') . " WHERE `date` BETWEEN %s AND %s {$whereType} GROUP BY `id`" . ($limit != null ? ' LIMIT ' . $limit : ''), $rangestartdate, $rangeenddate), // phpcs:ignore WordPress.DB.PreparedSQL.NotPrepared ARRAY_N); } else { $limitQuery = ''; if ($limit) { $limitQuery = $wpdb->prepare(" LIMIT %d", $limit); } $whereType = ($post_type != null ? $wpdb->prepare(" WHERE `type`=%s", $post_type) : ''); $result = $wpdb->get_results("SELECT `uri`, `id`, `type` FROM " . \WP_STATISTICS\DB::table('pages') . " {$whereType} GROUP BY `id` {$limitQuery}", ARRAY_N); // phpcs:ignore WordPress.DB.PreparedSQL.NotPrepared } $total = 0; $uris = array(); // Now get the total page visit count for each unique URI. foreach ($result as $out) { //Prepare item list($url, $page_id, $page_type) = $out; // Check if item is of specific post type (string or part of an array) or if post type is set to null if (is_null($post_type) || $page_type == $post_type || (is_array($post_type) && in_array($page_type, $post_type))) { // Increment the total number of results. $total++; //Get Page Title $page_info = Pages::get_page_info($page_id, $page_type); $title = mb_substr($page_info['title'], 0, 200, "utf-8"); $page_url = $page_info['link']; // Check age Title if page id or type not exist if ($page_info['link'] == "") { $page_url = path_join(get_site_url(), $url); $id = WP_STATISTICS\Pages::uri_to_id($out[0]); $post = get_post($id); if (is_object($post)) { $title = esc_html($post->post_title); } else { if ($out[0] == '/') { $title = get_bloginfo(); } else { $title = ''; } } } //Check Title is empty if (empty($title)) { $title = '-'; } // Add the current post to the array. if ($rangestartdate != null && $rangeenddate != null) { $uris[] = array( urldecode_deep($out[0]), wp_statistics_pages('range', $out[0], -1, $rangestartdate, $rangeenddate, $post_type), $page_id, $title, $page_url, ); } else { $uris[] = array( urldecode_deep($out[0]), wp_statistics_pages('total', $out[0], -1, $rangestartdate, $rangeenddate, $post_type), $page_id, $title, $page_url ); } } } // If we have more than one result, let's sort them using usort. if (count($uris) > 1) { usort($uris, array('\WP_STATISTICS\Helper', 'compare_uri_hits_int')); } array_splice($uris, $spliceLimit); return array($spliceLimit, $uris); // return array($total, $uris); } /** * Returns all unique user agents in the database. * * @param null $rangestartdate * @param null $rangeenddate * @return array */ function wp_statistics_ua_list($rangestartdate = null, $rangeenddate = null) { global $wpdb; if ($rangestartdate != null && $rangeenddate != null) { if ($rangeenddate == 'CURDATE()') { $result = $wpdb->get_results( $wpdb->prepare("SELECT DISTINCT agent FROM `" . \WP_STATISTICS\DB::table('visitor') . "` WHERE `last_counter` BETWEEN %s AND CURDATE()", $rangestartdate), ARRAY_N); } else { $result = $wpdb->get_results( $wpdb->prepare("SELECT DISTINCT agent FROM `" . \WP_STATISTICS\DB::table('visitor') . "` WHERE `last_counter` BETWEEN %s AND %s", $rangestartdate, $rangeenddate), ARRAY_N); } } else { $result = $wpdb->get_results( "SELECT DISTINCT agent FROM `" . \WP_STATISTICS\DB::table('visitor') . "` ", ARRAY_N); } $Browsers = array(); $default_browser = DeviceHelper::getBrowserList(); foreach ($result as $out) { //Check Browser is defined in wp-statistics if (array_key_exists(strtolower($out[0]), $default_browser)) { $Browsers[] = esc_html($out[0]); } } return $Browsers; } /** * Count User By User Agent * * @param $agent * @param null $rangestartdate * @param null $rangeenddate * @return mixed */ function wp_statistics_useragent($agent, $rangestartdate = null, $rangeenddate = null) { global $wpdb; if ($rangestartdate != null || $rangeenddate != null) { if ($rangeenddate == null) { $result = $wpdb->get_var( $wpdb->prepare("SELECT COUNT(agent) FROM `" . \WP_STATISTICS\DB::table('visitor') . "` WHERE `agent` = %s AND `last_counter` = %s", $agent, $rangestartdate) ); } else { $result = $wpdb->get_var( $wpdb->prepare("SELECT COUNT(agent) FROM `" . \WP_STATISTICS\DB::table('visitor') . "` WHERE `agent` = %s AND `last_counter` BETWEEN %s AND %s", $agent, $rangestartdate, $rangeenddate) ); } } else { $result = $wpdb->get_var( $wpdb->prepare("SELECT COUNT(agent) FROM `" . \WP_STATISTICS\DB::table('visitor') . "` WHERE `agent` = %s", $agent) ); } return $result; } /** * Returns all unique platform types from the database. * * @param null $rangestartdate * @param null $rangeenddate * @return array */ function wp_statistics_platform_list($rangestartdate = null, $rangeenddate = null) { global $wpdb; if ($rangestartdate != null && $rangeenddate != null) { $result = $wpdb->get_results( $wpdb->prepare("SELECT DISTINCT platform FROM `" . \WP_STATISTICS\DB::table('visitor') . "` WHERE `last_counter` BETWEEN %s AND %s", $rangestartdate, $rangeenddate), ARRAY_N); } else { $result = $wpdb->get_results( "SELECT DISTINCT platform FROM `" . \WP_STATISTICS\DB::table('visitor') . "` ", ARRAY_N); } $Platforms = array(); foreach ($result as $out) { $Platforms[] = esc_html($out[0]); } return $Platforms; } /** * Returns the count of a given platform in the database. * * @param $platform * @param null $rangestartdate * @param null $rangeenddate * @return mixed */ function wp_statistics_platform($platform, $rangestartdate = null, $rangeenddate = null) { global $wpdb; if ($rangestartdate != null && $rangeenddate != null) { $result = $wpdb->get_var( $wpdb->prepare("SELECT COUNT(platform) FROM `" . \WP_STATISTICS\DB::table('visitor') . "` WHERE `platform` = %s AND `last_counter` BETWEEN %s AND %s", $platform, $rangestartdate, $rangeenddate) ); } else { $result = $wpdb->get_var( $wpdb->prepare("SELECT COUNT(platform) FROM `" . \WP_STATISTICS\DB::table('visitor') . "` WHERE `platform` = %s", $platform) ); } return $result; } /** * Returns all unique versions for a given agent from the database. * * @param $agent * @param null $rangestartdate * @param null $rangeenddate * @return array */ function wp_statistics_agent_version_list($agent, $rangestartdate = null, $rangeenddate = null) { global $wpdb; if ($rangestartdate != null && $rangeenddate != null) { $result = $wpdb->get_results( $wpdb->prepare("SELECT DISTINCT `version` FROM `" . \WP_STATISTICS\DB::table('visitor') . "` WHERE agent = %s AND `last_counter` BETWEEN %s AND %s", $agent, $rangestartdate, $rangeenddate), ARRAY_N); } else { $result = $wpdb->get_results( $wpdb->prepare("SELECT DISTINCT `version` FROM `" . \WP_STATISTICS\DB::table('visitor') . "` WHERE agent = %s", $agent), ARRAY_N); } $Versions = array(); foreach ($result as $out) { $Versions[] = $out[0]; } return $Versions; } /** * Returns the statistics for a given agent/version pair from the database. * * @param $agent * @param $version * @param null $rangestartdate * @param null $rangeenddate * @return mixed */ function wp_statistics_agent_version($agent, $version, $rangestartdate = null, $rangeenddate = null) { global $wpdb; if ($rangestartdate != null && $rangeenddate != null) { $result = $wpdb->get_var( $wpdb->prepare("SELECT COUNT(version) FROM `" . \WP_STATISTICS\DB::table('visitor') . "` WHERE agent = %s AND version = %s AND `last_counter` BETWEEN %s AND %s", $agent, $version, $rangestartdate, $rangeenddate) ); } else { $result = $wpdb->get_var( $wpdb->prepare("SELECT COUNT(version) FROM `" . \WP_STATISTICS\DB::table('visitor') . "` WHERE agent = %s AND version = %s", $agent, $version) ); } return $result; } /** * Return the SQL WHERE clause for getting the search engine. * * @param string $search_engine * @return bool|string */ function wp_statistics_searchengine_query($search_engine = 'all') { global $wpdb; $search_query = ''; // Are we getting results for all search engines or a specific one? if (strtolower($search_engine) == 'all') { $search_query .= "`source_channel` in ('search')"; } else { // Are we getting results for all search engines or a specific one? $search_query .= $wpdb->prepare("`source_name` = %s", $search_engine); } return $search_query; } /** * Get Search engine Statistics * * @param string $search_engine * @param string $time * @param string $search_by [query / name] * @param array $range * @return mixed */ function wp_statistics_get_search_engine_query($search_engine = 'all', $time = 'total', $search_by = 'query', $range = []) { global $wpdb; //Prepare Table Name $table_name = \WP_STATISTICS\DB::table('visitor'); //Date Column table $date_column = 'last_counter'; // Get a complete list of search engines if ($search_by == "query") { $search_query = wp_statistics_searchengine_query($search_engine); } //Generate Base Sql $sql = "SELECT COUNT(ID) FROM {$table_name} WHERE ({$search_query})"; // Check Sanitize Datetime if (TimeZone::isValidDate($time)) { if (empty($range)) $range = ['is_day' => true]; } else { if (empty($range)) $range = ['current_date' => true]; } $mysql_time_sql = WP_STATISTICS\Helper::mysql_time_conditions($date_column, $time, $range); //Generate MySql Time Conditions if (!empty($mysql_time_sql)) { $sql = $sql . ' AND (' . $mysql_time_sql . ')'; } //Request Data return $wpdb->get_var($sql); // phpcs:ignore WordPress.DB.PreparedSQL.NotPrepared } /** * This function will return the statistics for a given search engine. * * @param string $search_engine * @param string $time * @param array $range * @return mixed */ function wp_statistics_searchengine($search_engine = 'all', $time = 'total', $range = []) { return wp_statistics_get_search_engine_query($search_engine, $time, $search_by = 'query', $range); } /** * Return Refer List * * @param null $time * @param array $range * @return int */ function wp_statistics_referrer($time = null, $range = []) { global $wpdb; $sql = "SELECT `referred` FROM `" . \WP_STATISTICS\DB::table('visitor') . "` WHERE referred <> ''"; // Check Sanitize Datetime if (TimeZone::isValidDate($time)) { if (empty($range)) $range = ['is_day' => true]; } else { if (empty($range)) $range = ['current_date' => true]; } $mysql_time_sql = WP_STATISTICS\Helper::mysql_time_conditions('last_counter', $time, $range); //Generate MySql Time Conditions if (!empty($mysql_time_sql)) { $sql = $sql . ' AND (' . $mysql_time_sql . ')'; } $result = $wpdb->get_results($sql); // phpcs:ignore WordPress.DB.PreparedSQL.NotPrepared $urls = array(); foreach ($result as $item) { $url = wp_parse_url($item->referred); if (empty($url['host']) || stripos(get_bloginfo('url'), $url['host']) !== false) { continue; } $urls[] = $url['scheme'] . '://' . $url['host']; } $get_urls = array_count_values($urls); return count($get_urls); } /** * Checks if consent is required for collecting user statistics. * * This function evaluates several conditions that determine whether consent * is needed to collect and store user data for statistics purposes. If any * of the conditions are not met, it indicates that consent is required. * * @return bool Returns true if consent is required, false otherwise. * @since 14.10.1 */ function wp_statistics_needs_consent() { // Get the current status of the consent requirement $status = RequireConsent::getStatus(); // Check if consent is required if ($status == 'warning') { return true; // Consent is required } // Return false if consent is not required return false; } {"id":12819,"date":"2021-02-22T09:15:48","date_gmt":"2021-02-22T02:15:48","guid":{"rendered":"https:\/\/lsisi.id\/?p=12819"},"modified":"2021-02-22T09:15:48","modified_gmt":"2021-02-22T02:15:48","slug":"hadang-hoaks-sukseskan-vaksinasi","status":"publish","type":"post","link":"https:\/\/lsisi.id\/hadang-hoaks-sukseskan-vaksinasi\/","title":{"rendered":"Hadang Hoaks, Sukseskan Vaksinasi"},"content":{"rendered":"\n
Oleh: Citra Anjani*<\/p>\n\n\n\n
Sekitar satu bulan yang lalu, Vaksin Covid-19 sudah sampai di Indonesia. Vaksinasi juga sudah dilakukan yang diawali oleh Presiden Joko Widodo sebagai upaya meyakinkan masyarakat terkait keamanan vaksin Covid-19. Meski begitu, masih banyak berita hoaks yang tersebar di sosial media sehingga masyarakat takut terhadap penyuntikan vaksin. Sehingga pemerintah melakukan berbagai upaya untuk membuat masyarakat yakin dengan vaksin Covid-19. <\/p>\n\n\n\n
Keterlambatan vaksinasi pada seseorang sangat membahayakan, sebab apabila sistem imun tubuh mengenali virus yang masuk sudah berkembang menjadi jutaan akan membuat sistem imun terlambat menanganinya. <\/p>\n\n\n\n
Vaksin bisa mengenali virus-virus tertentu sehingga sistem imun akan bekerja dan membentuk sebuah ingatan atau memori. Apabila virus yang sama masuk kembali, sistem imun sudah siap dan langsung mengalahkannya. Inilah mengapa penyuntikan vaksin penting dilakukan agar tubuh dapat mengenali virus tanpa harus mengidap penyakit yang disebabkan virus yang dimaksud.<\/p>\n\n\n\n
Namun demikian, masih terdapat hoaks yang tersebar di masyarakat. Diantaranya, vaksin tidak halal dan berbahaya. Padahal faktanya, vaksin yang disalurkan ke masyarakat, sudah menjalani uji klinis dari BPOM dan sudah mendapat sertifikasi halal dari MUI. <\/p>\n\n\n\n
Selain itu, masyarakat juga dibuat khawatir apabila nantinya terjadi hal yang tidak diinginkan pada mereka dan pemerintah tidak akan bertanggung jawab. Faktanya, berdasarkan Keputusan Kementerian Kesehatan Nomor 84 tahun 2020, pemerintah akan bertanggung jawab penuh jika terjadi kejadian lanjutan pasca vaksinasi Covid-19. Jadi sudah tidak ada lagi alasan untuk takut disuntik vaksin.<\/p>\n\n\n\n
Cara Bijak Menerima dan Menyebarkan Informasi di Media Sosial<\/p>\n\n\n\n
Saat ini persebaran berita hoaks mudah meluas karena banyak yang sengaja membuat dan menyebarkannya. Salah satunya sengaja dibuat oleh pihak yang \u201cmemiliki uang\u201d dengan maksud tertentu. Hoaks tersebut disebarkan kepada masyarakat melalui berbagai platform media sosial dan membentuk rantai ketakutan ataupun kecemasan bagi masyarakat yang menerima hoaks tersebut. <\/p>\n\n\n\n
Oleh karenanya, jangan mudah percaya kepada informasi yang diterima entah dari mana asalnya apalagi hanya mengandalkan berita dari media yang tidak kredibel. Pedomanilah berita-berita dari sumber-sumber terpercaya sehingga tidak menimbulkan salah arti dan diikuti pola pikir salah sehingga menimbulkan ketakutan, ketidakpercayaan, kergauan, dan hal negatif lainnya. Tentu saja pemerintah tidak akan membahayakan keselamatan rakyatnya. Justru berjuang sekeras mungkin demi ketenteraman dan kebahagian bangsa Indonesia. Ayo kita hindari hoaks dan cegah disinformasi terkait vaksinasi nasional dengan menyebar konten positif dukung penanganan pandemi Covid-19 dan program vaksinasi nasional demi Indonesia bebas pandemi serta pulihnya perekonomian Indonesia.<\/p>\n\n\n\n
*Penulis adalah Warganet Kota Cianjur<\/p>\n","protected":false},"excerpt":{"rendered":"
Oleh: Citra Anjani* Sekitar satu bulan yang lalu, Vaksin Covid-19 sudah sampai di Indonesia. Vaksinasi juga sudah dilakukan yang diawali oleh Presiden Joko Widodo sebagai upaya meyakinkan masyarakat terkait keamanan vaksin Covid-19. Meski begitu, masih banyak berita hoaks yang tersebar di sosial media sehingga masyarakat takut terhadap penyuntikan vaksin. Sehingga pemerintah melakukan berbagai upaya untuk …<\/p>\n","protected":false},"author":5,"featured_media":12619,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":"","_jetpack_memberships_contains_paid_content":false},"categories":[4],"tags":[2423,2489],"jetpack_sharing_enabled":true,"jetpack_featured_media_url":"https:\/\/lsisi.id\/wp-content\/uploads\/2021\/02\/hoax-copy.jpg","_links":{"self":[{"href":"https:\/\/lsisi.id\/wp-json\/wp\/v2\/posts\/12819"}],"collection":[{"href":"https:\/\/lsisi.id\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/lsisi.id\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/lsisi.id\/wp-json\/wp\/v2\/users\/5"}],"replies":[{"embeddable":true,"href":"https:\/\/lsisi.id\/wp-json\/wp\/v2\/comments?post=12819"}],"version-history":[{"count":1,"href":"https:\/\/lsisi.id\/wp-json\/wp\/v2\/posts\/12819\/revisions"}],"predecessor-version":[{"id":12820,"href":"https:\/\/lsisi.id\/wp-json\/wp\/v2\/posts\/12819\/revisions\/12820"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/lsisi.id\/wp-json\/wp\/v2\/media\/12619"}],"wp:attachment":[{"href":"https:\/\/lsisi.id\/wp-json\/wp\/v2\/media?parent=12819"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/lsisi.id\/wp-json\/wp\/v2\/categories?post=12819"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/lsisi.id\/wp-json\/wp\/v2\/tags?post=12819"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}