Changes between Initial Version and Version 1 of Ticket #53858, comment 13
- Timestamp:
- 08/02/2021 01:44:43 PM (4 years ago)
Legend:
- Unmodified
- Added
- Removed
- Modified
-
Ticket #53858, comment 13
initial v1 3 3 <?php 4 4 // Option 1: polyfill the new function (preferred solution). 5 if ( ! function_exists( 'wp_read yonly' ) ) {5 if ( ! function_exists( 'wp_readonly' ) ) { 6 6 function wp_readonly( $readonly, $current = true, $echo = true ) { 7 7 return __checked_selected_helper( $readonly, $current, $echo, 'readonly' ); … … 10 10 11 11 // Option 2: conditionally call the function. 12 if ( function_exists( 'wp_read yonly' ) ) {12 if ( function_exists( 'wp_readonly' ) ) { 13 13 $code = wp_readonly( $readonly, $current, $echo ); 14 14 } elseif ( PHP_VERSION_ID < 80100 ) {