: str_replace(): Passing null to parameter #2 ($replace) of type array|string is deprecated in
<?php // phpcs:ignoreFile
* Render content of the Ad Schedule column in the ad overview list
* @var string $html_classes additonal values for class attribute.
* @var string $post_future timestamp of the schedule date.
* @var string $expiry_date_format date format.
* @var string $expiry expiry date.
* @var string $content_after HTML to load after the schedule content.
<fieldset class="inline-edit-col-left">
<div class="inline-edit-col <?php echo esc_attr( $html_classes ); ?>">
// translators: %s is a date.
esc_html__( 'starts %s', 'advanced-ads' ),
date( 'Y-m-d H:i:s', $post_future ),
esc_html( $expiry_date_format )
<?php if ( $expiry ) : ?>
$tz_option = get_option( 'timezone_string' );
$expiry_date = date_create( '@' . $expiry, new DateTimeZone( 'UTC' ) );
$expiry_date->setTimezone( Advanced_Ads_Utils::get_wp_timezone() );
$expiry_date_string = $expiry_date->format( $expiry_date_format );
$tz_name = Advanced_Ads_Utils::get_timezone_name();
$tz_offset = substr( $tz_name, 3 );
$off_time = date_create( $expiry_date->format( 'Y-m-d\TH:i:s' ) . $tz_offset );
$offset_in_sec = date_offset_get( $off_time );
$expiry_date = date_create( '@' . ( $expiry + $offset_in_sec ) );
$expiry_date_string = date_i18n( $expiry_date_format, absint( $expiry_date->format( 'U' ) ) );
<?php if ( $expiry > time() ) : ?>
// translators: %s is a date.
esc_html__( 'expires %s', 'advanced-ads' ),
esc_html( $expiry_date_string )
// translators: %s is a time and date string.
__( '<strong>expired</strong> %s', 'advanced-ads' ),
esc_html( $expiry_date_string )