Make WordPress Core


Ignore:
Timestamp:
10/08/2020 09:13:57 PM (4 years ago)
Author:
SergeyBiryukov
Message:

General: Replace older-style PHP type conversion functions with type casts.

This improves performance, readability, and consistency throughout core.

  • intval()(int)
  • strval()(string)
  • floatval()(float)

Props ayeshrajans.
Fixes #42918.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/wp-admin/edit-comments.php

    r48352 r49108  
    330330
    331331<?php if ( $post_id ) : ?>
    332 <input type="hidden" name="p" value="<?php echo esc_attr( intval( $post_id ) ); ?>" />
     332<input type="hidden" name="p" value="<?php echo esc_attr( (int) $post_id ); ?>" />
    333333<?php endif; ?>
    334334<input type="hidden" name="comment_status" value="<?php echo esc_attr( $comment_status ); ?>" />
Note: See TracChangeset for help on using the changeset viewer.