label. */ public static function sections() { return array( 'overview' => __( 'Overview', 'frontglut' ), 'start' => __( 'Getting started', 'frontglut' ), 'dashboard' => __( 'Dashboard', 'frontglut' ), 'accounts' => __( 'Accounts & roles', 'frontglut' ), 'forms' => __( 'Forms', 'frontglut' ), 'posts' => __( 'Posts', 'frontglut' ), 'store' => __( 'Products & orders', 'frontglut' ), 'market' => __( 'Marketplace', 'frontglut' ), 'comms' => __( 'Communication', 'frontglut' ), 'files' => __( 'Files', 'frontglut' ), 'security' => __( 'Security & system', 'frontglut' ), 'shortcodes' => __( 'Shortcodes', 'frontglut' ), ); } public static function render() { $secs = self::sections(); $cur = Request::route( 'sec', 'key', 'overview' ); if ( ! isset( $secs[ $cur ] ) ) { $cur = 'overview'; } echo '
'; foreach ( $secs as $slug => $label ) { echo '' . esc_html( $label ) . ''; } echo '
'; $method = 'sec_' . $cur; echo wp_kses( self::$method(), \FrontGlut\Support\Ui::allowed_html() ); echo '
'; } /* ---------- helpers ---------- */ private static function link( $tab, $label ) { return '' . esc_html( $label ) . ''; } private static function steps( array $items ) { $o = '
    '; foreach ( $items as $i ) { $o .= '
  1. ' . $i . '
  2. '; } return $o . '
'; } private static function note( $html, $type = 'info' ) { return '
' . $html . '
'; } private static function cards( array $cards ) { $o = '
'; foreach ( $cards as $c ) { $o .= '

' . $c[0] . '

' . $c[1] . '

'; } return $o . '
'; } private static function table( array $head, array $rows ) { $o = '
'; foreach ( $head as $h ) { $o .= ''; } $o .= ''; foreach ( $rows as $r ) { $o .= ''; foreach ( $r as $c ) { $o .= ''; } $o .= ''; } return $o . '
' . $h . '
' . $c . '
'; } /* ---------- sections ---------- */ private static function sec_overview() { $o = '

' . esc_html__( 'What this plugin does', 'frontglut' ) . '

'; $o .= '

' . esc_html__( 'FrontGlut moves day-to-day site management out of wp-admin. Your visitors, members, authors, shop managers and vendors work from one dashboard page on your website. You, as administrator, decide in wp-admin which features exist, how they look and who may use them.', 'frontglut' ) . '

'; $o .= '

' . esc_html__( 'Two places, two jobs', 'frontglut' ) . '

'; $o .= self::table( array( __( 'Place', 'frontglut' ), __( 'Who uses it', 'frontglut' ), __( 'What happens there', 'frontglut' ) ), array( array( '' . esc_html__( 'wp-admin → FrontGlut (this screen)', 'frontglut' ) . '', esc_html__( 'Site administrators', 'frontglut' ), esc_html__( 'Configure: turn modules on or off, set colours and pages, build forms, grant capabilities to roles, set up captcha, emails, commissions and uploads.', 'frontglut' ) ), array( '' . esc_html__( 'Frontend dashboard page', 'frontglut' ) . '', esc_html__( 'Everyone with a role that has access', 'frontglut' ), esc_html__( 'Operate: write posts, manage products and orders, run a store, answer tickets, upload files. Each person sees only the sections their role allows.', 'frontglut' ) ), ) ); $o .= '

' . esc_html__( 'How the pieces fit together', 'frontglut' ) . '

'; $o .= self::cards( array( array( esc_html__( 'Modules', 'frontglut' ), esc_html__( 'Features are grouped into modules (Posts, Products, Marketplace, Files…). A disabled module loads no code, styles or scripts and its dashboard sections disappear.', 'frontglut' ) ), array( esc_html__( 'Capabilities', 'frontglut' ), esc_html__( 'Every action is guarded by a capability such as frontglut_manage_products. You grant these to WordPress roles in Roles & Access. A section is shown only when the user has the capability.', 'frontglut' ) ), array( esc_html__( 'Forms', 'frontglut' ), esc_html__( 'Post submission, registration, profile and contact screens are all driven by forms you can edit in the drag-and-drop builder.', 'frontglut' ) ), array( esc_html__( 'Shortcodes', 'frontglut' ), esc_html__( 'Pages are made by placing shortcodes such as [frontglut_dashboard] or [frontglut_login]. Required pages are created automatically on activation.', 'frontglut' ) ), ) ); $o .= self::note( wp_kses_post( __( 'Use the tabs above to read how each feature works. Start with Getting started if the plugin is new on your site.', 'frontglut' ) ) ); return $o; } private static function sec_start() { $o = '

' . esc_html__( 'Set up in 6 steps', 'frontglut' ) . '

'; $o .= self::steps( array( /* translators: %s: value. */ '' . esc_html__( 'Check the Setup checklist.', 'frontglut' ) . ' ' . sprintf( wp_kses_post( __( 'Open %s. It lists what is still missing (pages, roles reviewed, etc.) and links you to the right screen. "Re-create pages" rebuilds the dashboard, login, register and account pages if you deleted them.', 'frontglut' ) ), self::link( 'setup', __( 'Setup', 'frontglut' ) ) ), /* translators: %s: value. */ '' . esc_html__( 'Assign the pages.', 'frontglut' ) . ' ' . sprintf( wp_kses_post( __( 'In %s choose which page holds the dashboard, login, registration, lost-password and account screens. These links are used in emails and redirects.', 'frontglut' ) ), self::link( 'general', __( 'General', 'frontglut' ) ) ), /* translators: %s: value. */ '' . esc_html__( 'Pick modules.', 'frontglut' ) . ' ' . sprintf( wp_kses_post( __( 'In %s switch on only what you need. WooCommerce-based modules require WooCommerce to be active. Marketplace is off by default.', 'frontglut' ) ), self::link( 'modules', __( 'Modules', 'frontglut' ) ) ), /* translators: %s: value. */ '' . esc_html__( 'Brand it.', 'frontglut' ) . ' ' . sprintf( wp_kses_post( __( 'In %s set the primary colour, corner radius, font, light/dark mode and logo.', 'frontglut' ) ), self::link( 'theme', __( 'Appearance', 'frontglut' ) ) ), /* translators: %s: value. */ '' . esc_html__( 'Review roles.', 'frontglut' ) . ' ' . sprintf( wp_kses_post( __( 'In %s decide which role may do what. Sensible defaults are installed (see the Accounts & roles tab).', 'frontglut' ) ), self::link( 'roles', __( 'Roles & Access', 'frontglut' ) ) ), '' . esc_html__( 'Test as a normal user.', 'frontglut' ) . ' ' . esc_html__( 'Open the dashboard page in a private window, register, and confirm you see only what that role should see.', 'frontglut' ), ) ); $o .= self::note( wp_kses_post( __( 'After changing module switches or the store URL base, the plugin refreshes permalinks automatically. If a page shows "not found", visit Settings → Permalinks and press Save once.', 'frontglut' ) ), 'tip' ); return $o; } private static function sec_dashboard() { $o = '

' . esc_html__( 'The frontend dashboard', 'frontglut' ) . '

'; $o .= '

' . wp_kses_post( __( 'Place [frontglut_dashboard] on a page (done for you on activation). Logged-in users with the capability frontglut_access_dashboard see an app: a sidebar menu on the left, content on the right, and a "+ New" button to create things quickly. Guests are sent to the login page.', 'frontglut' ) ) . '

'; $o .= '

' . esc_html__( 'Layout options', 'frontglut' ) . '

'; $o .= self::table( array( __( 'Setting', 'frontglut' ), __( 'Effect', 'frontglut' ) ), array( array( 'Canvas', esc_html__( 'Full-screen app. The theme header and footer are not shown.', 'frontglut' ) ), array( 'Full width / Contained', esc_html__( 'The dashboard sits inside your theme page, either edge to edge or in the theme content column.', 'frontglut' ) ), array( esc_html__( 'Light / dark / auto', 'frontglut' ), esc_html__( 'Auto follows the visitor device setting.', 'frontglut' ) ), ) ); $o .= '

' . esc_html__( 'Menu and widgets', 'frontglut' ) . '

'; $o .= ''; return $o; } private static function sec_accounts() { $o = '

' . esc_html__( 'Login, registration and profile', 'frontglut' ) . '

'; $o .= '

' . esc_html__( 'These screens replace wp-login.php for your visitors. Settings are under Accounts & Login.', 'frontglut' ) . '

'; $o .= self::table( array( __( 'Feature', 'frontglut' ), __( 'How it works', 'frontglut' ) ), array( array( '' . esc_html__( 'Registration', 'frontglut' ) . '', esc_html__( 'Switch "Allow frontend registration" on. New users get the chosen default role. The registration form is an editable form (Forms tab), so you can add fields.', 'frontglut' ) ), array( '' . esc_html__( 'Admin approval', 'frontglut' ) . '', esc_html__( 'New accounts stay pending until you approve them. They cannot log in until then.', 'frontglut' ) ), array( '' . esc_html__( 'Email verification', 'frontglut' ) . '', esc_html__( 'The user receives a link and must click it before logging in.', 'frontglut' ) ), array( '' . esc_html__( 'Lockout', 'frontglut' ) . '', esc_html__( 'After N failed logins an IP/user is locked for M minutes. Registrations per IP per hour are also limited.', 'frontglut' ) ), array( '' . esc_html__( 'Redirects', 'frontglut' ) . '', esc_html__( 'Choose where users land after login, registration and logout. Per-role rules: one line each, role|https://example.com/page.', 'frontglut' ) ), array( '' . esc_html__( 'Keep users out of wp-admin', 'frontglut' ) . '', esc_html__( 'Select roles to block from wp-admin; they are sent to the frontend dashboard. Optionally hide the admin toolbar for them.', 'frontglut' ) ), array( '' . esc_html__( 'Social login', 'frontglut' ) . '', esc_html__( 'Add Google and/or Facebook credentials. Buttons then appear on login and registration. The redirect URI to register with each provider is shown under the field.', 'frontglut' ) ), array( '' . esc_html__( 'Profile', 'frontglut' ) . '', esc_html__( 'Users edit name, email, bio, avatar and password, and can request export or deletion of their personal data (GDPR), if you allow it.', 'frontglut' ) ), ) ); $o .= '

' . esc_html__( 'Roles and capabilities', 'frontglut' ) . '

'; /* translators: %s: value. */ $o .= '

' . sprintf( wp_kses_post( __( 'The %s screen is a matrix: rows are capabilities, columns are WordPress roles. Tick a box to grant the capability. You can also create custom roles (and delete them again). Administrators always have everything.', 'frontglut' ) ), self::link( 'roles', __( 'Roles & Access', 'frontglut' ) ) ) . '

'; $o .= self::table( array( __( 'Capability', 'frontglut' ), __( 'Allows', 'frontglut' ) ), array( array( 'frontglut_access_dashboard', esc_html__( 'Open the frontend dashboard at all', 'frontglut' ) ), array( 'frontglut_manage_posts / frontglut_publish_posts', esc_html__( 'Submit own posts / publish without moderation', 'frontglut' ) ), array( 'frontglut_moderate', esc_html__( 'Review other people\'s submissions, manage categories and knowledge base', 'frontglut' ) ), array( 'frontglut_upload_files / frontglut_manage_files', esc_html__( 'Upload files / use the file manager', 'frontglut' ) ), array( 'frontglut_manage_products, frontglut_manage_orders, frontglut_manage_coupons, frontglut_view_reports, frontglut_manage_customers, frontglut_manage_reviews', esc_html__( 'The matching store sections', 'frontglut' ) ), array( 'frontglut_is_vendor / frontglut_manage_vendors', esc_html__( 'Own a store / administer vendors, commissions and withdrawals', 'frontglut' ) ), array( 'frontglut_send_notices / frontglut_manage_tickets', esc_html__( 'Send announcements / answer support tickets', 'frontglut' ) ), array( 'frontglut_manage_settings', esc_html__( 'Use this admin screen and the activity log', 'frontglut' ) ), ) ); $o .= self::note( esc_html__( 'Defaults: Shop manager gets all store capabilities; Editor can publish and moderate; Author can publish own posts; Contributor posts go to moderation; Subscriber and Customer only get dashboard access.', 'frontglut' ) ); return $o; } private static function sec_forms() { $o = '

' . esc_html__( 'The form builder', 'frontglut' ) . '

'; /* translators: %s: value. */ $o .= '

' . sprintf( wp_kses_post( __( 'Open %s to list, create, edit, duplicate, import and export forms. Registration, profile and post-submission screens each use a form, so changing the form changes the screen.', 'frontglut' ) ), self::link( 'forms', __( 'Forms', 'frontglut' ) ) ) . '

'; $o .= '

' . esc_html__( 'Form types', 'frontglut' ) . '

'; $o .= self::cards( array( array( 'post', esc_html__( 'Creates a WordPress post (or custom post type). Includes status, author, editor choice, success message and redirect.', 'frontglut' ) ), array( 'custom', esc_html__( 'A general form (for example Contact). Each submission is stored as a "Form entry" you read under FrontGlut → Form entries.', 'frontglut' ) ), array( 'register / profile', esc_html__( 'Drive the registration and profile screens. Extra fields are saved to the user.', 'frontglut' ) ), ) ); $o .= '

' . esc_html__( 'Building a form', 'frontglut' ) . '

'; $o .= self::steps( array( esc_html__( 'Create a form, or start from a template: Article, Recipe, Classified ad, Photo story, Contact form.', 'frontglut' ), esc_html__( 'Add fields from the palette on the left, then drag them to reorder. Click a field to edit it in the panel on the right.', 'frontglut' ), esc_html__( 'For each field set label, key, required, placeholder, help text, default value, width (so two fields can sit side by side), min/max or length limits, and which roles can see it.', 'frontglut' ), esc_html__( 'Optionally add conditional logic: show a field only when another field has a certain value.', 'frontglut' ), esc_html__( 'Set form options: success message, redirect, notify admin / notify user, captcha, allow guests, submissions per hour.', 'frontglut' ), esc_html__( 'Place the form with its shortcode (shown in the forms list).', 'frontglut' ), ) ); $o .= '

' . esc_html__( 'Field types', 'frontglut' ) . '

'; $o .= '
'; foreach ( array( 'Text', 'Textarea', 'Rich editor', 'Number', 'Email', 'URL', 'Phone', 'Password', 'Date', 'Colour', 'Select', 'Multi select', 'Radio buttons', 'Checkbox', 'Checkbox group', 'File upload', 'Image upload', 'Gallery', 'Table', 'Hidden', 'Heading', 'Info text' ) as $t ) { $o .= '' . esc_html( $t ) . ''; } $o .= '
'; $o .= self::note( esc_html__( 'Fields can be stored as post meta (default), as the post title/content/excerpt, or as user meta, depending on the form type. Developers can register more field types.', 'frontglut' ) ); return $o; } private static function sec_posts() { $o = '

' . esc_html__( 'Post submission and moderation', 'frontglut' ) . '

'; $o .= '

' . esc_html__( 'Let members, and optionally guests, submit posts from the frontend, and review them before they go live.', 'frontglut' ) . '

'; $o .= '

' . esc_html__( 'The flow', 'frontglut' ) . '

'; $o .= self::steps( array( esc_html__( 'A visitor fills in a post form (shortcode [frontglut_post_form id="…"]). Guests need the form\'s "allow guests" option; captcha is recommended for them.', 'frontglut' ), esc_html__( 'The post is saved with the form\'s status (usually Pending). Users with frontglut_publish_posts can be given Publish instead, and per-role status can be set.', 'frontglut' ), esc_html__( 'Moderators see it in Dashboard → Moderation (with a badge count). They approve, or reject with a reason; the author is emailed and notified.', 'frontglut' ), esc_html__( 'Authors see their posts in My posts, edit them (statuses you allow), and optionally delete them.', 'frontglut' ), ) ); $o .= '

' . esc_html__( 'Post submission settings', 'frontglut' ) . '

'; $o .= self::table( array( __( 'Setting', 'frontglut' ), __( 'What it does', 'frontglut' ) ), array( array( esc_html__( 'Authors may edit posts while in status', 'frontglut' ), esc_html__( 'Which statuses (draft, pending, published) an author may still edit.', 'frontglut' ) ), array( esc_html__( 'Edits to published posts go back to pending', 'frontglut' ), esc_html__( 'Non-moderators\' edits must be re-approved.', 'frontglut' ) ), array( esc_html__( 'Authors may delete / deleting moves to trash', 'frontglut' ), esc_html__( 'Allow deletion, and keep a recoverable copy in the trash.', 'frontglut' ) ), array( esc_html__( 'Block duplicate titles', 'frontglut' ), esc_html__( 'Stops the same author posting the same title twice within 24 hours.', 'frontglut' ) ), array( esc_html__( 'Count and show views', 'frontglut' ), esc_html__( 'Tracks views of submitted posts.', 'frontglut' ) ), ) ); $o .= '

' . esc_html__( 'Categories, tags and custom post types', 'frontglut' ) . '

'; $o .= ''; return $o; } private static function sec_store() { $o = '
' . esc_html__( 'Requires WooCommerce', 'frontglut' ) . '
'; $o .= '

' . esc_html__( 'Products', 'frontglut' ) . '

'; $o .= '

' . esc_html__( 'Dashboard → Products lists products with search, status and bulk actions. The editor is split into tabs:', 'frontglut' ) . '

'; $o .= '
'; foreach ( array( 'General', 'Inventory', 'Shipping', 'Tax', 'Downloads', 'Attributes', 'Variations', 'Linked products', 'Advanced' ) as $t ) { $o .= '' . esc_html( $t ) . ''; } $o .= '
'; $o .= '

' . esc_html__( 'Controlling what users can do (Products settings)', 'frontglut' ) . '

'; $o .= self::table( array( __( 'Setting', 'frontglut' ), __( 'What it does', 'frontglut' ) ), array( array( esc_html__( 'Status for products created by non-managers', 'frontglut' ), esc_html__( 'Publish immediately, or hold as Pending review.', 'frontglut' ) ), array( esc_html__( 'Product types users can create', 'frontglut' ), esc_html__( 'Limit to simple, variable, etc.', 'frontglut' ) ), array( esc_html__( 'Hide fields (everyone / per role)', 'frontglut' ), esc_html__( 'Remove fields such as SKU from the form. Per role: one line, role|field1,field2.', 'frontglut' ) ), array( esc_html__( 'Product limit per role', 'frontglut' ), esc_html__( 'One line per role, role|number, for example author|25.', 'frontglut' ) ), array( esc_html__( 'Gallery images limit / restrict categories', 'frontglut' ), esc_html__( 'Caps gallery size and limits which categories can be used.', 'frontglut' ) ), ) ); $o .= '

' . esc_html__( 'Orders, coupons, reports, customers, reviews', 'frontglut' ) . '

'; $o .= self::cards( array( array( esc_html__( 'Orders', 'frontglut' ), esc_html__( 'View items, tax, shipping and addresses; change status; add notes; bulk actions. Vendors only see their own orders.', 'frontglut' ) ), array( esc_html__( 'Coupons', 'frontglut' ), esc_html__( 'Create and edit coupons with type, amount, expiry and usage limits.', 'frontglut' ) ), array( esc_html__( 'Reports', 'frontglut' ), esc_html__( 'Sales by date range and out-of-stock products.', 'frontglut' ) ), array( esc_html__( 'Customers', 'frontglut' ), esc_html__( 'A simple CRM: each customer\'s orders and total spend.', 'frontglut' ) ), array( esc_html__( 'Reviews', 'frontglut' ), esc_html__( 'Approve, unapprove, reply to or delete product reviews.', 'frontglut' ) ), ) ); return $o; } private static function sec_market() { $o = '
' . esc_html__( 'Requires WooCommerce · optional module', 'frontglut' ) . '
'; $o .= '

' . esc_html__( 'Turn your shop into a multi-vendor marketplace', 'frontglut' ) . '

'; /* translators: 1: value, 2: value. */ $o .= '

' . sprintf( wp_kses_post( __( 'Enable Multivendor in %1$s, then configure %2$s.', 'frontglut' ) ), self::link( 'modules', __( 'Modules', 'frontglut' ) ), self::link( 'vendors', __( 'Marketplace', 'frontglut' ) ) ) . '

'; $o .= '

' . esc_html__( 'Vendor lifecycle', 'frontglut' ) . '

'; $o .= self::steps( array( esc_html__( 'A person applies using [frontglut_vendor_register] (needs "Allow people to apply as vendors").', 'frontglut' ), esc_html__( 'If "New vendors require admin approval" is on, an admin approves them in Dashboard → Vendors. Otherwise they become vendors immediately.', 'frontglut' ), esc_html__( 'The vendor gets the frontglut_vendor role: they manage their own store profile (My store), their own products and orders, and see Earnings.', 'frontglut' ), esc_html__( 'Customers browse stores on a page with [frontglut_stores] and open each public storefront at your store URL base (for example /store/my-shop/).', 'frontglut' ), esc_html__( 'When an order is placed, each vendor\'s items are split into a sub-order (optional) and a commission is recorded.', 'frontglut' ), esc_html__( 'The vendor requests a withdrawal; an admin approves and pays it (or it is requested automatically each week).', 'frontglut' ), ) ); $o .= '

' . esc_html__( 'Marketplace settings', 'frontglut' ) . '

'; $o .= self::table( array( __( 'Setting', 'frontglut' ), __( 'What it does', 'frontglut' ) ), array( array( esc_html__( 'Vendor engine', 'frontglut' ), esc_html__( 'Use the built-in vendors, or read data from an existing Dokan install.', 'frontglut' ) ), array( esc_html__( 'Store URL base', 'frontglut' ), esc_html__( 'The path prefix for storefronts. Re-save permalinks after changing.', 'frontglut' ) ), array( esc_html__( 'Split multi-vendor carts', 'frontglut' ), esc_html__( 'Creates one sub-order per vendor so each ships and is paid separately.', 'frontglut' ) ), array( esc_html__( 'Per-vendor shipping', 'frontglut' ), esc_html__( 'Adds a "Vendor shipping" method you attach to a WooCommerce shipping zone; each vendor sets their own rates.', 'frontglut' ) ), array( esc_html__( 'Commission type', 'frontglut' ), esc_html__( 'Percentage of the sale or a flat amount per item. Category overrides: one line each, category-slug|percent. Product and vendor-specific overrides take priority.', 'frontglut' ) ), array( esc_html__( 'Record earnings when order is', 'frontglut' ), esc_html__( 'Processing (pending until completed) or only Completed.', 'frontglut' ) ), array( esc_html__( 'Withdrawals', 'frontglut' ), esc_html__( 'Minimum amount, a hold period in days after completion, payout methods (PayPal, bank, manual) and automatic weekly requests.', 'frontglut' ) ), ) ); $o .= self::note( esc_html__( 'Admin screens: Dashboard → Vendors (applications), Commissions (every earning with its status) and Withdrawals (approve, reject, mark paid).', 'frontglut' ) ); return $o; } private static function sec_comms() { $o = '

' . esc_html__( 'Communication tools', 'frontglut' ) . '

'; $o .= '

' . esc_html__( 'Enable the Communication module to give your community ways to talk to you and to each other.', 'frontglut' ) . '

'; $o .= self::cards( array( array( esc_html__( 'Notifications', 'frontglut' ), esc_html__( 'A bell with an unread count. The plugin notifies users about approvals, replies, new followers and more. "Mark all as read" clears the badge.', 'frontglut' ) ), array( esc_html__( 'Announcements', 'frontglut' ), esc_html__( 'Staff with frontglut_send_notices publish a notice for everyone or for chosen roles. It shows in the Overview widget, can create a bell notification for each recipient and can also be emailed.', 'frontglut' ) ), array( esc_html__( 'Messages', 'frontglut' ), esc_html__( 'Private conversations between users (for example customer and vendor). Rate-limited to prevent spam.', 'frontglut' ) ), array( esc_html__( 'Support tickets', 'frontglut' ), esc_html__( 'Customers open a ticket; staff with frontglut_manage_tickets are notified, reply from the dashboard and close it. Customers reply from the same thread or by email.', 'frontglut' ) ), array( esc_html__( 'Product enquiries', 'frontglut' ), esc_html__( 'The [frontglut_enquiry] form lets a shopper ask a question about a product. It becomes a conversation with the vendor or staff.', 'frontglut' ) ), array( esc_html__( 'Knowledge base', 'frontglut' ), esc_html__( 'Articles with categories, shown on a public page with [frontglut_kb] (with search). Manage under FrontGlut → Knowledge base in wp-admin or in the dashboard.', 'frontglut' ) ), array( esc_html__( 'Followers', 'frontglut' ), esc_html__( '[frontglut_follow id="…" type="author|store"] adds a Follow button. Followers get a digest of new content from who they follow.', 'frontglut' ) ), ) ); $o .= '

' . esc_html__( 'Emails', 'frontglut' ) . '

'; /* translators: %s: value. */ $o .= '

' . sprintf( wp_kses_post( __( 'In %s each email the plugin sends has its own switch, subject and body with placeholders such as {site_name}. You can set the From name/address and footer, send a test mail, and queue emails to the background (WP-Cron) so pages stay fast.', 'frontglut' ) ), self::link( 'emails', __( 'Emails', 'frontglut' ) ) ) . '

'; return $o; } private static function sec_files() { $o = '

' . esc_html__( 'Uploader and file manager', 'frontglut' ) . '

'; $o .= self::cards( array( array( '[frontglut_uploader]', esc_html__( 'A drag-and-drop upload box with a progress bar and thumbnail previews. Guests can use it only if "Allow guests" is on in Uploads settings.', 'frontglut' ) ), array( '[frontglut_file_explorer]', esc_html__( 'An Explorer-style browser with breadcrumbs, sorting and pagination. Add folder="name" to show one folder. Public pages are read-only.', 'frontglut' ) ), array( esc_html__( 'Dashboard → My files / File manager', 'frontglut' ), esc_html__( 'Logged-in users manage their files. The file manager (frontglut_manage_files) adds folders, rename, move, copy (with skip / replace / keep both), ZIP download of a folder and import from the Media Library.', 'frontglut' ) ), ) ); $o .= '

' . esc_html__( 'Rules you control', 'frontglut' ) . '

'; $o .= self::table( array( __( 'Setting', 'frontglut' ), __( 'Meaning', 'frontglut' ) ), array( array( esc_html__( 'Allowed extensions, max size, uploads per hour', 'frontglut' ), esc_html__( 'Uploads tab. Executable file types are always blocked.', 'frontglut' ) ), array( esc_html__( 'Who can browse the explorer', 'frontglut' ), esc_html__( 'Everyone, or logged-in users only (Files tab).', 'frontglut' ) ), array( esc_html__( 'Protect files', 'frontglut' ), esc_html__( 'Blocks direct URLs; files are delivered through PHP so the visibility rule always applies.', 'frontglut' ) ), array( esc_html__( 'Max ZIP download size', 'frontglut' ), esc_html__( 'Prevents huge folder downloads from overloading the server.', 'frontglut' ) ), array( esc_html__( 'Uploaded files', 'frontglut' ), esc_html__( 'An admin list of everything uploaded through the plugin.', 'frontglut' ) ), ) ); return $o; } private static function sec_security() { $o = '

' . esc_html__( 'Spam protection', 'frontglut' ) . '

'; /* translators: %s: value. */ $o .= '

' . sprintf( wp_kses_post( __( 'In %s choose reCAPTCHA (v2 or v3), hCaptcha or Cloudflare Turnstile, paste the site and secret keys, and tick where it applies: login, registration, lost password, post forms and product enquiries. For reCAPTCHA v3 set the minimum score (0 to 1; higher is stricter).', 'frontglut' ) ), self::link( 'captcha', __( 'Spam protection', 'frontglut' ) ) ) . '

'; $o .= '

' . esc_html__( 'Built-in protection', 'frontglut' ) . '

'; $o .= ''; $o .= '

' . esc_html__( 'System screens', 'frontglut' ) . '

'; $o .= self::cards( array( array( esc_html__( 'System status', 'frontglut' ), esc_html__( 'Checks PHP, WordPress, WooCommerce, pages, tables and permalinks, with hints on how to fix problems.', 'frontglut' ) ), array( esc_html__( 'Activity log', 'frontglut' ), esc_html__( 'An audit trail of important actions (settings saved, approvals, payouts) with who and when. Old rows are deleted after the number of days set in General.', 'frontglut' ) ), array( esc_html__( 'Tools', 'frontglut' ), esc_html__( 'Export and import all settings, clear caches, choose whether data is deleted when the plugin is deleted, and reset to defaults (danger zone).', 'frontglut' ) ), array( esc_html__( 'Privacy', 'frontglut' ), esc_html__( 'Data stored by the plugin is included in WordPress\' personal data export and erase tools.', 'frontglut' ) ), array( esc_html__( 'Add-ons', 'frontglut' ), esc_html__( 'Shows extensions such as Pro that plug into the hooks documented in docs/hooks.md.', 'frontglut' ) ), ) ); return $o; } private static function sec_shortcodes() { $rows = array( array( '[frontglut_dashboard]', 'The whole dashboard app.' ), array( '[frontglut_login] [frontglut_register] [frontglut_lost_password]', 'Account forms, with captcha and social buttons when enabled.' ), array( '[frontglut_profile]', 'Profile editor (details, password, privacy).' ), array( '[frontglut_post_form id="12"]', 'A post submission form. Find the id in the Forms list.' ), array( '[frontglut_post_list] [frontglut_post_edit]', 'The user\'s own submissions, and the edit screen.' ), array( '[frontglut_form id="12"]', 'Any custom form, for example Contact.' ), array( '[frontglut_stores]', 'Marketplace store directory with search and filters.' ), array( '[frontglut_vendor_register]', 'Vendor application form.' ), array( '[frontglut_uploader]', 'Drag-and-drop uploader.' ), array( '[frontglut_file_explorer folder="docs"]', 'File browser, optionally for one folder.' ), array( '[frontglut_kb]', 'Searchable knowledge base.' ), array( '[frontglut_follow id="5" type="author"]', 'Follow button (type: author or store).' ), array( '[frontglut_enquiry]', 'Product question form.' ), array( '[frontglut_member id="5"]', 'Public member card.' ), ); foreach ( $rows as &$r ) { $r = array( '' . esc_html( $r[0] ) . '', esc_html( $r[1] ) ); } return '

' . esc_html__( 'Shortcode reference', 'frontglut' ) . '

' . self::table( array( __( 'Shortcode', 'frontglut' ), __( 'Shows', 'frontglut' ) ), $rows ); } }