Skip to content

Commit

Permalink
Code Modernization: Replace usage of strpos() with str_contains() (#3…
Browse files Browse the repository at this point in the history
…4137)

Co-authored-by: Brad Jorsch <anomiex@users.noreply.github.com>
Co-authored-by: anomiex <anomiex@users.noreply.github.com>

Committed via a GitHub action: https://github.com/Automattic/jetpack/actions/runs/6944828534
  • Loading branch information
jeherve authored and matticbot committed Nov 21, 2023
1 parent 6a15b43 commit 1e9bc6e
Show file tree
Hide file tree
Showing 5 changed files with 12 additions and 11 deletions.
8 changes: 4 additions & 4 deletions composer.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions vendor/automattic/jetpack-mu-wpcom/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
This is an alpha version! The changes listed here are not final.

### Changed
- Code Modernization: Replace usage of strpos() with str_contains()
- Code Modernization: Replace usage of substr() with str_starts_with() and str_ends_with().

### Fixed
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1505,7 +1505,7 @@ function ( $page ) {
return false;
}

if ( 'about' === $page['post_name'] || false !== strpos( $page['post_title'], 'About' ) ) {
if ( 'about' === $page['post_name'] || str_contains( $page['post_title'], 'About' ) ) {
return true;
}
}
Expand Down
6 changes: 3 additions & 3 deletions vendor/composer/installed.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,12 @@
"packages": [
{
"name": "automattic/jetpack-mu-wpcom",
"version": "5.0.1-alpha.1700575046",
"version_normalized": "5.0.1.0-alpha1700575046",
"version": "5.0.1-alpha.1700575066",
"version_normalized": "5.0.1.0-alpha1700575066",
"dist": {
"type": "path",
"url": "/tmp/jetpack-build/Automattic/jetpack-mu-wpcom",
"reference": "927ec36ab8d395e012daeb753f1c267051c177a2"
"reference": "c954a964f49bb78e84d5880c78ce6a9e40d7c5c4"
},
"require": {
"php": ">=7.0"
Expand Down
6 changes: 3 additions & 3 deletions vendor/composer/installed.php
Original file line number Diff line number Diff line change
Expand Up @@ -11,9 +11,9 @@
),
'versions' => array(
'automattic/jetpack-mu-wpcom' => array(
'pretty_version' => '5.0.1-alpha.1700575046',
'version' => '5.0.1.0-alpha1700575046',
'reference' => '927ec36ab8d395e012daeb753f1c267051c177a2',
'pretty_version' => '5.0.1-alpha.1700575066',
'version' => '5.0.1.0-alpha1700575066',
'reference' => 'c954a964f49bb78e84d5880c78ce6a9e40d7c5c4',
'type' => 'jetpack-library',
'install_path' => __DIR__ . '/../automattic/jetpack-mu-wpcom',
'aliases' => array(),
Expand Down

0 comments on commit 1e9bc6e

Please sign in to comment.