: str_replace(): Passing null to parameter #2 ($replace) of type array|string is deprecated in
private function get_url() {
$this->url = $this->options( 'url' );
// If the tracking add-on is not active.
if ( ! defined( 'AAT_VERSION' ) ) {
// If this is not the ad edit page.
if ( 'post.php' !== $pagenow && 'post-new.php' !== $pagenow && ! empty( $this->url ) ) {
$this->url = str_replace(
* Generate the tooltip title for a placement with associated ads.
* @return string Tooltip title containing placement and ads name.
private function get_tooltip_title() {
// Check if a group ID is provided in the arguments.
if ( isset( $this->args['group_info']['id'] ) ) {
// Create an instance of Advanced_Ads_Group using the provided group ID.
$group = new Advanced_Ads_Group( $this->args['group_info']['id'] );
// Get all ads within the group and extract their post titles.
$ads = wp_list_pluck( $group->get_all_ads(), 'post_title' );
// If no group ID is provided, get ads directly from the Advanced_Ads model.
Advanced_Ads::get_instance()->get_model()->get_ads(
'post__in' => [ $this->args['id'] ]
// Construct and format the tooltip title using the placement ID and ad titles.
// translators: %1$s is a placement name, %2$s is the ads name.
__( 'Placement name: %1$s; Ads: %2$s', 'advanced-ads' ),
esc_attr( $this->args['output']['placement_id'] ?? '' ),
esc_attr( $ads ? implode( ',', $ads ) : '' )