: str_replace(): Passing null to parameter #2 ($replace) of type array|string is deprecated in
/* translators: Hidden accessibility text. */
* Filters the default time formats.
* @param string[] $default_time_formats Array of default time formats.
$time_formats = array_unique( apply_filters( 'time_formats', array( __( 'g:i a' ), 'g:i A', 'H:i' ) ) );
foreach ( $time_formats as $format ) {
echo "\t<label><input type='radio' name='time_format' value='" . esc_attr( $format ) . "'";
if ( get_option( 'time_format' ) === $format ) { // checked() uses "==" rather than "===".
echo " checked='checked'";
echo ' /> <span class="date-time-text format-i18n">' . date_i18n( $format ) . '</span><code>' . esc_html( $format ) . "</code></label><br />\n";
echo '<label><input type="radio" name="time_format" id="time_format_custom_radio" value="\c\u\s\t\o\m"';
echo '/> <span class="date-time-text date-time-custom-text">' . __( 'Custom:' ) . '<span class="screen-reader-text"> ' .
/* translators: Hidden accessibility text. */
__( 'enter a custom time format in the following field' ) .
'</span></span></label>' .
'<label for="time_format_custom" class="screen-reader-text">' .
/* translators: Hidden accessibility text. */
__( 'Custom time format:' ) .
'<input type="text" name="time_format_custom" id="time_format_custom" value="' . esc_attr( get_option( 'time_format' ) ) . '" class="small-text" />' .
'<p><strong>' . __( 'Preview:' ) . '</strong> <span class="example">' . date_i18n( get_option( 'time_format' ) ) . '</span>' .
"<span class='spinner'></span>\n" . '</p>';
echo "\t<p class='date-time-doc'>" . __( '<a href="https://wordpress.org/documentation/article/customize-date-and-time-format/">Documentation on date and time formatting</a>.' ) . "</p>\n";
<th scope="row"><label for="start_of_week"><?php _e( 'Week Starts On' ); ?></label></th>
<td><select name="start_of_week" id="start_of_week">
* @global WP_Locale $wp_locale WordPress date and time locale object.
for ( $day_index = 0; $day_index <= 6; $day_index++ ) :
$selected = ( (int) get_option( 'start_of_week' ) === $day_index ) ? 'selected="selected"' : '';
echo "\n\t<option value='" . esc_attr( $day_index ) . "' $selected>" . $wp_locale->get_weekday( $day_index ) . '</option>';
<?php do_settings_fields( 'general', 'default' ); ?>
<?php do_settings_sections( 'general' ); ?>
<?php submit_button(); ?>
<?php require_once ABSPATH . 'wp-admin/admin-footer.php'; ?>