esc_html__( 'Support a In-feed ad unit for Google AdSense.', 'simple-days' ), ) // Args ); } public function widget( $args, $instance ) { $data_ad_client = get_theme_mod( 'simple_days_google_ad_publisher_id' , ''); $data_ad_slot = get_theme_mod( 'simple_days_google_ad_data_ad_slot_infeed' , ''); $data_ad_layout_key = get_theme_mod( 'simple_days_google_ad_data_ad_layout_key_infeed' , ''); $data_ad_slot_mobile = get_theme_mod( 'simple_days_google_ad_data_ad_slot_infeed_mobile' , ''); $data_ad_layout_key_mobile = get_theme_mod( 'simple_days_google_ad_data_ad_layout_key_infeed_mobile' , ''); if ( $data_ad_client != '' && ( ($data_ad_slot != '' || !empty( $instance['data_ad_slot'] )) && ($data_ad_layout_key != '' || !empty( $instance['data_ad_layout_key'] )) ) || ( ($data_ad_slot_mobile != '' || !empty( $instance['data_ad_slot_mobile'] )) && ($data_ad_layout_key_mobile != '' || !empty( $instance['data_ad_layout_key_mobile'] )) )){ echo $args['before_widget']; $ad_labeling = get_theme_mod( 'simple_days_google_ad_labeling' , '0'); if ($ad_labeling == '1'){ $ad_labeling = esc_html__( 'Advertisements', 'simple-days' ); }else if ($ad_labeling == '2'){ $ad_labeling = esc_html__( 'Sponsored Links', 'simple-days' ); }else{ $ad_labeling = ''; } if(!empty( $instance['data_ad_slot'] ))$data_ad_slot = $instance['data_ad_slot']; if(!empty( $instance['data_ad_layout_key'] ))$data_ad_layout_key = $instance['data_ad_layout_key']; if(!empty( $instance['data_ad_slot_mobile'] ))$data_ad_slot_mobile = $instance['data_ad_slot_mobile']; if(!empty( $instance['data_ad_layout_key_mobile'] ))$data_ad_layout_key_mobile = $instance['data_ad_layout_key_mobile']; //echo '