Making WordPress.org

Changeset 14738


Ignore:
Timestamp:
03/20/2026 03:20:18 PM (9 days ago)
Author:
obenland
Message:

WP.org Abilities: Wrap feedback content in delimiters.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • sites/trunk/wordpress.org/public_html/wp-content/plugins/wporg-abilities/plugins/plugin-directory/tools/class-get-plugin-status.php

    r14729 r14738  
    294294                            $body = self::html_to_text( $body );
    295295                            $body = self::strip_boilerplate( $body );
     296                            $body = self::wrap_feedback( $body );
    296297                        }
    297298
     
    322323                    $body = self::html_to_text( $body );
    323324                    $body = self::strip_boilerplate( $body );
     325                    $body = self::wrap_feedback( $body );
    324326                }
    325327
     
    409411        return $threads;
    410412    }
     413
     414    /**
     415     * Wrap feedback text in delimiters to separate content from instructions.
     416     *
     417     * @param string $body The feedback body.
     418     * @return string
     419     */
     420    private static function wrap_feedback( string $body ): string {
     421        $body = str_replace( array( '<feedback>', '</feedback>' ), '', $body );
     422
     423        return "<feedback>\n{$body}\n</feedback>";
     424    }
    411425}
Note: See TracChangeset for help on using the changeset viewer.