Download the PHP package theaminulai/feedback-sdk without Composer

On this page you can find all versions of the php package theaminulai/feedback-sdk. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.

FAQ

After the download, you have to make one include require_once('vendor/autoload.php');. After that you have to import the classes with use statements.

Example:
If you use only one package a project is not needed. But if you use more then one package, without a project it is not possible to import the classes with use statements.

In general, it is recommended to use always a project to download your libraries. In an application normally there is more than one library needed.
Some PHP packages are not free to download and because of that hosted in private repositories. In this case some credentials are needed to access such packages. Please use the auth.json textarea to insert credentials, if a package is coming from a private repository. You can look here for more information.

  • Some hosting areas are not accessible by a terminal or SSH. Then it is not possible to use Composer.
  • To use Composer is sometimes complicated. Especially for beginners.
  • Composer needs much resources. Sometimes they are not available on a simple webspace.
  • If you are using private repositories you don't need to share your credentials. You can set up everything on our site and then you provide a simple download link to your team member.
  • Simplify your Composer build process. Use our own command line tool to download the vendor folder as binary. This makes your build process faster and you don't need to expose your credentials for private repositories.
Please rate this library. Is it a good library?

Informations about the package feedback-sdk

Feedback SDK Banner # feedback-sdk — WordPress Plugin Deactivation Modal SDK **The client-side Composer package.** Drop into any WordPress plugin to show a beautiful deactivation feedback modal and send data to the central Feedback server. [![Packagist](https://img.shields.io/packagist/v/theaminulai/feedback-sdk?label=packagist)](https://packagist.org/packages/theaminulai/feedback-sdk) [![PHP](https://img.shields.io/badge/PHP-7.4%2B-purple?logo=php)](https://php.net) [![WordPress](https://img.shields.io/badge/WordPress-6.0%2B-blue?logo=wordpress)](https://wordpress.org) [![License](https://img.shields.io/badge/License-GPL%20v2%2B-green)](https://www.gnu.org/licenses/gpl-2.0.html) [Installation](#-installation) · [Quick Start](#-quick-start) · [Configuration](#-configuration-reference) · [Theming](#-theming) · [Reasons](#-reason-customization) · [Hooks](#-hooks--filters) · [Troubleshooting](#-troubleshooting)

📖 Overview

feedback-sdk intercepts the WordPress "Deactivate" link for your plugin, shows a branded feedback modal, collects the user's reason (with an optional message), and fires the data to the central Feedback server plugin before completing the deactivation.

If the network request fails, the deactivation still completes — users are never blocked.


✅ Requirements

Requirement Minimum
PHP 7.4
WordPress 6.0

📦 Installation

Option A — Composer (recommended)

Composer's autoloader handles class loading automatically via PSR-4.

Option B — Manual

  1. Copy the feedback-sdk/ folder into your plugin directory
  2. Require the entry file before calling SDK::init():

📁 File Structure


⚡ Quick Start

Add this to your plugin's main file (or a bootstrap class):

That's all. The SDK:


🔧 Configuration Reference

Pass all configuration as a single array to SDK::init().

Required

Key Type Description
plugin_name string Human-readable name shown in the modal heading
plugin_slug string WordPress plugin folder slug — must match exactly (e.g. elementskit-lite)
plugin_version string Current version string sent to the server
api_endpoint string Full URL of the server's /collect REST endpoint
api_key string API key from Plugin Feedback → Settings → API Key

Optional — Behaviour

Key Type Default Description
is_pro bool false Marks feedback as coming from the Pro version
gdpr bool false Show a GDPR consent checkbox; unchecked = admin_email not sent
debug bool false Log SDK events to PHP error_log() and browser console.log
modal_title string 'Why are you deactivating %s?' Modal question — %s is replaced with plugin_name

Optional — Branding

Key Type Default Description
brand_name string 'Quick Feedback' Text shown in the modal header
brand_icon string 'ti-bolt' Any Tabler Icon class name
brand_icon_url string '' Image URL for the brand icon — overrides brand_icon when set

Optional — Typography

Key Type Default Description
font_family string 'DM Sans' CSS font-family name
font_url string DM Sans Google CDN Full <link> href for loading the font. Set to '' to skip
font_size_base int 13 Base font size in px for all modal text

Optional — Colors & Layout

Key Type Default Description
primary_color string '#9b59e8' Accent color for radio dots, option borders, textarea focus ring
primary_gradient string 'linear-gradient(135deg,#c94cbf,#7b6ef6)' CSS background for Submit button and brand icon circle
bg_overlay string 'rgba(15,15,30,.55)' Full-screen backdrop color
modal_bg string '#ffffff' Modal background color
modal_radius int 20 Modal border-radius in px
option_bg string '#faf8ff' Background of unselected option rows
option_active_bg string '#f9f4ff' Background of the selected option row
option_active_border string same as primary_color Border color of the selected option row
text_primary string '#1a1a2e' Primary text color
text_muted string '#9ca3af' Placeholder / muted text color
border_color string '#ede8f5' Default border color for option rows

Optional — Strings (i18n)

Override any modal label without modifying plugin files:

Key Default
i18n['submit'] 'Submit & Deactivate'
i18n['skip'] 'Skip & Deactivate'
i18n['cancel'] 'Cancel'
i18n['gdpr_label'] 'I agree to share this feedback anonymously.'

🎨 Theming

Method 1 — PHP config (recommended)

Pass theme keys directly to SDK::init(). The SDK injects them as CSS custom properties scoped to your plugin's overlay:

Method 2 — CSS custom properties

Every color is a CSS variable scoped to your overlay ID (#feedback-sdk-modal-{slug}). Override them in your plugin's admin CSS:

All available CSS custom properties

Property Default
--fbk-primary #9b59e8
--fbk-gradient linear-gradient(135deg,#c94cbf,#7b6ef6)
--fbk-overlay rgba(15,15,30,.55)
--fbk-modal-bg #ffffff
--fbk-modal-radius 20px
--fbk-opt-bg #faf8ff
--fbk-opt-active-bg #f9f4ff
--fbk-opt-active-bdr same as --fbk-primary
--fbk-text #1a1a2e
--fbk-muted #9ca3af
--fbk-border #ede8f5
--fbk-font 'DM Sans', -apple-system, sans-serif
--fbk-font-size 13.5px

📋 Reason Customization

Use default reasons (no config needed)

The 8 built-in reasons are used automatically:

Key Label Placeholder
no-longer-needed I no longer need the plugin What did you use it for?
found-better I found a better plugin Which plugin?
not-working I couldn't get the plugin to work What issue did you face?
temp-disabled It's temporarily disabled When do you plan to reactivate?
missing-feature Missing feature Which feature?
too-expensive Too expensive What price would work for you?
bug-issue Bug or issue Please describe the issue
other Other Please share your thoughts

Hide specific reasons

Add extra reasons

Replace all reasons completely


📡 What Data Is Sent to the Server

When a user submits feedback, this JSON payload is posted to api_endpoint:

The request uses 'blocking' => false so the user is never waiting for a server response — the deactivation URL is followed immediately.


🔁 Retry Queue

If the API call fails (server unreachable, timeout, etc.), the payload is stored in a WordPress transient (feedback_sdk_retry_queue) for up to 24 hours.

Flush manually (e.g. on admin_init or a WP-Cron hook):

Or hook it to a scheduled event:


🔗 Hooks & Filters

Actions

Filters


🔒 Security

Layer Implementation
Nonce Every AJAX action verified with check_ajax_referer("feedback_sdk_{$slug}")
Capability activate_plugins checked on every AJAX handler
Sanitization All POST fields: sanitize_text_field, sanitize_textarea_field
API Key Sent in HTTP header only, never exposed in JS or HTML source
HMAC Signing hash_hmac('sha256', $body, $api_key) on every request
XSS in JS All user values escaped with $('<span>').text(val).html() before DOM insertion
Non-blocking 'blocking' => false — server response never delays the user's browser

🧩 jQuery Plugin API

The modal is built as a jQuery plugin registered as $.fn.feedbackSdkModal.

Auto-initialisation happens on DOM ready for every #feedback-sdk-modal-{slug} element found on the page. Manual usage:


🔌 AJAX Endpoints

Two WordPress AJAX actions are registered per plugin slug:

Action Handler Description
feedback_sdk_submit_{slug} Deactivation::handle_ajax() Sends feedback + returns deactivation URL
feedback_sdk_skip_{slug} Deactivation::handle_skip() Returns deactivation URL immediately (no send)

Both require nonce feedback_sdk_{slug} and activate_plugins capability.


❌ What Cannot Be Changed

These items are hard-coded and require code edits to modify:

Item Value Where
Number of modal options shown All provided reasons assets/js/modal.jscfg.reasons loop
Textarea rows 2 modal.js_buildHtml()
Button order Skip · Cancel · Submit modal.js_buildHtml()
AJAX action names feedback_sdk_submit_{slug} / feedback_sdk_skip_{slug} Core/Hooks.php
Retry TTL 24 hours API/Client.phpDAY_IN_SECONDS
Asset load condition plugins.php screen only Core/Assets.phpenqueue()
CSS animation style slide-up + fade assets/css/modal.css@keyframes fbkSlideUp

🐛 Troubleshooting

Problem Solution
Modal doesn't appear Confirm plugin_slug exactly matches the WordPress plugin folder name (case-sensitive)
Deactivation doesn't happen after submit Check browser Console for JS errors; confirm modal.js is enqueued on plugins.php
403 from server Verify api_key matches the key in server's Settings → API Key
AJAX nonce failure Ensure SDK::init() is called on plugins_loaded at priority ≥ 1 (before output)
Font not loading If behind a strict CSP, set 'font_url' => '' and load your font separately
GDPR checkbox missing Add 'gdpr' => true to the config array
Custom icon not showing Check that brand_icon_url is a publicly accessible URL; brand_icon is a fallback
Retry queue growing Call Client::flush_retry_queue() on a cron schedule; check that the server endpoint is reachable

Enable 'debug' => true to log all SDK events to PHP error_log() and browser console.log.


🤝 Contributing

  1. Fork github.com/theaminulai/feedback-sdk
  2. Create a branch: git checkout -b feature/my-feature
  3. All JS functions must have full JSDoc comments
  4. Follow WordPress Coding Standards
  5. Open a pull request

📋 Changelog

1.0.0 — 2026-05-18


All versions of feedback-sdk with dependencies

PHP Build Version
Package Version
Requires php Version >=7.4
Composer command for our command line client (download client) This client runs in each environment. You don't need a specific PHP version etc. The first 20 API calls are free. Standard composer command

The package theaminulai/feedback-sdk contains the following files

Loading the files please wait ...