Skip to content

Commit

Permalink
short description is <= 150 characters
Browse files Browse the repository at this point in the history
  • Loading branch information
afragen committed Feb 21, 2025
1 parent cb319ef commit 4ac616d
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/Git_Updater/Plugin.php
Original file line number Diff line number Diff line change
Expand Up @@ -312,7 +312,7 @@ public function plugins_api( $result, $action, $response ) {
$response->version = $plugin->remote_version ?: $plugin->local_version;
$response->sections = $plugin->sections;
// phpcs:ignore WordPress.WP.AlternativeFunctions.strip_tags_strip_tags
$response->short_description = substr( strip_tags( trim( $plugin->sections['description'] ) ), 0, 175 ) . '...';
$response->short_description = substr( strip_tags( trim( $plugin->sections['description'] ) ), 0, 147 ) . '...';
$response->requires = $plugin->requires;
$response->requires_php = $plugin->requires_php;
$response->tested = $plugin->tested;
Expand Down
2 changes: 1 addition & 1 deletion src/Git_Updater/REST/REST_API.php
Original file line number Diff line number Diff line change
Expand Up @@ -467,7 +467,7 @@ public function get_api_data( \WP_REST_Request $request ) {
'requires_plugins' => $repo_data->requires_plugins,
'sections' => $repo_data->sections,
// phpcs:ignore WordPress.WP.AlternativeFunctions.strip_tags_strip_tags
'short_description' => substr( strip_tags( trim( $repo_data->sections['description'] ) ), 0, 175 ) . '...',
'short_description' => substr( strip_tags( trim( $repo_data->sections['description'] ) ), 0, 147 ) . '...',
'primary_branch' => $repo_data->primary_branch,
'branch' => $repo_data->branch,
'download_link' => $download ? $repo_data->download_link : '',
Expand Down

0 comments on commit 4ac616d

Please sign in to comment.