Documentation for B7 Feedback Engine WP

B7 Feedback Engine WP Documentation

Introduction

Welcome to the documentation for B7 Feedback Engine WP. This powerful plugin enhances user engagement and gathers valuable insights on your WordPress content by seamlessly integrating a customizable feedback system (Like/Dislike reactions with optional comments) into your posts and pages.

This comprehensive guide provides detailed information on installation, configuration, usage, and developer aspects of the plugin, ensuring you can leverage its full potential.

Key Features

  • Easy Post Feedback: Intuitive Like/Dislike buttons for quick content rating.
  • Customizable Forms: Tailor text labels, choose from various form templates (Default, Center Title, Sticky Bottom, Flat), and apply extensive custom styling options with live preview.
  • Optional Comments: Allow detailed feedback with configurable comment area visibility (always, never, or based on feedback type).
  • Spam Prevention: Robust IP-based submission limits, honeypot fields, and a configurable feedback delay timer to deter abuse.
  • Comprehensive Admin Pages:
    • Feedback Data: Detailed table of all individual feedback submissions, with advanced filtering, sorting, and export to CSV.
    • Feedback Report: Visual summaries, overall statistics, and lists of top liked, disliked, and commented posts, complete with date, post type, and comment search filters.
  • Flexible Display: Automatically insert feedback forms into selected post types or use shortcodes to place them anywhere.
  • Dynamic Stats Display: Show feedback statistics for individual posts using the [b7_feedback_wp_stats] shortcode with options for submission counts or custom values, and various display templates (Default Bar, Versus Bar).
  • Content Overview Shortcode: The [b7_feedback_overview] shortcode allows you to display lists of recent or top-performing posts based on feedback, with customizable modes, limits, time ranges, and display templates (list/grid).
  • Customizable Text & Icons: Modify all user-facing text, and easily select Dashicons for your Like/Dislike buttons using a visual icon selector.
  • Email Notifications: Get notified about new feedback submissions based on configurable triggers (all, like, dislike, with comment).
  • Advanced Data Management: Export all feedback data to CSV, clear specific or all data, and set automatic data retention periods for privacy compliance.
  • Membership Controls: Restrict feedback submission by specific user roles and set global submission limits for logged-in users.
  • Styling Presets: Apply predefined styling themes or fine-tune every visual aspect of your forms (colors, fonts, spacing, borders, shadows).
  • Import/Export Settings: Easily backup and migrate your plugin configuration as JSON files.
  • Privacy Options: Anonymize IP addresses and usernames in stored feedback data to enhance user privacy.
  • Device Visibility Control: Hide the feedback form on specific device types (desktop, tablet, mobile, or a combination).
  • Prevent Self-Voting: Option to prevent post authors from seeing and submitting feedback on their own content.
  • Submit Loader Animation: Display a customizable loading animation (spinner, dots, pulse) when users submit feedback.
  • Granular Redirects: Define specific redirect URLs and delays for both 'Like' and 'Dislike' submissions.

Installation

  1. Download the plugin zip file from your purchase source.
  2. Log in to your WordPress admin dashboard.
  3. Navigate to Plugins > Add New.
  4. Click the Upload Plugin button at the top of the page.
  5. Choose the downloaded zip file (e.g., b7-feedback-engine-wp.zip) and click Install Now.
  6. Once installed, click Activate Plugin.
  7. **Alternative (Manual) Installation via FTP:**
    1. Unzip the downloaded plugin file.
    2. Connect to your WordPress site via FTP or your hosting control panel's file manager.
    3. Navigate to the /wp-content/plugins/ directory.
    4. Upload the entire unzipped b7-feedback-engine-wp folder into this directory.
    5. Go back to your WordPress admin dashboard, navigate to Plugins, and activate the "B7 Feedback Engine WP" plugin.
  8. After successful activation, you will find a new menu item, B7 Feedback Engine, in your WordPress admin sidebar. Click on it to configure the plugin settings.

Configuration Settings

Access the plugin settings via the B7 Feedback Engine menu in your WordPress admin sidebar. The settings are logically organized into several tabs for easy navigation:

General Tab

This tab controls the core behavior and display of the feedback forms and statistics.

  • Enable Feedback for Post Types: Select the public post types (e.g., Posts, Pages) on which the feedback form should be available. This also affects which post types can be selected in reports and shortcodes.
  • Auto Insert Feedback Form: If checked, the feedback form will automatically be appended to the end of the content for posts matching the selected post types and any configured taxonomy conditions. If unchecked, you must use the [b7_feedback_wp] shortcode to display the form.
  • Taxonomy Condition (Optional): Refine automatic insertion or shortcode display to *only* posts that belong to specific taxonomy terms.
    Format: taxonomy_slug:::term_slug1, term_slug2 (comma-separated term slugs).
    Examples:
    • For category 'News': category:::news
    • For tags 'WordPress' and 'Plugins': post_tag:::wordpress, plugins
    Leave this field empty to disable this condition and apply to all selected post types. Use term slugs, not term names.
  • Feedback Form Template: Choose the overall visual layout of the feedback form:
    • Default: Standard block layout with the title above the buttons.
    • Center Title: Centers the form title and feedback buttons within the container.
    • Sticky Bottom: Fixes the main feedback bar (title and buttons) to the bottom of the user's viewport. The comment area will appear dynamically above this bar when triggered.
    • Flat: Displays the title and feedback buttons inline within a single horizontal header section.
  • Feedback Comment Display: Control the visibility and behavior of the optional comment textarea:
    • Always Show: The comment area is permanently visible below the feedback buttons.
    • Show on Dislike: The comment area only appears (slides down) after the "Dislike" button is clicked (Default).
    • Show on Like: The comment area only appears after the "Like" button is clicked.
    • Show on Any Feedback: The comment area appears after clicking either the "Like" or "Dislike" button.
    • Never Show: The comment area is completely hidden. Feedback is submitted immediately upon clicking Like/Dislike.
  • Feedback Comment Character Limit: Set the maximum number of characters users can enter into the feedback comment textarea.
  • Prevent Author Self-Voting: If checked, post authors will not see the feedback form on their own content, preventing them from influencing their own statistics.
  • Disable Form on Devices: Hide the feedback form based on the user's device screen size using responsive CSS classes:
    • Show on All Devices: Form is always visible.
    • Hide on Desktop: Hides on screens wider than 1024px.
    • Hide on Tablet: Hides on screens between 768px and 1024px.
    • Hide on Mobile: Hides on screens narrower than 768px.
    • Hide on Tablet & Mobile: Hides on screens narrower than 1024px.
  • **UI Enhancements (Section Header)**
  • Enable Submit Loader: If checked, a loading animation will be displayed as an overlay on the form when a user clicks a feedback button and the submission is being processed.
  • Loader Animation Style: Choose the visual style for the submit loader: Spinner, Bouncing Dots, or Pulse.

Stats Section (General Tab)

These settings control the automatic display of feedback statistics on individual posts. Note: These settings apply only if 'Auto Insert Feedback Form' is enabled and a display position is selected. Otherwise, use the [b7_feedback_wp_stats] shortcode with its builder in the Tools tab.

  • Display Stats Position: Choose where to automatically insert the feedback statistics block within the post content: Disable, Top of content, Before first H2, After first Paragraph.
  • Stats Type to Display: Select whether to show 'Submission Stats' (based on actual user likes/dislikes from the database) or 'Custom Stats' (based on values you manually enter in the post editor metabox).
  • Stat Template: Choose the visual style for the displayed stats:
    • Default Bar: Shows separate like/dislike counts and percentages.
    • Versus Bar: Displays a single progress bar showing the ratio of likes to dislikes.
  • Minimum Feedback Count to Show: The statistics block will only be displayed if the total number of feedback submissions (or total custom stats) for that post meets or exceeds this number. Set to 0 to always display (if data is available).

Text Customization Tab

Customize all user-facing text strings for the feedback form and related elements.

  • Form Title Text: The main question or title displayed at the top of the feedback form (Default: "Was this helpful?").
  • Like Button Text: Customize the text displayed on the "Like" button (Default: "Like").
  • Dislike Button Text: Customize the text displayed on the "Dislike" button (Default: "Dislike").
  • Comment Label Text: Customize the label displayed above the comment textarea (Default: "Feedback comment (optional)").
  • Submit Button Text: Customize the text on the button used to submit the comment (Default: "Submit").
  • Cancel Button Text: Customize the text on the button used to close the comment area without submitting (Default: "Cancel").
  • Pre-defined Comment 1/2/3: Add up to three "quick-reply" buttons that appear below the comment textarea. Clicking these buttons will automatically insert the predefined text into the textarea. Leave any field blank to disable that specific quick-reply button.
  • Submission Stats Label: Customize the label displayed above the feedback statistics when showing submission stats (Default: "Feedback Stats:").
  • Custom Stats Label: Customize the label displayed above the feedback statistics when showing custom stats (Default: "Custom Feedback Stats:").
  • Thank You Message: The message displayed to the user after successfully submitting feedback (Default: "Thank you for your feedback!").
  • Thank You Message Icon: Select a Dashicon to be displayed alongside the "Thank You" message. A visual icon selector is provided for easy selection.
  • Enable Icons: Toggle the display of Dashicons next to the Like/Dislike button text.
  • Like Button Icon (Dashicon Class): Select or enter the CSS class for the Dashicon to use for the Like button (e.g., dashicons-thumbs-up, dashicons-heart). A visual icon selector is provided.
  • Dislike Button Icon (Dashicon Class): Select or enter the CSS class for the Dashicon to use for the Dislike button (e.g., dashicons-thumbs-down, dashicons-no-alt). A visual icon selector is provided.

Granular Redirect Settings (Text Customization Tab)

Configure specific redirects after feedback submission:

  • Redirect on Like: Enable to redirect the user to a specified URL after a "Like" submission.
  • Redirect URL for Like: The URL to redirect to after a "Like".
  • Redirect on Dislike: Enable to redirect the user to a specified URL after a "Dislike" submission.
  • Redirect URL for Dislike: The URL to redirect to after a "Dislike".
  • Redirect Delay (seconds): The delay in seconds before the redirect occurs. Set to 0 for immediate redirection.

Email Notification Tab

Configure settings for receiving email notifications about new feedback submissions.

  • Enable Email Notification: Check this box to activate email notifications.
  • Notification Triggers: Choose when you want to receive notifications:
    • For all feedback: Get an email for every Like or Dislike.
    • Only for Like: Only receive emails when a "Like" is submitted.
    • Only for Dislike: Only receive emails when a "Dislike" is submitted.
    • Only with feedback comment: Only receive emails if a comment is provided with the feedback.
    • Disable notifications: Turn off all email notifications from the plugin.
  • Notification Email Address: The email address where notifications will be sent. Defaults to the WordPress site's administration email.

Spam Prevention Tab

Protect your feedback system from automated or excessive submissions.

  • Enable Spam Prevention by IP: Activate this option to limit the number of feedback submissions from a single IP address within a specified time frame.
  • Max Feedback Submissions per IP: Set the maximum number of times a unique IP address can submit feedback for the *same post* within the selected time range.
  • Time Range for IP Limit: Define the duration for the IP limit (Per Hour, Per Day, Per Week).
  • Feedback Delay Timer (seconds): Enter the number of seconds a user must wait on the page after it loads before the feedback buttons become active and clickable. This can help deter quick, non-genuine feedback. Set to 0 to disable the delay.

Note: The plugin also includes hidden honeypot fields in the form's HTML (b7_feedback_hp_name, b7_feedback_hp_email). These fields are designed to catch simple bots that automatically fill in all form fields. They should remain empty for valid user submissions.

Styling Tab

Customize the visual appearance of the feedback form to match your website's design. You can select from predefined presets or configure every detail manually. A live preview is provided to see your changes instantly.

  • Styling Presets: A dropdown list of predefined design themes (e.g., Minimal, Modern, Dark Mode, Ocean Breeze, etc.). Selecting a preset will automatically populate the styling fields below and update the live preview. You can then further customize from that base. Choose "-- Select a Preset (Optional) --" to return to manual customization.
  • Live Preview: A real-time preview area that updates as you change the styling settings or select a preset.
  • Enable Custom Styling: A toggle switch that acts as a master control. If turned **off**, the plugin will revert to its default CSS (from assets/css/public-style.css), and none of the custom styling options below will be applied. If **on**, your custom settings will take effect.
  • Form Container Background Color: Set the background color for the main container holding the feedback form.
  • Form Padding: Define the inner spacing within the form container (e.g., 20px for all sides, or 15px 25px for vertical and horizontal).
  • Form Margin: Set the outer spacing around the form container (e.g., 20px 0 for vertical margin, 30px auto for vertical and horizontal centering).
  • Form Title Color: Choose the text color for the form's main title (e.g., "Was this helpful?").
  • Form Title Font Size: Set the font size for the form's title (e.g., 1.3em, 18px).
  • Like Button Background Color: Set the background color of the "Like" button.
  • Dislike Button Background Color: Set the background color of the "Dislike" button.
  • Like Button Text Color: Set the color of the text (and icon, if enabled) on the "Like" button.
  • Dislike Button Text Color: Set the color of the text (and icon, if enabled) on the "Dislike" button.
  • Comment Area Background Color: Set the background color for the section containing the comment label and textarea.
  • Comment Area Text Color: Set the color of the text within the comment textarea.
  • Submit Button Text Color: Set the color of the text on the "Submit" button.
  • Submit Button Background Color: Set the background color of the "Submit" button.
  • Submit Button Font Size: Set the font size for the text on the "Submit" button (e.g., 1em, 14px).
  • Cancel Button Text Color: Set the color of the text on the "Cancel" button.
  • Cancel Button Background Color: Set the background color of the "Cancel" button.
  • Cancel Button Font Size: Set the font size for the text on the "Cancel" button (e.g., 0.9em, 13px).
  • Reset Styling: A button to revert all styling options on this tab back to their default values (as set by the plugin upon activation).

Tools Tab

This tab provides utility functions for managing your feedback data and generating shortcodes.

  • Reset Feedback for Posts: Enter a comma-separated list of Post IDs (e.g., 123, 456, 789) in the provided textarea. This specifies which posts will be affected by the "Run Reset" action. If left empty, the reset action will affect *all* posts in the database.
  • Reset Feedback Type: Select the type of feedback data you wish to reset (delete) for the specified posts:
    • All Feedback: Deletes all Likes, Dislikes, and Comments.
    • Only Likes: Deletes only "Like" entries.
    • Only Dislikes: Deletes only "Dislike" entries.
    • Only Comments: Clears the comment text for all entries, leaving the Like/Dislike votes intact.
    After selecting the type, click the "Run Reset" button to execute the action. **Use with extreme caution! This action is irreversible and permanently deletes data.**
  • Open Shortcode Builder: Click this button to launch a convenient modal window that helps you generate the [b7_feedback_wp_stats] shortcode without memorizing attributes.
  • Demo Mode: If enabled, the feedback form will only be visible to logged-in site administrators. All spam prevention (IP limits) will also be bypassed for administrators in this mode. This is useful for testing the form's appearance and functionality without affecting regular users or collecting unnecessary test data.

Shortcode Builder for [b7_feedback_wp_stats]

The Shortcode Builder provides an intuitive interface to construct the [b7_feedback_wp_stats] shortcode for displaying feedback statistics on your site. The builder includes a live preview feature to show you how the generated shortcode will look.

  • Post ID (optional): Enter a specific WordPress Post ID (e.g., `123`) if you want to display statistics for a particular post. If left empty, the shortcode will automatically display statistics for the current post where it is placed.
  • Stat Type: Choose the source of the statistics:
    • Submission Stats: Displays the actual number of "Likes" and "Dislikes" recorded from user submissions in the database.
    • Custom Stats: Displays the "Custom Likes" and "Custom Dislikes" values that you can manually enter in the post editor metabox for each post.
  • Stat Template: Select the visual style for the statistics display:
    • Default Bar: Shows separate counts and percentages for Likes and Dislikes, typically with a horizontal bar.
    • Versus Bar: Displays a single, combined progress bar illustrating the ratio between Likes and Dislikes.
  • Minimum Show Count: Enter a number. The statistics block generated by the shortcode will only be displayed on the frontend if the total feedback count (either submission or custom, depending on "Stat Type") for that post is equal to or greater than this specified number. Set to 0 to always display the stats (if data is available).

As you adjust the options, the builder will update the "Live Preview" and generate the corresponding shortcode in the "Shortcode:" textarea. You can then click "Copy Shortcode" and paste it into your post or page content.

Membership Management Tab

Control who can submit feedback on your website based on user login status and roles.

  • User Submission Limit: Set a maximum number of feedback submissions allowed per *logged-in user* across the entire site. For example, if set to 5, a logged-in user can submit feedback 5 times (total for all posts). Set to 0 for unlimited submissions for logged-in users. This limit does not apply to non-logged-in users (guests), who are typically limited by IP-based spam prevention.
  • Allowed User Roles: Select specific user roles that are permitted to submit feedback.
    • If **no roles are selected**, feedback submission is allowed for all logged-in users (subject to the User Submission Limit) and all non-logged-in users (guests).
    • If **one or more roles are selected**, only users belonging to *at least one* of the selected roles will be able to submit feedback. Non-logged-in users will *not* be able to submit feedback in this scenario.
    • **Administrators** are always allowed to submit feedback, regardless of this setting.

Import / Export Tab

Easily backup your plugin configuration or migrate settings between different WordPress installations.

  • Import Settings: Allows you to upload a JSON file containing previously exported settings from this plugin. Click "Choose File," select your JSON backup, and then click "Import Settings" to apply them. This will overwrite your current settings.
  • Export Settings: Generates and downloads a JSON file containing all your current plugin settings. This file can be used as a backup or for importing to another site. Click "Export Settings" to initiate the download.

Privacy Tab

Configure options to enhance user privacy by anonymizing sensitive data.

  • Anonymize IP Addresses: If checked, when feedback is submitted, the IP address will be partially anonymized before storage. For IPv4, the last octet will be set to 0 (e.g., 192.168.1.0). For IPv6, the last 80 bits will be zeroed. This data will then be displayed in its anonymized format in the Feedback Data table and reports.
  • Anonymize Usernames: If checked, for feedback submitted by logged-in users, their actual username will be masked and displayed as 'Anonymous User' in the Feedback Data table and reports. The internal User ID is still stored, but their display name is hidden for privacy.
  • Keep Feedback Data (Days): Specify the number of days you wish to retain individual feedback data entries. Data older than this period will be automatically and permanently deleted from your database on a daily basis via a scheduled WordPress cron job. Set this value to 0 to disable automatic data deletion and keep all feedback data indefinitely. (Default: 90 days).

Using the Plugin

Once configured, the B7 Feedback Engine WP is designed for easy integration and data retrieval.

Automatic Insertion of Forms and Stats

If you have enabled "Auto Insert Feedback Form" and configured relevant post types in the General settings, the feedback form will automatically appear at the end of the content for those posts. If you've also set a "Display Stats Position" in the General tab, the feedback statistics block will appear at the chosen location (e.g., Top of Content, Before first H2).

You can override the automatic insertion on a per-post basis by editing the specific post and checking the "Disable Feedback Form on this post" option within the "B7 Feedback Options" metabox in the editor sidebar.

Using Shortcodes for Forms, Stats, and Overviews

For greater control over placement, or to display elements on pages/custom post types not covered by auto-insertion, use the following shortcodes:

  • Feedback Form:
    [b7_feedback_wp]

    Use this shortcode to insert the feedback form anywhere within your post, page, or widget content.

  • Feedback Statistics for a Single Post:
    [b7_feedback_wp_stats]

    This shortcode displays the Like/Dislike statistics for a specific post. It offers several attributes for customization:

    • id="[POST_ID]": (Optional) Specify the ID of the post for which to display stats. If omitted, it will show stats for the current post where the shortcode is embedded.
    • submission_stat="on": Set this to "on" to display statistics based on actual user submissions (likes/dislikes recorded in the database).
    • custom_stat="on": Set this to "on" to display statistics based on values you manually enter in the "Custom Feedback Stats" metabox in the post editor.
    • stat_template="default" or stat_template="versus": Choose the visual layout for the stats. "default" shows separate counts; "versus" shows a combined bar.
    • min_show="[NUMBER]": (Optional) The statistics block will only be visible if the total feedback count (from either submission or custom stats, depending on your choice) for that post meets or exceeds this number. Default is 0 (always show if data exists).

    Example 1: Display versus bar submission stats for post ID 456, only if it has at least 10 feedbacks:

    [b7_feedback_wp_stats id="456" submission_stat="on" stat_template="versus" min_show="10"]

    Example 2: Display default bar custom stats for the current post:

    [b7_feedback_wp_stats custom_stat="on" stat_template="default"]

    Tip: Use the **Shortcode Builder** in B7 Feedback Engine > Settings > Tools to easily generate this shortcode with a live preview.

  • Feedback Overview for Multiple Posts:
    [b7_feedback_overview]

    This powerful shortcode allows you to create lists or grids of posts based on their feedback performance. It's ideal for "Most Popular" or "Most Helpful" sections.

    • mode="[MODE]": Determines how posts are ordered and what data is emphasized.
      • recent (default): Lists posts by the most recent feedback received.
      • top_liked: Lists posts with the highest number of "Likes".
      • top_disliked: Lists posts with the highest number of "Dislikes".
      • top_commented: Lists posts with the highest number of comments.
    • limit="[NUMBER]": The maximum number of posts to display (default: 5).
    • time_range="[RANGE]": Filters feedback based on its age.
      • 24h: Last 24 hours.
      • 7d: Last 7 days.
      • 30d (default): Last 30 days.
      • all: All time feedback.
    • post_type="[TYPES]": Comma-separated list of post type slugs (e.g., post, page, product). Use any for all public post types (excluding attachments). Default is `post`.
    • orderby="[FIELD]": Primary sorting field.
      • default (mode-dependent: `recent` by date, others by count).
      • date: Sorts by feedback timestamp.
      • count: Sorts by total feedback count (for `top_*` modes).
      • title: Sorts alphabetically by post title.
      • rand: Random order (ignores other `orderby`/`order` settings).
    • order="[DIR]": Sort direction (DESC (default) or ASC).
    • template="[TEMPLATE]": Visual layout.
      • list (default): Standard vertical list.
      • grid: Displays items in a responsive grid.
    • show_image="true/false": Display the post's featured image (default: true).
    • show_stats="true/false": Display the relevant feedback count (default: true).
    • title="[TEXT]": (Optional) A title to display at the top of the overview section.
    • display_type="ul/div": The HTML tag used for the main list wrapper (ul or div). Defaults to `ul`.
    • display_type_class="[CLASS]": Custom CSS class for the main wrapper.
    • id="[ID]": Custom HTML ID for the main wrapper.

    Example: Display top 3 most liked posts from the last 7 days in a grid layout with a custom title:

    [b7_feedback_overview mode="top_liked" limit="3" time_range="7d" template="grid" title="Our Top Liked Content This Week"]

Viewing Feedback Data

Access individual feedback submissions and manage your raw data. Navigate to B7 Feedback Engine > Feedback Data in the admin menu.

This page features an interactive table displaying all feedback submissions, including:

  • ID: Unique submission identifier.
  • Post: Linked Post Title (or "(Post Deleted)" if not found), allowing quick access to edit or view the post.
  • Type: Feedback type (Like or Dislike).
  • Comment: The text comment provided by the user (if any).
  • User: The logged-in user's display name or "Guest" for non-logged-in submissions. Anonymized if privacy settings are enabled.
  • IP Address: The submitter's IP address. Anonymized if privacy settings are enabled.
  • Timestamp: Date and time of submission.

Key features on this page:

  • Filters: Filter the table by feedback type (All, Likes Only, Dislikes Only, With Comments), start date, and end date.
  • Search: Search for specific terms within feedback comments or post titles.
  • Sorting: Click on column headers (ID, Post Title, Type, Timestamp) to sort the table.
  • Pagination: Navigate through large datasets.
  • Clear All Data: A powerful button to permanently delete *all* entries from the feedback database. **This action cannot be undone and should be used with extreme caution!**
  • Export All to CSV: Generates and provides a secure, temporary download link for a CSV file containing all feedback data from your database. The link expires after 5 minutes for security.

Using the Feedback Report

Gain insights into your content's performance and user sentiment. Navigate to B7 Feedback Engine > Feedback Report.

This page provides aggregated insights into your feedback data, helping you understand trends and top content.

  • Overall Summary Cards:
    • Total Feedback, Likes, Dislikes, and percentage breakdown.
    • Count of feedback submissions that included comments.
  • Top 5 Most Liked Posts: A list of posts that received the highest number of "Likes" within the filtered period.
  • Top 5 Most Disliked Posts: A list of posts that received the highest number of "Dislikes" within the filtered period.
  • Detailed Post Feedback Table: A comprehensive table listing posts with their respective Like, Dislike, Comment, and Total feedback counts.
    • Filterable by Start Date, End Date, and multiple Post Types.
    • Searchable within comments of listed posts.
    • Sortable by various columns (ID, Post Title, Likes, Dislikes, Comments, Total).
    • Details Link: Click "Details" for any post to open a modal showing a Like vs. Dislike bar and a list of all comments for that specific post.
    • Bulk Actions: Select multiple posts and perform actions like:
      • Reset All Feedback: Deletes all feedback (likes, dislikes, comments) for selected posts.
      • Reset Likes/Dislikes: Deletes only like/dislike votes for selected posts, keeping comments.
      • Reset Comments Only: Clears only the comment text for selected posts, keeping vote types.
      **Use bulk actions with extreme caution, as they are irreversible.**

Post Editor Metaboxes

When you edit a post (or any other enabled post type) in the WordPress editor, you'll find two custom metaboxes in the sidebar, located under the standard 'Categories' and 'Tags' boxes:

  • B7 Feedback Options:
    • Disable Feedback Form on this post: Check this checkbox to prevent the feedback form from being displayed on this specific post, overriding the global "Auto Insert" setting in the plugin options.
    • Below the checkbox, you will see a real-time display of the current **Feedback Stats** for this post: "Likes" and "Dislikes" counts, along with their respective percentages. This provides a quick overview of how users are reacting to the content.
  • Custom Feedback Stats:
    • Custom Likes: A numeric field where you can manually enter a custom number of "Likes" for this post.
    • Custom Dislikes: A numeric field where you can manually enter a custom number of "Dislikes" for this post.
    • These custom values are used when you configure the [b7_feedback_wp_stats] shortcode with the custom_stat="on" attribute, or if you select "Custom Stats" for automatic display in the General Settings tab. This is useful for displaying pre-defined or curated statistics, or for content that is not meant to collect live feedback but needs a rating display.

Developer Information

This section is for developers who wish to extend or integrate with the B7 Feedback Engine WP plugin.

Actions and Filters

The plugin provides several WordPress hooks for customization:

  • Action: b7_feedback_submitted
    Fires immediately after a feedback entry is successfully saved to the database.
    Parameters: (int) $post_id, (string) $feedback_type ('like' or 'dislike'), (string) $feedback_comment (empty string if no comment), (string) $ip_address.
    // Example: Log feedback to a custom log file or external service
    add_action('b7_feedback_submitted', 'my_custom_feedback_logger', 10, 4);
    function my_custom_feedback_logger($post_id, $feedback_type, $feedback_comment, $ip_address) {
        error_log("Feedback received: Post ID={$post_id}, Type={$feedback_type}, Comment='{$feedback_comment}', IP={$ip_address}");
        // Further integration with CRM, analytics, etc.
    }
  • Filter: b7_feedback_form_output
    Allows modification of the entire generated HTML output for the feedback form before it's displayed on the frontend.
    Parameters: (string) $output (the HTML string).
    Return: The modified HTML string.
    // Example: Add custom content or wrapper around the feedback form
    add_filter('b7_feedback_form_output', 'my_add_content_around_feedback_form', 10, 1);
    function my_add_content_around_feedback_form($output) {
        $custom_header = '

    Your Opinion Matters!

    '; $custom_footer = '

    Thanks for being a reader!

    '; return $custom_header . $output . $custom_footer; }
  • Filter: b7_feedback_stats_shortcode_output
    Allows modification of the generated HTML output for the [b7_feedback_wp_stats] shortcode.
    Parameters: (string) $output (the HTML string), (array) $atts (shortcode attributes), (int) $post_id.
    Return: The modified HTML string.
    // Example: Add a custom message if stats are low
    add_filter('b7_feedback_stats_shortcode_output', 'my_custom_stats_display_logic', 10, 3);
    function my_custom_stats_display_logic($output, $atts, $post_id) {
        // Get actual counts if needed, or rely on atts if 'custom_stat'
        $feedback_counts = b7_feedback_engine_wp_get_feedback_counts($post_id);
        if ($feedback_counts['like_count'] + $feedback_counts['dislike_count'] < 5 && $output !== '') {
            $output .= '

    Be the first to rate this content!

    '; } return $output; }

AJAX Actions

The plugin utilizes standard WordPress AJAX for various interactive operations. All AJAX requests use a nonce for security validation.

  • wp_ajax_b7_submit_feedback / wp_ajax_nopriv_b7_submit_feedback:
    Handles the submission of feedback data (Like/Dislike/Comment) from the frontend form.
  • wp_ajax_b7_run_feedback_reset:
    Executes the feedback data reset operation (deleting specific types of feedback for specified posts).
  • wp_ajax_b7_reset_styling_settings:
    Resets all custom styling options in the settings to their default values.
  • wp_ajax_b7_get_shortcode_preview:
    Used by the Shortcode Builder to dynamically render and display a live preview of the generated [b7_feedback_wp_stats] shortcode.
  • wp_ajax_b7_import_settings:
    Processes the upload and application of plugin settings from a JSON file.
  • wp_ajax_b7_export_settings:
    Generates and provides a JSON file containing all current plugin settings for download.
  • wp_ajax_b7_fetch_feedback_data:
    Used by the Feedback Data page to dynamically load and refresh the feedback table based on filters, sorting, and pagination, including the "Clear All Data" action.
  • wp_ajax_b7_generate_csv_link:
    Called by the Feedback Data page to generate a secure, temporary download URL for the full feedback data CSV export.
  • wp_ajax_b7_feedback_download_csv:
    Handles the actual secure file download request for the generated CSV.
  • wp_ajax_b7_load_report_data:
    Used by the Feedback Report page to dynamically load and refresh all report sections (summary, top posts, detailed table) based on filters and sorting.
  • wp_ajax_b7_report_bulk_action:
    Performs bulk actions (resetting feedback data) on selected posts from the Feedback Report table.
  • wp_ajax_b7_report_get_post_details:
    Fetches and displays detailed feedback information (like/dislike breakdown, comments) for a specific post in a modal window on the Feedback Report page.

Database Schema

The plugin creates one custom database table to store individual feedback submissions:

  • {$wpdb->prefix}b7_feedback_data:
    • id (mediumint(9) NOT NULL AUTO_INCREMENT, Primary Key)
    • post_id (mediumint(9) NOT NULL): The ID of the WordPress post or page on which feedback was given.
    • feedback_type (varchar(20) NOT NULL): Stores 'like' or 'dislike'.
    • feedback_comment (text): Stores the optional text comment provided by the user. Can be NULL or empty.
    • user_id (mediumint(9) NOT NULL): The ID of the logged-in user who submitted feedback (0 for guest users).
    • ip_address (varchar(45) NOT NULL): Stores the IP address of the submitter. This will be anonymized if the 'Anonymize IP Addresses' privacy setting is enabled.
    • timestamp (datetime DEFAULT '0000-00-00 00:00:00' NOT NULL): The date and time when the feedback was submitted.

Plugin settings are stored in the standard WordPress options table ({$wpdb->prefix}options) under the option name b7_feedback_settings. This option stores all configuration data as a serialized array.

Custom feedback counts for individual posts are stored as post meta ({$wpdb->prefix}postmeta) using the keys _b7_custom_like_count and _b7_custom_dislike_count.

Frequently Asked Questions (FAQ)

Q: How do I display the feedback form only on specific pages or posts?
A: Go to B7 Feedback Engine > Settings > General. Uncheck the "Auto Insert Feedback Form" option. Then, edit the specific page or post where you want the form to appear and insert the shortcode [b7_feedback_wp] into the content editor (or a shortcode block in the Block Editor).
Q: How do I display feedback statistics for a single post?
A: Use the [b7_feedback_wp_stats] shortcode. You can configure it manually (see Using Shortcodes section for attributes) or use the convenient **Shortcode Builder** found in the B7 Feedback Engine > Settings > Tools tab. The builder provides a live preview as you customize the options.
Q: Can I display an overview of feedback from multiple posts (e.g., "Most Popular")?
A: Yes! Use the [b7_feedback_overview] shortcode. This shortcode offers various attributes to display lists or grids of posts based on recent feedback, top likes, top dislikes, or top comments, within specified time ranges and with different display templates. Refer to the Using Shortcodes section for full details.
Q: How can I customize the appearance of the feedback form?
A: Go to B7 Feedback Engine > Settings > Styling tab. You can select a "Styling Preset" to quickly apply a predefined theme. For more granular control, ensure "Enable Custom Styling" is checked, and then use the color pickers and text fields to adjust various elements like background colors, text colors, padding, and font sizes. A live preview will show your changes instantly. For advanced customization, you can always add your own custom CSS targeting the plugin's classes (e.g., .b7-feedback-form-container, .b7-like-button), which are defined in assets/css/public-style.css.
Q: Does the plugin work with caching plugins?
A: Yes, the plugin is designed to work well with caching plugins. Feedback submission uses AJAX, which bypasses most page caching. However, if you display dynamic content like live feedback counts (via the stats shortcode), it's recommended to:
  • Ensure your caching plugin is configured to periodically clear its cache or exclude pages with dynamic content from aggressive caching.
  • If your caching plugin supports "fragment caching" or "dynamic content blocks" (e.g., WP Rocket, LiteSpeed Cache), configure it to exclude the shortcode output from being cached statically, allowing the counts to update dynamically.
The feedback form's static HTML and JavaScript components are generally compatible with caching without special configuration.
Q: Where is the feedback data stored?
A: All individual feedback submissions (likes, dislikes, comments) are stored in a custom database table named {$wpdb->prefix}b7_feedback_data. Plugin settings are stored in the standard WordPress options table ({$wpdb->prefix}options) under the single option name b7_feedback_settings. Custom feedback counts you set in the post editor are stored as post meta ({$wpdb->prefix}postmeta).
Q: How do I get support?
A: If you encounter any issues or have questions not covered in this documentation, please refer to the support channels provided by your plugin purchase platform (e.g., codecanyon support tab, author's website support forum). Provide as much detail as possible about your issue, including screenshots, steps to reproduce, and your WordPress environment details.

Changelog

Stay up-to-date with the latest improvements and features.

Version 1.0.7

  • Added: Advanced Feedback Data Admin Page - comprehensive table for all submissions with filtering (feedback type, date range), searching (comments, post titles), sorting, pagination, and export to CSV.
  • Added: Advanced Feedback Report Admin Page - provides visual summaries (overall stats, percentages), lists of top liked/disliked/commented posts, and a detailed table of post-specific feedback, all filterable by date, post type, and comment search. Includes a "Details" modal for individual posts and bulk actions.
  • Added: [b7_feedback_overview] Shortcode - new powerful shortcode to display lists or grids of posts based on feedback activity (recent, top liked, top disliked, top commented), with customizable limits, time ranges, post types, images, and stats.
  • Improved: Shortcode Builder - updated to correctly handle and generate options for the `[b7_feedback_wp_stats]` shortcode including newly added features.

Version 1.0.5

  • Added: Visual Icon Selector - integrated a user-friendly visual selector in settings to easily pick Dashicons for feedback buttons and the "Thank You" message.
  • Added: Submit Loader - implemented a customizable loading animation (spinner, bouncing dots, pulse) that appears as an overlay when a user submits feedback.
  • Added: Device Visibility Control - introduced an option to selectively disable the feedback form on Desktop, Tablet, Mobile, or a combination of devices using responsive CSS classes.
  • Added: Prevent Author Self-Voting - new setting to automatically hide the feedback form for post authors viewing their own content.
  • Added: Customizable "Thank You" Message Icon - allows users to choose a specific Dashicon to display with the post-submission "Thank You" message.
  • Improved: Text Customization - expanded options for customizing various text labels and button captions on the feedback form.
  • Improved: Styling Customization - significantly enhanced styling options for the form container, buttons, and comment area, with a live preview updating in real-time as settings are changed.

Version 1.0.3

  • Added: More Feedback Form Templates - introduced new design templates (e.g., Sticky Bottom, Flat) to provide more layout choices for the feedback form.
  • Added: Granular Redirects - implemented separate options to configure specific redirect URLs and delays for both 'Like' and 'Dislike' submissions after the thank you message.
  • Fixed: Custom Icon Display - corrected an issue where custom icons were not being applied correctly to feedback buttons in certain custom template configurations.

Version 1.0.1

  • Improved: Settings Panel Layout - refined the organization and user experience of the admin settings interface for better usability.

Version 1.0.0

  • Initial Release: Launched B7 Feedback Engine WP with core feedback functionality, basic customizable forms, initial reporting capabilities, spam prevention, and a foundational settings panel.
  • Included Features in Initial Release (as per development log): Stats shortcode & builder, membership controls, import/export, privacy options, styling settings, data management tools, form templates, icons, feedback delay.