Changeset 56245
- Timestamp:
- 07/17/2023 01:16:14 PM (17 months ago)
- Location:
- trunk/src
- Files:
-
- 9 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/wp-admin/includes/ajax-actions.php
r56174 r56245 3854 3854 ); 3855 3855 3856 if ( str pos( $parsed, 'class="wp-embedded-content' ) ) {3856 if ( str_contains( $parsed, 'class="wp-embedded-content' ) ) { 3857 3857 if ( defined( 'SCRIPT_DEBUG' ) && SCRIPT_DEBUG ) { 3858 3858 $script_src = includes_url( 'js/wp-embed.js' ); -
trunk/src/wp-admin/includes/theme.php
r56059 r56245 1168 1168 if ( ! empty( $redirect ) ) { 1169 1169 $functions_path = ''; 1170 if ( str pos( STYLESHEETPATH, $extension ) ) {1170 if ( str_contains( STYLESHEETPATH, $extension ) ) { 1171 1171 $functions_path = STYLESHEETPATH . '/functions.php'; 1172 } elseif ( str pos( TEMPLATEPATH, $extension ) ) {1172 } elseif ( str_contains( TEMPLATEPATH, $extension ) ) { 1173 1173 $functions_path = TEMPLATEPATH . '/functions.php'; 1174 1174 } -
trunk/src/wp-includes/canonical.php
r56177 r56245 680 680 681 681 // Strip multiple slashes out of the URL. 682 if ( str pos( $redirect['path'], '//' ) > -1) {682 if ( str_contains( $redirect['path'], '//' ) ) { 683 683 $redirect['path'] = preg_replace( '|/+|', '/', $redirect['path'] ); 684 684 } -
trunk/src/wp-includes/class-wp-xmlrpc-server.php
r56180 r56245 4887 4887 } else { 4888 4888 foreach ( (array) $blogs as $blog ) { 4889 if ( str pos( $blog['url'], $_SERVER['HTTP_HOST'] ) ) {4889 if ( str_contains( $blog['url'], $_SERVER['HTTP_HOST'] ) ) { 4890 4890 return array( $blog ); 4891 4891 } -
trunk/src/wp-includes/link-template.php
r56191 r56245 4439 4439 $user = get_user_by( 'id', absint( $id_or_email ) ); 4440 4440 } elseif ( is_string( $id_or_email ) ) { 4441 if ( str pos( $id_or_email, '@md5.gravatar.com' ) ) {4441 if ( str_contains( $id_or_email, '@md5.gravatar.com' ) ) { 4442 4442 // MD5 hash. 4443 4443 list( $email_hash ) = explode( '@', $id_or_email ); -
trunk/src/wp-includes/load.php
r56238 r56245 76 76 77 77 // Fix for PHP as CGI hosts that set SCRIPT_FILENAME to something ending in php.cgi for all requests. 78 if ( isset( $_SERVER['SCRIPT_FILENAME'] ) 79 && ( strpos( $_SERVER['SCRIPT_FILENAME'], 'php.cgi' ) === strlen( $_SERVER['SCRIPT_FILENAME'] ) - 7 ) 80 ) { 78 if ( isset( $_SERVER['SCRIPT_FILENAME'] ) && str_ends_with( $_SERVER['SCRIPT_FILENAME'], 'php.cgi' ) ) { 81 79 $_SERVER['SCRIPT_FILENAME'] = $_SERVER['PATH_TRANSLATED']; 82 80 } 83 81 84 82 // Fix for Dreamhost and other PHP as CGI hosts. 85 if ( isset( $_SERVER['SCRIPT_NAME'] ) && ( strpos( $_SERVER['SCRIPT_NAME'], 'php.cgi' ) !== false) ) {83 if ( isset( $_SERVER['SCRIPT_NAME'] ) && str_contains( $_SERVER['SCRIPT_NAME'], 'php.cgi' ) ) { 86 84 unset( $_SERVER['PATH_INFO'] ); 87 85 } … … 938 936 939 937 while ( ( $plugin = readdir( $dh ) ) !== false ) { 940 if ( '.php' === substr( $plugin, -4) ) {938 if ( str_ends_with( $plugin, '.php' ) ) { 941 939 $mu_plugins[] = WPMU_PLUGIN_DIR . '/' . $plugin; 942 940 } … … 982 980 foreach ( $active_plugins as $plugin ) { 983 981 if ( ! validate_file( $plugin ) // $plugin must validate as file. 984 && '.php' === substr( $plugin, -4) // $plugin must end with '.php'.982 && str_ends_with( $plugin, '.php' ) // $plugin must end with '.php'. 985 983 && file_exists( WP_PLUGIN_DIR . '/' . $plugin ) // $plugin must exist. 986 984 // Not already included as a network plugin. … … 1618 1616 $bytes = (int) $value; 1619 1617 1620 if ( false !== strpos( $value, 'g' ) ) {1618 if ( str_contains( $value, 'g' ) ) { 1621 1619 $bytes *= GB_IN_BYTES; 1622 } elseif ( false !== strpos( $value, 'm' ) ) {1620 } elseif ( str_contains( $value, 'm' ) ) { 1623 1621 $bytes *= MB_IN_BYTES; 1624 } elseif ( false !== strpos( $value, 'k' ) ) {1622 } elseif ( str_contains( $value, 'k' ) ) { 1625 1623 $bytes *= KB_IN_BYTES; 1626 1624 } … … 1909 1907 if ( isset( $_SERVER['HTTP_ACCEPT'] ) ) { 1910 1908 foreach ( $accepted as $type ) { 1911 if ( false !== strpos( $_SERVER['HTTP_ACCEPT'], $type ) ) {1909 if ( str_contains( $_SERVER['HTTP_ACCEPT'], $type ) ) { 1912 1910 return true; 1913 1911 } -
trunk/src/wp-includes/media.php
r56214 r56245 1324 1324 'file' => $image_basename, 1325 1325 ); 1326 } elseif ( str pos( $image_src, $image_meta['file'] ) ) {1326 } elseif ( str_contains( $image_src, $image_meta['file'] ) ) { 1327 1327 return false; 1328 1328 } -
trunk/src/wp-includes/pluggable.php
r56192 r56245 1238 1238 nocache_headers(); 1239 1239 1240 $redirect = ( strpos( $_SERVER['REQUEST_URI'], '/options.php' ) && wp_get_referer() ) ? wp_get_referer() : set_url_scheme( 'http://' . $_SERVER['HTTP_HOST'] . $_SERVER['REQUEST_URI'] ); 1240 if ( str_contains( $_SERVER['REQUEST_URI'], '/options.php' ) && wp_get_referer() ) { 1241 $redirect = wp_get_referer(); 1242 } else { 1243 $redirect = set_url_scheme( 'http://' . $_SERVER['HTTP_HOST'] . $_SERVER['REQUEST_URI'] ); 1244 } 1241 1245 1242 1246 $login_url = wp_login_url( $redirect, true ); -
trunk/src/wp-login.php
r56157 r56245 1363 1363 } elseif ( isset( $_GET['registration'] ) && 'disabled' === $_GET['registration'] ) { 1364 1364 $errors->add( 'registerdisabled', __( '<strong>Error:</strong> User registration is currently not allowed.' ) ); 1365 } elseif ( str pos( $redirect_to, 'about.php?updated' ) ) {1365 } elseif ( str_contains( $redirect_to, 'about.php?updated' ) ) { 1366 1366 $errors->add( 'updated', __( '<strong>You have successfully updated WordPress!</strong> Please log back in to see what’s new.' ), 'message' ); 1367 1367 } elseif ( WP_Recovery_Mode_Link_Service::LOGIN_ACTION_ENTERED === $action ) {
Note: See TracChangeset
for help on using the changeset viewer.