=== WPChef Employee Attendance Tracker ===
Contributors: tarifhossain2013
Tags: employee attendance, time clock, timesheet, break tracker, gps
Requires at least: 6.2
Tested up to: 7.0
Requires PHP: 7.4
Stable tag: 1.5.22
License: GPLv2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html

Employee time clock, breaks, GPS evidence, mobile lite, reports, and CSV export for WordPress.

== Description ==

WPChef Employee Attendance Tracker is a standalone employee time clock, attendance, break, and timesheet tracker for WordPress. It is built for businesses that want a simple employee clock-in page, basic attendance evidence, CSV exports, and optional mobile app access without requiring Gravity Forms, WooCommerce, or any other form plugin.

The free plugin stores attendance inside your WordPress database, creates its own attendance tables, and gives employees a protected frontend clock page through the `[wpchef_tracker]` shortcode. Administrators can manage employees, departments, one company location, shift templates, attendance records, basic reports, manual adjustments, and CSV exports from the WordPress dashboard.

= Free plugin features =

* Frontend employee time clock with `[wpchef_tracker]`.
* Employee clock in and clock out.
* Break in/out with optional break note.
* Today's status and employee attendance table below the clock.
* Admin dashboard summary.
* Admin attendance list with filters and CSV export.
* Basic reports by employee and date.
* Manual attendance adjustment with event evidence.
* IP address, simple device type, and browser user-agent evidence.
* Optional browser GPS evidence for Clock In, Break In, and Clock Out.
* Optional readable address lookup when a Google Maps Platform API key is configured.
* One company location with address, latitude, longitude, timezone, and radius fields.
* Departments.
* Shift templates with separate Clock In grace and Clock Out grace minutes.
* Employee and manager creation using WordPress users.
* Password setup email for newly created users.
* Mobile Lite setup with Agency ID and free mobile license sync.
* Up to the free mobile-user limit assigned by the WPChef Agency Connector.
* One-way mobile Inbox announcements from Admin/HR to employees.
* Setup page helper for creating the employee clock page.
* Free vs Pro comparison page.

= Separate WPChef Tracker Pro features =

WPChef Tracker Pro is a separate paid plugin for larger teams that need deeper workflow controls. Pro features include:

* Unlimited web and mobile app users.
* Full privacy: attendance data remains in your own WordPress database.
* Two-way Admin/HR and employee communication.
* Face recognition for clock in and clock out.
* Employee selfie snapshots for clock in and clock out.
* Multiple locations, offices, branches, and field locations.
* Extended attendance and payroll reports.
* GPS route tracking for field workers.
* Shift rules, late rules, early clock-out review, and overtime management.
* Payroll-compatible exports.
* Frontend admin/manager pages.
* More employee controls for web access, mobile access, face rules, and GPS rules.

Learn more: https://wpchef.app/WPChef-employee-attendance-tracker/

= Shortcode =

Add this shortcode to a protected employee page:

`[wpchef_tracker]`

= Mobile Lite =

The free plugin includes Mobile Lite connection support. From the Mobile App menu, the site can sync with the WPChef Agency Connector to receive an Agency ID and free mobile license key. Free mobile app access follows the mobile-user limit assigned to that agency by the connector.

In the free mobile app mode, employees can view their clock screen, attendance records, profile details, and one-way Inbox announcements. Sent messages, employee-to-admin replies, face recognition, continuous GPS routes, and advanced mobile controls are Pro-only.

= Location capture =

Location capture is optional. When enabled, the employee browser asks for location permission during Clock In, Break In, and Clock Out. The plugin records available latitude, longitude, accuracy, readable address when configured, event time, IP address, and simple device type as attendance evidence.

The free plugin does not include continuous GPS route tracking, geofencing enforcement, or route maps.

= External services =

The plugin works without third-party services for basic web attendance tracking.

If a site administrator configures a Google Maps Platform API key, the plugin can use Google Maps/Places/Geocoding services to suggest addresses and convert GPS coordinates into readable addresses. Location data may be sent to Google only when this feature is configured and used.

Google Maps Platform Terms: https://cloud.google.com/maps-platform/terms
Google Privacy Policy: https://policies.google.com/privacy
Google Maps API documentation: https://developers.google.com/maps/documentation

If Mobile Lite is enabled, the plugin connects to the WPChef Agency Connector at `https://api.wpchef.app` to register/sync the installation Agency ID, license key, license status, plan, domain, mobile-user limit, and agency name. Attendance records are not sent to the connector by this free plugin license sync.

WPChef website: https://wpchef.app
WPChef support: support@wpchef.app

= Privacy and security notes =

WPChef Employee Attendance Tracker stores attendance data in your WordPress database. Depending on your settings, records may include employee user ID, clock event times, break notes, admin adjustment notes, IP address, user agent, device type, browser GPS coordinates, and readable address evidence.

The plugin uses WordPress roles/capabilities, nonces for admin actions, token hashing for mobile API sessions, sanitization before storage, escaping before output, prepared database calls for user-supplied values, and direct-access guards on plugin files. Site owners are still responsible for using HTTPS, strong admin passwords, proper user roles, secure hosting, backups, and employee privacy notices according to local law.

== Installation ==

1. Upload the plugin ZIP through Plugins > Add New > Upload Plugin, or install it from the WordPress.org plugin directory.
2. Activate the plugin.
3. Go to WPChef Tracker > Settings.
4. Configure timezone, default shift times, location/GPS behavior, Google Maps API key if needed, allowed roles, and uninstall preference.
5. Go to WPChef Tracker > Location and configure the single company location.
6. Go to WPChef Tracker > Departments and create departments.
7. Go to WPChef Tracker > Shift Templates and create shift templates.
8. Go to WPChef Tracker > Employees and create employees/managers.
9. Go to WPChef Tracker > Setup Pages and create the employee tracker page, or manually add `[wpchef_tracker]` to a protected page.
10. Ask employees to log in and use the tracker page.

= Recommended protected-page setup =

The plugin requires employees to be logged in. For a simple member-only site, you may use WordPress pages with your preferred access-control method. The Setup Pages screen also suggests Ultimate Member as an optional helper plugin for login/member pages.

= Mobile Lite setup =

1. Install and activate the free plugin.
2. Go to WPChef Tracker > Mobile App.
3. Enter or confirm the Agency Name.
4. Click Sync / Issue Free License.
5. Confirm the Agency ID and license key appear as active.
6. Give employees the Agency ID to use in the WPChef mobile app.

== Frequently Asked Questions ==

= Does this require Gravity Forms? =

No. This is a standalone attendance plugin and does not require Gravity Forms, GravityView, WooCommerce, or any form plugin.

= Which shortcode should I use? =

Use `[wpchef_tracker]` on the employee tracker page.

= Can employees clock in from the frontend? =

Yes. Employees must log in and have an allowed role. The tracker page shows the clock button, current attendance status, break controls, and recent attendance data.

= Can managers use the free plugin? =

Managers can be created as WordPress users, but the free plugin does not include the Pro frontend manager dashboard. Advanced frontend manager/admin pages are part of the separate Pro plugin.

= Is mobile app access included? =

The free plugin includes Mobile Lite. The included mobile-user limit is controlled by the WPChef Agency Connector. Pro is required for unlimited mobile users and advanced mobile features.

= Does the free mobile app allow employees to send messages? =

No. Free mobile Inbox is one-way: Admin/HR can post announcements and employees can read them. Two-way conversations are Pro-only.

= Does the free plugin include face recognition? =

No. Face recognition, liveness-style verification, and clock-in/clock-out selfie evidence are Pro-only.

= Does the free plugin include GPS route tracking? =

No. The free plugin can capture browser GPS evidence for Clock In, Break In, and Clock Out. Continuous GPS route tracking for field workers is Pro-only.

= Is a Google Maps API key required? =

No. Basic attendance works without Google Maps. A Google Maps Platform key is only needed for address autocomplete and readable address conversion from GPS coordinates.

= Can I use multiple locations in the free plugin? =

No. The free plugin supports one company location. Multiple offices, branches, geofencing rules, and location-based controls are Pro features.

= Can I create departments and shift templates? =

Yes. The free plugin includes departments and shift templates. Pro adds deeper shift, overtime, approval, and exception workflows.

= Can I export attendance data? =

Yes. The Attendance page includes CSV export. Pro adds extended payroll-ready exports and deeper reporting.

= Can admins manually adjust attendance? =

Yes. Administrators can edit attendance entries and keep an admin adjustment note.

= What happens when the plugin is deactivated? =

Deactivation preserves data. Data deletion on uninstall is controlled by the uninstall setting.

= Can users change attendance data from the mobile app? =

Employees can perform allowed clock actions. Admin editing remains controlled by WordPress dashboard permissions.

= How is the mobile license secured? =

The plugin stores the Agency ID, license status, and license key returned by the WPChef Agency Connector. Mobile API login is blocked when the mobile feature is disabled or the license status is not active.

= Can users modify the plugin files to bypass limits? =

Any GPL WordPress plugin can be edited by someone with server file access. The plugin includes permission checks, nonces, sanitization, token hashing, and license-status checks, but final server security depends on hosting, administrator access, file permissions, and update control.

== Screenshots ==

1. Frontend employee clock screen.
2. Mobile Lite Login and attendance clock screen.
3. WPCHef Settings page.
4. Employee Manager.
5. Attendance Manager.
6. Mobile Lite Agency ID and license status.

== Changelog ==

= 1.5.22 =
* Improved Mobile Lite attendance experience.
* Mobile app now displays current active attendance directly below the clock screen.
* Attendance history now includes active attendance records while clocked in.
* Removed GPS instruction text from the mobile clock screen.
* Enforced one-way communication for Free Mobile Lite licenses.
* Hidden Compose Message and Sent Messages features for Free licenses.
* Reserved employee replies and two-way messaging for WPChef Tracker Pro.
* Improved mobile license feature enforcement and Flutter app compatibility.

= 1.5.21 =
* Updated readme description, installation guide, FAQ, privacy notes, free feature list, Pro feature list, and changelog history.
* Added additional admin capability checks to extended admin save actions.
* Improved Plugin Check handling for custom mobile token/device database operations.
* Added version to Google Maps/Places script enqueue.
* Kept all existing free plugin features intact.

= 1.5.20 =
* Fixed Plugin Check issues related to script enqueueing, escaped output, stable tag, and prepared custom table queries.

= 1.5.19 =
* Added connector-side license control sync support.
* Improved Tracker Pro sales page.
* Improved free mobile license status handling.

= 1.5.18 =
* Added `[wpchef_tracker]` shortcode alias.
* Improved clock display, GPS evidence for clock actions, employee creation, full-width admin tables, location setup, shift grace fields, and Tracker Pro page.

= 1.5.17 =
* Added fallback connector sync support for hosting environments where REST rewrite handling is inconsistent.

= 1.5.16 =
* Added automatic free mobile license issuance flow.

= 1.5.15 =
* Added connector ping/store debugging and improved installation registry sync.

= 1.5.14 =
* Improved Agency ID registry sync with the connector.

= 1.5.13 =
* Locked Agency Name after Agency ID generation and removed disconnect from the free plugin UI.

= 1.5.12 =
* Improved Mobile App license display, admin menu order, and admin form UI.

= 1.5.11 =
* Added Mobile Lite + Agency ID + free mobile user limit flow.
* Added simplified employees, departments, single location, shift templates, and setup pages.

= 1.5.8 =
* Renamed mobile Announcements to Inbox and added mobile inbox endpoint compatibility.

= 1.5.5 =
* Added backend dashboard statistics, Agency Connector support, active mobile user count, and mobile attendance payload improvements.

= 1.4.5 =
* Improved WordPress.org-ready free plugin package.
* Added GPS evidence, readable addresses, Google Maps key support, shift settings, device capture, reports/CSV evidence columns, multiple break support, and Tracker Pro information page.

= 1.3.2 =
* Improved WPChef Tracker admin menu, dashboard cards, filters, and table styling.

= 1.3.1 =
* Updated plugin branding, slug, text domain, contributor username, internal prefixes, and public shortcode.

= 1.2.6 =
* Fixed Plugin Check warnings in uninstall table deletion queries.

= 1.0.0 =
* Initial release with custom attendance tables, employee clock in/out, break tracking, frontend shortcode, admin attendance list, manual adjustment, IP/device capture, reports, CSV export, location/timezone settings, and role support.

== Upgrade Notice ==

= 1.5.22 =
Improves Mobile Lite attendance display, enforces one-way communication for free licenses, and enhances mobile app compatibility.

= 1.5.21 =
Improves documentation, Plugin Check handling, and admin action security while keeping the current free feature set intact.

= 1.5.18 =
Improves shortcode compatibility, GPS evidence, shift grace fields, employee creation, location setup, and the Pro comparison page.

= 1.5.11 =
Adds Mobile Lite, Agency ID, free mobile-user limit, mobile Inbox announcements, and simplified admin setup pages.
