wp/wp-includes/widgets/class-wp-widget-text.php
changeset 22 8c2e4d02f4ef
parent 21 48c4eec2b7e6
equal deleted inserted replaced
21:48c4eec2b7e6 22:8c2e4d02f4ef
   332 			echo $args['before_title'] . $title . $args['after_title'];
   332 			echo $args['before_title'] . $title . $args['after_title'];
   333 		}
   333 		}
   334 
   334 
   335 		$text = preg_replace_callback( '#<(video|iframe|object|embed)\s[^>]*>#i', array( $this, 'inject_video_max_width_style' ), $text );
   335 		$text = preg_replace_callback( '#<(video|iframe|object|embed)\s[^>]*>#i', array( $this, 'inject_video_max_width_style' ), $text );
   336 
   336 
   337 		// Adds 'noopener' relationship, without duplicating values, to all HTML A elements that have a target.
       
   338 		$text = wp_targeted_link_rel( $text );
       
   339 
       
   340 		?>
   337 		?>
   341 			<div class="textwidget"><?php echo $text; ?></div>
   338 			<div class="textwidget"><?php echo $text; ?></div>
   342 		<?php
   339 		<?php
   343 		echo $args['after_widget'];
   340 		echo $args['after_widget'];
   344 	}
   341 	}
   558 
   555 
   559 			<?php if ( ! in_array( 'text_widget_paste_html', $dismissed_pointers, true ) ) : ?>
   556 			<?php if ( ! in_array( 'text_widget_paste_html', $dismissed_pointers, true ) ) : ?>
   560 				<div hidden class="wp-pointer paste-html-pointer wp-pointer-top">
   557 				<div hidden class="wp-pointer paste-html-pointer wp-pointer-top">
   561 					<div class="wp-pointer-content">
   558 					<div class="wp-pointer-content">
   562 						<h3><?php _e( 'Did you just paste HTML?' ); ?></h3>
   559 						<h3><?php _e( 'Did you just paste HTML?' ); ?></h3>
   563 						<p><?php _e( 'Hey there, looks like you just pasted HTML into the &#8220;Visual&#8221; tab of the Text widget. You may want to paste your code into the &#8220;Text&#8221; tab instead. Alternately, try out the new &#8220;Custom HTML&#8221; widget!' ); ?></p>
   560 						<p><?php _e( 'Hey there, looks like you just pasted HTML into the &#8220;Visual&#8221; tab of the Text widget. You may want to paste your code into the &#8220;Code&#8221; tab instead. Alternately, try out the new &#8220;Custom HTML&#8221; widget!' ); ?></p>
   564 						<div class="wp-pointer-buttons">
   561 						<div class="wp-pointer-buttons">
   565 							<a class="close" href="#"><?php _e( 'Dismiss' ); ?></a>
   562 							<a class="close" href="#"><?php _e( 'Dismiss' ); ?></a>
   566 						</div>
   563 						</div>
   567 					</div>
   564 					</div>
   568 					<div class="wp-pointer-arrow">
   565 					<div class="wp-pointer-arrow">