alleyinteractive / alleyinteractive/wp-seo

Add Byline Manager plugin support to author-related formatting tags

Offen
#186 0 Kommentare 0 Reaktionen 0 zugewiesene Personen Auf GitHub ansehen
Vorherrschende Sprache
PHP
Sterne
45
Forks
13
Ø Merge
12 T. 16 Std.
Gemergte PRs (30 T.)
5

Beschreibung

### Description

Issue #161's MVP requirements call for Byline Manager support alongside Co-Authors Plus support (#159 — CAP-specific, already ticketed). Today, `WP_SEO_Format_Author::get_value()` (`php/default-formatting-tags.php`) only calls `get_the_author()` / `get_the_author_meta( 'display_name', ... )`, filtered through the `the_author` filter for Co-Authors Plus compatibility. It has no awareness of [Byline Manager](https://github.com/alleyinteractive/byline-manager), which stores bylines as its own `Profile`/`TextProfile` models rather than mapping onto WP core author meta, so `get_the_author()` will not reflect Byline Manager's data.

### Use Case

Sites running Byline Manager instead of (or alongside) Co-Authors Plus want the `#author#` formatting tag — and any other author-derived SEO output (e.g. schema/JSON-LD author data, once #12 lands) — to reflect Byline Manager's byline, the same way it already works for CAP.

### Proposed Solution

Byline Manager exposes `Byline_Manager\get_the_byline( $post = null )` as its public template tag (the direct equivalent of `get_the_author()`), and ships its own reference integration for another SEO plugin at `inc/yoast.php` (hooking `wpseo_meta_author`, `wpseo_enhanced_slack_data`, and schema graph filters). Mirror that pattern here:

- In `WP_SEO_Format_Author::get_value()`, prefer `Byline_Manager\get_the_byline()` when the plugin/function is active (`function_exists( '\Byline_Manager\get_the_byline' )`), falling back to the existing `get_the_author()`/CAP-filtered behavior otherwise.
- Consider whether Byline Manager's `Utils::get_byline_entries_for_post()` (returning the full `Profile`/`TextProfile` entries, not just a rendered string) is needed for any future structured-data use (relevant to #12 Schema.org support).

### Related

- #161 (parent MVP tracking issue)
- #159 (Co-Authors Plus support — same formatting tag, different plugin)
- https://github.com/alleyinteractive/byline-manager

Beitragsleitfaden

Beitragsleitfaden öffnen

Bewertung

Dieses Issue wurde noch nicht bewertet.

Neue Issues direkt in Ihr Postfach

Eine kurze Übersicht über anfängerfreundliche GitHub-Issues.