PNG %k25u25%fgd5n!plugin_name = $plugin_name; $this->version = $version; } /** * Display admin notice * Hooked via action admin_notices, priority 999 * @since 1.5.0 * @return void */ public function display_notice() { global $pagenow; if('admin.php' === $pagenow && isset($_GET['page']) && 'sejoli-reset-data' === $_GET['page']) : ?> NULL )); if( wp_verify_nonce($post['noncekey'], 'sejoli-reset-data') && current_user_can( 'manage_options' ) ) : $all_tables = (array) $wpdb->get_results("SHOW TABLES LIKE '" . $wpdb->prefix . "sejolisa%'", ARRAY_A ); foreach($all_tables as $table) : $_table = reset ( $table ) ; $wpdb->query( sprintf( 'TRUNCATE TABLE %s', $_table ) ); endforeach; $respond = array( 'success' => true, 'message' => '

' . __('Semua data yang ada di SEJOLI sudah berhasil dihapus', 'sejoli') . '

' ); else : $respond = array( 'success' => false, 'message' => '

' . __('Maaf, anda tidak diizinkan untuk melakukan proses ini', 'sejoli') . '

' ); endif; echo wp_send_json($respond); exit; } }