Skip to content

Commit

Permalink
Use str_ends_with
Browse files Browse the repository at this point in the history
[dependabot skip]
  • Loading branch information
swissspidy committed Oct 1, 2024
1 parent 72ca36b commit 92b85e3
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion includes/Checker/Checks/Plugin_Repo/Trademarks_Check.php
Original file line number Diff line number Diff line change
Expand Up @@ -433,7 +433,7 @@ private function has_trademarked_slug( $slug ) {
$has_trademarked_slug = false;

foreach ( self::TRADEMARK_SLUGS as $trademark ) {
if ( '-' === $trademark[-1] ) {
if ( str_ends_with( $trademark, '-' ) ) {
// Trademarks ending in "-" indicate slug cannot begin with that term.
if ( 0 === strpos( $slug, $trademark ) ) {
$has_trademarked_slug = $trademark;
Expand Down

0 comments on commit 92b85e3

Please sign in to comment.