10up / safe-redirect-manager

A simple HTTP redirection plugin for WordPress.
https://wordpress.org/plugins/safe-redirect-manager
GNU General Public License v2.0
314 stars 82 forks source link

Fix raw sql table post meta declaration #361

Closed ogorzalka closed 10 months ago

ogorzalka commented 10 months ago

Description of the Change

In this pull request, I have made a minor modification to how the postmeta table is referenced. Previously, the postmeta table was directly referenced by its name (e.g., wp_postmeta). I have modified this reference to use the $wpdb->postmeta variable, which is a standard practice in WordPress to ensure better compatibility with custom WordPress installations and multi-site environments.

Advantages:

How to test the Change

  1. Install the plugin with custom database prefix.
  2. Set up some redirections using the plugin or import redirection with csv file.
  3. Verify that the redirections are working correctly.

Changelog Entry

Changed - Improved reference to the postmeta table for better WordPress compatibility.

Checklist: