mirror of
https://github.com/WordPress/WordPress.git
synced 2024-12-22 09:07:59 +01:00
Coding Standards: Use strict type check for in_array()
in wp-includes/feed.php
.
Additionally: * Correct inline comments per the documentation standards. * Correct the `@ticket` reference in `tests/feed/atom.php`. Follow-up to [48429]. See #33591. Built from https://develop.svn.wordpress.org/trunk@48435 git-svn-id: http://core.svn.wordpress.org/trunk@48204 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
parent
5ccd0f963c
commit
463644fc6d
@ -526,17 +526,17 @@ function atom_enclosure() {
|
||||
|
||||
$mimes = get_allowed_mime_types();
|
||||
|
||||
// Parse url
|
||||
// Parse URL.
|
||||
if ( isset( $enclosure[0] ) && is_string( $enclosure[0] ) ) {
|
||||
$url = trim( $enclosure[0] );
|
||||
}
|
||||
|
||||
// Parse length and type
|
||||
foreach ( range( 1, 2 ) as $i ) {
|
||||
// Parse length and type.
|
||||
for ( $i = 1; $i <= 2; $i++ ) {
|
||||
if ( isset( $enclosure[ $i ] ) ) {
|
||||
if ( is_numeric( $enclosure[ $i ] ) ) {
|
||||
$length = trim( $enclosure[ $i ] );
|
||||
} elseif ( in_array( $enclosure[ $i ], $mimes ) ) {
|
||||
} elseif ( in_array( $enclosure[ $i ], $mimes, true ) ) {
|
||||
$type = trim( $enclosure[ $i ] );
|
||||
}
|
||||
}
|
||||
@ -548,6 +548,7 @@ function atom_enclosure() {
|
||||
esc_attr( $length ),
|
||||
esc_attr( $type )
|
||||
);
|
||||
|
||||
/**
|
||||
* Filters the atom enclosure HTML link tag for the current post.
|
||||
*
|
||||
|
@ -13,7 +13,7 @@
|
||||
*
|
||||
* @global string $wp_version
|
||||
*/
|
||||
$wp_version = '5.5-beta1-48434';
|
||||
$wp_version = '5.5-beta1-48435';
|
||||
|
||||
/**
|
||||
* Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.
|
||||
|
Loading…
Reference in New Issue
Block a user