wp/README.md
vlw dba0fe4ebb feat: add basic support for the plugin "Redirection" (#17)
This PR adds very basic support for manipulating the database tables associated with the plugin "[Redirection](https://wordpress.org/plugins/redirection/)". Only the `Items` table is implemented with this PR, and a single method `Item::match()` that tests a URL for matches in Redirection

Reviewed-on: https://codeberg.org/vlw/wp/pulls/17
Co-authored-by: vlw <victor@vlw.se>
Co-committed-by: vlw <victor@vlw.se>
2026-02-24 11:51:37 +01:00

29 lines
946 B
Markdown

This library is a collection of various tools for parsing and performing DML operations on a WordPress database and its content. It is meant to be used as a stand-alone library and does not require WordPress to be installed.
# Installation
```
composer require vlw/wp
```
# How to use
A variety of tools are available, refer to the documentation for each tool to see its usage instructions.
For example:
```php
use vlw\WP\Posts\Post;
// Retrieve a new Post instance for post ID 1234
$post = new Post(1234);
// Retrieve the content for this post
$post->post_content;
// Update the datetime modified for this post
$post->post_modified = new DateTimeImmutable();
```
# Plugins
This library also has support for the following plugins:
Plugin|Versions|Reference
--|--|--
[Redirection](https://wordpress.org/plugins/redirection/)|5.3.10 (limited support)|[Plugins/redirection](/vlw/wp/src/branch/feat/plugin-redirection/src/Plugins/redirection)