alleyinteractive / alleyinteractive/wp-seo

Add Byline Manager plugin support to author-related formatting tags

未关闭
#186 0 条评论 0 个 reaction 已指派 0 人 在 GitHub 查看
主要语言
PHP
星标
45
派生
13
平均合并
12 天 16 小时
30 天内合并 PR
5

描述

### 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

贡献指南

打开贡献指南

调研方向

Start in php/default-formatting-tags.php at WP_SEO_Format_Author::get_value(), then review Byline Manager’s public get_the_byline() template tag and its inc/yoast.php integration. The author formatting tag should use the Byline Manager value when its function is available and retain the existing get_the_author()/Co-Authors Plus fallback otherwise.

由索引模型根据 Issue 内容生成。

评估

技术栈
php
领域
backend
Issue 类型
功能
难度
3/5
预计耗时
1-2 天
活跃度
冷清
描述清晰度
描述清楚
新手友好度
70/100

把新 issue 发到你的邮箱

精选适合新手参与的 GitHub issue 摘要。