Adopt reusable CI standard + PHPUnit conversion (#22)
Squash-merge of PR #22: adopt shared reusable CI workflow, convert PHPUnit to stubs, update branch-protection contexts.
QA-approved at 05d8094a1d. All required CI checks green.
Agent-Session: 2026-06-17-prcore-ci-deploy
This commit is contained in:
@@ -1,6 +1,18 @@
|
||||
<?php
|
||||
/**
|
||||
* Admin Columns.
|
||||
*
|
||||
* @package Peptide_Repo_Core
|
||||
*/
|
||||
|
||||
declare(strict_types=1);
|
||||
|
||||
/**
|
||||
* Adds evidence strength, editorial status, and dosing count columns
|
||||
*
|
||||
* @package Peptide_Repo_Core
|
||||
*/
|
||||
|
||||
/**
|
||||
* Custom admin list-table columns for the peptide CPT.
|
||||
*
|
||||
@@ -19,7 +31,7 @@ class PR_Core_Admin_Columns {
|
||||
* @return array<string, string> Modified columns.
|
||||
*/
|
||||
public function add_columns( array $columns ): array {
|
||||
$new = [];
|
||||
$new = array();
|
||||
foreach ( $columns as $key => $label ) {
|
||||
$new[ $key ] = $label;
|
||||
|
||||
@@ -44,13 +56,13 @@ class PR_Core_Admin_Columns {
|
||||
public function render_column( string $column, int $post_id ): void {
|
||||
switch ( $column ) {
|
||||
case 'pr_evidence':
|
||||
$strength = get_post_meta( $post_id, 'evidence_strength', true ) ?: 'preclinical';
|
||||
$strength = get_post_meta( $post_id, 'evidence_strength', true ) ?: 'preclinical'; // phpcs:ignore Universal.Operators.DisallowShortTernary.Found
|
||||
$label = apply_filters( 'pr_core_evidence_strength_label', $strength, $strength );
|
||||
echo esc_html( $label );
|
||||
break;
|
||||
|
||||
case 'pr_editorial':
|
||||
$status = get_post_meta( $post_id, 'editorial_review_status', true ) ?: 'draft';
|
||||
$status = get_post_meta( $post_id, 'editorial_review_status', true ) ?: 'draft'; // phpcs:ignore Universal.Operators.DisallowShortTernary.Found
|
||||
echo esc_html( ucfirst( str_replace( '-', ' ', $status ) ) );
|
||||
break;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user